{"version":3,"file":"FlitPhoto.CVIbneMQ.mjs","names":["__esmMin","p","c","init_jsx_runtime","init_framer_DxfB3JJo","addPropertyControls","FlitPhoto","props","src","image","n","steps","bg","position","layers","i","r","blur","a","start","end","b","mask","style","radius","init_FlitPhoto","ControlType"],"sources":["https:/framerusercontent.com/modules/9fqJQPY3J5aoyxXrwWtt/3ZG2CQWzyGJdpMHAnfDQ/FlitPhoto.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Flit Photo — an image that stays sharp at the top and blurs progressively toward the bottom.\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function FlitPhoto(props){const{image,blur,start,end,steps,position,radius=0,style}=props;const src=typeof image===\"string\"?image:image?.src;const n=Math.max(1,Math.round(steps));const bg=src?{backgroundImage:`url(\"${src}\")`,backgroundSize:\"cover\",backgroundPosition:position}:{background:\"#121115\"};const layers=[];for(let i=1;i<=n;i++){// each layer blurs a bit more and starts a bit lower, so the blur ramps smoothly\nconst r=blur*i/n;const a=start+(end-start)*(i-1)/n;const b=start+(end-start)*i/n;const mask=`linear-gradient(to bottom, transparent ${(a*100).toFixed(1)}%, #000 ${(b*100).toFixed(1)}%)`;layers.push(/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:-blur*2,...bg,filter:`blur(${r}px)`,WebkitMaskImage:mask,maskImage:mask}},i));}return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",borderRadius:radius,isolation:\"isolate\",transform:\"translateZ(0)\",WebkitMaskImage:\"-webkit-radial-gradient(white, black)\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,...bg}}),src?layers:null]});}FlitPhoto.defaultProps={blur:20,start:.16,end:1.2,steps:4,position:\"center\",radius:0};addPropertyControls(FlitPhoto,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},blur:{type:ControlType.Number,title:\"Blur\",defaultValue:20,min:0,max:80,step:1,unit:\"px\"},start:{type:ControlType.Number,title:\"Blur starts\",defaultValue:.16,min:0,max:1,step:.01},end:{type:ControlType.Number,title:\"Full blur at\",defaultValue:1.2,min:.1,max:2,step:.01},steps:{type:ControlType.Number,title:\"Smoothness\",defaultValue:4,min:1,max:8,step:1},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:48,step:1,unit:\"px\"},position:{type:ControlType.Enum,title:\"Position\",options:[\"center\",\"top\",\"bottom\",\"left\",\"right\"],defaultValue:\"center\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FlitPhoto\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FlitPhoto.map"],"mappings":"A,8JAIG,SAAwBM,EAAU,EAAM,CAAC,GAAK,CAAC,QAAM,OAAK,QAAM,MAAI,QAAM,WAAS,SAAO,EAAE,SAAOC,EAAYC,EAAI,OAAOC,GAAQ,SAASA,EAAMA,GAAO,IAAUC,EAAE,KAAK,IAAI,EAAE,KAAK,MAAMC,CAAK,CAAC,EAAQC,EAAGJ,EAAI,CAAC,gBAAgB,QAAQA,EAAI,IAAI,eAAe,QAAQ,mBAAmBK,CAAQ,EAAE,CAAC,WAAW,SAAS,EAAQC,EAAO,CAAC,EAAE,IAAI,IAAIC,EAAE,EAAEA,GAAGL,EAAE,IAAI,CACnW,IAAMM,EAAEC,EAAKF,EAAEL,EAAQQ,EAAEC,GAAOC,EAAID,IAAQJ,EAAE,GAAGL,EAAQW,EAAEF,GAAOC,EAAID,GAAOJ,EAAEL,EAAQY,EAAK,2CAA2CJ,EAAE,IAAA,CAAK,QAAQ,CAAC,EAAE,WAAWG,EAAE,IAAA,CAAK,QAAQ,CAAC,EAAE,I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