-
Notifications
You must be signed in to change notification settings - Fork 31
/
47242.053b7fe3.iframe.bundle.js
1 lines (1 loc) · 80.9 KB
/
47242.053b7fe3.iframe.bundle.js
1
(globalThis.webpackChunkmetamask_crx=globalThis.webpackChunkmetamask_crx||[]).push([[6806,18079,47242],{"./ui/components/app/network-account-balance-header/network-account-balance-header.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>NetworkAccountBalanceHeader});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),_ui_icon_with_fallback__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/ui/icon-with-fallback/index.js"),_ui_identicon__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/components/ui/identicon/index.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_ui_box_box__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/ui/box/box.js"),_contexts_i18n__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/contexts/i18n.js"),_shared_constants_network__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./shared/constants/network.ts"),_component_library__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/components/component-library/index.ts");function NetworkAccountBalanceHeader(param){var networkName=param.networkName,accountName=param.accountName,accountBalance=param.accountBalance,tokenName=param.tokenName,accountAddress=param.accountAddress,chainId=param.chainId,t=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_contexts_i18n__WEBPACK_IMPORTED_MODULE_5__.gJ),networkIcon=_shared_constants_network__WEBPACK_IMPORTED_MODULE_6__.Cl[chainId];return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ui_box_box__WEBPACK_IMPORTED_MODULE_4__.Ay,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.bo.Row,padding:4,className:"network-account-balance-header",alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.k2.center,justifyContent:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.A9.spaceBetween},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ui_box_box__WEBPACK_IMPORTED_MODULE_4__.Ay,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.bo.Row,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.k2.center,gap:2},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ui_box_box__WEBPACK_IMPORTED_MODULE_4__.Ay,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.bo.Row,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.k2.center},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ui_identicon__WEBPACK_IMPORTED_MODULE_2__.A,{address:accountAddress,diameter:32}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ui_icon_with_fallback__WEBPACK_IMPORTED_MODULE_1__.A,{name:networkName,size:16,icon:networkIcon,wrapperClassName:networkIcon?"network-account-balance-header__network-account__ident-icon-ethereum":"network-account-balance-header__network-account__ident-icon-ethereum--gray"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ui_box_box__WEBPACK_IMPORTED_MODULE_4__.Ay,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.nl.Flex,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.k2.flexStart,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.bo.Column},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_7__.EY,{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.J3.bodySm,as:"h6",color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.r7.textAlternative,"data-testid":"signature-request-network-display"},networkName),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_7__.EY,{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.J3.bodySm,as:"h6",color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.r7.textDefault,fontWeight:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.IT.Bold},accountName))),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ui_box_box__WEBPACK_IMPORTED_MODULE_4__.Ay,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.nl.Flex,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.k2.flexEnd,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.bo.Column},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_7__.EY,{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.J3.bodySm,as:"h6",color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.r7.textAlternative},t("balance")),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_7__.EY,{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.J3.bodySm,as:"h6",color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.r7.textDefault,fontWeight:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.IT.Bold,align:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.nO.End},accountBalance," ",tokenName)))}NetworkAccountBalanceHeader.propTypes={networkName:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,accountName:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,accountBalance:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,tokenName:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,accountAddress:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,chainId:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string},NetworkAccountBalanceHeader.__docgenInfo={description:"",methods:[],displayName:"NetworkAccountBalanceHeader",props:{networkName:{description:"",type:{name:"string"},required:!1},accountName:{description:"",type:{name:"string"},required:!1},accountBalance:{description:"",type:{name:"string"},required:!1},tokenName:{description:"",type:{name:"string"},required:!1},accountAddress:{description:"",type:{name:"string"},required:!1},chainId:{description:"",type:{name:"string"},required:!1}}}},"./ui/components/app/snaps/insight-warnings/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>InsightWarnings});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),component_library=__webpack_require__("./ui/components/component-library/index.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),snap_ui_renderer=__webpack_require__("./ui/components/app/snaps/snap-ui-renderer/index.js"),snaps=__webpack_require__("./ui/helpers/constants/snaps/index.js"),util=__webpack_require__("./ui/helpers/utils/util.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 _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 _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 _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)}}function InsightWarnings(param){var warnings=param.warnings,_param_action=param.action,action=void 0===_param_action?"confirming":_param_action,origin=param.origin,onCancel=param.onCancel,onSubmit=param.onSubmit,t=(0,useI18nContext.P)(),defaultWarningState=warnings.reduce(function(warningState,warning,idx){return warningState[warning.snapId]=0!==idx,warningState},{}),_useState=_sliced_to_array((0,react.useState)(defaultWarningState),2),warningState=_useState[0],setWarningState=_useState[1],_useState1=_sliced_to_array((0,react.useState)(!1),2),isChecked=_useState1[0],setIsChecked=_useState1[1],handleWarningClick=function(snapId){var newState=_object_spread({},warningState),nextSnapState=!warningState[snapId];newState[snapId]=nextSnapState,nextSnapState||((newState=_object_spread({},defaultWarningState))[snapId]=!1,newState[warnings[0].snapId]=snapId!==warnings[0].snapId),setWarningState(newState)};return react.createElement(component_library.aF,{isOpen:!0,isClosedOnEscapeKey:!1,isClosedOnOutsideClick:!1,className:"insights-warnings-modal"},react.createElement(component_library.mH,null),react.createElement(component_library.$m,null,react.createElement(component_library.rQ,{justifyContent:design_system.A9.center,childrenWrapperProps:{alignItems:design_system.k2.center,display:design_system.nl.Flex,flexDirection:design_system.bo.Column}},react.createElement(component_library.hS,{iconName:component_library.$M.Warning,size:component_library.OQ.Lg,color:design_system.Li.errorDefault,backgroundColor:design_system.i0.errorMuted}),react.createElement(component_library.EY,{variant:design_system.J3.headingMd,paddingTop:4,paddingBottom:4},t("insightWarningHeader"))),react.createElement(component_library.cw,null,react.createElement(component_library.EY,{variant:design_system.J3.bodyMd,paddingBottom:4},1===warnings.length?t("insightWarningContentSingular",[react.createElement(component_library.EY,{variant:design_system.J3.inherit,key:warnings.id,fontWeight:design_system.IT.Medium},"".concat(warnings.length," ").concat(t("insightWarning"))),action,snaps.dz[action].noun]):t("insightWarningContentPlural",[react.createElement(component_library.EY,{variant:design_system.J3.inherit,key:warnings.id,fontWeight:design_system.IT.Medium},"".concat(warnings.length," ").concat(t("insightWarnings"))),warnings.length,action,snaps.dz[action].noun])),react.createElement(function(){var lastWarningIdx=warnings.length-1;return react.createElement(component_library.az,{className:"insights-warnings-modal__content"},warnings.map(function(warning,idx){var snapId=warning.snapId,interfaceId=warning.interfaceId;return react.createElement(snap_ui_renderer.a,{key:"".concat(snapId,"-").concat(idx),snapId:snapId,interfaceId:interfaceId,delineatorType:snaps.cJ.Warning,onClick:function(){return handleWarningClick(snapId)},isCollapsable:!0,isCollapsed:warningState[snapId],boxProps:{marginBottom:idx===lastWarningIdx?0:4}})}))},null),react.createElement(component_library.az,{display:design_system.nl.Flex,justifyContent:design_system.A9.flexStart,alignItems:design_system.k2.center,marginTop:4,marginBottom:4,padding:4,borderRadius:design_system.Z6.SM,style:{backgroundColor:isChecked?"var(--color-info-muted)":"var(--color-background-default-hover)"}},react.createElement(component_library.Sc,{variant:design_system.J3.bodyMd,isChecked:isChecked,onChange:function(){return setIsChecked(function(state){return!state})},label:t("insightWarningCheckboxMessage",[t(snaps.dz[action].imperative),react.createElement(component_library.EY,{variant:design_system.J3.inherit,key:action,fontWeight:design_system.IT.Medium},(0,util.xz)(origin))])})),react.createElement(component_library.az,{display:design_system.nl.Flex,justifyContent:design_system.A9.spaceBetween},react.createElement(component_library.$n,{size:component_library.S8.Lg,width:design_system.Zf.Half,variant:component_library.Ak.Secondary,onClick:onCancel,marginRight:4},t("cancel")),react.createElement(component_library.$n,{size:component_library.w9.Lg,width:design_system.Zf.Half,"data-testid":"snapInsightsButtonConfirm",danger:!0,onClick:onSubmit,disabled:!isChecked},t(snaps.dz[action].imperative))))))}InsightWarnings.propTypes={warnings:prop_types_default().arrayOf(prop_types_default().object),action:prop_types_default().oneOf(Object.keys(snaps.dz)),origin:prop_types_default().string.isRequired,onCancel:prop_types_default().func.isRequired,onSubmit:prop_types_default().func.isRequired},InsightWarnings.__docgenInfo={description:"",methods:[],displayName:"InsightWarnings",props:{action:{defaultValue:{value:"'confirming'",computed:!1},description:"A limited set of actions defining the type of transaction",type:{name:"enum",value:[{value:'"confirming"',computed:!1},{value:'"signing"',computed:!1}]},required:!1},warnings:{description:"An array of warnings returned from tx-insight snaps that deem their content 'critical'",type:{name:"arrayOf",value:{name:"object"}},required:!1},origin:{description:"Origin initiating the transaction",type:{name:"string"},required:!0},onCancel:{description:"Cancel function",type:{name:"func"},required:!0},onSubmit:{description:"Submit function",type:{name:"func"},required:!0}}}},"./ui/components/ui/loading-indicator/loading-indicator.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>LoadingIndicator});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__),_component_library__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/component-library/index.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 _object_without_properties(source,excluded){if(null==source)return{};var key,i,target=_object_without_properties_loose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _object_without_properties_loose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}function LoadingIndicator(_param){var alt=_param.alt,title=_param.title,isLoading=_param.isLoading,_param_children=_param.children,props=_object_without_properties(_param,["alt","title","isLoading","children"]);return isLoading?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_1__.az,_object_spread({className:"loading-indicator"},props),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"loading-indicator__spinner",alt:alt,title:title,src:"images/loading.svg"})):void 0===_param_children?null:_param_children}LoadingIndicator.propTypes={isLoading:prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool.isRequired,alt:prop_types__WEBPACK_IMPORTED_MODULE_2___default().string.isRequired,title:prop_types__WEBPACK_IMPORTED_MODULE_2___default().string.isRequired,children:prop_types__WEBPACK_IMPORTED_MODULE_2___default().node},LoadingIndicator.__docgenInfo={description:"",methods:[],displayName:"LoadingIndicator",props:{children:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},isLoading:{description:"",type:{name:"bool"},required:!0},alt:{description:"",type:{name:"string"},required:!0},title:{description:"",type:{name:"string"},required:!0}}}},"./ui/components/ui/page-container/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{QY:()=>page_container_footer.A,Ay:()=>PageContainer});var page_container_header=__webpack_require__("./ui/components/ui/page-container/page-container-header/index.js"),page_container_footer=__webpack_require__("./ui/components/ui/page-container/page-container-footer/index.js"),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);function _assert_this_initialized(self){if(void 0===self)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _class_call_check(instance,Constructor){if(!(instance instanceof Constructor))throw TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _create_class(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}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 _get_prototype_of(o){return(_get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_set_prototype_of(subClass,superClass)}function _possible_constructor_return(self,call){return call&&("object"===_type_of(call)||"function"==typeof call)?call:_assert_this_initialized(self)}function _set_prototype_of(o,p){return(_set_prototype_of=Object.setPrototypeOf||function setPrototypeOf(o,p){return o.__proto__=p,o})(o,p)}function _type_of(obj){return obj&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj}function _is_native_reflect_construct(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _create_super(Derived){var hasNativeReflectConstruct=_is_native_reflect_construct();return function _createSuperInternal(){var result,Super=_get_prototype_of(Derived);return result=hasNativeReflectConstruct?Reflect.construct(Super,arguments,_get_prototype_of(this).constructor):Super.apply(this,arguments),_possible_constructor_return(this,result)}}var PageContainer=function(PureComponent){_inherits(PageContainer,PureComponent);var _super=_create_super(PageContainer);function PageContainer(){var _this;return _class_call_check(this,PageContainer),_this=_super.apply(this,arguments),_define_property(_assert_this_initialized(_this),"state",{activeTabIndex:_this.props.defaultActiveTabIndex||0}),_this}return _create_class(PageContainer,[{key:"handleTabClick",value:function handleTabClick(activeTabIndex){this.setState({activeTabIndex:activeTabIndex})}},{key:"renderTabs",value:function renderTabs(){var _this=this,tabsComponent=this.props.tabsComponent;if(!tabsComponent)return null;var numberOfTabs=react.Children.count(tabsComponent.props.children);return react.Children.map(tabsComponent.props.children,function(child,tabIndex){return child&&react.cloneElement(child,{onClick:function(index){return _this.handleTabClick(index)},tabIndex:tabIndex,isActive:numberOfTabs>1&&tabIndex===_this.state.activeTabIndex,key:tabIndex,className:"page-container__tab"})})}},{key:"renderActiveTabContent",value:function renderActiveTabContent(){var children=this.props.tabsComponent.props.children;return((children=children.filter(Boolean))[this.state.activeTabIndex]||children[0]).props.children}},{key:"renderContent",value:function renderContent(){var _this_props=this.props,contentComponent=_this_props.contentComponent,tabsComponent=_this_props.tabsComponent;return contentComponent||(tabsComponent?this.renderActiveTabContent():null)}},{key:"render",value:function render(){var _this_props=this.props,title=_this_props.title,subtitle=_this_props.subtitle,onClose=_this_props.onClose,showBackButton=_this_props.showBackButton,onBackButtonClick=_this_props.onBackButtonClick,backButtonStyles=_this_props.backButtonStyles,backButtonString=_this_props.backButtonString,onCancel=_this_props.onCancel,cancelText=_this_props.cancelText,onSubmit=_this_props.onSubmit,submitText=_this_props.submitText,disabled=_this_props.disabled,headerCloseText=_this_props.headerCloseText,hideCancel=_this_props.hideCancel;return react.createElement("div",{className:"page-container"},react.createElement(page_container_header.A,{title:title,subtitle:subtitle,onClose:onClose,showBackButton:showBackButton,onBackButtonClick:onBackButtonClick,backButtonStyles:backButtonStyles,backButtonString:backButtonString,tabs:this.renderTabs(),headerCloseText:headerCloseText}),react.createElement("div",{className:"page-container__bottom"},react.createElement("div",{className:"page-container__content"},this.renderContent()),react.createElement(page_container_footer.A,{onCancel:onCancel,cancelText:cancelText,hideCancel:hideCancel,onSubmit:onSubmit,submitText:submitText,disabled:disabled})))}}]),PageContainer}(react.PureComponent);_define_property(PageContainer,"contextTypes",{t:prop_types_default().func}),_define_property(PageContainer,"propTypes",{backButtonString:prop_types_default().string,backButtonStyles:prop_types_default().object,headerCloseText:prop_types_default().string,onBackButtonClick:prop_types_default().func,onClose:prop_types_default().func,showBackButton:prop_types_default().bool,subtitle:prop_types_default().string,title:prop_types_default().string.isRequired,defaultActiveTabIndex:prop_types_default().number,tabsComponent:prop_types_default().node,contentComponent:prop_types_default().node,cancelText:prop_types_default().string,disabled:prop_types_default().bool,hideCancel:prop_types_default().bool,onCancel:prop_types_default().func,onSubmit:prop_types_default().func,submitText:prop_types_default().string}),PageContainer.__docgenInfo={description:"",methods:[{name:"handleTabClick",docblock:null,modifiers:[],params:[{name:"activeTabIndex",optional:!1,type:null}],returns:null},{name:"renderTabs",docblock:null,modifiers:[],params:[],returns:null},{name:"renderActiveTabContent",docblock:null,modifiers:[],params:[],returns:null},{name:"renderContent",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PageContainer",props:{backButtonString:{description:"",type:{name:"string"},required:!1},backButtonStyles:{description:"",type:{name:"object"},required:!1},headerCloseText:{description:"",type:{name:"string"},required:!1},onBackButtonClick:{description:"",type:{name:"func"},required:!1},onClose:{description:"",type:{name:"func"},required:!1},showBackButton:{description:"",type:{name:"bool"},required:!1},subtitle:{description:"",type:{name:"string"},required:!1},title:{description:"",type:{name:"string"},required:!0},defaultActiveTabIndex:{description:"",type:{name:"number"},required:!1},tabsComponent:{description:"",type:{name:"node"},required:!1},contentComponent:{description:"",type:{name:"node"},required:!1},cancelText:{description:"",type:{name:"string"},required:!1},disabled:{description:"",type:{name:"bool"},required:!1},hideCancel:{description:"",type:{name:"bool"},required:!1},onCancel:{description:"",type:{name:"func"},required:!1},onSubmit:{description:"",type:{name:"func"},required:!1},submitText:{description:"",type:{name:"string"},required:!1}},context:{t:{type:{name:"func"},required:!1}}},page_container_header.A.__docgenInfo={description:"",methods:[{name:"renderTabs",docblock:null,modifiers:[],params:[],returns:null},{name:"renderCloseAction",docblock:null,modifiers:[],params:[],returns:null},{name:"renderHeaderRow",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PageContainerHeader",props:{title:{description:"",type:{name:"string"},required:!1},subtitle:{description:"",type:{name:"string"},required:!1},onClose:{description:"",type:{name:"func"},required:!1},showBackButton:{description:"",type:{name:"bool"},required:!1},onBackButtonClick:{description:"",type:{name:"func"},required:!1},backButtonStyles:{description:"",type:{name:"object"},required:!1},backButtonString:{description:"",type:{name:"string"},required:!1},tabs:{description:"",type:{name:"node"},required:!1},headerCloseText:{description:"",type:{name:"string"},required:!1},className:{description:"",type:{name:"string"},required:!1},hideClose:{description:"",type:{name:"bool"},required:!1}}},page_container_footer.A.__docgenInfo={description:"",methods:[],displayName:"PageContainerFooter",props:{children:{description:"",type:{name:"node"},required:!1},onCancel:{description:"",type:{name:"func"},required:!1},cancelText:{description:"",type:{name:"string"},required:!1},cancelButtonType:{description:"",type:{name:"string"},required:!1},onSubmit:{description:"",type:{name:"func"},required:!1},submitText:{description:"",type:{name:"string"},required:!1},disabled:{description:"",type:{name:"bool"},required:!1},submitButtonType:{description:"",type:{name:"string"},required:!1},hideCancel:{description:"",type:{name:"bool"},required:!1},buttonSizeLarge:{description:"",type:{name:"bool"},required:!1},footerClassName:{description:"",type:{name:"string"},required:!1},footerButtonClassName:{description:"",type:{name:"string"},required:!1}},context:{t:{type:{name:"func"},required:!1}}}},"./ui/components/ui/page-container/page-container-footer/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>PageContainerFooter});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),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),ui_button=__webpack_require__("./ui/components/ui/button/index.js");function _assert_this_initialized(self){if(void 0===self)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _class_call_check(instance,Constructor){if(!(instance instanceof Constructor))throw TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _create_class(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}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 _get_prototype_of(o){return(_get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_set_prototype_of(subClass,superClass)}function _possible_constructor_return(self,call){return call&&("object"===_type_of(call)||"function"==typeof call)?call:_assert_this_initialized(self)}function _set_prototype_of(o,p){return(_set_prototype_of=Object.setPrototypeOf||function setPrototypeOf(o,p){return o.__proto__=p,o})(o,p)}function _type_of(obj){return obj&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj}function _is_native_reflect_construct(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _create_super(Derived){var hasNativeReflectConstruct=_is_native_reflect_construct();return function _createSuperInternal(){var result,Super=_get_prototype_of(Derived);return result=hasNativeReflectConstruct?Reflect.construct(Super,arguments,_get_prototype_of(this).constructor):Super.apply(this,arguments),_possible_constructor_return(this,result)}}var PageContainerFooter=function(Component){_inherits(PageContainerFooter,Component);var _super=_create_super(PageContainerFooter);function PageContainerFooter(){return _class_call_check(this,PageContainerFooter),_super.apply(this,arguments)}return _create_class(PageContainerFooter,[{key:"render",value:function render(){var _this_props=this.props,children=_this_props.children,onCancel=_this_props.onCancel,cancelText=_this_props.cancelText,onSubmit=_this_props.onSubmit,submitText=_this_props.submitText,disabled=_this_props.disabled,submitButtonType=_this_props.submitButtonType,hideCancel=_this_props.hideCancel,cancelButtonType=_this_props.cancelButtonType,_this_props_buttonSizeLarge=_this_props.buttonSizeLarge,buttonSizeLarge=void 0!==_this_props_buttonSizeLarge&&_this_props_buttonSizeLarge,footerClassName=_this_props.footerClassName,footerButtonClassName=_this_props.footerButtonClassName;return react.createElement("div",{className:classnames_default()("page-container__footer",footerClassName)},react.createElement("footer",null,!hideCancel&&react.createElement(ui_button.A,{type:cancelButtonType||"secondary",large:buttonSizeLarge,className:classnames_default()("page-container__footer-button","page-container__footer-button__cancel",footerButtonClassName),onClick:function(e){return onCancel(e)},"data-testid":"page-container-footer-cancel"},cancelText||this.context.t("cancel")),react.createElement(ui_button.A,{type:submitButtonType||"primary",large:buttonSizeLarge,className:classnames_default()("page-container__footer-button",footerButtonClassName),disabled:disabled,onClick:function(e){return onSubmit(e)},"data-testid":"page-container-footer-next"},submitText||this.context.t("next"))),children&&react.createElement("div",{className:"page-container__footer-secondary"},children))}}]),PageContainerFooter}(react.Component);_define_property(PageContainerFooter,"propTypes",{children:prop_types_default().node,onCancel:prop_types_default().func,cancelText:prop_types_default().string,cancelButtonType:prop_types_default().string,onSubmit:prop_types_default().func,submitText:prop_types_default().string,disabled:prop_types_default().bool,submitButtonType:prop_types_default().string,hideCancel:prop_types_default().bool,buttonSizeLarge:prop_types_default().bool,footerClassName:prop_types_default().string,footerButtonClassName:prop_types_default().string}),_define_property(PageContainerFooter,"contextTypes",{t:prop_types_default().func}),PageContainerFooter.__docgenInfo={description:"",methods:[],displayName:"PageContainerFooter",props:{children:{description:"",type:{name:"node"},required:!1},onCancel:{description:"",type:{name:"func"},required:!1},cancelText:{description:"",type:{name:"string"},required:!1},cancelButtonType:{description:"",type:{name:"string"},required:!1},onSubmit:{description:"",type:{name:"func"},required:!1},submitText:{description:"",type:{name:"string"},required:!1},disabled:{description:"",type:{name:"bool"},required:!1},submitButtonType:{description:"",type:{name:"string"},required:!1},hideCancel:{description:"",type:{name:"bool"},required:!1},buttonSizeLarge:{description:"",type:{name:"bool"},required:!1},footerClassName:{description:"",type:{name:"string"},required:!1},footerButtonClassName:{description:"",type:{name:"string"},required:!1}},context:{t:{type:{name:"func"},required:!1}}}},"./ui/components/ui/page-container/page-container-header/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>PageContainerHeader});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),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),ui_button=__webpack_require__("./ui/components/ui/button/index.js");function _assert_this_initialized(self){if(void 0===self)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _class_call_check(instance,Constructor){if(!(instance instanceof Constructor))throw TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _create_class(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}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 _get_prototype_of(o){return(_get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_set_prototype_of(subClass,superClass)}function _possible_constructor_return(self,call){return call&&("object"===_type_of(call)||"function"==typeof call)?call:_assert_this_initialized(self)}function _set_prototype_of(o,p){return(_set_prototype_of=Object.setPrototypeOf||function setPrototypeOf(o,p){return o.__proto__=p,o})(o,p)}function _type_of(obj){return obj&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj}function _is_native_reflect_construct(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _create_super(Derived){var hasNativeReflectConstruct=_is_native_reflect_construct();return function _createSuperInternal(){var result,Super=_get_prototype_of(Derived);return result=hasNativeReflectConstruct?Reflect.construct(Super,arguments,_get_prototype_of(this).constructor):Super.apply(this,arguments),_possible_constructor_return(this,result)}}var PageContainerHeader=function(Component){_inherits(PageContainerHeader,Component);var _super=_create_super(PageContainerHeader);function PageContainerHeader(){return _class_call_check(this,PageContainerHeader),_super.apply(this,arguments)}return _create_class(PageContainerHeader,[{key:"renderTabs",value:function renderTabs(){var tabs=this.props.tabs;return tabs?react.createElement("ul",{className:"page-container__tabs"},tabs):null}},{key:"renderCloseAction",value:function renderCloseAction(){var _this_props=this.props,hideClose=_this_props.hideClose,onClose=_this_props.onClose,headerCloseText=_this_props.headerCloseText;return hideClose?null:headerCloseText?onClose&&react.createElement(ui_button.A,{type:"link",className:"page-container__header-close-text",onClick:function(){return onClose()}},headerCloseText):onClose&&react.createElement("button",{className:"page-container__header-close",onClick:function(){return onClose()},"aria-label":"close"})}},{key:"renderHeaderRow",value:function renderHeaderRow(){var _this_props=this.props,showBackButton=_this_props.showBackButton,onBackButtonClick=_this_props.onBackButtonClick,backButtonStyles=_this_props.backButtonStyles,backButtonString=_this_props.backButtonString;return showBackButton&&react.createElement("div",{className:"page-container__header-row"},react.createElement("span",{className:"page-container__back-button",onClick:onBackButtonClick,style:backButtonStyles},backButtonString||"Back"))}},{key:"render",value:function render(){var _this_props=this.props,title=_this_props.title,subtitle=_this_props.subtitle,tabs=_this_props.tabs,className=_this_props.className,hideClose=_this_props.hideClose;return react.createElement("div",{className:classnames_default()("page-container__header",className,{"page-container__header--no-padding-bottom":!!tabs}),"data-testid":"page-container__header"},this.renderHeaderRow(),title&&react.createElement("div",{className:classnames_default()("page-container__title",{"page-container__title--no-margin-right":hideClose})},title),subtitle?react.createElement("div",{className:"page-container__subtitle"},subtitle):null,this.renderCloseAction(),this.renderTabs())}}]),PageContainerHeader}(react.Component);_define_property(PageContainerHeader,"propTypes",{title:prop_types_default().string,subtitle:prop_types_default().string,onClose:prop_types_default().func,showBackButton:prop_types_default().bool,onBackButtonClick:prop_types_default().func,backButtonStyles:prop_types_default().object,backButtonString:prop_types_default().string,tabs:prop_types_default().node,headerCloseText:prop_types_default().string,className:prop_types_default().string,hideClose:prop_types_default().bool}),PageContainerHeader.__docgenInfo={description:"",methods:[{name:"renderTabs",docblock:null,modifiers:[],params:[],returns:null},{name:"renderCloseAction",docblock:null,modifiers:[],params:[],returns:null},{name:"renderHeaderRow",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PageContainerHeader",props:{title:{description:"",type:{name:"string"},required:!1},subtitle:{description:"",type:{name:"string"},required:!1},onClose:{description:"",type:{name:"func"},required:!1},showBackButton:{description:"",type:{name:"bool"},required:!1},onBackButtonClick:{description:"",type:{name:"func"},required:!1},backButtonStyles:{description:"",type:{name:"object"},required:!1},backButtonString:{description:"",type:{name:"string"},required:!1},tabs:{description:"",type:{name:"node"},required:!1},headerCloseText:{description:"",type:{name:"string"},required:!1},className:{description:"",type:{name:"string"},required:!1},hideClose:{description:"",type:{name:"bool"},required:!1}}}},"./ui/components/ui/site-origin/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>_site_origin__WEBPACK_IMPORTED_MODULE_0__.A});var _site_origin__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./ui/components/ui/site-origin/site-origin.js")},"./ui/components/ui/site-origin/site-origin.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>SiteOrigin});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__),classnames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__),_chip__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/components/ui/chip/index.js"),_icon_with_fallback__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/ui/icon-with-fallback/index.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/helpers/constants/design-system.ts");function SiteOrigin(param){var siteOrigin=param.siteOrigin,iconSrc=param.iconSrc,iconName=param.iconName,chip=param.chip,className=param.className,title=param.title,leftIcon=param.leftIcon,rightIcon=param.rightIcon;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:classnames__WEBPACK_IMPORTED_MODULE_1___default()("site-origin",className),title:title},chip?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_chip__WEBPACK_IMPORTED_MODULE_2__.A,{borderColor:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.cG.borderMuted,label:siteOrigin,maxContent:!1,leftIcon:leftIcon||react__WEBPACK_IMPORTED_MODULE_0__.createElement(_icon_with_fallback__WEBPACK_IMPORTED_MODULE_3__.A,{icon:iconSrc,name:iconName,size:24}),rightIcon:rightIcon}):react__WEBPACK_IMPORTED_MODULE_0__.createElement("bdi",{dir:"ltr"},siteOrigin))}SiteOrigin.propTypes={siteOrigin:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string.isRequired,iconName:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string,iconSrc:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string,className:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string,title:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string,chip:prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool,leftIcon:prop_types__WEBPACK_IMPORTED_MODULE_5___default().node,rightIcon:prop_types__WEBPACK_IMPORTED_MODULE_5___default().node},SiteOrigin.__docgenInfo={description:"@deprecated The `<SiteOrigin />` component has been deprecated in favor of the new `<TagUrl>` component from the component-library.\nPlease update your code to use the new `<TagUrl>` component instead, which can be found at ui/components/component-library/tag-url/tag-url.js.\nYou can find documentation for the new `TagUrl` component in the MetaMask Storybook:\n{@link https://metamask.github.io/metamask-storybook/?path=/docs/components-componentlibrary-tagurl--docs}\nIf you would like to help with the replacement of the old `SiteOrigin` component, please submit a pull request against this GitHub issue:\n{@link https://github.com/MetaMask/metamask-extension/issues/20489}",methods:[],displayName:"SiteOrigin",props:{siteOrigin:{description:"The origin of the site generally the URL",type:{name:"string"},required:!0},iconName:{description:"Icon name is used for the fallback icon and will display the first letter of the string\nwhen iconSrc errors or is not provided.",type:{name:"string"},required:!1},iconSrc:{description:"The image src of the icon",type:{name:"string"},required:!1},className:{description:"Additional className added to the root html element",type:{name:"string"},required:!1},title:{description:"title specifies extra information and is added to a title attribute added to the root html element\nIt is most often shown as a tooltip text when the mouse moves over the element.",type:{name:"string"},required:!1},chip:{description:"Whether the SiteOrigin is displayed as a chip or plain text.\nif false iconSrc and iconName props will not be used.",type:{name:"bool"},required:!1},leftIcon:{description:"The icon to display on the left side of the chip. If not provided, the iconSrc and iconName will be used.",type:{name:"node"},required:!1},rightIcon:{description:"The icon to display on the right side of the chip.",type:{name:"node"},required:!1}}}},"./ui/pages/confirmations/components/confirm-page-container/confirm-page-container-navigation/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>confirm_page_container_navigation_component});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),react_router=__webpack_require__("./node_modules/react-router-dom/node_modules/react-router/esm/react-router.js"),selectors=__webpack_require__("./ui/selectors/index.js"),i18n=__webpack_require__("./ui/contexts/i18n.js"),routes=__webpack_require__("./ui/helpers/constants/routes.ts"),confirm_transaction_duck=__webpack_require__("./ui/ducks/confirm-transaction/confirm-transaction.duck.js"),metametrics=__webpack_require__("./shared/constants/metametrics.ts"),useQueuedConfirmationEvents=__webpack_require__("./ui/pages/confirmations/hooks/useQueuedConfirmationEvents.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 _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)}}var ConfirmPageContainerNavigation=function(){var _useSelector,t=(0,react.useContext)(i18n.gJ),dispatch=(0,es.wA)(),history=(0,react_router.W6)(),id=(0,react_router.g)().id,unapprovedDecryptMsgs=(0,es.d4)(selectors.Bui),unapprovedEncryptionPublicKeyMsgs=(0,es.d4)(selectors.XYh),unconfirmedTransactions=null!==(_useSelector=(0,es.d4)(selectors.FtB))&&void 0!==_useSelector?_useSelector:[],enumUnapprovedDecryptMsgsKey=Object.keys(unapprovedDecryptMsgs||{}),enumUnapprovedEncryptMsgsKey=Object.keys(unapprovedEncryptionPublicKeyMsgs||{}),enumDecryptAndEncryptMsgs=_to_consumable_array(enumUnapprovedDecryptMsgsKey).concat(_to_consumable_array(enumUnapprovedEncryptMsgsKey)),enumUnapprovedTxs=unconfirmedTransactions.map(function(tx){return tx.id}).filter(function(key){return!1===enumDecryptAndEncryptMsgs.includes(key)}),currentPosition=enumUnapprovedTxs.indexOf(id),totalTx=enumUnapprovedTxs.length,nextTxId=enumUnapprovedTxs[currentPosition+1],prevTxId=enumUnapprovedTxs[currentPosition-1],showNavigation=enumUnapprovedTxs.length>1,firstTx=enumUnapprovedTxs[0],lastTx=enumUnapprovedTxs[enumUnapprovedTxs.length-1],onNextTx=function(txId){if(txId){dispatch((0,confirm_transaction_duck.GB)());var _unconfirmedTransactions_position,position=enumUnapprovedTxs.indexOf(txId);history.push((null===(_unconfirmedTransactions_position=unconfirmedTransactions[position])||void 0===_unconfirmedTransactions_position?void 0:_unconfirmedTransactions_position.msgParams)?"".concat(routes.s8,"/").concat(txId).concat(routes.no):"".concat(routes.s8,"/").concat(txId))}};return(0,useQueuedConfirmationEvents.F)(metametrics.Gq.NavigationHeader),react.createElement("div",{className:"confirm-page-container-navigation",style:{display:showNavigation?"flex":"none"}},react.createElement("div",{className:"confirm-page-container-navigation__container","data-testid":"navigation-container",style:{visibility:prevTxId?"initial":"hidden"}},react.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"first-page",onClick:function(){return onNextTx(firstTx)}},react.createElement("i",{className:"fa fa-angle-double-left fa-2x"})),react.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"previous-page",onClick:function(){return onNextTx(prevTxId)}},react.createElement("i",{className:"fa fa-angle-left fa-2x"}))),react.createElement("div",{className:"confirm-page-container-navigation__textcontainer"},react.createElement("div",{className:"confirm-page-container-navigation__navtext"},currentPosition+1," ",t("ofTextNofM")," ",totalTx),react.createElement("div",{className:"confirm-page-container-navigation__longtext"},t("requestsAwaitingAcknowledgement"))),react.createElement("div",{className:"confirm-page-container-navigation__container",style:{visibility:nextTxId?"initial":"hidden"}},react.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"next-page",onClick:function(){return onNextTx(nextTxId)}},react.createElement("i",{className:"fa fa-angle-right fa-2x"})),react.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"last-page",onClick:function(){return onNextTx(lastTx)}},react.createElement("i",{className:"fa fa-angle-double-right fa-2x"}))))};let confirm_page_container_navigation_component=ConfirmPageContainerNavigation;ConfirmPageContainerNavigation.__docgenInfo={description:"",methods:[],displayName:"ConfirmPageContainerNavigation"}},"./ui/pages/confirmations/components/ledger-instruction-field/ledger-instruction-field.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>LedgerInstructionField});var prop_types__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__),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"),_app_scripts_lib_util__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./app/scripts/lib/util.ts"),_shared_constants_app__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./shared/constants/app.ts"),_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./shared/constants/hardware-wallets.ts"),_ducks_app_app__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/ducks/app/app.ts"),_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/ducks/metamask/metamask.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./ui/hooks/useI18nContext.js"),_store_actions__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./ui/__mocks__/actions.js"),_components_component_library__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./ui/components/component-library/index.ts");function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){reject(error);return}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}function _ts_generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=(t=_.trys).length>0&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}}var renderInstructionStep=function(text){var show=!(arguments.length>1)||void 0===arguments[1]||arguments[1],color=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.r7.textDefault;return show&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_10__.EY,{color:color,as:"h6"},text)};function LedgerInstructionField(param){var showDataInstruction=param.showDataInstruction,t=(0,_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_8__.P)(),dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.wA)(),webHidConnectedStatus=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_ducks_app_app__WEBPACK_IMPORTED_MODULE_5__.IA),ledgerTransportType=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_6__.zq),transportStatus=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_ducks_app_app__WEBPACK_IMPORTED_MODULE_5__.HH),environmentTypeIsFullScreen=(0,_app_scripts_lib_util__WEBPACK_IMPORTED_MODULE_2__.mc)()===_shared_constants_app__WEBPACK_IMPORTED_MODULE_3__.t8;(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){var _ref,_ref1,initialConnectedDeviceCheck=(_ref=_async_to_generator(function(){var _window_navigator_hid,_window_navigator,devices,webHidIsConnected;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!(ledgerTransportType===_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.ef.webhid&&webHidConnectedStatus!==_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.jI.connected))return[3,2];return[4,null===(_window_navigator=window.navigator)||void 0===_window_navigator?void 0:null===(_window_navigator_hid=_window_navigator.hid)||void 0===_window_navigator_hid?void 0:_window_navigator_hid.getDevices()];case 1:webHidIsConnected=null==(devices=_state.sent())?void 0:devices.some(function(device){return device.vendorId===Number(_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.e)}),dispatch((0,_ducks_app_app__WEBPACK_IMPORTED_MODULE_5__.u5)(webHidIsConnected?_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.jI.connected:_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.jI.notConnected)),_state.label=2;case 2:return[2]}})}),function initialConnectedDeviceCheck(){return _ref.apply(this,arguments)});(_ref1=_async_to_generator(function(){var transportedCreated,e;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!(ledgerTransportType===_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.ef.webhid&&webHidConnectedStatus===_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.jI.connected&&transportStatus===_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.cf.none))return[3,4];_state.label=1;case 1:return _state.trys.push([1,3,,4]),[4,(0,_store_actions__WEBPACK_IMPORTED_MODULE_9__.attemptLedgerTransportCreation)()];case 2:return transportedCreated=_state.sent(),dispatch((0,_ducks_app_app__WEBPACK_IMPORTED_MODULE_5__.nX)(transportedCreated?_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.cf.verified:_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.cf.unknownFailure)),[3,4];case 3:return(e=_state.sent()).message.match("Failed to open the device")?dispatch((0,_ducks_app_app__WEBPACK_IMPORTED_MODULE_5__.nX)(_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.cf.deviceOpenFailure)):e.message.match("the device is already open")?dispatch((0,_ducks_app_app__WEBPACK_IMPORTED_MODULE_5__.nX)(_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.cf.verified)):dispatch((0,_ducks_app_app__WEBPACK_IMPORTED_MODULE_5__.nX)(_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.cf.unknownFailure)),[3,4];case 4:return[2]}})}),function determineTransportStatus(){return _ref1.apply(this,arguments)})(),initialConnectedDeviceCheck()},[dispatch,ledgerTransportType,webHidConnectedStatus,transportStatus]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){return function(){dispatch((0,_ducks_app_app__WEBPACK_IMPORTED_MODULE_5__.nX)(_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.cf.none))}},[dispatch]);var usingWebHID=ledgerTransportType===_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.ef.webhid;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"confirm-detail-row"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_10__.b8,{severity:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.oC.INFO},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ledger-live-dialog"},renderInstructionStep(t("ledgerConnectionInstructionHeader")),renderInstructionStep("• ".concat(t("ledgerConnectionInstructionStepThree"))),renderInstructionStep("• ".concat(t("ledgerConnectionInstructionStepFour")),showDataInstruction),renderInstructionStep(react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_10__.vx,{textAlign:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.nO.Left,onClick:_async_to_generator(function(){return _ts_generator(this,function(_state){return environmentTypeIsFullScreen?window.location.reload():__webpack_require__.g.platform.openExtensionInBrowser(null,null,!0),[2]})})},t("ledgerConnectionInstructionCloseOtherApps"))),transportStatus===_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.cf.deviceOpenFailure),renderInstructionStep(react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_10__.vx,{textAlign:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.nO.Left,onClick:_async_to_generator(function(){var webHidIsConnected;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!environmentTypeIsFullScreen)return[3,2];return[4,window.navigator.hid.requestDevice({filters:[{vendorId:_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.e}]})];case 1:return webHidIsConnected=_state.sent().some(function(device){return device.vendorId===Number(_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.e)}),dispatch((0,_ducks_app_app__WEBPACK_IMPORTED_MODULE_5__.u5)({webHidConnectedStatus:webHidIsConnected?_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.jI.connected:_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.jI.notConnected})),[3,3];case 2:__webpack_require__.g.platform.openExtensionInBrowser(null,null,!0),_state.label=3;case 3:return[2]}})})},t(environmentTypeIsFullScreen?"clickToConnectLedgerViaWebHID":"openFullScreenForLedgerWebHid"))),usingWebHID&&webHidConnectedStatus===_shared_constants_hardware_wallets__WEBPACK_IMPORTED_MODULE_4__.jI.notConnected,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.r7.warningDefault)))))}LedgerInstructionField.propTypes={showDataInstruction:prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool},LedgerInstructionField.__docgenInfo={description:"",methods:[],displayName:"LedgerInstructionField",props:{showDataInstruction:{description:"",type:{name:"bool"},required:!1}}}},"./ui/pages/confirmations/components/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i8:()=>REASON_TO_DESCRIPTION_TKEY,cJ:()=>REASON_TO_TITLE_TKEY,Ay:()=>blockaid_banner_alert});var _obj,_obj1,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),esm_exports=__webpack_require__("./node_modules/@sentry/core/build/esm/exports.js"),ppom_release_package=__webpack_require__("./node_modules/@blockaid/ppom_release/package.json"),network=__webpack_require__("./shared/constants/network.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),i18n=__webpack_require__("./ui/contexts/i18n.js"),security_provider=__webpack_require__("./shared/constants/security-provider.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),useTransactionEventFragment=__webpack_require__("./ui/pages/confirmations/hooks/useTransactionEventFragment.js"),security_provider_banner_alert=__webpack_require__("./ui/pages/confirmations/components/security-provider-banner-alert/security-provider-banner-alert.js"),loading_indicator=__webpack_require__("./ui/components/ui/loading-indicator/loading-indicator.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 _object_without_properties(source,excluded){if(null==source)return{};var key,i,target=_object_without_properties_loose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _object_without_properties_loose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}var zlib=__webpack_require__("?e569"),REASON_TO_DESCRIPTION_TKEY=Object.freeze((_define_property(_obj={},security_provider.W4.approvalFarming,"blockaidDescriptionApproveFarming"),_define_property(_obj,security_provider.W4.permitFarming,"blockaidDescriptionApproveFarming"),_define_property(_obj,security_provider.W4.setApprovalForAll,"blockaidDescriptionApproveFarming"),_define_property(_obj,security_provider.W4.blurFarming,"blockaidDescriptionBlurFarming"),_define_property(_obj,security_provider.W4.errored,"blockaidDescriptionErrored"),_define_property(_obj,security_provider.W4.seaportFarming,"blockaidDescriptionSeaportFarming"),_define_property(_obj,security_provider.W4.maliciousDomain,"blockaidDescriptionMaliciousDomain"),_define_property(_obj,security_provider.W4.rawSignatureFarming,"blockaidDescriptionMightLoseAssets"),_define_property(_obj,security_provider.W4.tradeOrderFarming,"blockaidDescriptionMightLoseAssets"),_define_property(_obj,security_provider.W4.rawNativeTokenTransfer,"blockaidDescriptionTransferFarming"),_define_property(_obj,security_provider.W4.transferFarming,"blockaidDescriptionTransferFarming"),_define_property(_obj,security_provider.W4.transferFromFarming,"blockaidDescriptionTransferFarming"),_define_property(_obj,security_provider.W4.other,"blockaidDescriptionMightLoseAssets"),_obj)),REASON_TO_TITLE_TKEY=Object.freeze((_define_property(_obj1={},security_provider.W4.errored,"blockaidTitleMayNotBeSafe"),_define_property(_obj1,security_provider.W4.rawSignatureFarming,"blockaidTitleSuspicious"),_obj1));function BlockaidBannerAlert(_param){var _zlib_gzipSync,_ref,_zlib_gzipSync1,jsonData,encodedData,title,description,txData=_param.txData,props=_object_without_properties(_param,["txData"]),securityAlertResponse=txData.securityAlertResponse,origin=txData.origin,msgParams=txData.msgParams,type=txData.type,txParams=txData.txParams,chainId=txData.chainId,t=(0,react.useContext)(i18n.gJ),updateTransactionEventFragment=(0,useTransactionEventFragment.W)().updateTransactionEventFragment;if(!securityAlertResponse||0===Object.keys(securityAlertResponse).length)return null;if(securityAlertResponse.result_type===security_provider.p0.Loading)return react.createElement(loading_indicator.A,{isLoading:!0,style:{position:"relative",flex:"0 0 auto",margin:"8px auto 0"}});var block=securityAlertResponse.block,features=securityAlertResponse.features,reason=securityAlertResponse.reason,resultType=securityAlertResponse.result_type;if(resultType===security_provider.p0.Benign)return null;resultType===security_provider.p0.Warning?(title=t(REASON_TO_TITLE_TKEY[security_provider.W4.errored]),description=t("blockaidDescriptionWarning")):(REASON_TO_DESCRIPTION_TKEY[reason]||(0,esm_exports.Cp)("BlockaidBannerAlert: Unidentified reason '".concat(reason,"'")),title=t(REASON_TO_TITLE_TKEY[reason]||"blockaidTitleDeceptive"),description=t(REASON_TO_DESCRIPTION_TKEY[reason]||REASON_TO_DESCRIPTION_TKEY.other));var details=(null==features?void 0:features.length)?react.createElement(component_library.EY,{as:"ul",overflowWrap:design_system.Np.BreakWord},features.map(function(feature,i){return react.createElement("li",{key:"blockaid-detail-".concat(i)},"• ",feature)})):null,isFailedResultType=resultType===security_provider.p0.Errored,severity=resultType===security_provider.p0.Malicious?component_library.OU.Danger:component_library.OU.Warning,reportUrl=(jsonData=JSON.stringify({blockNumber:block,blockaidVersion:ppom_release_package.rE,chain:network.qJ[chainId],classification:isFailedResultType?"error":reason,domain:null!==(_ref=null!=origin?origin:null==msgParams?void 0:msgParams.origin)&&void 0!==_ref?_ref:null==txParams?void 0:txParams.origin,jsonRpcMethod:type,jsonRpcParams:JSON.stringify(null!=txParams?txParams:msgParams),resultType:isFailedResultType?security_provider.p0.Errored:resultType,reproduce:JSON.stringify(features)}),encodedData=null!==(_zlib_gzipSync1=null==zlib?void 0:null===(_zlib_gzipSync=zlib.gzipSync)||void 0===_zlib_gzipSync?void 0:_zlib_gzipSync.call(zlib,jsonData))&&void 0!==_zlib_gzipSync1?_zlib_gzipSync1:jsonData,"".concat(security_provider.NE,"?data=").concat(encodeURIComponent(encodedData.toString("base64")),"&utm_source=").concat(security_provider.K$));return react.createElement(security_provider_banner_alert.A,_object_spread({description:description,details:details,provider:security_provider.O5.Blockaid,reportUrl:reportUrl,severity:severity,title:title,onClickSupportLink:function(){updateTransactionEventFragment({properties:{external_link_clicked:"security_alert_support_link"}},txData.id)}},props))}BlockaidBannerAlert.propTypes={txData:prop_types_default().object};let blockaid_banner_alert=BlockaidBannerAlert;BlockaidBannerAlert.__docgenInfo={description:"",methods:[],displayName:"BlockaidBannerAlert",props:{txData:{description:"",type:{name:"object"},required:!1}}}},"./ui/pages/confirmations/components/security-provider-banner-alert/security-provider-banner-alert.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),_components_component_library__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/component-library/index.ts"),_components_ui_disclosure__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/components/ui/disclosure/index.js"),_components_ui_disclosure_disclosure_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/ui/disclosure/disclosure.constants.ts"),_contexts_i18n__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/contexts/i18n.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_shared_constants_security_provider__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./shared/constants/security-provider.ts"),_helpers_constants_zendesk_url__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/helpers/constants/zendesk-url.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 _object_without_properties(source,excluded){if(null==source)return{};var key,i,target=_object_without_properties_loose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _object_without_properties_loose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}function SecurityProviderBannerAlert(_param){var description=_param.description,details=_param.details,onClickSupportLink=_param.onClickSupportLink,provider=_param.provider,severity=_param.severity,title=_param.title,reportUrl=_param.reportUrl,props=_object_without_properties(_param,["description","details","onClickSupportLink","provider","severity","title","reportUrl"]),t=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_contexts_i18n__WEBPACK_IMPORTED_MODULE_4__.gJ);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.b8,_object_spread({"data-testid":"security-provider-banner-alert",title:title,severity:severity},props),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.EY,{marginTop:2},description),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.az,{marginTop:3},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_ui_disclosure__WEBPACK_IMPORTED_MODULE_2__.A,{title:t("seeDetails"),variant:_components_ui_disclosure_disclosure_constants__WEBPACK_IMPORTED_MODULE_3__.h.Arrow},details,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.EY,{marginTop:3,display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.nl.Flex},t("somethingDoesntLookRight",[react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.vx,{key:"security-provider-button-supporturl-".concat(provider),size:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.or.inherit,href:reportUrl||_helpers_constants_zendesk_url__WEBPACK_IMPORTED_MODULE_7__.A.SUPPORT_URL,externalLink:!0,onClick:onClickSupportLink},t("reportIssue"))])))),provider&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.EY,{marginTop:3,display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.nl.Flex,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.k2.center,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.Q1.textAlternative,variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.J3.bodySm},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.In,{className:"disclosure__summary--icon",color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.Li.primaryDefault,name:_components_component_library__WEBPACK_IMPORTED_MODULE_1__.$M.SecurityTick,size:_components_component_library__WEBPACK_IMPORTED_MODULE_1__.lK.Sm,marginInlineEnd:1}),t("securityProviderPoweredBy",[react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.vx,{key:"security-provider-button-link-".concat(provider),size:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.or.inherit,href:_shared_constants_security_provider__WEBPACK_IMPORTED_MODULE_6__.ob[provider].url,externalLink:!0},t(_shared_constants_security_provider__WEBPACK_IMPORTED_MODULE_6__.ob[provider].tKeyName))])))}SecurityProviderBannerAlert.propTypes={description:prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,prop_types__WEBPACK_IMPORTED_MODULE_8___default().element]).isRequired,severity:prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOf([_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.AI.Danger,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.AI.Warning]).isRequired,title:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired,details:prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,prop_types__WEBPACK_IMPORTED_MODULE_8___default().element]),provider:prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOf(Object.values(_shared_constants_security_provider__WEBPACK_IMPORTED_MODULE_6__.O5)),onClickSupportLink:prop_types__WEBPACK_IMPORTED_MODULE_8___default().func,reportUrl:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string};let __WEBPACK_DEFAULT_EXPORT__=SecurityProviderBannerAlert;SecurityProviderBannerAlert.__docgenInfo={description:"",methods:[],displayName:"SecurityProviderBannerAlert",props:{description:{description:"Description content that may be plain text or contain hyperlinks",type:{name:"union",value:[{name:"string"},{name:"element"}]},required:!0},severity:{description:"Severity level",type:{name:"enum",value:[{value:"Severity.Danger",computed:!0},{value:"Severity.Warning",computed:!0}]},required:!0},title:{description:"Title to be passed as <BannerAlert> param",type:{name:"string"},required:!0},details:{description:"Additional details to be displayed under the description",type:{name:"union",value:[{name:"string"},{name:"element"}]},required:!1},provider:{description:"Name of the security provider",type:{name:"enum",computed:!0,value:"Object.values(SecurityProvider)"},required:!1},onClickSupportLink:{description:"Function to be called when the support link is clicked",type:{name:"func"},required:!1},reportUrl:{description:"URL to open when report an issue link is clicked",type:{name:"string"},required:!1}}}},"./ui/pages/confirmations/components/security-provider-banner-message/security-provider-banner-message.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>SecurityProviderBannerMessage});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_shared_constants_security_provider__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/constants/security-provider.ts"),_storybook_i18n__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./.storybook/i18n.js"),_components_component_library__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/component-library/index.ts");function SecurityProviderBannerMessage(param){var messageTitle,messageText,severity,securityProviderResponse=param.securityProviderResponse,t=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_storybook_i18n__WEBPACK_IMPORTED_MODULE_3__.gJ);return securityProviderResponse.flagAsDangerous===_shared_constants_security_provider__WEBPACK_IMPORTED_MODULE_2__.T$.MALICIOUS?(messageTitle=""===securityProviderResponse.reason_header?t("requestFlaggedAsMaliciousFallbackCopyReasonTitle"):securityProviderResponse.reason_header,messageText=""===securityProviderResponse.reason?t("requestFlaggedAsMaliciousFallbackCopyReason"):securityProviderResponse.reason,severity=_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__.oC.DANGER):(securityProviderResponse.flagAsDangerous===_shared_constants_security_provider__WEBPACK_IMPORTED_MODULE_2__.T$.NOT_SAFE?(messageTitle=t("requestMayNotBeSafe"),messageText=t("requestMayNotBeSafeError")):(messageTitle=t("requestNotVerified"),messageText=t("requestNotVerifiedError")),severity=_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__.oC.WARNING),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.b8,{className:"security-provider-banner-message",marginTop:4,marginRight:4,marginLeft:4,title:messageTitle,severity:severity},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__.J3.bodySm,as:"h6"},messageText),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__.J3.bodySm,as:"h6",color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__.Q1.textAlternative},t("securityAlert",[react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.vx,{key:"opensea_link",size:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__.or.inherit,href:"https://opensea.io/",target:"_blank"},t("openSeaNew")),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.vx,{key:"blockaid_link",size:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__.or.inherit,href:"https://blockaid.io/",target:"_blank"},t("blockaid"))])))}SecurityProviderBannerMessage.propTypes={securityProviderResponse:prop_types__WEBPACK_IMPORTED_MODULE_5___default().object},SecurityProviderBannerMessage.__docgenInfo={description:"",methods:[],displayName:"SecurityProviderBannerMessage",props:{securityProviderResponse:{description:"",type:{name:"object"},required:!1}}}},"./ui/pages/confirmations/hooks/useQueuedConfirmationEvents.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>useQueuedConfirmationsEvent});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"),_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/constants/metametrics.ts"),_contexts_metametrics__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/contexts/metametrics.js"),_selectors__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/selectors/index.js"),useQueuedConfirmationsEvent=function(queueType){var pendingApprovals=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_4__.aCI),queuedRequestCount=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_4__.uZ),trackEvent=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_contexts_metametrics__WEBPACK_IMPORTED_MODULE_3__.O2);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){if(pendingApprovals.length>0&&queuedRequestCount>0){var properties={confirmation_type:pendingApprovals[0].type,referrer:pendingApprovals[0].origin,queue_size:queuedRequestCount,queue_type:queueType};trackEvent({event:_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_2__.gP.ConfirmationQueued,category:_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_2__.FZ.Confirmations,properties:properties})}},[JSON.stringify(pendingApprovals),queuedRequestCount,queueType,trackEvent])}},"?e569":()=>{}}]);