-
Notifications
You must be signed in to change notification settings - Fork 31
/
1049.7f9c3cc5.iframe.bundle.js
1 lines (1 loc) · 82.9 KB
/
1049.7f9c3cc5.iframe.bundle.js
1
"use strict";(globalThis.webpackChunkmetamask_crx=globalThis.webpackChunkmetamask_crx||[]).push([[1049],{"./ui/components/ui/spinner/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>spinner});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),Spinner=function(param){var _param_className=param.className,_param_color=param.color,color=void 0===_param_color?"var(--color-icon-muted)":_param_color;return react.createElement("div",{className:"spinner ".concat(void 0===_param_className?"":_param_className)},react.createElement("svg",{className:"lds-spinner",width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",style:{background:"none"}},react.createElement("g",{transform:"rotate(0 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"-0.9166666666666666s",repeatCount:"indefinite"}))),react.createElement("g",{transform:"rotate(30 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"-0.8333333333333334s",repeatCount:"indefinite"}))),react.createElement("g",{transform:"rotate(60 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"-0.75s",repeatCount:"indefinite"}))),react.createElement("g",{transform:"rotate(90 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"-0.6666666666666666s",repeatCount:"indefinite"}))),react.createElement("g",{transform:"rotate(120 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"-0.5833333333333334s",repeatCount:"indefinite"}))),react.createElement("g",{transform:"rotate(150 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"-0.5s",repeatCount:"indefinite"}))),react.createElement("g",{transform:"rotate(180 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"-0.4166666666666667s",repeatCount:"indefinite"}))),react.createElement("g",{transform:"rotate(210 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"-0.3333333333333333s",repeatCount:"indefinite"}))),react.createElement("g",{transform:"rotate(240 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"-0.25s",repeatCount:"indefinite"}))),react.createElement("g",{transform:"rotate(270 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"-0.16666666666666666s",repeatCount:"indefinite"}))),react.createElement("g",{transform:"rotate(300 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"-0.08333333333333333s",repeatCount:"indefinite"}))),react.createElement("g",{transform:"rotate(330 50 50)"},react.createElement("rect",{x:45,y:0,rx:0,ry:0,width:10,height:30,fill:color},react.createElement("animate",{attributeName:"opacity",values:"1;0",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))};Spinner.propTypes={className:prop_types_default().string,color:prop_types_default().string},Spinner.__docgenInfo={description:"",methods:[],displayName:"Spinner",props:{className:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},color:{defaultValue:{value:"'var(--color-icon-muted)'",computed:!1},description:"",type:{name:"string"},required:!1}}};let spinner=Spinner;Spinner.__docgenInfo={description:"",methods:[],displayName:"Spinner",props:{className:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},color:{defaultValue:{value:"'var(--color-icon-muted)'",computed:!1},description:"",type:{name:"string"},required:!1}}}},"./ui/helpers/utils/settings-search.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{FF:()=>getNumberOfSettingRoutesInTab,A1:()=>getSettingsRoutes,vm:()=>getSpecificSettingsRoute,K8:()=>handleSettingsRefs,ts:()=>highlightSearchedText});var settingsRoutes,util=__webpack_require__("./app/scripts/lib/util.ts"),app=__webpack_require__("./shared/constants/app.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),routes=__webpack_require__("./ui/helpers/constants/routes.ts"),SETTINGS_CONSTANTS=[{tabMessage:function(t){return t("general")},sectionMessage:function(t){return t("currencyConversion")},descriptionMessage:function(t){return t("currencyConversion")},route:"".concat(routes.JW,"#currency-conversion"),iconName:component_library.$M.Setting},{tabMessage:function(t){return t("general")},sectionMessage:function(t){return t("showNativeTokenAsMainBalance")},descriptionMessage:function(t){return t("showNativeTokenAsMainBalance")},route:"".concat(routes.JW,"#show-native-token-as-main-balance"),iconName:component_library.$M.Setting},{tabMessage:function(t){return t("general")},sectionMessage:function(t){return t("currentLanguage")},descriptionMessage:function(t){return t("currentLanguage")},route:"".concat(routes.JW,"#current-language"),iconName:component_library.$M.Setting},{tabMessage:function(t){return t("general")},sectionMessage:function(t){return t("theme")},descriptionMessage:function(t){return t("themeDescription")},route:"".concat(routes.JW,"#theme"),icon:"fa fa-flask"},{tabMessage:function(t){return t("general")},sectionMessage:function(t){return t("accountIdenticon")},descriptionMessage:function(t){return t("accountIdenticon")},route:"".concat(routes.JW,"#account-identicon"),iconName:component_library.$M.Setting},{tabMessage:function(t){return t("general")},sectionMessage:function(t){return t("hideZeroBalanceTokens")},descriptionMessage:function(t){return t("hideZeroBalanceTokens")},route:"".concat(routes.JW,"#zero-balancetokens"),iconName:component_library.$M.Setting},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("stateLogs")},descriptionMessage:function(t){return t("stateLogsDescription")},route:"".concat(routes.rZ,"#state-logs"),icon:"fas fa-sliders-h"},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("clearActivity")},descriptionMessage:function(t){return t("clearActivityDescription")},route:"".concat(routes.rZ,"#clear-activity"),icon:"fas fa-sliders-h"},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("smartTransactions")},descriptionMessage:function(t){return t("stxOptInDescription")},route:"".concat(routes.rZ,"#smart-transactions"),icon:"fas fa-upload"},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("showHexData")},descriptionMessage:function(t){return t("showHexDataDescription")},route:"".concat(routes.rZ,"#show-hexdata"),icon:"fas fa-sliders-h"},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("showFiatConversionInTestnets")},descriptionMessage:function(t){return t("showFiatConversionInTestnetsDescription")},route:"".concat(routes.rZ,"#conversion-testnetworks"),icon:"fas fa-sliders-h"},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("showTestnetNetworks")},descriptionMessage:function(t){return t("showTestnetNetworksDescription")},route:"".concat(routes.rZ,"#show-testnets"),icon:"fas fa-sliders-h"},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("nonceField")},descriptionMessage:function(t){return t("nonceFieldDesc")},route:"".concat(routes.rZ,"#customize-nonce"),icon:"fas fa-sliders-h"},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("autoLockTimeLimit")},descriptionMessage:function(t){return t("autoLockTimeLimitDescription")},route:"".concat(routes.rZ,"#autolock-timer"),icon:"fas fa-sliders-h"},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("showExtensionInFullSizeView")},descriptionMessage:function(t){return t("showExtensionInFullSizeViewDescription")},route:"".concat(routes.rZ,"#extension-full-size-view"),icon:"fas fa-sliders-h"},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("dismissReminderField")},descriptionMessage:function(t){return t("dismissReminderDescriptionField")},route:"".concat(routes.rZ,"#dismiss-secretrecovery"),icon:"fas fa-sliders-h"},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("exportYourData")},descriptionMessage:function(t){return t("exportYourDataDescription")},route:"".concat(routes.rZ,"#export-data"),icon:"fas fa-download"},{tabMessage:function(t){return t("advanced")},sectionMessage:function(t){return t("overrideContentSecurityPolicyHeader")},descriptionMessage:function(t){return t("overrideContentSecurityPolicyHeaderDescription")},route:"".concat(routes.rZ,"#override-content-security-policy-header"),icon:"fas fa-sliders-h",hidden:(0,util.uo)()!==app.Yb},{tabMessage:function(t){return t("contacts")},sectionMessage:function(t){return t("contacts")},descriptionMessage:function(t){return t("contacts")},route:routes._3,iconName:component_library.$M.Book},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("basicConfigurationLabel")},descriptionMessage:function(t){return t("basicConfigurationDescription")},route:"".concat(routes.Vg,"#basic-functionality-toggle"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("revealSeedWords")},descriptionMessage:function(t){return t("revealSeedWords")},route:"".concat(routes.Vg,"#reveal-secretrecovery"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("showIncomingTransactions")},descriptionMessage:function(t){return t("showIncomingTransactionsDescription")},route:"".concat(routes.Vg,"#incoming-transaction"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("usePhishingDetection")},descriptionMessage:function(t){return t("usePhishingDetectionDescription")},route:"".concat(routes.Vg,"#phishing-detection"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("use4ByteResolution")},descriptionMessage:function(t){return t("use4ByteResolutionDescription")},route:"".concat(routes.Vg,"#decode-smart-contracts"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("participateInMetaMetrics")},descriptionMessage:function(t){return t("participateInMetaMetricsDescription")},route:"".concat(routes.Vg,"#metametrics"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("networkProvider")},descriptionMessage:function(t){return"".concat(t("chooseYourNetwork")," ").concat(t("chooseYourNetworkDescription"))},route:"".concat(routes.Vg,"#network-provider"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("ipfsGateway")},descriptionMessage:function(t){return t("ipfsGatewayDescription")},route:"".concat(routes.Vg,"#add-custom-ipfs-gateway"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("autoDetectTokens")},descriptionMessage:function(t){return t("autoDetectTokensDescription")},route:"".concat(routes.Vg,"#auto-detect-tokens"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("useMultiAccountBalanceChecker")},descriptionMessage:function(t){return t("useMultiAccountBalanceCheckerSettingDescription")},route:"".concat(routes.Vg,"#batch-account-balance-requests"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("currencyRateCheckToggle")},descriptionMessage:function(t){return t("currencyRateCheckToggleDescription")},route:"".concat(routes.Vg,"#price-checker"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("ensDomainsSettingTitle")},descriptionMessage:function(t){return t("ensDomainsSettingDescriptionIntroduction")},route:"".concat(routes.Vg,"#ens-domains"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("displayNftMedia")},descriptionMessage:function(t){return t("displayNftMediaDescription")},route:"".concat(routes.Vg,"#display-nft-media"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("useNftDetection")},descriptionMessage:function(t){return t("useNftDetectionDescriptionText")},route:"".concat(routes.Vg,"#autodetect-nfts"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("useSafeChainsListValidation")},descriptionMessage:function(t){return t("useSafeChainsListValidationDescription")},route:"".concat(routes.Vg,"#network-details-check"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("externalNameSourcesSetting")},descriptionMessage:function(t){return t("externalNameSourcesSettingDescription")},route:"".concat(routes.Vg,"#proposed-nicknames"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("securityAlerts")},descriptionMessage:function(t){return t("securityAlertsDescription")},route:"".concat(routes.Vg,"#security-alerts"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("blockaid")},descriptionMessage:function(t){return t("blockaidMessage")},route:"".concat(routes.Vg,"#security-alerts-blockaid"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("simulationsSettingSubHeader")},descriptionMessage:function(t){return t("simulationsSettingDescription")},route:"".concat(routes.Vg,"#transaction-simulations"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("dataCollectionForMarketing")},descriptionMessage:function(t){return t("dataCollectionForMarketingDescription")},route:"".concat(routes.Vg,"#dataCollectionForMarketing"),icon:"fa fa-lock"},{tabMessage:function(t){return t("securityAndPrivacy")},sectionMessage:function(t){return t("deleteMetaMetricsData")},descriptionMessage:function(t){return t("deleteMetaMetricsDataDescription")},route:"".concat(routes.Vg,"#delete-metametrics-data"),icon:"fa fa-lock"},{tabMessage:function(t){return t("networks")},sectionMessage:function(t){return t("mainnet")},descriptionMessage:function(t){return t("mainnet")},route:"".concat(routes.Go,"#networks-mainnet"),icon:"fa fa-plug"},{tabMessage:function(t){return t("networks")},sectionMessage:function(t){return t("lineaMainnet")},descriptionMessage:function(t){return t("lineaMainnet")},route:"".concat(routes.Go,"#networks-linea-mainnet"),icon:"fa fa-plug"},{tabMessage:function(t){return t("networks")},sectionMessage:function(t){return t("goerli")},descriptionMessage:function(t){return t("goerli")},route:"".concat(routes.Go,"#networks-goerli"),icon:"fa fa-plug"},{tabMessage:function(t){return t("networks")},sectionMessage:function(t){return t("sepolia")},descriptionMessage:function(t){return t("sepolia")},route:"".concat(routes.Go,"#networks-sepolia"),icon:"fa fa-plug"},{tabMessage:function(t){return t("networks")},sectionMessage:function(t){return t("lineaGoerli")},descriptionMessage:function(t){return t("lineaGoerli")},route:"".concat(routes.Go,"#networks-linea-goerli"),icon:"fa fa-plug"},{tabMessage:function(t){return t("networks")},sectionMessage:function(t){return t("lineaSepolia")},descriptionMessage:function(t){return t("lineaSepolia")},route:"".concat(routes.Go,"#networks-linea-sepolia"),icon:"fa fa-plug"},{tabMessage:function(t){return t("networks")},sectionMessage:function(t){return t("localhost")},descriptionMessage:function(t){return t("localhost")},route:"".concat(routes.Go,"#networks-localhost"),icon:"fa fa-plug"},{tabMessage:function(t){return t("about")},sectionMessage:function(t){return t("metamaskVersion")},descriptionMessage:function(t){return t("builtAroundTheWorld")},route:"".concat(routes.hU,"#version"),iconName:component_library.$M.Info},{tabMessage:function(t){return t("about")},sectionMessage:function(t){return t("links")},descriptionMessage:function(t){return t("links")},route:"".concat(routes.hU,"#links"),iconName:component_library.$M.Info},{tabMessage:function(t){return t("about")},sectionMessage:function(t){return t("privacyMsg")},descriptionMessage:function(t){return t("privacyMsg")},route:"".concat(routes.hU,"#privacy-policy"),iconName:component_library.$M.Info},{tabMessage:function(t){return t("about")},sectionMessage:function(t){return t("terms")},descriptionMessage:function(t){return t("terms")},route:"".concat(routes.hU,"#terms"),iconName:component_library.$M.Info},{tabMessage:function(t){return t("about")},sectionMessage:function(t){return t("attributions")},descriptionMessage:function(t){return t("attributions")},route:"".concat(routes.hU,"#attributions"),iconName:component_library.$M.Info},{tabMessage:function(t){return t("about")},sectionMessage:function(t){return t("supportCenter")},descriptionMessage:function(t){return t("supportCenter")},route:"".concat(routes.hU,"#supportcenter"),iconName:component_library.$M.Info},{tabMessage:function(t){return t("about")},sectionMessage:function(t){return t("visitWebSite")},descriptionMessage:function(t){return t("visitWebSite")},route:"".concat(routes.hU,"#visitwebsite"),iconName:component_library.$M.Info},{tabMessage:function(t){return t("about")},sectionMessage:function(t){return t("contactUs")},descriptionMessage:function(t){return t("contactUs")},route:"".concat(routes.hU,"#contactus"),iconName:component_library.$M.Info},{tabMessage:function(t){return t("about")},sectionMessage:function(t){return t("betaTerms")},descriptionMessage:function(t){return t("betaTerms")},route:"".concat(routes.hU,"#beta-terms"),iconName:component_library.$M.Info},{tabMessage:function(t){return t("experimental")},sectionMessage:function(t){return t("petnamesEnabledToggle")},descriptionMessage:function(t){return t("petnamesEnabledToggleDescription")},route:"".concat(routes.$R,"#nicknames"),icon:"fas fa-flask"},{tabMessage:function(t){return t("experimental")},sectionMessage:function(t){return t("notificationsFeatureToggle")},descriptionMessage:function(t){return t("notificationsFeatureToggleDescription")},route:"".concat(routes.$R,"#notifications"),icon:"fas fa-flask"},{tabMessage:function(t){return t("experimental")},sectionMessage:function(t){return t("redesignedConfirmationsEnabledToggle")},descriptionMessage:function(t){return t("redesignedConfirmationsToggleDescription")},route:"".concat(routes.$R,"#redesigned-confirmations"),icon:"fas fa-flask"},{tabMessage:function(t){return t("experimental")},sectionMessage:function(t){return t("redesignedTransactionsEnabledToggle")},descriptionMessage:function(t){return t("redesignedTransactionsToggleDescription")},route:"".concat(routes.$R,"#redesigned-transactions"),icon:"fas fa-flask"},{tabMessage:function(t){return t("experimental")},sectionMessage:function(t){return t("snaps")},descriptionMessage:function(t){return t("addSnapAccountToggle")},route:"".concat(routes.$R,"#snaps"),icon:"fas fa-flask"},{featureFlag:"ENABLE_SETTINGS_PAGE_DEV_OPTIONS",tabMessage:function(t){return t("developerOptions")},sectionMessage:"Reset States",descriptionMessage:"Reset States",route:"".concat(routes.mD,"#reset-states"),icon:component_library.$M.CodeCircle},{featureFlag:"ENABLE_SETTINGS_PAGE_DEV_OPTIONS",tabMessage:function(t){return t("developerOptions")},sectionMessage:"Announcements",descriptionMessage:"Resets isShown boolean to false for all announcements. Announcements are the notifications shown in the What's New popup modal.",route:"".concat(routes.mD,"#reset-states-announcements"),icon:component_library.$M.CodeCircle},{featureFlag:"ENABLE_SETTINGS_PAGE_DEV_OPTIONS",tabMessage:function(t){return t("developerOptions")},sectionMessage:"Service Worker Keep Alive",descriptionMessage:'Resets various states related to onboarding and redirects to the "Secure Your Wallet" onboarding page.',route:"".concat(routes.mD,"#reset-states-onboarding"),icon:component_library.$M.CodeCircle},{featureFlag:"ENABLE_SETTINGS_PAGE_DEV_OPTIONS",tabMessage:function(t){return t("developerOptions")},sectionMessage:"Service Worker Keep Alive",descriptionMessage:"Results in a timestamp being continuously saved to session.storage",route:"".concat(routes.mD,"#service-worker-keep-alive"),icon:component_library.$M.CodeCircle}],process=__webpack_require__("./node_modules/process/browser.js");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_without_holes(arr){if(Array.isArray(arr))return _array_like_to_array(arr)}function _iterable_to_array(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _to_consumable_array(arr){return _array_without_holes(arr)||_iterable_to_array(arr)||_unsupported_iterable_to_array(arr)||_non_iterable_spread()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}function getSettingsRoutes(){return settingsRoutes||(settingsRoutes=SETTINGS_CONSTANTS.filter(function(routeObject){return(!routeObject.featureFlag||process.env[routeObject.featureFlag])&&!routeObject.hidden}))}function getFilteredSettingsRoutes(t,tabMessage){return getSettingsRoutes().filter(function(routeObject){return routeObject.tabMessage(t)===tabMessage})}function getSpecificSettingsRoute(t,tabMessage,sectionMessage){return getSettingsRoutes().find(function(routeObject){return routeObject.tabMessage(t)===tabMessage&&routeObject.sectionMessage(t)===sectionMessage})}function getNumberOfSettingRoutesInTab(t,tabMessage){return getFilteredSettingsRoutes(t,tabMessage).length}function handleSettingsRefs(t,tabMessage,settingsRefs){var settingsSearchJsonFiltered=getFilteredSettingsRoutes(t,tabMessage),settingsRefsIndex=settingsSearchJsonFiltered.findIndex(function(routeObject){return routeObject.route.substring(1)===window.location.hash.substring(1)});if(-1!==settingsRefsIndex){var settingsRef=1===settingsSearchJsonFiltered.length?settingsRefs:settingsRefs[settingsRefsIndex];if(null==settingsRef?void 0:settingsRef.current){settingsRef.current.scrollIntoView({behavior:"smooth"}),settingsRef.current.focus();var historySettingsUrl=window.location.hash.split("#")[1];window.location.hash=historySettingsUrl}}}function colorText(menuElement,regex){if(null!==menuElement){var elemText=menuElement.innerHTML;elemText=(elemText=elemText.replace("&","&")).replace(/(<span class="settings-page__header__search__list__item__highlight">|<\/span>)/gim,""),menuElement.innerHTML=elemText.replace(regex,'<span class="settings-page__header__search__list__item__highlight">$&</span>')}}function highlightSearchedText(){var searchRegex=RegExp(document.getElementById("search-settings").value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");_to_consumable_array(document.querySelectorAll(".settings-page__header__search__list__item")).forEach(function(element){var menuTabElement=element.querySelector(".settings-page__header__search__list__item__tab"),menuSectionElement=element.querySelector(".settings-page__header__search__list__item__section");colorText(menuTabElement,searchRegex),colorText(menuSectionElement,searchRegex)})}},"./ui/hooks/useAccountTotalFiatBalance.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{r:()=>useAccountTotalFiatBalance});var react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),ethereumjs_util__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/ethereumjs-util/dist.browser/index.js"),_selectors__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/selectors/index.js"),_shared_modules_conversion_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./shared/modules/conversion.utils.ts"),_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/ducks/metamask/metamask.js"),_helpers_utils_confirm_tx_util__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/helpers/utils/confirm-tx.util.ts"),_helpers_utils_token_util__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/helpers/utils/token-util.js"),_helpers_utils_util__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/helpers/utils/util.js"),_useTokenBalances__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./ui/hooks/useTokenBalances.ts");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_without_holes(arr){if(Array.isArray(arr))return _array_like_to_array(arr)}function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _iterable_to_array(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){return source=null!=source?source:{},Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}),target}function _to_consumable_array(arr){return _array_without_holes(arr)||_iterable_to_array(arr)||_unsupported_iterable_to_array(arr)||_non_iterable_spread()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}var useAccountTotalFiatBalance=function(account,shouldHideZeroBalanceTokens){var result,_detectedTokens_currentChainId,_cachedBalances_account_address,_detectedTokens_currentChainId_account_address,currentChainId=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.grx),conversionRate=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_4__.fR),currentCurrency=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.FxA),contractExchangeRates=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.K_j,react_redux__WEBPACK_IMPORTED_MODULE_0__.bN),confirmationExchangeRates=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__._f$),cachedBalances=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.lGj),balance=null!==(_cachedBalances_account_address=null==cachedBalances?void 0:cachedBalances[null==account?void 0:account.address])&&void 0!==_cachedBalances_account_address?_cachedBalances_account_address:0,nativeFiat=(0,_shared_modules_conversion_utils__WEBPACK_IMPORTED_MODULE_3__.gh)({value:balance,toCurrency:currentCurrency,conversionRate:conversionRate,numberOfDecimals:2}),detectedTokens=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.YRm),tokens=null!==(_detectedTokens_currentChainId_account_address=null==detectedTokens?void 0:null===(_detectedTokens_currentChainId=detectedTokens[currentChainId])||void 0===_detectedTokens_currentChainId?void 0:_detectedTokens_currentChainId[null==account?void 0:account.address])&&void 0!==_detectedTokens_currentChainId_account_address?_detectedTokens_currentChainId_account_address:[],allTokenList=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.iM3),primaryTokenImage=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.Q3H),nativeCurrency=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_4__.Zt),tokensWithBalances=(0,_useTokenBalances__WEBPACK_IMPORTED_MODULE_8__.H6)({chainId:currentChainId,tokens:tokens,address:null==account?void 0:account.address,hideZeroBalanceTokens:shouldHideZeroBalanceTokens}).tokensWithBalances,mergedRates=_object_spread({},contractExchangeRates,confirmationExchangeRates),tokenFiatBalances=tokensWithBalances.map(function(token){var tokenExchangeRate=mergedRates[(0,ethereumjs_util__WEBPACK_IMPORTED_MODULE_1__.toChecksumAddress)(token.address)];return(0,_helpers_utils_token_util__WEBPACK_IMPORTED_MODULE_6__.aQ)(tokenExchangeRate,conversionRate,currentCurrency,token.string,token.symbol,!1,!1)}),orderedTokenList=[{iconUrl:primaryTokenImage,symbol:nativeCurrency,fiatBalance:nativeFiat}].concat(_to_consumable_array((result=[],tokensWithBalances.forEach(function(token){var matchingToken=allTokenList[token.address.toLowerCase()];matchingToken&&result.push(_object_spread_props(_object_spread({},matchingToken),{balance:token.balance,string:token.string,balanceError:token.balanceError}))}),result).map(function(item,index){return _object_spread_props(_object_spread({},item),{fiatBalance:tokenFiatBalances[index]})}))).sort(function(a,b){return parseFloat(b.fiatBalance)-parseFloat(a.fiatBalance)}),totalFiatBalance=_shared_modules_conversion_utils__WEBPACK_IMPORTED_MODULE_3__.s3.apply(void 0,[nativeFiat].concat(_to_consumable_array(tokenFiatBalances))).toString(10);tokensWithBalances.forEach(function(token){token.string=(0,_helpers_utils_util__WEBPACK_IMPORTED_MODULE_7__.eP)(token.string,5)}),tokensWithBalances.forEach(function(token){var tokenExchangeRate=mergedRates[(0,ethereumjs_util__WEBPACK_IMPORTED_MODULE_1__.toChecksumAddress)(token.address)];token.tokenFiatAmount=(0,_helpers_utils_token_util__WEBPACK_IMPORTED_MODULE_6__.aQ)(tokenExchangeRate,conversionRate,currentCurrency,token.string,token.symbol,!1,!1)||"0"});var formattedFiat=(0,_helpers_utils_confirm_tx_util__WEBPACK_IMPORTED_MODULE_5__.vv)(totalFiatBalance,currentCurrency),totalWeiBalance=(0,_shared_modules_conversion_utils__WEBPACK_IMPORTED_MODULE_3__.$y)({value:totalFiatBalance,fromCurrency:currentCurrency,conversionRate:conversionRate,invertConversionRate:!0});return"NaN"===totalWeiBalance&&(totalWeiBalance="0x0"),{formattedFiat:formattedFiat,totalWeiBalance:totalWeiBalance,totalFiatBalance:totalFiatBalance,tokensWithBalances:tokensWithBalances,loading:!1,orderedTokenList:orderedTokenList,mergedRates:mergedRates}}},"./ui/components/app/wallet-overview/coin-overview.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{J:()=>CoinOverview});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),codefi_v2=__webpack_require__("./node_modules/@metamask/assets-controllers/dist/token-prices-service/codefi-v2.mjs"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),portfolio=__webpack_require__("./ui/helpers/utils/portfolio.js"),metametrics=__webpack_require__("./ui/contexts/metametrics.js"),constants_metametrics=__webpack_require__("./shared/constants/metametrics.ts"),i18n=__webpack_require__("./ui/contexts/i18n.js"),tooltip=__webpack_require__("./ui/components/ui/tooltip/index.js"),user_preferenced_currency_display=__webpack_require__("./ui/components/app/user-preferenced-currency-display/index.js"),common=__webpack_require__("./ui/helpers/constants/common.ts"),selectors=__webpack_require__("./ui/selectors/index.js"),spinner=__webpack_require__("./ui/components/ui/spinner/index.js"),percentage_and_amount_change=__webpack_require__("./ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.tsx"),multichain=__webpack_require__("./ui/selectors/multichain.ts"),actions=__webpack_require__("./ui/__mocks__/actions.js"),useTheme=__webpack_require__("./ui/hooks/useTheme.ts"),settings_search=__webpack_require__("./ui/helpers/utils/settings-search.js"),useAccountTotalCrossChainFiatBalance=__webpack_require__("./ui/hooks/useAccountTotalCrossChainFiatBalance.ts"),useGetFormattedTokensPerChain=__webpack_require__("./ui/hooks/useGetFormattedTokensPerChain.ts"),useMultichainSelector=__webpack_require__("./ui/hooks/useMultichainSelector.ts"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),util=__webpack_require__("./app/scripts/lib/util.ts"),app=__webpack_require__("./shared/constants/app.ts"),WalletOverview=function(param){var balance=param.balance,buttons=param.buttons,className=param.className;return react.createElement("div",{className:classnames_default()("wallet-overview",{"wallet-overview-fullscreen":(0,util.mc)()===app.t8},className)},react.createElement("div",{className:"wallet-overview__balance"},balance),react.createElement("div",{className:"wallet-overview__buttons"},buttons))};WalletOverview.propTypes={balance:prop_types_default().element.isRequired,buttons:prop_types_default().element.isRequired,className:prop_types_default().string},WalletOverview.__docgenInfo={description:"",methods:[],displayName:"WalletOverview",props:{balance:{description:"",type:{name:"element"},required:!0},buttons:{description:"",type:{name:"element"},required:!0},className:{description:"",type:{name:"string"},required:!1}}};var coin_buttons=__webpack_require__("./ui/components/app/wallet-overview/coin-buttons.tsx"),dist_browser=__webpack_require__("./node_modules/ethereumjs-util/dist.browser/index.js"),useAccountTotalFiatBalance=__webpack_require__("./ui/hooks/useAccountTotalFiatBalance.js"),locale_locale=__webpack_require__("./ui/ducks/locale/locale.ts"),utils_util=__webpack_require__("./ui/helpers/utils/util.js");function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){return source=null!=source?source:{},Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}),target}var AggregatedPercentageOverview=function(){var tokensMarketData=(0,es.d4)(selectors.vjn),locale=(0,es.d4)(locale_locale.gA),fiatCurrency=(0,es.d4)(selectors.FxA),privacyMode=(0,es.d4)(selectors.lX9).privacyMode,selectedAccount=(0,es.d4)(selectors.PRX),currentChainId=(0,es.d4)(selectors.grx),shouldHideZeroBalanceTokens=(0,es.d4)(selectors.wri),_useAccountTotalFiatBalance=(0,useAccountTotalFiatBalance.r)(selectedAccount,shouldHideZeroBalanceTokens),totalFiatBalance=_useAccountTotalFiatBalance.totalFiatBalance,orderedTokenList=_useAccountTotalFiatBalance.orderedTokenList,totalFiat1dAgo=(0,react.useMemo)(function(){return orderedTokenList.reduce(function(total1dAgo,item){if(item.address){var _tokensMarketData_getNativeTokenAddress,found=null==tokensMarketData?void 0:tokensMarketData[(0,dist_browser.toChecksumAddress)(item.address)];return total1dAgo+Number((0,utils_util.it)(item.fiatBalance,null==found?void 0:found.pricePercentChange1d))}var nativePricePercentChange1d=null==tokensMarketData?void 0:null===(_tokensMarketData_getNativeTokenAddress=tokensMarketData[(0,codefi_v2.NH)(currentChainId)])||void 0===_tokensMarketData_getNativeTokenAddress?void 0:_tokensMarketData_getNativeTokenAddress.pricePercentChange1d;return total1dAgo+Number((0,utils_util.it)(item.fiatBalance,nativePricePercentChange1d))},0)},[orderedTokenList,tokensMarketData]),amountChange=Number(totalFiatBalance)-totalFiat1dAgo,formattedPercentChange=(0,util.Fl)(0===amountChange?0:amountChange/totalFiat1dAgo*100||0,!0),formattedAmountChange="";if((0,util.d2)(amountChange)){formattedAmountChange=amountChange>=0?"+":"";var options={notation:"compact",compactDisplay:"short",maximumFractionDigits:2};try{formattedAmountChange+="".concat(Intl.NumberFormat(locale,_object_spread_props(_object_spread({},options),{style:"currency",currency:fiatCurrency})).format(amountChange)," ")}catch(e){formattedAmountChange+="".concat(Intl.NumberFormat(locale,_object_spread_props(_object_spread({},options),{minimumFractionDigits:2,style:"decimal"})).format(amountChange)," ")}}var color=design_system.r7.textDefault;return color=!privacyMode&&(0,util.d2)(amountChange)?0===amountChange?design_system.r7.textDefault:amountChange>0?design_system.r7.successDefault:design_system.r7.errorDefault:design_system.r7.textAlternative,react.createElement(component_library.az,{display:design_system.nl.Flex},react.createElement(component_library.EN,{variant:design_system.J3.bodyMdMedium,color:color,"data-testid":"aggregated-value-change",style:{whiteSpace:"pre"},isHidden:privacyMode,ellipsis:!0,length:"10"},formattedAmountChange),react.createElement(component_library.EN,{variant:design_system.J3.bodyMdMedium,color:color,"data-testid":"aggregated-percentage-change",isHidden:privacyMode,ellipsis:!0,length:"10"},formattedPercentChange))};function aggregated_percentage_overview_cross_chains_define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function aggregated_percentage_overview_cross_chains_object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){aggregated_percentage_overview_cross_chains_define_property(target,key,source[key])})}return target}function aggregated_percentage_overview_cross_chains_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function aggregated_percentage_overview_cross_chains_object_spread_props(target,source){return source=null!=source?source:{},Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):aggregated_percentage_overview_cross_chains_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}),target}var AggregatedPercentageOverviewCrossChains=function(){var locale=(0,es.d4)(locale_locale.gA),fiatCurrency=(0,es.d4)(selectors.FxA),privacyMode=(0,es.d4)(selectors.lX9).privacyMode,selectedAccount=(0,es.d4)(selectors.PRX),shouldHideZeroBalanceTokens=(0,es.d4)(selectors.wri),crossChainMarketData=(0,es.d4)(selectors.HWx),allChainIDs=(0,es.d4)(selectors.Kxn),formattedTokensWithBalancesPerChain=(0,useGetFormattedTokensPerChain.O)(selectedAccount,shouldHideZeroBalanceTokens,!1,allChainIDs).formattedTokensWithBalancesPerChain,_useAccountTotalCrossChainFiatBalance=(0,useAccountTotalCrossChainFiatBalance.k)(selectedAccount,formattedTokensWithBalancesPerChain),totalFiatCrossChains=_useAccountTotalCrossChainFiatBalance.totalFiatBalance,tokenFiatBalancesCrossChains=_useAccountTotalCrossChainFiatBalance.tokenFiatBalancesCrossChains,totalFiat1dAgoCrossChains=(0,react.useMemo)(function(){return tokenFiatBalancesCrossChains.reduce(function(total1dAgoCrossChains,item){var chainId,tokenFiatBalances,_crossChainMarketData_item_chainId_getNativeTokenAddress,_crossChainMarketData_item_chainId,perChainERC20Total=(chainId=item.chainId,tokenFiatBalances=item.tokenFiatBalances,item.tokensWithBalances.reduce(function(total1dAgo,item,idx){var _crossChainMarketData_chainId,found=null==crossChainMarketData?void 0:null===(_crossChainMarketData_chainId=crossChainMarketData[chainId])||void 0===_crossChainMarketData_chainId?void 0:_crossChainMarketData_chainId[(0,dist_browser.toChecksumAddress)(item.address)];return total1dAgo+Number((0,utils_util.it)(tokenFiatBalances[idx],null==found?void 0:found.pricePercentChange1d))},0)),nativePricePercentChange1d=null==crossChainMarketData?void 0:null===(_crossChainMarketData_item_chainId=crossChainMarketData[item.chainId])||void 0===_crossChainMarketData_item_chainId?void 0:null===(_crossChainMarketData_item_chainId_getNativeTokenAddress=_crossChainMarketData_item_chainId[(0,codefi_v2.NH)(item.chainId)])||void 0===_crossChainMarketData_item_chainId_getNativeTokenAddress?void 0:_crossChainMarketData_item_chainId_getNativeTokenAddress.pricePercentChange1d;return total1dAgoCrossChains+perChainERC20Total+Number((0,utils_util.it)(item.nativeFiatValue,nativePricePercentChange1d))},0)},[tokenFiatBalancesCrossChains,crossChainMarketData]),amountChangeCrossChains=Number(totalFiatCrossChains)-totalFiat1dAgoCrossChains,formattedPercentChangeCrossChains=(0,util.Fl)(0===amountChangeCrossChains?0:amountChangeCrossChains/totalFiat1dAgoCrossChains*100||0,!0),formattedAmountChangeCrossChains="";if((0,util.d2)(amountChangeCrossChains)){formattedAmountChangeCrossChains=amountChangeCrossChains>=0?"+":"";var options={notation:"compact",compactDisplay:"short",maximumFractionDigits:2};try{formattedAmountChangeCrossChains+="".concat(Intl.NumberFormat(locale,aggregated_percentage_overview_cross_chains_object_spread_props(aggregated_percentage_overview_cross_chains_object_spread({},options),{style:"currency",currency:fiatCurrency})).format(amountChangeCrossChains)," ")}catch(e){formattedAmountChangeCrossChains+="".concat(Intl.NumberFormat(locale,aggregated_percentage_overview_cross_chains_object_spread_props(aggregated_percentage_overview_cross_chains_object_spread({},options),{minimumFractionDigits:2,style:"decimal"})).format(amountChangeCrossChains)," ")}}var color=design_system.r7.textDefault;return color=!privacyMode&&(0,util.d2)(amountChangeCrossChains)?0===amountChangeCrossChains?design_system.r7.textDefault:amountChangeCrossChains>0?design_system.r7.successDefault:design_system.r7.errorDefault:design_system.r7.textAlternative,react.createElement(component_library.az,{display:design_system.nl.Flex},react.createElement(component_library.EN,{variant:design_system.J3.bodyMdMedium,color:color,"data-testid":"aggregated-value-change",style:{whiteSpace:"pre"},isHidden:privacyMode,ellipsis:!0,length:"10"},formattedAmountChangeCrossChains),react.createElement(component_library.EN,{variant:design_system.J3.bodyMdMedium,color:color,"data-testid":"aggregated-percentage-change",isHidden:privacyMode,ellipsis:!0,length:"10"},formattedPercentChangeCrossChains))},process=__webpack_require__("./node_modules/process/browser.js");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function coin_overview_define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}var CoinOverview=function(param){var balanceToDisplay,account=param.account,balance=param.balance,balanceIsCached=param.balanceIsCached,className=param.className,_param_classPrefix=param.classPrefix,classPrefix=void 0===_param_classPrefix?"coin":_param_classPrefix,chainId=param.chainId,defaultSwapsToken=param.defaultSwapsToken,isBridgeChain=param.isBridgeChain,isBuyableChain=param.isBuyableChain,isSwapsChain=param.isSwapsChain,isSigningEnabled=param.isSigningEnabled;if(isSwapsChain&&void 0===defaultSwapsToken)throw Error("defaultSwapsToken is required");var t=(0,react.useContext)(i18n.gJ),trackEvent=(0,react.useContext)(metametrics.O2),metaMetricsId=(0,es.d4)(selectors.k_8),isMetaMetricsEnabled=(0,es.d4)(selectors.qUT),isMarketingEnabled=(0,es.d4)(selectors.QyE),showNativeTokenAsMainBalanceRoute=(0,settings_search.vm)(t,t("general"),t("showNativeTokenAsMainBalance")),theme=(0,useTheme.D)(),dispatch=(0,es.wA)(),shouldShowPopover=(0,es.d4)(selectors.JwO),isTestnet=(0,es.d4)(selectors.MGE),_useSelector=(0,es.d4)(selectors.lX9),showFiatInTestnets=_useSelector.showFiatInTestnets,privacyMode=_useSelector.privacyMode,showNativeTokenAsMainBalance=_useSelector.showNativeTokenAsMainBalance,isTokenNetworkFilterEqualCurrentNetwork=(0,es.d4)(selectors.Xn),shouldHideZeroBalanceTokens=(0,es.d4)(selectors.wri),allChainIDs=(0,es.d4)(selectors.Kxn),formattedTokensWithBalancesPerChain=(0,useGetFormattedTokensPerChain.O)(account,shouldHideZeroBalanceTokens,isTokenNetworkFilterEqualCurrentNetwork,allChainIDs).formattedTokensWithBalancesPerChain,totalFiatBalance=(0,useAccountTotalCrossChainFiatBalance.k)(account,formattedTokensWithBalancesPerChain).totalFiatBalance,shouldShowFiat=(0,useMultichainSelector.t)(multichain.J7,account),isEvm=(0,es.d4)(multichain.Bu);balanceToDisplay=!shouldShowFiat||showNativeTokenAsMainBalance||isTestnet||!isEvm?balance:totalFiatBalance;var tokensMarketData=(0,es.d4)(selectors.vjn),_useState=_sliced_to_array((0,react.useState)(!0),2),isOpen=_useState[0],setIsOpen=_useState[1],handleClick=function(){setIsOpen(!isOpen),dispatch((0,actions.setAggregatedBalancePopoverShown)())},_useState1=_sliced_to_array((0,react.useState)(null),2),referenceElement=_useState1[0],setReferenceElement=_useState1[1],handlePortfolioOnClick=(0,react.useCallback)(function(){var url=(0,portfolio.Q)("","ext_portfolio_button",metaMetricsId,isMetaMetricsEnabled,isMarketingEnabled);__webpack_require__.g.platform.openTab({url:url}),trackEvent({category:constants_metametrics.FZ.Navigation,event:constants_metametrics.gP.PortfolioLinkClicked,properties:{location:"Home",text:"Portfolio"}})},[isMarketingEnabled,isMetaMetricsEnabled,metaMetricsId,trackEvent]);return react.createElement(WalletOverview,{balance:react.createElement(tooltip.A,{position:"top",title:t("balanceOutdated"),disabled:!balanceIsCached},react.createElement("div",{className:"".concat(classPrefix,"-overview__balance")},react.createElement("div",{className:"".concat(classPrefix,"-overview__primary-container"),onMouseEnter:function(){setIsOpen(!0)},ref:function(ref){ref&&setReferenceElement(ref)}},balanceToDisplay?react.createElement(react.Fragment,null,react.createElement(user_preferenced_currency_display.A,{style:{display:"contents"},account:account,className:classnames_default()("".concat(classPrefix,"-overview__primary-balance"),coin_overview_define_property({},"".concat(classPrefix,"-overview__cached-balance"),balanceIsCached)),"data-testid":"".concat(classPrefix,"-overview__primary-currency"),value:balanceToDisplay,type:common.jd,ethNumberOfDecimals:4,hideTitle:!0,shouldCheckShowNativeToken:!0,isAggregatedFiatOverviewBalance:!showNativeTokenAsMainBalance&&!isTestnet&&shouldShowFiat,privacyMode:privacyMode}),react.createElement(component_library.a2,{color:design_system.Li.iconAlternative,marginLeft:2,size:component_library.f3.Md,onClick:function(){dispatch((0,actions.setPrivacyMode)(!privacyMode))},iconName:privacyMode?component_library.$M.EyeSlash:component_library.$M.Eye,justifyContent:design_system.A9.center,ariaLabel:"Sensitive toggle","data-testid":"sensitive-toggle"})):react.createElement(spinner.A,{className:"loading-overlay__spinner"}),balanceIsCached&&react.createElement("span",{className:"".concat(classPrefix,"-overview__cached-star")},"*")),shouldShowPopover&&(!isTestnet||isTestnet&&showFiatInTestnets)&&!showNativeTokenAsMainBalance?react.createElement(component_library.AM,{referenceElement:referenceElement,isOpen:isOpen,position:component_library.$x.BottomStart,hasArrow:!0,flip:!0,"data-theme":"light"===theme?"dark":"light",className:"balance-popover__container",padding:3,onClickOutside:handleClick,onPressEscKey:handleClick,preventOverflow:!0},react.createElement(component_library.az,null,react.createElement(component_library.az,{display:design_system.nl.Flex,justifyContent:design_system.A9.spaceBetween},react.createElement(component_library.EY,{variant:design_system.J3.bodySmBold,textAlign:design_system.nO.Left,alignItems:design_system.k2.flexStart},t("yourBalanceIsAggregated")),react.createElement(component_library.a2,{size:component_library.f3.Sm,onClick:handleClick,iconName:component_library.$M.Close,justifyContent:design_system.A9.center,ariaLabel:"close","data-testid":"popover-close"})),react.createElement(component_library.EY,{variant:design_system.J3.bodySm},process.env.PORTFOLIO_VIEW?t("crossChainAggregatedBalancePopover",[react.createElement(component_library.vx,{size:component_library.wL.Inherit,textProps:{variant:design_system.J3.bodyMd,alignItems:design_system.k2.flexStart},as:"a",href:"#".concat(showNativeTokenAsMainBalanceRoute.route),rel:"noopener noreferrer",onClick:handleClick},t("settings"))]):t("aggregatedBalancePopover",[react.createElement(component_library.vx,{size:component_library.wL.Inherit,textProps:{variant:design_system.J3.bodyMd,alignItems:design_system.k2.flexStart},as:"a",href:"#".concat(showNativeTokenAsMainBalanceRoute.route),rel:"noopener noreferrer",onClick:handleClick},t("settings"))])))):null,function(){if(isEvm){if(showNativeTokenAsMainBalance){var _tokensMarketData_getNativeTokenAddress;return react.createElement(component_library.az,{className:"wallet-overview__currency-wrapper"},react.createElement(percentage_and_amount_change.Q,{value:null==tokensMarketData?void 0:null===(_tokensMarketData_getNativeTokenAddress=tokensMarketData[(0,codefi_v2.NH)(chainId)])||void 0===_tokensMarketData_getNativeTokenAddress?void 0:_tokensMarketData_getNativeTokenAddress.pricePercentChange1d}),react.createElement(component_library.vx,{endIconName:component_library.$M.Export,onClick:handlePortfolioOnClick,as:"a","data-testid":"portfolio-link",textProps:{variant:design_system.J3.bodyMdMedium}},t("portfolio")))}return react.createElement(component_library.az,{className:"wallet-overview__currency-wrapper"},isTokenNetworkFilterEqualCurrentNetwork||!process.env.PORTFOLIO_VIEW?react.createElement(AggregatedPercentageOverview,null):react.createElement(AggregatedPercentageOverviewCrossChains,null),react.createElement(component_library.vx,{endIconName:component_library.$M.Export,onClick:handlePortfolioOnClick,as:"a","data-testid":"portfolio-link",textProps:{variant:design_system.J3.bodyMdMedium}},t("portfolio")))}return null}())),buttons:react.createElement(coin_buttons.A,{account:account,trackingLocation:"home",chainId:chainId,isSwapsChain:isSwapsChain,isSigningEnabled:isSigningEnabled,isBridgeChain:isBridgeChain,isBuyableChain:isBuyableChain,defaultSwapsToken:defaultSwapsToken,classPrefix:classPrefix,iconButtonClassName:"".concat(classPrefix,"-overview__icon-button")}),className:className})};try{CoinOverview.displayName="CoinOverview",CoinOverview.__docgenInfo={description:"",displayName:"CoinOverview",props:{account:{defaultValue:null,description:"",name:"account",required:!0,type:{name:'{ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account"; id: string; address: string; options: Record<string, Json>; methods: string[]; metadata: { ...; }; }'}},balance:{defaultValue:null,description:"",name:"balance",required:!0,type:{name:"string"}},balanceIsCached:{defaultValue:null,description:"",name:"balanceIsCached",required:!0,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},classPrefix:{defaultValue:{value:"coin"},description:"",name:"classPrefix",required:!1,type:{name:"string"}},chainId:{defaultValue:null,description:"",name:"chainId",required:!0,type:{name:"`0x${string}` | `${string}:${string}`"}},defaultSwapsToken:{defaultValue:null,description:"",name:"defaultSwapsToken",required:!1,type:{name:"SwapsEthToken"}},isBridgeChain:{defaultValue:null,description:"",name:"isBridgeChain",required:!0,type:{name:"boolean"}},isBuyableChain:{defaultValue:null,description:"",name:"isBuyableChain",required:!0,type:{name:"boolean"}},isSwapsChain:{defaultValue:null,description:"",name:"isSwapsChain",required:!0,type:{name:"boolean"}},isSigningEnabled:{defaultValue:null,description:"",name:"isSigningEnabled",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/wallet-overview/coin-overview.tsx#CoinOverview"]={docgenInfo:CoinOverview.__docgenInfo,name:"CoinOverview",path:"ui/components/app/wallet-overview/coin-overview.tsx#CoinOverview"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Q:()=>PercentageAndAmountChange});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),bignumber_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/bignumber.js/bignumber.js"),ethereumjs_util__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/ethereumjs-util/dist.browser/index.js"),_metamask_assets_controllers__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@metamask/assets-controllers/dist/token-prices-service/codefi-v2.mjs"),_component_library__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/component-library/index.ts"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_selectors__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/selectors/index.js"),_ducks_locale_locale__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/ducks/locale/locale.ts"),_shared_constants_common__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./shared/constants/common.ts"),_shared_modules_Numeric__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./shared/modules/Numeric.ts"),_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./ui/ducks/metamask/metamask.js"),_app_scripts_lib_util__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./app/scripts/lib/util.ts");function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){return source=null!=source?source:{},Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}),target}var PercentageAndAmountChange=function(param){var formattedValuePrice,color,value=param.value,fiatCurrency=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_6__.FxA),locale=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_ducks_locale_locale__WEBPACK_IMPORTED_MODULE_7__.gA),balanceValue=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_6__.pWD),conversionRate=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_10__.fR),nativeCurrency=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_10__.Zt),marketData=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_6__.vjn),currentChainId=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_6__.grx),balanceChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function(){var _marketData_getNativeTokenAddress,percentage1d=null==marketData?void 0:null===(_marketData_getNativeTokenAddress=marketData[(0,_metamask_assets_controllers__WEBPACK_IMPORTED_MODULE_12__.NH)(currentChainId)])||void 0===_marketData_getNativeTokenAddress?void 0:_marketData_getNativeTokenAddress.pricePercentChange1d;if((0,ethereumjs_util__WEBPACK_IMPORTED_MODULE_3__.isHexString)(balanceValue)){var numeric=new _shared_modules_Numeric__WEBPACK_IMPORTED_MODULE_9__.e(balanceValue,16,_shared_constants_common__WEBPACK_IMPORTED_MODULE_8__.sk.WEI);if(nativeCurrency!==fiatCurrency&&(numeric=numeric.applyConversionRate(conversionRate)),numeric.isZero())return 0;if(percentage1d)return numeric.toBase(10).toDenomination(_shared_constants_common__WEBPACK_IMPORTED_MODULE_8__.sk.ETH).round(2,bignumber_js__WEBPACK_IMPORTED_MODULE_2__.BigNumber.ROUND_HALF_DOWN).times(percentage1d,10).divide(100,10).toNumber()}return null},[marketData]),color1=_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.r7.textDefault;(0,_app_scripts_lib_util__WEBPACK_IMPORTED_MODULE_11__.d2)(balanceChange)&&(color1=0===balanceChange?_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.r7.textDefault:balanceChange>0?_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.r7.successDefault:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.r7.errorDefault);var formattedValue=(0,_app_scripts_lib_util__WEBPACK_IMPORTED_MODULE_11__.Fl)(0===balanceChange?0:value,!0),formattedValuePrice1="";if((0,_app_scripts_lib_util__WEBPACK_IMPORTED_MODULE_11__.d2)(balanceChange)){formattedValuePrice1=balanceChange>=0?"+":"";var options={notation:"compact",compactDisplay:"short",maximumFractionDigits:2};try{formattedValuePrice1+="".concat(Intl.NumberFormat(locale,_object_spread_props(_object_spread({},options),{style:"currency",currency:fiatCurrency})).format(balanceChange)," ")}catch(e){formattedValuePrice1+="".concat(Intl.NumberFormat(locale,_object_spread_props(_object_spread({},options),{minimumFractionDigits:2,style:"decimal"})).format(balanceChange)," ")}}return formattedValuePrice=formattedValuePrice1,color=color1,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_4__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.nl.Flex},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.J3.bodyMdMedium,color:color,"data-testid":"token-increase-decrease-value",style:{whiteSpace:"pre"},ellipsis:!0},formattedValuePrice),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.J3.bodyMdMedium,color:color,"data-testid":"token-increase-decrease-percentage",ellipsis:!0},formattedValue))};try{PercentageAndAmountChange.displayName="PercentageAndAmountChange",PercentageAndAmountChange.__docgenInfo={description:"",displayName:"PercentageAndAmountChange",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.tsx#PercentageAndAmountChange"]={docgenInfo:PercentageAndAmountChange.__docgenInfo,name:"PercentageAndAmountChange",path:"ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.tsx#PercentageAndAmountChange"})}catch(__react_docgen_typescript_loader_error){}},"./ui/ducks/ramps/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{fu:()=>_ramps__WEBPACK_IMPORTED_MODULE_0__.fu,rz:()=>_ramps__WEBPACK_IMPORTED_MODULE_0__.rz});var _ramps__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./ui/ducks/ramps/ramps.ts")},"./ui/hooks/useAccountTotalCrossChainFiatBalance.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{k:()=>useAccountTotalCrossChainFiatBalance});var react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),ethereumjs_util__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/ethereumjs-util/dist.browser/index.js"),_selectors__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/selectors/index.js"),_shared_modules_conversion_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./shared/modules/conversion.utils.ts"),_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/ducks/metamask/metamask.js"),_helpers_utils_token_util__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/helpers/utils/token-util.js"),_shared_modules_selectors_networks__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./shared/modules/selectors/networks.ts");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_without_holes(arr){if(Array.isArray(arr))return _array_like_to_array(arr)}function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _iterable_to_array(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){return source=null!=source?source:{},Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}),target}function _to_consumable_array(arr){return _array_without_holes(arr)||_iterable_to_array(arr)||_unsupported_iterable_to_array(arr)||_non_iterable_spread()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}var useAccountTotalCrossChainFiatBalance=function(account,formattedTokensWithBalancesPerChain){var allNetworks=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_shared_modules_selectors_networks__WEBPACK_IMPORTED_MODULE_6__.hX),currencyRates=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_4__.$4),currentCurrency=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.FxA),crossChainContractRates=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.THb,react_redux__WEBPACK_IMPORTED_MODULE_0__.bN),crossChainCachedBalances=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.We4),mergedCrossChainRates=_object_spread({},crossChainContractRates),tokenFiatBalancesCrossChains=formattedTokensWithBalancesPerChain.map(function(singleChainTokenBalances){var _currencyRates_matchedChainSymbol,_crossChainCachedBalances_singleChainTokenBalances_chainId,_crossChainCachedBalances_singleChainTokenBalances_chainId_account_address,tokensWithBalances=singleChainTokenBalances.tokensWithBalances,matchedChainSymbol=allNetworks[singleChainTokenBalances.chainId].nativeCurrency,conversionRate=null==currencyRates?void 0:null===(_currencyRates_matchedChainSymbol=currencyRates[matchedChainSymbol])||void 0===_currencyRates_matchedChainSymbol?void 0:_currencyRates_matchedChainSymbol.conversionRate,tokenFiatBalances=tokensWithBalances.map(function(token){var _mergedCrossChainRates_singleChainTokenBalances_chainId,tokenExchangeRate=null==mergedCrossChainRates?void 0:null===(_mergedCrossChainRates_singleChainTokenBalances_chainId=mergedCrossChainRates[singleChainTokenBalances.chainId])||void 0===_mergedCrossChainRates_singleChainTokenBalances_chainId?void 0:_mergedCrossChainRates_singleChainTokenBalances_chainId[(0,ethereumjs_util__WEBPACK_IMPORTED_MODULE_1__.toChecksumAddress)(token.address)];return(0,_helpers_utils_token_util__WEBPACK_IMPORTED_MODULE_5__.aQ)(tokenExchangeRate,conversionRate,currentCurrency,token.string,token.symbol,!1,!1)}),balanceCached=null!==(_crossChainCachedBalances_singleChainTokenBalances_chainId_account_address=null==crossChainCachedBalances?void 0:null===(_crossChainCachedBalances_singleChainTokenBalances_chainId=crossChainCachedBalances[singleChainTokenBalances.chainId])||void 0===_crossChainCachedBalances_singleChainTokenBalances_chainId?void 0:_crossChainCachedBalances_singleChainTokenBalances_chainId[null==account?void 0:account.address])&&void 0!==_crossChainCachedBalances_singleChainTokenBalances_chainId_account_address?_crossChainCachedBalances_singleChainTokenBalances_chainId_account_address:0,nativeFiatValue=(0,_shared_modules_conversion_utils__WEBPACK_IMPORTED_MODULE_3__.gh)({value:balanceCached,toCurrency:currentCurrency,conversionRate:conversionRate,numberOfDecimals:2});return _object_spread_props(_object_spread({},singleChainTokenBalances),{tokenFiatBalances:tokenFiatBalances,nativeFiatValue:nativeFiatValue})});return{totalFiatBalance:tokenFiatBalancesCrossChains.reduce(function(accumulator,currentValue){var tmpCurrentValueFiatBalances=currentValue.tokenFiatBalances.filter(function(value){return void 0!==value}),totalFiatBalance=_shared_modules_conversion_utils__WEBPACK_IMPORTED_MODULE_3__.s3.apply(void 0,[currentValue.nativeFiatValue].concat(_to_consumable_array(tmpCurrentValueFiatBalances)));return accumulator+(totalFiatBalance.toNumber?totalFiatBalance.toNumber():Number(totalFiatBalance))},0).toString(10),tokenFiatBalancesCrossChains:tokenFiatBalancesCrossChains}}},"./ui/hooks/useGetFormattedTokensPerChain.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{O:()=>useGetFormattedTokensPerChain});var react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),bn_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/bn.js/lib/bn.js"),_selectors__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/selectors/index.js"),_shared_modules_conversion_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./shared/modules/conversion.utils.ts"),_useTokenBalances__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/hooks/useTokenBalances.ts"),useGetFormattedTokensPerChain=function(account,shouldHideZeroBalanceTokens,shouldGetTokensPerCurrentChain,allChainIDs){var currentChainId=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.grx),importedTokens=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.YRm),currentTokenBalances=(0,_useTokenBalances__WEBPACK_IMPORTED_MODULE_4__.mK)({chainIds:allChainIDs});return{formattedTokensWithBalancesPerChain:(shouldGetTokensPerCurrentChain?[currentChainId]:allChainIDs).map(function(singleChain){var _importedTokens_singleChain,_importedTokens_singleChain_account_address,tokensWithBalances=(null!==(_importedTokens_singleChain_account_address=null==importedTokens?void 0:null===(_importedTokens_singleChain=importedTokens[singleChain])||void 0===_importedTokens_singleChain?void 0:_importedTokens_singleChain[null==account?void 0:account.address])&&void 0!==_importedTokens_singleChain_account_address?_importedTokens_singleChain_account_address:[]).reduce(function(acc,token){var _currentTokenBalances_tokenBalances_account_address_singleChain,_currentTokenBalances_tokenBalances_account_address,_currentTokenBalances_tokenBalances_account_address_singleChain_token_address,hexBalance=null!==(_currentTokenBalances_tokenBalances_account_address_singleChain_token_address=null===(_currentTokenBalances_tokenBalances_account_address=currentTokenBalances.tokenBalances[account.address])||void 0===_currentTokenBalances_tokenBalances_account_address?void 0:null===(_currentTokenBalances_tokenBalances_account_address_singleChain=_currentTokenBalances_tokenBalances_account_address[singleChain])||void 0===_currentTokenBalances_tokenBalances_account_address_singleChain?void 0:_currentTokenBalances_tokenBalances_account_address_singleChain[token.address])&&void 0!==_currentTokenBalances_tokenBalances_account_address_singleChain_token_address?_currentTokenBalances_tokenBalances_account_address_singleChain_token_address:"0x0";if("0x0"!==hexBalance||!shouldHideZeroBalanceTokens){var decimalBalance=(0,_shared_modules_conversion_utils__WEBPACK_IMPORTED_MODULE_3__.I0)(hexBalance);acc.push({address:token.address,symbol:token.symbol,decimals:token.decimals,balance:decimalBalance,string:(0,_useTokenBalances__WEBPACK_IMPORTED_MODULE_4__.mz)(new bn_js__WEBPACK_IMPORTED_MODULE_1__.BN(decimalBalance),new bn_js__WEBPACK_IMPORTED_MODULE_1__.BN(token.decimals))})}return acc},[]);return{chainId:singleChain,tokensWithBalances:tokensWithBalances}})}}},"./ui/hooks/useTheme.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{D:()=>useTheme});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_selectors__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/selectors/index.js"),_shared_constants_preferences__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./shared/constants/preferences.ts");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}var validThemes=Object.values(_shared_constants_preferences__WEBPACK_IMPORTED_MODULE_3__.S).filter(function(theme){return theme!==_shared_constants_preferences__WEBPACK_IMPORTED_MODULE_3__.S.os});function useTheme(){var settingTheme=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.O4b),_useState=_sliced_to_array((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(settingTheme),2),theme=_useState[0],setTheme=_useState[1];return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){var result=settingTheme&&settingTheme!==_shared_constants_preferences__WEBPACK_IMPORTED_MODULE_3__.S.os?settingTheme:document.documentElement.getAttribute("data-theme");validThemes.includes(result)||(console.warn('useTheme: Invalid theme resolved to "'.concat(result,'". Defaulting to "').concat(_shared_constants_preferences__WEBPACK_IMPORTED_MODULE_3__.S.light,'".')),setTheme(_shared_constants_preferences__WEBPACK_IMPORTED_MODULE_3__.S.light)),setTheme(result)},[settingTheme]),theme}},"./ui/hooks/useTokenBalances.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{mz:()=>stringifyBalance,mK:()=>useTokenBalances,H6:()=>useTokenTracker});var es=__webpack_require__("./node_modules/react-redux/es/index.js"),bn=__webpack_require__("./node_modules/bn.js/lib/bn.js"),bn_default=__webpack_require__.n(bn),networks=__webpack_require__("./shared/modules/selectors/networks.ts"),actions=__webpack_require__("./ui/store/actions.ts"),metamask=__webpack_require__("./ui/ducks/metamask/metamask.js"),conversion_utils=__webpack_require__("./shared/modules/conversion.utils.ts"),react=__webpack_require__("./node_modules/react/index.js");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}let hooks_useMultiPolling=function(usePollingOptions){var pollingTokens=(0,react.useRef)(new Map);(0,react.useEffect)(function(){var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=usePollingOptions.input[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0)!function(){var input=_step.value,key=JSON.stringify(input);pollingTokens.current.has(key)||usePollingOptions.startPolling(input).then(function(token){return pollingTokens.current.set(key,token)})}()}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}var _iteratorNormalCompletion1=!0,_didIteratorError1=!1,_iteratorError1=void 0;try{for(var _step1,_iterator1=pollingTokens.current.entries()[Symbol.iterator]();!(_iteratorNormalCompletion1=(_step1=_iterator1.next()).done);_iteratorNormalCompletion1=!0)!function(){var _step_value=_sliced_to_array(_step1.value,2),inputKey=_step_value[0],token=_step_value[1];usePollingOptions.input.some(function(i){return inputKey===JSON.stringify(i)})||(usePollingOptions.stopPollingByPollingToken(token),pollingTokens.current.delete(inputKey))}()}catch(err){_didIteratorError1=!0,_iteratorError1=err}finally{try{_iteratorNormalCompletion1||null==_iterator1.return||_iterator1.return()}finally{if(_didIteratorError1)throw _iteratorError1}}},[usePollingOptions.input&&JSON.stringify(usePollingOptions.input)]),(0,react.useEffect)(function(){return function(){var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=pollingTokens.current.values()[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var token=_step.value;usePollingOptions.stopPollingByPollingToken(token)}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}}},[])};var useTokenBalances=function(){var chainIds=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).chainIds,tokenBalances=(0,es.d4)(metamask.HF),networkConfigurations=(0,es.d4)(networks.hX);return hooks_useMultiPolling({startPolling:actions.tokenBalancesStartPolling,stopPollingByPollingToken:actions.tokenBalancesStopPollingByPollingToken,input:null!=chainIds?chainIds:Object.keys(networkConfigurations)}),{tokenBalances:tokenBalances}},useTokenTracker=function(param){var chainId=param.chainId,tokens=param.tokens,address=param.address,hideZeroBalanceTokens=param.hideZeroBalanceTokens,tokenBalances=useTokenBalances({chainIds:[chainId]}).tokenBalances;return{tokensWithBalances:tokens.reduce(function(acc,token){var _tokenBalances_address_chainId,_tokenBalances_address,_tokenBalances_address_chainId_token_address,hexBalance=null!==(_tokenBalances_address_chainId_token_address=null===(_tokenBalances_address=tokenBalances[address])||void 0===_tokenBalances_address?void 0:null===(_tokenBalances_address_chainId=_tokenBalances_address[chainId])||void 0===_tokenBalances_address_chainId?void 0:_tokenBalances_address_chainId[token.address])&&void 0!==_tokenBalances_address_chainId_token_address?_tokenBalances_address_chainId_token_address:"0x0";if("0x0"!==hexBalance||!hideZeroBalanceTokens){var decimalBalance=(0,conversion_utils.I0)(hexBalance);acc.push({address:token.address,symbol:token.symbol,decimals:token.decimals,balance:decimalBalance,balanceError:null,string:stringifyBalance(new(bn_default())(decimalBalance),new(bn_default())(token.decimals))})}return acc},[])}};function stringifyBalance(balance,bnDecimals){var balanceDecimals=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;if(balance.eq(new(bn_default())(0)))return"0";var decimals=parseInt(bnDecimals.toString(),10);if(0===decimals)return balance.toString();var bal=balance.toString(),len=bal.length,decimalIndex=len-decimals,prefix="";if(decimalIndex<=0){for(;prefix.length<=-1*decimalIndex;)prefix+="0",len+=1;bal=prefix+bal,decimalIndex=1}var whole=bal.substr(0,len-decimals);if(0===balanceDecimals)return whole;var fractional=bal.substr(decimalIndex,balanceDecimals);if(/0+$/u.test(fractional)){var withOnlySigZeroes=bal.substr(decimalIndex).replace(/0+$/u,"");return withOnlySigZeroes.length>0&&(withOnlySigZeroes=".".concat(withOnlySigZeroes)),"".concat(whole).concat(withOnlySigZeroes)}return"".concat(whole,".").concat(fractional)}}}]);