1import{aS as v,eJ as R,r as P,j as e,d9 as B,c4 as m,c5 as N,B as F}from"./redirect-95747236.js";import"./_sentry-release-injection-file-3f4e48d2.js";import{s as n}from"./dynamic_import-2e51ff91.js";import{b as c}from"./autopilot_actions-37eeb449.js";import{u as H,A as G}from"./use-autopilot-validation-a38829c9.js";import{F as f}from"./flow_handler-cea251c4.js";import{t as L}from"./tracker-097e918b.js";import{l as V,h as W}from"./helpers-d19a15d0.js";import"./loading-8c1cb0b6.js";import"./account_icon_accessory-03d86178.js";import"./create_category_dialog-9e159f96.js";import"./category_editor-68a7643e.js";import"./bleed-1c6cf5a3.js";import"./image-5d35b47f.js";import"./flex-cd29129f.js";import"./toggle_switch-fbf28aea.js";import"./date_constants-64ddb421.js";import"./helpers-f2fe6bb3.js";import"./index-6081c66d.js";import"./wealthfront_accounts_actions-593e0302.js";import"./rails_client-70421323.js";import"./http_client-be792547.js";import"./errors-42ecb38f.js";import"./wealthfront_accounts_http_client-6b602a86.js";import"./navigation-763ae5c9.js";import"./constants-47e033c3.js";import"./loading_overlay-e13c79dd.js";import"./slider_input-7f8b81c6.js";import"./slider-690a2312.js";import"./contained_tooltip-23b685ed.js";import"./tooltip-47aea466.js";import"./static_field_input-26ac508e.js";import"./date_input-8578dd59.js";import"./formatted_input-928977b2.js";import"./dollar_input-9944a6b7.js";import"./status_announcement-b1af6b35.js";import"./error_announcement-b8910537.js";import"./autopilot_account_icon-a720ba26.js";import"./date_formatter-5891a962.js";import"./verify_account_message-4bf7fc0b.js";import"./tooltip_trigger-3f185ac8.js";import"./verify_source-c62e8d21.js";import"./date_picker-e130734b.js";import"./select_menu-f9a137db.js";import"./wf_flow_handler-e6d2ae64.js";import"./wf_app_router-b5174f1d.js";import"./___vite-browser-external_commonjs-proxy-a20f1868.js";import"./autopilot_setup_flow-cc9527a3.js";import"./index-9c62a712.js";import"./component_stub-7302b9e1.js";import"./dom_search-8a74da58.js";import"./global_wrapper-0db86085.js";import"./router_root_builder-39a4d445.js";import"./announcements-ff61cc20.js";import"./index-e9249ee8.js";import"./react_lazy_retry-0186b7b8.js";import"./plan-eddbce22.js";import"./external_accounts_actions-749370e7.js";import"./requirement_helpers-31123303.js";import"./linkedin_pixel_tracking-9d535a5c.js";import"./index-f8ca169a.js";import"./users_actions-86d2a2f1.js";import"./growth_tracker-d39f2a4d.js";import"./voyager-navigate-ce5f38f6.js";import"./use_stock_investing_eligibility-d4255701.js";import"./stock_investing_experiment_helper-c93a964a.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="2f93389d-2570-4e95-a91b-bfd6f814d1eb",t._sentryDebugIdIdentifier="sentry-dbid-2f93389d-2570-4e95-a91b-bfd6f814d1eb")}catch{}{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t._sentryModuleMetadata=t._sentryModuleMetadata||{},t._sentryModuleMetadata[new t.Error().stack]=Object.assign({},t._sentryModuleMetadata[new t.Error().stack],{"_sentryBundlerPluginAppKey:sentry-wealthfront-sfe":!0})}function C({setupDestinationAccountRules:t,updateSetupDestinationAccountRules:o,settings:r,fetchSettings:g,internalSourceAccounts:S,sourceAccountExternalIdWithGreenDotEnabled:h,preSelectedSourceAccountExternalId:b,updateSourceAccountId:y}){const u="autopilot-plan-setup",A=R(),x={...V(r),componentInstanceId:A},a=W()?b:h;P.useEffect(()=>{L.trackImpressionEvent(u,"view",x)},[]);let l=null;if(a){const i=S.find(p=>p.sourceAccountExternalId===a);if(i){const{sourceAccountExternalId:p,accountName:j,institution:T,institutionLogoIdentifier:k,institutionDisplayName:M}=i;l={type:"conditional",accountId:p,minRemainingBalance:null,accountName:j,institution:T,institutionLogoIdentifier:k,institutionDisplayName:M}}}const{pendingSourceRule:d,pendingDestinationRules:s,setPendingDataAndValidate:I,isValidating:E}=H(r,l,t);function w(i){o(i),I(d,i)}function D(){o(s),f.goToNextStep()}function _(){y(a),o(s),f.goToNextStep({alreadyHasSource:!0})}return e.jsxs(e.Fragment,{children:[e.jsx(B,{title:"Automated savings plan"}),e.jsxs(m,{spacing:"large",children:[e.jsx("div",{className:"flows-content-min-height",children:e.jsxs(m,{spacing:"large",children:[e.jsx(N,{variant:"large-sans",as:"h1",children:"Build your automated savings plan"}),e.jsx(G,{settings:r,sourceAccountRule:d,destinationAccountRules:s,handleUpdateDestinations:w,isValidating:E,fetchSettings:g,handleSourceSelectSource:D,handleSourceSetTargetBalance:_,hideEditSourceLink:!0,trackingName:u})]})}),e.jsx(F,{as:"button",variant:"primary",disabled:!0,children:"Turn on automated savings"})]})]})}function J(t){return{settings:n.autopilot.getSettings(t),setupDestinationAccountRules:n.autopilot.getSetupDestinationAccountRules(t),internalSourceAccounts:n.autopilot.getSettings(t).internalSourceAccounts,sourceAccountExternalIdWithGreenDotEnabled:n.autopilot.getSettings(t).sourceAccountExternalIdWithGreenDotEnabled,preSelectedSourceAccountExternalId:n.autopilot.getSettings(t).preSelectedSourceAccountExternalId}}const K={updateSetupDestinationAccountRules:c.updateSetupDestinationAccountRules,fetchSettings:c.fetchSettings,updateSourceAccountId:c.updateSourceAccountId},ie=v(J,K)(C);export{ie 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.