{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "holo-cloth",
  "type": "registry:ui",
  "title": "Holo Cloth",
  "description": "A grabbable sheet of simulated cloth draped in an iridescent holo-foil material, floating in zero gravity.",
  "dependencies": ["three"],
  "files": [
    {
      "path": "registry/new-york/holo-cloth/HoloCloth.vue",
      "content": "<script setup lang=\"ts\">\n  // A sheet of simulated cloth floating in zero gravity, draped in an\n  // iridescent holo-foil material. Grab the fabric to pull it around; it\n  // wrinkles, settles, and floats like cloth suspended in gel. Ported from\n  // Dmitry Kurash's Holocloth (https://github.com/dmitrykurash/holocloth).\n  import { ref, watch, onMounted, onBeforeUnmount } from 'vue';\n  import * as THREE from 'three';\n  import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\n  import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js';\n  import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';\n  import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';\n  import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\n  import { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js';\n  import { OutputPass } from 'three/examples/jsm/postprocessing/OutputPass.js';\n  import { cn } from '~/lib/utils';\n  import { ClothSim } from './cloth';\n  import { createHoloMaterial } from './holo-material';\n  import type { HoloUniforms } from './holo-material';\n  import { makeWeaveNormalMap } from './textures';\n  import { BAKED_POSE } from './baked-pose';\n  import type {\n    HoloClothProps,\n    HoloClothPreset,\n    HoloClothMaterialBundle as MaterialBundle,\n  } from './types';\n\n  const props = withDefaults(defineProps<HoloClothProps>(), {\n    preset: 'holo',\n    image: '',\n    background: '#0b0c12',\n    interactive: true,\n    zoom: false,\n    quality: 'high',\n    class: '',\n  });\n\n  // Preset bundles lifted verbatim from the upstream tool.\n  const PRESETS: Record<HoloClothPreset, MaterialBundle> = {\n    holo: {\n      baseColor: '#20242d',\n      holoIntensity: 3.78,\n      holoScale: 400,\n      bandFreq: 1.1,\n      saturation: 1.0,\n      hueShift: 0.37,\n      sparkle: 0.73,\n      specTint: 0.33,\n      iridescence: 0.81,\n      metalness: 1.0,\n      sheen: 0,\n      bump: 3.0,\n      bumpTiling: 3,\n      roughness: 0.62,\n      clearcoat: 0.06,\n      coatRoughness: 0.7,\n    },\n    chrome: {\n      baseColor: '#dfe3e8',\n      holoIntensity: 0,\n      holoScale: 400,\n      bandFreq: 1.1,\n      saturation: 1.0,\n      hueShift: 0.37,\n      sparkle: 0.2,\n      specTint: 0,\n      iridescence: 0,\n      metalness: 1,\n      sheen: 0,\n      bump: 0.05,\n      bumpTiling: 3,\n      roughness: 0.04,\n      clearcoat: 1.0,\n      coatRoughness: 0.04,\n    },\n    'black-cloth': {\n      baseColor: '#101114',\n      holoIntensity: 0.1,\n      holoScale: 8,\n      bandFreq: 0.2,\n      saturation: 0,\n      hueShift: 0,\n      sparkle: 0,\n      specTint: 0.82,\n      iridescence: 0,\n      metalness: 0.43,\n      sheen: 0.08,\n      bump: 0,\n      bumpTiling: 3,\n      roughness: 0.83,\n      clearcoat: 0.22,\n      coatRoughness: 0.32,\n    },\n  };\n\n  const PHYSICS = {\n    viscosity: 0.6,\n    stiffness: 1,\n    iterations: 14,\n    smoothing: 0.045,\n    grabRadius: 0.27,\n  };\n\n  const CLOTH_LONG_SIDE = 3;\n  const WHITE = new THREE.Color(0xffffff);\n\n  const GrainShader = {\n    uniforms: {\n      tDiffuse: { value: null as THREE.Texture | null },\n      uAmount: { value: 0.345 },\n      uTime: { value: 0 },\n    },\n    vertexShader: /* glsl */ `\n      varying vec2 vUv;\n      void main() {\n        vUv = uv;\n        gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n      }\n    `,\n    fragmentShader: /* glsl */ `\n      uniform sampler2D tDiffuse;\n      uniform float uAmount;\n      uniform float uTime;\n      varying vec2 vUv;\n      float gHash(vec3 p3) {\n        p3 = fract(p3 * 0.1031);\n        p3 += dot(p3, p3.zyx + 31.32);\n        return fract((p3.x + p3.y) * p3.z);\n      }\n      void main() {\n        vec4 c = texture2D(tDiffuse, vUv);\n        vec2 p = mod(gl_FragCoord.xy, 1024.0);\n        float n = gHash(vec3(p, mod(uTime * 120.0, 512.0))) - 0.5;\n        c.rgb += n * uAmount;\n        gl_FragColor = c;\n      }\n    `,\n  };\n\n  const host = ref<HTMLElement | null>(null);\n\n  let renderer: THREE.WebGLRenderer | null = null;\n  let scene: THREE.Scene | null = null;\n  let camera: THREE.PerspectiveCamera | null = null;\n  let controls: OrbitControls | null = null;\n  let composer: EffectComposer | null = null;\n  let bloomPass: UnrealBloomPass | null = null;\n  let grainPass: ShaderPass | null = null;\n  let sim: ClothSim | null = null;\n  let clothMesh: THREE.Mesh | null = null;\n  let clothGeometry: THREE.BufferGeometry | null = null;\n  let cavityAttr: THREE.BufferAttribute | null = null;\n  let holoMaterial: THREE.MeshPhysicalMaterial | null = null;\n  let holoUniforms: HoloUniforms | null = null;\n  let surfaceCanvas: HTMLCanvasElement | null = null;\n  let surfaceTexture: THREE.CanvasTexture | null = null;\n  let clothImage: HTMLImageElement | null = null;\n  let resizeObserver: ResizeObserver | null = null;\n  let raycaster: THREE.Raycaster | null = null;\n  const pointerNdc = new THREE.Vector2();\n  const dragPlane = new THREE.Plane();\n  let grabbing = false;\n  let grabPointerId: number | null = null;\n  let hoverCursor = 'default';\n  let clock: THREE.Clock | null = null;\n  let elapsed = 0;\n  let clothSegments = 48;\n  let clothAspect = 1;\n  let disposed = false;\n\n  function qualitySettings(q: string) {\n    if (q === 'low') return { pr: 1, samples: 0, segs: 28 };\n    if (q === 'medium')\n      return {\n        pr: Math.min(window.devicePixelRatio, 1.5),\n        samples: 4,\n        segs: 36,\n      };\n    return { pr: Math.min(window.devicePixelRatio, 2), samples: 8, segs: 48 };\n  }\n\n  function redrawSurface() {\n    if (!surfaceCanvas || !surfaceTexture) return;\n    const ctx = surfaceCanvas.getContext('2d');\n    if (!ctx) return;\n    ctx.clearRect(0, 0, surfaceCanvas.width, surfaceCanvas.height);\n    if (clothImage) {\n      ctx.drawImage(\n        clothImage,\n        0,\n        0,\n        surfaceCanvas.width,\n        surfaceCanvas.height,\n      );\n    }\n    surfaceTexture.needsUpdate = true;\n  }\n\n  function buildCloth(aspect: number) {\n    if (!clothMesh || !holoUniforms) return;\n    clothAspect = aspect;\n    const w = aspect >= 1 ? CLOTH_LONG_SIDE : CLOTH_LONG_SIDE * aspect;\n    const h = aspect >= 1 ? CLOTH_LONG_SIDE / aspect : CLOTH_LONG_SIDE;\n    const segs = clothSegments;\n    const segX = aspect >= 1 ? segs : Math.max(10, Math.round(segs * aspect));\n    const segY = aspect >= 1 ? Math.max(10, Math.round(segs / aspect)) : segs;\n    sim = new ClothSim(w, h, segX, segY);\n    const geo = new THREE.PlaneGeometry(w, h, segX, segY);\n    const posAttr = new THREE.BufferAttribute(sim.positions, 3);\n    posAttr.setUsage(THREE.DynamicDrawUsage);\n    geo.setAttribute('position', posAttr);\n    cavityAttr = new THREE.BufferAttribute(new Float32Array(sim.count), 1);\n    cavityAttr.setUsage(THREE.DynamicDrawUsage);\n    geo.setAttribute('aCavity', cavityAttr);\n    geo.computeVertexNormals();\n    const old = clothMesh.geometry;\n    clothMesh.geometry = geo;\n    clothGeometry = geo;\n    if (old) old.dispose();\n    holoUniforms.uClothSize.value.set(w, h);\n    endGrabInteraction();\n  }\n\n  function applyPreset(name: HoloClothPreset) {\n    if (!holoMaterial || !holoUniforms) return;\n    const b = PRESETS[name] ?? PRESETS.holo;\n    const m = holoMaterial;\n    m.color.set(b.baseColor);\n    m.roughness = b.roughness;\n    m.metalness = b.metalness;\n    m.clearcoat = b.clearcoat;\n    m.clearcoatRoughness = b.coatRoughness;\n    m.sheen = b.sheen;\n    m.sheenColor.set(b.baseColor).lerp(WHITE, 0.5);\n    m.iridescence = b.iridescence;\n    m.normalScale.set(b.bump, b.bump);\n    if (m.normalMap) m.normalMap.repeat.set(b.bumpTiling, b.bumpTiling);\n    const u = holoUniforms;\n    u.uHoloIntensity.value = b.holoIntensity;\n    u.uHoloScale.value = b.holoScale;\n    u.uBandFreq.value = b.bandFreq;\n    u.uRadialFreq.value = 1.6;\n    u.uSaturation.value = b.saturation;\n    u.uHueShift.value = b.hueShift;\n    u.uSparkle.value = b.sparkle;\n    u.uSpecTint.value = b.specTint;\n  }\n\n  function applyBackground(value: string) {\n    if (!scene || !renderer) return;\n    if (value === 'transparent') {\n      scene.background = null;\n      renderer.setClearColor(0x000000, 0);\n    } else {\n      scene.background = new THREE.Color(value);\n    }\n  }\n\n  function loadClothImage(url: string) {\n    if (!url) {\n      clothImage = null;\n      redrawSurface();\n      if (clothAspect !== 1) buildCloth(1);\n      return;\n    }\n    const img = new Image();\n    img.crossOrigin = 'anonymous';\n    img.onload = () => {\n      if (disposed) return;\n      clothImage = img;\n      const iw = img.naturalWidth || img.width || 1;\n      const ih = img.naturalHeight || img.height || 1;\n      const aspect = Math.min(3, Math.max(1 / 3, iw / ih));\n      redrawSurface();\n      if (aspect !== clothAspect) buildCloth(aspect);\n    };\n    img.src = url;\n  }\n\n  function updatePointer(e: PointerEvent) {\n    if (!renderer) return;\n    const rect = renderer.domElement.getBoundingClientRect();\n    pointerNdc.set(\n      ((e.clientX - rect.left) / rect.width) * 2 - 1,\n      -((e.clientY - rect.top) / rect.height) * 2 + 1,\n    );\n  }\n\n  function raycastCloth(): THREE.Intersection | null {\n    if (!raycaster || !camera || !clothMesh || !clothGeometry) return null;\n    raycaster.setFromCamera(pointerNdc, camera);\n    clothGeometry.computeBoundingSphere();\n    const hits = raycaster.intersectObject(clothMesh, false);\n    return hits.length > 0 ? (hits[0] ?? null) : null;\n  }\n\n  function endGrabInteraction() {\n    if (\n      renderer &&\n      grabPointerId !== null &&\n      renderer.domElement.hasPointerCapture(grabPointerId)\n    ) {\n      renderer.domElement.releasePointerCapture(grabPointerId);\n    }\n    grabbing = false;\n    grabPointerId = null;\n    sim?.endGrab();\n    if (controls) controls.enabled = true;\n  }\n\n  function onPointerDown(e: PointerEvent) {\n    if (!props.interactive || e.button !== 0 || grabbing) return;\n    if (!renderer || !camera || !sim) return;\n    updatePointer(e);\n    const hit = raycastCloth();\n    if (!hit) return;\n    if (!sim.startGrab(hit.point, PHYSICS.grabRadius)) return;\n    grabbing = true;\n    grabPointerId = e.pointerId;\n    if (controls) controls.enabled = false;\n    const normal = new THREE.Vector3();\n    camera.getWorldDirection(normal);\n    dragPlane.setFromNormalAndCoplanarPoint(normal, hit.point);\n    renderer.domElement.setPointerCapture(e.pointerId);\n    renderer.domElement.style.cursor = 'grabbing';\n  }\n\n  function onPointerMove(e: PointerEvent) {\n    if (grabbing && e.pointerId !== grabPointerId) return;\n    updatePointer(e);\n    if (!grabbing || !raycaster || !camera || !sim) return;\n    raycaster.setFromCamera(pointerNdc, camera);\n    const target = new THREE.Vector3();\n    if (raycaster.ray.intersectPlane(dragPlane, target)) {\n      sim.moveGrab(target);\n    }\n  }\n\n  function onPointerUp(e: PointerEvent) {\n    if (!grabbing || e.pointerId !== grabPointerId) return;\n    endGrabInteraction();\n    if (renderer) renderer.domElement.style.cursor = hoverCursor;\n  }\n\n  function tick() {\n    if (disposed || !renderer || !clock) return;\n    const dt = clock.getDelta();\n    elapsed += dt;\n    if (grainPass) grainPass.uniforms.uTime!.value = elapsed % 61.7;\n\n    if (sim && clothGeometry) {\n      sim.step(dt, PHYSICS);\n      clothGeometry.attributes.position!.needsUpdate = true;\n      clothGeometry.computeVertexNormals();\n      if (cavityAttr) {\n        sim.computeCavity(\n          clothGeometry.attributes.normal!.array,\n          cavityAttr.array as Float32Array,\n        );\n        cavityAttr.needsUpdate = true;\n      }\n    }\n\n    // hover cursor feedback (skip while dragging; skip on low quality)\n    if (!grabbing && props.interactive && props.quality !== 'low') {\n      const hit = raycastCloth();\n      const cursor = hit ? 'grab' : 'default';\n      if (cursor !== hoverCursor) {\n        hoverCursor = cursor;\n        renderer.domElement.style.cursor = cursor;\n      }\n    }\n\n    controls?.update();\n    composer?.render();\n  }\n\n  /** Give the cloth a gentle random poke. */\n  function poke() {\n    sim?.poke(1);\n  }\n\n  /** Reset the cloth back to its draped rest pose. */\n  function reset() {\n    if (!sim || !clothGeometry) return;\n    sim.reset();\n    clothGeometry.attributes.position!.needsUpdate = true;\n    clothGeometry.computeVertexNormals();\n  }\n\n  defineExpose({ poke, reset });\n\n  onMounted(() => {\n    const el = host.value;\n    if (!el) return;\n    const width = el.clientWidth || 640;\n    const height = el.clientHeight || 480;\n    const q = qualitySettings(props.quality);\n    clothSegments = q.segs;\n\n    renderer = new THREE.WebGLRenderer({\n      antialias: false,\n      powerPreference: 'high-performance',\n      stencil: false,\n      alpha: true,\n    });\n    renderer.setPixelRatio(q.pr);\n    renderer.setSize(width, height);\n    renderer.toneMapping = THREE.NeutralToneMapping;\n    renderer.toneMappingExposure = 0.5;\n    el.appendChild(renderer.domElement);\n\n    scene = new THREE.Scene();\n    applyBackground(props.background);\n    camera = new THREE.PerspectiveCamera(38, width / height, 0.1, 200);\n    camera.position.set(...BAKED_POSE.camera);\n\n    const pmrem = new THREE.PMREMGenerator(renderer);\n    const envTex = pmrem.fromScene(new RoomEnvironment(), 0.04).texture;\n    scene.environment = envTex;\n    scene.environmentIntensity = 0.73;\n    pmrem.dispose();\n\n    const rimA = new THREE.DirectionalLight(0x7fd4ff, 1.1);\n    rimA.position.set(-4, 2.5, -3);\n    const rimB = new THREE.DirectionalLight(0xff9ad5, 0.9);\n    rimB.position.set(4.5, -1.5, -2.5);\n    const key = new THREE.DirectionalLight(0xffffff, 0.7);\n    key.position.set(1.5, 3, 4);\n    scene.add(rimA, rimB, key);\n\n    // surface texture: optional draped image in cloth UV space\n    surfaceCanvas = document.createElement('canvas');\n    surfaceCanvas.width = 1024;\n    surfaceCanvas.height = 1024;\n    surfaceTexture = new THREE.CanvasTexture(surfaceCanvas);\n    surfaceTexture.colorSpace = THREE.SRGBColorSpace;\n    redrawSurface();\n\n    const holo = createHoloMaterial(surfaceTexture);\n    holoMaterial = holo.material;\n    holoUniforms = holo.uniforms;\n    // fold occlusion on by default (upstream render defaults)\n    holoUniforms.uCavityAmount.value = 1;\n    const maxAniso = renderer.capabilities.getMaxAnisotropy();\n    if (holoMaterial.roughnessMap)\n      holoMaterial.roughnessMap.anisotropy = maxAniso;\n    surfaceTexture.anisotropy = maxAniso;\n\n    // procedural woven normal map (upstream ships a scratches photo; the\n    // registry component stays asset-free with the generated weave)\n    const weave = makeWeaveNormalMap();\n    weave.anisotropy = maxAniso;\n    holoMaterial.normalMap = weave;\n    holoMaterial.needsUpdate = true;\n\n    clothMesh = new THREE.Mesh(undefined, holoMaterial);\n    clothMesh.frustumCulled = false;\n    buildCloth(1);\n    scene.add(clothMesh);\n    applyPreset(props.preset);\n\n    raycaster = new THREE.Raycaster();\n    clock = new THREE.Clock();\n\n    const canvas = renderer.domElement;\n    canvas.addEventListener('pointerdown', onPointerDown);\n    canvas.addEventListener('pointermove', onPointerMove);\n    canvas.addEventListener('pointerup', onPointerUp);\n    canvas.addEventListener('pointercancel', onPointerUp);\n\n    controls = new OrbitControls(camera, canvas);\n    controls.enableDamping = true;\n    controls.dampingFactor = 0.08;\n    controls.minDistance = 1.6;\n    controls.maxDistance = 30;\n    controls.enableZoom = props.zoom;\n    controls.enabled = props.interactive;\n    controls.target.set(...BAKED_POSE.target);\n    controls.update();\n\n    const rt = new THREE.WebGLRenderTarget(width, height, {\n      samples: q.samples,\n      type: THREE.HalfFloatType,\n    });\n    composer = new EffectComposer(renderer, rt);\n    composer.setPixelRatio(q.pr);\n    composer.addPass(new RenderPass(scene, camera));\n    bloomPass = new UnrealBloomPass(\n      new THREE.Vector2(width, height),\n      0.05,\n      0.85,\n      1.41,\n    );\n    composer.addPass(bloomPass);\n    composer.addPass(new OutputPass());\n    grainPass = new ShaderPass(GrainShader);\n    composer.addPass(grainPass);\n\n    if (props.image) loadClothImage(props.image);\n\n    resizeObserver = new ResizeObserver(() => {\n      if (!renderer || !camera || !composer || !host.value) return;\n      const w = host.value.clientWidth;\n      const h = host.value.clientHeight;\n      if (w === 0 || h === 0) return;\n      camera.aspect = w / h;\n      camera.updateProjectionMatrix();\n      renderer.setSize(w, h);\n      composer.setSize(w, h);\n    });\n    resizeObserver.observe(el);\n\n    renderer.setAnimationLoop(tick);\n  });\n\n  watch(\n    () => props.preset,\n    (next) => applyPreset(next),\n  );\n  watch(\n    () => props.background,\n    (next) => applyBackground(next),\n  );\n  watch(\n    () => props.image,\n    (next) => loadClothImage(next),\n  );\n  watch([() => props.interactive, () => props.zoom], () => {\n    if (!controls) return;\n    controls.enabled = props.interactive;\n    controls.enableZoom = props.zoom;\n    if (!props.interactive) endGrabInteraction();\n  });\n\n  onBeforeUnmount(() => {\n    disposed = true;\n    if (renderer) {\n      renderer.setAnimationLoop(null);\n      const canvas = renderer.domElement;\n      canvas.removeEventListener('pointerdown', onPointerDown);\n      canvas.removeEventListener('pointermove', onPointerMove);\n      canvas.removeEventListener('pointerup', onPointerUp);\n      canvas.removeEventListener('pointercancel', onPointerUp);\n    }\n    resizeObserver?.disconnect();\n    controls?.dispose();\n    composer?.dispose();\n    clothGeometry?.dispose();\n    if (holoMaterial) {\n      holoMaterial.normalMap?.dispose();\n      holoMaterial.roughnessMap?.dispose();\n      holoMaterial.dispose();\n    }\n    surfaceTexture?.dispose();\n    if (scene) {\n      scene.environment?.dispose();\n    }\n    if (renderer) {\n      renderer.dispose();\n      renderer.domElement.remove();\n    }\n  });\n</script>\n\n<template>\n  <div\n    ref=\"host\"\n    :class=\"cn('relative size-full overflow-hidden', props.class)\"\n    role=\"img\"\n    aria-label=\"Interactive holographic cloth simulation\"\n  />\n</template>\n",
      "type": "registry:ui",
      "target": "components/ui/holo-cloth/HoloCloth.vue"
    },
    {
      "path": "registry/new-york/holo-cloth/baked-pose.ts",
      "content": "/**\n * Hand-arranged cloth pose captured from the live tool (vertex positions in\n * world space + camera). Resampled bilinearly onto whatever grid is built,\n * so it survives aspect and performance-profile changes.\n */\nexport const BAKED_POSE = {\n  cols: 33,\n  rows: 49,\n  width: 2.0015625000000004,\n  height: 3,\n  camera: [0.925, 0.654, 5.166] as [number, number, number],\n  target: [0.525, -0.046, -0.034] as [number, number, number],\n  data: new Float32Array([\n    -0.499, 1.389, -0.95, -0.439, 1.374, -0.939, -0.38, 1.36, -0.927, -0.32,\n    1.345, -0.915, -0.26, 1.33, -0.903, -0.201, 1.315, -0.892, -0.141, 1.301,\n    -0.88, -0.081, 1.287, -0.867, -0.022, 1.275, -0.851, 0.037, 1.264, -0.834,\n    0.096, 1.253, -0.817, 0.156, 1.242, -0.801, 0.215, 1.231, -0.783, 0.274,\n    1.221, -0.765, 0.332, 1.211, -0.745, 0.391, 1.202, -0.726, 0.45, 1.192,\n    -0.706, 0.508, 1.183, -0.686, 0.567, 1.174, -0.666, 0.625, 1.165, -0.646,\n    0.684, 1.156, -0.625, 0.742, 1.147, -0.604, 0.8, 1.139, -0.583, 0.858, 1.13,\n    -0.56, 0.916, 1.122, -0.538, 0.973, 1.115, -0.514, 1.03, 1.107, -0.49,\n    1.087, 1.1, -0.465, 1.143, 1.093, -0.438, 1.199, 1.087, -0.41, 1.253, 1.081,\n    -0.38, 1.307, 1.075, -0.348, 1.36, 1.069, -0.315, -0.518, 1.336, -0.922,\n    -0.458, 1.322, -0.91, -0.398, 1.308, -0.898, -0.339, 1.294, -0.885, -0.279,\n    1.279, -0.873, -0.219, 1.265, -0.861, -0.16, 1.251, -0.847, -0.1, 1.239,\n    -0.831, -0.041, 1.229, -0.814, 0.018, 1.22, -0.795, 0.077, 1.21, -0.777,\n    0.136, 1.197, -0.762, 0.195, 1.183, -0.748, 0.255, 1.172, -0.731, 0.314,\n    1.161, -0.713, 0.372, 1.151, -0.695, 0.431, 1.141, -0.676, 0.49, 1.13,\n    -0.658, 0.549, 1.121, -0.639, 0.608, 1.111, -0.62, 0.666, 1.101, -0.6,\n    0.725, 1.092, -0.58, 0.783, 1.083, -0.56, 0.842, 1.074, -0.539, 0.9, 1.065,\n    -0.518, 0.958, 1.057, -0.497, 1.016, 1.048, -0.475, 1.074, 1.041, -0.451,\n    1.131, 1.033, -0.427, 1.187, 1.026, -0.402, 1.243, 1.019, -0.375, 1.299,\n    1.013, -0.346, 1.353, 1.007, -0.315, -0.536, 1.285, -0.892, -0.477, 1.271,\n    -0.88, -0.417, 1.257, -0.867, -0.357, 1.243, -0.854, -0.298, 1.229, -0.841,\n    -0.238, 1.216, -0.827, -0.179, 1.204, -0.811, -0.12, 1.194, -0.793, -0.061,\n    1.186, -0.773, -0.002, 1.178, -0.753, 0.057, 1.167, -0.736, 0.116, 1.153,\n    -0.722, 0.176, 1.138, -0.709, 0.235, 1.125, -0.694, 0.294, 1.113, -0.679,\n    0.353, 1.101, -0.662, 0.413, 1.09, -0.644, 0.472, 1.08, -0.626, 0.53, 1.069,\n    -0.608, 0.589, 1.059, -0.59, 0.648, 1.049, -0.572, 0.707, 1.039, -0.553,\n    0.766, 1.029, -0.534, 0.825, 1.019, -0.515, 0.883, 1.01, -0.495, 0.942, 1,\n    -0.475, 1, 0.991, -0.454, 1.058, 0.983, -0.433, 1.116, 0.974, -0.411, 1.174,\n    0.966, -0.388, 1.231, 0.959, -0.364, 1.288, 0.952, -0.339, 1.344, 0.945,\n    -0.311, -0.555, 1.234, -0.861, -0.495, 1.22, -0.848, -0.436, 1.207, -0.834,\n    -0.376, 1.194, -0.82, -0.317, 1.181, -0.806, -0.257, 1.169, -0.79, -0.198,\n    1.16, -0.771, -0.14, 1.152, -0.751, -0.081, 1.146, -0.73, -0.022, 1.136,\n    -0.712, 0.037, 1.123, -0.697, 0.097, 1.108, -0.683, 0.156, 1.093, -0.671,\n    0.215, 1.079, -0.657, 0.275, 1.066, -0.642, 0.334, 1.054, -0.625, 0.393,\n    1.043, -0.608, 0.452, 1.032, -0.591, 0.511, 1.021, -0.574, 0.57, 1.01,\n    -0.556, 0.629, 0.999, -0.539, 0.688, 0.988, -0.521, 0.747, 0.978, -0.503,\n    0.806, 0.967, -0.485, 0.865, 0.957, -0.467, 0.924, 0.947, -0.448, 0.983,\n    0.937, -0.429, 1.041, 0.927, -0.41, 1.1, 0.918, -0.39, 1.158, 0.909, -0.369,\n    1.217, 0.9, -0.348, 1.274, 0.892, -0.326, 1.332, 0.885, -0.302, -0.574,\n    1.184, -0.828, -0.514, 1.171, -0.814, -0.455, 1.159, -0.799, -0.395, 1.146,\n    -0.784, -0.336, 1.134, -0.768, -0.277, 1.125, -0.75, -0.218, 1.118, -0.729,\n    -0.16, 1.113, -0.707, -0.101, 1.104, -0.688, -0.042, 1.092, -0.672, 0.018,\n    1.077, -0.658, 0.077, 1.062, -0.646, 0.136, 1.048, -0.632, 0.196, 1.035,\n    -0.617, 0.255, 1.023, -0.601, 0.314, 1.011, -0.585, 0.373, 0.999, -0.568,\n    0.432, 0.987, -0.552, 0.492, 0.976, -0.535, 0.551, 0.964, -0.518, 0.61,\n    0.953, -0.502, 0.669, 0.941, -0.485, 0.728, 0.93, -0.468, 0.787, 0.919,\n    -0.451, 0.846, 0.908, -0.433, 0.905, 0.897, -0.416, 0.964, 0.886, -0.398,\n    1.023, 0.875, -0.38, 1.082, 0.865, -0.362, 1.141, 0.855, -0.344, 1.2, 0.845,\n    -0.324, 1.258, 0.835, -0.305, 1.317, 0.826, -0.284, -0.593, 1.136, -0.793,\n    -0.533, 1.124, -0.778, -0.474, 1.112, -0.762, -0.414, 1.1, -0.746, -0.355,\n    1.091, -0.728, -0.297, 1.084, -0.707, -0.239, 1.08, -0.684, -0.18, 1.072,\n    -0.664, -0.121, 1.06, -0.648, -0.061, 1.046, -0.634, -0.002, 1.031, -0.621,\n    0.057, 1.018, -0.606, 0.117, 1.006, -0.591, 0.176, 0.994, -0.574, 0.235,\n    0.986, -0.555, 0.294, 0.973, -0.539, 0.353, 0.959, -0.524, 0.412, 0.947,\n    -0.509, 0.471, 0.934, -0.493, 0.531, 0.922, -0.477, 0.59, 0.91, -0.461,\n    0.649, 0.898, -0.444, 0.708, 0.886, -0.428, 0.767, 0.874, -0.412, 0.827,\n    0.862, -0.395, 0.886, 0.85, -0.379, 0.945, 0.839, -0.362, 1.004, 0.827,\n    -0.345, 1.063, 0.816, -0.328, 1.122, 0.805, -0.311, 1.181, 0.794, -0.294,\n    1.24, 0.783, -0.276, 1.299, 0.772, -0.258, -0.612, 1.089, -0.757, -0.552,\n    1.078, -0.74, -0.493, 1.067, -0.724, -0.434, 1.056, -0.706, -0.375, 1.049,\n    -0.686, -0.317, 1.045, -0.662, -0.259, 1.04, -0.641, -0.2, 1.029, -0.624,\n    -0.14, 1.014, -0.61, -0.081, 1.001, -0.596, -0.022, 0.988, -0.58, 0.038,\n    0.977, -0.564, 0.097, 0.966, -0.547, 0.156, 0.956, -0.529, 0.215, 0.95,\n    -0.508, 0.274, 0.939, -0.491, 0.333, 0.924, -0.477, 0.392, 0.909, -0.463,\n    0.451, 0.896, -0.448, 0.511, 0.883, -0.432, 0.57, 0.87, -0.417, 0.629,\n    0.858, -0.401, 0.688, 0.845, -0.385, 0.747, 0.832, -0.369, 0.807, 0.82,\n    -0.353, 0.866, 0.808, -0.337, 0.925, 0.796, -0.321, 0.984, 0.784, -0.305,\n    1.043, 0.772, -0.289, 1.102, 0.76, -0.272, 1.162, 0.748, -0.256, 1.221,\n    0.736, -0.24, 1.28, 0.724, -0.223, -0.631, 1.043, -0.718, -0.572, 1.033,\n    -0.701, -0.513, 1.023, -0.684, -0.454, 1.014, -0.665, -0.395, 1.008, -0.643,\n    -0.338, 1.005, -0.619, -0.279, 0.997, -0.599, -0.219, 0.984, -0.585, -0.16,\n    0.971, -0.57, -0.101, 0.959, -0.554, -0.042, 0.948, -0.537, 0.018, 0.937,\n    -0.52, 0.077, 0.927, -0.502, 0.136, 0.918, -0.483, 0.195, 0.912, -0.463,\n    0.254, 0.903, -0.444, 0.313, 0.89, -0.429, 0.372, 0.875, -0.415, 0.431,\n    0.86, -0.401, 0.49, 0.847, -0.386, 0.55, 0.833, -0.37, 0.609, 0.82, -0.355,\n    0.668, 0.807, -0.339, 0.727, 0.795, -0.324, 0.786, 0.782, -0.308, 0.846,\n    0.77, -0.292, 0.905, 0.757, -0.276, 0.964, 0.745, -0.26, 1.023, 0.733,\n    -0.244, 1.082, 0.72, -0.228, 1.141, 0.708, -0.212, 1.201, 0.696, -0.196,\n    1.26, 0.683, -0.18, -0.65, 0.999, -0.679, -0.591, 0.99, -0.66, -0.532, 0.98,\n    -0.642, -0.473, 0.972, -0.623, -0.415, 0.966, -0.601, -0.357, 0.963, -0.577,\n    -0.298, 0.956, -0.557, -0.239, 0.943, -0.542, -0.18, 0.931, -0.526, -0.121,\n    0.921, -0.508, -0.062, 0.911, -0.491, -0.002, 0.9, -0.474, 0.057, 0.889,\n    -0.457, 0.116, 0.88, -0.438, 0.175, 0.873, -0.418, 0.234, 0.866, -0.398,\n    0.293, 0.855, -0.381, 0.352, 0.841, -0.366, 0.411, 0.826, -0.353, 0.47,\n    0.811, -0.338, 0.529, 0.798, -0.323, 0.589, 0.785, -0.307, 0.648, 0.773,\n    -0.291, 0.707, 0.761, -0.275, 0.766, 0.748, -0.259, 0.825, 0.736, -0.243,\n    0.885, 0.724, -0.227, 0.944, 0.712, -0.211, 1.003, 0.699, -0.195, 1.062,\n    0.687, -0.179, 1.121, 0.675, -0.163, 1.181, 0.663, -0.147, 1.24, 0.651,\n    -0.131, -0.67, 0.957, -0.637, -0.611, 0.948, -0.618, -0.552, 0.939, -0.599,\n    -0.493, 0.93, -0.581, -0.434, 0.923, -0.56, -0.376, 0.919, -0.537, -0.318,\n    0.914, -0.515, -0.259, 0.906, -0.496, -0.2, 0.896, -0.478, -0.141, 0.886,\n    -0.46, -0.082, 0.877, -0.442, -0.023, 0.867, -0.425, 0.037, 0.853, -0.409,\n    0.096, 0.842, -0.392, 0.155, 0.834, -0.373, 0.214, 0.828, -0.353, 0.273,\n    0.819, -0.334, 0.332, 0.807, -0.318, 0.391, 0.791, -0.304, 0.45, 0.777,\n    -0.29, 0.509, 0.764, -0.274, 0.569, 0.753, -0.258, 0.628, 0.741, -0.241,\n    0.687, 0.73, -0.225, 0.746, 0.718, -0.209, 0.805, 0.706, -0.192, 0.865,\n    0.695, -0.176, 0.924, 0.683, -0.159, 0.983, 0.671, -0.143, 1.042, 0.659,\n    -0.127, 1.101, 0.648, -0.11, 1.161, 0.636, -0.094, 1.22, 0.625, -0.078,\n    -0.69, 0.917, -0.593, -0.631, 0.908, -0.574, -0.572, 0.899, -0.556, -0.513,\n    0.89, -0.537, -0.454, 0.881, -0.518, -0.395, 0.874, -0.498, -0.337, 0.868,\n    -0.477, -0.278, 0.863, -0.454, -0.22, 0.855, -0.435, -0.161, 0.847, -0.416,\n    -0.102, 0.838, -0.397, -0.043, 0.83, -0.378, 0.016, 0.82, -0.36, 0.076,\n    0.807, -0.345, 0.135, 0.796, -0.328, 0.194, 0.789, -0.308, 0.253, 0.782,\n    -0.288, 0.312, 0.772, -0.27, 0.371, 0.757, -0.256, 0.43, 0.744, -0.241,\n    0.489, 0.733, -0.224, 0.549, 0.723, -0.206, 0.608, 0.712, -0.19, 0.667,\n    0.701, -0.173, 0.726, 0.69, -0.156, 0.785, 0.679, -0.139, 0.845, 0.668,\n    -0.123, 0.904, 0.657, -0.106, 0.963, 0.646, -0.089, 1.022, 0.635, -0.073,\n    1.082, 0.624, -0.056, 1.141, 0.612, -0.04, 1.2, 0.601, -0.023, -0.71, 0.88,\n    -0.548, -0.651, 0.871, -0.529, -0.592, 0.862, -0.51, -0.533, 0.853, -0.491,\n    -0.474, 0.843, -0.473, -0.415, 0.834, -0.454, -0.356, 0.826, -0.435, -0.298,\n    0.818, -0.415, -0.239, 0.811, -0.395, -0.18, 0.803, -0.375, -0.121, 0.796,\n    -0.355, -0.062, 0.789, -0.335, -0.004, 0.784, -0.314, 0.055, 0.773, -0.297,\n    0.115, 0.761, -0.28, 0.174, 0.752, -0.262, 0.233, 0.744, -0.242, 0.292,\n    0.736, -0.223, 0.351, 0.724, -0.207, 0.41, 0.713, -0.19, 0.469, 0.702,\n    -0.174, 0.529, 0.691, -0.157, 0.588, 0.68, -0.14, 0.647, 0.669, -0.123,\n    0.706, 0.659, -0.106, 0.765, 0.648, -0.089, 0.825, 0.637, -0.073, 0.884,\n    0.625, -0.056, 0.943, 0.614, -0.039, 1.002, 0.603, -0.023, 1.062, 0.592,\n    -0.006, 1.121, 0.581, 0.01, 1.18, 0.569, 0.027, -0.731, 0.845, -0.5, -0.672,\n    0.836, -0.481, -0.613, 0.827, -0.462, -0.554, 0.818, -0.444, -0.495, 0.809,\n    -0.425, -0.436, 0.799, -0.406, -0.377, 0.79, -0.388, -0.318, 0.781, -0.369,\n    -0.259, 0.773, -0.349, -0.2, 0.766, -0.329, -0.141, 0.759, -0.309, -0.082,\n    0.752, -0.289, -0.024, 0.746, -0.268, 0.035, 0.737, -0.25, 0.094, 0.726,\n    -0.232, 0.153, 0.717, -0.214, 0.212, 0.708, -0.196, 0.272, 0.698, -0.178,\n    0.331, 0.687, -0.161, 0.39, 0.676, -0.144, 0.449, 0.665, -0.127, 0.509,\n    0.654, -0.11, 0.568, 0.643, -0.094, 0.627, 0.632, -0.077, 0.686, 0.621,\n    -0.06, 0.746, 0.609, -0.044, 0.805, 0.598, -0.028, 0.864, 0.587, -0.011,\n    0.923, 0.575, 0.005, 0.983, 0.563, 0.021, 1.042, 0.552, 0.038, 1.101, 0.54,\n    0.054, 1.16, 0.528, 0.07, -0.751, 0.812, -0.451, -0.692, 0.803, -0.432,\n    -0.633, 0.795, -0.413, -0.574, 0.787, -0.394, -0.515, 0.778, -0.375, -0.456,\n    0.769, -0.356, -0.397, 0.76, -0.337, -0.339, 0.751, -0.318, -0.28, 0.742,\n    -0.299, -0.221, 0.734, -0.28, -0.162, 0.726, -0.26, -0.103, 0.717, -0.241,\n    -0.044, 0.708, -0.222, 0.015, 0.698, -0.205, 0.074, 0.688, -0.187, 0.133,\n    0.678, -0.17, 0.193, 0.667, -0.152, 0.252, 0.656, -0.135, 0.311, 0.645,\n    -0.118, 0.37, 0.634, -0.102, 0.43, 0.623, -0.085, 0.489, 0.611, -0.069,\n    0.548, 0.6, -0.053, 0.607, 0.588, -0.037, 0.667, 0.576, -0.021, 0.726,\n    0.564, -0.005, 0.785, 0.552, 0.011, 0.845, 0.54, 0.026, 0.904, 0.528, 0.042,\n    0.963, 0.516, 0.057, 1.023, 0.504, 0.073, 1.082, 0.491, 0.088, 1.141, 0.479,\n    0.104, -0.772, 0.781, -0.401, -0.713, 0.772, -0.382, -0.654, 0.763, -0.363,\n    -0.595, 0.754, -0.345, -0.536, 0.744, -0.326, -0.477, 0.735, -0.308, -0.418,\n    0.725, -0.289, -0.359, 0.716, -0.271, -0.3, 0.706, -0.252, -0.241, 0.697,\n    -0.234, -0.182, 0.687, -0.216, -0.123, 0.676, -0.198, -0.064, 0.666, -0.181,\n    -0.004, 0.655, -0.164, 0.055, 0.644, -0.147, 0.114, 0.633, -0.13, 0.173,\n    0.622, -0.114, 0.233, 0.61, -0.098, 0.292, 0.598, -0.082, 0.351, 0.587,\n    -0.066, 0.411, 0.575, -0.051, 0.47, 0.562, -0.035, 0.529, 0.55, -0.02,\n    0.589, 0.538, -0.005, 0.648, 0.525, 0.01, 0.708, 0.513, 0.025, 0.767, 0.5,\n    0.04, 0.827, 0.487, 0.055, 0.886, 0.475, 0.069, 0.945, 0.462, 0.084, 1.005,\n    0.449, 0.098, 1.064, 0.436, 0.112, 1.124, 0.423, 0.127, -0.792, 0.745,\n    -0.354, -0.733, 0.735, -0.336, -0.674, 0.725, -0.318, -0.615, 0.715, -0.3,\n    -0.556, 0.705, -0.282, -0.497, 0.694, -0.264, -0.438, 0.684, -0.246, -0.379,\n    0.674, -0.229, -0.32, 0.663, -0.212, -0.261, 0.652, -0.195, -0.201, 0.641,\n    -0.178, -0.142, 0.63, -0.161, -0.083, 0.618, -0.145, -0.023, 0.606, -0.129,\n    0.036, 0.595, -0.114, 0.095, 0.583, -0.098, 0.155, 0.57, -0.083, 0.214,\n    0.558, -0.068, 0.274, 0.546, -0.053, 0.333, 0.533, -0.039, 0.393, 0.521,\n    -0.024, 0.452, 0.508, -0.01, 0.512, 0.495, 0.004, 0.572, 0.482, 0.018,\n    0.631, 0.469, 0.031, 0.691, 0.456, 0.045, 0.75, 0.443, 0.059, 0.81, 0.43,\n    0.072, 0.87, 0.417, 0.085, 0.929, 0.403, 0.099, 0.989, 0.39, 0.112, 1.049,\n    0.377, 0.125, 1.108, 0.364, 0.138, -0.812, 0.703, -0.312, -0.753, 0.692,\n    -0.295, -0.694, 0.681, -0.278, -0.635, 0.67, -0.261, -0.575, 0.659, -0.244,\n    -0.516, 0.647, -0.228, -0.457, 0.636, -0.211, -0.398, 0.625, -0.195, -0.338,\n    0.613, -0.179, -0.279, 0.601, -0.163, -0.22, 0.589, -0.148, -0.16, 0.577,\n    -0.133, -0.101, 0.565, -0.118, -0.041, 0.552, -0.103, 0.019, 0.54, -0.089,\n    0.078, 0.527, -0.075, 0.138, 0.514, -0.061, 0.197, 0.501, -0.048, 0.257,\n    0.488, -0.035, 0.317, 0.475, -0.022, 0.377, 0.462, -0.009, 0.436, 0.449,\n    0.004, 0.496, 0.436, 0.017, 0.556, 0.422, 0.029, 0.616, 0.409, 0.041, 0.676,\n    0.396, 0.054, 0.735, 0.382, 0.066, 0.795, 0.369, 0.078, 0.855, 0.356, 0.09,\n    0.915, 0.342, 0.102, 0.975, 0.329, 0.114, 1.035, 0.316, 0.125, 1.095, 0.303,\n    0.137, -0.831, 0.654, -0.278, -0.772, 0.642, -0.262, -0.712, 0.63, -0.246,\n    -0.653, 0.618, -0.23, -0.594, 0.606, -0.215, -0.534, 0.594, -0.2, -0.475,\n    0.582, -0.185, -0.415, 0.57, -0.17, -0.356, 0.558, -0.155, -0.296, 0.545,\n    -0.141, -0.236, 0.532, -0.127, -0.177, 0.52, -0.114, -0.117, 0.507, -0.101,\n    -0.057, 0.494, -0.088, 0.003, 0.481, -0.075, 0.063, 0.468, -0.063, 0.123,\n    0.454, -0.051, 0.182, 0.441, -0.039, 0.242, 0.428, -0.028, 0.302, 0.415,\n    -0.016, 0.362, 0.401, -0.005, 0.422, 0.388, 0.006, 0.482, 0.375, 0.018,\n    0.542, 0.361, 0.029, 0.603, 0.348, 0.04, 0.663, 0.335, 0.051, 0.723, 0.321,\n    0.062, 0.783, 0.308, 0.073, 0.843, 0.295, 0.083, 0.903, 0.282, 0.094, 0.963,\n    0.268, 0.104, 1.024, 0.255, 0.114, 1.084, 0.242, 0.124, -0.848, 0.599,\n    -0.253, -0.789, 0.587, -0.239, -0.729, 0.574, -0.224, -0.67, 0.562, -0.21,\n    -0.61, 0.549, -0.196, -0.55, 0.536, -0.182, -0.491, 0.524, -0.169, -0.431,\n    0.511, -0.155, -0.371, 0.498, -0.143, -0.311, 0.485, -0.13, -0.251, 0.472,\n    -0.118, -0.191, 0.459, -0.106, -0.131, 0.446, -0.095, -0.071, 0.433, -0.084,\n    -0.011, 0.42, -0.073, 0.049, 0.406, -0.063, 0.109, 0.393, -0.053, 0.17,\n    0.38, -0.042, 0.23, 0.367, -0.032, 0.29, 0.354, -0.022, 0.35, 0.34, -0.012,\n    0.411, 0.327, -0.003, 0.471, 0.314, 0.007, 0.531, 0.301, 0.017, 0.592,\n    0.288, 0.027, 0.652, 0.275, 0.037, 0.712, 0.261, 0.047, 0.773, 0.248, 0.056,\n    0.833, 0.236, 0.066, 0.894, 0.223, 0.075, 0.954, 0.21, 0.084, 1.015, 0.197,\n    0.092, 1.075, 0.185, 0.101, -0.864, 0.54, -0.239, -0.804, 0.527, -0.226,\n    -0.745, 0.514, -0.213, -0.685, 0.502, -0.2, -0.625, 0.489, -0.188, -0.565,\n    0.476, -0.176, -0.505, 0.463, -0.164, -0.445, 0.45, -0.153, -0.384, 0.437,\n    -0.142, -0.324, 0.424, -0.131, -0.264, 0.411, -0.121, -0.204, 0.398, -0.112,\n    -0.143, 0.385, -0.102, -0.083, 0.372, -0.093, -0.022, 0.359, -0.084, 0.038,\n    0.346, -0.075, 0.099, 0.333, -0.066, 0.159, 0.32, -0.057, 0.22, 0.307,\n    -0.049, 0.28, 0.294, -0.04, 0.341, 0.281, -0.031, 0.401, 0.268, -0.022,\n    0.462, 0.255, -0.013, 0.522, 0.243, -0.004, 0.583, 0.23, 0.005, 0.643,\n    0.217, 0.013, 0.704, 0.205, 0.022, 0.765, 0.192, 0.03, 0.825, 0.18, 0.038,\n    0.886, 0.168, 0.046, 0.947, 0.156, 0.053, 1.008, 0.144, 0.06, 1.069, 0.132,\n    0.067, -0.878, 0.479, -0.236, -0.818, 0.466, -0.224, -0.758, 0.453, -0.213,\n    -0.698, 0.44, -0.202, -0.637, 0.428, -0.191, -0.577, 0.415, -0.181, -0.517,\n    0.402, -0.171, -0.456, 0.389, -0.162, -0.395, 0.376, -0.154, -0.335, 0.364,\n    -0.145, -0.274, 0.351, -0.137, -0.213, 0.339, -0.13, -0.153, 0.326, -0.122,\n    -0.092, 0.314, -0.114, -0.031, 0.301, -0.107, 0.029, 0.289, -0.099, 0.09,\n    0.276, -0.091, 0.151, 0.264, -0.083, 0.212, 0.251, -0.075, 0.272, 0.238,\n    -0.067, 0.333, 0.226, -0.058, 0.393, 0.213, -0.05, 0.454, 0.2, -0.041,\n    0.515, 0.188, -0.033, 0.576, 0.176, -0.026, 0.637, 0.164, -0.018, 0.698,\n    0.152, -0.011, 0.759, 0.14, -0.004, 0.82, 0.129, 0.002, 0.881, 0.118, 0.009,\n    0.942, 0.107, 0.015, 1.003, 0.095, 0.021, 1.065, 0.084, 0.027, -0.89, 0.418,\n    -0.243, -0.829, 0.405, -0.232, -0.769, 0.392, -0.222, -0.708, 0.38, -0.213,\n    -0.648, 0.367, -0.205, -0.587, 0.355, -0.197, -0.526, 0.343, -0.19, -0.465,\n    0.331, -0.183, -0.404, 0.319, -0.176, -0.343, 0.307, -0.171, -0.282, 0.296,\n    -0.165, -0.221, 0.284, -0.159, -0.16, 0.272, -0.152, -0.099, 0.26, -0.146,\n    -0.038, 0.248, -0.139, 0.023, 0.236, -0.132, 0.084, 0.224, -0.124, 0.145,\n    0.211, -0.117, 0.205, 0.199, -0.109, 0.266, 0.186, -0.1, 0.327, 0.173,\n    -0.092, 0.387, 0.161, -0.084, 0.448, 0.149, -0.076, 0.509, 0.137, -0.069,\n    0.57, 0.126, -0.063, 0.631, 0.114, -0.056, 0.693, 0.103, -0.05, 0.754,\n    0.093, -0.044, 0.816, 0.083, -0.04, 0.877, 0.073, -0.034, 0.939, 0.062,\n    -0.029, 1, 0.051, -0.023, 1.061, 0.04, -0.017, -0.9, 0.358, -0.257, -0.839,\n    0.346, -0.248, -0.779, 0.333, -0.24, -0.718, 0.322, -0.234, -0.656, 0.31,\n    -0.228, -0.595, 0.298, -0.222, -0.534, 0.287, -0.217, -0.473, 0.276, -0.211,\n    -0.411, 0.265, -0.207, -0.35, 0.255, -0.205, -0.288, 0.245, -0.2, -0.227,\n    0.233, -0.195, -0.166, 0.222, -0.19, -0.104, 0.211, -0.184, -0.043, 0.199,\n    -0.177, 0.018, 0.187, -0.171, 0.079, 0.175, -0.164, 0.14, 0.163, -0.156,\n    0.2, 0.15, -0.147, 0.261, 0.137, -0.139, 0.321, 0.124, -0.13, 0.382, 0.111,\n    -0.122, 0.443, 0.101, -0.116, 0.505, 0.09, -0.11, 0.566, 0.079, -0.104,\n    0.627, 0.068, -0.098, 0.689, 0.057, -0.092, 0.75, 0.046, -0.086, 0.811,\n    0.035, -0.08, 0.872, 0.024, -0.074, 0.934, 0.013, -0.067, 0.995, 0.002,\n    -0.061, 1.056, -0.01, -0.054, -0.91, 0.299, -0.274, -0.848, 0.288, -0.27,\n    -0.787, 0.277, -0.266, -0.725, 0.266, -0.261, -0.664, 0.255, -0.257, -0.603,\n    0.244, -0.252, -0.541, 0.233, -0.248, -0.48, 0.223, -0.244, -0.418, 0.212,\n    -0.24, -0.357, 0.201, -0.235, -0.295, 0.191, -0.231, -0.234, 0.18, -0.227,\n    -0.172, 0.169, -0.222, -0.111, 0.158, -0.217, -0.05, 0.147, -0.211, 0.012,\n    0.136, -0.205, 0.073, 0.124, -0.199, 0.134, 0.112, -0.192, 0.195, 0.1,\n    -0.185, 0.256, 0.088, -0.177, 0.316, 0.075, -0.168, 0.377, 0.062, -0.16,\n    0.438, 0.051, -0.153, 0.499, 0.04, -0.147, 0.561, 0.029, -0.141, 0.622,\n    0.018, -0.135, 0.683, 0.006, -0.128, 0.744, -0.005, -0.121, 0.805, -0.017,\n    -0.114, 0.866, -0.029, -0.106, 0.927, -0.041, -0.098, 0.988, -0.053, -0.09,\n    1.049, -0.065, -0.082, -0.919, 0.239, -0.289, -0.857, 0.228, -0.287, -0.796,\n    0.218, -0.284, -0.734, 0.207, -0.281, -0.673, 0.196, -0.277, -0.611, 0.186,\n    -0.273, -0.55, 0.175, -0.27, -0.488, 0.165, -0.266, -0.427, 0.154, -0.262,\n    -0.365, 0.143, -0.258, -0.304, 0.133, -0.254, -0.242, 0.122, -0.249, -0.181,\n    0.112, -0.245, -0.119, 0.101, -0.241, -0.058, 0.09, -0.236, 0.004, 0.079,\n    -0.231, 0.065, 0.068, -0.226, 0.126, 0.057, -0.221, 0.188, 0.046, -0.215,\n    0.249, 0.034, -0.209, 0.31, 0.022, -0.202, 0.371, 0.01, -0.194, 0.432,\n    -0.003, -0.185, 0.493, -0.014, -0.178, 0.554, -0.026, -0.171, 0.615, -0.038,\n    -0.163, 0.676, -0.05, -0.155, 0.736, -0.062, -0.146, 0.797, -0.074, -0.137,\n    0.858, -0.087, -0.128, 0.918, -0.099, -0.119, 0.979, -0.112, -0.11, 1.039,\n    -0.124, -0.101, -0.929, 0.178, -0.299, -0.867, 0.167, -0.296, -0.806, 0.157,\n    -0.293, -0.744, 0.146, -0.29, -0.683, 0.135, -0.287, -0.621, 0.125, -0.284,\n    -0.56, 0.114, -0.28, -0.498, 0.104, -0.277, -0.437, 0.093, -0.273, -0.375,\n    0.083, -0.269, -0.314, 0.072, -0.265, -0.252, 0.062, -0.262, -0.191, 0.051,\n    -0.258, -0.129, 0.04, -0.254, -0.067, 0.03, -0.25, -0.006, 0.019, -0.246,\n    0.056, 0.009, -0.242, 0.117, -0.002, -0.238, 0.179, -0.013, -0.235, 0.24,\n    -0.024, -0.23, 0.302, -0.035, -0.225, 0.363, -0.047, -0.22, 0.424, -0.059,\n    -0.211, 0.484, -0.072, -0.2, 0.545, -0.084, -0.191, 0.606, -0.097, -0.182,\n    0.666, -0.109, -0.172, 0.726, -0.122, -0.161, 0.787, -0.135, -0.151, 0.847,\n    -0.147, -0.141, 0.907, -0.16, -0.131, 0.968, -0.173, -0.12, 1.028, -0.185,\n    -0.11, -0.94, 0.116, -0.3, -0.878, 0.106, -0.297, -0.816, 0.095, -0.293,\n    -0.755, 0.084, -0.29, -0.693, 0.074, -0.287, -0.632, 0.063, -0.284, -0.57,\n    0.053, -0.28, -0.509, 0.042, -0.277, -0.447, 0.032, -0.273, -0.386, 0.021,\n    -0.27, -0.324, 0.01, -0.266, -0.263, 0, -0.262, -0.201, -0.011, -0.259,\n    -0.14, -0.021, -0.255, -0.078, -0.032, -0.252, -0.017, -0.042, -0.248,\n    0.045, -0.053, -0.245, 0.106, -0.064, -0.242, 0.168, -0.075, -0.239, 0.229,\n    -0.085, -0.237, 0.291, -0.096, -0.234, 0.352, -0.107, -0.232, 0.414, -0.119,\n    -0.227, 0.475, -0.132, -0.216, 0.534, -0.145, -0.201, 0.594, -0.158, -0.189,\n    0.654, -0.17, -0.178, 0.715, -0.183, -0.167, 0.775, -0.196, -0.156, 0.835,\n    -0.209, -0.145, 0.895, -0.221, -0.133, 0.955, -0.234, -0.122, 1.015, -0.246,\n    -0.11, -0.95, 0.055, -0.292, -0.889, 0.045, -0.288, -0.827, 0.034, -0.284,\n    -0.766, 0.024, -0.281, -0.704, 0.013, -0.277, -0.643, 0.003, -0.274, -0.581,\n    -0.008, -0.27, -0.52, -0.019, -0.266, -0.458, -0.029, -0.263, -0.397, -0.04,\n    -0.259, -0.335, -0.05, -0.256, -0.274, -0.061, -0.252, -0.212, -0.071,\n    -0.249, -0.151, -0.082, -0.245, -0.089, -0.093, -0.242, -0.028, -0.103,\n    -0.238, 0.034, -0.114, -0.235, 0.095, -0.125, -0.232, 0.156, -0.135, -0.229,\n    0.218, -0.146, -0.226, 0.279, -0.157, -0.224, 0.34, -0.168, -0.221, 0.401,\n    -0.181, -0.221, 0.463, -0.194, -0.219, 0.523, -0.207, -0.207, 0.581, -0.219,\n    -0.188, 0.641, -0.231, -0.173, 0.701, -0.244, -0.165, 0.761, -0.257, -0.153,\n    0.822, -0.27, -0.141, 0.882, -0.282, -0.129, 0.941, -0.294, -0.116, 1.001,\n    -0.306, -0.1, -0.962, -0.004, -0.274, -0.9, -0.014, -0.27, -0.838, -0.025,\n    -0.266, -0.777, -0.035, -0.262, -0.715, -0.046, -0.258, -0.654, -0.056,\n    -0.255, -0.592, -0.067, -0.251, -0.531, -0.077, -0.247, -0.469, -0.087,\n    -0.243, -0.408, -0.098, -0.239, -0.346, -0.108, -0.236, -0.285, -0.119,\n    -0.232, -0.223, -0.129, -0.228, -0.162, -0.14, -0.224, -0.1, -0.15, -0.221,\n    -0.039, -0.161, -0.217, 0.023, -0.171, -0.213, 0.084, -0.182, -0.209, 0.145,\n    -0.192, -0.205, 0.207, -0.202, -0.201, 0.268, -0.212, -0.196, 0.329, -0.22,\n    -0.189, 0.391, -0.233, -0.189, 0.448, -0.253, -0.205, 0.509, -0.268, -0.204,\n    0.569, -0.28, -0.189, 0.627, -0.292, -0.17, 0.687, -0.305, -0.158, 0.748,\n    -0.318, -0.147, 0.807, -0.33, -0.133, 0.867, -0.342, -0.118, 0.926, -0.353,\n    -0.1, 0.983, -0.363, -0.078, -0.973, -0.06, -0.249, -0.911, -0.07, -0.245,\n    -0.85, -0.081, -0.241, -0.788, -0.091, -0.236, -0.727, -0.101, -0.232,\n    -0.665, -0.112, -0.228, -0.603, -0.122, -0.224, -0.542, -0.132, -0.22,\n    -0.48, -0.142, -0.216, -0.419, -0.153, -0.211, -0.357, -0.163, -0.207,\n    -0.296, -0.173, -0.203, -0.234, -0.184, -0.199, -0.173, -0.194, -0.195,\n    -0.111, -0.204, -0.19, -0.05, -0.214, -0.186, 0.012, -0.224, -0.181, 0.073,\n    -0.234, -0.177, 0.135, -0.244, -0.171, 0.196, -0.253, -0.166, 0.258, -0.259,\n    -0.156, 0.319, -0.271, -0.153, 0.379, -0.288, -0.161, 0.435, -0.309, -0.181,\n    0.494, -0.327, -0.191, 0.555, -0.341, -0.183, 0.614, -0.353, -0.166, 0.673,\n    -0.365, -0.152, 0.733, -0.377, -0.137, 0.792, -0.389, -0.119, 0.85, -0.399,\n    -0.1, 0.908, -0.408, -0.076, 0.963, -0.413, -0.048, -0.984, -0.113, -0.217,\n    -0.922, -0.123, -0.213, -0.861, -0.133, -0.208, -0.799, -0.143, -0.204,\n    -0.737, -0.153, -0.199, -0.676, -0.164, -0.195, -0.614, -0.174, -0.19,\n    -0.553, -0.184, -0.186, -0.491, -0.194, -0.181, -0.43, -0.204, -0.177,\n    -0.368, -0.213, -0.172, -0.307, -0.223, -0.167, -0.245, -0.233, -0.162,\n    -0.184, -0.243, -0.157, -0.122, -0.253, -0.152, -0.061, -0.262, -0.147,\n    0.001, -0.271, -0.141, 0.063, -0.281, -0.137, 0.124, -0.291, -0.132, 0.186,\n    -0.297, -0.123, 0.247, -0.309, -0.12, 0.308, -0.326, -0.125, 0.366, -0.344,\n    -0.137, 0.424, -0.363, -0.152, 0.479, -0.384, -0.172, 0.54, -0.401, -0.172,\n    0.599, -0.413, -0.156, 0.658, -0.424, -0.138, 0.716, -0.435, -0.119, 0.775,\n    -0.445, -0.098, 0.832, -0.453, -0.073, 0.887, -0.457, -0.044, 0.939, -0.457,\n    -0.01, -0.994, -0.162, -0.181, -0.933, -0.172, -0.176, -0.871, -0.182,\n    -0.171, -0.81, -0.192, -0.166, -0.748, -0.202, -0.162, -0.687, -0.212,\n    -0.157, -0.625, -0.222, -0.152, -0.563, -0.231, -0.147, -0.502, -0.241,\n    -0.141, -0.44, -0.25, -0.136, -0.379, -0.259, -0.131, -0.317, -0.269,\n    -0.125, -0.256, -0.278, -0.12, -0.194, -0.287, -0.114, -0.132, -0.296,\n    -0.109, -0.071, -0.306, -0.104, -0.009, -0.313, -0.096, 0.052, -0.323,\n    -0.091, 0.114, -0.334, -0.087, 0.175, -0.347, -0.086, 0.235, -0.364, -0.092,\n    0.294, -0.383, -0.103, 0.351, -0.402, -0.119, 0.408, -0.422, -0.136, 0.463,\n    -0.442, -0.157, 0.524, -0.46, -0.156, 0.583, -0.471, -0.138, 0.641, -0.481,\n    -0.117, 0.698, -0.49, -0.095, 0.755, -0.497, -0.07, 0.81, -0.501, -0.04,\n    0.863, -0.501, -0.006, 0.912, -0.494, 0.032, -1.005, -0.209, -0.14, -0.944,\n    -0.219, -0.135, -0.882, -0.228, -0.13, -0.82, -0.238, -0.125, -0.759,\n    -0.247, -0.12, -0.697, -0.257, -0.114, -0.636, -0.266, -0.109, -0.574,\n    -0.275, -0.103, -0.512, -0.284, -0.098, -0.451, -0.293, -0.092, -0.389,\n    -0.301, -0.086, -0.327, -0.31, -0.08, -0.266, -0.319, -0.074, -0.204,\n    -0.326, -0.067, -0.142, -0.336, -0.061, -0.081, -0.346, -0.057, -0.02,\n    -0.357, -0.053, 0.042, -0.37, -0.052, 0.102, -0.386, -0.054, 0.162, -0.403,\n    -0.061, 0.22, -0.422, -0.073, 0.277, -0.441, -0.09, 0.333, -0.461, -0.11,\n    0.388, -0.481, -0.135, 0.446, -0.501, -0.144, 0.507, -0.517, -0.136, 0.565,\n    -0.526, -0.115, 0.622, -0.535, -0.092, 0.679, -0.542, -0.066, 0.734, -0.546,\n    -0.036, 0.786, -0.545, -0.002, 0.835, -0.538, 0.036, 0.882, -0.526, 0.077,\n    -1.016, -0.253, -0.097, -0.954, -0.263, -0.092, -0.892, -0.272, -0.087,\n    -0.831, -0.281, -0.081, -0.769, -0.29, -0.075, -0.707, -0.299, -0.069,\n    -0.646, -0.307, -0.063, -0.584, -0.316, -0.057, -0.522, -0.324, -0.051,\n    -0.461, -0.333, -0.045, -0.399, -0.34, -0.038, -0.337, -0.349, -0.032,\n    -0.276, -0.358, -0.026, -0.214, -0.368, -0.022, -0.153, -0.38, -0.018,\n    -0.092, -0.393, -0.017, -0.031, -0.408, -0.018, 0.029, -0.424, -0.022,\n    0.089, -0.442, -0.031, 0.146, -0.462, -0.045, 0.203, -0.481, -0.064, 0.258,\n    -0.501, -0.086, 0.311, -0.52, -0.113, 0.369, -0.54, -0.128, 0.429, -0.559,\n    -0.127, 0.489, -0.572, -0.112, 0.546, -0.58, -0.088, 0.602, -0.586, -0.062,\n    0.657, -0.59, -0.032, 0.71, -0.589, 0.002, 0.759, -0.583, 0.04, 0.805,\n    -0.571, 0.08, 0.849, -0.555, 0.122, -1.026, -0.296, -0.053, -0.964, -0.305,\n    -0.047, -0.903, -0.314, -0.041, -0.841, -0.322, -0.035, -0.779, -0.331,\n    -0.029, -0.718, -0.339, -0.022, -0.656, -0.347, -0.016, -0.594, -0.355,\n    -0.009, -0.533, -0.363, -0.003, -0.471, -0.372, 0.003, -0.409, -0.381,\n    0.009, -0.348, -0.391, 0.013, -0.286, -0.403, 0.017, -0.225, -0.416, 0.018,\n    -0.164, -0.43, 0.018, -0.104, -0.446, 0.014, -0.044, -0.463, 0.008, 0.015,\n    -0.482, -0.003, 0.072, -0.501, -0.019, 0.128, -0.521, -0.039, 0.182, -0.54,\n    -0.063, 0.235, -0.559, -0.092, 0.292, -0.579, -0.11, 0.351, -0.599, -0.114,\n    0.411, -0.614, -0.105, 0.47, -0.625, -0.085, 0.526, -0.631, -0.058, 0.581,\n    -0.634, -0.028, 0.633, -0.634, 0.006, 0.683, -0.627, 0.044, 0.729, -0.615,\n    0.084, 0.773, -0.599, 0.126, 0.816, -0.582, 0.167, -1.036, -0.337, -0.007,\n    -0.975, -0.346, -0.001, -0.913, -0.354, 0.005, -0.851, -0.362, 0.012,\n    -0.789, -0.37, 0.019, -0.728, -0.378, 0.025, -0.666, -0.386, 0.032, -0.604,\n    -0.394, 0.038, -0.543, -0.404, 0.043, -0.481, -0.414, 0.048, -0.42, -0.425,\n    0.051, -0.359, -0.438, 0.053, -0.298, -0.452, 0.053, -0.237, -0.468, 0.051,\n    -0.177, -0.484, 0.045, -0.118, -0.503, 0.037, -0.06, -0.522, 0.024, -0.003,\n    -0.541, 0.006, 0.053, -0.561, -0.016, 0.107, -0.58, -0.041, 0.159, -0.598,\n    -0.071, 0.215, -0.618, -0.091, 0.273, -0.638, -0.1, 0.333, -0.656, -0.095,\n    0.393, -0.668, -0.079, 0.45, -0.676, -0.054, 0.504, -0.679, -0.024, 0.557,\n    -0.678, 0.009, 0.607, -0.672, 0.047, 0.653, -0.66, 0.088, 0.696, -0.643,\n    0.13, 0.738, -0.623, 0.172, 0.783, -0.61, 0.213, -1.046, -0.378, 0.039,\n    -0.985, -0.386, 0.046, -0.923, -0.393, 0.053, -0.861, -0.401, 0.06, -0.8,\n    -0.409, 0.066, -0.738, -0.418, 0.072, -0.676, -0.427, 0.078, -0.615, -0.437,\n    0.082, -0.553, -0.448, 0.086, -0.492, -0.461, 0.088, -0.431, -0.474, 0.089,\n    -0.37, -0.489, 0.087, -0.31, -0.506, 0.083, -0.251, -0.524, 0.075, -0.192,\n    -0.542, 0.064, -0.134, -0.562, 0.049, -0.078, -0.581, 0.03, -0.023, -0.601,\n    0.007, 0.03, -0.619, -0.02, 0.082, -0.637, -0.05, 0.137, -0.656, -0.073,\n    0.196, -0.677, -0.084, 0.255, -0.696, -0.084, 0.315, -0.71, -0.072, 0.373,\n    -0.72, -0.049, 0.428, -0.724, -0.021, 0.481, -0.723, 0.013, 0.531, -0.717,\n    0.051, 0.577, -0.705, 0.091, 0.62, -0.687, 0.133, 0.66, -0.665, 0.176,\n    0.704, -0.649, 0.217, 0.751, -0.639, 0.258, -1.057, -0.417, 0.087, -0.995,\n    -0.425, 0.093, -0.933, -0.433, 0.1, -0.872, -0.441, 0.107, -0.81, -0.45,\n    0.112, -0.748, -0.46, 0.117, -0.687, -0.471, 0.121, -0.626, -0.483, 0.123,\n    -0.564, -0.497, 0.124, -0.504, -0.511, 0.123, -0.443, -0.527, 0.12, -0.383,\n    -0.545, 0.113, -0.324, -0.563, 0.104, -0.266, -0.582, 0.091, -0.209, -0.602,\n    0.074, -0.153, -0.621, 0.053, -0.099, -0.64, 0.029, -0.046, -0.659, 0.001,\n    0.006, -0.676, -0.03, 0.06, -0.695, -0.054, 0.118, -0.716, -0.068, 0.177,\n    -0.735, -0.071, 0.237, -0.752, -0.063, 0.296, -0.763, -0.043, 0.352, -0.768,\n    -0.016, 0.405, -0.768, 0.017, 0.455, -0.762, 0.054, 0.501, -0.75, 0.095,\n    0.543, -0.731, 0.137, 0.583, -0.708, 0.18, 0.626, -0.69, 0.222, 0.672,\n    -0.678, 0.262, 0.721, -0.672, 0.301, -1.067, -0.457, 0.134, -1.005, -0.465,\n    0.141, -0.943, -0.474, 0.146, -0.882, -0.483, 0.151, -0.82, -0.494, 0.155,\n    -0.759, -0.506, 0.158, -0.698, -0.519, 0.159, -0.637, -0.533, 0.159, -0.576,\n    -0.549, 0.156, -0.516, -0.566, 0.151, -0.457, -0.584, 0.143, -0.398, -0.603,\n    0.132, -0.341, -0.622, 0.117, -0.284, -0.642, 0.098, -0.229, -0.661, 0.076,\n    -0.175, -0.68, 0.05, -0.122, -0.698, 0.022, -0.071, -0.715, -0.01, -0.017,\n    -0.734, -0.035, 0.04, -0.754, -0.051, 0.099, -0.774, -0.058, 0.159, -0.792,\n    -0.052, 0.218, -0.805, -0.036, 0.275, -0.812, -0.011, 0.329, -0.813, 0.021,\n    0.379, -0.808, 0.058, 0.426, -0.795, 0.099, 0.468, -0.776, 0.141, 0.507,\n    -0.752, 0.183, 0.548, -0.732, 0.226, 0.593, -0.718, 0.267, 0.641, -0.71,\n    0.306, 0.692, -0.709, 0.343, -1.077, -0.497, 0.18, -1.015, -0.507, 0.186,\n    -0.954, -0.517, 0.19, -0.892, -0.529, 0.193, -0.831, -0.542, 0.195, -0.77,\n    -0.556, 0.195, -0.71, -0.571, 0.193, -0.649, -0.587, 0.188, -0.59, -0.605,\n    0.181, -0.531, -0.623, 0.171, -0.473, -0.642, 0.158, -0.416, -0.662, 0.142,\n    -0.36, -0.681, 0.121, -0.305, -0.701, 0.098, -0.252, -0.719, 0.071, -0.199,\n    -0.737, 0.042, -0.148, -0.754, 0.01, -0.094, -0.773, -0.016, -0.038, -0.793,\n    -0.034, 0.021, -0.813, -0.043, 0.081, -0.832, -0.041, 0.14, -0.847, -0.028,\n    0.198, -0.856, -0.005, 0.253, -0.858, 0.026, 0.304, -0.853, 0.062, 0.35,\n    -0.842, 0.102, 0.393, -0.823, 0.144, 0.431, -0.798, 0.187, 0.471, -0.775,\n    0.229, 0.515, -0.759, 0.271, 0.562, -0.749, 0.311, 0.612, -0.746, 0.349,\n    0.665, -0.749, 0.382, -1.087, -0.54, 0.224, -1.026, -0.552, 0.228, -0.965,\n    -0.564, 0.23, -0.904, -0.578, 0.23, -0.843, -0.593, 0.229, -0.782, -0.609,\n    0.225, -0.723, -0.626, 0.219, -0.663, -0.644, 0.211, -0.605, -0.663, 0.199,\n    -0.547, -0.682, 0.184, -0.491, -0.702, 0.166, -0.435, -0.721, 0.144, -0.381,\n    -0.74, 0.119, -0.328, -0.758, 0.092, -0.276, -0.776, 0.062, -0.225, -0.793,\n    0.03, -0.171, -0.811, 0.003, -0.115, -0.831, -0.017, -0.057, -0.852, -0.028,\n    0.003, -0.871, -0.029, 0.062, -0.887, -0.019, 0.121, -0.898, 0.002, 0.176,\n    -0.902, 0.03, 0.228, -0.899, 0.066, 0.275, -0.888, 0.106, 0.318, -0.87,\n    0.148, 0.357, -0.846, 0.19, 0.395, -0.82, 0.233, 0.437, -0.801, 0.275,\n    0.483, -0.788, 0.316, 0.532, -0.783, 0.354, 0.584, -0.785, 0.389, 0.639,\n    -0.793, 0.419, -1.098, -0.587, 0.265, -1.037, -0.6, 0.266, -0.976, -0.615,\n    0.265, -0.916, -0.63, 0.262, -0.856, -0.647, 0.257, -0.796, -0.665, 0.25,\n    -0.737, -0.683, 0.239, -0.679, -0.703, 0.226, -0.622, -0.722, 0.209, -0.566,\n    -0.742, 0.189, -0.511, -0.761, 0.166, -0.457, -0.78, 0.14, -0.405, -0.798,\n    0.112, -0.353, -0.815, 0.082, -0.301, -0.832, 0.05, -0.248, -0.85, 0.022,\n    -0.193, -0.87, 0.001, -0.135, -0.891, -0.012, -0.076, -0.91, -0.016, -0.016,\n    -0.928, -0.008, 0.043, -0.94, 0.009, 0.1, -0.946, 0.036, 0.152, -0.944,\n    0.07, 0.2, -0.935, 0.109, 0.244, -0.917, 0.151, 0.283, -0.893, 0.193, 0.319,\n    -0.866, 0.236, 0.36, -0.844, 0.278, 0.404, -0.829, 0.32, 0.452, -0.821,\n    0.359, 0.504, -0.821, 0.395, 0.558, -0.827, 0.427, 0.613, -0.839, 0.452,\n    -1.109, -0.637, 0.301, -1.049, -0.652, 0.299, -0.989, -0.668, 0.295, -0.929,\n    -0.686, 0.288, -0.87, -0.704, 0.279, -0.811, -0.723, 0.267, -0.754, -0.742,\n    0.252, -0.697, -0.762, 0.233, -0.642, -0.781, 0.212, -0.587, -0.8, 0.188,\n    -0.534, -0.819, 0.161, -0.482, -0.837, 0.131, -0.43, -0.854, 0.101, -0.378,\n    -0.871, 0.069, -0.325, -0.889, 0.042, -0.27, -0.909, 0.019, -0.213, -0.929,\n    0.004, -0.154, -0.949, -0.002, -0.094, -0.967, 0.003, -0.035, -0.981, 0.017,\n    0.022, -0.989, 0.042, 0.076, -0.989, 0.075, 0.125, -0.981, 0.113, 0.169,\n    -0.965, 0.154, 0.209, -0.941, 0.197, 0.245, -0.913, 0.239, 0.283, -0.888,\n    0.282, 0.326, -0.87, 0.324, 0.373, -0.86, 0.364, 0.423, -0.857, 0.402,\n    0.477, -0.862, 0.434, 0.532, -0.872, 0.461, 0.589, -0.888, 0.482, -1.122,\n    -0.69, 0.332, -1.062, -0.707, 0.326, -1.002, -0.725, 0.318, -0.944, -0.743,\n    0.307, -0.886, -0.763, 0.293, -0.829, -0.782, 0.277, -0.772, -0.802, 0.257,\n    -0.717, -0.821, 0.234, -0.664, -0.84, 0.209, -0.611, -0.858, 0.181, -0.559,\n    -0.875, 0.151, -0.507, -0.892, 0.119, -0.455, -0.909, 0.089, -0.402, -0.928,\n    0.061, -0.348, -0.947, 0.038, -0.291, -0.968, 0.021, -0.232, -0.988, 0.013,\n    -0.172, -1.007, 0.014, -0.113, -1.022, 0.026, -0.055, -1.032, 0.049, 0,\n    -1.034, 0.079, 0.05, -1.028, 0.117, 0.095, -1.013, 0.158, 0.135, -0.99, 0.2,\n    0.171, -0.962, 0.242, 0.208, -0.934, 0.285, 0.249, -0.913, 0.327, 0.294,\n    -0.9, 0.369, 0.343, -0.895, 0.407, 0.396, -0.897, 0.441, 0.451, -0.906,\n    0.47, 0.507, -0.92, 0.493, 0.565, -0.939, 0.509, -1.135, -0.746, 0.356,\n    -1.076, -0.764, 0.347, -1.018, -0.783, 0.334, -0.96, -0.803, 0.319, -0.904,\n    -0.822, 0.301, -0.848, -0.842, 0.28, -0.793, -0.861, 0.256, -0.74, -0.879,\n    0.23, -0.687, -0.897, 0.201, -0.636, -0.914, 0.17, -0.584, -0.931, 0.138,\n    -0.533, -0.948, 0.108, -0.48, -0.967, 0.08, -0.425, -0.986, 0.056, -0.368,\n    -1.006, 0.038, -0.31, -1.027, 0.028, -0.251, -1.046, 0.027, -0.191, -1.063,\n    0.036, -0.132, -1.074, 0.056, -0.077, -1.078, 0.085, -0.025, -1.074, 0.121,\n    0.021, -1.061, 0.161, 0.062, -1.039, 0.203, 0.098, -1.012, 0.246, 0.133,\n    -0.981, 0.288, 0.172, -0.957, 0.331, 0.216, -0.941, 0.373, 0.264, -0.933,\n    0.412, 0.315, -0.933, 0.448, 0.369, -0.939, 0.479, 0.426, -0.953, 0.503,\n    0.483, -0.971, 0.521, 0.541, -0.992, 0.532, -1.15, -0.804, 0.375, -1.092,\n    -0.823, 0.361, -1.035, -0.842, 0.344, -0.979, -0.862, 0.325, -0.924, -0.881,\n    0.303, -0.87, -0.9, 0.278, -0.816, -0.919, 0.25, -0.764, -0.936, 0.22,\n    -0.713, -0.953, 0.189, -0.662, -0.97, 0.157, -0.61, -0.987, 0.127, -0.557,\n    -1.005, 0.099, -0.502, -1.025, 0.075, -0.446, -1.045, 0.056, -0.388, -1.065,\n    0.044, -0.329, -1.085, 0.04, -0.269, -1.103, 0.047, -0.21, -1.115, 0.064,\n    -0.154, -1.121, 0.09, -0.101, -1.119, 0.125, -0.054, -1.108, 0.165, -0.012,\n    -1.089, 0.207, 0.025, -1.062, 0.249, 0.059, -1.03, 0.291, 0.097, -1.003,\n    0.334, 0.138, -0.984, 0.376, 0.185, -0.972, 0.417, 0.235, -0.969, 0.454,\n    0.288, -0.974, 0.487, 0.344, -0.985, 0.513, 0.401, -1.002, 0.533, 0.459,\n    -1.023, 0.545, 0.516, -1.047, 0.551, -1.167, -0.863, 0.387, -1.11, -0.882,\n    0.369, -1.054, -0.902, 0.348, -1, -0.921, 0.325, -0.946, -0.94, 0.299,\n    -0.893, -0.958, 0.27, -0.841, -0.975, 0.24, -0.79, -0.992, 0.208, -0.739,\n    -1.009, 0.177, -0.687, -1.026, 0.147, -0.634, -1.044, 0.119, -0.579, -1.063,\n    0.094, -0.524, -1.083, 0.074, -0.466, -1.104, 0.06, -0.407, -1.124, 0.054,\n    -0.347, -1.142, 0.058, -0.288, -1.156, 0.072, -0.231, -1.164, 0.097, -0.177,\n    -1.164, 0.13, -0.129, -1.155, 0.168, -0.085, -1.137, 0.21, -0.047, -1.112,\n    0.253, -0.013, -1.08, 0.295, 0.022, -1.051, 0.337, 0.062, -1.028, 0.38,\n    0.106, -1.013, 0.421, 0.155, -1.006, 0.46, 0.207, -1.009, 0.494, 0.262,\n    -1.018, 0.523, 0.319, -1.034, 0.544, 0.377, -1.054, 0.558, 0.435, -1.077,\n    0.565, 0.492, -1.102, 0.567, -1.185, -0.922, 0.393, -1.13, -0.942, 0.371,\n    -1.076, -0.961, 0.346, -1.022, -0.979, 0.319, -0.97, -0.997, 0.29, -0.918,\n    -1.014, 0.26, -0.867, -1.031, 0.227, -0.816, -1.048, 0.196, -0.764, -1.065,\n    0.166, -0.711, -1.083, 0.138, -0.657, -1.102, 0.113, -0.601, -1.122, 0.092,\n    -0.544, -1.142, 0.076, -0.485, -1.163, 0.068, -0.425, -1.182, 0.07, -0.366,\n    -1.197, 0.081, -0.308, -1.207, 0.103, -0.253, -1.209, 0.134, -0.204, -1.202,\n    0.172, -0.159, -1.186, 0.213, -0.12, -1.162, 0.256, -0.085, -1.132, 0.298,\n    -0.052, -1.1, 0.34, -0.014, -1.073, 0.383, 0.028, -1.054, 0.425, 0.075,\n    -1.045, 0.465, 0.127, -1.044, 0.501, 0.181, -1.052, 0.531, 0.238, -1.066,\n    0.555, 0.295, -1.085, 0.571, 0.353, -1.107, 0.579, 0.41, -1.132, 0.582,\n    0.467, -1.158, 0.58, -1.206, -0.981, 0.394, -1.152, -1, 0.368, -1.099,\n    -1.018, 0.34, -1.047, -1.036, 0.31, -0.995, -1.053, 0.279, -0.944, -1.07,\n    0.247, -0.892, -1.087, 0.216, -0.84, -1.104, 0.186, -0.788, -1.122, 0.158,\n    -0.734, -1.141, 0.132, -0.678, -1.161, 0.11, -0.622, -1.181, 0.094, -0.563,\n    -1.201, 0.084, -0.504, -1.221, 0.083, -0.444, -1.237, 0.092, -0.385, -1.249,\n    0.111, -0.33, -1.253, 0.14, -0.279, -1.248, 0.176, -0.233, -1.234, 0.217,\n    -0.193, -1.212, 0.259, -0.157, -1.183, 0.302, -0.124, -1.15, 0.343, -0.089,\n    -1.121, 0.386, -0.049, -1.098, 0.428, -0.004, -1.085, 0.47, 0.046, -1.081,\n    0.508, 0.1, -1.086, 0.54, 0.156, -1.098, 0.565, 0.213, -1.116, 0.583, 0.271,\n    -1.138, 0.593, 0.328, -1.162, 0.597, 0.386, -1.188, 0.595, 0.442, -1.214,\n    0.59,\n  ]),\n};\n",
      "type": "registry:ui",
      "target": "components/ui/holo-cloth/baked-pose.ts"
    },
    {
      "path": "registry/new-york/holo-cloth/cloth.ts",
      "content": "import * as THREE from 'three';\nimport { BAKED_POSE } from './baked-pose';\n\nexport interface ClothPhysicsParams {\n  /** 0..0.6 — how fast motion dies out (gel viscosity). */\n  viscosity: number;\n  /** 0..1 — constraint solve strength. */\n  stiffness: number;\n  /** relaxation iterations per substep */\n  iterations: number;\n  /** 0..0.3 — laplacian smoothing, relaxes wrinkles back out */\n  smoothing: number;\n}\n\ninterface GrabState {\n  indices: number[];\n  weights: number[];\n  /** offset of each grabbed vertex from the grab origin, 3 floats per entry */\n  offsets: Float32Array;\n  target: THREE.Vector3;\n}\n\nconst SUBSTEP = 1 / 120;\nconst MAX_SUBSTEPS = 4;\n\n/**\n * Verlet cloth in zero gravity. No external forces — motion only comes from\n * user interaction, and heavy velocity damping makes it settle like it is\n * suspended in gel.\n */\nexport class ClothSim {\n  readonly cols: number;\n  readonly rows: number;\n  readonly count: number;\n  readonly positions: Float32Array;\n  private prev: Float32Array;\n  private rest: Float32Array;\n\n  // constraints as flat arrays: [ia, ib] pairs + rest length + strength mul\n  private cA: Int32Array;\n  private cB: Int32Array;\n  private cRest: Float32Array;\n  private cMul: Float32Array;\n\n  /** 4-neighborhood for laplacian smoothing: -1 padded */\n  private neighbors: Int32Array;\n\n  private grab: GrabState | null = null;\n  private accumulator = 0;\n\n  constructor(\n    readonly width: number,\n    readonly height: number,\n    readonly segX: number,\n    readonly segY: number,\n  ) {\n    this.cols = segX + 1;\n    this.rows = segY + 1;\n    this.count = this.cols * this.rows;\n    this.positions = new Float32Array(this.count * 3);\n    this.prev = new Float32Array(this.count * 3);\n    this.rest = new Float32Array(this.count * 3);\n\n    this.initPositions();\n\n    // Build constraints: structural (1.0), shear (0.85), bend (0.35)\n    const a: number[] = [];\n    const b: number[] = [];\n    const mul: number[] = [];\n    const idx = (x: number, y: number) => y * this.cols + x;\n    for (let y = 0; y < this.rows; y++) {\n      for (let x = 0; x < this.cols; x++) {\n        if (x + 1 < this.cols) {\n          a.push(idx(x, y));\n          b.push(idx(x + 1, y));\n          mul.push(1.0);\n        }\n        if (y + 1 < this.rows) {\n          a.push(idx(x, y));\n          b.push(idx(x, y + 1));\n          mul.push(1.0);\n        }\n        if (x + 1 < this.cols && y + 1 < this.rows) {\n          a.push(idx(x, y));\n          b.push(idx(x + 1, y + 1));\n          mul.push(0.85);\n          a.push(idx(x + 1, y));\n          b.push(idx(x, y + 1));\n          mul.push(0.85);\n        }\n        if (x + 2 < this.cols) {\n          a.push(idx(x, y));\n          b.push(idx(x + 2, y));\n          mul.push(0.35);\n        }\n        if (y + 2 < this.rows) {\n          a.push(idx(x, y));\n          b.push(idx(x, y + 2));\n          mul.push(0.35);\n        }\n      }\n    }\n    this.cA = new Int32Array(a);\n    this.cB = new Int32Array(b);\n    this.cMul = new Float32Array(mul);\n    this.cRest = new Float32Array(a.length);\n    this.computeRestLengths();\n\n    this.neighbors = new Int32Array(this.count * 4).fill(-1);\n    for (let y = 0; y < this.rows; y++) {\n      for (let x = 0; x < this.cols; x++) {\n        const i = idx(x, y) * 4;\n        this.neighbors[i + 0] = x > 0 ? idx(x - 1, y) : -1;\n        this.neighbors[i + 1] = x + 1 < this.cols ? idx(x + 1, y) : -1;\n        this.neighbors[i + 2] = y > 0 ? idx(x, y - 1) : -1;\n        this.neighbors[i + 3] = y + 1 < this.rows ? idx(x, y + 1) : -1;\n      }\n    }\n  }\n\n  /**\n   * Initial pose comes from a captured snapshot (BAKED_POSE): a\n   * hand-arranged drape sampled bilinearly onto this grid, scaled to this\n   * cloth's dimensions.\n   */\n  private initPositions() {\n    const bp = BAKED_POSE;\n    const bc = bp.cols;\n    const br = bp.rows;\n    const sx = this.width / bp.width;\n    const sy = this.height / bp.height;\n    const sz = (sx + sy) / 2;\n    let k = 0;\n    for (let y = 0; y < this.rows; y++) {\n      for (let x = 0; x < this.cols; x++) {\n        const gu = (x / this.segX) * (bc - 1);\n        const gv = (y / this.segY) * (br - 1);\n        const x0 = Math.min(bc - 2, Math.floor(gu));\n        const y0 = Math.min(br - 2, Math.floor(gv));\n        const fx = gu - x0;\n        const fy = gv - y0;\n        for (let c = 0; c < 3; c++) {\n          const i00 = (y0 * bc + x0) * 3 + c;\n          const i10 = (y0 * bc + x0 + 1) * 3 + c;\n          const i01 = ((y0 + 1) * bc + x0) * 3 + c;\n          const i11 = ((y0 + 1) * bc + x0 + 1) * 3 + c;\n          const v0 = bp.data[i00] * (1 - fx) + bp.data[i10] * fx;\n          const v1 = bp.data[i01] * (1 - fx) + bp.data[i11] * fx;\n          const s = c === 0 ? sx : c === 1 ? sy : sz;\n          this.positions[k + c] = (v0 * (1 - fy) + v1 * fy) * s;\n        }\n        k += 3;\n      }\n    }\n    this.prev.set(this.positions);\n    this.rest.set(this.positions);\n  }\n\n  private computeRestLengths() {\n    // rest lengths come from the flat, unbillowed grid so the cloth\n    // relaxes toward its true rectangle\n    const stepX = this.width / this.segX;\n    const stepY = this.height / this.segY;\n    for (let c = 0; c < this.cA.length; c++) {\n      const ia = this.cA[c],\n        ib = this.cB[c];\n      const ax = ia % this.cols,\n        ay = Math.floor(ia / this.cols);\n      const bx = ib % this.cols,\n        by = Math.floor(ib / this.cols);\n      const dx = (ax - bx) * stepX;\n      const dy = (ay - by) * stepY;\n      this.cRest[c] = Math.hypot(dx, dy);\n    }\n  }\n\n  reset() {\n    this.initPositions();\n    this.grab = null;\n  }\n\n  /** Give a random gentle impulse — a \"poke\" from nowhere. */\n  poke(strength = 0.5) {\n    const p = this.positions;\n    const ci = Math.floor(Math.random() * this.count);\n    const cx = p[ci * 3],\n      cy = p[ci * 3 + 1],\n      cz = p[ci * 3 + 2];\n    const dir = new THREE.Vector3(\n      Math.random() - 0.5,\n      Math.random() - 0.5,\n      Math.random() - 0.5,\n    )\n      .normalize()\n      .multiplyScalar(strength * 0.09);\n    const radius = Math.max(this.width, this.height) * 0.28;\n    for (let i = 0; i < this.count; i++) {\n      const dx = p[i * 3] - cx,\n        dy = p[i * 3 + 1] - cy,\n        dz = p[i * 3 + 2] - cz;\n      const d = Math.sqrt(dx * dx + dy * dy + dz * dz);\n      if (d > radius) continue;\n      const w = 1 - d / radius;\n      const s = w * w * (3 - 2 * w); // smoothstep\n      this.prev[i * 3] -= dir.x * s;\n      this.prev[i * 3 + 1] -= dir.y * s;\n      this.prev[i * 3 + 2] -= dir.z * s;\n    }\n  }\n\n  /** Begin a grab around a world-space point. Returns false if nothing near. */\n  startGrab(point: THREE.Vector3, radius: number): boolean {\n    const p = this.positions;\n    const indices: number[] = [];\n    const weights: number[] = [];\n    const offsets: number[] = [];\n    let best = Infinity;\n    for (let i = 0; i < this.count; i++) {\n      const dx = p[i * 3] - point.x;\n      const dy = p[i * 3 + 1] - point.y;\n      const dz = p[i * 3 + 2] - point.z;\n      const d = Math.sqrt(dx * dx + dy * dy + dz * dz);\n      best = Math.min(best, d);\n      if (d > radius) continue;\n      const t = 1 - d / radius;\n      const w = t * t * (3 - 2 * t);\n      indices.push(i);\n      weights.push(w);\n      offsets.push(dx, dy, dz);\n    }\n    if (indices.length === 0 || best > radius) return false;\n    this.grab = {\n      indices,\n      weights,\n      offsets: new Float32Array(offsets),\n      target: point.clone(),\n    };\n    return true;\n  }\n\n  moveGrab(target: THREE.Vector3) {\n    if (this.grab) this.grab.target.copy(target);\n  }\n\n  endGrab() {\n    this.grab = null;\n  }\n\n  get isGrabbing() {\n    return this.grab !== null;\n  }\n\n  private cavityScratch: Float32Array | null = null;\n\n  /**\n   * Per-vertex cavity term for ambient occlusion: how deeply a vertex sits\n   * inside a concave fold. Uses the discrete Laplacian projected onto the\n   * vertex normal — concave (valley) vertices score > 0 — then one smoothing\n   * pass to avoid grid artifacts. Writes [0,1] into `out`.\n   */\n  computeCavity(normals: ArrayLike<number>, out: Float32Array, gain = 6) {\n    const p = this.positions;\n    const nb = this.neighbors;\n    const n = this.count;\n    const invStep =\n      1 / Math.min(this.width / this.segX, this.height / this.segY);\n    if (!this.cavityScratch || this.cavityScratch.length < n) {\n      this.cavityScratch = new Float32Array(n);\n    }\n    const tmp = this.cavityScratch;\n    for (let i = 0; i < n; i++) {\n      let ax = 0,\n        ay = 0,\n        az = 0,\n        cnt = 0;\n      for (let j = 0; j < 4; j++) {\n        const ni = nb[i * 4 + j];\n        if (ni < 0) continue;\n        ax += p[ni * 3];\n        ay += p[ni * 3 + 1];\n        az += p[ni * 3 + 2];\n        cnt++;\n      }\n      if (cnt === 0) {\n        tmp[i] = 0;\n        continue;\n      }\n      const inv = 1 / cnt;\n      const lx = ax * inv - p[i * 3];\n      const ly = ay * inv - p[i * 3 + 1];\n      const lz = az * inv - p[i * 3 + 2];\n      const c =\n        (lx * normals[i * 3] +\n          ly * normals[i * 3 + 1] +\n          lz * normals[i * 3 + 2]) *\n        invStep;\n      tmp[i] = Math.min(1, Math.max(0, c * gain));\n    }\n    // soften: blend each vertex with its neighborhood average\n    for (let i = 0; i < n; i++) {\n      let sum = 0,\n        cnt = 0;\n      for (let j = 0; j < 4; j++) {\n        const ni = nb[i * 4 + j];\n        if (ni < 0) continue;\n        sum += tmp[ni];\n        cnt++;\n      }\n      out[i] = cnt > 0 ? tmp[i] * 0.5 + (sum / cnt) * 0.5 : tmp[i];\n    }\n  }\n\n  step(dt: number, params: ClothPhysicsParams) {\n    this.accumulator += Math.min(dt, 0.05);\n    let steps = 0;\n    while (this.accumulator >= SUBSTEP && steps < MAX_SUBSTEPS) {\n      this.substep(params);\n      this.accumulator -= SUBSTEP;\n      steps++;\n    }\n    if (steps === MAX_SUBSTEPS) this.accumulator = 0;\n  }\n\n  private substep(params: ClothPhysicsParams) {\n    const p = this.positions;\n    const prev = this.prev;\n    const n = this.count;\n\n    // integrate: damping expressed per 60Hz-frame, converted to substep rate\n    const damp = Math.pow(1 - Math.min(params.viscosity, 0.99), SUBSTEP * 60);\n    for (let i = 0; i < n * 3; i++) {\n      const cur = p[i];\n      const vel = (cur - prev[i]) * damp;\n      prev[i] = cur;\n      p[i] = cur + vel;\n    }\n\n    // laplacian smoothing — wrinkles relax back out, gel-like\n    if (params.smoothing > 0) {\n      const k = params.smoothing * 0.5;\n      const nb = this.neighbors;\n      for (let i = 0; i < n; i++) {\n        let ax = 0,\n          ay = 0,\n          az = 0,\n          cnt = 0;\n        for (let j = 0; j < 4; j++) {\n          const ni = nb[i * 4 + j];\n          if (ni < 0) continue;\n          ax += p[ni * 3];\n          ay += p[ni * 3 + 1];\n          az += p[ni * 3 + 2];\n          cnt++;\n        }\n        if (cnt === 0) continue;\n        const inv = 1 / cnt;\n        p[i * 3] += (ax * inv - p[i * 3]) * k;\n        p[i * 3 + 1] += (ay * inv - p[i * 3 + 1]) * k;\n        p[i * 3 + 2] += (az * inv - p[i * 3 + 2]) * k;\n      }\n    }\n\n    // constraint relaxation\n    const iters = Math.max(1, Math.round(params.iterations));\n    const stiff = params.stiffness;\n    const cA = this.cA,\n      cB = this.cB,\n      cRest = this.cRest,\n      cMul = this.cMul;\n    const nc = cA.length;\n    for (let it = 0; it < iters; it++) {\n      for (let c = 0; c < nc; c++) {\n        const ia = cA[c] * 3,\n          ib = cB[c] * 3;\n        const dx = p[ib] - p[ia];\n        const dy = p[ib + 1] - p[ia + 1];\n        const dz = p[ib + 2] - p[ia + 2];\n        const d = Math.sqrt(dx * dx + dy * dy + dz * dz);\n        if (d < 1e-9) continue;\n        const diff = ((d - cRest[c]) / d) * 0.5 * stiff * cMul[c];\n        const ox = dx * diff,\n          oy = dy * diff,\n          oz = dz * diff;\n        p[ia] += ox;\n        p[ia + 1] += oy;\n        p[ia + 2] += oz;\n        p[ib] -= ox;\n        p[ib + 1] -= oy;\n        p[ib + 2] -= oz;\n      }\n      this.applyGrab();\n    }\n  }\n\n  private applyGrab() {\n    const g = this.grab;\n    if (!g) return;\n    const p = this.positions;\n    for (let k = 0; k < g.indices.length; k++) {\n      const i = g.indices[k] * 3;\n      const w = g.weights[k];\n      const tx = g.target.x + g.offsets[k * 3];\n      const ty = g.target.y + g.offsets[k * 3 + 1];\n      const tz = g.target.z + g.offsets[k * 3 + 2];\n      p[i] += (tx - p[i]) * w;\n      p[i + 1] += (ty - p[i + 1]) * w;\n      p[i + 2] += (tz - p[i + 2]) * w;\n    }\n  }\n}\n",
      "type": "registry:ui",
      "target": "components/ui/holo-cloth/cloth.ts"
    },
    {
      "path": "registry/new-york/holo-cloth/holo-material.ts",
      "content": "import * as THREE from 'three';\nimport { makeGrainRoughnessMap } from './textures';\n\nexport interface HoloUniforms {\n  uHoloIntensity: THREE.IUniform<number>;\n  uHoloScale: THREE.IUniform<number>;\n  uBandFreq: THREE.IUniform<number>;\n  uRadialFreq: THREE.IUniform<number>;\n  uSaturation: THREE.IUniform<number>;\n  uHueShift: THREE.IUniform<number>;\n  uSparkle: THREE.IUniform<number>;\n  uSpecTint: THREE.IUniform<number>;\n  uSurfaceMap: THREE.IUniform<THREE.Texture>;\n  uSurfaceOpacity: THREE.IUniform<number>;\n  uCavityAmount: THREE.IUniform<number>;\n  uCornerRound: THREE.IUniform<number>;\n  uClothSize: THREE.IUniform<THREE.Vector2>;\n}\n\nexport interface HoloMaterial {\n  material: THREE.MeshPhysicalMaterial;\n  uniforms: HoloUniforms;\n}\n\n/**\n * Holographic sticker fabric:\n *  - MeshPhysicalMaterial base: iridescence (thin-film), sheen (fabric),\n *    clearcoat (laminated sticker depth), matte roughness, woven normal map\n *  - injected diffraction layer: micro-flake cells whose hue sweeps with the\n *    view angle, like the diffraction grating on holo foil\n */\nexport function createHoloMaterial(\n  surfaceTexture: THREE.Texture,\n): HoloMaterial {\n  // the bump/normal map is loaded asynchronously by the engine (default\n  // scratch texture or a user upload) — none at creation time\n  const roughnessMap = makeGrainRoughnessMap();\n\n  const material = new THREE.MeshPhysicalMaterial({\n    color: new THREE.Color('#9aa1ad'),\n    metalness: 0.95,\n    roughness: 0.1,\n    roughnessMap,\n    normalScale: new THREE.Vector2(0.5, 0.5),\n    clearcoat: 1.0,\n    clearcoatRoughness: 0.08,\n    sheen: 0.35,\n    sheenRoughness: 0.55,\n    sheenColor: new THREE.Color('#cfd6ff'),\n    iridescence: 1.0,\n    iridescenceIOR: 1.35,\n    iridescenceThicknessRange: [120, 480],\n    side: THREE.DoubleSide,\n  });\n\n  const uniforms: HoloUniforms = {\n    uHoloIntensity: { value: 1.0 },\n    uHoloScale: { value: 110 },\n    uBandFreq: { value: 3.0 },\n    uRadialFreq: { value: 1.6 },\n    uSaturation: { value: 0.8 },\n    uHueShift: { value: 0.0 },\n    uSparkle: { value: 0.6 },\n    uSpecTint: { value: 0.85 },\n    uSurfaceMap: { value: surfaceTexture },\n    uSurfaceOpacity: { value: 1.0 },\n    uCavityAmount: { value: 0 },\n    uCornerRound: { value: 0 },\n    uClothSize: { value: new THREE.Vector2(3, 3) },\n  };\n\n  // rounded-corner cutout edges resolve smoothly under the MSAA target\n  material.alphaToCoverage = true;\n\n  material.onBeforeCompile = (shader) => {\n    Object.assign(shader.uniforms, uniforms);\n\n    shader.vertexShader =\n      'varying vec2 vHoloUv;\\nattribute float aCavity;\\nvarying float vCavity;\\n' +\n      shader.vertexShader.replace(\n        '#include <uv_vertex>',\n        '#include <uv_vertex>\\n\\tvHoloUv = uv;\\n\\tvCavity = aCavity;',\n      );\n\n    shader.fragmentShader =\n      /* glsl */ `\n      varying vec2 vHoloUv;\n      uniform float uHoloIntensity;\n      uniform float uHoloScale;\n      uniform float uBandFreq;\n      uniform float uRadialFreq;\n      uniform float uSaturation;\n      uniform float uHueShift;\n      uniform float uSparkle;\n      uniform float uSpecTint;\n      uniform sampler2D uSurfaceMap;\n      uniform float uSurfaceOpacity;\n      varying float vCavity;\n      uniform float uCavityAmount;\n      uniform float uCornerRound;\n      uniform vec2 uClothSize;\n\n      float holoHash(vec2 p) {\n        vec3 p3 = fract(vec3(p.xyx) * 0.1031);\n        p3 += dot(p3, p3.yzx + 33.33);\n        return fract((p3.x + p3.y) * p3.z);\n      }\n\n      vec3 holoHsv2rgb(vec3 c) {\n        vec3 rgb = clamp(abs(mod(c.x * 6.0 + vec3(0.0, 4.0, 2.0), 6.0) - 3.0) - 1.0, 0.0, 1.0);\n        rgb = rgb * rgb * (3.0 - 2.0 * rgb); // smooth rainbow\n        return c.z * mix(vec3(1.0), rgb, c.y);\n      }\n      ` +\n      shader.fragmentShader\n        .replace(\n          '#include <emissivemap_fragment>',\n          /* glsl */ `#include <emissivemap_fragment>\n        {\n          // rounded-corner cutout: rounded-rect SDF in cloth space; sharp at 0\n          if (uCornerRound > 0.0) {\n            vec2 cp = (vHoloUv - 0.5) * uClothSize;\n            float cr = uCornerRound * 0.5 * min(uClothSize.x, uClothSize.y);\n            vec2 cq = abs(cp) - (0.5 * uClothSize - vec2(cr));\n            float cd = length(max(cq, vec2(0.0))) - cr;\n            float cEdge = fwidth(cd) + 1e-4;\n            float cMask = 1.0 - smoothstep(-cEdge, cEdge, cd);\n            if (cMask <= 0.0) discard;\n            diffuseColor.a *= cMask;\n          }\n\n          // uploaded graphics live in UV space, so they morph with the cloth;\n          // ink reads as dielectric, so pull metalness down where it covers\n          vec4 surf = texture2D(uSurfaceMap, vHoloUv);\n          float surfA = surf.a * uSurfaceOpacity;\n          diffuseColor.rgb = mix(diffuseColor.rgb, surf.rgb, surfA);\n          metalnessFactor = mix(metalnessFactor, 0.05, surfA * 0.8);\n\n          vec3 hView = normalize(vViewPosition);\n          float facing = clamp(abs(dot(normal, hView)), 0.0, 1.0);\n          float fres = pow(1.0 - facing, 1.5);\n\n          // micro flake cells — each has a random phase so neighbouring\n          // flakes catch different colors, like holo foil grain\n          vec2 cellUv = vHoloUv * uHoloScale;\n          vec2 cellId = floor(cellUv);\n          float rnd = holoHash(cellId);\n          float rnd2 = holoHash(cellId + 71.7);\n\n          // diffraction sweep: broad smooth bands driven by view angle and\n          // radial distance; flakes only nudge the phase slightly\n          float radial = length(vHoloUv - 0.5) * uRadialFreq;\n          float hue = fract(uHueShift + facing * uBandFreq + radial + rnd * 0.06);\n          vec3 rainbow = holoHsv2rgb(vec3(hue, uSaturation, 1.0));\n\n          // flake mask: soft variation so the foil reads as granular, not flat\n          float flake = 0.82 + 0.18 * rnd2;\n\n          // angle-gated glints: a sparse set of flakes flares at specific angles\n          float gate = fract(rnd2 * 13.7 + facing * 6.0);\n          float glint = smoothstep(1.0 - 0.012 * uSparkle, 1.0, gate) * 5.0;\n\n          // rainbow brightest at grazing angles but present face-on too;\n          // folds swallow the glow where cavity occlusion applies\n          float energy = (0.22 + 0.78 * fres) * flake;\n          float holoAO = 1.0 - uCavityAmount * vCavity * 0.8;\n          totalEmissiveRadiance += rainbow * uHoloIntensity * (energy * 0.55 + glint * fres * 0.5) * holoAO;\n\n          // tint the metallic F0 so specular reflections go iridescent —\n          // this is what makes real holo foil flash color, not glow\n          vec3 tinted = diffuseColor.rgb * (0.25 + rainbow * 1.9);\n          diffuseColor.rgb = mix(diffuseColor.rgb, tinted, uSpecTint);\n        }`,\n        )\n        .replace(\n          '#include <aomap_fragment>',\n          /* glsl */ `#include <aomap_fragment>\n        {\n          // cavity occlusion: deep folds see less of the environment.\n          // Mirrors aomap_fragment's application points.\n          float cavityAO = 1.0 - uCavityAmount * vCavity;\n          reflectedLight.indirectDiffuse *= cavityAO;\n          #if defined( USE_CLEARCOAT )\n            clearcoatSpecularIndirect *= cavityAO;\n          #endif\n          #if defined( USE_SHEEN )\n            sheenSpecularIndirect *= cavityAO;\n          #endif\n          #if defined( USE_ENVMAP ) && defined( STANDARD )\n            float cavDotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n            reflectedLight.indirectSpecular *= computeSpecularOcclusion( cavDotNV, cavityAO, material.roughness );\n          #endif\n        }`,\n        );\n  };\n\n  return { material, uniforms };\n}\n",
      "type": "registry:ui",
      "target": "components/ui/holo-cloth/holo-material.ts"
    },
    {
      "path": "registry/new-york/holo-cloth/index.ts",
      "content": "export { default as HoloCloth } from './HoloCloth.vue';\nexport type {\n  HoloClothProps,\n  HoloClothPreset,\n  HoloClothQuality,\n} from './types';\n",
      "type": "registry:ui",
      "target": "components/ui/holo-cloth/index.ts"
    },
    {
      "path": "registry/new-york/holo-cloth/textures.ts",
      "content": "import * as THREE from 'three';\n\n/** Deterministic pseudo-random for texture generation */\nfunction mulberry32(seed: number) {\n  return () => {\n    seed |= 0;\n    seed = (seed + 1831565813) | 0; // 0x6D2B79F5\n    let t = Math.imul(seed ^ (seed >>> 15), 1 | seed);\n    t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;\n    return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n  };\n}\n\n/**\n * Height field of a fine fabric weave: interleaved warp/weft threads,\n * per-thread thickness variation and micro grain.\n */\nfunction weaveHeight(\n  size: number,\n  threads: number,\n  rand: () => number,\n): Float32Array {\n  const h = new Float32Array(size * size);\n  // per-thread random thickness so the weave doesn't look machine-perfect\n  const warpVar = new Float32Array(threads + 1);\n  const weftVar = new Float32Array(threads + 1);\n  for (let i = 0; i <= threads; i++) {\n    warpVar[i] = 0.85 + rand() * 0.3;\n    weftVar[i] = 0.85 + rand() * 0.3;\n  }\n  const grain = new Float32Array(size * size);\n  for (let i = 0; i < grain.length; i++) grain[i] = rand();\n\n  for (let y = 0; y < size; y++) {\n    const v = (y / size) * threads;\n    const vi = Math.floor(v);\n    const vf = v - vi;\n    for (let x = 0; x < size; x++) {\n      const u = (x / size) * threads;\n      const ui = Math.floor(u);\n      const uf = u - ui;\n      // thread cross-section profile (half-sine bump per thread)\n      const warp = Math.sin(uf * Math.PI) * warpVar[ui % (threads + 1)];\n      const weft = Math.sin(vf * Math.PI) * weftVar[vi % (threads + 1)];\n      // plain weave: alternate which thread lies on top\n      const over = (ui + vi) % 2 === 0;\n      const height = over\n        ? warp * 0.62 + weft * 0.38\n        : weft * 0.62 + warp * 0.38;\n      const g = grain[y * size + x];\n      h[y * size + x] = height * 0.85 + g * 0.15;\n    }\n  }\n  return h;\n}\n\n/** Sobel a height field into a tangent-space normal map texture. */\nfunction heightToNormalTexture(\n  h: Float32Array,\n  size: number,\n  strength: number,\n): THREE.CanvasTexture {\n  const canvas = document.createElement('canvas');\n  canvas.width = size;\n  canvas.height = size;\n  const ctx = canvas.getContext('2d')!;\n  const img = ctx.createImageData(size, size);\n  const data = img.data;\n  const at = (x: number, y: number) =>\n    h[((y + size) % size) * size + ((x + size) % size)];\n  for (let y = 0; y < size; y++) {\n    for (let x = 0; x < size; x++) {\n      const dx = (at(x + 1, y) - at(x - 1, y)) * strength;\n      const dy = (at(x, y + 1) - at(x, y - 1)) * strength;\n      const inv = 1 / Math.sqrt(dx * dx + dy * dy + 1);\n      const i = (y * size + x) * 4;\n      data[i] = Math.round((-dx * inv * 0.5 + 0.5) * 255);\n      data[i + 1] = Math.round((dy * inv * 0.5 + 0.5) * 255);\n      data[i + 2] = Math.round((inv * 0.5 + 0.5) * 255);\n      data[i + 3] = 255;\n    }\n  }\n  ctx.putImageData(img, 0, 0);\n  const tex = new THREE.CanvasTexture(canvas);\n  tex.wrapS = tex.wrapT = THREE.RepeatWrapping;\n  tex.repeat.set(2, 2);\n  tex.colorSpace = THREE.NoColorSpace;\n  return tex;\n}\n\nexport function makeWeaveNormalMap(\n  size = 512,\n  threads = 64,\n  seed = 1337,\n): THREE.CanvasTexture {\n  const rand = mulberry32(seed);\n  const h = weaveHeight(size, threads, rand);\n  return heightToNormalTexture(h, size, 1.6);\n}\n\n/** Subtle grain map used as roughness variation — keeps the matte finish alive. */\nexport function makeGrainRoughnessMap(\n  size = 256,\n  seed = 4242,\n): THREE.CanvasTexture {\n  const rand = mulberry32(seed);\n  const canvas = document.createElement('canvas');\n  canvas.width = size;\n  canvas.height = size;\n  const ctx = canvas.getContext('2d')!;\n  const img = ctx.createImageData(size, size);\n  const data = img.data;\n  for (let i = 0; i < size * size; i++) {\n    // mid-gray with mild noise; roughnessMap multiplies material.roughness\n    const v = Math.round(215 + (rand() - 0.5) * 70);\n    data[i * 4] = v;\n    data[i * 4 + 1] = v;\n    data[i * 4 + 2] = v;\n    data[i * 4 + 3] = 255;\n  }\n  ctx.putImageData(img, 0, 0);\n  const tex = new THREE.CanvasTexture(canvas);\n  tex.wrapS = tex.wrapT = THREE.RepeatWrapping;\n  tex.repeat.set(4, 4);\n  tex.colorSpace = THREE.NoColorSpace;\n  return tex;\n}\n",
      "type": "registry:ui",
      "target": "components/ui/holo-cloth/textures.ts"
    },
    {
      "path": "registry/new-york/holo-cloth/types.ts",
      "content": "export type HoloClothPreset = 'holo' | 'chrome' | 'black-cloth';\n\nexport type HoloClothQuality = 'high' | 'medium' | 'low';\n\nexport interface HoloClothProps {\n  /** Material preset: iridescent holo foil, mirror chrome, or black cloth. */\n  preset?: HoloClothPreset;\n  /** Optional image URL draped onto the cloth (deforms with the fabric). */\n  image?: string;\n  /** Scene background color; 'transparent' clears it. */\n  background?: string;\n  /** Enable grab-and-drag on the cloth plus orbiting on empty space. */\n  interactive?: boolean;\n  /** Allow scroll-wheel zoom (off by default so embedded demos don't hijack page scroll). */\n  zoom?: boolean;\n  /** Render scale / MSAA / cloth resolution trade-off. */\n  quality?: HoloClothQuality;\n  class?: string;\n}\n\nexport interface HoloClothMaterialBundle {\n  baseColor: string;\n  holoIntensity: number;\n  holoScale: number;\n  bandFreq: number;\n  saturation: number;\n  hueShift: number;\n  sparkle: number;\n  specTint: number;\n  iridescence: number;\n  metalness: number;\n  sheen: number;\n  bump: number;\n  bumpTiling: number;\n  roughness: number;\n  clearcoat: number;\n  coatRoughness: number;\n}\n",
      "type": "registry:ui",
      "target": "components/ui/holo-cloth/types.ts"
    }
  ]
}
