{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "image-liquid-distort",
  "type": "registry:component",
  "title": "Image Liquid Distort",
  "description": "A photo that ripples like water through an SVG turbulence filter. The warp swells on hover and focus and spikes when the slide changes.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "transitions",
    "image",
    "liquid",
    "distort",
    "svg-filter",
    "hover",
    "ripple"
  ],
  "docs": "https://hyperblur.dev/effects/image-liquid-distort",
  "files": [
    {
      "path": "registry/hyperblur/image-liquid-distort.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/image-liquid-distort.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nconst SCENE_COUNT = 4;\n\ntype SceneLayer = \"all\" | \"back\" | \"mid\" | \"front\";\n\nfunction mod(n: number, m: number) {\n  return ((n % m) + m) % m;\n}\n\nfunction hash(n: number) {\n  let x = Math.imul(n + 1, 2654435761) >>> 0;\n  x = Math.imul(x ^ (x >>> 15), 2246822519) >>> 0;\n  x = Math.imul(x ^ (x >>> 13), 3266489917) >>> 0;\n  return (x ^ (x >>> 16)) >>> 0;\n}\n\nconst sceneCache = new Map<string, string>();\n\nfunction sceneSvg(k: number, layer: SceneLayer) {\n  const on = (name: string) => layer === \"all\" || layer === name;\n  let s = '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 200\" width=\"320\" height=\"200\">';\n  if (k === 0) {\n    if (on(\"back\")) {\n      s +=\n        '<defs><linearGradient id=\"g\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#ffb36b\"/><stop offset=\"0.5\" stop-color=\"#ff6f91\"/><stop offset=\"1\" stop-color=\"#4b3b8f\"/></linearGradient></defs><rect width=\"320\" height=\"200\" fill=\"url(#g)\"/><circle cx=\"220\" cy=\"96\" r=\"46\" fill=\"#ffe3a8\" opacity=\"0.22\"/><circle cx=\"220\" cy=\"96\" r=\"26\" fill=\"#ffe9bd\"/>';\n    }\n    if (on(\"mid\")) {\n      s +=\n        '<polygon points=\"0,140 50,92 90,122 140,70 200,128 250,96 320,138 320,200 0,200\" fill=\"#6a4a98\"/><polygon points=\"0,158 70,118 130,148 190,110 260,150 320,128 320,200 0,200\" fill=\"#3d2c70\"/>';\n    }\n    if (on(\"front\")) {\n      s += '<path d=\"M0 178 Q80 150 160 172 T320 166 L320 200 L0 200Z\" fill=\"#1b1640\"/>';\n      for (let i = 0; i < 9; i += 1) {\n        const x = 12 + i * 36 + (hash(i + 3) % 14);\n        const h = 26 + (hash(i + 9) % 18);\n        s += `<polygon points=\"${x},${200 - h - 6} ${x - 8},${206 - 6} ${x + 8},${206 - 6}\" fill=\"#120e30\"/><rect x=\"${x - 1}\" y=\"${200 - 8}\" width=\"2\" height=\"8\" fill=\"#120e30\"/>`;\n      }\n    }\n  } else if (k === 1) {\n    if (on(\"back\")) {\n      s +=\n        '<defs><linearGradient id=\"g\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#14183f\"/><stop offset=\"0.55\" stop-color=\"#6a3d8f\"/><stop offset=\"1\" stop-color=\"#ff8a7a\"/></linearGradient></defs><rect width=\"320\" height=\"200\" fill=\"url(#g)\"/><circle cx=\"252\" cy=\"46\" r=\"16\" fill=\"#fff1d6\"/><circle cx=\"259\" cy=\"41\" r=\"14\" fill=\"#3a2f78\" opacity=\"0.4\"/>';\n      for (let i = 0; i < 22; i += 1) {\n        const h = hash(i + 11);\n        s += `<circle cx=\"${h % 320}\" cy=\"${hash(i + 71) % 80}\" r=\"${(0.5 + (h % 5) / 6).toFixed(2)}\" fill=\"#fff\" opacity=\"0.${5 + (h % 4)}\"/>`;\n      }\n    }\n    if (on(\"mid\")) {\n      const fx = [0, 28, 64, 98, 132, 170, 208, 246, 284];\n      const fw = [32, 40, 38, 40, 42, 42, 42, 42, 40];\n      const fh = [96, 120, 88, 130, 104, 126, 92, 118, 100];\n      fx.forEach((x, i) => {\n        s += `<rect x=\"${x}\" y=\"${200 - fh[i]}\" width=\"${fw[i]}\" height=\"${fh[i]}\" fill=\"#3b3182\" opacity=\"0.92\"/>`;\n      });\n    }\n    if (on(\"front\")) {\n      const nx = [-6, 40, 86, 136, 190, 236, 282];\n      const nw = [50, 50, 54, 60, 52, 52, 50];\n      const nh = [74, 100, 64, 92, 110, 70, 90];\n      nx.forEach((x, b) => {\n        s += `<rect x=\"${x}\" y=\"${200 - nh[b]}\" width=\"${nw[b]}\" height=\"${nh[b]}\" fill=\"#16132f\"/>`;\n        const cols = Math.floor((nw[b] - 10) / 11);\n        const rows = Math.floor((nh[b] - 10) / 13);\n        for (let r = 0; r < rows; r += 1) {\n          for (let c = 0; c < cols; c += 1) {\n            const h = hash(b * 100 + r * 10 + c);\n            if (h % 3 !== 0) {\n              s += `<rect x=\"${x + 6 + c * 11}\" y=\"${200 - nh[b] + 8 + r * 13}\" width=\"5\" height=\"7\" fill=\"${h % 4 === 0 ? \"#ff9f80\" : \"#ffd37a\"}\"/>`;\n            }\n          }\n        }\n      });\n    }\n  } else if (k === 2) {\n    if (on(\"back\")) {\n      s +=\n        '<defs><linearGradient id=\"g\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\"><stop offset=\"0\" stop-color=\"#0b1f5c\"/><stop offset=\"0.55\" stop-color=\"#1c7ed6\"/><stop offset=\"1\" stop-color=\"#5ee0c8\"/></linearGradient></defs><rect width=\"320\" height=\"200\" fill=\"url(#g)\"/><circle cx=\"72\" cy=\"52\" r=\"20\" fill=\"#fff\" opacity=\"0.25\"/>';\n    }\n    if (on(\"mid\")) {\n      s +=\n        '<path d=\"M0 110 C60 80 120 140 180 108 S280 90 320 112 V200 H0Z\" fill=\"#fff\" opacity=\"0.16\"/><path d=\"M0 130 C70 100 130 160 200 128 S290 112 320 134 V200 H0Z\" fill=\"#7ee8d3\" opacity=\"0.32\"/>';\n    }\n    if (on(\"front\")) {\n      s +=\n        '<path d=\"M0 156 C80 130 140 184 210 154 S290 142 320 160 V200 H0Z\" fill=\"#0a2f6a\" opacity=\"0.88\"/><path d=\"M0 178 C90 160 160 196 240 176 S300 170 320 182 V200 H0Z\" fill=\"#061a42\"/>';\n    }\n  } else {\n    if (on(\"back\")) {\n      s +=\n        '<defs><radialGradient id=\"g\" cx=\"0.5\" cy=\"0.38\" r=\"0.8\"><stop offset=\"0\" stop-color=\"#ffd9b0\"/><stop offset=\"0.55\" stop-color=\"#ea6f8f\"/><stop offset=\"1\" stop-color=\"#43235f\"/></radialGradient></defs><rect width=\"320\" height=\"200\" fill=\"url(#g)\"/>';\n    }\n    if (on(\"mid\")) {\n      s +=\n        '<circle cx=\"160\" cy=\"100\" r=\"72\" fill=\"none\" stroke=\"#fff\" stroke-width=\"1.5\" opacity=\"0.24\"/><path d=\"M70 120 C60 70 120 40 170 52 C230 64 262 110 236 150 C210 190 100 180 70 120Z\" fill=\"#fff\" opacity=\"0.13\"/>';\n    }\n    if (on(\"front\")) {\n      s +=\n        '<path d=\"M70 200 C74 160 112 148 160 148 C208 148 246 160 250 200Z\" fill=\"#2a1a48\"/><rect x=\"146\" y=\"124\" width=\"28\" height=\"32\" fill=\"#d9987a\"/><ellipse cx=\"160\" cy=\"98\" rx=\"30\" ry=\"35\" fill=\"#f0b698\"/><path d=\"M128 96 C124 62 150 50 172 56 C196 62 198 84 192 98 C186 78 170 72 150 74 C140 76 132 84 128 96Z\" fill=\"#2b1230\"/><circle cx=\"160\" cy=\"160\" r=\"4\" fill=\"#ffd37a\"/>';\n    }\n  }\n  return `${s}</svg>`;\n}\n\nfunction sceneUri(index: number, layer: SceneLayer = \"all\") {\n  const k = mod(index, SCENE_COUNT);\n  const key = `${k}:${layer}`;\n  let uri = sceneCache.get(key);\n  if (!uri) {\n    uri = `data:image/svg+xml,${encodeURIComponent(sceneSvg(k, layer))}`;\n    sceneCache.set(key, uri);\n  }\n  return uri;\n}\n\nfunction cssUrl(list: string[] | null, index: number, layer: SceneLayer = \"all\") {\n  if (list) return `url(${JSON.stringify(list[mod(index, list.length)])})`;\n  return `url(\"${sceneUri(index, layer)}\")`;\n}\n\nfunction Slide({ image, label, hidden }: { image: string; label: string; hidden?: boolean }) {\n  return (\n    <div\n      role=\"img\"\n      aria-label={label}\n      aria-hidden={hidden || undefined}\n      style={{\n        position: \"absolute\",\n        inset: 0,\n        backgroundImage: image,\n        backgroundSize: \"cover\",\n        backgroundPosition: \"center\",\n      }}\n    />\n  );\n}\n\nfunction cx(base: string, extra?: string) {\n  return extra ? `${base} ${extra}` : base;\n}\n\nfunction rootBox(\n  width: number | string | undefined,\n  height: number | string | undefined,\n  aspect: string,\n  style: React.CSSProperties | undefined,\n): React.CSSProperties {\n  return {\n    width: width ?? \"100%\",\n    ...(height !== undefined ? { height } : { aspectRatio: aspect }),\n    ...style,\n  };\n}\n\nfunction arrowNav(e: React.KeyboardEvent, prev: () => void, next: () => void) {\n  if (e.defaultPrevented) return;\n  if (e.key === \"ArrowLeft\") {\n    e.preventDefault();\n    prev();\n  } else if (e.key === \"ArrowRight\") {\n    e.preventDefault();\n    next();\n  }\n}\n\nconst motionQuery = \"(prefers-reduced-motion: reduce)\";\n\nfunction subscribeMotion(callback: () => void) {\n  const query = window.matchMedia(motionQuery);\n  query.addEventListener(\"change\", callback);\n  return () => query.removeEventListener(\"change\", callback);\n}\n\nfunction useReducedMotion() {\n  return React.useSyncExternalStore(\n    subscribeMotion,\n    () => window.matchMedia(motionQuery).matches,\n    () => false,\n  );\n}\n\nfunction useInView(ref: React.RefObject<HTMLElement | null>) {\n  const [visible, setVisible] = React.useState(true);\n  React.useEffect(() => {\n    const el = ref.current;\n    if (!el || typeof IntersectionObserver === \"undefined\") return;\n    const observer = new IntersectionObserver((entries) => {\n      const last = entries[entries.length - 1];\n      if (last) setVisible(last.isIntersecting);\n    });\n    observer.observe(el);\n    return () => observer.disconnect();\n  }, [ref]);\n  return visible;\n}\n\nfunction usePause() {\n  const [paused, setPaused] = React.useState(false);\n  const handlers = {\n    onPointerEnter: () => setPaused(true),\n    onPointerLeave: () => setPaused(false),\n    onFocus: (e: React.FocusEvent<HTMLElement>) => {\n      if (e.target.matches(\":focus-visible\")) setPaused(true);\n    },\n    onBlur: (e: React.FocusEvent<HTMLElement>) => {\n      if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setPaused(false);\n    },\n  };\n  return [paused, handlers] as const;\n}\n\nfunction useAutoAdvance(\n  enabled: boolean,\n  interval: number,\n  step: () => void,\n  ref: React.RefObject<HTMLElement | null>,\n  paused: boolean,\n  resetKey: number,\n) {\n  const reduced = useReducedMotion();\n  const visible = useInView(ref);\n  const stepRef = React.useRef(step);\n  React.useEffect(() => {\n    stepRef.current = step;\n  });\n  React.useEffect(() => {\n    if (!enabled || reduced || !visible || paused) return;\n    const id = window.setInterval(() => stepRef.current(), interval);\n    return () => window.clearInterval(id);\n  }, [enabled, reduced, visible, paused, interval, resetKey]);\n}\n\nfunction useSlideIndex(\n  count: number,\n  value: number | undefined,\n  initial: number,\n  onChange?: (index: number) => void,\n) {\n  const [inner, setInner] = React.useState(initial);\n  const controlled = value !== undefined;\n  const current = mod(controlled ? value : inner, count);\n  const set = (next: number) => {\n    const n = mod(next, count);\n    if (n === current) return;\n    if (!controlled) setInner(n);\n    onChange?.(n);\n  };\n  return [current, set] as const;\n}\n\ninterface FlipState {\n  cur: number;\n  from: number;\n  dir: 1 | -1;\n  n: number;\n}\n\nfunction useFlip(index: number, count: number) {\n  const [state, setState] = React.useState<FlipState>({ cur: index, from: -1, dir: 1, n: 0 });\n  if (state.cur !== index) {\n    const last = count - 1;\n    let dir: 1 | -1 = index > state.cur ? 1 : -1;\n    if (count > 2 && state.cur === last && index === 0) dir = 1;\n    if (count > 2 && state.cur === 0 && index === last) dir = -1;\n    setState({ cur: index, from: state.cur, dir, n: state.n + 1 });\n  }\n  const done = React.useCallback(() => {\n    setState((p) => (p.from === -1 ? p : { ...p, from: -1 }));\n  }, []);\n  return [state, done] as const;\n}\n\nfunction Controls({\n  count,\n  index,\n  onGo,\n  label,\n  arrows = true,\n}: {\n  count: number;\n  index: number;\n  onGo: (index: number) => void;\n  label: string;\n  arrows?: boolean;\n}) {\n  if (count < 2) return null;\n  return (\n    <>\n      {arrows ? (\n        <>\n          <button\n            type=\"button\"\n            className=\"hb-qe3-nav hb-qe3-prev\"\n            aria-label={`Previous ${label}`}\n            onClick={() => onGo(index - 1)}\n          >\n            <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n              <path d=\"M15 5l-7 7 7 7\" />\n            </svg>\n          </button>\n          <button\n            type=\"button\"\n            className=\"hb-qe3-nav hb-qe3-next\"\n            aria-label={`Next ${label}`}\n            onClick={() => onGo(index + 1)}\n          >\n            <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n              <path d=\"M9 5l7 7-7 7\" />\n            </svg>\n          </button>\n        </>\n      ) : null}\n      <div className=\"hb-qe3-dots\">\n        {Array.from({ length: count }, (_, i) => (\n          <button\n            key={i}\n            type=\"button\"\n            className=\"hb-qe3-dot\"\n            aria-label={`Show ${label} ${i + 1} of ${count}`}\n            aria-current={i === index ? \"true\" : undefined}\n            onClick={() => onGo(i)}\n          />\n        ))}\n      </div>\n    </>\n  );\n}\n\nexport interface ImageLiquidDistortProps\n  extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n  images?: string[];\n  alt?: string;\n  width?: number | string;\n  height?: number | string;\n  aspect?: string;\n  index?: number;\n  defaultIndex?: number;\n  onChange?: (index: number) => void;\n  autoPlay?: boolean;\n  interval?: number;\n  duration?: number;\n  idleScale?: number;\n  hoverScale?: number;\n  changeScale?: number;\n  accent?: string;\n}\n\nconst css = `\n.hb-qe3 {\n  --hb-qe3-a: #2f7bff;\n  position: relative;\n  display: block;\n  box-sizing: border-box;\n  overflow: hidden;\n  border-radius: 14px;\n  background: #0a0a0a;\n  isolation: isolate;\n  font-family: inherit;\n  user-select: none;\n  -webkit-user-select: none;\n  -webkit-tap-highlight-color: transparent;\n}\n.hb-qe3 *, .hb-qe3 *::before, .hb-qe3 *::after { box-sizing: border-box; }\n.hb-qe3:focus-visible { outline: 2px solid var(--hb-qe3-a); outline-offset: 2px; }\n.hb-qe3-layer { position: absolute; inset: 0; }\n.hb-qe3-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.hb-qe3-fx { position: absolute; inset: 0; transform: scale(1.1); }\n.hb-qe3-fade { animation: hb-qe3-in var(--hb-qe3-d) ease both; }\n.hb-qe3-svg { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }\n.hb-qe3-nav {\n  position: absolute;\n  top: 50%;\n  z-index: 4;\n  display: grid;\n  place-items: center;\n  width: 30px;\n  height: 30px;\n  margin: -15px 0 0;\n  padding: 0;\n  color: #fff;\n  background: rgba(10, 10, 10, 0.45);\n  border: 1px solid rgba(255, 255, 255, 0.18);\n  border-radius: 50%;\n  cursor: pointer;\n  -webkit-backdrop-filter: blur(8px);\n  backdrop-filter: blur(8px);\n  transition: background 0.2s ease, transform 0.2s ease;\n}\n.hb-qe3-nav:hover { background: rgba(10, 10, 10, 0.7); transform: scale(1.06); }\n.hb-qe3-nav:active { transform: scale(0.95); }\n.hb-qe3-nav:focus-visible { outline: 2px solid var(--hb-qe3-a); outline-offset: 2px; }\n.hb-qe3-prev { left: 10px; }\n.hb-qe3-next { right: 10px; }\n.hb-qe3-dots {\n  position: absolute;\n  left: 50%;\n  bottom: 10px;\n  z-index: 4;\n  display: flex;\n  gap: 6px;\n  padding: 5px 8px;\n  background: rgba(10, 10, 10, 0.35);\n  border-radius: 999px;\n  transform: translateX(-50%);\n  -webkit-backdrop-filter: blur(8px);\n  backdrop-filter: blur(8px);\n}\n.hb-qe3-dot {\n  position: relative;\n  width: 6px;\n  height: 6px;\n  margin: 0;\n  padding: 0;\n  background: rgba(255, 255, 255, 0.5);\n  border: 0;\n  border-radius: 999px;\n  cursor: pointer;\n  transition: width 0.3s cubic-bezier(0.3, 0.8, 0.2, 1), background 0.2s ease;\n}\n.hb-qe3-dot::before { content: \"\"; position: absolute; inset: -6px -3px; }\n.hb-qe3-dot[aria-current=\"true\"] { width: 16px; background: #fff; }\n.hb-qe3-dot:focus-visible { outline: 2px solid var(--hb-qe3-a); outline-offset: 2px; }\n@keyframes hb-qe3-in {\n  from { opacity: 0; }\n  to { opacity: 1; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-qe3-fade { animation: none; }\n  .hb-qe3-nav, .hb-qe3-dot { transition: none; }\n}\n`;\n\nexport function ImageLiquidDistort({\n  images,\n  alt = \"Photo\",\n  width,\n  height,\n  aspect = \"16 / 10\",\n  index: indexProp,\n  defaultIndex = 0,\n  onChange,\n  autoPlay = true,\n  interval = 3600,\n  duration = 1100,\n  idleScale = 12,\n  hoverScale = 54,\n  changeScale = 96,\n  accent = \"#2f7bff\",\n  className,\n  style,\n  onKeyDown,\n  onPointerEnter,\n  onPointerLeave,\n  onFocus,\n  onBlur,\n  ...rest\n}: ImageLiquidDistortProps) {\n  const list = images && images.length > 0 ? images : null;\n  const count = list ? list.length : SCENE_COUNT;\n  const [index, setIndex] = useSlideIndex(count, indexProp, defaultIndex, onChange);\n  const [state, done] = useFlip(index, count);\n  const [paused, pause] = usePause();\n  const ref = React.useRef<HTMLDivElement>(null);\n  const turbRef = React.useRef<SVGFETurbulenceElement>(null);\n  const dispRef = React.useRef<SVGFEDisplacementMapElement>(null);\n  const hoverRef = React.useRef(false);\n  const kickRef = React.useRef(0);\n  const reduced = useReducedMotion();\n  const visible = useInView(ref);\n  const uid = React.useId().replace(/[^a-zA-Z0-9]/g, \"\");\n  const filterId = `hb-qe3-f-${uid}`;\n  useAutoAdvance(autoPlay && count > 1, interval, () => setIndex(index + 1), ref, paused, index);\n  const label = (i: number) => `${alt} ${i + 1} of ${count}`;\n  const base = state.from >= 0 ? state.from : state.cur;\n\n  React.useEffect(() => {\n    if (state.n > 0) kickRef.current = 1;\n  }, [state.n]);\n\n  React.useEffect(() => {\n    const disp = dispRef.current;\n    const turb = turbRef.current;\n    if (!disp || !turb) return;\n    disp.setAttribute(\"scale\", \"0\");\n    if (reduced || !visible) return;\n    let raf = 0;\n    let t0 = -1;\n    let hover = 0;\n    const tick = (now: number) => {\n      if (t0 < 0) t0 = now;\n      const t = (now - t0) / 1000;\n      hover += ((hoverRef.current ? 1 : 0) - hover) * 0.08;\n      kickRef.current *= 0.95;\n      const idle = idleScale * (0.65 + 0.35 * Math.sin(t * 0.9));\n      const value = idle + hover * hoverScale + kickRef.current * changeScale;\n      disp.setAttribute(\"scale\", value.toFixed(2));\n      const fx = 0.011 + 0.003 * Math.sin(t * 0.5);\n      const fy = 0.018 + 0.004 * Math.cos(t * 0.4);\n      turb.setAttribute(\"baseFrequency\", `${fx.toFixed(4)} ${fy.toFixed(4)}`);\n      raf = requestAnimationFrame(tick);\n    };\n    raf = requestAnimationFrame(tick);\n    return () => cancelAnimationFrame(raf);\n  }, [reduced, visible, idleScale, hoverScale, changeScale]);\n\n  return (\n    <div\n      tabIndex={0}\n      role=\"group\"\n      aria-roledescription=\"carousel\"\n      aria-label={`${alt} gallery`}\n      {...rest}\n      {...pause}\n      ref={ref}\n      className={cx(\"hb-qe3\", className)}\n      style={\n        {\n          ...rootBox(width, height, aspect, style),\n          \"--hb-qe3-a\": accent,\n          \"--hb-qe3-d\": `${duration}ms`,\n        } as React.CSSProperties\n      }\n      onPointerEnter={(e) => {\n        hoverRef.current = true;\n        pause.onPointerEnter();\n        onPointerEnter?.(e);\n      }}\n      onPointerLeave={(e) => {\n        hoverRef.current = false;\n        pause.onPointerLeave();\n        onPointerLeave?.(e);\n      }}\n      onFocus={(e) => {\n        if (e.target.matches(\":focus-visible\")) hoverRef.current = true;\n        pause.onFocus(e);\n        onFocus?.(e);\n      }}\n      onBlur={(e) => {\n        hoverRef.current = false;\n        pause.onBlur(e);\n        onBlur?.(e);\n      }}\n      onKeyDown={(e) => {\n        onKeyDown?.(e);\n        arrowNav(e, () => setIndex(index - 1), () => setIndex(index + 1));\n      }}\n    >\n      <style href=\"hb-image-liquid-distort\" precedence=\"default\">\n        {css}\n      </style>\n      <svg className=\"hb-qe3-svg\" aria-hidden=\"true\" focusable=\"false\">\n        <filter id={filterId} x=\"-6%\" y=\"-6%\" width=\"112%\" height=\"112%\" colorInterpolationFilters=\"sRGB\">\n          <feTurbulence ref={turbRef} type=\"fractalNoise\" baseFrequency=\"0.011 0.018\" numOctaves={2} seed={4} result=\"noise\" />\n          <feDisplacementMap ref={dispRef} in=\"SourceGraphic\" in2=\"noise\" scale={0} xChannelSelector=\"R\" yChannelSelector=\"G\" />\n        </filter>\n      </svg>\n      <div className=\"hb-qe3-fx\" style={{ filter: `url(#${filterId})` }}>\n        <div className=\"hb-qe3-layer\">\n          <Slide image={cssUrl(list, base)} label={label(base)} />\n        </div>\n        {state.from >= 0 ? (\n          <div key={state.n} className=\"hb-qe3-layer hb-qe3-fade\" onAnimationEnd={done}>\n            <Slide image={cssUrl(list, state.cur)} label={label(state.cur)} />\n          </div>\n        ) : null}\n      </div>\n      <Controls count={count} index={index} onGo={setIndex} label=\"photo\" />\n      <span className=\"hb-qe3-sr\" aria-live=\"polite\">\n        {label(index)}\n      </span>\n    </div>\n  );\n}\n"
    }
  ]
}