PageSourceSearch

https://programearth.org/assets/StatWall-kEpbmnaV.js

js programearth.org collected 2026-10-04 20:02:20 UTC 2,113 bytes, 1 lines download raw bytes

1import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{t as n}from"./jsx-runtime-B74pBk57.js";var r=e(t(),1),i=n();function a(e){let t=e.match(/^([^0-9.,-]*)([0-9.,]+)(.*)$/);if(!t)return{prefix:``,target:0,suffix:``,decimals:0,useCommas:!1};let n=t[1],r=t[2],i=t[3],a=r.includes(`,`),o=r.replace(/,/g,``);return{prefix:n,target:parseFloat(o),suffix:i,decimals:o.includes(`.`)?o.split(`.`)[1].length:0,useCommas:a}}function o(e,t,n,r,i){let a;return a=i?e.toLocaleString(`en-US`,{minimumFractionDigits:t,maximumFractionDigits:t}):t>0?e.toFixed(t):Math.round(e).toString(),`${n}${a}${r}`}function s({value:e,active:t,duration:n=900}){let{prefix:i,target:s,suffix:c,decimals:l,useCommas:u}=a(e),d=/[\/a-zA-Z]/.test(c.replace(/[%+\-\s]/g,``)),f=typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,[p,m]=(0,r.useState)(t&&(f||d)?s:0);return(0,r.useEffect)(()=>{if(!t||d)return;if(f){m(s);return}let e,r=performance.now(),i=t=>{let a=Math.min((t-r)/n,1),o=1-(1-a)**3;m(s*o),a<1&&(e=requestAnimationFrame(i))};return e=requestAnimationFrame(i),()=>cancelAnimationFrame(e)},[t,s,n,f,d]),d?e:o(p,l,i,c,u)}function c({stats:e,tone:t=`dark`}){let n=t===`light`?`border-cream/20`:`border-ink/15`,a=t===`light`?`text-cream`:`text-forest`,o=t===`light`?`text-cream/70`:`text-ink/60`,c=(0,r.useRef)(null),[l,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=c.current;if(!e||l)return;let t=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){u(!0),t.disconnect();break}},{threshold:.3});return t.observe(e),()=>t.disconnect()},[l]),(0,i.jsx)(`div`,{ref:c,className:`grid grid-cols-2 lg:grid-cols-4 border-t ${n}`,children:e.map((t,r)=>(0,i.jsxs)(`div`,{className:`py-10 lg:py-14 border-b ${n} ${r<e.length-1?`lg:border-r ${n}`:``} ${r%2==0?`border-r ${n} lg:border-r`:``} px-4 lg:px-8`,children:[(0,i.jsx)(`div`,{className:`font-serif text-4xl lg:text-6xl ${a} leading-[1.08]`,children:(0,i.jsx)(s,{value:t.value,active:l})}),(0,i.jsx)(`div`,{className:`mt-4 text-sm uppercase tracking-wider ${o}`,children:t.label})]},r))})}export{c as t};

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.