{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "loader-radar",
  "type": "registry:component",
  "title": "Loader Radar",
  "description": "A radar sweep rotates over concentric rings and lights up blips as it passes over them, at the same positions every time.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "loaders",
    "loader",
    "radar",
    "scan",
    "search",
    "sweep",
    "devices"
  ],
  "docs": "https://hyperblur.dev/effects/loader-radar",
  "files": [
    {
      "path": "registry/hyperblur/loader-radar.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/loader-radar.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface LoaderRadarProps extends React.HTMLAttributes<HTMLSpanElement> {\n  size?: number;\n  color?: string;\n  accent?: string;\n  blips?: number;\n  speed?: number;\n  label?: string;\n}\n\nconst css = `\n.hb-qc9 {\n  position: relative;\n  display: inline-flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 0.7em;\n  box-sizing: border-box;\n  font-family: inherit;\n  color: #ededed;\n  vertical-align: middle;\n}\n.hb-qc9 *, .hb-qc9 *::before, .hb-qc9 *::after { box-sizing: border-box; }\n.hb-qc9-g {\n  position: relative;\n  flex: none;\n  width: var(--hb-qc9-s);\n  height: var(--hb-qc9-s);\n  overflow: hidden;\n  border-radius: 50%;\n  background: radial-gradient(circle, color-mix(in srgb, var(--hb-qc9-c) 10%, #0a0a0a) 0%, #0a0a0a 100%);\n  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hb-qc9-c) 45%, transparent);\n}\n.hb-qc9-ring {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  border-radius: 50%;\n  border: 1px solid color-mix(in srgb, var(--hb-qc9-c) 28%, transparent);\n  transform: translate(-50%, -50%);\n}\n.hb-qc9-ring:nth-child(1) { width: 33%; height: 33%; }\n.hb-qc9-ring:nth-child(2) { width: 66%; height: 66%; }\n.hb-qc9-cross::before, .hb-qc9-cross::after {\n  content: \"\";\n  position: absolute;\n  background: color-mix(in srgb, var(--hb-qc9-c) 22%, transparent);\n}\n.hb-qc9-cross::before { top: 0; bottom: 0; left: 50%; width: 1px; }\n.hb-qc9-cross::after { left: 0; right: 0; top: 50%; height: 1px; }\n.hb-qc9-sweep {\n  position: absolute;\n  inset: 0;\n  border-radius: 50%;\n  background: conic-gradient(from 0deg, transparent 0deg, transparent 240deg, color-mix(in srgb, var(--hb-qc9-c) 55%, transparent) 359deg, var(--hb-qc9-a) 360deg);\n  animation: hb-qc9-spin var(--hb-qc9-t) linear infinite;\n}\n.hb-qc9-blip {\n  position: absolute;\n  width: calc(var(--hb-qc9-s) * 0.07);\n  height: calc(var(--hb-qc9-s) * 0.07);\n  margin: calc(var(--hb-qc9-s) * -0.035) 0 0 calc(var(--hb-qc9-s) * -0.035);\n  border-radius: 50%;\n  background: var(--hb-qc9-a);\n  box-shadow: 0 0 calc(var(--hb-qc9-s) * 0.08) var(--hb-qc9-a);\n  opacity: 0;\n  animation: hb-qc9-ping var(--hb-qc9-t) ease-out infinite;\n  animation-delay: var(--w);\n}\n.hb-qc9-core {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  width: calc(var(--hb-qc9-s) * 0.05);\n  height: calc(var(--hb-qc9-s) * 0.05);\n  margin: calc(var(--hb-qc9-s) * -0.025) 0 0 calc(var(--hb-qc9-s) * -0.025);\n  border-radius: 50%;\n  background: var(--hb-qc9-c);\n}\n.hb-qc9-l { font-size: 12px; line-height: 1.3; color: #a1a1a1; white-space: nowrap; }\n.hb-qc9-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip-path: inset(50%);\n  white-space: nowrap;\n  border: 0;\n}\n@keyframes hb-qc9-spin { to { transform: rotate(360deg); } }\n@keyframes hb-qc9-ping {\n  0% { opacity: 1; transform: scale(1.6); }\n  35% { opacity: 0.85; transform: scale(1); }\n  100% { opacity: 0; transform: scale(0.8); }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-qc9-sweep { animation-duration: 12s; }\n  .hb-qc9-blip { animation: none; opacity: 0.8; }\n}\n`;\n\nexport function LoaderRadar({\n  size = 96,\n  color = \"#2f7bff\",\n  accent = \"#9fc6ff\",\n  blips = 5,\n  speed = 3,\n  label,\n  className = \"\",\n  style,\n  ...rest\n}: LoaderRadarProps) {\n  const n = Math.max(0, Math.round(blips));\n  const vars = {\n    \"--hb-qc9-s\": `${size}px`,\n    \"--hb-qc9-c\": color,\n    \"--hb-qc9-a\": accent,\n    \"--hb-qc9-t\": `${speed}s`,\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <>\n      <style href=\"hb-loader-radar\" precedence=\"default\">{css}</style>\n      <span role=\"status\" className={`hb-qc9 ${className}`} style={vars} {...rest}>\n        <span className=\"hb-qc9-g\" aria-hidden=\"true\">\n          <span className=\"hb-qc9-ring\" />\n          <span className=\"hb-qc9-ring\" />\n          <span className=\"hb-qc9-cross\" />\n          <span className=\"hb-qc9-sweep\" />\n          {Array.from({ length: n }, (_, i) => {\n            const h = Math.imul(i + 11, 2246822519) >>> 0;\n            const deg = ((h % 3600) / 10 + i * (360 / Math.max(1, n))) % 360;\n            const rad = 0.24 + ((h >>> 12) % 100) / 100 * 0.62;\n            const a = (deg * Math.PI) / 180;\n            const x = 50 + Math.sin(a) * rad * 50;\n            const y = 50 - Math.cos(a) * rad * 50;\n            const wait = (deg / 360) * speed;\n            return (\n              <span\n                key={i}\n                className=\"hb-qc9-blip\"\n                style={\n                  {\n                    left: `${x.toFixed(2)}%`,\n                    top: `${y.toFixed(2)}%`,\n                    \"--w\": `${wait.toFixed(2)}s`,\n                  } as React.CSSProperties\n                }\n              />\n            );\n          })}\n          <span className=\"hb-qc9-core\" />\n        </span>\n        <span className={label ? \"hb-qc9-l\" : \"hb-qc9-sr\"}>{label ?? \"Loading\"}</span>\n      </span>\n    </>\n  );\n}\n"
    }
  ]
}