PageSourceSearch

https://www.sendoff.ai/_next/static/chunks/app/search-2/page-81f267efb7c6de58.js

js sendoff.ai collected 2026-10-05 15:20:43 UTC 23,540 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7608],{58528:function(e,l,a){Promise.resolve().then(a.bind(a,46134))},46134:function(e,l,a){"use strict";a.d(l,{default:function(){return g}});var t=a(24940),r=a(91481),s=a(49429);a(37672),a(35355);var n=a(62170),o=a(15082),i=a(71414),u=a(86001),c=a(71086);let d="https://yyodxeptkstowodgkfxv.supabase.co",b="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inl5b2R4ZXB0a3N0b3dvZGdrZnh2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjMxMjY2OTYsImV4cCI6MjAzODcwMjY5Nn0.Ljg_q-xd3lJmnOFKU0c-zC9LB4ACBDrNr_5RSuFcFkI";if(!d||!b)throw Error("Supabase environment variables are not set.");let m=(0,o.eI)(d,b);function p(e){var l,a;let t=function(e){if(!e)return e;let l=e.split("/");return l.length>1?l[l.length-1]:e}(e.id),r=function(e){var l;let a=e.match(/,\s*([A-Z]{2})\s*(\d{5}(-\d{4})?)?(\s|,|$)/);return null!==(l=null==a?void 0:a[1])&&void 0!==l?l:""}(e.address||""),s=e.primaryType||(null!==(a=null===(l=e.types)||void 0===l?void 0:l[0])&&void 0!==a?a:""),n="number"==typeof e.rating&&Number.isFinite(e.rating)?e.rating:null,o="number"==typeof e.userRatingCount&&Number.isFinite(e.userRatingCount)?e.userRatingCount:null;return{place_id:t,name:e.name||"",vicinity:e.address||"",rating:n,user_ratings_total:o,website:e.website||"",phone:e.phone||"",business_type:s,state:r,raw:e.raw}}let h=new Set(["general_contractor","establishment","point_of_interest","plus_code","political","finance","food","health","landmark","natural_feature","neighborhood","geocode","place_of_worship","administrative_area_level_3","administrative_area_level_4","administrative_area_level_5","administrative_area_level_6","administrative_area_level_7","archipelago","colloquial_area","continent","intersection","postal_code_prefix","postal_code_suffix"]);function g(e){let{userEmail:l}=e,[a,o]=(0,r.useState)(""),[d,b]=(0,r.useState)(null),[g,f]=(0,r.useState)(null),[v,y]=(0,r.useState)([]),[x,w]=(0,r.useState)([]),[N,k]=(0,r.useState)(5e3),[_,C]=(0,r.useState)(0),[j,S]=(0,r.useState)(!1),[A,I]=(0,r.useState)(""),[R,M]=(0,r.useState)([]),[T,z]=(0,r.useState)(!1),[E,P]=(0,r.useState)([]),[O,W]=(0,r.useState)(!1),[D,F]=(0,r.useState)(null),[V,L]=(0,r.useState)(null),J=(0,r.useRef)(null),[Y,Z]=(0,r.useState)(null),[q,B]=(0,r.useState)(null),H=(0,r.useRef)(null),U=(0,r.useRef)(new Set),G=(0,r.useRef)(null),K=(0,r.useRef)(null),Q={padding:"12px"},X=[{value:"AL",label:"Alabama"},{value:"AK",label:"Alaska"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"DC",label:"District of Columbia"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PA",label:"Pennsylvania"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}],$=[{headerName:"",checkboxSelection:!0,headerCheckboxSelection:!0,width:60,pinned:"left",headerClass:"custom-header-class",cellStyle:Q}
1,{headerName:"Business Name",field:"name",sortable:!0,filter:!0,resizable:!0,cellStyle:Q,headerClass:"custom-header-class",minWidth:220},{headerName:"Address",field:"vicinity",sortable:!0,filter:!0,resizable:!0,cellStyle:Q,headerClass:"custom-header-class",minWidth:260},{headerName:"State",field:"state",sortable:!0,filter:!0,resizable:!0,cellStyle:Q,headerClass:"custom-header-class",minWidth:100},{headerName:"Rating",field:"rating",sortable:!0,filter:"agNumberColumnFilter",resizable:!0,cellStyle:Q,headerClass:"custom-header-class",minWidth:110,valueFormatter:e=>null==e.value?"":e.value},{headerName:"Reviews",field:"user_ratings_total",sortable:!0,filter:"agNumberColumnFilter",resizable:!0,cellStyle:Q,headerClass:"custom-header-class",minWidth:110,valueFormatter:e=>null==e.value?"":e.value},{headerName:"Website",field:"website",resizable:!0,cellRenderer:e=>e.value?(0,t.jsx)("a",{href:e.value,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:e.value}):"",cellStyle:Q,headerClass:"custom-header-class",minWidth:220},{headerName:"Phone Number",field:"phone",sortable:!0,filter:!0,resizable:!0,cellStyle:Q,headerClass:"custom-header-class",minWidth:160},{headerName:"Business Type",field:"business_type",sortable:!0,filter:!0,resizable:!0,cellStyle:Q,headerClass:"custom-header-class",minWidth:160}];(0,r.useEffect)(()=>{(async()=>{try{let{data:e,error:l}=await m.from("business_types").select("*").order("category",{ascending:!0}).order("display_name",{ascending:!0});l?console.error("Error fetching business types:",l):y(e)}catch(e){console.error("Error fetching business types:",e)}})()},[]),(0,r.useEffect)(()=>{let e=async()=>{try{let{data:e,error:a}=await m.from("user_default_business_types").select("business_type_id").eq("user_email",l);if(a)console.error("Error fetching user's default business types:",a);else{let l=(e||[]).map(e=>e.business_type_id);w(l)}}catch(e){console.error("Error fetching user's default business types:",e)}};l&&e()},[l]),(0,r.useEffect)(()=>{let e=()=>{if(window.google&&window.google.maps&&window.google.maps.places&&G.current){let e=new window.google.maps.places.Autocomplete(G.current,{types:["geocode"],fields:["place_id","geometry","formatted_address"],componentRestrictions:{country:["us"]}});e.addListener("place_changed",()=>{var l;let a=e.getPlace();if(null==a?void 0:null===(l=a.geometry)||void 0===l?void 0:l.location){let e=a.geometry.location.lat(),l=a.geometry.location.lng();b(e),f(l),o(a.formatted_address||"")}else console.error("No geometry or location found for the selected place.")})}else console.error("Google Maps JavaScript API library not loaded yet.")};window.initAutocomplete=e,(()=>{if(document.getElementById("googleMaps"))window.google&&window.google.maps&&window.google.maps.places&&e();else{let e=document.createElement("script");e.id="googleMaps",e.src="https://maps.googleapis.com/maps/api/js?key=".concat("AIzaSyDH2IkGa91g86I26immZF1Yi7vpp6CZblA","&libraries=places&callback=initAutocomplete"),e.async=!0,e.defer=!0,document.head.appendChild(e)}})()},[]);let ee=(0,r.useMemo)(()=>v.map(e=>({value:e.id,label:e.display_name||e.name.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),category:e.category})),[v]),el=(0,r.useMemo)(()=>v.reduce((e,l)=>{let a=e.find(e=>e.label===l.category),t={value:l.id,label:l.display_name||l.name.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),category:l.category};return a?a.options.push(t):e.push({label:l.category,options:[t]}),e},[]),[v]);function ea(){return v.filter(e=>x.includes(e.id)).map(e=>e.name)}function et(){return v.filter(e=>x.includes(e.id)).map(e=>e.display_name||e.name.replace(/_/g," ")).join(", ")}function er(e){return e.filter(Boolean).map(e=>e.trim()).filter(e=>!h.has(e)).slice(0,50)}function es(e){let l=er(ea()),a=et();return A.trim()?{body:{mode:"text",query:A.trim(),lat:null!=d?d:void 0,lng:null!=g?g:void 0,radius:N||void 0,pageToken:null!=e?e:void 0,maxResultCount:20,openNow:j||void 0},fallbackTextQuery:void 0}:l.length>0?null==d||null==g?null:{body:{mode:"nearby",lat:d,lng:g,radius:N,includedTypes:l,pageToken:null!=e?e:void 0,maxResultCount:20,openNow:j||void 0},fallbackTextQuery:a||void 0}:{body:{mode:"text",query:a||"business",lat:null!=d?d:void 0,lng:null!=g?g:void 0,radius:N||void 0,pageToken:null!=e?e:void 0,maxResultCount:20,openNow:j||void 0},fallbackTextQuery:void 0}}async function en(e){let l=await fetch("/api/places",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!l.ok)throw Error(await l.text()||"Places error");return await l.json()}async function eo(e,l){let a=er(ea()),t=et(),r={radius:N,cursor:null!=e?e:null,pageSize:120,openNow:j||void 0,minRating:_};T?r.allStates=!0:r.states=R,l?r.query=l:A.trim()?r.query=A.trim():a.length?r.includedTypes=a:r.query=t||"business";let s=await fetch("/api/state-scan-multi",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok)throw Error(await s.text()||"State-scan (multi) error");return await s.json()}function ei(e){let l=e.map(p).filter(e=>null==e.rating||e.rating>=_),a=j?l.filter(e=>{var l,a;return(null===(a=e.raw)||void 0===a?void 0:null===(l=a.currentOpeningHours)||void 0===l?void 0:l.openNow)===!0}):l,t=[];for(let e of a){let l=e.place_id;!l||U.current.has(l)||(U.current.add(l),t.push(e))}P(e=>e.concat(t))}async function eu(e){if(L(null!=e?e:null),J.current=null,e){await new Promise(e=>setTimeout(e,2100));try{let l=es(e);if(!l)return;let a=await en(l.body);J.current={token:e,data:a}}catch(e){}}}
1async function ec(e){if(B(null!=e?e:null),H.current=null,e)try{let l=await eo(e);H.current={cursor:e,data:{places:l.places,cursor:l.cursor}}}catch(e){}}let ed=T||R.length>0,eb=async()=>{let e=A;if(!e&&x.length>0&&(e=v.filter(e=>x.includes(e.id)).map(e=>e.display_name||e.name.replace(/_/g," ")).join(", ")),!e&&0===x.length){c.Am.error("Please enter keywords or select at least one business type.");return}if(!ed&&(!d||!g)){c.Am.error("Please enter a valid address or choose states.");return}if(!T&&0===R.length&&ed){c.Am.error("Select at least one state or enable “All states”.");return}W(!0),P([]),F(null),Z(null),L(null),B(null),J.current=null,H.current=null,U.current=new Set;try{if(ed)try{let{places:e,cursor:l,events:a,stats:t}=await eo(null);(null==a?void 0:a.length)&&console.log("[state-scan-multi events]",a),t&&console.log("[state-scan-multi stats]",t),ei(e),Z(null!=l?l:null),ec(null!=l?l:null)}catch(e){if(String((null==e?void 0:e.message)||"").includes("Unsupported types")){let e=et()||"business",{places:l,cursor:a}=await eo(null,e);ei(l),Z(null!=a?a:null),ec(null!=a?a:null)}else throw e}else{let e=es(null);if(!e){c.Am.error("Please set a valid location or query."),W(!1);return}try{let{places:l,nextPageToken:a}=await en(e.body);ei(l),F(null!=a?a:null),eu(null!=a?a:null)}catch(a){var l;if(String((null==a?void 0:a.message)||"").includes("Unsupported types")&&(null===(l=e.body)||void 0===l?void 0:l.mode)==="nearby"&&e.fallbackTextQuery){let{places:l,nextPageToken:a}=await en({mode:"text",query:e.fallbackTextQuery,lat:e.body.lat,lng:e.body.lng,radius:e.body.radius,maxResultCount:e.body.maxResultCount,openNow:e.body.openNow});ei(l),F(null!=a?a:null),eu(null!=a?a:null)}else throw a}}}catch(e){console.error("Error fetching businesses:",(null==e?void 0:e.message)||e),c.Am.error("An error occurred while fetching businesses.")}finally{W(!1)}},em=async()=>{W(!0);try{if(ed){if(!Y){c.Am.error("No more results."),W(!1);return}if(H.current&&H.current.cursor===Y){let{places:e,cursor:l}=H.current.data;ei(e),Z(null!=l?l:null),ec(null!=l?l:null)}else try{let{places:e,cursor:l}=await eo(Y);ei(e),Z(null!=l?l:null),ec(null!=l?l:null)}catch(e){if(String((null==e?void 0:e.message)||"").includes("Unsupported types")){let e=et()||"business",{places:l,cursor:a}=await eo(Y,e);ei(l),Z(null!=a?a:null),ec(null!=a?a:null)}else throw e}}else{if(!D){c.Am.error("No more results."),W(!1);return}let l=es(D);if(!l){c.Am.error("Invalid search configuration."),W(!1);return}if(J.current&&J.current.token===D){let{places:e,nextPageToken:l}=J.current.data;ei(e),F(null!=l?l:null),eu(null!=l?l:null)}else try{let{places:e,nextPageToken:a}=await en(l.body);ei(e),F(null!=a?a:null),eu(null!=a?a:null)}catch(a){var e;if(String((null==a?void 0:a.message)||"").includes("Unsupported types")&&(null===(e=l.body)||void 0===e?void 0:e.mode)==="nearby"&&l.fallbackTextQuery){let{places:e,nextPageToken:a}=await en({mode:"text",query:l.fallbackTextQuery,lat:l.body.lat,lng:l.body.lng,radius:l.body.radius,maxResultCount:l.body.maxResultCount,openNow:l.body.openNow});ei(e),F(null!=a?a:null),eu(null!=a?a:null)}else throw a}}}catch(e){console.error("Load more error:",(null==e?void 0:e.message)||e),c.Am.error("An error occurred while loading more.")}finally{W(!1)}},ep=async()=>{if(!K.current){console.error("Grid reference is not available."),c.Am.error("Grid reference not available.");return}let e=K.current.api.getSelectedNodes().map(e=>e.data);if(!l){c.Am.error("You need to be logged in to save businesses.");return}if(e&&e.length>0){let a=e.map(e=>({user_email:l,place_id:e.place_id,name:e.name,vicinity:e.vicinity,rating:null==e.rating?null:Number(e.rating),user_ratings_total:null==e.user_ratings_total?null:Number(e.user_ratings_total),website:e.website||"",phone:e.phone||"",business_type:e.business_type,state:e.state}));try{let{error:e}=await m.from("saved_businesses").upsert(a,{onConflict:"user_email,place_id"});e?(console.error("Error saving businesses:",e),c.Am.error("An error occurred while saving businesses: ".concat(e.message))):c.Am.success("Selected businesses saved.")}catch(e){console.error("Error during Supabase upsert:",e),c.Am.error("An unexpected error occurred: ".concat(e.message))}}else c.Am.error("No businesses selected.")},eh=async()=>
1{if(!l){c.Am.error("You need to be logged in to save default business types.");return}try{let{error:e}=await m.from("user_default_business_types").delete().eq("user_email",l);if(e){console.error("Error deleting existing default business types:",e),c.Am.error("An error occurred while saving default business types.");return}let a=x.map(e=>({user_email:l,business_type_id:e})),{error:t}=await m.from("user_default_business_types").insert(a);t?(console.error("Error saving default business types:",t),c.Am.error("An error occurred while saving default business types.")):c.Am.success("Default business types saved.")}catch(e){console.error("Error saving default business types:",e),c.Am.error("An unexpected error occurred while saving default business types.")}},eg=ee.filter(e=>x.includes(e.value)),ef=X.filter(e=>R.includes(e.value));return(0,t.jsxs)("div",{className:"p-4 width-80",children:[(0,t.jsx)(c.x7,{}),(0,t.jsx)("h1",{className:"text-4xl font-bold mb-6 text-center",children:"Business Search (v2)"}),(0,t.jsxs)("div",{className:"mb-6 max-w-5xl mx-auto space-y-5",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{z(!1),M([])},className:"px-3 py-2 rounded border ".concat(ed?"bg-white text-black":"bg-black text-white"),"aria-pressed":!ed,children:"Address scope"}),(0,t.jsx)("button",{type:"button",onClick:()=>{ed||M(["NJ"])},className:"px-3 py-2 rounded border ".concat(ed?"bg-black text-white":"bg-white text-black"),"aria-pressed":ed,children:"State scope"})]}),(0,t.jsxs)("div",{className:"".concat(ed?"block":"hidden"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("input",{id:"allStates",type:"checkbox",className:"h-4 w-4",checked:T,onChange:e=>{z(e.target.checked)}}),(0,t.jsx)("label",{htmlFor:"allStates",className:"text-lg font-semibold",children:"All states"})]}),(0,t.jsx)(u._,{className:"text-lg font-semibold mb-2 ".concat(T?"opacity-50":""),children:"Select States"}),(0,t.jsx)(i.ZP,{isMulti:!0,isDisabled:T,options:X,value:ef,onChange:e=>{M(Array.isArray(e)?e.map(e=>e.value):[]),o(""),b(null),f(null)},placeholder:"Choose one or more states…",className:"basic-multi-select",classNamePrefix:"select",styles:{option:e=>({...e,color:"black"}),control:e=>({...e,backgroundColor:"white",borderColor:"#d1d5db",minHeight:"56px"}),input:e=>({...e,color:"black"}),placeholder:e=>({...e,color:"#6b7280"}),singleValue:e=>({...e,color:"black"}),menu:e=>({...e,zIndex:9999}),multiValue:e=>({...e,backgroundColor:"#e5e7eb"}),multiValueLabel:e=>({...e,color:"black",fontSize:"16px"}),multiValueRemove:e=>({...e,color:"black",":hover":{backgroundColor:"#d1d5db",color:"black"}})}}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"We’ll scan the selected states using ZIP centroids spaced ~50km apart."})]}),(0,t.jsxs)("div",{className:"".concat(ed?"hidden":"block"),children:[(0,t.jsx)(u._,{className:"text-lg font-semibold mb-2",children:"Search Near Address"}),(0,t.jsx)("input",{ref:G,type:"text",placeholder:"Enter an address",value:a,onChange:e=>o(e.target.value),className:"w-full p-4 border border-gray-300 rounded-lg mb-1 bg-white text-black text-lg"}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"Pick an address from suggestions to set coordinates."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(u._,{className:"text-lg font-semibold mb-2",children:"Keywords (free text)"}),(0,t.jsx)("input",{type:"text",value:A,onChange:e=>I(e.target.value),placeholder:"e.g., landscaping, pediatric dentist",className:"w-full p-3 border border-gray-300 rounded-lg bg-white text-black"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"You can also select business types below; if you leave keywords empty and choose types, we’ll search by types (when allowed) or fall back to text automatically."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(u._,{className:"text-lg font-semibold mb-2",children:"Business Types"}),(0,t.jsx)(i.ZP,{isMulti:!0,options:el,value:eg,onChange:e=>{w(e?e.map(e=>e.value):[])},placeholder:"Search and select business types...",className:"basic-multi-select",classNamePrefix:"select",styles:{option:e=>({...e,color:"black"}),control:e=>({...e,backgroundColor:"white",borderColor:"#d1d5db",minHeight:"56px"}),input:e=>({...e,color:"black"}),placeholder:e=>({...e,color:"#6b7280"}),singleValue:e=>({...e,color:"black"}),menu:e=>({...e,zIndex:9999}),multiValue:e=>({...e,backgroundColor:"#e5e7eb"}),multiValueLabel:e=>({...e,color:"black",fontSize:"16px"}),multiValueRemove:e=>({...e,color:"black",":hover":{backgroundColor:"#d1d5db",color:"black"}})}}),(0,t.jsx)(n.z,{onClick:eh,className:"mt-4 bg-green-500 hover:bg-green-600 text-white",children:"Save as Default"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(u._,{className:"text-lg font-semibold mb-2 ".concat(ed?"opacity-50":""),children:"Radius"}),(0,t.jsx)("select",{value:N,onChange:e=>k(parseInt(e.target.value)),disabled:ed,className:"w-full p-3 border border-gray-300 rounded-lg bg-white text-black",children:[{label:"1 km",value:1e3},{label:"5 km",value:5e3},{label:"10 km",value:1e4},{label:"20 km",value:2e4},{label:"50 km",value:5e4}].map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(u._,{className:"text-lg font-semibold mb-2",children:"Minimum Rating"}),(0,t.jsx)("input",{type:"number",min:"0",max:"5",step:"0.1",value:_,onCh
1ange:e=>C(parseFloat(e.target.value)),className:"w-full p-3 border border-gray-300 rounded-lg bg-white text-black"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Unrated businesses are kept; the threshold applies only when a rating exists."})]}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",id:"openNow",checked:j,onChange:e=>S(e.target.checked),className:"form-checkbox h-5 w-5 text-blue-600"}),(0,t.jsx)("label",{htmlFor:"openNow",className:"ml-2 text-lg",children:"Open Now"})]})]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{onClick:()=>{eb()},disabled:O,className:"flex-1 mt-2 bg-blue-500 hover:bg-blue-600 text-white py-3 rounded-lg transition disabled:opacity-50",children:O?"Searching…":"Search"}),(0,t.jsx)("button",{type:"button",onClick:()=>{I(""),w([]),ed?Z(null):(o(""),b(null),f(null),F(null))},className:"mt-2 px-4 py-3 rounded-lg border",children:"Reset"})]})]}),E.length>0?(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("div",{className:"ag-theme-alpine",style:{height:"80vh",width:"100%"},children:(0,t.jsx)(s.s,{ref:K,rowData:E,columnDefs:$,defaultColDef:{flex:1,minWidth:120,resizable:!0,sortable:!0,filter:!0,cellStyle:Q,headerStyle:{padding:"12px",fontWeight:"bold",fontSize:"16px"}},rowSelection:"multiple",pagination:!0,paginationPageSize:20,suppressRowClickSelection:!1,onGridReady:()=>{var e;return null===(e=K.current)||void 0===e?void 0:e.api.sizeColumnsToFit()},rowHeight:60,headerHeight:60})}),(0,t.jsxs)("div",{className:"mt-6 flex flex-col sm:flex-row sm:justify-between items-center",children:[(0,t.jsx)(n.z,{onClick:ep,className:"bg-green-500 hover:bg-green-600 text-white mb-4 sm:mb-0",children:"Save Selected"}),(ed?null!==Y:null!==D)&&(0,t.jsx)(n.z,{onClick:em,disabled:O,className:"bg-blue-500 hover:bg-blue-600 text-white",children:O?"Loading...":"Load More"})]}),(0,t.jsx)("div",{className:"mt-2 text-xs text-gray-400",children:ed?q&&(0,t.jsx)("span",{children:"Prefetched next chunk is ready"}):V&&(0,t.jsx)("span",{children:"Prefetched next page is ready"})})]}):(0,t.jsx)("p",{className:"text-center text-gray-500 mt-8 text-lg",children:O?"Loading...":"No results found."})]})}},62170:function(e,l,a){"use strict";a.d(l,{d:function(){return i},z:function(){return u}});var t=a(24940),r=a(91481),s=a(83699),n=a(81146),o=a(35055);let i=(0,n.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-red-500 text-white hover:bg-red-400",outline:"border border-gray-600 bg-gray-800 text-white hover:bg-gray-700",secondary:"bg-gray-700 text-white hover:bg-gray-600",ghost:"text-white hover:bg-gray-700 hover:text-white",link:"text-blue-400 underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),u=r.forwardRef((e,l)=>{let{className:a,variant:r,size:n,asChild:u=!1,...c}=e,d=u?s.g7:"button";return(0,t.jsx)(d,{className:(0,o.cn)(i({variant:r,size:n,className:a})),ref:l,...c})});u.displayName="Button"},86001:function(e,l,a){"use strict";a.d(l,{_:function(){return u}});var t=a(24940),r=a(91481),s=a(64787),n=a(81146),o=a(35055);let i=(0,n.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),u=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,t.jsx)(s.f,{ref:l,className:(0,o.cn)(i(),a),...r})});u.displayName=s.f.displayName},35055:function(e,l,a){"use strict";a.d(l,{cn:function(){return s}});var t=a(60050),r=a(70470);function s(){for(var e=arguments.length,l=Array(e),a=0;a<e;a++)l[a]=arguments[a];return(0,r.m6)((0,t.W)(l))}}},function(e){e.O(0,[6616,5512,7874,2071,672,5082,1086,3587,9429,2091,8965,4797,1744],function(){return e(e.s=58528)}),_N_E=e.O()}]);

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.