1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[679],{7409:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(56455),r=n(43644),l=n(93832);let a={hiddenFieldsContainer:{marginBottom:24,"&:last-of-type":{marginBottom:0}},header:{display:"flex"},title:(e,t,n)=>{let{fontScales:i}=e;return{...i.default,display:"flex",justifyContent:"space-between",alignItems:"center",flexGrow:+!t,marginBottom:t?8:16,fontWeight:n?700:400}},description:e=>{let{colors:t,fontScales:n}=e;return{...n.small,color:t.grey1,marginBottom:16}},tag:{marginBottom:16,marginLeft:8},icon:e=>{let{colors:t}=e;return{color:t.brand.secondary,width:24,height:24,marginRight:8}}},o={default:{container:()=>({marginBottom:24,"&:last-of-type":{marginBottom:0},"& + &":{marginTop:-16}})},bordered:{container:e=>{let{colors:t}=e;return{border:"1px solid ".concat(t.grey3),borderRadius:4,marginBottom:24,padding:16,background:"white"}}}},d=e=>{let{title:t,description:n,tag:d,children:s,action:u,icon:c,theme:p="default",isTitleBold:h=!1,containsOnlyHiddenFields:m}=e;return(0,i.FD)("fieldset",{css:e=>{var t;return[null==o||null==(t=o[p])?void 0:t.container(e),m&&a.hiddenFieldsContainer]},children:[!m&&!!t&&(0,i.FD)("div",{css:a.header,children:[c&&!m&&(0,i.Y)("div",{css:a.icon,children:(0,i.Y)(r.A,{name:c})}),t&&!m?(0,i.FD)("div",{css:e=>a.title(e,!!d,h),children:[t," ",u||null]}):null,d&&!m?(0,i.Y)("div",{css:a.tag,children:(0,i.Y)(l.A,{theme:"info",children:d})}):null]}),n&&!m?(0,i.FD)("div",{css:e=>a.description(e),children:[n," ",u||null]}):null,s]})}},16574:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(56455);let r={container:{flex:"1 0 0%",width:"100%",maxWidth:"100%",paddingLeft:8,paddingRight:8}},l=e=>{let{children:t,cols:n}=e;return(0,i.Y)("div",{css:[r.container,n&&{width:"".concat(n/12*100,"%")}],children:t})}},18540:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(56455);let r={container:{display:"flex",marginLeft:-8,marginRight:-8}},l=e=>{let{children:t}=e;return(0,i.Y)("div",{css:r.container,children:t})}},21490:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(97711);let r=e=>{let{config:t,entityType:n,scopes:r=[],coreSyncedFields:l=[],overrideRequirements:a,includeAllScopedOptions:o}=e;return(0,i.cw)({fields:t.fields,entityType:"organization"===n?"business":n,scopes:r,experience:"selfServe",coreSyncedFields:l,systemRequiredFields:a,includeAllScopedOptions:o})}},23840:(e,t,n)=>{n.d(t,{V:()=>i,e:()=>r});let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{behavior:"smooth"},n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,r="string"==typeof e?document.getElementById(e):e;if(r){let e=i===window?r.getBoundingClientRect().top+window.pageYOffset:r.offsetTop;i.scrollTo({top:e-(n||90),...t})}},r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollTo({top:0,left:0,behavior:"smooth"})}},24499:(e,t,n)=>{n.d(t,{c:()=>r});var i=n(62413);let r=e=>{switch(e){case"expectingOtp":return i.Ec;case"expectingTin":return i.o9;case"expectingDoB":return i.c4;case"expectingAccountNumber":return i.Wu;case"expectingPrefillSuccessToken":return i.Wc;case"locked":return i.dZ;case"minorPermissionDenied":return i.TU;default:throw Error("Expected a valid authentication flow step")}}},27168:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(53239),r=n(23840),l=n(88793);let a=e=>{let{isValid:t,submitCount:n,container:a,message:o="Please fix missing or invalid fields.",hasScrollToError:d=!0,triggerSnackbarMessage:s=!0,scrollToTopOnShow:u=!1,onFormValidationShow:c,isSubmitSuccessful:p}=e,[h,m]=(0,i.useState)(null),{triggerMessage:f,dismissMessage:v,messages:g,getTopOffset:y}=(0,l.d)(),b=()=>{let e=a||document,t=a||window,n=null==e?void 0:e.querySelector("[data-fieldstate='error']");if(!n)return;let i=s?y()+20:20;(0,r.V)(n,void 0,i,t);let l=n.querySelector("input")||n.querySelector("textarea");null==l||l.focus({preventScroll:!0})},C=!p&&!t&&!!n,A=()=>{h&&g.find(e=>e.id===h.id)&&h&&(v(h),m(null))};return(0,i.useEffect)(()=>{t&&h&&A()},[t]),(0,i.useEffect)(()=>{C&&(null==c||c(),u&&(0,r.e)(a),s&&(A(),m(f(o,{theme:"error",action:d?{text:"Go to first error",onClick:b,autoFocus:!0}:void 0}))))},[n]),{showValidationMessage:!t&&!!n,currentValidationMessage:h,message:o,scrollToError:b}}},27615:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(56455),r=n(11172),l=n(40644),a=n(43192),o=n(91353),d=n(49514),s=n(78923);let u={container:e=>({display:"flex",alignItems:"center",flexDirection:"column",...e?{height:"calc(100vh - ".concat(a.FDIC_HEIGHT_MOBILE,"px - 72px)"),justifyContent:"center"}
1:{height:"calc(100vh - 72px)",justifyContent:"center"}})},c=e=>{let{heading:t,subheading:n}=e,{isWrappedByAlkami:a}=(0,d.Pk)(),{clientDetails:{clientType:c}}=(0,o.t)();return(0,i.FD)(s.A,{theme:"centered",children:[(t||n)&&(0,i.Y)(r.A,{heading:t||"",subheading:n,isCentered:!0}),(0,i.Y)("div",{css:u.container("bank"===c&&!a),children:(0,i.Y)(l.A,{"data-testid":"loadingSpinner",size:"extraLarge"})})]})}},30513:(e,t,n)=>{n.d(t,{A:()=>o,w:()=>a});var i=n(56455),r=n(53239);let l=(0,r.createContext)(void 0),a=()=>{let e=(0,r.useContext)(l);if(!e)throw Error("useVinLookupContext must be used within a VinLookupProvider");return e},o=e=>{let{children:t,decodeVIN:n}=e;return(0,i.Y)(l.Provider,{value:{decodeVIN:n},children:t})}},34999:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(85813),r=n(30029),l=n(31391),a=n.n(l),o=n(53239),d=n(91353),s=n(7171),u=n(21490);let c=e=>{let{entityType:t,namePrefix:n,...l}=e,c=(0,d.t)(),p="fields"in l?l.fields:(0,u.A)({config:c,entityType:t,scopes:l.scopes||[],overrideRequirements:l.overrideRequirements,coreSyncedFields:l.coreSyncedFields||[],includeAllScopedOptions:l.includeAllScopedOptions}),h=(0,o.useCallback)(e=>(0,i.k)(p[e]),[p]),m=(0,o.useCallback)(e=>(0,s.hv)(p[e]),[p]),f=(0,o.useCallback)(e=>(0,s.fY)(p[e]),[p]),v=(0,o.useCallback)(e=>e.some(h),[p,h]),g=(0,o.useCallback)(e=>(0,s.Or)(p[e]),[p,h]),y=(0,o.useCallback)(e=>!!e.some(e=>!f(e)&&h(e))||e.some(g),[p,f,h,g]),b=(0,o.useCallback)(e=>n?"".concat(n,".").concat(e):e,[n]),C=(0,o.useCallback)(function(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=(0,r.E)({fields:e,fieldConfigs:p,fieldValues:t||{},includeUntriggeredFields:n,includeDisabledFields:i});return a()(t,l)},[p]);return{containsOnlyHiddenFields:y,fields:p,entityType:t,getFieldIsEnabled:h,getFieldIsLocked:m,hasAnyEnabledFields:v,getFieldName:b,pickExpandedFields:C}}},35255:(e,t,n)=>{n.d(t,{A:()=>S});var i=n(56455),r=n(9959),l=n(4650),a=n(37841),o=n(31804);function d(e){return void 0!==e.streetLine}let s=async e=>{let{search:t,city:n,state:i,country:r,internationalAddressId:l,selectedSuggestion:a}=e;if(!r)return[];try{var o;let e=await fetch("/address/searchAddress",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({search:t,city:n||void 0,state:i||void 0,country:r,internationalAddressId:l,selectedSuggestion:a})});if(!e.ok)return[];let d=await e.json();return null!=(o=null==d?void 0:d.dropdownOptions)?o:[]}catch(e){return[]}},u=async e=>{var t;let{addressId:n,country:i}=e,r=await fetch("/address/detailedInternationalAddressLookup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({addressId:n,country:i})}),l=await r.json();return null!=(t=null==l?void 0:l.address)?t:{}},c=async e=>{var t;let{street:n,zipCode:i}=e,r=await fetch("/address/nineDigitZipCodeLookup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({street:n,zipCode:i})}),l=await r.json();return null!=(t=null==l?void 0:l.zipCode)?t:i};var p=n(1151),h=n(53239),m=n(22026),f=n(91909),v=n(56145),g=n(99086),y=n(91353),b=n(53541),C=n(16574),A=n(18540);let x=e=>{let{error:t,isFieldGroup:n,children:r}=e;return n?(0,i.Y)(v.A,{errorMessage:t,children:r}):(0,i.Y)(i.FK,{children:r})},Y=a.O.map(e=>({value:e[2],label:e[3]})),F=Y.filter(e=>e.value!==o.Iv),I=["line1","line2","city","state","zip"],T=e=>{let{addressTypePrefix:t="addressPrimary",isFieldGroup:n=!1,isDisabled:r=!1,namePrefix:a="address",field:v=null,getFieldIsLocked:T=null,shouldUsePrimaryAddress:S=!1}=e,w=(()=>{let e=async e=>{let{search:t,city:n,state:i,country:r,internationalAddressId:l,selectedSuggestion:a}=e;return(await s({search:t,city:n,state:i,country:r,internationalAddressId:l,selectedSuggestion:a})).map(e=>({...e,hasFurtherOptions:e.suggestion.entries>1}))},t=async(t,n)=>d(t.suggestion)?await e({search:t.suggestion.streetLine,selectedSuggestion:t.suggestion,country:"US"}):await e({search:t.suggestion.addressText,internationalAddressId:t.suggestion.addressId,country:n});return{queryAddress:e,nineDigitZipCodeLookup:c,queryFurtherOptions:t}})(),B=(0,y.t)().mantlFeatures.accountOpening.verifyAddressAfterAutoComplete.enabled,{setValue:k,clearErrors:O}=(0,m.xW)(),E=!!T&&T(t),L=e=>"".concat(t).concat((0,f.n)(e)),D=e=>"".concat(a,".").concat(L(e)),R={line1:(0,m.FH)({name:D("line1")}),line2:(0,m.FH)({name:D("line2")}),city:(0,m.FH)({name:D("city")}),state:(0,m.FH)({name:D("state")}),zip:(0,m.FH)({name:D("zip")}),country:(0,m.FH)({name:D("country")})},N=(0,o.ue)(v),P=(0,o.vo)(N),V=(0,o.NE)(N),{isForeign:z}=(0,o.Z0)(N,R.country),{primaryPersonAddress:M=null}=(0,l.d)(),H=(0,h.useRef)(S),q=(0,h.useRef)(!1);(0,h.useEffect)(()=>{let e=S&&!H.current,t=!S&&H.current,n=!q.current&&S;(e||n)&&M?[{formField:"line1",sourceField:L("line1")},{formField:"line2",sourceField:L("line2")},{formField:"city",sourceField:L("city")},{formField:"state",sourceField:L("state")},{formField:"zip",sourceField:L("zip")},{formField:"country",sourceField:L("country")}
1].forEach(e=>{let{formField:t,sourceField:n}=e,i=M[n];i&&k(D(t),i,{shouldValidate:!0})}):t&&["line1","line2","city","state","zip","country"].forEach(e=>{k(D(e),"",{shouldValidate:!0}),O(D(e))}),H.current=S,q.current=!0},[S,M,D,L]);let W=P&&R.country||o.Iv,j=async e=>await w.queryAddress({search:e,city:R.city,state:R.state,country:W}),G=async(e,t)=>{let{setOptions:n}=t,{suggestion:i}=e;if(i.entries>1)n(await w.queryFurtherOptions(e,W));else if(void 0!==i.addressText){let e=await u({addressId:i.addressId,country:R.country});e&&(k(D("line1"),e.street,{shouldValidate:!0}),k(D("city"),e.locality,{shouldValidate:!0}),k(D("state"),e.administrativeArea,{shouldValidate:!0}),k(D("zip"),e.postalCode,{shouldValidate:!0}))}else if(d(i)){let t=i.zipcode;B&&(t=await w.nineDigitZipCodeLookup({street:i.streetLine,zipCode:i.zipcode})),k(D("line1"),e.suggestion.streetLine,{shouldValidate:!0}),k(D("line2"),e.suggestion.secondary||null,{shouldValidate:!0}),k(D("city"),e.suggestion.city,{shouldValidate:!0}),k(D("state"),e.suggestion.state,{shouldValidate:!0}),k(D("zip"),t,{shouldValidate:!0})}},K=V?!R.country:!P&&!!R.state&&!R.country;(0,h.useEffect)(()=>{K&&k(D("country"),o.Iv,{shouldValidate:!1})},[K,R.state,R.zip]);let Z=E||r,U=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(null==v?void 0:v.requirement)==="required"||![e.line1,e.line2,e.city,e.state,e.zip].every(e=>!e)},_=(e=>{let{line1:t,line2:n,city:i,state:r,zip:l}=e;return!!(t||n||i||r||l)})(R),J=e=>t=>{var n,i,r;if(!U(R))return null;let l=v||{type:"address",requirement:"required",validationOptions:{allowPoBox:!1,countryReach:"domestic",maxCharsLine1:40,maxCharsLine2:40,minCharsLine1:2,minCharsLine2:1}},a=null==(n=(0,p.jr)({...R,[e]:t||void 0},l).error)?void 0:n.flatten();return"required"===l.requirement||_?null==a||null==(r=a.fieldErrors)||null==(i=r[e])?void 0:i[0]:null},$=(0,i.Y)(g.A.Dropdown,{name:D("Country"),label:"Country",ariaLabel:"Country",options:V?Y:F,defaultValue:V?R.country||o.Iv:void 0,onChange:V?()=>{I.forEach(e=>{k(D(e),"",{shouldValidate:!1}),O(D(e))})}:void 0,isHalfField:!0,hideError:n,validationFn:J("country"),isDisabled:Z,saveOnBlur:!1,enableMobileSheet:!0}),Q=(0,i.Y)(g.A.Dropdown,{name:D("State"),label:"State",ariaLabel:"State",options:b.Ky,isHalfField:!0,hideError:n,validationFn:J("state"),isDisabled:Z,saveOnBlur:!1,enableMobileSheet:!0}),X=(0,i.Y)(g.A.Input,{name:D("State"),label:"Region / Territory",hideError:n,validationFn:J("state"),isDisabled:Z,saveOnBlur:!1}),ee=z?X:Q,et=(0,i.Y)(g.A.Input,{name:D("Zip"),label:z?"Postal Code":"Zip Code",mask:!z&&"zipCode",isHalfField:!0,hideError:n,validationFn:J("zip"),isDisabled:Z,saveOnBlur:!1});return(0,i.Y)(i.FK,{children:(0,i.FD)(x,{isFieldGroup:n,children:[P?$:(0,i.Y)(g.A.Hidden,{name:D("Country"),label:"Country",hideError:n,defaultValue:!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!(e.line1&&e.city&&e.state&&e.zip)}(R)?o.Iv:null}),(0,i.Y)(g.A.InputWithSelect,{label:"Street Address",fetchOptions:j,onOptionSelect:G,noOptionsText:"Address Not Found",isDisabled:Z,name:D("Line1"),validationFn:J("line1"),saveOnBlur:!1,infoTooltip:null==v?void 0:v.description}),!z&&(0,i.Y)(g.A.Input,{name:D("Line2"),label:"Unit (Optional)",hideError:n,isDisabled:Z,saveOnBlur:!1,validationFn:J("line2")}),(0,i.Y)(g.A.Input,{name:D("City"),label:"City",hideError:n,validationFn:J("city"),isDisabled:Z,saveOnBlur:!1}),n&&ee,n&&et,!n&&(0,i.FD)(A.A,{children:[(0,i.Y)(C.A,{children:ee}),(0,i.Y)(C.A,{children:et})]})]})})},S=e=>{let{addressTypePrefix:t="addressPrimary",isFieldGroup:n=!1,isDisabled:a=!1}=e,{getFieldIsLocked:o=null,namePrefix:d="address",fields:s,showSameAddressAsPrimaryCheckbox:u=!1,shouldUsePrimaryAddress:c=!1,setShouldUsePrimaryAddress:p}=(0,l.d)()||{},h=null==s?void 0:s[t];return(0,i.FD)(i.FK,{children:[u&&(0,i.Y)("div",{css:{paddingBottom:"1.5rem"},children:(0,i.Y)(r.A,{name:"should-use-primary-address",label:"Same address as yours",isChecked:c,onChange:e=>{let{target:{checked:t}}=e;p&&p(t)}})}),(0,i.Y)(T,{addressTypePrefix:t,isFieldGroup:n,isDisabled:a||c,getFieldIsLocked:o,namePrefix:d,field:h,shouldUsePrimaryAddress:c})]})}},56145:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(56455),r=n(53239),l=n(52308);let a={container:{paddingTop:1,position:"relative",marginBottom:24},field:()=>({marginTop:-1,position:"relative","&:focus-within":{zIndex:100},"&:hover":{zIndex:50}}),hideBottomBorder:{borderBottom:0},leftHalf:()=>({marginRight:-1}),halfRow:{display:"flex"},halfInner:{flexGrow:1,flexBasis:"50%"},errorMessages:{marginTop:-25,marginBottom:24}},o=e=>{let{children:t,hideBottomBorder:n,isLeftHalf:l,isTopLeft:o,isTopRight:d,isTop:s,isBottomLeft:u,isBottomRight:c,isBottom:p,setErrorMessage:h}=e,m=(e=>{let{isTopLeft:t,isTopRight:n,isTop:i,isBottomLeft:r,isBottomRight:l,isBottom:a}=e;return{borderTopLeftRadius:t||i?4:0,borderTopRightRadius:n||i?4:0,borderBottomLeftRadius:r||a?4:0,borderBottomRightRadius:l||a?4:0}})({isTopLeft:o,isTopRight:d,isTop:s,isBottomLeft:u,isBottomRight:c,isBottom:p});return(0,i.Y)("div",{css:e=>[a.field(e),a.halfInner,n&&a.hideBottomBorder,l&&a.leftHalf(e)],children:(0,r.cloneElement)(t,{isHalfField:void 0,setErrorMessage:h,hideError:!0,fieldGroupStyles:m})})},d=e=>{let{children:t,errorMessage:n}=e,d=r.Children.toArray(t),[s,u]=(0,r.useState)([]),c=(e,t)=>{u(n=>{let i=[...n],r="".concat(e," - ").concat(t);return i=i.filter(t=>!t.includes(e)),t&&(i=i.filter(t=>!t.includes(e))).push(r),i})}
1,p=[n,...s].filter(Boolean);return(0,i.FD)(i.FK,{children:[(0,i.Y)("div",{css:a.container,children:d.filter(e=>e).map((e,t)=>{var n,l;let{isHalfField:s}=e.props,u=r.Children.count(d),p=s&&(null==(l=d[t+1])||null==(n=l.props)?void 0:n.isHalfField)===!0;if(s&&!p)return null;let h=t+1===u||s&&t+2===u;return p?(0,i.FD)("div",{css:a.halfRow,children:[(0,i.Y)(o,{hideBottomBorder:h,setErrorMessage:c,isLeftHalf:!0,isTopLeft:0===t,isBottomLeft:t===u-2,children:e}),(0,i.Y)(o,{hideBottomBorder:h,setErrorMessage:c,isTopRight:0===t,isBottomRight:t===u-2,children:d[t+1]})]},t):(0,i.Y)(o,{hideBottomBorder:h,setErrorMessage:c,isTop:0===t,isBottom:t===u-1,children:e},t)})}),(0,i.Y)("div",{css:p.length&&a.errorMessages,children:p.map(e=>(0,i.Y)(l.A,{children:e},e))})]})}},62344:(e,t,n)=>{n.d(t,{FT:()=>s,L$:()=>d,h9:()=>a,hS:()=>o,ou:()=>c,rI:()=>u});var i=n(56455),r=n(53239),l=n(30277);let a=()=>{let[e,t]=(0,r.useState)(!1);return{modalIsOpen:e,closeModal:()=>t(!1),openModal:()=>t(!0)}},o=(e,t)=>{let{modalIsOpen:n,closeModal:r,openModal:o}=a(),d={isOpen:n,onClickAway:r,onClose:r,...t};return{modal:(0,i.Y)(l.A,{...d,children:"function"==typeof e?e(r):e}),openModal:o}},d=()=>{let e=(0,r.useRef)();return(0,r.useEffect)(()=>()=>clearTimeout(e.current),[]),(t,n)=>{e.current=setTimeout(t,n)}},s=e=>{let t=(0,r.useRef)(e);return t.current=e,t},u=(e,t)=>{let n=(0,r.createContext)(e);return n.displayName=t,n},c=e=>{let t=(0,r.useContext)(e);if(void 0===t)throw Error("Context ".concat(e.displayName," must be used within a Provider"));return t}},64765:(e,t,n)=>{n.d(t,{A:()=>f});var i=n(56455),r=n(53239),l=n(22026),a=n(91353),o=n(23840),d=n(50435),s=n(43644),u=n(32453);let c={buttonIcon:{display:"inline-block",verticalAlign:"middle",margin:"-10px 16px -10px 0"}},p=e=>{let{name:t,index:n}=e;return"formSection-".concat(t,"-").concat(n)},h=r.useLayoutEffect,m="arrayId",f=e=>{let{addButtonText:t="add",disableAdding:n,hideAddButton:f,name:v,itemRenderer:g,max:y=1/0,onItemSubmit:b,onItemRemove:C,isDisabled:A,showFormInfoBox:x=!1,firstItemOpen:Y=!1,scrollToItem:F=!0,namePrefix:I,...T}=e,{fields:S=[],...w}=(0,l.jz)({name:v,keyName:m}),{experiences:{selfServe:{pages:{editBusiness:B}}}}=(0,a.t)();(0,r.useEffect)(()=>{Y&&0===S.length&&w.append({})},[Y]);let{initialValues:k}=(0,l.xW)(),O=(0,r.useRef)(),E=(0,r.useRef)(!1),L=S.length>=y,D=A||n||L;return h(()=>{F&&E.current&&"number"==typeof O.current&&O.current<S.length&&(0,o.V)(p({name:v,index:(null==S?void 0:S.length)-1})),E.current=!1,O.current=S.length},[S.length]),(0,i.FD)("div",{children:[S.map((e,t)=>(0,i.Y)("div",{id:p({name:v,index:t}),children:(0,i.Y)(g,{item:e,nameGenerator:(e=>{let{name:t,index:n}=e;return e=>"".concat(t,".").concat(n).concat(e?".".concat(e):"")})({name:v,index:t}),arrayHelpers:w,index:t,id:"id"in e?e.id:void 0,onItemSubmit:b,onItemRemove:C,isDisabled:A,namePrefix:I?"".concat(I,".").concat(t):void 0,...T})},e[m]||t)),!L&&!f&&(0,i.FD)(d.A,{type:"button",theme:"dashed",size:"large",isFull:!0,onClick:()=>{var e,t;let n=Object.keys(null!=(t=null==k||null==(e=k[v])?void 0:e[0])?t:{}).reduce((e,t)=>(e[t]="","emails"===t&&(e[t]=[]),e),{});E.current=!0,w.append(n,{shouldFocus:!1})},isDisabled:D,"data-uid":"add-person",children:[(0,i.Y)(s.A,{name:"add-circle",css:c.buttonIcon}),t]}),x&&(null==B?void 0:B.formInfoText)?(0,i.Y)("div",{css:{marginTop:16},children:(0,i.Y)(u.A,{icon:(null==B?void 0:B.formInfoTooltip)?null:"info-circle",tooltipIcon:(null==B?void 0:B.formInfoTooltip)?"info-circle":null,tooltipContent:null==B?void 0:B.formInfoTooltip,content:null==B?void 0:B.formInfoText})}):null]})}},71054:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(56455),r=n(11172);let l={centerContent:{display:"flex",justifyContent:"center"}},a={default:{paddingBottom:32},small:{paddingBottom:24},xSmall:{paddingBottom:16}},o=e=>{let{heading:t,children:n,centerContent:o,theme:d}=e;return(0,i.FD)("div",{css:[a[d||"default"],o&&l.centerContent],children:[t&&(0,i.Y)(r.A,{...t}),n]})}},72172:(e,t,n)=>{n.d(t,{A:()=>U});var i=n(56455),r=n(36097);let l={mask:Number,thousandsSeparator:",",radix:".",scale:2,signed:!1};var a=n(44836),o=n(34206),d=n(81830),s=n(2353),u=n(53239),c=n(22026),p=n(7171),h=n(36841),m=n(34999),f=n(35255),v=n(31760),g=n(99086),y=n(4650);let b=e=>{let{fields:t,namePrefix:n,entityType:r,children:l}=e,a=(0,m.A)({entityType:r,namePrefix:n,fields:t});return(0,i.Y)(y.A,{...a,fields:t,entityType:r,namePrefix:n,children:l})},C=e=>{let{name:t,fields:n,topLevelFields:r,entityType:l,FieldComponent:a}=e;return(0,i.Y)(b,{fields:n,entityType:l,namePrefix:t,children:r.map(e=>(0,i.Y)(a,{fieldId:e},e))})};var A=n(15914),x=n.n(A),Y=n(50435),F=n(11172),I=n(43644),T=n(7409),S=n(64765),w=n(52308),B=n(7465);let k={container:{marginBottom:24},itemContainer:e=>{let{colors:t}=e;return{backgroundColor:t.grey4,padding:"1.5rem",paddingBottom:8,borderRadius:"8px",marginBottom:16}}
1,removeButton:{margin:"-12px -10px -12px 0",float:"right"}},O=e=>{let{nameGenerator:t,index:n,arrayHelpers:r,itemLabel:l,FieldRenderer:a,fieldProps:o}=e;return(0,i.Y)("div",{css:k.itemContainer,children:(0,i.Y)(T.A,{title:l,action:(0,i.Y)("div",{css:k.removeButton,children:(0,i.Y)(Y.A,{size:"mediumPreserveCase",theme:"link",onClick:()=>r.remove(n),children:(0,i.Y)(I.A,{name:"trash"})})}),isTitleBold:!0,children:(0,i.Y)(a,{...o,name:t()})})})},E=e=>{let{itemLabel:t="Add",title:n,name:r,isRequired:l,minItems:a,maxItems:o,...d}=e,{setValue:s,setError:p,clearErrors:h,watch:m,formState:f}=(0,c.xW)(),v=m(r),g=x()(f.errors,r),y=x()(f.touchedFields,r),b=x()(f.dirtyFields,r),C=Math.max(null!=a?a:0,+!!l);(0,u.useEffect)(()=>{var e;null==v&&s(r,l?[{}]:[]),l&&(null!=(e=null==v?void 0:v.length)?e:0)<C?p(r,{type:"minItems",message:1===C?"Please add at least one ".concat(t):"Please add at least ".concat(C," ").concat(t,"s")}):(null==g?void 0:g.type)==="minItems"&&h(r)},[h,null==g?void 0:g.type,l,t,C,r,p,s,v]);let{displayError:A}=(0,B.A)({value:v,name:r,isDirty:b,isTouched:y,error:g});return null===v?null:(0,i.FD)("div",{css:k.container,children:[n&&(0,i.Y)(F.A,{heading:n,theme:"xsmall"}),(0,i.Y)(S.A,{...d,name:r,itemRenderer:O,itemLabel:t,addButtonText:"Add ".concat(t),max:o}),A&&(0,i.Y)(w.A,{id:"error_".concat(r),children:A})]})};var L=n(53541),D=n(62344),R=n(45352),N=n(71013),P=n(61211);let V={note:{padding:"12px 0 24px"}},z=e=>{let{hasMultiplePersonRelationships:t,note:n,onChange:r,onSave:l,options:a=[],label:o,isDisabled:d,name:s,validationFn:p}=e,[h,m]=(0,u.useState)(!1),[f,y]=(0,u.useState)(!1),b=(0,D.FT)(t),{onFieldBlur:C}=(0,P.lN)(),{watch:A,setValue:x}=(0,c.xW)(),Y=A(s),F=async e=>{null==r||r(e);let t=await C({name:s,formUpdate:{organization:{taxIdType:e}},saveOnBlur:!0});null==l||l(t)},I=async()=>{y(!0);try{await F(L.LC.SSN)}finally{m(!1),y(!1)}},T=()=>{x(s,L.LC.EIN),m(!1)};return(0,i.FD)(i.FK,{children:[(0,i.Y)(g.A.Dropdown,{name:s,label:o,ariaLabel:o,options:a,onChange:e=>{if(b.current&&e===L.LC.SSN)return void m(!0);F(e)},saveOnBlur:!1,theme:"fullWidth",isDisabled:d,validationFn:p}),n&&(0,i.Y)(v.A,{isOpen:Y===L.LC.SSN,children:(0,i.Y)("div",{css:V.note,children:(0,i.Y)(R.A,{theme:"note",children:n})})}),(0,i.Y)(N.A,{isOpen:h,buttonText:"Update",onConfirm:I,onCancel:T,onClose:T,heading:"Are you sure?",subheading:"Switching your Tax ID type to be a Social Security Number will remove any additional people you may have added to the business. This is in keeping with regulations that sole proprietorships must have an Employer Identification Number (EIN) in order to have any employees.",isLoading:f})]})};var M=n(30513),H=n(32453),q=n(27168);let W="Vehicle not found",j={infoBoxContainer:{marginBottom:16}},G=e=>{var t,n,r,l,a;let{name:o,onChange:d,value:s,ariaLabel:p,label:h="Vehicle Identification Number (VIN)",onSuccess:m,validationFn:f,...v}=e,{getData:b}=(()=>{let{decodeVIN:e}=(0,M.w)();return{getData:async t=>e(t)}})(),[C,A]=(0,u.useState)(),[x,Y]=(0,u.useState)(),[F,I]=(0,u.useState)(),{setError:T,watch:S,setValue:w,clearErrors:B,formState:{submitCount:k,isSubmitting:O,isValid:E,isSubmitSuccessful:L}}=(0,c.xW)(),{getFieldName:D}=(0,y.d)(),R=S(o),N=(0,c.FH)({name:"collateral.type"});return(0,q.A)({submitCount:L||O?null:k,isValid:E,message:"Please fix missing or invalid fields before continuing."}),(0,u.useEffect)(()=>{R&&17===R.length&&"auto"===N&&b(R).then(e=>{e.modelYear&&e.make&&e.model?(I(e),A("success"),null==m||m(e),(e=>{let{make:t,model:n,modelYear:i}=e;w(D("year"),i),w(D("make"),t),w(D("model"),n)})(e)):(I(void 0),T(o,{type:"manual",message:W}),A("error"),Y(W))}).catch(()=>{I(void 0),T(o,{type:"manual",message:W}),A("error"),Y(W)})},[R]),(0,i.FD)(i.FK,{children:[(0,i.Y)(g.A.Input,{rerenderOnAnyPropChangeDefault:!1,componentName:"VINInput",name:o,label:h,value:s,onChange:e=>{let{value:t}=e.target;t=t.replace(/[^a-zA-Z0-9]/g,"").toLocaleUpperCase(),A(void 0),Y(void 0),B(),void 0!==d&&d(t)},ariaLabel:p,state:C,validationFn:e=>x||!f||f(e),...v}),F&&(0,i.Y)("div",{css:j.infoBoxContainer,children:(0,i.Y)(H.A,{content:"**Vehicle Found!**\n".concat(null!=(t=F.modelYear)?t:""," ").concat(null!=(n=F.make)?n:""," ").concat(null!=(r=F.model)?r:""," ").concat(null!=(l=F.trim)?l:""," ").concat(null!=(a=F.trim2)?a:"")})})]})},K=e=>
1{let{name:t,options:n,label:r,placeholder:o,validate:d,validationFn:s,isDisabled:u,type:p,configuredType:h,mask:m,inputMode:v,infoTooltip:y,fieldGroupStyles:b,setErrorMessage:A,hideError:x,Component:Y,theme:F,onChange:I,openMenuOnClick:S,hideControls:w,validationOptions:B,append:k,fieldContext:O,ariaLabel:L,...D}=e,R={name:t,label:r,placeholder:o,validate:d,inputMode:v,isDisabled:u,infoTooltip:y,hideError:x,setErrorMessage:A,fieldGroupStyles:b,theme:F,ariaLabel:L||r,validationFn:!d&&s},{watch:N,register:P}=(0,c.xW)();if(Y)return(0,i.Y)(Y,{...R,options:n,onChange:I,...D});switch(p){case"radio":case"boolean":return(0,i.Y)(g.A.RadioGroup,{options:n,...R});case"currency":return(0,i.Y)(g.A.CurrencyInput,{...R});case"duration":return(0,i.Y)(g.A.DurationInput,{...R,value:D.value,onChange:D.onChange,onBlur:D.onBlur,yearsLabel:D.yearsLabel,monthsLabel:D.monthsLabel,state:D.state,isDisabled:u});case"checkbox":return(0,i.Y)(g.A.Checkbox,{...R});case"select":case"singleOptionSelect":case"multiOptionSelect":case"creatableMultiOptionSelect":return(0,i.Y)(g.A.Dropdown,{isMulti:"multiOptionSelect"===p||"creatableMultiOptionSelect"===p,isCreatable:"creatableMultiOptionSelect"===p,options:n,onChange:I,hideControls:w,openMenuOnClick:S,isCoreSynced:D.isCoreSynced,enableMobileSheet:!0,...R});case"idNumber":return(0,i.Y)(G,{...R});case"accountNumber":return(0,i.Y)(g.A.AccountNumberInput,{...R});case"text":case"url":return(null==B?void 0:B.multiline)?(0,i.Y)(g.A.TextArea,{...R,characterLimit:null==B?void 0:B.maxChars}):(0,i.Y)(g.A.Input,{type:p,mask:m,...R,append:k});case"datePast":case"dateFuture":{let e="year"===D.datePrecision?"dateYear":"dateLong";return(0,i.Y)(g.A.Input,{append:k,mask:e,...R})}case"email":return(0,i.Y)(g.A.TrimmedInput,{type:p,...R});case"phoneNumber":return(0,i.Y)(g.A.PhoneNumberInput,{...R});case"number":return(0,i.Y)(g.A.Input,{append:k,mask:(e=>(null==e?void 0:e.allowThousandsSeparator)?l:{mask:Number})(B),...R});case"percentage":return(0,i.Y)(g.A.Input,{type:p,mask:m,...R,append:k||"%"});case"taxId":{let{getTaxId:e,taxIdLastFour:n,isEIN:r}=O,l=N(t);return(0,i.Y)(g.A.TaxIdInput,{...R,taxIdLastFour:n,getTaxId:e,isEIN:r,validationFn:(l||!n)&&s,isDisabled:u})}case"taxIdType":{let{onTaxIdTypeChange:e,onTaxIdTypeSave:t,hasMultiplePersonRelationships:r,taxIdTypeNote:l}=D;return(0,i.Y)(z,{options:n,hasMultiplePersonRelationships:r,note:l,onChange:e,onSave:t,...R})}case"address":{let{fieldId:e}=D;return(0,i.Y)(T.A,{title:r,children:(0,i.Y)(f.A,{...R,addressTypePrefix:e})})}case"fieldCollection":{let{fields:e,topLevelFields:t,isArray:n,itemLabel:l,requirement:o,skipRequirement:d,FieldComponent:s}=D,u={fields:e,topLevelFields:t,title:r,itemLabel:l,entityType:O.entityType,FieldComponent:s};return n?(0,i.Y)(E,{...R,title:r,itemLabel:l,FieldRenderer:C,fieldProps:u,isRequired:!d&&(0,a.w5)(o),minItems:null==B?void 0:B.minItems,maxItems:null==B?void 0:B.maxItems}):(0,i.Y)(C,{...R,...u})}case"hidden":return(0,i.Y)("input",{type:"hidden",...P(t,{setValueAs:e=>"boolean"===h?"true"===e||"false"!==e&&e:e})});default:return(0,i.Y)(g.A.Input,{append:k,mask:m,...R})}},Z=e=>{var t;let{fieldId:n,validate:l,isDisabled:f,skipRequirement:g,fieldGroupStyles:b,Component:C,disableTriggeredValues:A,options:x,isHidden:Y,renderTriggeredCollateral:F,...I}=e,{setValue:T,getValues:S}=(0,c.xW)(),w=(0,y.d)();w||console.error("field ".concat(n," is not wrapped in a Field Provider component"));let B=Y,{fields:k,entityType:O,namePrefix:E,getFieldName:L}=w||{},D=L(n),R=(0,c.FH)({name:D}),{triggeredFields:N,isEnabled:P,isDisabled:V,type:z,options:M,triggeredCollateralTypes:H,maxAdditionalCollateral:q,formLabel:W,...j}=(0,u.useMemo)(()=>(0,p.iw)({fieldId:n,value:R,fields:k,entityType:O,skipRequirement:g}),[D,R,k]);!B&&"hideIfOnlyOneOption"in j&&(B=(0,s.sO)({hideIfOnlyOneOption:j.hideIfOnlyOneOption,options:M})),(0,u.useEffect)(()=>{"type"===n&&(null==w?void 0:w.entityType)==="person"&&R&&!j.isCoreSynced&&((null==M?void 0:M.some((0,d.f)(R)))||T(null==w?void 0:w.getFieldName(n),null))},[R]);let G=N.filter(e=>{var t,n;return(null==(t=k[e])?void 0:t.type)==="fieldCollection"&&(null==(n=k[e])?void 0:n.isArray)&&!Array.isArray(S(L(e)))});(0,u.useEffect)(()=>
1{G.forEach(e=>{T(L(e),[{}],{shouldTouch:!0})})},[G]);let U=!!N.length&&!G.length;(e=>{let{triggeredFields:t,fieldId:n,fields:i,entityType:l,namePrefix:a}=e,o=(0,y.d)(),d=(0,u.useRef)(),{setValue:s}=(0,c.xW)(),h=t.length&&"".concat(t);(0,u.useEffect)(()=>{var e;(null==(e=d.current)?void 0:e.length)&&(0,p.J0)({fieldId:n,fields:i,entityType:l}).filter(e=>o.getFieldIsEnabled(e)).filter(e=>!t.includes(e)).forEach(e=>{var t;"idType"===n&&o.getFieldIsLocked(e)||((null==(t=o.fields[e])?void 0:t.type)==="address"?r.Cf.forEach(t=>{let n="".concat(e).concat(t);s(a?"".concat(a,".").concat(n):n,null)}):s(a?"".concat(a,".").concat(e):e,null))}),d.current=t},[h])})({triggeredFields:N,fieldId:n,fields:k,entityType:O,namePrefix:E}),(e=>{var t;let{value:n,options:i,disableTriggeredValues:r}=e,{getFieldName:l}=(0,y.d)(),{setValue:a}=(0,c.xW)(),[s,p]=(0,u.useState)(void 0),h=(0,o.r)(i),m=null==h||null==(t=h.find((0,d.f)(n)))?void 0:t.triggeredValues;(0,u.useEffect)(()=>{s&&m&&Object.keys(s).forEach(e=>{"fieldId"in m&&!(null==m?void 0:m.fieldId)&&a(l(e),null)}),p(m),m&&Object.entries(m).forEach(e=>{let[t,n]=e;Array.isArray(r)&&r.includes(t)||a(l(t),n,{shouldValidate:!0})})},[m,r])})({value:R,options:M,disableTriggeredValues:A}),(e=>{let{fieldName:t,value:n,skip:i}=e,{setValue:r}=(0,c.xW)(),{setTriggeredCollateralTypesFromField:l,getTriggeredCollateralTypesFromRef:a,hasTriggeredCollateralTypes:o}=(()=>{let{fields:e}=(0,m.A)({entityType:"collateral"}),t=(0,u.useRef)({}),n=(0,u.useCallback)(e=>{let{fieldName:n,triggeredCollateralTypes:i,isActive:r}=e;t.current[n]={fieldName:n,triggeredCollateralTypes:i,isActive:r}},[]),i=(0,u.useCallback)(e=>t.current[e]||null,[t.current]);return{getTriggeredCollateralTypesFromRef:i,hasTriggeredCollateralTypes:(0,u.useCallback)(e=>e in t.current,[]),setTriggeredCollateralTypesFromField:(t,i)=>{let r=e[t];if(!r)return{fieldName:t,triggeredCollateralTypes:[],isActive:!1};let l=(0,h.Y)({fieldConfig:r,value:i}),a=!0===i;return a&&l.length>0&&n({fieldName:t,triggeredCollateralTypes:l,isActive:a}),{fieldName:t,triggeredCollateralTypes:l,isActive:a}}}})();i||l(t,n);let d=o(t),s=!1===n;(0,u.useEffect)(()=>{if(!i&&d&&s){let e=a(t).triggeredCollateralTypes[0];r("collateral.triggeredCollaterals.".concat(e),null)}},[i,t,r,s,d])})({fieldName:n,value:R,skip:!D.includes("collateral")});let _=x||M||[],J=1===_.length,$=J?null==(t=_[0])?void 0:t.value:void 0,Q=J&&null!=$&&"creatableMultiOptionSelect"!==z&&(0,a.w5)(j.requirement);return((0,u.useEffect)(()=>{Q&&("multiOptionSelect"===z?T(D,[$]):T(D,$))},[Q,J,$,z,D,T]),(P||Q)&&w)?(0,i.FD)(i.FK,{children:[(0,i.Y)("div",{children:(0,i.Y)(K,{type:B?"hidden":z,configuredType:z,name:D,validate:l,isDisabled:V||f,fieldGroupStyles:((e,t)=>e&&t?{...e,borderBottomLeftRadius:0,borderBottomRightRadius:0}:e)(b,U),Component:C,options:_,fieldContext:w,FieldComponent:Z,skipRequirement:g,...j,fieldId:n||j.fieldId,...I})}),(0,i.Y)(v.A,{isOpen:U,children:N&&N.length?N.map(e=>(0,i.Y)("div",{children:(0,i.Y)(Z,{...I,fieldId:e,skipRequirement:g,fieldGroupStyles:(e=>{if(e)return{...e,borderTopLeftRadius:0,borderTopRightRadius:0,borderTopColor:"transparent"}})(b),options:x,fieldContext:w,isDisabled:f,renderTriggeredCollateral:F})},e)):null}),!!H.length&&F&&F(H,q)]}):null},U=Z}}]);
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.