PageSourceSearch

https://www.raindrop.farm/_next/static/chunks/2781.39d6e8624cc8192e.js

js raindrop.farm collected 2026-10-01 13:07:39 UTC 22,009 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2781],{6495:function(e,t,a){a.d(t,{Z:function(){return n}});var r=a(7437);function n(e){let{width:t=24,height:a=24}=e;return(0,r.jsx)("svg",{width:t,height:a,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M14 1.75V26.25M17.1566 4.375C16.2039 4.94919 15.1123 5.25178 14 5.25C12.8877 5.25178 11.7961 4.94919 10.8434 4.375M10.8434 23.625C11.7968 23.0524 12.8879 22.75 14 22.75C15.1121 22.75 16.2032 23.0524 17.1566 23.625M24.6088 7.875L3.39117 20.125M23.9132 11.9219C22.9405 11.3824 22.1329 10.5885 21.5769 9.6251C21.021 8.66173 20.7376 7.56524 20.7572 6.45312M4.0868 16.0781C5.05952 16.6176 5.86713 17.4115 6.42309 18.3749C6.97905 19.3383 7.26241 20.4348 7.24282 21.5469M3.39117 7.875L24.6088 20.125M4.0868 11.9219C5.05952 11.3824 5.86713 10.5885 6.42309 9.6251C6.97905 8.66173 7.26241 7.56524 7.24282 6.45312M23.9132 16.0781C22.9405 16.6176 22.1329 17.4115 21.5769 18.3749C21.021 19.3383 20.7376 20.4348 20.7572 21.5469",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}},2781:function(e,t,a){a.r(t),a.d(t,{default:function(){return Z}});var r=a(7437),n=a(8059),s=a.n(n);a(966);var l=a(2265),o=a(556),i=a(6429),c=a(7691),d=a.n(c),x=a(7138),h=e=>{let{width:t=24,height:a=24,color:n="white"}=e;return(0,r.jsx)("svg",{width:t,height:a,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M8.16669 13.166H9.83335V9.83268H13.1667V8.16602H9.83335V4.83268H8.16669V8.16602H4.83335V9.83268H8.16669V13.166ZM9.00002 17.3327C7.84724 17.3327 6.76391 17.1174 5.75002 16.6868C4.73613 16.2424 3.85419 15.6452 3.10419 14.8952C2.35419 14.1452 1.75696 13.2632 1.31252 12.2493C0.881965 11.2355 0.666687 10.1521 0.666687 8.99935C0.666687 7.84657 0.881965 6.76324 1.31252 5.74935C1.75696 4.73546 2.35419 3.85351 3.10419 3.10352C3.85419 2.35351 4.73613 1.76324 5.75002 1.33268C6.76391 0.888238 7.84724 0.666016 9.00002 0.666016C10.1528 0.666016 11.2361 0.888238 12.25 1.33268C13.2639 1.76324 14.1459 2.35351 14.8959 3.10352C15.6459 3.85351 16.2361 4.73546 16.6667 5.74935C17.1111 6.76324 17.3334 7.84657 17.3334 8.99935C17.3334 10.1521 17.1111 11.2355 16.6667 12.2493C16.2361 13.2632 15.6459 14.1452 14.8959 14.8952C14.1459 15.6452 13.2639 16.2424 12.25 16.6868C11.2361 17.1174 10.1528 17.3327 9.00002 17.3327ZM9.00002 15.666C10.8611 15.666 12.4375 15.0202 13.7292 13.7285C15.0209 12.4368 15.6667 10.8605 15.6667 8.99935C15.6667 7.13824 15.0209 5.56185 13.7292 4.27018C12.4375 2.97852 10.8611 2.33268 9.00002 2.33268C7.13891 2.33268 5.56252 2.97852 4.27085 4.27018C2.97919 5.56185 2.33335 7.13824 2.33335 8.99935C2.33335 10.8605 2.97919 12.4368 4.27085 13.7285C5.56252 15.0202 7.13891 15.666 9.00002 15.666Z",fill:n})})};let u={south:20,north:55,west:-130,east:-60};function m(e,t){return e>=u.south&&e<=u.north&&t>=u.west&&t<=u.east}let p="https://uktiles.raindrop.app",g={south:49,north:61,west:-11,east:3},f=[[g.south,g.west],[g.north,g.east]];var w=function(){let{country:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="ca"===e,a="uk"===e,n=(0,o.Sx)();n.options.minZoom=1,n.options.maxZoom=18;let s=(0,l.useRef)(null),[c,u]=(0,l.useState)(null),[w,j]=(0,l.useState)(""),[b,v]=(0,l.useState)(!1),[y,N]=(0,l.useState)(!0),[C,L]=(0,l.useState)(!1),k=d().latLngBounds(d().latLng(24.396308,-125),d().latLng(49.384358,-66.93457)),S=d().latLngBounds(d().latLng(19.5,-141),d().latLng(55.5,-52)),z=d().latLngBounds(d().latLng(f[0][0],f[0][1]),d().latLng(f[1][0],f[1][1])),B=a?z:t?S:k;(0,l.useEffect)(()=>{let e=!1,t=(t,a)=>{if(e)return;let r=d().tileLayer(t,{opacity:.5,attribution:"",minZoom:1,maxZoom:18,zIndex:1e3,bounds:B,...a});r.addTo(n),s.current=r};return a?fetch("".concat(p,"/precip_24h/frames.json"),{cache:"no-store"}).then(e=>e.json()).then(e=>{var a;let r=(null==e?void 0:e.frames)||[],n=null===(a=r[r.length-1])||void 0===a?void 0:a.key;n&&t("".concat(p,"/precip_24h/").concat(n,"/{z}/{x}/{y}.webp"),{maxNativeZoom:8})}).catch(e=>console.error("Error fetching UK tile frames:",e)):t("https://api.raindropgauge.com/image/tiles/{z}/{x}/{y}.png",{tms:!0,maxNativeZoom:5,minNativeZoom:5}),()=>{e=!0,s.current&&n.removeLayer(s.current)}},[]);let M=async e=>{v(!0);let{lat:t,lng:r}=e.latlng;u([t,r]);let n=new URLSearchParams(a?{lat:t,lon:r}:{lat:t,lon:r+360});try{let e=await fetch("".concat(a?"/api/uk/rainfall":"/api/rainfall","?").concat(n),{cache:"no-store"}),t=await e.json();a&&(null==t?void 0:t.covered)===!1?(L(!0),j("")):t?j(t.rainfall):j("NaN")}catch(e){console.error("Error fetching data:",e)}finally{v(!1)}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(()=>((0,o.zV)({click:async e=>{e.originalEvent.stopPropagation(),N(!1);let{lat:t,lng:r}=e.latlng;if(!(a?t>=g.south&&t<=g.north&&r>=g.west&&r<=g.east:m(t,r))){u([t,r]),L(!0),j(""),v(!1);return}L(!1),M(e)}}),null),{}),y&&!c&&(0,r.jsx)("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-[1001] pointer-events-none animate-in fade-in duration-500",children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("div",{className:"w-16 h-16 bg-blue-500/10 rounded-full animate-ping"})}),(0,r.jsx)("div",{className:"relative transform transition-transform duration-300 animate-[tap_1.5s_ease-in-out_infinite]",children:(0,r.jsx)("svg",{className:"w-14 h-14 text-white drop-shadow-2xl",fill:"
1currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"})})})]}),(0,r.jsx)("div",{className:"bg-white/10 backdrop-blur-xl rounded-2xl px-5 py-3 shadow-2xl border border-white/20",children:(0,r.jsx)("p",{className:"text-sm font-medium text-white/90 text-center tracking-tight",children:a?"Tap anywhere to view precipitation":"Tap anywhere to view rainfall"})})]})}),c&&(0,r.jsx)(i.G,{position:c,autoPan:!1,closeButton:!1,closeOnClick:!1,children:(0,r.jsxs)("div",{className:"bg-[#1E1E1E]/75 text-white rounded-xl p-3 relative shadow-lg backdrop-blur-lg",style:{minWidth:"140px"},children:[(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),u(null)},className:"absolute top-2 right-2 w-6 h-6 bg-[#C2C2C2]/30 rounded-full flex items-center justify-center",children:(0,r.jsx)("span",{className:"text-[#C2C2C2] text-sm leading-none relative -top-[1px] -right-[0.7px]",children:"\xd7"})}),C?(0,r.jsxs)("div",{className:"text-center px-1 py-1.5",style:{maxWidth:"180px"},children:[(0,r.jsx)("div",{className:"text-[15px] font-semibold leading-snug",children:t?"Northern Canada Radar Coverage Coming Soon":"No Radar Coverage Here"}),(0,r.jsx)("div",{className:"text-[12px] text-gray-400 mt-1",children:a?"No radar precipitation data here yet.":"No radar rainfall data here yet."})]}):b?(0,r.jsx)("div",{className:"flex justify-center items-center h-14",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-500"})}):0>parseFloat(w)||isNaN(parseFloat(w))?(0,r.jsx)("div",{className:"text-gray-400 text-center",children:"No data"}):(0,r.jsxs)("div",{className:"text-center space-y-0.5",children:[(0,r.jsxs)("div",{className:"text-[28px] leading-tight font-normal",children:[t?(25.4*parseFloat(w)).toFixed(1):a?parseFloat(w).toFixed(1):parseFloat(w).toFixed(2),t||a?(0,r.jsx)("span",{children:" mm"}):(0,r.jsx)("span",{className:"text-blue-500",children:"″"})]}),(0,r.jsx)("div",{className:"text-[13px] text-gray-300/90",children:"Past 24 Hours"})]}),!C&&(0,r.jsxs)(x.default,{href:"/app",className:"text-white w-full mt-2.5 bg-gradient-to-r from-[#4294CC] to-[#1B82F9] hover:bg-blue-600 py-1.5 px-4 rounded-lg flex items-center justify-center gap-1.5 text-[15px]",children:[(0,r.jsx)(h,{}),(0,r.jsx)("span",{className:"text-white font-medium",children:"Add Location"})]})]})})]})};class j extends d().TileLayer{getTileUrl(e){return this._url.replace("{z}",e.z).replace("{x}",e.x).replace("{y}",e.y)}}let b=e=>new Date(/Z|[+-]\d\d:?\d\d$/.test(e)?e:e+"Z");var v=function(){let{country:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="uk"===e,[a,n]=(0,l.useState)([]),[i,c]=(0,l.useState)(!0),x=(0,l.useRef)([]),h=(0,o.Sx)();h.options.minZoom=4,h.options.maxZoom=10;let[u,m]=(0,l.useState)(0),[g,w]=(0,l.useState)(0),[v,y]=(0,l.useState)(!1),N=(0,l.useRef)({}),C=(0,l.useRef)(new Set),L=(0,l.useRef)(null),k=(0,l.useRef)(0),S=d().latLngBounds(d().latLng(24.396308,-125),d().latLng(49.384358,-66.93457)),z=d().latLngBounds(d().latLng(19.5,-141),d().latLng(55.5,-52)),B=d().latLngBounds(d().latLng(f[0][0],f[0][1]),d().latLng(f[1][0],f[1][1])),M=t?B:"ca"===e?z:S;(0,l.useEffect)(()=>{(async()=>{try{if(t){let e=await fetch("".concat(p,"/radar/frames.json"),{cache:"no-store"}),t=(await e.json()).frames||[];x.current=t.map(e=>e.key),n(t.map(e=>e.time))}else{let e=await fetch("/api/radar-timestamps?t=".concat(Date.now())),t=await e.json();n(t.timestamps)}c(!1)}catch(e){console.error("Error fetching timestamps:",e),c(!1)}})()},[]);let F=e=>t?"".concat(p,"/radar/").concat(x.current[e],"/{z}/{x}/{y}.webp"):"https://maps-weather.raindrop.app/radar/tiles-flipped/".concat(e,"/{z}/{x}/{y}.webp"),Z=e=>{let a=N.current[e];return a||((a=new j(F(e),{tms:!t,opacity:0,attribution:"",minZoom:4,maxZoom:10,maxNativeZoom:t?8:5,minNativeZoom:4,zIndex:1e3,bounds:M,updateWhenZooming:!1,updateWhenIdle:!0,keepBuffer:0,noWrap:!0})).on("load",()=>C.current.add(e)),N.current[e]=a),h.hasLayer(a)||a.addTo(h),a},E=e=>{let t=N.current[e];t&&t!==L.current&&h.hasLayer(t)&&(h.removeLayer(t),C.current.delete(e))},R=()=>{let e=a.length;if(0===e)return;let t=k.current,r=new Set;for(let a=-1;a<=4;a++)r.add(((t+a)%e+e)%e);
1Object.keys(N.current).forEach(e=>{let t=Number(e);r.has(t)||E(t)})},P=(e,t)=>{let a=L.current;a&&a!==t&&a.setOpacity(0),t.setOpacity(.8),L.current=t,k.current=e,m(e),w(e),R()},T=e=>{if(0===a.length)return;let t=a.length,r=Z(e);for(let a=1;a<=4;a++)Z((e+a)%t);w(e),k.current=e,C.current.has(e)?P(e,r):r.once("load",()=>{k.current===e&&P(e,r)})},_=()=>{y(!v)};(0,l.useEffect)(()=>{0!==a.length&&T(a.length-1)},[a.length]),(0,l.useEffect)(()=>{if(v||0===a.length)return;let e=setInterval(()=>{let e=a.length,t=(k.current+1)%e;Z(t);for(let a=1;a<=4;a++)Z((t+a)%e);C.current.has(t)&&P(t,N.current[t])},140);return()=>clearInterval(e)},[v,a.length]);let I=e=>b(e).toLocaleString("en-US",{weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0,timeZoneName:"short"});return(0,l.useEffect)(()=>()=>{Object.values(N.current).forEach(e=>{h.hasLayer(e)&&h.removeLayer(e)}),N.current={},C.current=new Set,L.current=null},[]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(()=>{let e=(0,o.Sx)(),t=t=>{e.dragging.disable();let r=t.target.getBoundingClientRect();T(Math.round(Math.min(Math.max(((t.type.includes("touch")?t.touches[0].clientX:t.clientX)-r.left)/r.width,0),1)*(a.length-1))),e.dragging.enable()};if(i||0===a.length)return(0,r.jsx)("div",{className:"absolute bottom-10 left-1/2 transform -translate-x-1/2 bg-gray-800/50 p-3 rounded-xl shadow-lg backdrop-blur-md flex items-center justify-center z-[999] w-80 sm:w-96",children:(0,r.jsx)("div",{className:"text-white text-sm",children:"Loading radar data..."})});let n=Math.floor((new Date-b(a[u]))/6e4);return(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"jsx-9613a54834d7d308 absolute bottom-10 left-1/2 transform -translate-x-1/2 bg-gray-800/50 p-3 rounded-xl shadow-lg backdrop-blur-md flex flex-col items-center gap-2 z-[999] w-80 sm:w-96 animation-control-wrapper",children:[(0,r.jsxs)("div",{className:"jsx-9613a54834d7d308 flex w-full items-center animation-control-wrapper justify-start gap-3 my-2",children:[(0,r.jsx)("button",{onPointerDown:_,onTouchStart:_,className:"jsx-9613a54834d7d308 w-6 h-6 bg-gray-500 text-white rounded-full flex z-[1000] items-center justify-center",children:v?(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",style:{pointerEvents:"none"},className:"jsx-9613a54834d7d308 w-5 h-5",children:(0,r.jsx)("path",{d:"M8 5v14l11-7z",className:"jsx-9613a54834d7d308"})}):(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",style:{pointerEvents:"none"},className:"jsx-9613a54834d7d308 w-4 h-4",children:[(0,r.jsx)("rect",{x:"6",y:"4",width:"4",height:"16",className:"jsx-9613a54834d7d308"}),(0,r.jsx)("rect",{x:"14",y:"4",width:"4",height:"16",className:"jsx-9613a54834d7d308"})]})}),(0,r.jsx)("div",{className:"jsx-9613a54834d7d308 text-white text-xs sm:text-base",children:n<60?"".concat(n," mins ago"):"".concat(Math.floor(n/60)," hours ago")}),(0,r.jsx)("div",{className:"jsx-9613a54834d7d308 text-gray-400 text-xs sm:text-base",children:I(a[u])})]}),(0,r.jsx)("input",{type:"range",min:"0",max:a.length-1,value:g,onChange:e=>T(Number(e.target.value)),onMouseDown:()=>y(!0),onTouchStart:()=>y(!0),onMouseMove:e=>e.buttons&&t(e),onTouchMove:e=>t(e),style:{background:"linear-gradient(to right, white 0%, white ".concat(g/(a.length-1)*100,"%, gray ").concat(g/(a.length-1)*100,"%, gray 100%)")},className:"jsx-9613a54834d7d308 w-full appearance-none h-2 rounded-full bg-gray-300"}),(0,r.jsx)(s(),{id:"9613a54834d7d308",children:'input[type="range"].jsx-9613a54834d7d308::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;width:16px;height:16px;background:white;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;cursor:pointer}input[type="range"].jsx-9613a54834d7d308::-moz-range-thumb{width:16px;height:16px;background:white;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;cursor:pointer}input[type="range"].jsx-9613a54834d7d308::-ms-thumb{width:16px;height:16px;background:white;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;cursor:pointer}'}),(0,r.jsx)("div",{className:"jsx-9613a54834d7d308 flex justify-between w-full text-gray-400 text-xs sm:text-sm",children:a.filter((e,t)=>
1t%10==0).map((e,t,a)=>(0,r.jsx)("span",{className:"jsx-9613a54834d7d308",children:b(e).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}).replace(/ (AM|PM)$/,e=>0===t||t===a.length-1?e:"")},t))})]})},{})})},y=a(6495),N=function(){let{country:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="ca"===e,a=(0,o.Sx)();a.options.minZoom=1,a.options.maxZoom=18;let n=(0,l.useRef)(null),[s,c]=(0,l.useState)(null),[u,p]=(0,l.useState)(""),[g,f]=(0,l.useState)(""),[w,j]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),[N,C]=(0,l.useState)(!0),[L,k]=(0,l.useState)(!1),S=d().latLngBounds(d().latLng(24.396308,-125),d().latLng(49.384358,-66.93457)),z=d().latLngBounds(d().latLng(19.5,-141),d().latLng(55.5,-52)),B=t?z:S;(0,l.useEffect)(()=>{let e=d().tileLayer("https://maps-forecast.ssompally.com/image/snowfall/{z}/{x}/{y}.png",{tms:!1,opacity:.7,attribution:"",minZoom:1,maxZoom:18,zIndex:1e3,maxNativeZoom:8,minNativeZoom:1,bounds:B});return e.addTo(a),n.current=e,()=>{n.current&&a.removeLayer(n.current)}},[]);let M=async e=>{j(!0);let{lat:t,lng:a}=e.latlng;c([t,a]);let r=new URLSearchParams({lat:t,lon:a+360});try{let e=await fetch("/api/snowfall?".concat(r),{cache:"no-store"}),t=await e.json();t?p(t.snowfall):p("NaN")}catch(e){console.error("Error fetching data:",e)}finally{j(!1)}},F=async e=>{v(!0);let{lat:t,lng:a}=e.latlng;c([t,a]);let r=new URLSearchParams({lat:t,lon:a+360});try{let e=await fetch("/api/rainfall?".concat(r),{cache:"no-store"}),t=await e.json();t?f(t.rainfall):f("NaN")}catch(e){console.error("Error fetching data:",e)}finally{v(!1)}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(()=>((0,o.zV)({click:e=>{e.originalEvent.stopPropagation(),C(!1);let{lat:t,lng:a}=e.latlng;if(!m(t,a)){c([t,a]),k(!0),p(""),f(""),j(!1),v(!1);return}k(!1),M(e),F(e)}}),null),{}),N&&!s&&(0,r.jsx)("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-[1001] pointer-events-none animate-in fade-in duration-500",children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("div",{className:"w-16 h-16 bg-blue-500/10 rounded-full animate-ping"})}),(0,r.jsx)("div",{className:"relative transform transition-transform duration-300 animate-[tap_1.5s_ease-in-out_infinite]",children:(0,r.jsx)("svg",{className:"w-14 h-14 text-white drop-shadow-2xl",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"})})})]}),(0,r.jsx)("div",{className:"bg-white/10 backdrop-blur-xl rounded-2xl px-5 py-3 shadow-2xl border border-white/20",children:(0,r.jsx)("p",{className:"text-sm font-medium text-white/90 text-center tracking-tight",children:"Tap anywhere to view snowfall"})})]})}),s&&(0,r.jsx)(i.G,{position:s,autoPan:!1,closeButton:!1,closeOnClick:!1,children:(0,r.jsxs)("div",{className:"bg-[#1E1E1E]/90 text-white rounded-xl p-3 relative shadow-lg backdrop-blur-lg",style:{minWidth:"140px"},children:[(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),c(null)},className:"absolute top-2 right-2 w-6 h-6 bg-[#C2C2C2]/30 rounded-full flex items-center justify-center",children:(0,r.jsx)("span",{className:"text-[#C2C2C2] text-sm leading-none relative -top-[1px] -right-[0.7px]",children:"\xd7"})}),L?(0,r.jsxs)("div",{className:"text-center px-1 py-1.5",style:{maxWidth:"180px"},children:[(0,r.jsx)("div",{className:"text-[15px] font-semibold leading-snug",children:"No Radar Coverage Here"}),(0,r.jsx)("div",{className:"text-[12px] text-gray-400 mt-1",children:"No snowfall data for this location yet."})]}):b||w?(0,r.jsx)("div",{className:"flex justify-center items-center h-14",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-500"})}):(0>parseFloat(g)||isNaN(parseFloat(g)))&&(0>parseFloat(u)||isNaN(parseFloat(u)))?(0,r.jsx)("div",{className:"text-gray-400 text-center text-sm",children:"No data"}):(0,r.jsxs)("div",{className:"text-center",children:[parseFloat(u)>=0&&!isNaN(parseFloat(u))&&(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)(y.Z,{width:16,height:16,color:"white"}),(0,r.jsx)("div",{className:"text-2xl font-bold text-white flex items-baseline",children:t?"".concat((2.54*parseFloat(u)).toFixed(1)," cm"):"".concat(parseFloat(u).toFixed(2),"″")})]})}),parseFloat(g)>=0&&!isNaN(parseFloat(g))&&(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("div",{className:"text-xs text-blue-300/80 flex items-center justify-center gap-1 mb-1",children:[(0,r.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-400 rounded-full"}),(0,r.jsxs)("span",{children:[t?"".concat((25.4*parseFloat(g)).toFixed(1)," mm"):"".concat(parseFloat(g).toFixed(2),"″")," ","Precip"]})]}),(0,r.jsx)("div",{className:"text-xs text-gray-400",children:"Past 24 Hours"})]})]}),!L&&(0,r.jsxs)(x.default,{href:"/app",className:"text-white w-full mt-2.5 bg-gradient-to-r from-[#4294CC] to-[#1B82F9] hover:bg-blue-600 py-1.5 px-4 roun
1ded-lg flex items-center justify-center gap-1.5 text-[15px]",children:[(0,r.jsx)(h,{}),(0,r.jsx)("span",{className:"text-white font-medium",children:"Add Location"})]})]})})]})},C=a(688),L=a(8977),k=a(889),S=a(158),z=a(758),B=a(707),M=()=>(0,r.jsxs)(S.et,{position:"topleft",children:[(0,r.jsx)(S.et.BaseLayer,{name:"Google Map Satellite",checked:!0,children:(0,r.jsxs)(z.e,{children:[(0,r.jsx)(B.I,{attribution:"Google Maps Satellite",url:"https://www.google.cn/maps/vt?lyrs=s@189&gl=cn&x={x}&y={y}&z={z}"}),(0,r.jsx)(B.I,{url:"https://www.google.cn/maps/vt?lyrs=y@189&gl=cn&x={x}&y={y}&z={z}"})]})}),(0,r.jsx)(S.et.BaseLayer,{name:"Open Street Map",children:(0,r.jsx)(B.I,{attribution:'\xa9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})}),(0,r.jsx)(S.et.BaseLayer,{name:"Google Map",children:(0,r.jsx)(B.I,{attribution:"Google Maps",url:"https://www.google.cn/maps/vt?lyrs=m@189&gl=cn&x={x}&y={y}&z={z}"})}),(0,r.jsx)(S.et.BaseLayer,{name:"U.S. Geological Survey",children:(0,r.jsx)(z.e,{children:(0,r.jsx)(B.I,{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/M
1apServer/tile/{z}/{y}/{x}",attribution:'Tiles courtesy of the <a href="https://usgs.gov/">U.S. Geological Survey</a>'})})}),(0,r.jsx)(S.et.BaseLayer,{name:"Dark Map (CartoDB)",children:(0,r.jsx)(B.I,{attribution:'\xa9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors \xa9 <a href="https://carto.com/attributions">CARTO</a>',url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png"})})]});let F=e=>{let{zipGeoJson:t}=e,a=(0,o.Sx)();return(0,l.useEffect)(()=>{if(t){let e=d().geoJSON(t).getBounds();e.isValid()&&a.fitBounds(e)}},[a,t]),(0,r.jsx)(r.Fragment,{children:t&&(0,r.jsx)(C.Q,{data:t})})};var Z=e=>{let{zipGeoJson:t,snowfall:a=!1,radar:n=!1,country:l,bounds:o=null}=e;return(0,r.jsx)("div",{className:"flex flex-col justify-center bg-[#2B2B2B]  xl:mx-auto mx-4 p-2.5 max-w-7xl rounded-xl",children:(0,r.jsx)("div",{children:(0,r.jsx)("div",{children:(0,r.jsx)("div",{style:{width:"100%",height:"65vh",borderRadius:"10px",overflow:"hidden",background:"#2B2B2B"},children:(0,r.jsxs)(L.h,{style:{height:"100%",width:"100%",zIndex:1,background:"#2B2B2B"},...o?{bounds:o}:{center:[41.45919537950706,-95.00976562500001],zoom:4},scrollWheelZoom:!0,zoomControl:!1,children:[(0,r.jsx)(s(),{id:"5098bd93ec933dbc",children:".leaflet-control-zoom a{background-color:#2b2b2b!important;color:white!important;border-color:#444!important}.leaflet-control-layers{background-color:#2b2b2b!important;color:white!important;border-color:#444!important}"}
1),n?(0,r.jsx)(v,{country:l}):a?(0,r.jsx)(N,{country:l}):(0,r.jsx)(w,{country:l}),(0,r.jsx)(F,{zipGeoJson:t}),(0,r.jsx)(M,{}),(0,r.jsx)(k.L,{position:"topright"})]})})})})})}}}]);

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.