{
  "version": 3,
  "sources": ["ssg:https://ga.jspm.io/npm:@motionone/utils@10.14.0/dist/index.es.js", "ssg:https://ga.jspm.io/npm:@motionone/easing@10.13.1/dist/index.es.js", "ssg:https://framerusercontent.com/modules/cKGD16u2MGB7MfqfVXFp/wiztTCbXokZrMicHAmZc/Grain.js"],
  "sourcesContent": ["function addUniqueItem(t,e){-1===t.indexOf(e)&&t.push(e)}function removeItem(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const clamp=(t,e,n)=>Math.min(Math.max(n,t),e);const t={duration:.3,delay:0,endDelay:0,repeat:0,easing:\"ease\"};const isNumber=t=>\"number\"===typeof t;const isEasingList=t=>Array.isArray(t)&&!isNumber(t[0]);const wrap=(t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t};function getEasingForSegment(t,e){return isEasingList(t)?t[wrap(0,t.length,e)]:t}const mix=(t,e,n)=>-n*t+n*e+t;const noop=()=>{};const noopReturn=t=>t;const progress=(t,e,n)=>e-t===0?1:(n-t)/(e-t);function fillOffset(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const s=progress(0,e,o);t.push(mix(n,1,s))}}function defaultOffset(t){const e=[0];fillOffset(e,t-1);return e}function interpolate(t,e=defaultOffset(t.length),n=noopReturn){const o=t.length;const s=o-e.length;s>0&&fillOffset(e,s);return s=>{let f=0;for(;f<o-2;f++)if(s<e[f+1])break;let r=clamp(0,1,progress(e[f],e[f+1],s));const c=getEasingForSegment(n,f);r=c(r);return mix(t[f],t[f+1],r)}}const isCubicBezier=t=>Array.isArray(t)&&isNumber(t[0]);const isEasingGenerator=t=>\"object\"===typeof t&&Boolean(t.createAnimation);const isFunction=t=>\"function\"===typeof t;const isString=t=>\"string\"===typeof t;const e={ms:t=>1e3*t,s:t=>t/1e3};\n/*\n  Convert velocity into velocity per second\n\n  @param [number]: Unit per frame\n  @param [number]: Frame duration in ms\n*/function velocityPerSecond(t,e){return e?t*(1e3/e):0}export{addUniqueItem,clamp,defaultOffset,t as defaults,fillOffset,getEasingForSegment,interpolate,isCubicBezier,isEasingGenerator,isEasingList,isFunction,isNumber,isString,mix,noop,noopReturn,progress,removeItem,e as time,velocityPerSecond,wrap};\n\n//# sourceMappingURL=index.es.js.map", "import{noopReturn as t,clamp as n}from\"@motionone/utils\";const calcBezier=(t,n,e)=>(((1-3*e+3*n)*t+(3*e-6*n))*t+3*n)*t;const e=1e-7;const i=12;function binarySubdivide(t,n,o,r,c){let u;let a;let s=0;do{a=n+(o-n)/2;u=calcBezier(a,r,c)-t;u>0?o=a:n=a}while(Math.abs(u)>e&&++s<i);return a}function cubicBezier(n,e,i,o){if(n===e&&i===o)return t;const getTForX=t=>binarySubdivide(t,0,1,n,i);return t=>0===t||1===t?t:calcBezier(getTForX(t),e,o)}const steps=(t,e=\"end\")=>i=>{i=\"end\"===e?Math.min(i,.999):Math.max(i,.001);const o=i*t;const r=\"end\"===e?Math.floor(o):Math.ceil(o);return n(0,1,r/t)};export{cubicBezier,steps};\n\n//# sourceMappingURL=index.es.js.map", "import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType, RenderTarget } from \"framer\";\nimport { motion } from \"framer-motion\";\nimport { steps } from \"@motionone/easing\"; /**\n                                           * @framerIntrinsicWidth 100\n                                           * @framerIntrinsicHeight 100\n                                           * @framerDisableUnlink\n                                           *\n                                           * @framerSupportedLayoutWidth fixed\n                                           * @framerSupportedLayoutHeight fixed\n                                           */\nexport default function Grain(props) {\n  const {\n    opacity,\n    style\n  } = props;\n  const keyframesX = [\"0%\", \"-5%\", \"-15%\", \"7%\", \"-5%\", \"-15%\", \"15%\", \"0%\", \"3%\", \"-10%\"];\n  const keyframesY = [\"0%\", \"-10%\", \"5%\", \"-25%\", \"25%\", \"10%\", \"0%\", \"15%\", \"35%\", \"10%\"];\n  const isCanvas = RenderTarget.current() === RenderTarget.canvas;\n  return /*#__PURE__*/_jsx(\"div\", {\n    style: {\n      width: \"100%\",\n      height: \"100%\",\n      position: \"relative\",\n      overflow: \"hidden\"\n    },\n    children: /*#__PURE__*/_jsx(motion.div, {\n      style: {\n        ...containerStyle,\n        opacity: opacity,\n        inset: isCanvas ? 0 : \"-200%\",\n        width: isCanvas ? \"100%\" : \"400%\",\n        height: isCanvas ? \"100%\" : \"400%\",\n        position: \"absolute\"\n      },\n      animate: !isCanvas && {\n        x: keyframesX,\n        y: keyframesY\n      },\n      transition: {\n        ease: steps(10, \"start\"),\n        repeat: Infinity,\n        duration: 8\n      }\n    })\n  });\n}\n;\nGrain.defaultProps = {\n  opacity: .5\n};\naddPropertyControls(Grain, {\n  opacity: {\n    title: \"Opacity\",\n    type: ControlType.Number,\n    step: .1,\n    displayStepper: true,\n    max: 1,\n    min: 0\n  }\n});\nconst containerStyle = {\n  backgroundSize: \"256px 256px\",\n  backgroundRepeat: \"repeat\",\n  background: \"url('https://framerusercontent.com/images/rR6HYXBrMmX4cRpXfXUOvpvpB0.png')\"\n};\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"default\": {\n      \"type\": \"reactComponent\",\n      \"name\": \"Grain\",\n      \"slots\": [],\n      \"annotations\": {\n        \"framerSupportedLayoutHeight\": \"fixed\",\n        \"framerIntrinsicHeight\": \"100\",\n        \"framerContractVersion\": \"1\",\n        \"framerDisableUnlink\": \"*\",\n        \"framerIntrinsicWidth\": \"100\",\n        \"framerSupportedLayoutWidth\": \"fixed\"\n      }\n    },\n    \"__FramerMetadata__\": {\n      \"type\": \"variable\"\n    }\n  }\n};\n//# sourceMappingURL=./Grain.map"],
  "mappings": "kGAA2H,IAAMA,EAAM,CAACC,EAAEC,EAAEC,IAAI,KAAK,IAAI,KAAK,IAAIA,EAAEF,CAAC,EAAEC,CAAC,ECA8Q,IAAME,EAAM,CAACC,EAAEC,EAAE,QAAQC,GAAG,CAACA,EAAUD,IAAR,MAAU,KAAK,IAAIC,EAAE,IAAI,EAAE,KAAK,IAAIA,EAAE,IAAI,EAAE,IAAMC,EAAED,EAAEF,EAAQI,EAAUH,IAAR,MAAU,KAAK,MAAME,CAAC,EAAE,KAAK,KAAKA,CAAC,EAAE,OAAOE,EAAE,EAAE,EAAED,EAAEJ,CAAC,CAAC,ECW5jB,SAARM,EAAuBC,EAAO,CACnC,GAAM,CACJ,QAAAC,EACA,MAAAC,CACF,EAAIF,EACEG,EAAa,CAAC,KAAM,MAAO,OAAQ,KAAM,MAAO,OAAQ,MAAO,KAAM,KAAM,MAAM,EACjFC,EAAa,CAAC,KAAM,OAAQ,KAAM,OAAQ,MAAO,MAAO,KAAM,MAAO,MAAO,KAAK,EACjFC,EAAWC,EAAa,QAAQ,IAAMA,EAAa,OACzD,OAAoBC,EAAK,MAAO,CAC9B,MAAO,CACL,MAAO,OACP,OAAQ,OACR,SAAU,WACV,SAAU,QACZ,EACA,SAAuBA,EAAKC,EAAO,IAAK,CACtC,MAAO,CACL,GAAGC,EACH,QAASR,EACT,MAAOI,EAAW,EAAI,QACtB,MAAOA,EAAW,OAAS,OAC3B,OAAQA,EAAW,OAAS,OAC5B,SAAU,UACZ,EACA,QAAS,CAACA,GAAY,CACpB,EAAGF,EACH,EAAGC,CACL,EACA,WAAY,CACV,KAAMM,EAAM,GAAI,OAAO,EACvB,OAAQ,IACR,SAAU,CACZ,CACF,CAAC,CACH,CAAC,CACH,CAEAX,EAAM,aAAe,CACnB,QAAS,EACX,EACAY,EAAoBZ,EAAO,CACzB,QAAS,CACP,MAAO,UACP,KAAMa,EAAY,OAClB,KAAM,GACN,eAAgB,GAChB,IAAK,EACL,IAAK,CACP,CACF,CAAC,EACD,IAAMH,EAAiB,CACrB,eAAgB,cAChB,iBAAkB,SAClB,WAAY,4EACd",
  "names": ["clamp", "t", "e", "n", "steps", "t", "e", "i", "o", "r", "clamp", "Grain", "props", "opacity", "style", "keyframesX", "keyframesY", "isCanvas", "RenderTarget", "p", "motion", "containerStyle", "steps", "addPropertyControls", "ControlType"]
}
