{"version":3,"file":"Fc3uPsgUk.64f6O2b-.mjs","names":["useState","useCallback","x","y","useMemo"],"sources":["https:/framerusercontent.com/modules/HqceKg9AbAiYoH8uDLLF/PkDlX73zVXCXBZIuT2Qw/GlassBackground.js","https:/framerusercontent.com/modules/P7dNaiRUXC9OFxuwYKeR/A5Wh2lNLJAqdXOwYAUMo/Fc3uPsgUk.js"],"sourcesContent":["// GlassBackground: A glassmorphic button with animated highlight/reflection, hover effect, and configurable light direction\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useMemo,useCallback,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerIntrinsicWidth 160\n * @framerIntrinsicHeight 48\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function GlassBackground(props){const{background,borderRadius,blur,lightDirection,borderThickness,borderTop,borderRight,borderBottom,borderLeft,style}=props;const isStatic=useIsStaticRenderer();const[mouse,setMouse]=useState({x:.5,y:.5});// Light direction mapping to gradient angles and highlight positions\nconst lightMap={\"top-left\":{angle:135,x:\"10%\",y:\"10%\"},\"top\":{angle:180,x:\"50%\",y:\"8%\"},\"top-right\":{angle:225,x:\"90%\",y:\"10%\"},\"right\":{angle:270,x:\"92%\",y:\"50%\"},\"bottom-right\":{angle:315,x:\"90%\",y:\"90%\"},\"bottom\":{angle:0,x:\"50%\",y:\"92%\"},\"bottom-left\":{angle:45,x:\"10%\",y:\"90%\"},\"left\":{angle:90,x:\"8%\",y:\"50%\"}};const{angle,x,y}=lightMap[lightDirection];// Mouse move handler for light following\nconst handleMouseMove=useCallback(e=>{const rect=e.currentTarget.getBoundingClientRect();// Use pageX/pageY for better accuracy in Framer canvas\nlet clientX,clientY;if(e.touches&&e.touches.length>0){clientX=e.touches[0].clientX;clientY=e.touches[0].clientY;}else{clientX=e.clientX;clientY=e.clientY;}// Calculate mouse position relative to center for light direction\nconst x=(clientX-rect.left)/rect.width;const y=(clientY-rect.top)/rect.height;startTransition(()=>setMouse({x:Math.max(0,Math.min(1,x)),y:Math.max(0,Math.min(1,y))}));},[]);// Highlight and reflection styles\nconst highlightStyle=useMemo(()=>{// Parallax offset for highlight\n// Light follows mouse: direction is from center to mouse\nconst dx=mouse.x-.5;const dy=mouse.y-.5;const offsetX=dx*16;const offsetY=dy*16;return{position:\"absolute\",left:`calc(${x} + ${offsetX}px)`,top:`calc(${y} + ${offsetY}px)`,width:\"60%\",height:\"30%\",background:\"linear-gradient(120deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.12) 100%)\",borderRadius:\"50%\",filter:\"blur(14px)\",opacity:.5,pointerEvents:\"none\",transform:\"translate(-50%, -50%)\",transition:\"all 0.32s cubic-bezier(.4,0,.2,1)\",zIndex:2};},[x,y,mouse]);const reflectionStyle=useMemo(()=>{// Parallax offset for reflection\n// Reflection follows mouse, but with smaller offset\nconst dx=mouse.x-.5;const dy=mouse.y-.5;const offsetX=dx*8;const offsetY=dy*8;return{position:\"absolute\",left:`calc(${x} + ${offsetX}px)`,top:`calc(${y} + ${offsetY}px)`,width:\"30%\",height:\"14%\",background:\"linear-gradient(120deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.04) 100%)\",borderRadius:\"50%\",filter:\"blur(7px)\",opacity:.28,pointerEvents:\"none\",transform:\"translate(-50%, -50%)\",transition:\"all 0.32s cubic-bezier(.4,0,.2,1)\",zIndex:1};},[x,y,mouse]);// Glassy background style\nconst glassStyle=useMemo(()=>({position:\"relative\",width:\"100%\",height:\"100%\",borderRadius,background:`linear-gradient(${angle}deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 100%), ${background}`,boxShadow:\"0 6px 18px 0 rgba(0,0,0,0.10)\",backdropFilter:`blur(${blur}px) saturate(1.2)`,WebkitBackdropFilter:`blur(${blur}px) saturate(1.2)`,boxSizing:\"border-box\",overflow:\"hidden\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",...style}),[angle,background,borderRadius,blur,style]);// Accessibility: role=button, tabIndex=0\nreturn /*#__PURE__*/_jsxs(\"div\",{style:glassStyle,onMouseMove:isStatic?undefined:handleMouseMove,onTouchMove:isStatic?undefined:handleMouseMove,children:[/*#__PURE__*/_jsx(\"div\",{style:highlightStyle}),/*#__PURE__*/_jsx(\"div\",{style:reflectionStyle}),/*#__PURE__*/_jsx(\"div\",{style:{pointerEvents:\"none\",position:\"absolute\",inset:0,borderRadius,borderTop:borderTop?`${borderThickness}px solid rgba(255,255,255,0.22)`:\"none\",borderRight:borderRight?`${borderThickness}px solid rgba(255,255,255,0.22)`:\"none\",borderBottom:borderBottom?`${borderThickness}px solid rgba(255,255,255,0.22)`:\"none\",borderLeft:borderLeft?`${borderThickness}px solid rgba(255,255,255,0.22)`:\"none\",boxShadow:\"inset 0 1px 8px 0 rgba(255,255,255,0.10), 0 1px 8px 0 rgba(0,0,0,0.06)\",zIndex:4}})]});}addPropertyControls(GlassBackground,{background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF1A\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:16,min:0,max:48},borderThickness:{type:ControlType.Number,title:\"Border\",defaultValue:1,min:0,max:10,step:.5},borderTop:{type:ControlType.Boolean,title:\"Top\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},borderRight:{type:ControlType.Boolean,title:\"Right\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},borderBottom:{type:ControlType.Boolean,title:\"Bottom\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},borderLeft:{type:ControlType.Boolean,title:\"Left\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},blur:{type:ControlType.Number,title:\"Blur\",defaultValue:9,min:4,max:32,step:1},lightDirection:{type:ControlType.Enum,title:\"Light Dir\",options:[\"top-left\",\"top\",\"top-right\",\"right\",\"bottom-right\",\"bottom\",\"bottom-left\",\"left\"],optionTitles:[\"Top Left\",\"Top\",\"Top Right\",\"Right\",\"Bottom Right\",\"Bottom\",\"Bottom Left\",\"Left\"],defaultValue:\"top-left\",displaySegmentedControl:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GlassBackground\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"48\",\"framerIntrinsicWidth\":\"160\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GlassBackground.map","// Generated by Framer (d369d66)\nimport{fontStore}from\"framer\";fontStore.loadFonts([]);export const fonts=[{explicitInter:true,fonts:[]}];export const css=[\".framer-r4sK7 .framer-styles-preset-3g5vw4:not(.rich-text-wrapper), .framer-r4sK7 .framer-styles-preset-3g5vw4.rich-text-wrapper a { --framer-link-current-text-color: var(--token-2116835f-eb87-454b-b6b2-e9e1351f2533, #ffffff); --framer-link-hover-text-color: var(--token-2116835f-eb87-454b-b6b2-e9e1351f2533, #ffffff); --framer-link-text-color: rgba(255, 255, 255, 0.75); }\"];export const className=\"framer-r4sK7\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"qNAOG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,aAAW,eAAa,OAAK,iBAAe,kBAAgB,YAAU,cAAY,eAAa,aAAW,SAAO,EAAY,EAAS,GAAqB,CAAM,CAAC,EAAM,GAAUA,EAAS,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CACmE,CAAC,QAAM,IAAE,KAA5T,CAAC,WAAW,CAAC,MAAM,IAAI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