1import{r as l,j as e,a as c,b as a}from"./index-C98cF--x.js";import{M as d}from"./map-pin-BYX1lUep.js";import{A as u}from"./arrow-right-C35h_snH.js";const h={hoboken:"/hoboken",haec:"/haec",gscec:"/gscec",swaec:"/swaec"},m=[{town:"Hoboken",county:"Hudson",zips:["07030"],utility:"PSE&G",slug:"hoboken"},{town:"Bethlehem Township",county:"Hunterdon",zips:["08827","08802"],utility:"JCP&L",slug:"haec"},{town:"Califon Borough",county:"Hunterdon",zips:["07830"],utility:"JCP&L",slug:"haec"},{town:"Lambertville",county:"Hunterdon",zips:["08530"],utility:"JCP&L",slug:"haec"},{town:"Delaware Township",county:"Hunterdon",zips:["08822","08559"],utility:"JCP&L",slug:"haec"},{town:"Flemington Borough",county:"Hunterdon",zips:["08822"],utility:"JCP&L",slug:"haec"},{town:"Frenchtown Borough",county:"Hunterdon",zips:["08825"],utility:"JCP&L",slug:"haec"},{town:"High Bridge Borough",county:"Hunterdon",zips:["08829"],utility:"JCP&L",slug:"haec"},{town:"Kingwood Township",county:"Hunterdon",zips:["08825","08559"],utility:"JCP&L",slug:"haec"},{town:"Mendham Township",county:"Morris",zips:["07945"],utility:"JCP&L",slug:"haec"},{town:"Peapack and Gladstone",county:"Somerset",zips:["07977"],utility:"JCP&L",slug:"haec"},{town:"Stockton Borough",county:"Hunterdon",zips:["08559"],utility:"JCP&L",slug:"haec"},{town:"Clinton",county:"Hunterdon",zips:["08809"],utility:"JCP&L",slug:"haec"},{town:"Washington Township",county:"Morris",zips:["07853","07840"],utility:"JCP&L",slug:"haec"},{town:"Jefferson Township",county:"Morris",zips:["07849","07438","07885"],utility:"JCP&L",slug:"gscec"},{town:"Lincoln Park",county:"Morris",zips:["07035"],utility:"JCP&L",slug:"gscec"},{town:"Mount Olive Township",county:"Morris",zips:["07828","07836","07840"],utility:"JCP&L",slug:"gscec"},{town:"Summit",county:"Union",zips:["07901","07902"],utility:"JCP&L",slug:"gscec"},{town:"Fredon Township",county:"Sussex",zips:["07860"],utility:"JCP&L",slug:"swaec"},{town:"Alpha Borough",county:"Warren",zips:["08865"],utility:"JCP&L",slug:"swaec"},{town:"Andover Borough",county:"Sussex",zips:["07821"],utility:"JCP&L",slug:"swaec"},{town:"Blairstown Township",county:"Warren",zips:["07825"],utility:"JCP&L",slug:"swaec"},{town:"Branchville Borough",county:"Sussex",zips:["07826"],utility:"JCP&L",slug:"swaec"},{town:"Green Township",county:"Sussex",zips:["07821"],utility:"JCP&L",slug:"swaec"}
1,{town:"Hardwick Township",county:"Warren",zips:["07825"],utility:"JCP&L",slug:"swaec"},{town:"Harmony Township",county:"Warren",zips:["08865"],utility:"JCP&L",slug:"swaec"},{town:"Hope Township",county:"Warren",zips:["07844"],utility:"JCP&L",slug:"swaec"},{town:"Oxford Township",county:"Warren",zips:["07863"],utility:"JCP&L",slug:"swaec"}];function p(i){const t=i.trim().toLowerCase();return t.length<2?[]:m.filter(o=>o.town.toLowerCase().includes(t)||o.county.toLowerCase().includes(t)||o.utility.toLowerCase().replace(/[^a-z]/g,"").includes(t.replace(/[^a-z]/g,""))||o.zips.some(n=>n.startsWith(t))||o.slug.includes(t))}function x({compact:i=!1}){const[t,o]=l.useState(""),n=l.useMemo(()=>p(t),[t]),r=t.trim().length>=2;return e.jsx("div",{id:"find-my-program",className:"scroll-mt-24",children:e.jsxs("div",{className:"rounded-2xl border border-emerald-900/10 bg-white p-5 shadow-sm md:p-6",children:[!i&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-2xl font-semibold md:text-3xl",children:"Find My Program"}),e.jsx("p",{className:"mt-2 text-sm text-[#0F2C5C]/70",children:"Search by municipality, ZIP code, county or utility territory."})]}),e.jsxs("label",{className:"mt-4 flex items-center gap-2 rounded-xl border border-emerald-900/15 bg-emerald-50/40 px-3 py-2 focus-within:border-emerald-600/60",children:[e.jsx(c,{className:"h-4 w-4 text-emerald-700","aria-hidden":!0}),e.jsx("input",{value:t,onChange:s=>o(s.target.value),maxLength:60,placeholder:"e.g. Hoboken, 07030, Hunterdon, JCP&L","aria-label":"Search municipality, ZIP code, county or utility",className:"h-10 w-full bg-transparent text-sm outline-none placeholder:text-[#0F2C5C]/40"})]}),r&&n.length>0&&e.jsx("ul",{className:"mt-4 divide-y divide-emerald-900/10 overflow-hidden rounded-xl border border-emerald-900/10",children:n.map(s=>e.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-3 bg-white px-4 py-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(d,{className:"h-4 w-4 text-emerald-700","aria-hidden":!0})," ",s.town]}),e.jsxs("div",{className:"mt-0.5 text-xs text-[#0F2C5C]/60",children:[s.county," County · ",s.utility," · ",s.zips.join(", ")]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(a,{to:h[s.slug],
1className:"inline-flex items-center gap-1 rounded-md bg-emerald-600 px-3 py-2 text-xs font-semibold text-white hover:bg-emerald-500",children:["View program ",e.jsx(u,{className:"h-3.5 w-3.5"})]}),e.jsx(a,{to:"/account-lookup",className:"rounded-md border border-emerald-600/30 px-3 py-2 text-xs font-semibold text-[#0F2C5C] hover:border-emerald-600/60",children:"Access my account"})]})]},`${s.town}-${s.slug}`))}),r&&n.length===0&&e.jsxs("div",{className:"mt-4 rounded-xl border border-emerald-900/10 bg-emerald-50/40 p-4",children:[e.jsx("p",{className:"text-sm text-[#0F2C5C]/80",children:"Your municipality may not currently participate in a listed aggregation program."}),e.jsxs("a",{href:"#get-started",className:"mt-3 inline-flex items-center gap-2 rounded-md bg-[#0F2C5C] px-4 py-2 text-xs font-semibold text-white hover:bg-[#0F2C5C]/90",children:["Get Your Town Started Today ",e.jsx(u,{className:"h-3.5 w-3.5"})]})]})]})})}export{x as P};
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.