PageSourceSearch

https://try.nodecraft.com/0f4b0336-a1b1-437e-9162-aaec7a6e29e4/41e…/_astro/Hone16.DUeknZQI.js

js nodecraft.com collected 2026-09-24 17:45:48 UTC 2,752 bytes, 9 lines download raw bytes

1import{j as e}from"./VariantContext.DvYRgBT-.js";import{r as t}from"./index.o9bRfbtw.js";const P=b=>{const v={...S,...b},{messages:s,duration:F,title:g,progressColor:N,backgroundColor:k,onComplete:u}=v,[p,j]=t.useState(0),[I,y]=t.useState(0),[a,C]=t.useState(!1),E=t.useRef(null),o=t.useRef(null),c=t.useRef(null),m=t.useRef(null),f=t.useRef(!1),i=(F||3500)-750;t.useEffect(()=>{const n=E.current;if(!n)return;const r=new IntersectionObserver(l=>{l.forEach(A=>{A.isIntersecting&&!a&&C(!0)})},{threshold:.1});return r.observe(n),()=>{r.disconnect()}},[a]);const d=t.useCallback(n=>{o.current===null&&(o.current=n);const r=n-o.current,l=Math.min(100,Math.floor(r/i*100));j(l),l<100?c.current=requestAnimationFrame(d):!f.current&&u&&(f.current=!0,setTimeout(()=>{u()},300))},[i,u]);t.useEffect(()=>{if(!a)return;j(0),y(0),o.current=null,f.current=!1,c.current=requestAnimationFrame(d);const n=i/(s?.length||1);return s&&s.length>1&&(m.current=setInterval(()=>{y(r=>(r+1)%s.length)},n)),()=>{c.current&&cancelAnimationFrame(c.current),m.current&&clearInterval(m.current)}},[a,d,i,s]);const x=70,h=2*Math.PI*x,R=h-h*p/100;return e.jsxs("section",{ref:E,id:"Hone16",className:"flex flex-col items-center justify-center min-h-[400px]",style:{background:k},children:[g&&e.jsx("h2",{className:"text-xl md:text-2xl font-medium text-[#0E0B20] mb-8 font-dm-sans text-center",children:g}),e.jsxs("div",{className:"relative w-40 h-40 mb-8",children:[e.jsxs("svg",{className:"w-full h-full transform -rotate-90",viewBox:"0 0 160 160",children:[e.jsx("circle",{cx:"80",cy:"80",r:x,stroke:"#FFFFFF",strokeWidth:"8",fill:"none"}),e.jsx("circle",{cx:"80",cy:"80",r:x,stroke:N,strokeWidth:"8",fill:"none",strokeLinecap:"round",strokeDasharray:h,strokeDashoffset:R,className:"transition-all duration-100 ease-linear"})]}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("span",{className:"text-3xl font-bold text-[#0E0B20] font-dm-sans",children:[p,"%"]})})]}),s&&s.length>0&&e.jsx("p",{className:"text-base md:text-lg text-[#0E0B20] font-dm-sans text-center max-w-md min-h-[3rem] flex items-center justify-center",children:e.jsx("span",{className:"animate-fade-in",children:s[I]},I)}),e.jsx("style",{children:`
2        @keyframes fadeIn {
3          from { opacity: 0; transform: translateY(5px); }
4          to { opacity: 1; transform: translateY(0); }
5        }
6        .animate-fade-in {
7          animation: fadeIn 0.3s ease-out;
8        }
9      `})]})},S={messages:["Analyzing symptom severity...","Comparing against clinical averages...","Projecting optimization potential..."],duration:3500,title:"Calculating Your Vitality Score",progressColor:"#119555",backgroundColor:"#D2CEC4"};export{P as Hone16,S as Hone16Defaults};

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.