{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"url-bar-cta","type":"registry:component","title":"URL Bar CTA","description":"A browser window with a landing page where the cursor clicks the Get started button.","dependencies":["remotion","@remotion/google-fonts"],"docs":"Needs a Remotion project. If a frame renders black, the component is drawing on a transparent layer: put a background behind it, e.g. <AbsoluteFill style={{ background: \"#faf9f6\" }}><Component /></AbsoluteFill>.","registryDependencies":["https://kuchi.kalarislabs.com/r/gradient-ground.json"],"files":[{"path":"components/kuchi/url-bar-cta.tsx","type":"registry:component","target":"components/kuchi/url-bar-cta.tsx","content":"/*! Portions Copyright (c) 2026 Remocn. MIT License. See THIRD_PARTY_LICENSES. */\n\"use client\";\n\nimport { loadFont as loadGeist } from \"@remotion/google-fonts/Geist\";\nimport { loadFont as loadMono } from \"@remotion/google-fonts/GeistMono\";\nimport { loadFont as loadManrope } from \"@remotion/google-fonts/Manrope\";\nimport type React from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  Img,\n  interpolate,\n  spring,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/kuchi/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/kuchi/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/kuchi/gsh/presets\";\n\nconst geist = loadGeist(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\nconst mono = loadMono(\"normal\", { weights: [\"400\"], subsets: [\"latin\"] });\nconst manrope = loadManrope(\"normal\", {\n  weights: [\"600\"],\n  subsets: [\"latin\"],\n});\n\nexport interface UrlBarCtaProps {\n  url?: string;\n  children?: React.ReactNode;\n  typingSpeed?: number;\n  showCursor?: boolean;\n  suggestionTitle?: string;\n  headline?: string;\n  body?: string;\n  cta?: string;\n  command?: string;\n  image?: string;\n  clipName?: string;\n  /** Links in the built-in page's nav bar. */\n  navLinks?: string[];\n  /** Button at the right of the built-in page's nav bar. */\n  navCta?: string;\n  theme?: \"light\" | \"dark\";\n  accent?: string;\n  /** Text color of the typed URL and the headline; overrides the theme. */\n  ink?: string;\n  /** Solid fill in place of the gradient ground; \"transparent\" drops it. */\n  background?: string;\n  /** Typeface for the copy. Load it yourself; Geist by default. */\n  fontFamily?: string;\n  /** Replaces the placeholder wordmark in the built-in page's nav bar. */\n  logo?: React.ReactNode;\n  /** Size of the foreground around the frame's center. */\n  scale?: number;\n  /** Frames to hold the first frame before anything moves. */\n  delay?: number;\n  speed?: number;\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nconst CLAMP = {\n  extrapolateLeft: \"clamp\",\n  extrapolateRight: \"clamp\",\n} as const;\n\nconst CARD = { mass: 0.8, damping: 18, stiffness: 160 };\nconst CHIP = { mass: 0.5, damping: 12, stiffness: 200 };\nconst MORPH = { damping: 200 };\nconst TYPE_IN = Easing.bezier(0.32, 0.72, 0, 1);\nconst EXIT = Easing.bezier(0.55, 0, 1, 0.45);\nconst MOVE = Easing.bezier(0.65, 0, 0.35, 1);\n\n\nfunction KuchiLogo({ fontSize, color }: { fontSize: number; color: string }) {\n  return (\n    <div\n      style={{\n        display: \"flex\",\n        alignItems: \"baseline\",\n        color,\n        fontFamily: manrope.fontFamily,\n        fontWeight: 600,\n        fontSize,\n        letterSpacing: \"-0.025em\",\n        lineHeight: 1,\n      }}\n    >\n      <span>Acme</span>\n    </div>\n  );\n}\n\nfunction hash(n: number) {\n  const x = Math.sin(n * 91.7 + 17.3) * 43758.5453;\n  return x - Math.floor(x);\n}\n\nfunction withAlpha(hex: string, alpha: number) {\n  const h = hex.replace(\"#\", \"\");\n  const full = h.length === 3 ? h.replace(/./g, (c) => c + c) : h.slice(0, 6);\n  const n = Number.parseInt(full, 16);\n  return `rgba(${(n >> 16) & 255}, ${(n >> 8) & 255}, ${n & 255}, ${alpha})`;\n}\n\nconst lerp = (a: number, b: number, t: number) => a + (b - a) * t;\n\nfunction keyTimes(text: string, start: number, typingSpeed: number) {\n  const times: number[] = [];\n  let t = start;\n  for (let i = 0; i < text.length; i++) {\n    const prev = text[i - 1];\n    let gap = 2.1 + (hash(i) - 0.4) * 2.2;\n    if (prev === \".\" || prev === \"/\") gap += 3;\n    if (i === 0) gap = 0;\n    t += Math.max(0.8, gap) / typingSpeed;\n    times.push(t);\n  }\n  return times;\n}\n\ninterface Pal {\n  dark: boolean;\n  window: string;\n  chrome: string;\n  bar: string;\n  docked: string;\n  text: string;\n  muted: string;\n  faint: string;\n  line: string;\n  rowSel: string;\n  keyTop: string;\n  keyEdge: string;\n  elevated: string;\n  float: string;\n  imageEdge: string;\n  ground: { preset?: GshPresetId; params?: Partial<GradientParams> };\n  groundOffset: number;\n}\n\nfunction palette(theme: \"light\" | \"dark\"): Pal {\n  return theme === \"dark\"\n    ? {\n        dark: true,\n        window: \"#0f1013\",\n        chrome: \"#0b0c0e\",\n        bar: \"#16171b\",\n        docked: \"#1b1c21\",\n        text: \"#f2f2f3\",\n        muted: \"#9a9ca5\",\n        faint: \"#62646c\",\n        line: \"rgba(255,255,255,0.07)\",\n        rowSel: \"rgba(255,255,255,0.06)\",\n        keyTop: \"#202127\",\n        keyEdge: \"#08090b\",\n        elevated:\n          \"inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(255,255,255,0.09), 0 8px 20px -6px rgba(0,0,0,0.5), 0 32px 80px -16px rgba(0,0,0,0.75)\",\n        float:\n          \"inset 0 1px 0 rgba(255,255,255,0.07), 0 0 0 1px rgba(255,255,255,0.1), 0 6px 16px -4px rgba(0,0,0,0.5), 0 24px 60px -12px rgba(0,0,0,0.65)\",\n        imageEdge: \"inset 0 0 0 1px rgba(255,255,255,0.1)\",\n        ground: { preset: \"earthshine\" },\n        groundOffset: 3,\n      }\n    : {\n        dark: false,\n        window: \"#ffffff\",\n        chrome: \"#f6f6f4\",\n        bar: \"#ffffff\",\n        docked: \"#ebebe8\",\n        text: \"#16171b\",\n        muted: \"#5f616b\",\n        faint: \"#9a9ca4\",\n        line: \"rgba(20,20,30,0.08)\",\n        rowSel: \"rgba(20,20,30,0.05)\",\n        keyTop: \"#ffffff\",\n        keyEdge: \"#cfd0d4\",\n        elevated:\n          \"0 0 0 1px rgba(20,20,30,0.07), 0 2px 4px rgba(20,20,30,0.05), 0 28px 64px -18px rgba(30,30,60,0.28)\",\n        float:\n          \"0 0 0 1px rgba(20,20,30,0.08), 0 2px 6px rgba(20,20,30,0.06), 0 22px 50px -14px rgba(30,30,60,0.26)\",\n        imageEdge: \"inset 0 0 0 1px rgba(0,0,0,0.1)\",\n        ground: { preset: \"glasswork\" },\n        groundOffset: 2,\n      };\n}\n\nfunction Glyph({ d, size, color }: { d: string; size: number; color: string }) {\n  return (\n    <svg\n      width={size}\n      height={size}\n      viewBox=\"0 0 24 24\"\n      style={{ flexShrink: 0, display: \"block\" }}\n      aria-hidden\n    >\n      <path\n        d={d}\n        fill=\"none\"\n        stroke={color}\n        strokeWidth={1.5}\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n}\n\nconst ICON = {\n  search: \"M11 18a7 7 0 100-14 7 7 0 000 14zM20 20l-4-4\",\n  lock: \"M7.5 10.5V8a4.5 4.5 0 019 0v2.5M6.5 10.5h11v9h-11z\",\n  clock: \"M12 20.5a8.5 8.5 0 100-17 8.5 8.5 0 000 17zM12 7.5V12l3 2\",\n  arrowL: \"M14.5 6l-6 6 6 6\",\n  arrowR: \"M9.5 6l6 6-6 6\",\n  reload: \"M19.5 12a7.5 7.5 0 11-2.2-5.3M19.5 4.5v4.5H15\",\n  share: \"M12 3.5v11M8.5 7L12 3.5 15.5 7M6 12.5v7h12v-7\",\n  enter: \"M19 5.5v6a3 3 0 01-3 3H5.5M9 10.5l-4 4 4 4\",\n};\n\nfunction Favicon({ size, accent }: { size: number; accent: string }) {\n  return (\n    <div\n      style={{\n        width: size,\n        height: size,\n        borderRadius: size * 0.26,\n        background: accent,\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        flexShrink: 0,\n      }}\n    >\n      <svg\n        viewBox=\"0 0 124.06 134.26\"\n        style={{ height: size * 0.5, width: \"auto\" }}\n        aria-hidden\n      >\n        <circle cx=\"62.03\" cy=\"67.13\" r=\"56\" fill=\"#ffffff\" />\n      </svg>\n    </div>\n  );\n}\n\nfunction Keycap({\n  label,\n  pal,\n  size,\n}: {\n  label: string;\n  pal: Pal;\n  size: number;\n}) {\n  return (\n    <span\n      style={{\n        fontFamily: mono.fontFamily,\n        fontSize: size,\n        lineHeight: 1,\n        color: pal.muted,\n        padding: `${size * 0.28}px ${size * 0.45}px`,\n        borderRadius: size * 0.36,\n        boxShadow: `0 0 0 1px ${pal.line}`,\n        background: pal.dark ? \"rgba(255,255,255,0.03)\" : \"#ffffff\",\n        whiteSpace: \"nowrap\",\n      }}\n    >\n      {label}\n    </span>\n  );\n}\n\nfunction BuiltInHero({\n  pal,\n  accent,\n  frame,\n  start,\n  fps,\n  u,\n  portrait,\n  headline,\n  body,\n  cta,\n  command,\n  image,\n  clipName,\n  navLinks,\n  navCta,\n  ink,\n  fontFamily,\n  logo,\n}: {\n  pal: Pal;\n  accent: string;\n  frame: number;\n  start: number;\n  fps: number;\n  u: number;\n  portrait: boolean;\n  headline: string;\n  body: string;\n  cta: string;\n  command: string;\n  image: string;\n  clipName: string;\n  navLinks: string[];\n  navCta: string;\n  ink: string;\n  fontFamily: string;\n  logo: React.ReactNode;\n}) {\n  const textIn = (i: number) =>\n    interpolate(frame, [start + i * 3, start + i * 3 + 14], [0, 1], {\n      ...CLAMP,\n      easing: TYPE_IN,\n    });\n  const rise = (i: number) => {\n    const p = textIn(i);\n    return { opacity: p, transform: `translateY(${(1 - p) * 14 * u}px)` };\n  };\n  const card = spring({ frame: frame - start - 6, fps, config: CARD });\n  const cardOpacity = interpolate(frame, [start + 6, start + 14], [0, 1], {\n    ...CLAMP,\n    easing: TYPE_IN,\n  });\n  const playhead = interpolate(frame, [start, start + 120], [0.18, 0.86], {\n    ...CLAMP,\n  });\n  const clipSeconds = 6;\n  const now = playhead * clipSeconds;\n  const stamp = `0:${String(Math.floor(now)).padStart(2, \"0\")}`;\n  const pad = (portrait ? 34 : 44) * u;\n\n  const player = (\n    <div\n      style={{\n        opacity: cardOpacity,\n        transform: `translateY(${(1 - card) * 36 * u}px) scale(${0.96 + 0.04 * card})`,\n        transformOrigin: \"50% 100%\",\n        width: portrait ? \"100%\" : 430 * u,\n        flexShrink: 0,\n      }}\n    >\n      <div\n        style={{\n          position: \"relative\",\n          width: \"100%\",\n          aspectRatio: portrait ? \"16 / 10.5\" : \"4 / 3.15\",\n          borderRadius: 12 * u,\n          overflow: \"hidden\",\n          background: pal.chrome,\n        }}\n      >\n        <Img\n          src={image}\n          style={{\n            width: \"100%\",\n            height: \"100%\",\n            objectFit: \"cover\",\n            transform: `scale(${1.08 - 0.06 * playhead})`,\n          }}\n        />\n        <div\n          style={{\n            position: \"absolute\",\n            inset: 0,\n            borderRadius: \"inherit\",\n            boxShadow: pal.imageEdge,\n          }}\n        />\n        <div\n          style={{\n            position: \"absolute\",\n            left: 14 * u,\n            right: 14 * u,\n            bottom: 14 * u,\n            height: 3 * u,\n            borderRadius: 3 * u,\n            background: \"rgba(255,255,255,0.28)\",\n          }}\n        >\n          <div\n            style={{\n              width: `${playhead * 100}%`,\n              height: \"100%\",\n              borderRadius: \"inherit\",\n              background: \"#ffffff\",\n            }}\n          />\n        </div>\n      </div>\n      <div\n        style={{\n          display: \"flex\",\n          justifyContent: \"space-between\",\n          alignItems: \"baseline\",\n          marginTop: 14 * u,\n          fontSize: 17 * u,\n          color: pal.text,\n        }}\n      >\n        <span>{clipName}</span>\n        <span\n          style={{\n            fontFamily: mono.fontFamily,\n            fontSize: 16 * u,\n            color: pal.faint,\n            fontVariantNumeric: \"tabular-nums\",\n          }}\n        >\n          {stamp} / 0:{String(clipSeconds).padStart(2, \"0\")}\n        </span>\n      </div>\n    </div>\n  );\n\n  return (\n    <AbsoluteFill\n      style={{\n        background: pal.window,\n        overflow: \"hidden\",\n        fontFamily,\n        fontWeight: 400,\n      }}\n    >\n      <div\n        style={{\n          ...rise(0),\n          height: 58 * u,\n          padding: `0 ${pad}px`,\n          display: \"flex\",\n          alignItems: \"center\",\n          gap: 30 * u,\n          boxShadow: `inset 0 -1px 0 ${pal.line}`,\n          fontSize: 16 * u,\n          color: pal.muted,\n        }}\n      >\n        {logo ?? <KuchiLogo fontSize={19 * u} color={pal.text} />}\n        {portrait ? null : navLinks.map((l) => <span key={l}>{l}</span>)}\n        <span\n          style={{\n            marginLeft: \"auto\",\n            height: 34 * u,\n            padding: `0 ${14 * u}px`,\n            borderRadius: 8 * u,\n            display: \"inline-flex\",\n            alignItems: \"center\",\n            background: pal.text,\n            color: pal.window,\n          }}\n        >\n          {navCta}\n        </span>\n      </div>\n      <div\n        style={{\n          display: \"flex\",\n          flexDirection: portrait ? \"column\" : \"row\",\n          alignItems: portrait ? \"stretch\" : \"center\",\n          gap: (portrait ? 44 : 40) * u,\n          padding: `${(portrait ? 48 : 44) * u}px ${pad}px 0`,\n        }}\n      >\n        <div style={{ flex: 1, minWidth: 0 }}>\n          <div\n            style={{\n              ...rise(1),\n              fontSize: (portrait ? 52 : 50) * u,\n              fontWeight: 300,\n              letterSpacing: \"-0.04em\",\n              lineHeight: 1.04,\n              color: ink,\n              textWrap: \"balance\",\n              maxWidth: portrait ? \"none\" : 440 * u,\n            }}\n          >\n            {headline}\n          </div>\n          <div\n            style={{\n              ...rise(2),\n              fontSize: 18 * u,\n              lineHeight: 1.45,\n              color: pal.muted,\n              marginTop: 18 * u,\n              maxWidth: 380 * u,\n              textWrap: \"pretty\",\n            }}\n          >\n            {body}\n          </div>\n          <div\n            style={{\n              ...rise(3),\n              display: \"flex\",\n              alignItems: \"center\",\n              gap: 16 * u,\n              marginTop: 28 * u,\n              flexWrap: \"wrap\",\n            }}\n          >\n            <span\n              style={{\n                height: 42 * u,\n                padding: `0 ${18 * u}px`,\n                borderRadius: 9 * u,\n                display: \"inline-flex\",\n                alignItems: \"center\",\n                gap: 8 * u,\n                fontSize: 17 * u,\n                background: accent,\n                color: \"#ffffff\",\n                boxShadow: `inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 2px ${withAlpha(\"#000000\", 0.2)}`,\n              }}\n            >\n              {cta}\n              <Glyph\n                d=\"M5 12h14M13.5 6.5L19 12l-5.5 5.5\"\n                size={16 * u}\n                color=\"#ffffff\"\n              />\n            </span>\n          </div>\n          <div\n            style={{\n              ...rise(4),\n              marginTop: 18 * u,\n              fontFamily: mono.fontFamily,\n              fontSize: 16 * u,\n              color: pal.faint,\n              whiteSpace: \"nowrap\",\n            }}\n          >\n            <span style={{ color: pal.muted }}>$</span> {command}\n          </div>\n        </div>\n        {player}\n      </div>\n    </AbsoluteFill>\n  );\n}\n\n/** The foreground at `scale`, around the frame's center; nothing extra at 1. */\nfunction ScaleLayer({\n  scale,\n  children,\n}: {\n  scale: number;\n  children: React.ReactNode;\n}) {\n  if (scale === 1) return children;\n  return (\n    <AbsoluteFill style={{ transform: `scale(${scale})` }}>\n      {children}\n    </AbsoluteFill>\n  );\n}\n\nconst NAV_LINKS = [\"Components\", \"Templates\", \"Docs\"];\n\nexport function UrlBarCta({\n  url = \"acme.dev\",\n  children,\n  typingSpeed = 1,\n  showCursor = true,\n  suggestionTitle = \"Launch videos from components\",\n  headline = \"Ship your launch video this afternoon.\",\n  body = \"Remotion components you install with one command and own the code.\",\n  cta = \"Browse components\",\n  command = \"npm create acme@latest\",\n  image,\n  clipName = \"Zoom Blur\",\n  navLinks = NAV_LINKS,\n  navCta = \"Get started\",\n  theme = \"light\",\n  accent = \"#3B5BFD\",\n  ink,\n  background,\n  fontFamily = geist.fontFamily,\n  logo,\n  scale = 1,\n  delay = 0,\n  speed = 1,\n  ground,\n  groundParams,\n}: UrlBarCtaProps) {\n  const frame = Math.max(0, useCurrentFrame() - delay) * speed;\n  const { width: W, height: H, fps } = useVideoConfig();\n  const portrait = H > W;\n  const u = portrait ? W / 760 : Math.min(W / 1280, H / 720);\n  const pal = palette(theme);\n  const fg = ink ?? pal.text;\n  const src = image ?? \"https://kuchi-media.kalarislabs.com/components/art/art-05.svg\";\n\n  const typeStart = 8;\n  const times = keyTimes(url, typeStart, typingSpeed);\n  const typeEnd = times[times.length - 1] ?? typeStart;\n  const keyIn = typeEnd - 6;\n  const enter = typeEnd + 6;\n  const dock = enter + 5;\n  const heroStart = dock + 1;\n\n  const typed = times.filter((t) => frame >= t).length;\n  const typedText = url.slice(0, typed);\n  const completion = typed >= 3 && typed < url.length ? url.slice(typed) : \"\";\n\n  const appear = spring({ frame: frame + 2, fps, config: CARD });\n  const appearO = interpolate(frame, [-2, 8], [0, 1], {\n    ...CLAMP,\n    easing: TYPE_IN,\n  });\n  const suggestOpen = spring({\n    frame: frame - (times[1] ?? typeStart),\n    fps,\n    config: CARD,\n  });\n  const suggestClose = interpolate(frame, [enter + 1, dock + 3], [0, 1], {\n    ...CLAMP,\n    easing: EXIT,\n  });\n  const suggest = Math.max(0, suggestOpen * (1 - suggestClose));\n\n  const pressDown = spring({ frame: frame - enter, fps, config: CHIP });\n  const pressUp = spring({ frame: frame - enter - 4, fps, config: CHIP });\n  const press = Math.max(0, pressDown - pressUp);\n  const keyShow = spring({ frame: frame - keyIn, fps, config: CHIP });\n  const keyHide = interpolate(frame, [enter + 3, enter + 9], [0, 1], {\n    ...CLAMP,\n    easing: EXIT,\n  });\n\n  const d = spring({\n    frame: frame - dock,\n    fps,\n    config: MORPH,\n    durationInFrames: 22,\n  });\n  const load = interpolate(frame, [dock, dock + 24], [0, 1], {\n    ...CLAMP,\n    easing: MOVE,\n  });\n  const loadFade = interpolate(frame, [dock + 24, dock + 30], [1, 0], {\n    ...CLAMP,\n    easing: EXIT,\n  });\n  const push = interpolate(frame, [0, 120], [1, 1.03], CLAMP);\n\n  const barW0 = Math.min(640 * u, W * 0.86);\n  const barH0 = 62 * u;\n  const barX0 = (W - barW0) / 2;\n  const barY0 = H * (portrait ? 0.34 : 0.3) - barH0 / 2;\n\n  const winW = W * (portrait ? 0.86 : 0.76);\n  const winX = (W - winW) / 2;\n  const winY = H * (portrait ? 0.17 : 0.11);\n  const winH = H * (portrait ? 0.9 : 0.98);\n  const toolbarH = 46 * u;\n\n  const barX1 = winX + 112 * u;\n  const barW1 = winW - 112 * u * 2;\n  const barH1 = 30 * u;\n  const barY1 = winY + (toolbarH - barH1) / 2;\n\n  const bx = lerp(barX0, barX1, d);\n  const by = lerp(barY0, barY1, d);\n  const bw = lerp(barW0, barW1, d);\n  const bh = lerp(barH0, barH1, d);\n  const fontSize = lerp(26 * u, 16 * u, d);\n  const radius = lerp(16 * u, 8 * u, d);\n\n  const wx = lerp(barX0, winX, d);\n  const wy = lerp(barY0, winY, d);\n  const ww = lerp(barW0, winW, d);\n  const wh = lerp(barH0, winH, d);\n  const winOpacity = interpolate(d, [0, 0.12], [0, 1], CLAMP);\n\n  const rowH = 48 * u;\n  const listPad = 6 * u;\n  const rows = 3;\n  const popupExtra = (rowH * rows + listPad * 2 + 1) * suggest;\n\n  const caretOn =\n    showCursor &&\n    (frame < typeEnd + 2 || Math.floor((frame - typeEnd) / 9) % 2 === 1);\n  const caretVisible = caretOn && d < 0.4;\n\n  const suggestions = [\n    { icon: \"fav\", main: url, sub: suggestionTitle, hint: \"Enter\" },\n    {\n      icon: \"search\",\n      main: `${url.split(\".\")[0]} transitions`,\n      sub: \"\",\n      hint: \"Search\",\n    },\n    {\n      icon: \"clock\",\n      main: `${url}/docs/zoom-blur`,\n      sub: \"\",\n      hint: \"2d ago\",\n    },\n  ];\n\n  const preset = ground ?? (groundParams ? undefined : pal.ground.preset);\n  const gParams = groundParams ?? (ground ? undefined : pal.ground.params);\n\n  return (\n    <AbsoluteFill style={{ fontFamily, overflow: \"hidden\" }}>\n      {background === undefined ? (\n        <GshGround\n          preset={preset}\n          params={gParams}\n          timeOffset={pal.groundOffset}\n          timeScale={0.5}\n        />\n      ) : (\n        <AbsoluteFill\n          style={{\n            background: background === \"transparent\" ? undefined : background,\n          }}\n        />\n      )}\n      <ScaleLayer scale={scale}>\n        <AbsoluteFill\n          style={{ transform: `scale(${push})`, transformOrigin: \"50% 40%\" }}\n        >\n          <div\n            style={{\n              position: \"absolute\",\n              left: wx,\n              top: wy,\n              width: ww,\n              height: wh,\n              opacity: winOpacity,\n              borderRadius: lerp(16 * u, 14 * u, d),\n              background: pal.window,\n              overflow: \"hidden\",\n              boxShadow: pal.elevated,\n            }}\n          >\n            <div\n              style={{\n                height: toolbarH,\n                background: pal.chrome,\n                boxShadow: `inset 0 -1px 0 ${pal.line}`,\n                display: \"flex\",\n                alignItems: \"center\",\n                padding: `0 ${16 * u}px`,\n                gap: 7 * u,\n                position: \"relative\",\n                opacity: interpolate(d, [0.3, 0.8], [0, 1], CLAMP),\n              }}\n            >\n              {[0, 1, 2].map((k) => (\n                <span\n                  key={k}\n                  style={{\n                    width: 11 * u,\n                    height: 11 * u,\n                    borderRadius: 99,\n                    background: pal.dark\n                      ? \"rgba(255,255,255,0.14)\"\n                      : \"rgba(20,20,30,0.14)\",\n                  }}\n                />\n              ))}\n              <span style={{ width: 12 * u }} />\n              <Glyph d={ICON.arrowL} size={17 * u} color={pal.muted} />\n              <Glyph d={ICON.arrowR} size={17 * u} color={pal.faint} />\n              <div style={{ marginLeft: \"auto\", display: \"flex\", gap: 14 * u }}>\n                <Glyph d={ICON.reload} size={16 * u} color={pal.muted} />\n                <Glyph d={ICON.share} size={16 * u} color={pal.muted} />\n              </div>\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 0,\n                  bottom: 0,\n                  height: 2 * u,\n                  width: `${load * 100}%`,\n                  background: accent,\n                  opacity: loadFade * (load > 0 ? 1 : 0),\n                }}\n              />\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                left: (ww - winW) / 2,\n                width: winW,\n                top: toolbarH,\n                height: winH - toolbarH,\n                opacity: interpolate(d, [0.15, 0.45], [0, 1], CLAMP),\n              }}\n            >\n              {children ?? (\n                <BuiltInHero\n                  pal={pal}\n                  accent={accent}\n                  frame={frame}\n                  start={heroStart}\n                  fps={fps}\n                  u={u}\n                  portrait={portrait}\n                  headline={headline}\n                  body={body}\n                  cta={cta}\n                  command={command}\n                  image={src}\n                  clipName={clipName}\n                  navLinks={navLinks}\n                  navCta={navCta}\n                  ink={fg}\n                  fontFamily={fontFamily}\n                  logo={logo}\n                />\n              )}\n            </div>\n          </div>\n\n          <div\n            style={{\n              position: \"absolute\",\n              left: bx,\n              top: by,\n              width: bw,\n              height: bh + popupExtra,\n              borderRadius: radius,\n              background: d > 0.6 ? pal.docked : pal.bar,\n              boxShadow: d > 0.6 ? \"none\" : pal.float,\n              overflow: \"hidden\",\n              opacity: appearO,\n              transform: `translateY(${(1 - appear) * 18 * u}px) scale(${0.97 + 0.03 * appear})`,\n              transformOrigin: \"50% 0%\",\n            }}\n          >\n            <div\n              style={{\n                height: bh,\n                display: \"flex\",\n                alignItems: \"center\",\n                gap: lerp(14, 8, d) * u,\n                padding: `0 ${lerp(20, 12, d) * u}px`,\n                fontSize,\n                color: fg,\n                letterSpacing: \"-0.015em\",\n              }}\n            >\n              <Glyph\n                d={d > 0.5 ? ICON.lock : ICON.search}\n                size={lerp(22, 14, d) * u}\n                color={pal.faint}\n              />\n              <span\n                style={{\n                  whiteSpace: \"nowrap\",\n                  display: \"flex\",\n                  alignItems: \"center\",\n                }}\n              >\n                <span>{typedText}</span>\n                <span\n                  style={{\n                    width: 2 * u,\n                    height: fontSize * 1.1,\n                    background: accent,\n                    marginLeft: 1,\n                    opacity: caretVisible ? 1 : 0,\n                  }}\n                />\n                {completion ? (\n                  <span\n                    style={{\n                      background: withAlpha(accent, pal.dark ? 0.38 : 0.2),\n                      borderRadius: 3 * u,\n                    }}\n                  >\n                    {completion}\n                  </span>\n                ) : null}\n              </span>\n            </div>\n            <div\n              style={{ height: 1, background: pal.line, opacity: suggest }}\n            />\n            <div style={{ padding: listPad, opacity: suggest }}>\n              {suggestions.map((s, i) => {\n                const a = interpolate(\n                  suggestOpen * 3 - i * 0.6,\n                  [0, 1],\n                  [0, 1],\n                  CLAMP,\n                );\n                return (\n                  <div\n                    key={s.main}\n                    style={{\n                      height: rowH,\n                      borderRadius: radius - listPad,\n                      display: \"flex\",\n                      alignItems: \"center\",\n                      gap: 14 * u,\n                      padding: `0 ${14 * u}px`,\n                      background: i === 0 ? pal.rowSel : \"transparent\",\n                      fontSize: 17 * u,\n                      opacity: a,\n                      transform: `translateY(${(1 - a) * -6 * u}px)`,\n                      whiteSpace: \"nowrap\",\n                    }}\n                  >\n                    {s.icon === \"fav\" ? (\n                      <Favicon size={20 * u} accent={accent} />\n                    ) : (\n                      <span style={{ width: 20 * u, display: \"flex\" }}>\n                        <Glyph\n                          d={s.icon === \"search\" ? ICON.search : ICON.clock}\n                          size={18 * u}\n                          color={pal.faint}\n                        />\n                      </span>\n                    )}\n                    <span style={{ color: pal.text }}>{s.main}</span>\n                    {s.sub ? (\n                      <span\n                        style={{\n                          color: pal.muted,\n                          overflow: \"hidden\",\n                          textOverflow: \"ellipsis\",\n                          minWidth: 0,\n                        }}\n                      >\n                        {s.sub}\n                      </span>\n                    ) : null}\n                    <span style={{ marginLeft: \"auto\", display: \"flex\" }}>\n                      {i === 0 ? (\n                        <Keycap label={s.hint} pal={pal} size={14 * u} />\n                      ) : (\n                        <span\n                          style={{\n                            fontFamily: mono.fontFamily,\n                            fontSize: 15 * u,\n                            color: pal.faint,\n                          }}\n                        >\n                          {s.hint}\n                        </span>\n                      )}\n                    </span>\n                  </div>\n                );\n              })}\n            </div>\n          </div>\n\n          <div\n            style={{\n              position: \"absolute\",\n              left: W / 2 - 70 * u,\n              top: H * (portrait ? 0.66 : 0.78) - 30 * u,\n              width: 140 * u,\n              height: 60 * u,\n              opacity: Math.min(1, keyShow * 1.4) * (1 - keyHide),\n              transform: `translateY(${(1 - keyShow) * 20 * u + press * 5 * u + keyHide * 14 * u}px) scale(${(0.9 + 0.1 * keyShow) * (1 - 0.04 * press)})`,\n            }}\n          >\n            <div\n              style={{\n                position: \"absolute\",\n                inset: 0,\n                borderRadius: 14 * u,\n                background: pal.keyTop,\n                boxShadow: `inset 0 1px 0 ${pal.dark ? \"rgba(255,255,255,0.08)\" : \"#ffffff\"}, 0 0 0 1px ${pal.line}, 0 ${(6 - 5 * press) * u}px 0 ${pal.keyEdge}, 0 ${(18 - 10 * press) * u}px ${(34 - 16 * press) * u}px rgba(0,0,0,${pal.dark ? 0.5 : 0.16})`,\n                display: \"flex\",\n                alignItems: \"center\",\n                justifyContent: \"center\",\n                gap: 10 * u,\n                color: pal.text,\n                fontSize: 19 * u,\n              }}\n            >\n              <Glyph\n                d={ICON.enter}\n                size={22 * u}\n                color={press > 0.2 ? accent : pal.muted}\n              />\n              Enter\n            </div>\n          </div>\n        </AbsoluteFill>\n      </ScaleLayer>\n    </AbsoluteFill>\n  );\n}\n"}]}