1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[23350],{21873:(e,t,r)=>{r.d(t,{A:()=>l});let l=(0,r(45105).A)("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},23350:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var l=r(95155),a=r(12115),s=r(21873),n=r(65229),o=r(73940),c=r(38653);let i=(()=>{let e=new Set,t=[];for(let r of c.wD)for(let l of r.cities){let a=l.split(" ").map(e=>0===e.length||["of","and","the"].includes(e)?e:e[0].toUpperCase()+e.slice(1)).join(" ").replace(/^([a-z])/,e=>e.toUpperCase());for(let s of r.states){let r=o.Ky.find(e=>e.value===s);if(!r)continue;let n=`${l}__${s}`;e.has(n)||(e.add(n),t.push({city:a,stateCode:s,stateLabel:r.label,key:n}))}}return t.sort((e,t)=>e.city.localeCompare(t.city))})();function u(e){let{value:t,state:r,onChange:c,placeholder:u="e.g. Boston",label:d,sub:f,required:p=!1,id:b,className:m=""}=e,[x,h]=(0,a.useState)(!1),[y,g]=(0,a.useState)(0),w=(0,a.useRef)(null),v=(0,a.useRef)(null),k=(0,a.useRef)(null),j=(0,a.useId)(),N=(0,a.useMemo)(()=>(function(e){if(!e)return null;let t=o.Ky.find(t=>t.label===e);return t?t.value:null})(r),[r]),C=(0,a.useMemo)(()=>{let e=(t||"").toLowerCase().trim();return i.filter(t=>(!N||t.stateCode===N)&&(!e||t.city.toLowerCase().startsWith(e))).slice(0,10)},[t,N]);(0,a.useEffect)(()=>{let e=e=>{w.current&&!w.current.contains(e.target)&&h(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,a.useEffect)(()=>{g(0)},[C.length]),(0,a.useEffect)(()=>{if(x&&k.current){let e=k.current.children[y];null==e||e.scrollIntoView({block:"nearest"})}},[y,x]);let D=(0,a.useCallback)(e=>{var t;c(e.city),h(!1),null==(t=v.current)||t.blur()},[c]);return(0,l.jsxs)("div",{ref:w,className:`relative ${m}`,children:[d&&(0,l.jsxs)("label",{className:"block mb-1.5 h-[44px]",htmlFor:b,children:[(0,l.jsxs)("span",{className:"block text-sm font-semibold text-gray-800 leading-5",children:[d,p&&(0,l.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,l.jsx)("span",{className:"block text-xs font-normal text-gray-500 mt-1 leading-4",children:f||"\xa0"})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,l.jsx)(s.A,{className:"h-4 w-4 text-gray-400"})}),(0,l.jsx)("input",{ref:v,id:b,type:"text",value:t,placeholder:u,onChange:e=>{c(e.target.value),x||h(!0)},onFocus:()=>h(!0),onKeyDown:e=>{if(!x&&("ArrowDown"===e.key||"Enter"===e.key)){h(!0),e.preventDefault();return}if(x)switch(e.key){case"ArrowDown":e.preventDefault(),g(e=>e<C.length-1?e+1:e);break;case"ArrowUp":e.preventDefault(),g(e=>e>0?e-1:0);break;case"Enter":C[y]&&(e.preventDefault(),D(C[y]));break;case"Escape":var t;e.preventDefault(),h(!1),null==(t=v.current)||t.blur();break;case"Tab":h(!1)}},role:"combobox","aria-expanded":x,"aria-haspopup":"listbox","aria-controls":j,"aria-autocomplete":"list",autoComplete:"off",className:` 2 w-full pl-9 pr-9 py-2.5 3 border border-gray-300 rounded-lg 4 text-gray-900 placeholder-gray-400 5 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 6 transition-colors 7 ${x&&C.length>0?"rounded-b-none border-b-transparent":""} 8 `}),t&&(0,l.jsx)("button",{type:"button",onClick:()=>{var e;c(""),null==(e=v.current)||e.focus()},className:"absolute inset-y-0 right-0 pr-3 flex items-center p-1 hover:text-gray-600 transition-colors","aria-label":"Clear city",children:(0,l.jsx)(n.A,{className:"h-4 w-4 text-gray-400"})})]}),x&&C.length>0&&(0,l.jsx)("ul",{id:j,ref:k,role:"listbox",className:" absolute z-50 w-full max-h-64 overflow-y-auto bg-white border border-t-0 border-gray-300 rounded-b-lg shadow-lg ",children:C.map((e,r)=>{let a=r===y,s=e.city.toLowerCase()===(t||"").toLowerCase();return(0,l.jsxs)("li",{role:"option","aria-selected":s,onMouseDown:t=>{t.preventDefault(),D(e)},onMouseEnter:()=>g(r),className:` 9 px-4 py-2.5 cursor-pointer flex items-center justify-between text-sm 10 transition-colors duration-100 11 ${a?"bg-blue-50":""} 12 ${s?"bg-blue-100":""} 13 `,children:[(0,l.jsxs)("span",{className:"min-w-0 flex items-baseline gap-1.5",children:[(0,l.jsx)("span",{className:"font-medium text-gray-900 truncate",children:e.city}),!N&&(0,l.jsxs)("span",{className:"text-gray-500 truncate",children:[", ",e.stateLabel]})]}),(0,l.jsx)("span",{className:"text-gray-400 text-xs font-mono ml-2 flex-shrink-0",children:e.stateCode})]},e.key)})})]})}}}]);
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.