-
Notifications
You must be signed in to change notification settings - Fork 31
/
38354.f0fa5a46.iframe.bundle.js
1 lines (1 loc) · 78.3 KB
/
38354.f0fa5a46.iframe.bundle.js
1
"use strict";(globalThis.webpackChunkmetamask_crx=globalThis.webpackChunkmetamask_crx||[]).push([[38354],{"./ui/components/ui/form-field/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>FormField});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),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),numeric_input_component=__webpack_require__("./ui/components/ui/numeric-input/numeric-input.component.js"),info_tooltip=__webpack_require__("./ui/components/ui/info-tooltip/info-tooltip.js"),component_library=__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 FormField(param){var dataTestId=param.dataTestId,_param_titleText=param.titleText,titleText=void 0===_param_titleText?"":_param_titleText,TitleTextCustomComponent=param.TitleTextCustomComponent,_param_titleUnit=param.titleUnit,titleUnit=void 0===_param_titleUnit?"":_param_titleUnit,TitleUnitCustomComponent=param.TitleUnitCustomComponent,_param_tooltipText=param.tooltipText,tooltipText=void 0===_param_tooltipText?"":_param_tooltipText,TooltipCustomComponent=param.TooltipCustomComponent,_param_titleDetail=param.titleDetail,titleDetail=void 0===_param_titleDetail?"":_param_titleDetail,titleDetailWrapperProps=param.titleDetailWrapperProps,titleHeadingWrapperProps=param.titleHeadingWrapperProps,error=param.error,_param_onChange=param.onChange,onChange=void 0===_param_onChange?void 0:_param_onChange,_param_value=param.value,value=void 0===_param_value?0:_param_value,numeric=param.numeric,_param_detailText=param.detailText,_param_autoFocus=param.autoFocus,autoFocus=void 0!==_param_autoFocus&&_param_autoFocus,_param_password=param.password,_param_allowDecimals=param.allowDecimals,_param_disabled=param.disabled,disabled=void 0!==_param_disabled&&_param_disabled,placeholder=param.placeholder,warning=param.warning,warningProps=param.warningProps,passwordStrength=param.passwordStrength,passwordStrengthText=param.passwordStrengthText,id=param.id,inputProps=param.inputProps,wrappingLabelProps=param.wrappingLabelProps,inputRef=param.inputRef;return react.createElement("div",{className:classnames_default()("form-field",{"form-field__row--error":error})},react.createElement(component_library.az,_object_spread({as:"label"},wrappingLabelProps),react.createElement("div",{className:"form-field__heading"},react.createElement(component_library.az,_object_spread({className:"form-field__heading-title",display:design_system.nl.Flex,alignItems:design_system.k2.baseline},titleHeadingWrapperProps),TitleTextCustomComponent||titleText&&react.createElement(component_library.EY,{as:"h6",variant:design_system.J3.bodySmBold,display:design_system.nl.InlineBlock},titleText),TitleUnitCustomComponent||titleUnit&&react.createElement(component_library.EY,{as:"h6",variant:design_system.J3.bodySm,color:design_system.r7.textAlternative,display:design_system.nl.InlineBlock},titleUnit),TooltipCustomComponent||tooltipText&&react.createElement(info_tooltip.A,{position:"top",contentText:tooltipText})),titleDetail&&react.createElement(component_library.az,_object_spread({className:"form-field__heading-detail",textAlign:design_system.nO.End,marginRight:2},titleDetailWrapperProps),titleDetail)),numeric?react.createElement(numeric_input_component.A,{error:error,onChange:onChange,value:value,detailText:void 0===_param_detailText?"":_param_detailText,autoFocus:autoFocus,allowDecimals:void 0!==_param_allowDecimals&&_param_allowDecimals,disabled:disabled,dataTestId:dataTestId,placeholder:placeholder,id:id,inputRef:inputRef}):react.createElement("input",_object_spread({className:classnames_default()("form-field__input",{"form-field__input--error":error,"form-field__input--warning":warning}),onChange:function(e){return onChange(e.target.value)},value:value,type:void 0!==_param_password&&_param_password?"password":"text",autoFocus:autoFocus,disabled:disabled,"data-testid":dataTestId,placeholder:placeholder,id:id,ref:inputRef},inputProps)),error&&react.createElement(component_library.EY,{color:design_system.r7.errorDefault,variant:design_system.J3.bodySm,as:"h6",className:"form-field__error"},error),warning&&react.createElement(component_library.EY,_object_spread({color:design_system.r7.textAlternative,variant:design_system.J3.bodySm,as:"h6",className:"form-field__warning"},warningProps),warning),passwordStrength&&react.createElement(component_library.EY,{color:design_system.r7.textDefault,variant:design_system.J3.bodySm,as:"h6",className:"form-field__password-strength"},passwordStrength),passwordStrengthText&&react.createElement(component_library.EY,{color:design_system.r7.textAlternative,variant:design_system.J3.bodyXs,as:"h6",className:"form-field__password-strength-text"},passwordStrengthText)))}FormField.propTypes={dataTestId:prop_types_default().string,titleText:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().node]),TitleTextCustomComponent:prop_types_default().node,titleUnit:prop_types_default().string,TitleUnitCustomComponent:prop_types_default().node,tooltipText:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().node]),TooltipCustomComponent:prop_types_default().node,titleDetail:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().node]),titleDetailWrapperProps:prop_types_default().shape(_object_spread({},component_library.az.propTypes)),titleHeadingWrapperProps:prop_types_default().shape(_object_spread({},component_library.az.propTypes)),error:prop_types_default().string,warning:prop_types_default().string,warningProps:prop_types_default().shape(_object_spread({},component_library.EY.propTypes)),onChange:prop_types_default().func,value:prop_types_default().oneOfType([prop_types_default().number,prop_types_default().string]),detailText:prop_types_default().string,autoFocus:prop_types_default().bool,numeric:prop_types_default().bool,password:prop_types_default().bool,allowDecimals:prop_types_default().bool,disabled:prop_types_default().bool,placeholder:prop_types_default().string,passwordStrength:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().node]),passwordStrengthText:prop_types_default().string,id:prop_types_default().string,inputProps:prop_types_default().object,wrappingLabelProps:prop_types_default().object,inputRef:prop_types_default().object},FormField.__docgenInfo={description:"@deprecated The `<FormField />` component has been deprecated in favor of the new `<FormTextField>` component from the component-library.\nPlease update your code to use the new `<FormTextField>` component instead, which can be found at ui/components/component-library/form-text-field/form-text-field.js.\nYou can find documentation for the new FormTextField component in the MetaMask Storybook:\n{@link https://metamask.github.io/metamask-storybook/?path=/docs/components-componentlibrary-formtextfield--docs}\nIf you would like to help with the replacement of the old FormField component, please submit a pull request against this GitHub issue:\n{@link https://github.com/MetaMask/metamask-extension/issues/19737}",methods:[],displayName:"FormField",props:{titleText:{defaultValue:{value:"''",computed:!1},description:"Form Fields Title",type:{name:"union",value:[{name:"string"},{name:"node"}]},required:!1},titleUnit:{defaultValue:{value:"''",computed:!1},description:"Show unit (eg. ETH)",type:{name:"string"},required:!1},tooltipText:{defaultValue:{value:"''",computed:!1},description:"Add Tooltip and text content",type:{name:"union",value:[{name:"string"},{name:"node"}]},required:!1},titleDetail:{defaultValue:{value:"''",computed:!1},description:"Show content (text, image, component) in title",type:{name:"union",value:[{name:"string"},{name:"node"}]},required:!1},onChange:{defaultValue:{value:"undefined",computed:!0},description:"Handler when fields change",type:{name:"func"},required:!1},value:{defaultValue:{value:"0",computed:!1},description:"Field value",type:{name:"union",value:[{name:"number"},{name:"string"}]},required:!1},detailText:{defaultValue:{value:"''",computed:!1},description:"Show detail text if field mode is numeric",type:{name:"string"},required:!1},autoFocus:{defaultValue:{value:"false",computed:!1},description:"Set autofocus on render",type:{name:"bool"},required:!1},password:{defaultValue:{value:"false",computed:!1},description:"Set password mode",type:{name:"bool"},required:!1},allowDecimals:{defaultValue:{value:"false",computed:!1},description:"Allow decimals on the field",type:{name:"bool"},required:!1},disabled:{defaultValue:{value:"false",computed:!1},description:"Check if the form disabled",type:{name:"bool"},required:!1},dataTestId:{description:"Identifier for testing purpose",type:{name:"string"},required:!1},TitleTextCustomComponent:{description:"A custom component to replace the title text Typography component\ntitleText will be ignored if this is provided",type:{name:"node"},required:!1},TitleUnitCustomComponent:{description:"A custom component to replace the title unit Typography component\ntitleUnit will be ignored if this is provided",type:{name:"node"},required:!1},TooltipCustomComponent:{description:"A custom component to replace the tooltip component\ntooltipText will be ignored if this is provided",type:{name:"node"},required:!1},titleDetailWrapperProps:{description:"Props to pass to wrapping Box component of the titleDetail component\nAccepts all props of the Box component",type:{name:"shape",value:{}},required:!1},titleHeadingWrapperProps:{description:"Props to pass to wrapping Box component of the titleHeading component\nAccepts all props of the Box component",type:{name:"shape",value:{}},required:!1},error:{description:"Show error message",type:{name:"string"},required:!1},warning:{description:"Show warning message",type:{name:"string"},required:!1},warningProps:{description:"Props to pass to the warning text component\nAccepts all props of the Text component",type:{name:"shape",value:{}},required:!1},numeric:{description:"Set numeric mode, the default is text",type:{name:"bool"},required:!1},placeholder:{description:"Set the placeholder text for the input field",type:{name:"string"},required:!1},passwordStrength:{description:"Show password strength according to the score",type:{name:"union",value:[{name:"string"},{name:"node"}]},required:!1},passwordStrengthText:{description:"Show password strength description",type:{name:"string"},required:!1},id:{description:"The id of the input element. Should be used when the wrapping label is changed to a div to ensure accessibility.",type:{name:"string"},required:!1},inputProps:{description:"Any additional input attributes or overrides not provided by exposed props",type:{name:"object"},required:!1},wrappingLabelProps:{description:"The FormField is wrapped in a Box component that is rendered as a <label/> using the polymorphic \"as\" prop.\nThis object allows you to override the rendering of the label by using the wrapperProps={{ as: 'div' }} prop.\nIf used ensure the id prop is set on the input and a label element is present using htmlFor with the same id to ensure accessibility.",type:{name:"object"},required:!1},inputRef:{description:"ref for input component",type:{name:"object"},required:!1}}}},"./ui/components/ui/info-tooltip/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>_info_tooltip__WEBPACK_IMPORTED_MODULE_0__.A});var _info_tooltip__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./ui/components/ui/info-tooltip/info-tooltip.js")},"./ui/components/ui/info-tooltip/info-tooltip-icon.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>InfoTooltipIcon});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);function InfoTooltipIcon(param){var _param_fillColor=param.fillColor;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M5 0C2.2 0 0 2.2 0 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 2c.4 0 .7.3.7.7s-.3.7-.7.7-.7-.2-.7-.6.3-.8.7-.8zm.7 6H4.3V4.3h1.5V8z",fill:void 0===_param_fillColor?"var(--color-icon-default)":_param_fillColor}))}InfoTooltipIcon.propTypes={fillColor:prop_types__WEBPACK_IMPORTED_MODULE_1___default().string},InfoTooltipIcon.__docgenInfo={description:"",methods:[],displayName:"InfoTooltipIcon",props:{fillColor:{defaultValue:{value:"'var(--color-icon-default)'",computed:!1},description:"",type:{name:"string"},required:!1}}}},"./ui/components/ui/info-tooltip/info-tooltip.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>InfoTooltip});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__),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__),_tooltip__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/components/ui/tooltip/index.js"),_info_tooltip_icon__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/ui/info-tooltip/info-tooltip-icon.js"),positionArrowClassMap={top:"info-tooltip__top-tooltip-arrow",bottom:"info-tooltip__bottom-tooltip-arrow",left:"info-tooltip__left-tooltip-arrow",right:"info-tooltip__right-tooltip-arrow"};function InfoTooltip(param){var _param_contentText=param.contentText,_param_position=param.position,position=void 0===_param_position?"":_param_position,containerClassName=param.containerClassName,wrapperClassName=param.wrapperClassName,_param_iconFillColor=param.iconFillColor;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"info-tooltip","data-testid":"info-tooltip"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tooltip__WEBPACK_IMPORTED_MODULE_2__.A,{interactive:!0,position:position,containerClassName:classnames__WEBPACK_IMPORTED_MODULE_1___default()("info-tooltip__tooltip-container",containerClassName),wrapperClassName:wrapperClassName,tooltipInnerClassName:"info-tooltip__tooltip-content",tooltipArrowClassName:positionArrowClassMap[position],html:void 0===_param_contentText?"":_param_contentText,theme:"tippy-tooltip-info"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_info_tooltip_icon__WEBPACK_IMPORTED_MODULE_3__.A,{fillColor:void 0===_param_iconFillColor?"var(--color-icon-alternative)":_param_iconFillColor})))}InfoTooltip.propTypes={contentText:prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default().string,prop_types__WEBPACK_IMPORTED_MODULE_4___default().node]),position:prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOf(["top","left","bottom","right"]),containerClassName:prop_types__WEBPACK_IMPORTED_MODULE_4___default().string,wrapperClassName:prop_types__WEBPACK_IMPORTED_MODULE_4___default().string,iconFillColor:prop_types__WEBPACK_IMPORTED_MODULE_4___default().string},InfoTooltip.__docgenInfo={description:"",methods:[],displayName:"InfoTooltip",props:{contentText:{defaultValue:{value:"''",computed:!1},description:"Text label that shows up after hover",type:{name:"union",value:[{name:"string"},{name:"node"}]},required:!1},position:{defaultValue:{value:"''",computed:!1},description:"Shows position of the tooltip",type:{name:"enum",value:[{value:"'top'",computed:!1},{value:"'left'",computed:!1},{value:"'bottom'",computed:!1},{value:"'right'",computed:!1}]},required:!1},iconFillColor:{defaultValue:{value:"'var(--color-icon-alternative)'",computed:!1},description:"Add color for the icon",type:{name:"string"},required:!1},containerClassName:{description:"Add custom CSS class for container",type:{name:"string"},required:!1},wrapperClassName:{description:"Add custom CSS class for the wrapper",type:{name:"string"},required:!1}}}},"./ui/components/ui/loading-heartbeat/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>LoadingHeartBeat});var es=__webpack_require__("./node_modules/react-redux/es/index.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),react=__webpack_require__("./node_modules/react/index.js"),gas=__webpack_require__("./ui/helpers/utils/gas.js"),app=__webpack_require__("./ui/ducks/app/app.ts"),lodash=__webpack_require__("./node_modules/lodash/lodash.js"),useGasFeeEstimates=__webpack_require__("./ui/hooks/useGasFeeEstimates.js");function useShouldAnimateGasEstimations(){var _useGasFeeEstimates=(0,useGasFeeEstimates.K)(),isGasEstimatesLoading=_useGasFeeEstimates.isGasEstimatesLoading,gasFeeEstimates=_useGasFeeEstimates.gasFeeEstimates,dispatch=(0,es.wA)(),isGasLoadingAnimationActive=(0,es.d4)(app.ZY),lastGasEstimates=(0,react.useRef)(gasFeeEstimates),gasEstimatesChanged=!(0,lodash.isEqual)(lastGasEstimates.current,gasFeeEstimates),gasJustLoaded=(0,lodash.isEqual)(lastGasEstimates.current,{});gasEstimatesChanged&&(lastGasEstimates.current=gasFeeEstimates);var showLoadingAnimation=isGasEstimatesLoading||gasEstimatesChanged&&!gasJustLoaded;(0,react.useEffect)(function(){!1===isGasLoadingAnimationActive&&!0===showLoadingAnimation&&dispatch((0,app.QB)(!0))},[dispatch,isGasLoadingAnimationActive,showLoadingAnimation]),(0,react.useEffect)(function(){var timer;return isGasLoadingAnimationActive&&!showLoadingAnimation&&(timer=setTimeout(function(){dispatch((0,app.QB)(!1))},2e3)),function(){timer&&clearTimeout(timer)}},[dispatch,isGasLoadingAnimationActive,showLoadingAnimation])}var process=__webpack_require__("./node_modules/process/browser.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}var LOADING_CLASS="".concat("loading-heartbeat","--active");function LoadingHeartBeat(param){var estimateUsed=param.estimateUsed,_param_backgroundColor=param.backgroundColor;useShouldAnimateGasEstimations();var active=(0,es.d4)(app.ZY);return process.env.IN_TEST||estimateUsed&&!(0,gas.s_)(estimateUsed)?null:react.createElement("div",{className:classnames_default()("loading-heartbeat",_define_property({},LOADING_CLASS,active)),onClick:function(e){e.preventDefault(),e.stopPropagation()},style:{backgroundColor:void 0===_param_backgroundColor?"var(--color-background-default)":_param_backgroundColor}})}LoadingHeartBeat.propTypes={backgroundColor:prop_types_default().string,estimateUsed:prop_types_default().string},LoadingHeartBeat.__docgenInfo={description:"",methods:[],displayName:"LoadingHeartBeat",props:{backgroundColor:{defaultValue:{value:"'var(--color-background-default)'",computed:!1},description:"",type:{name:"string"},required:!1},estimateUsed:{description:"",type:{name:"string"},required:!1}}}},"./ui/components/ui/numeric-input/numeric-input.component.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>NumericInput});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),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__),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_2__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_shared_constants_tokens__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./shared/constants/tokens.js"),_component_library__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/component-library/index.ts");function NumericInput(param){var _param_detailText=param.detailText,detailText=void 0===_param_detailText?"":_param_detailText,_param_value=param.value,onChange=param.onChange,_param_error=param.error,_param_autoFocus=param.autoFocus,_param_allowDecimals=param.allowDecimals,allowDecimals=void 0===_param_allowDecimals||_param_allowDecimals,_param_disabled=param.disabled,dataTestId=param.dataTestId,placeholder=param.placeholder,id=param.id,name=param.name,inputRef=param.inputRef;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:classnames__WEBPACK_IMPORTED_MODULE_1___default()("numeric-input",{"numeric-input--error":void 0===_param_error?"":_param_error})},react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"number",value:void 0===_param_value?0:_param_value,onKeyDown:function(e){allowDecimals||"."!==e.key||e.preventDefault()},onChange:function(e){var _match_,newValue=e.target.value,match=_shared_constants_tokens__WEBPACK_IMPORTED_MODULE_3__.a_.exec(newValue);(null==match?void 0:null===(_match_=match[1])||void 0===_match_?void 0:_match_.length)>=15||null==onChange||onChange(parseFloat(newValue||0,10))},min:"0",autoFocus:void 0!==_param_autoFocus&&_param_autoFocus,disabled:void 0!==_param_disabled&&_param_disabled,"data-testid":dataTestId,placeholder:placeholder,id:id,name:name,ref:inputRef}),detailText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.r7.textAlternative,variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.J3.bodySm,as:"span"},detailText))}NumericInput.propTypes={value:prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_5___default().number,prop_types__WEBPACK_IMPORTED_MODULE_5___default().string]),detailText:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string,onChange:prop_types__WEBPACK_IMPORTED_MODULE_5___default().func,error:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string,autoFocus:prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool,allowDecimals:prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool,disabled:prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool,dataTestId:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string,placeholder:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string,name:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string,id:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string,inputRef:prop_types__WEBPACK_IMPORTED_MODULE_5___default().object},NumericInput.__docgenInfo={description:"",methods:[],displayName:"NumericInput",props:{detailText:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},value:{defaultValue:{value:"0",computed:!1},description:"",type:{name:"union",value:[{name:"number"},{name:"string"}]},required:!1},error:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},autoFocus:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},allowDecimals:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},disabled:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},onChange:{description:"",type:{name:"func"},required:!1},dataTestId:{description:"",type:{name:"string"},required:!1},placeholder:{description:"",type:{name:"string"},required:!1},name:{description:"The name of the input",type:{name:"string"},required:!1},id:{description:"The id of the input element. Should be used with htmlFor with a label element.",type:{name:"string"},required:!1},inputRef:{description:"",type:{name:"object"},required:!1}}}},"./ui/pages/confirmations/components/advanced-gas-controls/advanced-gas-controls.component.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>AdvancedGasControls});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__),_contexts_i18n__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/contexts/i18n.js"),_components_ui_form_field__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/components/ui/form-field/index.js"),_helpers_constants_gas__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/helpers/constants/gas.js");function AdvancedGasControls(param){var onManualChange=param.onManualChange,gasLimit=param.gasLimit,setGasLimit=param.setGasLimit,gasPrice=param.gasPrice,setGasPrice=param.setGasPrice,gasErrors=param.gasErrors,minimumGasLimit=param.minimumGasLimit,t=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_contexts_i18n__WEBPACK_IMPORTED_MODULE_1__.gJ);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"advanced-gas-controls"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_ui_form_field__WEBPACK_IMPORTED_MODULE_2__.A,{titleText:t("gasLimit"),error:(null==gasErrors?void 0:gasErrors.gasLimit)?(0,_helpers_constants_gas__WEBPACK_IMPORTED_MODULE_3__.xf)(gasErrors.gasLimit,t,{minimumGasLimit:minimumGasLimit}):null,onChange:function(value){null==onManualChange||onManualChange(),setGasLimit(value)},tooltipText:t("editGasLimitTooltip"),value:gasLimit,allowDecimals:!1,numeric:!0}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_ui_form_field__WEBPACK_IMPORTED_MODULE_2__.A,{titleText:t("advancedGasPriceTitle"),titleUnit:"(GWEI)",onChange:function(value){null==onManualChange||onManualChange(),setGasPrice(value)},tooltipText:t("editGasPriceTooltip"),value:gasPrice,numeric:!0,allowDecimals:!0,error:(null==gasErrors?void 0:gasErrors.gasPrice)?(0,_helpers_constants_gas__WEBPACK_IMPORTED_MODULE_3__.xf)(gasErrors.gasPrice,t):null})))}AdvancedGasControls.propTypes={onManualChange:prop_types__WEBPACK_IMPORTED_MODULE_4___default().func,gasLimit:prop_types__WEBPACK_IMPORTED_MODULE_4___default().number,setGasLimit:prop_types__WEBPACK_IMPORTED_MODULE_4___default().func,gasPrice:prop_types__WEBPACK_IMPORTED_MODULE_4___default().string,setGasPrice:prop_types__WEBPACK_IMPORTED_MODULE_4___default().func,minimumGasLimit:prop_types__WEBPACK_IMPORTED_MODULE_4___default().string,gasErrors:prop_types__WEBPACK_IMPORTED_MODULE_4___default().object},AdvancedGasControls.__docgenInfo={description:"",methods:[],displayName:"AdvancedGasControls",props:{onManualChange:{description:"",type:{name:"func"},required:!1},gasLimit:{description:"",type:{name:"number"},required:!1},setGasLimit:{description:"",type:{name:"func"},required:!1},gasPrice:{description:"",type:{name:"string"},required:!1},setGasPrice:{description:"",type:{name:"func"},required:!1},minimumGasLimit:{description:"",type:{name:"string"},required:!1},gasErrors:{description:"",type:{name:"object"},required:!1}}}},"./ui/pages/confirmations/components/edit-gas-display/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>EditGasDisplay});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),bignumber=__webpack_require__("./node_modules/bignumber.js/bignumber.js"),bignumber_default=__webpack_require__.n(bignumber),gas=__webpack_require__("./shared/constants/gas.ts"),ui_button=__webpack_require__("./ui/components/ui/button/index.js"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),confirm_tx_util=__webpack_require__("./ui/helpers/utils/confirm-tx.util.ts"),info_tooltip=__webpack_require__("./ui/components/ui/info-tooltip/index.js"),advanced_gas_controls_component=__webpack_require__("./ui/pages/confirmations/components/advanced-gas-controls/advanced-gas-controls.component.js"),i18n=__webpack_require__("./ui/contexts/i18n.js");function EditGasDisplay(param){var warningMessage,_param_mode=param.mode,mode=void 0===_param_mode?gas.W5.modifyInPlace:_param_mode,estimatedMinimumNative=param.estimatedMinimumNative,transaction=param.transaction,gasPrice=param.gasPrice,setGasPrice=param.setGasPrice,gasLimit=param.gasLimit,setGasLimit=param.setGasLimit,properGasLimit=param.properGasLimit,dappSuggestedGasFeeAcknowledged=param.dappSuggestedGasFeeAcknowledged,setDappSuggestedGasFeeAcknowledged=param.setDappSuggestedGasFeeAcknowledged,onManualChange=param.onManualChange,minimumGasLimit=param.minimumGasLimit,balanceError=param.balanceError,gasErrors=param.gasErrors,txParamsHaveBeenCustomized=param.txParamsHaveBeenCustomized,t=(0,react.useContext)(i18n.gJ),scrollRef=(0,react.useRef)(null),dappSuggestedAndTxParamGasFeesAreTheSame=(0,confirm_tx_util.md)(transaction),requireDappAcknowledgement=!!((null==transaction?void 0:transaction.dappSuggestedGasFees)&&!dappSuggestedGasFeeAcknowledged&&dappSuggestedAndTxParamGasFeesAreTheSame);return void 0!==gasLimit&&void 0!==properGasLimit&&new(bignumber_default())(gasLimit).lessThan(new(bignumber_default())(properGasLimit))&&(warningMessage=t("gasLimitRecommended",[properGasLimit])),react.createElement("div",{className:"edit-gas-display"},react.createElement("div",{className:"edit-gas-display__content"},balanceError&&txParamsHaveBeenCustomized&&react.createElement(component_library.b8,{severity:design_system.AI.Danger,description:t("insufficientFunds"),marginBottom:6}),warningMessage&&react.createElement(component_library.b8,{severity:design_system.AI.Warning,description:warningMessage,marginBottom:6}),requireDappAcknowledgement&&react.createElement(component_library.b8,{severity:design_system.AI.Warning,className:"banner-alert--warning",description:t("gasDisplayDappWarning",[transaction.origin]),marginBottom:6}),mode===gas.W5.speedUp&&react.createElement("div",{className:"edit-gas-display__top-tooltip"},react.createElement(component_library.EY,{color:design_system.r7.textDefault,variant:design_system.J3.bodySm,as:"h6",fontWeight:design_system.IT.Bold},t("speedUpTooltipText")," ",react.createElement(info_tooltip.A,{position:"top",contentText:t("speedUpExplanation")}))),react.createElement(component_library.EY,{color:design_system.r7.textDefault,variant:design_system.J3.headingLg,as:"h1",textAlign:design_system.nO.Center},estimatedMinimumNative),requireDappAcknowledgement&&react.createElement(ui_button.A,{className:"edit-gas-display__dapp-acknowledgement-button",onClick:function(){return setDappSuggestedGasFeeAcknowledged(!0)}},t("gasDisplayAcknowledgeDappButtonText")),!requireDappAcknowledgement&&react.createElement(advanced_gas_controls_component.A,{gasLimit:gasLimit,setGasLimit:setGasLimit,gasPrice:gasPrice,setGasPrice:setGasPrice,onManualChange:onManualChange,minimumGasLimit:minimumGasLimit,gasErrors:gasErrors})),react.createElement("div",{ref:scrollRef,className:"edit-gas-display__scroll-bottom"}))}EditGasDisplay.propTypes={mode:prop_types_default().oneOf(Object.values(gas.W5)),estimatedMinimumNative:prop_types_default().string,gasPrice:prop_types_default().string,setGasPrice:prop_types_default().func,gasLimit:prop_types_default().number,setGasLimit:prop_types_default().func,properGasLimit:prop_types_default().number,dappSuggestedGasFeeAcknowledged:prop_types_default().bool,setDappSuggestedGasFeeAcknowledged:prop_types_default().func,transaction:prop_types_default().object,onManualChange:prop_types_default().func,minimumGasLimit:prop_types_default().string,balanceError:prop_types_default().bool,gasErrors:prop_types_default().object,txParamsHaveBeenCustomized:prop_types_default().bool},EditGasDisplay.__docgenInfo={description:"",methods:[],displayName:"EditGasDisplay",props:{mode:{defaultValue:{value:"EditGasModes.modifyInPlace",computed:!0},description:"",type:{name:"enum",computed:!0,value:"Object.values(EditGasModes)"},required:!1},estimatedMinimumNative:{description:"",type:{name:"string"},required:!1},gasPrice:{description:"",type:{name:"string"},required:!1},setGasPrice:{description:"",type:{name:"func"},required:!1},gasLimit:{description:"",type:{name:"number"},required:!1},setGasLimit:{description:"",type:{name:"func"},required:!1},properGasLimit:{description:"",type:{name:"number"},required:!1},dappSuggestedGasFeeAcknowledged:{description:"",type:{name:"bool"},required:!1},setDappSuggestedGasFeeAcknowledged:{description:"",type:{name:"func"},required:!1},transaction:{description:"",type:{name:"object"},required:!1},onManualChange:{description:"",type:{name:"func"},required:!1},minimumGasLimit:{description:"",type:{name:"string"},required:!1},balanceError:{description:"",type:{name:"bool"},required:!1},gasErrors:{description:"",type:{name:"object"},required:!1},txParamsHaveBeenCustomized:{description:"",type:{name:"bool"},required:!1}}}},"./ui/pages/confirmations/components/edit-gas-popover/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>EditGasPopover});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),es=__webpack_require__("./node_modules/react-redux/es/index.js"),useGasFeeInputs=__webpack_require__("./ui/pages/confirmations/hooks/useGasFeeInputs.js"),transaction_utils=__webpack_require__("./shared/modules/transaction.utils.ts"),gas=__webpack_require__("./shared/constants/gas.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),deprecated=__webpack_require__("./ui/components/component-library/modal-content/deprecated/index.ts"),modal_header_deprecated=__webpack_require__("./ui/components/component-library/modal-header/deprecated/index.ts"),edit_gas_display=__webpack_require__("./ui/pages/confirmations/components/edit-gas-display/index.js"),i18n=__webpack_require__("./ui/contexts/i18n.js"),actions=__webpack_require__("./ui/__mocks__/actions.js"),loading_heartbeat=__webpack_require__("./ui/components/ui/loading-heartbeat/index.js"),useIncrementedGasFees=__webpack_require__("./ui/pages/confirmations/hooks/useIncrementedGasFees.js"),conversion_utils=__webpack_require__("./shared/modules/conversion.utils.ts"),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 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 _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 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 _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 _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}}}function EditGasPopover(param){var _param_popoverTitle=param.popoverTitle,popoverTitle=void 0===_param_popoverTitle?"":_param_popoverTitle,_param_confirmButtonText=param.confirmButtonText,_param_editGasDisplayProps=param.editGasDisplayProps,transaction=param.transaction,mode=param.mode,onClose=param.onClose,_param_minimumGasLimit=param.minimumGasLimit,minimumGasLimit=void 0===_param_minimumGasLimit?gas.Jz.SIMPLE:_param_minimumGasLimit,t=(0,react.useContext)(i18n.gJ),dispatch=(0,es.wA)(),_useState=_sliced_to_array((0,react.useState)(!1),2),dappSuggestedGasFeeAcknowledged=_useState[0],setDappSuggestedGasFeeAcknowledged=_useState[1],minimumGasLimitDec=(0,conversion_utils.I0)(minimumGasLimit),updatedCustomGasSettings=(0,useIncrementedGasFees.M)(transaction),updatedTransaction=transaction;(mode===gas.W5.speedUp||mode===gas.W5.cancel)&&(updatedTransaction=_object_spread_props(_object_spread({},transaction),{userFeeLevel:gas.Nt,txParams:_object_spread({},transaction.txParams,updatedCustomGasSettings)}));var _useGasFeeInputs=(0,useGasFeeInputs._)(gas.et.medium,updatedTransaction,minimumGasLimit,mode),estimatedMinimumNative=_useGasFeeInputs.estimatedMinimumNative,gasPrice=_useGasFeeInputs.gasPrice,setGasPrice=_useGasFeeInputs.setGasPrice,gasLimit=_useGasFeeInputs.gasLimit,setGasLimit=_useGasFeeInputs.setGasLimit,properGasLimit=_useGasFeeInputs.properGasLimit,estimateToUse=_useGasFeeInputs.estimateToUse,hasGasErrors=_useGasFeeInputs.hasGasErrors,gasErrors=_useGasFeeInputs.gasErrors,onManualChange=_useGasFeeInputs.onManualChange,balanceError=_useGasFeeInputs.balanceError,txParamsHaveBeenCustomized=estimateToUse===gas.Nt||(0,transaction_utils.pJ)(updatedTransaction),closePopover=(0,react.useCallback)(function(){onClose?onClose():dispatch((0,actions.hideModal)())},[onClose,dispatch]),onSubmit=(0,react.useCallback)(_async_to_generator(function(){var newGasSettings,cleanTransactionParams,updatedTxMeta;return _ts_generator(this,function(_state){switch(_state.label){case 0:switch(updatedTransaction&&mode||closePopover(),newGasSettings={gas:(0,conversion_utils.Ao)(gasLimit),gasLimit:(0,conversion_utils.Ao)(gasLimit),estimateUsed:estimateToUse,gasPrice:(0,conversion_utils.Sb)(gasPrice)},cleanTransactionParams=_object_spread({},updatedTransaction.txParams),updatedTxMeta=_object_spread_props(_object_spread({},updatedTransaction),{userEditedGasLimit:gasLimit!==Number(transaction.originalGasEstimate),userFeeLevel:estimateToUse||gas.Nt,txParams:_object_spread({},cleanTransactionParams,newGasSettings)}),mode){case gas.W5.cancel:return[3,1];case gas.W5.speedUp:return[3,2];case gas.W5.modifyInPlace:return[3,3]}return[3,5];case 1:return dispatch((0,actions.createCancelTransaction)(updatedTransaction.id,newGasSettings)),[3,6];case 2:return dispatch((0,actions.createSpeedUpTransaction)(updatedTransaction.id,newGasSettings)),[3,6];case 3:return newGasSettings.userEditedGasLimit=updatedTxMeta.userEditedGasLimit,newGasSettings.userFeeLevel=updatedTxMeta.userFeeLevel,dispatch((0,actions.showLoadingIndication)()),[4,dispatch((0,actions.updateTransactionGasFees)(updatedTxMeta.id,newGasSettings))];case 4:return _state.sent(),dispatch((0,actions.hideLoadingIndication)()),[3,6];case 5:return[3,6];case 6:return closePopover(),[2]}})}),[updatedTransaction,mode,dispatch,closePopover,gasLimit,gasPrice,transaction.originalGasEstimate,estimateToUse]),title=t("editGasTitle");popoverTitle?title=popoverTitle:mode===gas.W5.speedUp?title=t("speedUpPopoverTitle"):mode===gas.W5.cancel&&(title=t("cancelPopoverTitle"));var footerButtonText=(void 0===_param_confirmButtonText?"":_param_confirmButtonText)||t("save");return react.createElement(component_library.aF,{isOpen:!0,onClose:closePopover},react.createElement(component_library.mH,null),react.createElement(deprecated.$,{autoFocus:!1,className:"edit-gas-popover"},react.createElement(modal_header_deprecated.r,{onClose:closePopover,marginBottom:4},title),react.createElement("div",{className:"edit-gas-popover__edit-gas-display"},process.env.IN_TEST?null:react.createElement(loading_heartbeat.A,null),react.createElement(edit_gas_display.A,_object_spread({dappSuggestedGasFeeAcknowledged:dappSuggestedGasFeeAcknowledged,setDappSuggestedGasFeeAcknowledged:setDappSuggestedGasFeeAcknowledged,estimatedMinimumNative:estimatedMinimumNative,gasPrice:gasPrice,setGasPrice:setGasPrice,gasLimit:gasLimit,setGasLimit:setGasLimit,properGasLimit:properGasLimit,mode:mode,transaction:updatedTransaction,onManualChange:onManualChange,minimumGasLimit:minimumGasLimitDec,balanceError:balanceError,txParamsHaveBeenCustomized:txParamsHaveBeenCustomized,gasErrors:gasErrors},void 0===_param_editGasDisplayProps?{}:_param_editGasDisplayProps))),react.createElement(component_library.$n,{block:!0,variant:component_library.Ak.Primary,size:component_library.Mp.LG,marginTop:4,onClick:onSubmit,disabled:hasGasErrors||balanceError||!txParamsHaveBeenCustomized},footerButtonText)))}EditGasPopover.propTypes={popoverTitle:prop_types_default().string,editGasDisplayProps:prop_types_default().object,confirmButtonText:prop_types_default().string,onClose:prop_types_default().func,transaction:prop_types_default().object,mode:prop_types_default().oneOf(Object.values(gas.W5)),minimumGasLimit:prop_types_default().string},EditGasPopover.__docgenInfo={description:"",methods:[],displayName:"EditGasPopover",props:{popoverTitle:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},confirmButtonText:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},editGasDisplayProps:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},minimumGasLimit:{defaultValue:{value:"addHexPrefix(MIN_GAS_LIMIT_HEX)",computed:!0},description:"",type:{name:"string"},required:!1},onClose:{description:"",type:{name:"func"},required:!1},transaction:{description:"",type:{name:"object"},required:!1},mode:{description:"",type:{name:"enum",computed:!0,value:"Object.values(EditGasModes)"},required:!1}}}},"./ui/pages/confirmations/hooks/useIncrementedGasFees.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{M:()=>useIncrementedGasFees});var bignumber_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/bignumber.js/bignumber.js"),bignumber_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(bignumber_js__WEBPACK_IMPORTED_MODULE_0__),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js"),_shared_modules_conversion_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/modules/conversion.utils.ts"),_shared_modules_transaction_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./shared/modules/transaction.utils.ts"),_helpers_utils_gas__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/helpers/utils/gas.js"),_hooks_useGasFeeEstimates__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/hooks/useGasFeeEstimates.js");function getHighestIncrementedFee(originalFee,currentEstimate){var buffedOriginalHexWei=(0,_helpers_utils_gas__WEBPACK_IMPORTED_MODULE_4__.fi)(originalFee),currentEstimateHexWei=(0,_shared_modules_conversion_utils__WEBPACK_IMPORTED_MODULE_2__.Sb)(currentEstimate);return new(bignumber_js__WEBPACK_IMPORTED_MODULE_0___default())(buffedOriginalHexWei,16).greaterThan(new(bignumber_js__WEBPACK_IMPORTED_MODULE_0___default())(currentEstimateHexWei,16))?buffedOriginalHexWei:currentEstimateHexWei}function useIncrementedGasFees(transaction){var _useGasFeeEstimates_gasFeeEstimates=(0,_hooks_useGasFeeEstimates__WEBPACK_IMPORTED_MODULE_5__.K)(transaction.networkClientId).gasFeeEstimates,gasFeeEstimates=void 0===_useGasFeeEstimates_gasFeeEstimates?{}:_useGasFeeEstimates_gasFeeEstimates;return(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function(){var temporaryGasSettings={gasLimit:null===(_transaction_txParams=transaction.txParams)||void 0===_transaction_txParams?void 0:_transaction_txParams.gas,gas:null===(_transaction_txParams1=transaction.txParams)||void 0===_transaction_txParams1?void 0:_transaction_txParams1.gas},suggestedMaxFeePerGas=null!==(_gasFeeEstimates_medium_suggestedMaxFeePerGas=null==gasFeeEstimates?void 0:null===(_gasFeeEstimates_medium=gasFeeEstimates.medium)||void 0===_gasFeeEstimates_medium?void 0:_gasFeeEstimates_medium.suggestedMaxFeePerGas)&&void 0!==_gasFeeEstimates_medium_suggestedMaxFeePerGas?_gasFeeEstimates_medium_suggestedMaxFeePerGas:"0",suggestedMaxPriorityFeePerGas=null!==(_gasFeeEstimates_medium_suggestedMaxPriorityFeePerGas=null==gasFeeEstimates?void 0:null===(_gasFeeEstimates_medium1=gasFeeEstimates.medium)||void 0===_gasFeeEstimates_medium1?void 0:_gasFeeEstimates_medium1.suggestedMaxPriorityFeePerGas)&&void 0!==_gasFeeEstimates_medium_suggestedMaxPriorityFeePerGas?_gasFeeEstimates_medium_suggestedMaxPriorityFeePerGas:"0";if((0,_shared_modules_transaction_utils__WEBPACK_IMPORTED_MODULE_3__.X8)(transaction)){var _transaction_txParams,_transaction_txParams1,_gasFeeEstimates_medium,_gasFeeEstimates_medium1,_gasFeeEstimates_medium_suggestedMaxFeePerGas,_gasFeeEstimates_medium_suggestedMaxPriorityFeePerGas,_transaction_txParams2,_transaction_txParams3,transactionMaxFeePerGas=null===(_transaction_txParams2=transaction.txParams)||void 0===_transaction_txParams2?void 0:_transaction_txParams2.maxFeePerGas,transactionMaxPriorityFeePerGas=null===(_transaction_txParams3=transaction.txParams)||void 0===_transaction_txParams3?void 0:_transaction_txParams3.maxPriorityFeePerGas;temporaryGasSettings.maxFeePerGas=void 0===transactionMaxFeePerGas||transactionMaxFeePerGas.startsWith("-")?"0x0":getHighestIncrementedFee(transactionMaxFeePerGas,suggestedMaxFeePerGas),temporaryGasSettings.maxPriorityFeePerGas=void 0===transactionMaxPriorityFeePerGas||transactionMaxPriorityFeePerGas.startsWith("-")?"0x0":getHighestIncrementedFee(transactionMaxPriorityFeePerGas,suggestedMaxPriorityFeePerGas)}else{var _transaction_txParams4,transactionGasPrice=null===(_transaction_txParams4=transaction.txParams)||void 0===_transaction_txParams4?void 0:_transaction_txParams4.gasPrice;temporaryGasSettings.gasPrice=void 0===transactionGasPrice||transactionGasPrice.startsWith("-")?"0x0":getHighestIncrementedFee(transactionGasPrice,suggestedMaxFeePerGas)}return temporaryGasSettings},[transaction,gasFeeEstimates])}},"./ui/components/component-library/modal-content/deprecated/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{$:()=>ModalContent});var react=__webpack_require__("./node_modules/react/index.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),modal_content_types=__webpack_require__("./ui/components/component-library/modal-content/modal-content.types.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}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 ModalContent=react.forwardRef(function(_param,ref){var _param_className=_param.className,children=_param.children,_param_size=_param.size,size=void 0===_param_size?modal_content_types.E.Sm:_param_size,modalDialogProps=_param.modalDialogProps,props=_object_without_properties(_param,["className","children","size","modalDialogProps"]),_useModalContext=(0,component_library.k3)(),onClose=_useModalContext.onClose,isClosedOnEscapeKey=_useModalContext.isClosedOnEscapeKey,isClosedOnOutsideClick=_useModalContext.isClosedOnOutsideClick,initialFocusRef=_useModalContext.initialFocusRef,finalFocusRef=_useModalContext.finalFocusRef,restoreFocus=_useModalContext.restoreFocus,autoFocus=_useModalContext.autoFocus,modalDialogRef=(0,react.useRef)(null),handleEscKey=function(event){isClosedOnEscapeKey&&"Escape"===event.key&&onClose()},handleClickOutside=function(event){!(isClosedOnOutsideClick&&event.target.closest(".mm-popover"))&&isClosedOnOutsideClick&&(null==modalDialogRef?void 0:modalDialogRef.current)&&!modalDialogRef.current.contains(event.target)&&onClose()};return(0,react.useEffect)(function(){return document.addEventListener("keydown",handleEscKey),document.addEventListener("mousedown",handleClickOutside),function(){document.removeEventListener("keydown",handleEscKey),document.removeEventListener("mousedown",handleClickOutside)}},[]),react.createElement(component_library.Qc,{initialFocusRef:initialFocusRef,finalFocusRef:finalFocusRef,restoreFocus:restoreFocus,autoFocus:autoFocus},react.createElement(component_library.az,_object_spread({className:classnames_default()("mm-modal-content",void 0===_param_className?"":_param_className),ref:ref,display:design_system.nl.Flex,width:design_system.Zf.Screen,height:design_system.Zf.Screen,justifyContent:design_system.A9.center,alignItems:design_system.k2.flexStart,paddingRight:4,paddingLeft:4,paddingTop:[4,8,12],paddingBottom:[4,8,12]},props),react.createElement(component_library.az,_object_spread_props(_object_spread({as:"section",role:"dialog","aria-modal":"true",backgroundColor:design_system.i0.backgroundDefault,borderRadius:design_system.Z6.LG,width:design_system.Zf.Full,padding:4,ref:modalDialogRef},modalDialogProps),{className:classnames_default()("mm-modal-content__dialog","mm-modal-content__dialog--size-".concat(size),null==modalDialogProps?void 0:modalDialogProps.className),style:_object_spread_props(_object_spread({},null==props?void 0:props.style),{overflowY:"auto"})}),children)))});try{ModalContent.displayName="ModalContent",ModalContent.__docgenInfo={description:"",displayName:"ModalContent",props:{className:{defaultValue:{value:""},description:"The additional className of the ModalContent component",name:"className",required:!1,type:{name:"string"}},children:{defaultValue:null,description:"The content of the ModalContent component",name:"children",required:!1,type:{name:"ReactNode"}},size:{defaultValue:{value:"ModalContentSize.Sm"},description:"Use the size prop and ModalContentSize enum to change the max-width of the ModalContent\n\nModalContentSize.Sm = 360px\nModalContentSize.Md = 480px\nModalContentSize.Lg = 720px",name:"size",required:!1,type:{name:"enum",value:[{value:'"sm"'},{value:'"md"'},{value:'"lg"'}]}},modalDialogProps:{defaultValue:null,description:"Additional props to pass to the dialog node inside of ModalContent component",name:"modalDialogProps",required:!1,type:{name:"any"}},flexDirection:{defaultValue:null,description:"The flex direction of the component.\nUse the FlexDirection enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"flexDirection",required:!1,type:{name:"FlexDirection | FlexDirectionArray"}},flexWrap:{defaultValue:null,description:"The flex wrap of the component.\nUse the FlexWrap enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"flexWrap",required:!1,type:{name:"FlexWrap | FlexWrapArray"}},gap:{defaultValue:null,description:"The gap between the component's children.\nUse 1-12 for a gap of 4px-48px.\nAccepts responsive props in the form of an array.",name:"gap",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},margin:{defaultValue:null,description:"The margin of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"margin",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginTop:{defaultValue:null,description:"The margin-top of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginTop",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginBottom:{defaultValue:null,description:"The margin-bottom of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginBottom",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginRight:{defaultValue:null,description:"The margin-right of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginRight",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginLeft:{defaultValue:null,description:"The margin-left of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginLeft",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginInline:{defaultValue:null,description:"The margin-inline of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginInline",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginInlineStart:{defaultValue:null,description:"The margin-inline-start of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginInlineStart",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginInlineEnd:{defaultValue:null,description:"The margin-inline-end of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginInlineEnd",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},padding:{defaultValue:null,description:"The padding of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"padding",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingTop:{defaultValue:null,description:"The padding-top of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingTop",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingBottom:{defaultValue:null,description:"The padding-bottom of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingBottom",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingRight:{defaultValue:null,description:"The padding-right of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingRight",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingLeft:{defaultValue:null,description:"The padding-left of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingLeft",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingInline:{defaultValue:null,description:"The padding-inline of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingInline",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingInlineStart:{defaultValue:null,description:"The padding-inline-start of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingInlineStart",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingInlineEnd:{defaultValue:null,description:"The padding-inline-end of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingInlineEnd",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},borderColor:{defaultValue:null,description:"The border-color of the component.\nUse BorderColor enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"borderColor",required:!1,type:{name:"BorderColor | BorderColorArray"}},borderWidth:{defaultValue:null,description:"The border-width of the component.\nUse 1-12 for 1px-12px.\nAccepts responsive props in the form of an array.",name:"borderWidth",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},borderRadius:{defaultValue:null,description:"The border-radius of the component.\nUse BorderRadius enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"borderRadius",required:!1,type:{name:"BorderRadius | BorderRadiusArray"}},borderStyle:{defaultValue:null,description:"The border-style of the component.\nUse BorderStyle enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"borderStyle",required:!1,type:{name:"BorderStyle | BorderStyleArray"}},alignItems:{defaultValue:null,description:"The align-items of the component.\nUse AlignItems enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"alignItems",required:!1,type:{name:"AlignItems | AlignItemsArray"}},justifyContent:{defaultValue:null,description:"The justify-content of the component.\nUse JustifyContent enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"justifyContent",required:!1,type:{name:"JustifyContent | JustifyContentArray"}},textAlign:{defaultValue:null,description:"The text-align of the component.\nUse TextAlign enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"textAlign",required:!1,type:{name:"TextAlign | TextAlignArray"}},display:{defaultValue:null,description:"The display of the component.\nUse Display enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"display",required:!1,type:{name:"Display | DisplayArray"}},width:{defaultValue:null,description:"The width of the component.\nUse BlockSize enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"width",required:!1,type:{name:"BlockSize | BlockSizeArray"}},minWidth:{defaultValue:null,description:"The min-width of the component.\nUse BlockSize enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"minWidth",required:!1,type:{name:"BlockSize | BlockSizeArray"}},height:{defaultValue:null,description:"The height of the component.\nUse BlockSize enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"height",required:!1,type:{name:"BlockSize | BlockSizeArray"}},backgroundColor:{defaultValue:null,description:"The background-color of the component.\nUse BackgroundColor enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"backgroundColor",required:!1,type:{name:"BackgroundColor | BackgroundColorArray"}},color:{defaultValue:null,description:"The text-color of the component.\nUse TextColor enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"color",required:!1,type:{name:"TextColor | IconColor | TextColorArray | IconColorArray"}},"data-testid":{defaultValue:null,description:"An optional data-testid to apply to the component.\nTypeScript is complaining about data- attributes which means we need to explicitly define this as a prop.\nTODO: Allow data- attributes.",name:"data-testid",required:!1,type:{name:"string"}},as:{defaultValue:null,description:"An override of the default HTML tag.\nCan also be a React component.",name:"as",required:!1,type:{name:"ElementType<any>"}},ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/component-library/modal-content/deprecated/modal-content.tsx#ModalContent"]={docgenInfo:ModalContent.__docgenInfo,name:"ModalContent",path:"ui/components/component-library/modal-content/deprecated/modal-content.tsx#ModalContent"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/component-library/modal-header/deprecated/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{r:()=>ModalHeader});var react=__webpack_require__("./node_modules/react/index.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),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");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 ModalHeader=function(_param){var children=_param.children,_param_className=_param.className,startAccessory=_param.startAccessory,endAccessory=_param.endAccessory,onClose=_param.onClose,closeButtonProps=_param.closeButtonProps,onBack=_param.onBack,backButtonProps=_param.backButtonProps,props=_object_without_properties(_param,["children","className","startAccessory","endAccessory","onClose","closeButtonProps","onBack","backButtonProps"]),t=(0,useI18nContext.P)();return react.createElement(component_library.H1,_object_spread({className:classnames_default()("mm-modal-header",void 0===_param_className?"":_param_className),startAccessory:startAccessory||onBack&&react.createElement(component_library.a2,_object_spread({iconName:component_library.$M.ArrowLeft,ariaLabel:t("back"),size:component_library.f3.Sm,onClick:onBack},backButtonProps)),endAccessory:endAccessory||onClose&&react.createElement(component_library.a2,_object_spread({iconName:component_library.$M.Close,ariaLabel:t("close"),size:component_library.f3.Sm,onClick:onClose},closeButtonProps))},props),"string"==typeof children?react.createElement(component_library.EY,{as:"header",variant:design_system.J3.headingSm,textAlign:design_system.nO.Center},children):children)};try{ModalHeader.displayName="ModalHeader",ModalHeader.__docgenInfo={description:"",displayName:"ModalHeader",props:{children:{defaultValue:null,description:"The contents within the ModalHeader positioned middle (popular for title use case)",name:"children",required:!1,type:{name:"ReactNode"}},className:{defaultValue:{value:""},description:"Additional classNames to be added to the ModalHeader component",name:"className",required:!1,type:{name:"string"}},onBack:{defaultValue:null,description:"The onClick handler for the back `ButtonIcon`\nWhen passed this will allow for the back `ButtonIcon` to show",name:"onBack",required:!1,type:{name:"(() => void)"}},backButtonProps:{defaultValue:null,description:"The props to pass to the back `ButtonIcon`",name:"backButtonProps",required:!1,type:{name:'ButtonIconProps<"button">'}},startAccessory:{defaultValue:null,description:"The start (left) content area of ModalHeader\nDefault to have the back `ButtonIcon` when `onBack` is passed, but passing a `startAccessory` will override this",name:"startAccessory",required:!1,type:{name:"ReactNode"}},onClose:{defaultValue:null,description:"The onClick handler for the close `ButtonIcon`\nWhen passed this will allow for the close `ButtonIcon` to show",name:"onClose",required:!1,type:{name:"(() => void)"}},closeButtonProps:{defaultValue:null,description:"The props to pass to the close `ButtonIcon`",name:"closeButtonProps",required:!1,type:{name:'MakePropsOptional<ButtonIconProps<"button">>'}},endAccessory:{defaultValue:null,description:"The end (right) content area of ModalHeader\nDefault to have the close `ButtonIcon` when `onClose` is passed, but passing a `endAccessory` will override this",name:"endAccessory",required:!1,type:{name:"ReactNode"}},childrenWrapperProps:{defaultValue:null,description:"Use the `childrenWrapperProps` prop to define the props to the children wrapper",name:"childrenWrapperProps",required:!1,type:{name:'BoxProps<"div">'}},startAccessoryWrapperProps:{defaultValue:null,description:"Use the `startAccessoryWrapperProps` prop to define the props to the start accessory wrapper",name:"startAccessoryWrapperProps",required:!1,type:{name:'BoxProps<"div">'}},endAccessoryWrapperProps:{defaultValue:null,description:"Use the `endAccessoryWrapperProps` prop to define the props to the end accessory wrapper",name:"endAccessoryWrapperProps",required:!1,type:{name:'BoxProps<"div">'}},flexDirection:{defaultValue:null,description:"The flex direction of the component.\nUse the FlexDirection enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"flexDirection",required:!1,type:{name:"FlexDirection | FlexDirectionArray"}},flexWrap:{defaultValue:null,description:"The flex wrap of the component.\nUse the FlexWrap enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"flexWrap",required:!1,type:{name:"FlexWrap | FlexWrapArray"}},gap:{defaultValue:null,description:"The gap between the component's children.\nUse 1-12 for a gap of 4px-48px.\nAccepts responsive props in the form of an array.",name:"gap",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},margin:{defaultValue:null,description:"The margin of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"margin",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginTop:{defaultValue:null,description:"The margin-top of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginTop",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginBottom:{defaultValue:null,description:"The margin-bottom of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginBottom",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginRight:{defaultValue:null,description:"The margin-right of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginRight",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginLeft:{defaultValue:null,description:"The margin-left of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginLeft",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginInline:{defaultValue:null,description:"The margin-inline of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginInline",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginInlineStart:{defaultValue:null,description:"The margin-inline-start of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginInlineStart",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginInlineEnd:{defaultValue:null,description:"The margin-inline-end of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginInlineEnd",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},padding:{defaultValue:null,description:"The padding of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"padding",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingTop:{defaultValue:null,description:"The padding-top of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingTop",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingBottom:{defaultValue:null,description:"The padding-bottom of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingBottom",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingRight:{defaultValue:null,description:"The padding-right of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingRight",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingLeft:{defaultValue:null,description:"The padding-left of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingLeft",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingInline:{defaultValue:null,description:"The padding-inline of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingInline",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingInlineStart:{defaultValue:null,description:"The padding-inline-start of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingInlineStart",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingInlineEnd:{defaultValue:null,description:"The padding-inline-end of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingInlineEnd",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},borderColor:{defaultValue:null,description:"The border-color of the component.\nUse BorderColor enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"borderColor",required:!1,type:{name:"BorderColor | BorderColorArray"}},borderWidth:{defaultValue:null,description:"The border-width of the component.\nUse 1-12 for 1px-12px.\nAccepts responsive props in the form of an array.",name:"borderWidth",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},borderRadius:{defaultValue:null,description:"The border-radius of the component.\nUse BorderRadius enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"borderRadius",required:!1,type:{name:"BorderRadius | BorderRadiusArray"}},borderStyle:{defaultValue:null,description:"The border-style of the component.\nUse BorderStyle enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"borderStyle",required:!1,type:{name:"BorderStyle | BorderStyleArray"}},alignItems:{defaultValue:null,description:"The align-items of the component.\nUse AlignItems enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"alignItems",required:!1,type:{name:"AlignItems | AlignItemsArray"}},justifyContent:{defaultValue:null,description:"The justify-content of the component.\nUse JustifyContent enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"justifyContent",required:!1,type:{name:"JustifyContent | JustifyContentArray"}},textAlign:{defaultValue:null,description:"The text-align of the component.\nUse TextAlign enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"textAlign",required:!1,type:{name:"TextAlign | TextAlignArray"}},display:{defaultValue:null,description:"The display of the component.\nUse Display enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"display",required:!1,type:{name:"Display | DisplayArray"}},width:{defaultValue:null,description:"The width of the component.\nUse BlockSize enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"width",required:!1,type:{name:"BlockSize | BlockSizeArray"}},minWidth:{defaultValue:null,description:"The min-width of the component.\nUse BlockSize enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"minWidth",required:!1,type:{name:"BlockSize | BlockSizeArray"}},height:{defaultValue:null,description:"The height of the component.\nUse BlockSize enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"height",required:!1,type:{name:"BlockSize | BlockSizeArray"}},backgroundColor:{defaultValue:null,description:"The background-color of the component.\nUse BackgroundColor enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"backgroundColor",required:!1,type:{name:"BackgroundColor | BackgroundColorArray"}},color:{defaultValue:null,description:"The text-color of the component.\nUse TextColor enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"color",required:!1,type:{name:"TextColor | IconColor | TextColorArray | IconColorArray"}},"data-testid":{defaultValue:null,description:"An optional data-testid to apply to the component.\nTypeScript is complaining about data- attributes which means we need to explicitly define this as a prop.\nTODO: Allow data- attributes.",name:"data-testid",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/component-library/modal-header/deprecated/modal-header.tsx#ModalHeader"]={docgenInfo:ModalHeader.__docgenInfo,name:"ModalHeader",path:"ui/components/component-library/modal-header/deprecated/modal-header.tsx#ModalHeader"})}catch(__react_docgen_typescript_loader_error){}}}]);