PageSourceSearch

https://weatherbox.io/_next/static/chunks/app/search/page-02d69408-8e653f87f33f085f.js

js weatherbox.io collected 2026-10-02 21:05:45 UTC 33,121 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4287],{77956:(e,s,t)=>{"use strict";t.d(s,{default:()=>$});var a=t(95155),l=t(12115),r=t(73321);t(37687);var i=t(77618),n=t(5772),o=t(98500),d=t.n(o),c=t(86699),m=t(79972),x=t(31253);t(49603);var h=t(37206),u=t(12594),b=t(12775),p=t(70265),g=t(70203),f=t(14727),v=t(13267),j=t(38323),y=t(67564),N=t(97307),w=t(12505);let _=(0,h.default)(()=>Promise.all([t.e(6648),t.e(1070),t.e(5829),t.e(3193)]).then(t.bind(t,95815)),{loadableGenerated:{webpack:()=>[95815]},ssr:!1,loading:()=>(0,a.jsx)("div",{className:"h-[350px] rounded-lg border-2 border-gray-200 bg-gray-50 flex items-center justify-center",children:(0,a.jsxs)("div",{className:"text-gray-400 flex flex-col items-center",children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-sky-500 mb-2"}),(0,a.jsx)("p",{className:"text-sm font-medium",children:"Loading map..."})]})})}),k=e=>{let s=parseFloat(e);return Number.isFinite(s)?s:null};function $({query:e="",lat:s="",lon:t="",initialResults:o,nominatimResults:h,labels:S,locale:C="en"}){let L=Array.isArray(o)?o:[],M=Array.isArray(h)?h:[],z=e||"",P=(s||"").toString().trim(),F=(t||"").toString().trim(),A=""!==z||""!==P||""!==F,[O,E]=(0,l.useState)(z),[R,I]=(0,l.useState)(P),[U,Z]=(0,l.useState)(F),[W,J]=(0,l.useState)(A),[K,G]=(0,l.useState)(!1),T=(0,r.useRouter)(),V=S?.search_input_placeholder||"Search for a city, country, or location",q=S?.search_input_button||"Search",D=S?.search_lat_placeholder||"e.g. 45.8",B=S?.search_lon_placeholder||"e.g. 6.5",[H,Q]=(0,l.useState)({}),[X,Y]=(0,l.useState)({}),[ee,es]=(0,l.useState)({}),[et,ea]=(0,l.useState)(null),[el,er]=(0,l.useState)(null),[ei,en]=(0,l.useState)(!1),[eo,ed]=(0,l.useState)(0),[ec,em]=(0,l.useState)({}),[ex,eh]=(0,l.useState)(6),eu=O.trim(),eb=R.trim(),ep=U.trim(),eg=eu.length>0,ef=eb.length>0&&ep.length>0,ev=eb.length>0||ep.length>0,ej=eu.length>0,[ey,eN]=(0,l.useState)(null),ew=k(eb),e_=k(ep),ek=null!==ew&&null!==e_,e$=k(P),eS=k(F),eC=null!==e$&&null!==eS,eL=eg&&ek||!eg&&!ek,eM=ef&&!ek,ez=eg&&ef,eP="Please provide either a search term or coordinates, not both.",eF=L.some(e=>"location"===e.result_type);l.useEffect(()=>{E(z),I(P),Z(F),G(!1),er(null),ea(null)},[z,P,F]),l.useEffect(()=>{J(A)},[A]),l.useEffect(()=>{Object.keys(H).forEach(e=>{let s=H[e]||[],t=ec[e]||4,a=s.slice(0,t),l=M.find(s=>s.place_id===e);if(l){let s=k(l.lat),t=k(l.lon),r=((e,s=[])=>{let t=[];return e&&t.push(e),Array.isArray(s)&&s.forEach(e=>{let s=k(e.lat),a=k(e.lon);null!==s&&null!==a&&t.push([s,a])}),t})(null!==s&&null!==t?[s,t]:null,a),i=(0,f.L)(r);i&&es(s=>({...s,[e]:i}))}})},[H,ec,M]);let eA=async e=>{if(e.preventDefault(),eL)return;let s=new URLSearchParams;eg?s.set("q",eu):ek&&(s.set("lat",eb),s.set("lon",ep));let t=s.toString(),a=t?`/search?${t}`:"/search";J(!0),G(!0),await new Promise(e=>setTimeout(e,1400));let l=ek?eb:"",r=ek?ep:"",i=(eg?eu:"")!==z||l!==P||r!==F;try{await T.push(a),i||G(!1)}catch(e){G(!1)}},eO=l.useMemo(()=>eC?[e$,eS]:null,[eC,e$,eS]),eE=l.useMemo(()=>eC?L.reduce((e,s,t)=>{if("location"!==s.result_type)return e;let a=k(s.lat),l=k(s.lon);if(null===a||null===l)return e;let r=s.file_id||`coordinate-${t}`,n=(0,i.E5)(e$,eS,a,l);return e.push({position:[a,l],name:s.name||"Location",displayName:s.country||"",type:"coordinate-result",placeId:r,distanceKm:n,iso2:s.iso2||"",state:s.state||"",country:s.country||""}),e},[]):[],[L,eC,e$,eS]),eR=l.useMemo(()=>eE.reduce((e,s)=>(s.placeId&&"number"==typeof s.distanceKm&&(e[s.placeId]=s.distanceKm),e),{}),[eE]),eI=l.useMemo(()=>eE.slice(0,ex),[eE,ex]),eU=eC&&eE.length>0&&eF;et&&M.find(e=>e.place_id===et),et&&(H[et]||[]).slice(0,ec[et]||4);let eZ=1!==M.length;l.useEffect(()=>{if(1===M.length&&!el){let e=M[0];er(e.place_id),eJ(e.lat,e.lon,e.place_id)}},[M,el]),(new Date().getMonth()+1).toString().padStart(2,"0");let eW=e=>{ea(e),er(e);let s=M.find(s=>s.place_id===e);s&&!H[e]&&eJ(s.lat,s.lon,e)},eJ=async(e,s,t)=>{if(!H[t]){Y(e=>({...e,[t]:!0}));try{let a=await (0,b.v)(e,s,8);Q(e=>({...e,[t]:a||[]}))}catch(e){}finally{Y(e=>({...e,[t]:!1}))}}},eK=""!==z||""!==P&&""!==F,eG=K||eK,eT=L.length>0||M.length>0,eV=eC?(0,i.NC)(e$,eS,C,1):`${P}, ${F}`,eq=""!==z?z:eV,eD=""!==z?((e,s="en")=>{let t=(s||"en").toLowerCase();return t.startsWith("ja")||t.startsWith("zh")?`「${e}」`:t.startsWith("es")?`\xab${e}\xbb`:`“${e}”`})(z,C):eq,eB=eT?S?.search_results_for?(0,g.A)(S.search_results_for,{query:eD}):`Search Results for ${eD}`:S?.search_results_title||"Search Results",eH=S?.search_empty_results_title||"Results will appear here",eQ=S?.search_empty_results_description||"Search by place name or coordinates to load WeatherBox matches, nearby locations, and map-based results.";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.A,{badge:S?.search_badge||"Search",badgeIcon:j.zfp,title:S?.search_page_title||"Search the world's weather locations",description:S?.search_page_subtitle||"Find climate guides, travel insights, and nearby weather records by location or coordinates",className:"mb-0",children:(0,a.jsxs)("form",{onSubmit:eA,role:"search",className:"mx-auto mt-10 w-full max-w-5xl",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-4 roun
1ded-3xl border border-slate-200 bg-white/80 p-6 shadow-md backdrop-blur-sm",children:[(0,a.jsxs)("div",{className:`flex-1 min-w-[240px] ${ev?"opacity-80":""}`,children:[(0,a.jsx)("label",{htmlFor:"search-input",className:"sr-only",children:V}),(0,a.jsxs)("div",{className:"relative group",children:[(0,a.jsx)("input",{id:"search-input",name:"q",type:"search",value:O,onChange:e=>{E(e.target.value)},placeholder:V,disabled:ev,className:`w-full rounded-xl border px-4 py-3 text-lg transition ${ev?"border-slate-200 bg-slate-100 text-slate-500":"border-slate-400 bg-white text-slate-800"} focus:border-sky-500 focus:outline-none focus:ring-2 focus:ring-sky-200`}),""!==eu&&(0,a.jsx)("button",{type:"button",onClick:()=>{E("")},className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-full bg-slate-100 p-1 text-slate-600 transition hover:bg-slate-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-sky-500","aria-label":"Clear search",children:(0,a.jsx)(j.$8F,{className:"h-3.5 w-3.5"})}),ev&&(0,a.jsx)("div",{className:"pointer-events-none absolute left-1/2 -top-10 z-10 w-[220px] -translate-x-1/2 transform rounded-xl border border-rose-200 bg-rose-50 px-3 py-2 text-xs font-semibold text-rose-700 opacity-0 transition duration-150 group-hover:opacity-100",children:eP})]})]}),(0,a.jsx)("div",{className:"flex items-center justify-center px-3 text-3xl font-semibold tracking-wide text-slate-700",children:S?.search_or_label||"- OR -"}),(0,a.jsx)("div",{className:`flex-1 min-w-[240px] ${ej?"opacity-80":""}`,children:(0,a.jsxs)("div",{className:"relative group",children:[(0,a.jsxs)("div",{className:`grid grid-cols-2 overflow-hidden rounded-xl border shadow-sm ${ej?"border-slate-200 bg-slate-100":"border-slate-400 bg-white"}`,children:[(0,a.jsxs)("div",{className:"relative flex flex-col gap-1 border-r border-slate-200 px-4 py-2",children:[(0,a.jsx)("label",{htmlFor:"search-lat",className:"text-xs font-semibold uppercase tracking-wider text-slate-500",children:S?.search_lat||"Latitude"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{id:"search-lat",name:"lat",type:"text",inputMode:"decimal",value:R,onChange:e=>{I(e.target.value)},placeholder:D,disabled:ej,className:"w-full rounded-none border-0 bg-transparent px-0 py-1 text-sm text-slate-800 focus:border-transparent focus:outline-none focus:ring-0 disabled:text-slate-500"}),""!==eb&&(0,a.jsx)("button",{type:"button",onClick:()=>{I("")},className:"absolute right-0 top-1/2 -translate-y-1/2 rounded-full bg-slate-100 p-1 text-slate-600 transition hover:bg-slate-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-sky-500","aria-label":"Clear latitude",children:(0,a.jsx)(j.$8F,{className:"h-3 w-3"})})]})]}),(0,a.jsxs)("div",{className:"relative flex flex-col gap-1 px-4 py-2",children:[(0,a.jsx)("label",{htmlFor:"search-lon",className:"text-xs font-semibold uppercase tracking-wider text-slate-500",children:S?.search_lon||"Longitude"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{id:"search-lon",name:"lon",type:"text",inputMode:"decimal",value:U,onChange:e=>{Z(e.target.value)},placeholder:B,disabled:ej,className:"w-full rounded-none border-0 bg-transparent px-0 py-1 text-sm text-slate-800 focus:border-transparent focus:outline-none focus:ring-0 disabled:text-slate-500"}),""!==ep&&(0,a.jsx)("button",{type:"button",onClick:()=>{Z("")},className:"absolute right-0 top-1/2 -translate-y-1/2 rounded-full bg-slate-100 p-1 text-slate-600 transition hover:bg-slate-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-sky-500","aria-label":"Clear longitude",children:(0,a.jsx)(j.$8F,{className:"h-3 w-3"})})]})]})]}),ej&&(0,a.jsx)("div",{className:"pointer-events-none absolute left-1/2 -top-10 z-10 w-[220px] -translate-x-1/2 transform rounded-xl border border-rose-200 bg-rose-50 px-3 py-2 text-xs font-semibold text-rose-700 opacity-0 transition duration-150 group-hover:opacity-100",children:eP})]})}),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("button",{type:"submit",disabled:eL,className:`flex items-center justify-center gap-2 rounded-2xl px-6 py-3 text-sm font-semibold uppercase tracking-wide text-white transition ${eL?"cursor-not-allowed bg-slate-300":"bg-sky-600 hover:bg-sky-700"}`,children:[(0,a.jsx)(j.zfp,{className:"h-5 w-5"}),q]})})]}),(0,a.jsx)("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-4 text-sm text-slate-600",children:(0,a.jsx)(d(),{href:"/map",className:"text-slate-600 underline decoration-dotted underline-offset-2 transition-colors hover:text-sky-700",children:S?.search_view_all_map||"View all locations on our world map"})}),(ez||eM)&&(0,a.jsx)("div",{className:"mt-4 w-full rounded-2xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm font-medium text-rose-800 shadow-sm",children:ez?S?.search_error_conflict||"Please provide either a search term or coordinates, not both.":S?.search_error_invalid_coords||"Enter valid decimal latitude and longitude values to search by co
1ordinates."})]})}),(0,a.jsxs)("div",{className:"mx-auto max-w-7xl px-4 py-8",children:[!eG&&(0,a.jsx)("section",{className:"mx-auto mb-24 mt-24 w-full max-w-6xl rounded-3xl border border-dashed border-slate-300 bg-slate-50/80 p-8 shadow-sm",children:(0,a.jsxs)("div",{className:"max-w-4xl",children:[(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full bg-white px-3 py-1 text-xs font-bold uppercase tracking-wide text-slate-600 ring-1 ring-slate-200",children:[(0,a.jsx)(y.Z36,{className:"h-4 w-4"}),S?.search_results_title||"Search Results"]}),(0,a.jsx)("h2",{className:"mt-4 text-2xl font-bold text-slate-900",children:eH}),(0,a.jsx)("p",{className:"mt-3 text-base leading-relaxed text-slate-600",children:eQ})]})}),eG&&(K?(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"mb-5 flex justify-center",children:(0,a.jsx)(u.A,{color:"#0ea5e9",size:14,margin:5})}),(0,a.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:S?.search_searching||"Searching…"}),(0,a.jsx)("p",{className:"text-gray-500",children:S?.search_searching_description||"Finding weather results for your query."})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-10 mt-4 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"flex items-center gap-4 sm:gap-5",children:[(0,a.jsx)("div",{className:"flex h-[52px] w-[52px] flex-shrink-0 items-center justify-center rounded-xl border-2 border-slate-300 bg-slate-100 text-slate-600 shadow-sm",children:(0,a.jsx)(j.zfp,{className:"h-6 w-6"})}),(0,a.jsx)("h2",{className:"text-xl sm:text-2xl md:text-3xl font-bold text-slate-800 tracking-tight leading-tight",children:eB})]})}),(()=>{if(0===L.length)return null;let e=L.filter(e=>"country"===e.result_type),s=L.filter(e=>"location"===e.result_type),t=()=>(0,a.jsxs)("div",{className:"border border-slate-200 bg-slate-50/50 rounded-xl mt-6",children:[(0,a.jsxs)("div",{className:"relative flex flex-wrap items-center justify-start gap-5 border-b border-slate-200/60 p-4 rounded-t-xl overflow-hidden",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-sky-50 via-blue-50 to-indigo-50 opacity-40"}),(0,a.jsxs)("h3",{className:"relative z-10 text-lg font-semibold text-slate-800 flex items-center",children:[(0,a.jsx)(j.K3i,{className:"h-7 w-7 mr-1"}),(0,a.jsx)("span",{className:"mx-2 font-light text-slate-400",children:"|"}),(0,a.jsxs)("span",{children:["Weather",(0,a.jsx)("span",{className:"text-sky-500",children:"Box"}),"\xa0"]}),(0,a.jsx)("span",{className:"text-slate-600 font-medium text-base",children:S.search_name_match||"Name Match"})]}),(0,a.jsx)("div",{className:"relative z-10 inline-flex items-center gap-2 px-2.5 py-1 bg-sky-100/50 border border-sky-200/50 text-sky-700 rounded-full text-xs font-bold uppercase tracking-wider shadow-sm",children:(S.search_results_badge||"{{count}} Weather Guides").replace("{{count}}",s.length)})]}),(0,a.jsx)("div",{className:`grid grid-cols-1 md:grid-cols-2 ${eU?"lg:grid-cols-2 xl:grid-cols-3":"lg:grid-cols-3 xl:grid-cols-4"} gap-4 p-4`,children:s.slice(0,ex).map((e,s)=>{let t=(0,p._)(e.file_id,e.name),l=eR[e.file_id],r=eC&&"number"==typeof l?(0,g.A)(S.search_distance_away||"{{distance}} km away",{distance:l.toFixed(1)}):null,i=null,n=null;return"number"==typeof e.temperature_high?i=e.temperature_high:"string"==typeof e.temperature_high&&""!==e.temperature_high.trim()&&(i=parseInt(e.temperature_high,10)),"number"==typeof e.temperature_low?n=e.temperature_low:"string"==typeof e.temperature_low&&""!==e.temperature_low.trim()&&(n=parseInt(e.temperature_low,10)),(0,a.jsx)(c.default,{href:t,iso2:e.iso2.toLowerCase(),location:e.name,state:e.state,subtitle:r,temperatureMean:e.temperature_mean,temperatureHigh:i,temperatureLow:n,peakUv:e.peak_uv,humidity:e.humidity,sunHours:e.sun_hours,windSpeed:e.wind_speed,windDirection:e.wind_direction,rain:e.rain,labels:S,showTag:!1,number:eU?s+1:void 0},t)})}),s.length>ex&&ex<12&&(0,a.jsx)("div",{className:"flex justify-center p-4 border-t border-slate-200/60 bg-white/50 rounded-b-xl",children:(0,a.jsxs)("button",{type:"button",onClick:()=>eh(e=>Math.min(e+6,12)),className:"flex items-center gap-2 px-6 py-2.5 rounded-full bg-white border border-slate-200 text-sky-700 text-sm font-bold hover:bg-sky-50 hover:border-sky-300 transition-all shadow-sm",children:[(0,a.jsx)("span",{children:S?.search_show_more||"Show More Locations"}),(0,a.jsx)(N.Koh,{className:"w-4 h-4"})]})})]});return(0,a.jsxs)("div",{className:"mb-12",children:[e.length>0&&(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4 text-gray-700",children:S?.search_countries_territories||"Countries and Territories"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(e=>{let s=`/${e.iso2.toLowerCase()}`;return(0,a.jsxs)("div",{className:"bg-gradient-to-br from-sky-50 to-sky-100/50 border-2 border-sky-200 rounded-lg p-4 hover:border-sky-300 hover:shadow-md transition-all duration-300 cursor-pointer group",onClick:()=>window.location.href=s,children:[(0,a.jsxs)("div",{className:"flex items-center mb-4",children:[(0,a.jsx)("img",{src:`/flags/${e.iso2.toLowerCase()}.svg`,alt:`${e.name} flag`,className:"h-11 w-11 rounded-full border border-gray-200 mr-3 object-cover"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"text-lg font-bold text-gray-900 group-hover:text-sky-800 transition-colors",children:e.name}),(0,a.jsx)("p",{className:"text-sm text-gray-600",children:e.main_region&&e.sub_region?`${e.sub_region}, ${e.main_region}`:S?.search_country_overview||"Country Overview"})]})]}),(0,a.jsx)("div",{className:"flex items-center justify-end text-blue-600 font-medium",children:(0,a.jsxs)("span",{className:"inline-block px-3 py-2 text-sm text-sky-800 border border-sky-500 bg-sky-100 rounded font-medium",children:[S?.search_view_all_locations||"View all locations"," ",(0,a.jsx)(w.Z0P,{className:"ml-2 inline-block"})]})})]},s)})})]}),s.length>0&&(eU?(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[(0,a.jsx)("div",{className:"lg:col-span-1 order-1",children:(0,a.jsx)("div",{className:"sticky top-28",children:(0,a.jsxs)("div",{className:"rounded-xl border border-slate-200 bg-white shadow-sm overflow-hidden",children:[(0,a.jsxs)("div",{className:"relative px-5 py-4 border-b border-slate-200/60 overflow-hidden",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-sky-50 via-blue-50 to-indigo-50 opacity-40"}),(0,a.jsx)("div",{className:"relative z-10 flex flex-col gap-3",children:(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:(0,a.jsx)("h3",{className:"text-lg font-semibold text-slate-800 mb-0 flex items-center gap-2",children:(0,a.jsxs)("span",{className:"whitespace-nowrap flex items-center gap-2",children:[(0,a.jsx)(y.StZ,{className:"w-6 h-6 text-slate-700"}),S.search_results_map]})})}),ei&&(0,a.jsxs)("button",{onClick:()=>{ed(e=>e+1),en(!1)},className:"inline-flex items-center gap-2 px-3 py-1.5 bg-sky-50 text-sky-700 rounded-lg text-sm font-semibold hover:bg-sky-100 transition-all duration-200 border border-sky-100 shadow-sm animate-in fade-in slide-in-from-right-4 duration-300",children:[(0,a.jsx)(N.JbZ,{className:"w-3.5 h-3.5"}),S?.search_reset_zoom||"Reset Zoom"]})]})})]}),(0,a.jsx)("div",{className:"h-[1px] w-5/6 mx-auto bg-gradient-to-r from-transparent via-slate-300 to-transparent"}),(0,a.jsxs)("div",{className:"p-5 relative",children:[(0,a.jsx)(_,{results:L,nominatimResults:M,onMarkerClick:eW,onPreviewLocation:e=>eN(e),nearbyLocations:Object.keys(H).reduce((e,s)=>(e[s]=H[s].slice(0,ec[s]||4),e),{}),expandedPlaceId:el,loadingNearby:X,mapViews:ee,labels:S,coordinateCenter:eO,coordinateMarkers:eI,setIsMapMoved:en,resetTrigger:eo},eC?`coords-${e$}-${eS}-${JSON.stringify(ec)}`:`map-no-coords-${JSON.stringify(ec)}`),ey&&(0,a.jsx)("div",{className:"absolute inset-0 z-[2000] flex items-center justify-center bg-black/40 backdrop-blur-[1px] rounded-b-md p-4",children:(0,a.jsxs)("div",{className:"bg-white rounded-xl shadow-2xl w-full max-w-sm overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:[(0,a.jsxs)("div",{className:"bg-slate-50 border-b border-slate-100 p-4 flex justify-between items-start",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[ey.iso2&&(0,a.jsx)("div",{className:"relative h-8 w-8 flex-shrink-0 overflow-hidden rounded-full border border-slate-200 bg-white",children:(0,a.jsx)("img",{src:`/flags/${ey.iso2.toLowerCase()}.svg`,alt:`${ey.iso2} flag`,className:"h-full w-full object-cover"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-bold text-lg text-slate-800 leading-tight",children:ey.name}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-1",children:"US"===ey.iso2&&ey.state?`${ey.country||"United States"}, ${ey.state}`:ey.country||ey.displayName||"Location Preview"})]})]}),(0,a.jsx)("button",{onClick:()=>eN(null),className:"text-slate-400 hover:text-slate-600 transition-colors p-1 rounded-full hover:bg-slate-200",children:(0,a.jsx)(j.$8F,{className:"w-5 h-5"})})]}),(0,a.jsxs)("div",{className:"p-5",children:["number"==typeof ey.distance&&(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4 text-sm text-slate-600 bg-slate-50 px-3 py-2 rounded-lg border border-slate-100",children:[(0,a.jsx)(y.StZ,{className:"text-emerald-500 w-4 h-4"}),(0,a.jsxs)("span",{children:[ey.distance.toFixed(1)," km from search point"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsx)("button",{onClick:()=>eN(null),className:"px-4 py-2.5 rounded-lg border border-slate-300 text-slate-700 font-semibold text-sm hover:bg-slate-50 transition-colors",children:"Cancel"}),(0,a.jsx)("a",{href:ey.url||"#",className:"px-4 py-2.5 rounded-lg bg-sky-600 text-white font-semibold text-sm hover:bg-sky-700 transition-colors text-center shadow-sm shadow-sky-200",children:"Go to Page"})]})]})]})})]})]})})}),(0,a.jsx)("div",{className:"lg:col-span-2 order-2",children:t()})]}):t())]})})(),M.length>0&&(0,a.jsxs)("div",{className:"border border-slate-200 bg-slate-50/50 rounded-xl mb-12 overflow-hidden shadow-sm",children:[(0,a.jsxs)("div",{className:"relative flex flex-wrap items-center justify-start gap-5 border-b border-slate-200/60 p-4 overflow-hidden",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-sky-50 via-blue-50 to-indigo-50 opacity-40"}),(0,a.jsxs)("h2",{className:"relative z-10 text-lg font-semibold text-slate-800 flex items-center",children:[(0,a.jsx)(j.zfp,{className:"w-6 h-6 mr-2 text-slate-700"}),S.search_advanced_search]}),(0,a.jsx)("div",{className:"relative z-10 inline-flex items-center gap-2 px-2.5 py-1 bg-indigo-100/50 border border-indigo-200/50 text-indigo-700 rounded-full text-[10px] font-bold uppercase tracking-wider shadow-sm",children:S.search_advanced||"Advanced"})]}),(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("p",{className:"text-slate-600 mb-8 text-sm leading-relaxed max-w-3xl",children:S.search_advanced_search_description}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[(0,a.jsx)("div",{className:"lg:col-span-1 order-1",children:(0,a.jsx)("div",{className:"sticky top-28",children:(0,a.jsxs)("div",{className:"rounded-xl border border-slate-200 bg-white shadow-sm overflow-hidden",children:[(0,a.jsxs)("div",{className:"relative px-5 py-4 border-b border-slate-200/60 overflow-hidden",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-sky-50 via-blue-50 to-indigo-50 opacity-40"}),(0,a.jsxs)("div",{className:"relative z-10 flex items-center justify-between w-full",children:[(0,a.jsxs)("h3",{className:"text-lg font-semibold text-slate-800 mb-0 flex items-center gap-2",children:[(0,a.jsx)(y.StZ,{className:"w-6 h-6 text-slate-700"}),S.search_results_map]}),ei&&(0,a.jsxs)("button",{onClick:()=>{ed(e=>e+1),en(!1)},className:"inline-flex items-center gap-2 px-3 py-1.5 bg-sky-50 text-sky-700 rounded-lg text-sm font-semibold hover:bg-sky-100 transition-all duration-200 border border-sky-100 shadow-sm animate-in fade-in slide-in-from-right-4 duration-300",children:[(0,a.jsx)(N.JbZ,{className:"w-3.5 h-3.5"}),S.search_reset_zoom]})]})]}),(0,a.jsx)("div",{className:"h-[1px] w-5/6 mx-auto bg-gradient-to-r from-transparent via-slate-300 to-transparent"}),(0,a.jsxs)("div",{className:"p-5 relative",children:[(0,a.jsx)(_,{results:L,nominatimResults:M,onMarkerClick:eW,nearbyLocations:Object.keys(H).reduce((e,s)=>(e[s]=H[s].slice(0,ec[s]||4),e),{}),expandedPlaceId:el,loadingNearby:X,mapViews:ee,labels:S,coordinateCenter:eO,coordinateMarkers:eI,onPreviewLocation:e=>eN(e),setIsMapMoved:en,resetTrigger:eo}
1,`main-map-${JSON.stringify(ec)}`),ey&&(0,a.jsx)("div",{className:"absolute inset-0 z-[2000] flex items-center justify-center bg-black/40 backdrop-blur-[1px] rounded-b-md p-4",children:(0,a.jsxs)("div",{className:"bg-white rounded-xl shadow-2xl w-full max-w-sm overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:[(0,a.jsxs)("div",{className:"bg-slate-50 border-b border-slate-100 p-4 flex justify-between items-start",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[ey.iso2&&(0,a.jsx)("div",{className:"relative h-8 w-8 flex-shrink-0 overflow-hidden rounded-full border border-slate-200 bg-white",children:(0,a.jsx)("img",{src:`/flags/${ey.iso2.toLowerCase()}.svg`,alt:`${ey.iso2} flag`,className:"h-full w-full object-cover"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-bold text-lg text-slate-800 leading-tight",children:ey.name}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-1",children:"US"===ey.iso2&&ey.state?`${ey.country||"United States"}, ${ey.state}`:ey.country||ey.displayName||S?.search_preview_location_title||"Location Preview"})]})]}),(0,a.jsx)("button",{onClick:()=>eN(null),className:"text-slate-400 hover:text-slate-600 transition-colors p-1 rounded-full hover:bg-slate-200",children:(0,a.jsx)(j.$8F,{className:"w-5 h-5"})})]}),(0,a.jsxs)("div",{className:"p-5",children:["number"==typeof ey.distance&&(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4 text-sm text-slate-600 bg-slate-50 px-3 py-2 rounded-lg border border-slate-100",children:[(0,a.jsx)(y.StZ,{className:"text-emerald-500 w-4 h-4"}),(0,a.jsx)("span",{children:(0,g.A)(S?.search_distance_from_point||"{{distance}} km from search point",{distance:ey.distance.toFixed(1)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsx)("button",{onClick:()=>eN(null),className:"px-4 py-2.5 rounded-lg border border-slate-300 text-slate-700 font-semibold text-sm hover:bg-slate-50 transition-colors",children:S?.search_cancel||"Cancel"}),(0,a.jsx)("a",{href:ey.url||"#",className:"px-4 py-2.5 rounded-lg bg-sky-600 text-white font-semibold text-sm hover:bg-sky-700 transition-colors text-center shadow-sm shadow-sky-200",children:S?.search_go_to_page||"Go to Page"})]})]})]})})]})]})})}),(0,a.jsx)("div",{className:"lg:col-span-2 order-2",children:(0,a.jsx)("div",{className:"space-y-6",children:M.map((e,s)=>{let t=e.iso2||"",l=t?`/flags/${t.toLowerCase()}.svg`:null;return(0,a.jsxs)("div",{id:`place-${e.place_id}`,className:`rounded-xl overflow-hidden transition-all duration-300 cursor-pointer border 
2                              ${et===e.place_id?"border-sky-600 shadow-md ring-1 ring-sky-600/20":"border-gray-200"} hover:border-sky-300`,onClick:()=>{el===e.place_id?er(null):(eW(e.place_id),H[e.place_id]||eJ(e.lat,e.lon,e.place_id))},children:[(0,a.jsx)("div",{className:"rounded-t-xl bg-gray-50 border border-slate-200 border-b-0 p-4",children:(0,a.jsx)("div",{className:"flex justify-between items-start gap-4",children:(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"relative flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white overflow-hidden",children:l?(0,a.jsx)(n.default,{src:l,alt:`${t.toUpperCase()} flag`,fill:!0,sizes:"40px",className:"object-cover"}):(0,a.jsx)("span",{className:"text-sm font-semibold text-slate-700",children:s+1})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-slate-900",children:e.name}),(0,a.jsx)("p",{className:"text-sm text-slate-600",children:e.display_name})]})]})})})}),(0,a.jsx)("div",{className:"h-[1px] w-5/6 mx-auto bg-gradient-to-r from-transparent via-slate-300 to-transparent"}),(0,a.jsxs)("div",{className:"rounded-b-xl bg-white border border-slate-200 border-t-0 py-3 px-5",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"text-sm font-semibold text-sky-700 tracking-wide flex items-center gap-1 mt-1",children:[(0,a.jsx)(v.nQW,{className:"w-4 h-4 mr-1"}
2)," ",S.search_nearby_weather_locations]}),eZ&&(0,a.jsxs)("button",{type:"button",onClick:s=>{s.stopPropagation(),el===e.place_id?er(null):(eW(e.place_id),H[e.place_id]||eJ(e.lat,e.lon,e.place_id))},"aria-expanded":el===e.place_id,className:"flex items-center text-sm font-semibold text-sky-700 tracking-wide gap-1 mt-1 transition-transform hover:text-blue-800",children:[(0,a.jsx)("span",{children:el===e.place_id?"Hide":"Show"}),(0,a.jsx)("span",{className:`transition-transform ${el===e.place_id?"rotate-180":""}`,children:(0,a.jsx)(N.Koh,{className:"w-5 h-5"})})]})]}),X[e.place_id]&&el===e.place_id&&(0,a.jsx)("p",{className:"text-xs text-gray-500",children:S.search_finding_nearby_weather_locations})]}),el===e.place_id&&H[e.place_id]&&(0,a.jsxs)("div",{className:"mt-4 border-t border-slate-200 pt-4",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-2 gap-4",children:H[e.place_id].slice(0,ec[e.place_id]||4).map((s,t)=>(0,a.jsx)(m.A,{href:(0,p._)(s.location_id||s.parent_id||s.file_id,s.name||s.location),iso2:s.iso2?s.iso2.toUpperCase():"",location:s.name,state:s.state,distance:s.lat&&s.lon?`${Math.round((0,i.E5)(e.lat,e.lon,s.lat,s.lon))} km`:void 0!==s.distance_km?`${Math.round(s.distance_km)} km`:"",bearing:(0,i.vA)(e.lat,e.lon,s.lat,s.lon),number:t+1,labels:S},s.location_id||`nearby-${t}`))}),H[e.place_id].length>(ec[e.place_id]||4)&&(0,a.jsx)("div",{className:"mt-6 flex justify-center",children:(0,a.jsxs)("button",{type:"button",onClick:s=>{s.stopPropagation(),em(s=>({...s,[e.place_id]:(s[e.place_id]||4)+4}))},className:"flex items-center gap-2 px-6 py-2 rounded-full bg-slate-50 border border-slate-200 text-sky-700 text-sm font-bold hover:bg-sky-50 hover:border-sky-300 transition-all shadow-sm",children:[(0,a.jsx)("span",{children:"Show More Locations"}),(0,a.jsx)(N.Koh,{className:"w-4 h-4"})]})})]})]})]},e.place_id||`place-${s}`)})})})]}),(0,a.jsx)("p",{className:"text-slate-500 text-xs mt-10 border-t border-slate-200 pt-4 italic",children:S.search_advanced_search_attribution})]})]}),0===M.length&&eE.length>0&&!eU&&(0,a.jsxs)("div",{className:"mb-12",children:[(0,a.jsx)("h2",{className:"text-2xl font-bold mb-4",children:S.search_results_map}),(0,a.jsx)("p",{className:"text-gray-600 mb-6",children:S.search_coordinate_map_description||"Distances are shown relative to the coordinates you entered."}),(0,a.jsx)("div",{className:"rounded-md border border-slate-200 bg-white shadow-sm overflow-hidden",children:(0,a.jsxs)("div",{className:"p-5 relative",children:[(0,a.jsx)(_,{results:L,nominatimResults:M,onMarkerClick:eW,nearbyLocations:Object.keys(H).reduce((e,s)=>(e[s]=H[s].slice(0,ec[s]||4),e),{}),expandedPlaceId:el,loadingNearby:X,mapViews:ee,labels:S,coordinateCenter:eO,coordinateMarkers:eI,onPreviewLocation:e=>eN(e)},eC?`coords-fallback-${e$}-${eS}-${JSON.stringify(ec)}`:`map-fallback-no-coords-${JSON.stringify(ec)}`),ey&&(0,a.jsx)("div",{className:"absolute inset-0 z-[2000] flex items-center justify-center bg-black/40 backdrop-blur-[1px] rounded-b-md p-4",children:(0,a.jsxs)("div",{className:"bg-white rounded-xl shadow-2xl w-full max-w-sm overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:[(0,a.jsxs)("div",{className:"bg-slate-50 border-b border-slate-100 p-4 flex justify-between items-start",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[ey.iso2&&(0,a.jsx)("div",{className:"relative h-8 w-8 flex-shrink-0 overflow-hidden rounded-full border border-slate-200 bg-white",children:(0,a.jsx)("img",{src:`/flags/${ey.iso2.toLowerCase()}.svg`,alt:`${ey.iso2} flag`,className:"h-full w-full object-cover"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-bold text-lg text-slate-800 leading-tight",children:ey.name}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-1",children:"US"===ey.iso2&&ey.state?`${ey.country||"United States"}, ${ey.state}`:ey.country||ey.displayName||"Location Preview"})]})]}),(0,a.jsx)("button",{onClick:()=>eN(null),className:"text-slate-400 hover:text-slate-600 transition-colors p-1 rounded-full hover:bg-slate-200",children:(0,a.jsx)(j.$8F,{className:"w-5 h-5"})})]}),(0,a.jsxs)("div",{className:"p-5",children:["number"==typeof ey.distance&&(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4 text-sm text-slate-600 bg-slate-50 px-3 py-2 rounded-lg border border-slate-100",children:[(0,a.jsx)(y.StZ,{className:"text-emerald-500 w-4 h-4"}),(0,a.jsxs)("span",{children:[ey.distance.toFixed(1)," km from search point"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsx)("button",{onClick:()=>eN(null),className:"px-4 py-2.5 rounded-lg border border-slate-300 text-slate-700 font-semibold text-sm hover:bg-slate-50 transition-colors",children:"Cancel"}),(0,a.jsx)("a",{href:ey.url||"#",className:"px-4 py-2.5 rounded-lg bg-sky-600 text-white font-semibold text-sm hover:bg-sky-700 transition-colors text-center shadow-sm shadow-sky-200",children:"Go to Page"})]})]})]})})]})})]}),0===L.length&&0===M.length&&(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"text-gray-400 mb-4",children:(0,a.jsx)("svg",{className:"w-16 h-16 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,a.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:S.search_no_results_found}),(0,a.jsx)("p",{className:"text-gray-500",children:S.search_no_results_found_description})]})]}))]})]})}}},e=>{e.O(0,[7375,156,780,5186,5851,7922,3604,526,4092,8781,9098,3072,8526,895,
26104,8695,341,8500,818,3385,6699,7874,3429,867,9679,4036,3009,9020,1875,3023,8796,8614,2120,1537,2506,354,8352,7705,1798,7979,7056,9248,9062,4042,3277,983,7358],()=>e(e.s=9152)),_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.