-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchunk-65hRBMf3.js
More file actions
1 lines (1 loc) · 3.48 KB
/
Copy pathchunk-65hRBMf3.js
File metadata and controls
1 lines (1 loc) · 3.48 KB
1
import{r as C,j as o}from"../entries/pages.BZkyDMuN.js";const k=({seed:x="sigil",className:u="",color:m="currentColor"})=>{const y=C.useMemo(()=>{let t=3735928559;const i=x||"sigil";for(let s=0;s<i.length;s++)t=Math.imul(t^i.charCodeAt(s),2654435761);const r=()=>(t=Math.imul(t^t>>>16,2246822507),t=Math.imul(t^t>>>13,3266489909),((t^=t>>>16)>>>0)/4294967296),l=[],p=[],h=[],j=3+Math.floor(r()*4);for(let s=0;s<j;s++){const e=15+r()*32;p.push({r:e,dash:r()>.4?`${1+r()*8}, ${1+r()*8}`:"none",width:.1+r()*.4,rotSpeed:(r()-.5)*40,opacity:.4+r()*.6})}const g=1+Math.floor(r()*3);for(let s=0;s<g;s++){const e=3+Math.floor(r()*5),n=10+r()*25,c=[];for(let d=0;d<e;d++){const f=d/e*Math.PI*2-Math.PI/2;c.push(`${50+Math.cos(f)*n},${50+Math.sin(f)*n}`)}l.push({points:c.join(" "),width:.2+r()*.5,rotSpeed:(r()-.5)*20,opacity:.5+r()*.5})}const M=Math.floor(r()*6);for(let s=0;s<M;s++){const e=r()*Math.PI*2,n=5+r()*15,c=25+r()*20;h.push({x1:50+Math.cos(e)*n,y1:50+Math.sin(e)*n,x2:50+Math.cos(e)*c,y2:50+Math.sin(e)*c,width:.1+r()*.2,opacity:.3+r()*.4})}return{circles:p,polygons:l,lines:h}},[x]),a=x.replace(/[^a-z0-9]/gi,"-").toLowerCase();return o.jsxs("svg",{viewBox:"0 0 100 100",className:u,style:{color:m},children:[o.jsxs("defs",{children:[o.jsxs("radialGradient",{id:`glow-${a}`,children:[o.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.15"}),o.jsx("stop",{offset:"50%",stopColor:"currentColor",stopOpacity:"0.05"}),o.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"})]}),o.jsx("filter",{id:`blur-${a}`,children:o.jsx("feGaussianBlur",{stdDeviation:"0.5"})})]}),o.jsx("circle",{cx:"50",cy:"50",r:"45",fill:`url(#glow-${a})`}),o.jsx("circle",{cx:"50",cy:"50",r:"48",fill:"none",stroke:"currentColor",strokeWidth:"0.1",opacity:"0.3"}),o.jsx("circle",{cx:"50",cy:"50",r:"49",fill:"none",stroke:"currentColor",strokeWidth:"0.3",strokeDasharray:"1 2",opacity:"0.5"}),o.jsxs("g",{stroke:"currentColor",fill:"none",style:{transformOrigin:"50px 50px"},children:[o.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"120s",repeatCount:"indefinite"}),y.lines.map((t,i)=>o.jsx("line",{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,strokeWidth:t.width,opacity:t.opacity},`l-${i}`)),y.circles.map((t,i)=>o.jsxs("g",{style:{transformOrigin:"50px 50px"},children:[o.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:`${t.rotSpeed>0?360:-360} 50 50`,dur:`${Math.max(10,Math.abs(200/t.rotSpeed))}s`,repeatCount:"indefinite"}),o.jsx("circle",{cx:"50",cy:"50",r:t.r,strokeWidth:t.width,strokeDasharray:t.dash,opacity:t.opacity,filter:`url(#blur-${a})`}),o.jsx("circle",{cx:"50",cy:"50",r:t.r,strokeWidth:t.width*.5,strokeDasharray:t.dash,opacity:t.opacity})]},`cg-${i}`)),y.polygons.map((t,i)=>o.jsxs("g",{style:{transformOrigin:"50px 50px"},children:[o.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:`${t.rotSpeed>0?360:-360} 50 50`,dur:`${Math.max(15,Math.abs(200/t.rotSpeed))}s`,repeatCount:"indefinite"}),o.jsx("polygon",{points:t.points,strokeWidth:t.width,opacity:t.opacity,filter:`url(#blur-${a})`}),o.jsx("polygon",{points:t.points,strokeWidth:t.width*.5,opacity:t.opacity}),t.points.split(" ").map((r,l)=>{const[p,h]=r.split(",");return o.jsx("circle",{cx:p,cy:h,r:.5,fill:"currentColor",opacity:"0.8"},`pt-${l}`)})]},`pg-${i}`)),o.jsx("circle",{cx:"50",cy:"50",r:"1",fill:"currentColor",opacity:"0.9"}),o.jsx("circle",{cx:"50",cy:"50",r:"2",fill:"none",stroke:"currentColor",strokeWidth:"0.2",opacity:"0.8"})]})]})};export{k as A};