{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "money-send",
  "title": "Money Send",
  "description": "A phone payment screen confirms Sent to Maya with a receipt.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/money-send/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/HankenGrotesk\";\nimport type React from \"react\";\nimport { useId } from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  interpolate,\n  interpolateColors,\n  spring,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/remocn/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/remocn/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/remocn/gsh/presets\";\n\nconst { fontFamily } = loadFont(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\n\nexport interface MoneySendProps {\n  /** Full name; the first name is used in \"Sent to …\". */\n  recipient?: string;\n  /** Whole amount, typed digit by digit on the keypad. */\n  amount?: number;\n  /** ISO code, shown in the currency pill. USD, EUR, GBP and JPY get a symbol. */\n  currency?: string;\n  /** Letters are typed on the keyboard; a trailing emoji is picked from the suggestion bar. */\n  note?: string;\n  /** Three lines beside the phone: amount, note, sent. */\n  lines?: [string, string, string];\n  accent?: string;\n  speed?: number;\n  theme?: \"light\" | \"dark\";\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nconst SW = 390;\nconst SH = 844;\nconst BEZEL = 12;\nconst BW = SW + BEZEL * 2;\nconst BH = SH + BEZEL * 2;\n\nconst KB_TOP = 524;\nconst PILL_Y = KB_TOP - 74;\nconst NOTE_Y = PILL_Y - 16 - 58;\nconst AMOUNT_Y = 222;\nconst RING_Y = 290;\n\nconst clamp = { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" } as const;\nconst ENTER = Easing.bezier(0.32, 0.72, 0, 1);\nconst LIGHT = Easing.bezier(0.22, 1, 0.36, 1);\nconst MOVE = Easing.bezier(0.65, 0, 0.35, 1);\nconst EXIT = Easing.bezier(0.55, 0, 1, 0.45);\nconst CAMERA = Easing.bezier(0.87, 0, 0.13, 1);\nconst HEAVY = { mass: 1, damping: 26, stiffness: 120 };\nconst CARD = { mass: 0.8, damping: 18, stiffness: 160 };\nconst CHIP = { mass: 0.5, damping: 12, stiffness: 200 };\nconst MORPH = { damping: 200 };\n\nconst SYMBOLS: Record<string, string> = {\n  USD: \"$\",\n  EUR: \"€\",\n  GBP: \"£\",\n  JPY: \"¥\",\n};\n\nconst DARK = {\n  screen: \"#050506\",\n  text: \"#f4f4f6\",\n  muted: \"#8b8c94\",\n  field: \"#16171a\",\n  kb: \"#2b2b2d\",\n  key: \"#6b6b6f\",\n  keyAlt: \"#454548\",\n  keyShadow: \"0 1px 0 rgba(0,0,0,0.5)\",\n  pill: \"#f4f4f6\",\n  pillText: \"#0a0a0b\",\n  pillOff: \"#1d1e21\",\n  pillOffText: \"#5d5e65\",\n  pad: \"rgba(255,255,255,0.08)\",\n  touch: \"rgba(255,255,255,0.18)\",\n  hair: \"rgba(255,255,255,0.07)\",\n  frame:\n    \"linear-gradient(155deg,#55565c 0%,#2a2b2f 30%,#3d3e43 62%,#1f2023 100%)\",\n  copy: \"#f4f4f6\",\n  copyMuted: \"rgba(244,244,246,0.5)\",\n  phoneShadow:\n    \"0 50px 100px -20px rgba(0,0,0,0.7), 0 18px 36px -12px rgba(0,0,0,0.5)\",\n};\nconst LIGHT_PAL: typeof DARK = {\n  screen: \"#fbfbfa\",\n  text: \"#151518\",\n  muted: \"#77777e\",\n  field: \"#f0f0ee\",\n  kb: \"#d2d5da\",\n  key: \"#ffffff\",\n  keyAlt: \"#acb1ba\",\n  keyShadow: \"0 1px 0 rgba(0,0,0,0.28)\",\n  pill: \"#151518\",\n  pillText: \"#ffffff\",\n  pillOff: \"#e6e6e4\",\n  pillOffText: \"#a4a4a9\",\n  pad: \"rgba(21,21,24,0.06)\",\n  touch: \"rgba(21,21,24,0.16)\",\n  hair: \"rgba(21,21,24,0.07)\",\n  frame:\n    \"linear-gradient(155deg,#f1f1f3 0%,#c4c4ca 30%,#e2e2e6 62%,#b3b3ba 100%)\",\n  copy: \"#151518\",\n  copyMuted: \"rgba(21,21,24,0.48)\",\n  phoneShadow:\n    \"0 50px 90px -24px rgba(30,32,44,0.32), 0 14px 30px -10px rgba(30,32,44,0.18)\",\n};\ntype Palette = typeof DARK;\n\nconst NUM_KEYS = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \".\", \"0\", \"del\"];\nconst NK_W = SW / 3;\nconst NK_H = 62;\nconst numRect = (i: number) => ({\n  x: (i % 3) * NK_W,\n  y: KB_TOP + 24 + Math.floor(i / 3) * (NK_H + 4),\n  w: NK_W,\n  h: NK_H,\n});\n\ninterface QKey {\n  id: string;\n  x: number;\n  y: number;\n  w: number;\n  label: string;\n  alt: boolean;\n}\nconst QW = 32.4;\nconst QH = 42;\nconst qRowY = (r: number) => KB_TOP + 52 + r * 54;\nconst QWERTY: QKey[] = (() => {\n  const out: QKey[] = [];\n  [\"qwertyuiop\", \"asdfghjkl\", \"zxcvbnm\"].forEach((row, r) => {\n    const x0 = (SW - (row.length * QW + (row.length - 1) * 6)) / 2;\n    row.split(\"\").forEach((ch, i) => {\n      out.push({\n        id: ch,\n        x: x0 + i * (QW + 6),\n        y: qRowY(r),\n        w: QW,\n        label: ch,\n        alt: false,\n      });\n    });\n  });\n  const y3 = qRowY(3);\n  out.push(\n    { id: \"shift\", x: 6, y: qRowY(2), w: 44, label: \"\", alt: true },\n    { id: \"del\", x: SW - 50, y: qRowY(2), w: 44, label: \"\", alt: true },\n    { id: \"123\", x: 6, y: y3, w: 44, label: \"123\", alt: true },\n    { id: \"emoji\", x: 56, y: y3, w: 44, label: \"\", alt: true },\n    { id: \" \", x: 106, y: y3, w: SW - 204, label: \"space\", alt: false },\n    { id: \"return\", x: SW - 92, y: y3, w: 86, label: \"return\", alt: true },\n  );\n  return out;\n})();\n\nconst ICON = {\n  back: \"M19 12H5M11 6l-6 6 6 6\",\n  del: \"M9 6h11a1 1 0 011 1v10a1 1 0 01-1 1H9l-6-6zM12.5 9.5l5 5M17.5 9.5l-5 5\",\n  left: \"M14.5 6l-6 6 6 6\",\n  shift: \"M12 4l8 8h-4.5v7h-7v-7H4z\",\n  smile:\n    \"M12 3a9 9 0 110 18 9 9 0 010-18zM8.5 14.5c1.8 2 5.2 2 7 0M9 9.5h.01M15 9.5h.01\",\n  chev: \"M7 10l5 5 5-5\",\n  check: \"M7 12.5l3.5 3.5L17 9\",\n  globe:\n    \"M12 3a9 9 0 110 18 9 9 0 010-18zM3 12h18M12 3c2.5 2.6 3.6 5.6 3.6 9s-1.1 6.4-3.6 9c-2.5-2.6-3.6-5.6-3.6-9s1.1-6.4 3.6-9z\",\n  mic: \"M12 3a3 3 0 013 3v6a3 3 0 01-6 0V6a3 3 0 013-3zM5.5 11a6.5 6.5 0 0013 0M12 17.5V21\",\n  x: \"M9 9l6 6M15 9l-6 6\",\n  share: \"M12 15V4M8 8l4-4 4 4M5 13v6h14v-6\",\n};\n\nfunction balloon(w: number, kw: number, kh: number) {\n  const dx = (w - kw) / 2;\n  const head = 50;\n  const neck = 12;\n  const h = head + neck + kh;\n  return {\n    h,\n    d: `M0 9Q0 0 9 0H${w - 9}Q${w} 0 ${w} 9V${head}C${w} ${head + neck * 0.6} ${w - dx} ${head + neck * 0.4} ${w - dx} ${head + neck}V${h - 6}Q${w - dx} ${h} ${w - dx - 6} ${h}H${dx + 6}Q${dx} ${h} ${dx} ${h - 6}V${head + neck}C${dx} ${head + neck * 0.4} 0 ${head + neck * 0.6} 0 ${head}Z`,\n  };\n}\n\nfunction Glyph({\n  d,\n  size = 20,\n  color,\n  sw = 1.5,\n}: {\n  d: string;\n  size?: number;\n  color: string;\n  sw?: number;\n}) {\n  return (\n    <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n      <path\n        d={d}\n        stroke={color}\n        strokeWidth={sw}\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n}\n\nfunction splitNote(note: string) {\n  const chars = Array.from(note);\n  const idx = chars.findIndex((ch) => (ch.codePointAt(0) ?? 0) > 0x2100);\n  if (idx < 0) return { word: chars, emoji: \"\" };\n  return {\n    word: Array.from(chars.slice(0, idx).join(\"\").trimEnd()),\n    emoji: chars.slice(idx).join(\"\").trim(),\n  };\n}\n\nfunction StatusBar({ color }: { color: string }) {\n  return (\n    <div\n      style={{\n        position: \"absolute\",\n        top: 0,\n        left: 0,\n        right: 0,\n        height: 54,\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: \"space-between\",\n        padding: \"4px 30px 0 52px\",\n        zIndex: 30,\n      }}\n    >\n      <span style={{ fontSize: 17, fontWeight: 400, color }}>9:41</span>\n      <div style={{ display: \"flex\", gap: 6, alignItems: \"center\" }}>\n        <svg width=\"18\" height=\"12\" viewBox=\"0 0 18 12\">\n          {[0, 1, 2, 3].map((i) => (\n            <rect\n              key={i}\n              x={i * 4.6}\n              y={9 - i * 3}\n              width={3.2}\n              height={3 + i * 3}\n              rx={0.8}\n              fill={color}\n            />\n          ))}\n        </svg>\n        <svg width=\"17\" height=\"12\" viewBox=\"0 0 17 12\">\n          <path\n            d=\"M8.5 11.5l2.4-2.9a3.6 3.6 0 00-4.8 0zM3.7 6.2a7 7 0 019.6 0l1.6-1.9a9.6 9.6 0 00-12.8 0zM.5 2.9a12 12 0 0116 0\"\n            fill={color}\n            stroke={color}\n            strokeWidth={0.6}\n          />\n        </svg>\n        <div\n          style={{\n            width: 26,\n            height: 12.5,\n            borderRadius: 4,\n            border: `1px solid ${color}`,\n            padding: 1.5,\n            boxSizing: \"border-box\",\n          }}\n        >\n          <div\n            style={{\n              width: \"80%\",\n              height: \"100%\",\n              borderRadius: 2,\n              background: color,\n            }}\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n\nfunction Phone({ children, c }: { children: React.ReactNode; c: Palette }) {\n  const side = (s: \"left\" | \"right\", top: number, h: number) => (\n    <div\n      style={{\n        position: \"absolute\",\n        [s]: -2.5,\n        top,\n        width: 4,\n        height: h,\n        borderRadius: 2,\n        background: c.frame,\n      }}\n    />\n  );\n  return (\n    <div style={{ position: \"relative\", width: BW, height: BH }}>\n      {side(\"left\", 168, 30)}\n      {side(\"left\", 226, 60)}\n      {side(\"left\", 298, 60)}\n      {side(\"right\", 258, 96)}\n      <div\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          borderRadius: 67,\n          background: c.frame,\n          boxShadow: `${c.phoneShadow}, inset 0 0 0 1px rgba(255,255,255,0.22)`,\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          inset: 3.5,\n          borderRadius: 63.5,\n          background: \"#050506\",\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          left: BEZEL,\n          top: BEZEL,\n          width: SW,\n          height: SH,\n          borderRadius: 55,\n          overflow: \"hidden\",\n          background: c.screen,\n        }}\n      >\n        {children}\n        <div\n          style={{\n            position: \"absolute\",\n            top: 11,\n            left: (SW - 124) / 2,\n            width: 124,\n            height: 36,\n            borderRadius: 18,\n            background: \"#000\",\n            zIndex: 40,\n          }}\n        />\n        <div\n          style={{\n            position: \"absolute\",\n            bottom: 8,\n            left: (SW - 136) / 2,\n            width: 136,\n            height: 5,\n            borderRadius: 3,\n            background: c.text,\n            zIndex: 40,\n          }}\n        />\n      </div>\n    </div>\n  );\n}\n\nfunction Avatar({ initials, size }: { initials: string; size: number }) {\n  return (\n    <div\n      style={{\n        width: size,\n        height: size,\n        borderRadius: size / 2,\n        background: \"#c98a68\",\n        boxShadow: \"inset 0 0 0 1px rgba(0,0,0,0.08)\",\n        color: \"#fff8f2\",\n        fontSize: size * 0.36,\n        fontWeight: 400,\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        flexShrink: 0,\n      }}\n    >\n      {initials}\n    </div>\n  );\n}\n\nfunction Flag({ currency, color }: { currency: string; color: string }) {\n  const id = `flag${useId().replace(/[^a-zA-Z0-9_-]/g, \"\")}`;\n  if (currency !== \"USD\") {\n    return (\n      <div\n        style={{\n          width: 20,\n          height: 20,\n          borderRadius: 10,\n          background: color,\n          color: \"#fff\",\n          fontSize: 11,\n          display: \"flex\",\n          alignItems: \"center\",\n          justifyContent: \"center\",\n        }}\n      >\n        {SYMBOLS[currency] ?? currency[0]}\n      </div>\n    );\n  }\n  return (\n    <svg width={20} height={20} viewBox=\"0 0 20 20\">\n      <defs>\n        <clipPath id={id}>\n          <circle cx={10} cy={10} r={10} />\n        </clipPath>\n      </defs>\n      <g clipPath={`url(#${id})`}>\n        <rect width={20} height={20} fill=\"#fff\" />\n        {[0, 2, 4, 6, 8, 10, 12].map((i) => (\n          <rect key={i} y={i * 1.54} width={20} height={1.54} fill=\"#d22f3c\" />\n        ))}\n        <rect width={10} height={10.8} fill=\"#2a3b84\" />\n      </g>\n    </svg>\n  );\n}\n\nexport function MoneySend({\n  recipient = \"Maya Chen\",\n  amount = 120,\n  currency = \"USD\",\n  note = \"Dinner 🍜\",\n  lines = [\"Type any amount.\", \"Say what it’s for.\", \"Sent in a second.\"],\n  accent = \"#3B5BFD\",\n  speed = 1,\n  theme = \"dark\",\n  ground,\n  groundParams,\n}: MoneySendProps) {\n  const frame = useCurrentFrame();\n  const { fps, width, height } = useVideoConfig();\n  const f = frame * speed;\n  const dark = theme !== \"light\";\n  const c: Palette = dark ? DARK : LIGHT_PAL;\n  const tall = height > width;\n  const W = tall ? 720 : 1280;\n  const H = tall ? 1280 : 720;\n  const u = Math.min(width / W, height / H);\n  const k = tall ? (H * 0.74) / BH : (H * 0.94) / BH;\n  const phoneCx = tall ? W / 2 : W * 0.665;\n  const phoneCy = tall ? H - 36 - (BH * k) / 2 : H / 2;\n\n  const sp = (at: number, config: typeof CARD | typeof MORPH = CARD) =>\n    spring({ frame: f - at, fps, config });\n  const pressAt = (at: number) =>\n    spring({ frame: f - at, fps, config: CHIP }) -\n    spring({ frame: f - at - 4, fps, config: CHIP });\n\n  const digits = String(Math.max(1, Math.round(amount))).slice(0, 6);\n  const symbol = SYMBOLS[currency] ?? \"\";\n  const { word, emoji } = splitNote(note);\n  const first = recipient.split(\" \")[0];\n  const initials = recipient\n    .split(\" \")\n    .map((s) => s[0] ?? \"\")\n    .join(\"\")\n    .slice(0, 2)\n    .toUpperCase();\n\n  const keyTimes = digits.split(\"\").map((_, i) => 30 + i * 11);\n  const NOTE_TAP = keyTimes[keyTimes.length - 1] + 22;\n  const KB_SWAP = NOTE_TAP + 3;\n  const gap = Math.min(5, 36 / Math.max(1, word.length));\n  const letterTimes = word.map((_, i) => KB_SWAP + 18 + i * gap);\n  const typeEnd = letterTimes.length\n    ? letterTimes[letterTimes.length - 1]\n    : KB_SWAP + 12;\n  const SUGG_TAP = emoji ? typeEnd + 11 : typeEnd;\n  const SEND_TAP = SUGG_TAP + 18;\n  const FLY = SEND_TAP + 3;\n  const PROG = SEND_TAP + 6;\n  const DONE = PROG + 30;\n\n  const nTyped = keyTimes.filter((t) => f >= t).length;\n  const nLetters = letterTimes.filter((t) => f >= t).length;\n  const emojiIn = emoji ? sp(SUGG_TAP, CHIP) : 0;\n  const noteFocused = f >= NOTE_TAP;\n\n  const numCenter = (d: string) => {\n    const r = numRect(d === \"0\" ? 10 : Number(d) - 1);\n    return { x: r.x + r.w / 2, y: r.y + r.h / 2 + 4 };\n  };\n  const letterKey = (ch: string) =>\n    QWERTY.find((q) => q.id === ch.toLowerCase()) ??\n    (QWERTY.find((q) => q.id === \" \") as QKey);\n  const presses = [\n    ...digits.split(\"\").map((d, i) => ({ t: keyTimes[i], ...numCenter(d) })),\n    { t: NOTE_TAP, x: SW / 2 + 50, y: NOTE_Y + 30 },\n    ...word.map((ch, i) => {\n      const q = letterKey(ch);\n      return { t: letterTimes[i], x: q.x + q.w / 2, y: q.y + QH / 2 + 6 };\n    }),\n    ...(emoji ? [{ t: SUGG_TAP, x: SW / 2, y: KB_TOP + 24 }] : []),\n    { t: SEND_TAP, x: SW / 2 + 36, y: PILL_Y + 28 },\n  ];\n  const path = [\n    { t: presses[0].t - 16, x: presses[0].x + 70, y: presses[0].y + 120 },\n    ...presses,\n  ];\n  let touch = { x: path[0].x, y: path[0].y };\n  for (let i = 0; i < path.length - 1; i++) {\n    const a = path[i];\n    const b = path[i + 1];\n    const start = a.t + 1.5;\n    const end = Math.max(start + 1, b.t - 1);\n    if (f >= start) {\n      const p = Math.min(1, (f - start) / (end - start));\n      const e = MOVE(p);\n      const dist = Math.hypot(b.x - a.x, b.y - a.y);\n      const lift = Math.sin(Math.PI * e) * Math.min(28, dist * 0.18);\n      const nx = dist ? -(b.y - a.y) / dist : 0;\n      const ny = dist ? (b.x - a.x) / dist : 0;\n      touch = {\n        x: a.x + (b.x - a.x) * e + nx * lift,\n        y: a.y + (b.y - a.y) * e + ny * lift,\n      };\n    }\n  }\n  const touchOpacity = interpolate(\n    f,\n    [path[0].t, path[0].t + 8, SEND_TAP + 2, SEND_TAP + 7],\n    [0, 1, 1, 0],\n    clamp,\n  );\n  const touchPress = Math.max(...presses.map((p) => pressAt(p.t)));\n\n  const kbOut = interpolate(f, [KB_SWAP, KB_SWAP + 8], [0, 1], {\n    ...clamp,\n    easing: EXIT,\n  });\n  const qIn = f >= KB_SWAP + 5 ? sp(KB_SWAP + 5, MORPH) : 0;\n  const fly = sp(FLY, MORPH);\n  const kbDown = interpolate(f, [SEND_TAP + 2, SEND_TAP + 11], [0, 1], {\n    ...clamp,\n    easing: ENTER,\n  });\n  const qY = (1 - qIn) * (SH - KB_TOP) + kbDown * (SH - KB_TOP);\n  const caps = nLetters === 0 && word[0] === word[0]?.toUpperCase();\n  const lastLetter = nLetters - 1;\n\n  const rise = spring({ frame: f, fps, config: HEAVY });\n  const camS = interpolate(f, [16, 70, FLY, FLY + 50], [1, 1.03, 1.03, 1.05], {\n    ...clamp,\n    easing: CAMERA,\n  });\n\n  const enabled = interpolate(f, [keyTimes[0], keyTimes[0] + 6], [0, 1], {\n    ...clamp,\n    easing: ENTER,\n  });\n  const sendPress = pressAt(SEND_TAP);\n  const away = interpolate(f, [SEND_TAP + 2, SEND_TAP + 9], [0, 1], {\n    ...clamp,\n    easing: EXIT,\n  });\n  const lbl = interpolate(f, [NOTE_TAP, NOTE_TAP + 6], [0, 1], {\n    ...clamp,\n    easing: ENTER,\n  });\n  const typed = nTyped === 0 ? \"0\" : digits.slice(0, nTyped);\n  const amountChars = Number(typed)\n    .toLocaleString(\"en-US\")\n    .split(\"\")\n    .reduce<{ ch: string; di: number }[]>((acc, ch) => {\n      const di = acc.filter((a) => a.di >= 0).length;\n      acc.push({ ch, di: ch === \",\" ? -1 : di });\n      return acc;\n    }, []);\n  const money = (n: number) =>\n    `${symbol}${n.toLocaleString(\"en-US\", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}${symbol ? \"\" : ` ${currency}`}`;\n  const caretOn = f < NOTE_TAP && Math.floor((f + 6) / 14) % 2 === 0;\n\n  const ringIn = sp(PROG, CARD);\n  const arc = interpolate(f, [PROG, DONE - 4, DONE + 2], [0.12, 0.7, 1], {\n    ...clamp,\n    easing: MOVE,\n  });\n  const spin = f < DONE ? (f - PROG) * 11 : (DONE - PROG) * 11;\n  const disc = sp(DONE + 1, CHIP);\n  const tick = interpolate(f, [DONE + 5, DONE + 15], [0, 1], {\n    ...clamp,\n    easing: LIGHT,\n  });\n  const pulse = interpolate(f, [DONE + 6, DONE + 40], [0, 1], {\n    ...clamp,\n    easing: LIGHT,\n  });\n  const title = sp(PROG + 4);\n  const swap = sp(DONE + 4, CHIP);\n  const sub = sp(DONE + 8);\n  const done = sp(DONE + 24);\n  const receipt: [string, string][] = [\n    [\"Amount\", money(Number(digits))],\n    [\"From\", `Main · ${currency}`],\n    [\"Arrives\", \"Instantly\"],\n    [\"Fee\", money(0)],\n  ];\n  const rows = receipt.map((_, i) => sp(DONE + 12 + i * 3));\n  const enter = (v: number, dy = 14): React.CSSProperties => ({\n    opacity: Math.min(1, v * 1.4),\n    transform: `translateY(${(1 - v) * dy}px)`,\n  });\n\n  const beats = [0, NOTE_TAP, PROG];\n  const copyLine = (i: number) => {\n    const inAt = beats[i] + (i === 0 ? 6 : 0);\n    const outAt = beats[i + 1];\n    const pin = interpolate(f, [inAt, inAt + 14], [0, 1], {\n      ...clamp,\n      easing: ENTER,\n    });\n    const pout =\n      outAt === undefined\n        ? 0\n        : interpolate(f, [outAt - 2, outAt + 6], [0, 1], {\n            ...clamp,\n            easing: EXIT,\n          });\n    if (pin <= 0 || pout >= 1) return null;\n    return (\n      <div\n        key={i}\n        style={{\n          position: \"absolute\",\n          left: 0,\n          right: 0,\n          top: 0,\n          transform: `translateY(${(1 - pin) * 70 - pout * 50}%)`,\n          opacity: pin * (1 - pout),\n        }}\n      >\n        {lines[i]}\n      </div>\n    );\n  };\n\n  const keyStyle = (\n    x: number,\n    y: number,\n    w: number,\n    h: number,\n    bg: string,\n  ): React.CSSProperties => ({\n    position: \"absolute\",\n    left: x,\n    top: y,\n    width: w,\n    height: h,\n    borderRadius: 7,\n    background: bg,\n    boxShadow: c.keyShadow,\n    color: c.text,\n    display: \"flex\",\n    flexDirection: \"column\",\n    alignItems: \"center\",\n    justifyContent: \"center\",\n  });\n\n  return (\n    <AbsoluteFill style={{ fontFamily, overflow: \"hidden\" }}>\n      <GshGround\n        preset={ground ?? (dark ? \"cobalt-rise\" : \"paper-crease\")}\n        params={groundParams}\n        timeOffset={dark ? 4 : 6}\n        timeScale={0.35}\n      />\n      <AbsoluteFill\n        style={{\n          background: dark ? \"rgba(2,3,8,0.32)\" : \"rgba(243,241,237,0.35)\",\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          left: (width - W * u) / 2,\n          top: (height - H * u) / 2,\n          width: W,\n          height: H,\n          transformOrigin: \"0 0\",\n          transform: `scale(${u})`,\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            left: tall ? 56 : 92,\n            top: tall ? 88 : H / 2 - 80,\n            width: tall ? W - 112 : 500,\n            height: 160,\n            fontSize: tall ? 60 : 72,\n            fontWeight: 300,\n            lineHeight: 1.04,\n            letterSpacing: \"-0.035em\",\n            color: c.copy,\n            overflow: \"hidden\",\n            textWrap: \"balance\",\n          }}\n        >\n          {[0, 1, 2].map((i) => copyLine(i))}\n        </div>\n        <div\n          style={{\n            position: \"absolute\",\n            left: phoneCx - BW / 2,\n            top: phoneCy - BH / 2,\n            width: BW,\n            height: BH,\n            transform: `translateY(${(1 - rise) * H * 0.9}px) scale(${k * camS})`,\n          }}\n        >\n          <Phone c={c}>\n            <StatusBar color={c.text} />\n            <div\n              style={{\n                position: \"absolute\",\n                top: 58,\n                left: 20,\n                right: 20,\n                height: 44,\n                display: \"flex\",\n                alignItems: \"center\",\n                justifyContent: \"space-between\",\n                opacity: 1 - away,\n                transform: `translateY(${-away * 8}px)`,\n              }}\n            >\n              <Glyph d={ICON.back} size={24} color={c.text} />\n              <div style={{ textAlign: \"center\", lineHeight: 1.25 }}>\n                <div style={{ fontSize: 17, color: c.text }}>{recipient}</div>\n                <div style={{ fontSize: 14, color: c.muted }}>\n                  @{recipient.toLowerCase().replace(/[^a-z]+/g, \"\")}\n                </div>\n              </div>\n              <Avatar initials={initials} size={36} />\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                left: 0,\n                right: 0,\n                top: AMOUNT_Y - 50,\n                height: 100,\n                display: \"flex\",\n                alignItems: \"center\",\n                justifyContent: \"center\",\n                fontSize: 92,\n                fontWeight: 300,\n                letterSpacing: \"-0.05em\",\n                fontVariantNumeric: \"tabular-nums\",\n                color: nTyped ? c.text : c.muted,\n                transform: `translateY(${fly * (118 - AMOUNT_Y)}px) scale(${1 - fly * 0.5})`,\n                zIndex: 5,\n              }}\n            >\n              <span>{symbol}</span>\n              {amountChars.map(({ ch, di }, i) => {\n                const pop = nTyped && di >= 0 ? sp(keyTimes[di], CHIP) : 1;\n                return (\n                  <span\n                    key={i}\n                    style={{\n                      display: \"inline-block\",\n                      width: `${(ch === \",\" ? 0.26 : 0.56) * Math.min(1, pop * 1.3)}em`,\n                      textAlign: \"center\",\n                      transform: `translateY(${(1 - pop) * 18}px) scale(${0.88 + pop * 0.12})`,\n                      opacity: Math.min(1, pop * 1.6),\n                    }}\n                  >\n                    {ch}\n                  </span>\n                );\n              })}\n              <span\n                style={{\n                  width: 3,\n                  height: 70,\n                  marginLeft: 6,\n                  borderRadius: 2,\n                  background: accent,\n                  opacity: caretOn ? 1 : 0,\n                }}\n              />\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                left: 0,\n                right: 0,\n                top: AMOUNT_Y + 56,\n                display: \"flex\",\n                justifyContent: \"center\",\n                opacity: 1 - away,\n                transform: `translateY(${-away * 10}px)`,\n              }}\n            >\n              <div\n                style={{\n                  height: 36,\n                  padding: \"0 12px 0 8px\",\n                  borderRadius: 18,\n                  background: c.field,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  gap: 8,\n                  fontSize: 15,\n                  color: c.text,\n                }}\n              >\n                <Flag currency={currency} color={c.muted} />\n                Main · {currency}\n                <span style={{ color: c.muted }}>No fees</span>\n                <Glyph d={ICON.chev} size={16} color={c.muted} />\n              </div>\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                left: 16,\n                right: 16,\n                top: NOTE_Y,\n                height: 58,\n                borderRadius: 14,\n                background: c.field,\n                opacity: 1 - away,\n                transform: `translateY(${-away * 10}px) scale(${1 - pressAt(NOTE_TAP) * 0.03})`,\n              }}\n            >\n              <span\n                style={{\n                  position: \"absolute\",\n                  left: 16,\n                  top: 18,\n                  fontSize: 17,\n                  lineHeight: \"22px\",\n                  color: c.muted,\n                  transformOrigin: \"0 0\",\n                  transform: `translateY(${-lbl * 10}px) scale(${1 - lbl * 0.3})`,\n                }}\n              >\n                Add a note\n              </span>\n              {noteFocused ? (\n                <span\n                  style={{\n                    position: \"absolute\",\n                    left: 16,\n                    top: 26,\n                    fontSize: 17,\n                    lineHeight: \"22px\",\n                    color: c.text,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    opacity: lbl,\n                  }}\n                >\n                  {word.slice(0, nLetters).join(\"\")}\n                  {emojiIn > 0 ? (\n                    <span\n                      style={{\n                        display: \"inline-block\",\n                        marginLeft: 5,\n                        transform: `scale(${0.5 + emojiIn * 0.5})`,\n                        opacity: Math.min(1, emojiIn * 2),\n                      }}\n                    >\n                      {emoji}\n                    </span>\n                  ) : null}\n                  <span\n                    style={{\n                      width: 2,\n                      height: 21,\n                      marginLeft: 1,\n                      borderRadius: 1,\n                      background: accent,\n                      opacity: Math.floor(f / 14) % 2 === 0 ? 1 : 0,\n                    }}\n                  />\n                </span>\n              ) : null}\n              <div\n                style={{\n                  position: \"absolute\",\n                  right: 16,\n                  top: 19,\n                  width: 20,\n                  height: 20,\n                  borderRadius: 10,\n                  background: c.muted,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  justifyContent: \"center\",\n                  opacity: nLetters > 0 ? 0.6 : 0,\n                }}\n              >\n                <Glyph d={ICON.x} size={14} color={c.field} sw={2} />\n              </div>\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                left: 16,\n                right: 16,\n                top: PILL_Y,\n                height: 56,\n                borderRadius: 28,\n                background: interpolateColors(\n                  enabled,\n                  [0, 1],\n                  [c.pillOff, c.pill],\n                ),\n                color: interpolateColors(\n                  enabled,\n                  [0, 1],\n                  [c.pillOffText, c.pillText],\n                ),\n                fontSize: 17,\n                display: \"flex\",\n                alignItems: \"center\",\n                justifyContent: \"center\",\n                transform: `translateY(${-away * 10}px) scale(${1 - sendPress * 0.04})`,\n                opacity: 1 - away,\n              }}\n            >\n              Send to {first}\n            </div>\n            {NUM_KEYS.map((d, i) => {\n              const r = numRect(i);\n              const idx = digits\n                .split(\"\")\n                .findIndex(\n                  (x, j) =>\n                    x === d && f >= keyTimes[j] - 1 && f < keyTimes[j] + 10,\n                );\n              const p = idx >= 0 ? pressAt(keyTimes[idx]) : 0;\n              return (\n                <div\n                  key={d}\n                  style={{\n                    position: \"absolute\",\n                    left: r.x,\n                    top: r.y + kbOut * (SH - KB_TOP),\n                    width: r.w,\n                    height: r.h,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    justifyContent: \"center\",\n                    color: c.text,\n                  }}\n                >\n                  <div\n                    style={{\n                      position: \"absolute\",\n                      width: 64,\n                      height: 64,\n                      borderRadius: 32,\n                      background: c.pad,\n                      opacity: Math.min(1, p * 3),\n                      transform: `scale(${0.7 + p * 0.3})`,\n                    }}\n                  />\n                  {d === \"del\" ? (\n                    <Glyph d={ICON.left} size={26} color={c.text} />\n                  ) : (\n                    <span\n                      style={{\n                        position: \"relative\",\n                        fontSize: 30,\n                        fontWeight: 300,\n                        transform: `scale(${1 - p * 0.04})`,\n                      }}\n                    >\n                      {d === \".\" ? \"·\" : d}\n                    </span>\n                  )}\n                </div>\n              );\n            })}\n            {qIn > 0 ? (\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 0,\n                  right: 0,\n                  top: KB_TOP,\n                  bottom: 0,\n                  background: c.kb,\n                  transform: `translateY(${qY}px)`,\n                }}\n              >\n                <div\n                  style={{\n                    display: \"flex\",\n                    height: 44,\n                    alignItems: \"center\",\n                    fontSize: 16,\n                    color: c.text,\n                  }}\n                >\n                  {[\n                    `“${word.slice(0, nLetters).join(\"\")}”`,\n                    nLetters >= 3 && emoji ? emoji : word.join(\"\"),\n                    \"with\",\n                  ].map((s, i) => (\n                    <div\n                      key={i}\n                      style={{\n                        flex: 1,\n                        textAlign: \"center\",\n                        fontSize: i === 1 && nLetters >= 3 ? 22 : 16,\n                        borderLeft:\n                          i > 0\n                            ? `1px solid ${c.keyAlt}`\n                            : \"1px solid transparent\",\n                        height: 24,\n                        lineHeight: \"24px\",\n                        opacity: i === 1 ? 1 - pressAt(SUGG_TAP) * 0.5 : 0.9,\n                      }}\n                    >\n                      {s}\n                    </div>\n                  ))}\n                </div>\n                {QWERTY.map((q) => {\n                  const hit = word.findIndex(\n                    (ch, i) =>\n                      letterKey(ch).id === q.id &&\n                      f >= letterTimes[i] - 1 &&\n                      f < letterTimes[i] + 7,\n                  );\n                  const p = hit >= 0 ? pressAt(letterTimes[hit]) : 0;\n                  const shiftOn = q.id === \"shift\" && caps;\n                  return (\n                    <div\n                      key={q.id}\n                      style={{\n                        ...keyStyle(\n                          q.x,\n                          q.y - KB_TOP,\n                          q.w,\n                          QH,\n                          shiftOn ? c.key : q.alt ? c.keyAlt : c.key,\n                        ),\n                        filter:\n                          p > 0.3 && q.id === \" \" ? \"brightness(1.3)\" : \"none\",\n                        fontSize: q.alt || q.id === \" \" ? 15 : 22,\n                      }}\n                    >\n                      {q.id === \"shift\" ? (\n                        <Glyph d={ICON.shift} size={20} color={c.text} />\n                      ) : q.id === \"del\" ? (\n                        <Glyph d={ICON.del} size={22} color={c.text} />\n                      ) : q.id === \"emoji\" ? (\n                        <Glyph d={ICON.smile} size={22} color={c.text} />\n                      ) : caps && !q.alt ? (\n                        q.label.toUpperCase()\n                      ) : (\n                        q.label\n                      )}\n                    </div>\n                  );\n                })}\n                {[ICON.globe, ICON.mic].map((d, i) => (\n                  <div\n                    key={d}\n                    style={{\n                      position: \"absolute\",\n                      left: i ? SW - 46 : 22,\n                      top: qRowY(3) - KB_TOP + QH + 18,\n                    }}\n                  >\n                    <Glyph d={d} size={24} color={c.text} />\n                  </div>\n                ))}\n                {lastLetter >= 0 && pressAt(letterTimes[lastLetter]) > 0.05\n                  ? (() => {\n                      const q = letterKey(word[lastLetter]);\n                      if (q.id === \" \") return null;\n                      const bw = q.w + 22;\n                      const bl = balloon(bw, q.w, QH);\n                      return (\n                        <div\n                          style={{\n                            position: \"absolute\",\n                            left: q.x - 11,\n                            top: q.y - KB_TOP + QH - bl.h,\n                            width: bw,\n                            height: bl.h,\n                            filter: \"drop-shadow(0 1px 3px rgba(0,0,0,0.3))\",\n                          }}\n                        >\n                          <svg\n                            width={bw}\n                            height={bl.h}\n                            style={{ position: \"absolute\" }}\n                          >\n                            <path d={bl.d} fill={c.key} />\n                          </svg>\n                          <div\n                            style={{\n                              position: \"absolute\",\n                              left: 0,\n                              right: 0,\n                              top: 4,\n                              height: 44,\n                              color: c.text,\n                              fontSize: 32,\n                              display: \"flex\",\n                              alignItems: \"center\",\n                              justifyContent: \"center\",\n                            }}\n                          >\n                            {word[lastLetter]}\n                          </div>\n                        </div>\n                      );\n                    })()\n                  : null}\n              </div>\n            ) : null}\n            {f >= PROG ? (\n              <>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: SW / 2 - 60,\n                    top: RING_Y - 60,\n                    width: 120,\n                    height: 120,\n                    transform: `scale(${0.86 + ringIn * 0.14})`,\n                    opacity: Math.min(1, ringIn * 1.6),\n                  }}\n                >\n                  <svg\n                    width={120}\n                    height={120}\n                    viewBox=\"0 0 120 120\"\n                    style={{\n                      position: \"absolute\",\n                      inset: 0,\n                      overflow: \"visible\",\n                    }}\n                  >\n                    <circle\n                      cx={60}\n                      cy={60}\n                      r={46 + pulse * 40}\n                      fill=\"none\"\n                      stroke={accent}\n                      strokeWidth={1.5}\n                      opacity={(1 - pulse) * 0.4 * (pulse > 0 ? 1 : 0)}\n                    />\n                    <circle\n                      cx={60}\n                      cy={60}\n                      r={46}\n                      fill=\"none\"\n                      stroke={c.field}\n                      strokeWidth={3}\n                    />\n                    <circle\n                      cx={60}\n                      cy={60}\n                      r={46}\n                      fill=\"none\"\n                      stroke={accent}\n                      strokeWidth={3}\n                      strokeLinecap=\"round\"\n                      pathLength={1}\n                      strokeDasharray={`${arc} 1`}\n                      transform={`rotate(${spin - 90} 60 60)`}\n                    />\n                  </svg>\n                  <div style={{ position: \"absolute\", left: 22, top: 22 }}>\n                    <Avatar initials={initials} size={76} />\n                  </div>\n                  <div\n                    style={{\n                      position: \"absolute\",\n                      left: 14,\n                      top: 14,\n                      width: 92,\n                      height: 92,\n                      borderRadius: 46,\n                      background: accent,\n                      transform: `scale(${0.5 + disc * 0.5})`,\n                      opacity: Math.min(1, disc * 2.5),\n                      display: \"flex\",\n                      alignItems: \"center\",\n                      justifyContent: \"center\",\n                    }}\n                  >\n                    <svg width={52} height={52} viewBox=\"0 0 24 24\" fill=\"none\">\n                      <path\n                        d={ICON.check}\n                        stroke=\"#fff\"\n                        strokeWidth={1.8}\n                        strokeLinecap=\"round\"\n                        strokeLinejoin=\"round\"\n                        pathLength={1}\n                        strokeDasharray={1}\n                        strokeDashoffset={1 - tick}\n                      />\n                    </svg>\n                  </div>\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 0,\n                    right: 0,\n                    top: RING_Y + 82,\n                    textAlign: \"center\",\n                    fontSize: 30,\n                    fontWeight: 300,\n                    letterSpacing: \"-0.03em\",\n                    color: c.text,\n                    ...enter(title),\n                  }}\n                >\n                  <span\n                    style={{\n                      display: \"inline-block\",\n                      opacity: f < DONE + 4 ? 0.55 : Math.min(1, swap * 1.5),\n                      transform: `scale(${f < DONE + 4 ? 1 : 0.92 + swap * 0.08})`,\n                    }}\n                  >\n                    {f < DONE + 4 ? `Sending to ${first}…` : `Sent to ${first}`}\n                  </span>\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 0,\n                    right: 0,\n                    top: RING_Y + 124,\n                    textAlign: \"center\",\n                    fontSize: 15,\n                    color: c.muted,\n                    ...enter(sub),\n                  }}\n                >\n                  {note} · Just now\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 16,\n                    right: 16,\n                    top: RING_Y + 170,\n                    borderRadius: 16,\n                    background: c.field,\n                    padding: \"2px 16px\",\n                    opacity: Math.min(1, rows[0] * 2),\n                  }}\n                >\n                  {receipt.map(([kk, v], i) => (\n                    <div\n                      key={kk}\n                      style={{\n                        height: 46,\n                        display: \"flex\",\n                        alignItems: \"center\",\n                        justifyContent: \"space-between\",\n                        fontSize: 15,\n                        boxShadow: i ? `inset 0 1px 0 ${c.hair}` : \"none\",\n                        ...enter(rows[i], 10),\n                      }}\n                    >\n                      <span style={{ color: c.muted }}>{kk}</span>\n                      <span\n                        style={{\n                          color: c.text,\n                          fontVariantNumeric: \"tabular-nums\",\n                        }}\n                      >\n                        {v}\n                      </span>\n                    </div>\n                  ))}\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 16,\n                    right: 16,\n                    bottom: 40,\n                    display: \"flex\",\n                    gap: 10,\n                    ...enter(done, 24),\n                  }}\n                >\n                  <div\n                    style={{\n                      width: 56,\n                      height: 56,\n                      borderRadius: 28,\n                      background: c.field,\n                      display: \"flex\",\n                      alignItems: \"center\",\n                      justifyContent: \"center\",\n                    }}\n                  >\n                    <Glyph d={ICON.share} size={22} color={c.text} />\n                  </div>\n                  <div\n                    style={{\n                      flex: 1,\n                      height: 56,\n                      borderRadius: 28,\n                      background: c.pill,\n                      color: c.pillText,\n                      fontSize: 17,\n                      display: \"flex\",\n                      alignItems: \"center\",\n                      justifyContent: \"center\",\n                    }}\n                  >\n                    Done\n                  </div>\n                </div>\n              </>\n            ) : null}\n            <div\n              style={{\n                position: \"absolute\",\n                left: touch.x - 22,\n                top: touch.y - 22,\n                width: 44,\n                height: 44,\n                borderRadius: 22,\n                background: c.touch,\n                boxShadow:\n                  \"inset 0 0 0 1.5px rgba(255,255,255,0.7), 0 2px 10px rgba(0,0,0,0.2)\",\n                opacity: touchOpacity,\n                transform: `scale(${1 - touchPress * 0.12})`,\n                zIndex: 35,\n              }}\n            />\n          </Phone>\n        </div>\n      </div>\n    </AbsoluteFill>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/remocn/money-send.tsx"
    }
  ],
  "type": "registry:component"
}
