1import{aK as d,r as f,hq as h,j as o,dA as g,cV as b,B as I,bd as y}from"./redirect-69d1a63e.js";import{e7 as l,w as s,ay as x,s as a,bS as w,cT as A,e8 as C}from"./render_utils-f2da862e.js";import{f as M}from"./flow_handler-d4b77495.js";import{C as _}from"./flow_center_card-21399815.js";import{C as P}from"./common_validators-b472ad66.js";import{M as p,a as E}from"./pretax_income-fb732b73.js";import{E as R}from"./dynamic_link-0a7bf0d5.js";import"./_sentry-release-injection-file-06efb426.js";import{I as T}from"./info_modal-8ddc1132.js";import{i as S}from"./use_is_beginner_delegator_cohort-0c31da8b.js";import{F as O}from"./flow_form_container-902abd62.js";import"./wf_flow_handler-f8751925.js";import"./questionnaire_tracker-01f71669.js";import"./centered_spinner-dabfcdee.js";import"./router-c2cc067b.js";import"./flow_card_header-a42973b3.js";import"./flex_col-30f1fbcc.js";import"./router-7b3ba8f9.js";import"./bing_tracking-4b938951.js";import"./router-ef54cd0d.js";import"./autopilot_actions-13121683.js";import"./router-5ea17a1c.js";import"./router_root-a3df4259.js";import"./router_root_builder-c16587bc.js";import"./global_wrapper-f6fd36f5.js";import"./funding_http_client-6eb9e4e8.js";import"./fullscreen_overlay-f0338553.js";import"./get_path_params-22adc9af.js";import"./guest-voyager-navigate-de2619d9.js";import"./page_footer-7fe5a2b7.js";import"./CSSTransition-3ffb67cf.js";import"./PortalCompat-a62179c4.js";import"./clickable_container-5418b9bb.js";import"./error_announcement-b8376cf7.js";import"./index-fa35cefb.js";import"./image-dde371c0.js";import"./index-dcd69b77.js";import"./badge-89feb9c4.js";import"./router-3cafe7c1.js";import"./loans_tracker-e5215c29.js";import"./router-2d563daa.js";import"./router-c8b5a357.js";import"./router-b6050b40.js";import"./router-45622950.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1c64b5f3-bc39-4444-92b5-2ff2c8210610",e._sentryDebugIdIdentifier="sentry-dbid-1c64b5f3-bc39-4444-92b5-2ff2c8210610")}catch{}{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:sentry-wealthfront-sfe":!0})}const u=C.ACCOUNT_OWNER,m="income";class F extends f.Component{constructor(t){super(t),this.handleIncomeChange=(n,r)=>{this.props.onSetIncome(parseInt(r,10))},this.handleSubmit=async n=>{if(n.preventDefault(),!this.isValid())return;this.setState({isSubmitting:!0});const{accountRequestId:r,accountRequest:i}=this.props;await this.props.addAccountOwnerPerson(r),l.trackSubmitEvent(u,m,{accountRequestId:r}),s.trackEvent("link-click",{page_category:"signup-funnel",page_name:"mifu-ls-pretax-income",target_element:"legal-steps",click_type:"next",signup_flow_sub_step:"ls-pretax-income",...s.getPropertiesFromAccountRequest(i)}),M.goToNextStep()},this.handleIncomeModalClick=()=>{this.setState({isIncomeModalOpen:!0}),x.trackImpressionEvent("person-info-income-tooltip","person-info-income-tooltip")},this.isValid=()=>{const{isSubmitting:n}=this.state,{pretaxAnnualIncome:r}=this.props.accountOwnerPersonFields,i=P.nonNegativeNumber(r).isValid&&Number(r)<=p;return!n&&i},this.getIsProspectBeginnerDelegator=()=>S(this.props.validationResult,h.PROSPECT),this.getHeadline=()=>this.getIsProspectBeginnerDelegator()?"Whatâs your annual household income before taxes?":"Whatâs your pre-tax income?",this.getSubHeadline=()=>this.getIsProspectBeginnerDelegator()?"This doesnât have to be exact.":"This helps us understand your financial picture. An estimate is fine.",this.getIncomeError=()=>{const{pretaxAnnualIncome:n}=this.props.accountOwnerPersonFields;return n&&Number(n)>p?E:null},this.state={isSubmitting:!1,isIncomeModalOpen:!1}}componentDidMount(){const{accountRequestId:t,accountRequest:n}=this.props;l.trackImpressionEvent(u,m,{accountRequestId:t}),s.trackPage("signup-funnel","mifu-ls-pretax-income",{...s.getPropertiesFromAccountRequest(n)})}render(){const{isSubmitting:t}=this.state,{pretaxAnnualIncome:n}=this.props.accountOwnerPersonFields,r=this.getIncomeError(),i=this.getIsProspectBeginnerDelegator();return o.jsxs(_,{ref:c=>{this.refCenterCard=c},headline:this.getHeadline(),subHeadline:this.getSubHeadline(),children:[o.jsx(g,{title:"Pretax Income Question - Legal Stuff - Wealthfront"}),o.jsx(O,{children:o.jsxs("form",{ref:c=>{this.refForm=c},className:"flows-flex-container",onSubmit:this.handleSubmit,children:[o.jsx("div",{className:"flows-flex-flexible",children:o.jsx(b.Dollar,{autoFocus:!0,label:"Annual income before taxes",testId:"e2e-income-input",value:n,onChange:this.handleIncomeChange,disabled:t,invali
1d:!!r,helperContent:!i&&o.jsx(I,{as:"button",variant:"subtle-small",onClick:this.handleIncomeModalClick,children:"Why do you need my income?"})})}),o.jsx(R,{as:"button",variant:"primary",type:"submit",disabled:!this.isValid(),loading:t,testId:"next",children:"Next"})]})}),!i&&o.jsx(T,{ariaLabel:"Why do you need my income?",headingText:"Why do you need my income?",isOpen:this.state.isIncomeModalOpen,handleModalDismiss:()=>this.setState({isIncomeModalOpen:!1}),children:o.jsx(y,{children:"To understand your financial picture, your pre-tax income helps account for financial growth, taxes, and even social security."})})]})}}function k(e){const t=a.applicationFlow.getAccountRequestId(e);return{accountRequestId:t,accountOwnerPersonFields:a.applicationFlow.getAccountOwnerPersonFields(e),accountRequest:a.accountRequests.getAccountRequest(e,t),validationResult:a.applicationFlow.getValidationResult(e)}}function N(e){return{onSetIncome:t=>e(w.updateAccountOwnerPersonFields("pretaxAnnualIncome",t)),addAccountOwnerPerson:t=>e(A.addAccountOwnerPerson(t,"pretax-income"))}}const _e=d(k,N)(F);export{_e as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.