1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[472],{30472:(e,s,r)=>{"use strict";r.d(s,{A:()=>h});var a=r(37876);r(14232);var t=r(97719),n=r(60929),l=r(7001),d=r(15094);r(82630);var o=r(60982),i=r(94556),c=r.n(i),m=r(70765),u=r(13);let h=e=>{let{isReadOnly:s=!1,address:r,user:i,values:h,errors:p,touched:x,handleChange:j,handleBlur:A,setFieldValue:C,showEmail:b=!1}=e;if(s){var v,g;if(!r&&!i)return null;let e=r||{},s=e.firstName||(null==i||null==(v=i.data)?void 0:v.firstName),t=e.lastName||(null==i||null==(g=i.data)?void 0:g.lastName);return(0,a.jsxs)(a.Fragment,{children:[s&&t&&(0,a.jsxs)(a.Fragment,{children:[s," ",t," ",(0,a.jsx)("br",{})]}),e.companyName&&(0,a.jsxs)(a.Fragment,{children:[e.companyName," ",(0,a.jsx)("br",{})]}),e.streetAddress," ",(0,a.jsx)("br",{}),e.streetAddress2&&(0,a.jsxs)(a.Fragment,{children:[e.streetAddress2," ",(0,a.jsx)("br",{})]}),e.townCity&&(0,a.jsxs)(a.Fragment,{children:[e.townCity,", "]}),e.state&&(0,a.jsxs)(a.Fragment,{children:[e.state,", "]}),e.zipCode&&(0,a.jsxs)(a.Fragment,{children:[e.zipCode," ",(0,a.jsx)("br",{})]}),e.phone&&(0,a.jsx)(a.Fragment,{children:e.phone})]})}return(0,a.jsxs)(t.A,{children:[b&&(0,a.jsxs)(n.A,{md:12,className:"mb-3",children:[(0,a.jsxs)(l.A.Label,{children:["Email address ",(0,a.jsx)("span",{className:c().requiredStar,children:"*"})]}),(0,a.jsx)(l.A.Control,{type:"email",name:"email",value:h.email,disabled:!0})]}),(0,a.jsxs)(n.A,{md:6,className:"mb-3",children:[(0,a.jsxs)(l.A.Label,{children:["First name ",(0,a.jsx)("span",{className:c().requiredStar,children:"*"})]}),(0,a.jsx)(l.A.Control,{name:"firstName",value:h.firstName,onChange:j,onBlur:A,isInvalid:x.firstName&&!!p.firstName}),(0,a.jsx)(l.A.Control.Feedback,{type:"invalid",children:p.firstName})]}),(0,a.jsxs)(n.A,{md:6,className:"mb-3",children:[(0,a.jsxs)(l.A.Label,{children:["Last name ",(0,a.jsx)("span",{className:c().requiredStar,children:"*"})]}),(0,a.jsx)(l.A.Control,{name:"lastName",value:h.lastName,onChange:j,onBlur:A,isInvalid:x.lastName&&!!p.lastName}),(0,a.jsx)(l.A.Control.Feedback,{type:"invalid",children:p.lastName})]}),(0,a.jsxs)(n.A,{md:12,className:"mb-3",children:[(0,a.jsx)(l.A.Label,{children:"Company name (optional)"}),(0,a.jsx)(l.A.Control,{name:"companyName",value:h.companyName,onChange:j,onBlur:A})]}),(0,a.jsx)(n.A,{md:12,className:"mb-3",children:(0,a.jsx)(o.A,{options:m,value:h.country,onChange:C,onBlur:A,placeholder:"Search and select country",label:"Country / Region",required:!0,name:"country",isInvalid:x.country&&!!p.country,error:p.country,requiredStarClass:c().requiredStar,marginTop:"0"})}),(0,a.jsxs)(n.A,{md:12,className:"mb-3",children:[(0,a.jsxs)(l.A.Label,{children:["Street address ",(0,a.jsx)("span",{className:c().requiredStar,children:"*"})]}),(0,a.jsx)(l.A.Control,{name:"streetAddress",placeholder:"House number and street name",value:h.streetAddress,onChange:j,onBlur:A,isInvalid:x.streetAddress&&!!p.streetAddress,className:"mb-2"}),(0,a.jsx)(l.A.Control,{name:"streetAddress2",placeholder:"Apartment, suite, unit (optional)",value:h.streetAddress2,onChange:j,onBlur:A}),(0,a.jsx)(l.A.Control.Feedback,{type:"invalid",children:p.streetAddress})]}),(0,a.jsxs)(n.A,{md:12,className:"mb-3",children:[(0,a.jsxs)(l.A.Label,{children:["Town / City ",(0,a.jsx)("span",{className:c().requiredStar,children:"*"})]}),(0,a.jsx)(l.A.Control,{name:"townCity",value:h.townCity,onChange:j,onBlur:A,isInvalid:x.townCity&&!!p.townCity}),(0,a.jsx)(l.A.Control.Feedback,{type:"invalid",children:p.townCity})]}),(0,a.jsx)(n.A,{md:12,className:"mb-3",children:(0,a.jsx)(o.A,{options:u.filter(e=>{let s=m.find(e=>e.name===h.country);return s&&e.country_id.toString()===s.id.toString()}),value:h.state,onChange:C,onBlur:A,placeholder:"Search and select state",label:"State",required:!0,name:"state",isInvalid:x.state&&!!p.state,error:p.state,requiredStarClass:c().requiredStar,marginTop:"0"})}),(0,a.jsxs)(n.A,{md:12,className:"mb-3",children:[(0,a.jsxs)(l.A.Label,{children:["ZIP Code ",(0,a.jsx)("span",{className:c().requiredStar,children:"*"})]}),(0,a.jsx)(l.A.Control,{name:"zipCode",value:h.zipCode,onChange:j,onBlur:A,isInvalid:x.zipCode&&!!p.zipCode}),(0,a.jsx)(l.A.Control.Feedback,{type:"invalid",children:p.zipCode})]}),(0,a.jsxs)(n.A,{md:12,className:"mb-3",children:[(0,a.jsxs)(l.A.Label,{children:["Phone ",(0,a.jsx)("span",{className:c().requiredStar,children:"*"})]}),(0,a.jsx)(d.LR,{defaultCountry:"us",value:h.phone,onChange:(e,s)=>C("phone",(null==s?void 0:s.inputValue)||e),onBlur:A,inputProps:{name:"phone",onKeyDown:e=>{if("Backspace"!==e.key)return;let s=e.target,r=s.selectionStart,a=s.value,t=r;for(;t>0&&/[\s\-\(\)]/.test(a[t-1]);)t--;t!==r&&s.setSelectionRange(t,t)}},style:{width:"100%"},inputStyle:{width:"100%",borderColor:x.phone&&p.phone?"#dc3545":void 0}}),x.phone&&p.phone&&(0,a.jsx)("div",{className:"invalid-feedback d-block",children:p.phone})]})]})}},60982:(e,s,r)=>{"use strict";r.d(s,{A:()=>d});var a=r(37876),t=r(14232),n=r(7001),l=r(75501);let d=e=>{let{options:s,value:r,onChange:d,onBlur:o,onFocus:i,placeholder:c,label:m,required:u=!1,name:h,isInvalid:p=!1,error:x,valueKey:j="id",requiredStarClass:A="",marginTop:C="3"}=e,[b,v]=(0,t.useState)(!1),[g,N]=(0,t.useState)(""),[f,y]=(0,t.useState)(s),_=(0,t.useRef)(null);return(0,t.useEffect)(()=>{N(r||"")},[r]),(0,t.useEffect)(()=>{y(s.filter(e=>e.name.toLowerCase().includes(g.toLowerCase())))},[g,s]),(0,t.useEffect)(()=>{let e=e=>{_.current&&!_.current.contains(e.target)&&v(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,a.jsxs)(n.A.Group,{className:"mt-".concat(C),children:[m&&(0,a.jsxs)(n.A.Label,{children:[m,u&&(0,a.jsx)("span",{className:A,style:A?{}:{color:"red",marginLeft:"3px"},children:"*"})]}),(0,a.jsxs)("div",{className:"position-relative",ref:_,children:[(0,a.jsx)(n.A.Control,{type:"text",name:h,value:g,onChange:e=>{let s=e.target.value;N(s),v(!0),s||d(h,"")},onBlur:e=>{g!==r&&N(r||""),o&&o(e)},onFocus:i,onClick:()=>v(!0),onKeyDown:e=>{"Escape"===e.key&&v(!1)},placeholder:c,isInvalid:p,autoComplete:"off",style:{cursor:"pointer",backgroundImage:"none"}}),(0,a.jsx)("div",{className:"position-absolute d-flex align-items-center",style:{to
1p:"50%",right:"10px",transform:"translateY(-50%)",cursor:"pointer",pointerEvents:"none"},children:(0,a.jsx)(l.pte,{style:{transition:"transform 0.2s ease",transform:b?"rotate(180deg)":"rotate(0deg)"}})}),b&&(0,a.jsx)("div",{className:"position-absolute w-100 bg-white border rounded mt-1",style:{maxHeight:"300px",zIndex:1e3,boxShadow:"0 2px 8px rgba(0,0,0,0.1)"},children:(0,a.jsx)("div",{style:{maxHeight:"200px",overflowY:"auto"},children:f.length>0?f.map((e,s)=>(0,a.jsx)("div",{className:"p-2 cursor-pointer",style:{cursor:"pointer",backgroundColor:r===e.name?"#f8f9fa":"white"},onMouseDown:s=>{s.preventDefault(),d(h,e.name),v(!1)},onMouseEnter:e=>{e.target.style.backgroundColor="#f8f9fa"},onMouseLeave:s=>{s.target.style.backgroundColor=r===e.name?"#f8f9fa":"white"},children:e.name},e.name||s)):(0,a.jsx)("div",{className:"p-2 text-muted",children:g?"No results found":"Start typing to search..."})})})]}),x&&(0,a.jsx)("div",{className:"invalid-feedback d-block",children:"Required"})]})}},94556:e=>{e.exports={card:"Addresses_card__75cCQ",title:"Addresses_title__4zHKM",subTitle:"Addresses_subTitle__M_Nfe",separator:"Addresses_separator__g7eTt",heading:"Addresses_heading__8OUBX",text:"Addresses_text__sXslv",editBtn:"Addresses_editBtn__CiuAL",row:"Addresses_row__P_QMl",requiredStar:"Addresses_requiredStar__Kyzb0",btnBlue:"Addresses_btnBlue__DiZ33"}}}]);
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.