{"version":3,"file":"CloseChatButton.kNm5q7RH.mjs","names":["React.useCallback"],"sources":["https:/framerusercontent.com/modules/Pbpdursj58AGbGRYpIub/vBNL6yZbbGVMqDkmORxx/CloseChatButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";export default function CloseChatButton({size=18,tapTarget=44,radius=9999,ringWidth=2,ringSpeed=2.4,pulseEvery=3.2,bg=\"rgba(255,0,120,0.95)\",ringFrom=\"#ff00ff\",ringTo=\"#00fff0\",glow=\"rgba(255,0,180,0.65)\",top=16,right=16,showSparkles=true}){const handleClose=React.useCallback(e=>{e?.preventDefault?.();e?.stopPropagation?.();const inApp=/gonative|gonativeapp|reactnativewebview/i.test(navigator.userAgent);if(inApp){window.location.href=\"gonative://navigation/pop\";setTimeout(()=>{if(history.length>1)history.back();else window.location.replace(\"https://www.vibyfy.com/\");},150);}else{if(history.length>1)history.back();else window.close();}},[]);// Add keyframes once\nReact.useEffect(()=>{if(document.getElementById(\"vf-close-micro-styles\"))return;const css=`\n    @keyframes vfSpin { to { transform: rotate(360deg); } }\n    @keyframes vfHalo { 0%{ transform:scale(1); opacity:.6 } 70%{ transform:scale(2.4); opacity:0 } 100%{ transform:scale(2.6); opacity:0 } }\n    .vf-ring {\n      position:absolute; inset:0; border-radius:inherit;\n      background: conic-gradient(${ringFrom}, ${ringTo}, ${ringFrom});\n      -webkit-mask: \n        linear-gradient(#000 0 0) content-box, \n        linear-gradient(#000 0 0);\n      -webkit-mask-composite: xor; mask-composite: exclude;\n      animation: vfSpin linear infinite;\n    }\n    .vf-halo {\n      position:absolute; inset:0; border-radius:9999px;\n      box-shadow: 0 0 18px ${glow}, 0 0 36px ${glow};\n      animation: vfHalo ease-out infinite;\n      pointer-events:none;\n    }\n    .vf-spark { position:absolute; width:3px; height:3px; border-radius:9999px; background:white; opacity:.9; }\n    `;const el=document.createElement(\"style\");el.id=\"vf-close-micro-styles\";el.textContent=css;document.head.appendChild(el);},[glow,ringFrom,ringTo]);// Precompute times for pulse loop (subtle… then bloom… back to idle)\nconst pulse={scale:[1,1.06,1,1,1.18,1],transition:{duration:pulseEvery,repeat:Infinity,ease:\"easeInOut\",times:[0,.18,.35,.6,.75,1]}};// Sparkle positions (fixed offsets around core)\nconst sparks=[{x:-8,y:-10,d:0},{x:10,y:-6,d:.12},{x:-11,y:8,d:.24},{x:7,y:11,d:.36}];return /*#__PURE__*/_jsxs(motion.button,{type:\"button\",\"aria-label\":\"Close\",title:\"Close\",onClick:handleClose,whileTap:{scale:.9},style:{position:\"fixed\",top,right,zIndex:9999,width:tapTarget,height:tapTarget,display:\"grid\",placeItems:\"center\",background:\"transparent\",border:\"none\",outline:\"none\",cursor:\"pointer\",WebkitTapHighlightColor:\"transparent\"},children:[/*#__PURE__*/_jsx(\"div\",{className:\"vf-halo\",style:{width:size,height:size,filter:`drop-shadow(0 0 10px ${glow})`,animationDuration:`${pulseEvery}s`}}),/*#__PURE__*/_jsxs(motion.div,{animate:pulse,style:{width:size,height:size,borderRadius:radius,position:\"relative\",boxSizing:\"border-box\",background:bg,color:\"#fff\",display:\"grid\",placeItems:\"center\",filter:`drop-shadow(0 0 6px ${glow}) drop-shadow(0 0 14px ${glow})`},children:[ringWidth>0&&/*#__PURE__*/_jsx(\"div\",{className:\"vf-ring\",style:{padding:ringWidth,animationDuration:`${ringSpeed}s`}}),/*#__PURE__*/_jsx(\"svg\",{width:Math.max(8,Math.round(size*.55)),height:Math.max(8,Math.round(size*.55)),viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",style:{zIndex:2},children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 6 L18 18 M18 6 L6 18\",stroke:\"white\",strokeWidth:\"2.4\",strokeLinecap:\"round\"})})]}),showSparkles&&sparks.map((s,i)=>/*#__PURE__*/_jsx(motion.span,{className:\"vf-spark\",initial:{opacity:0,scale:.6},animate:{opacity:[0,1,0],scale:[.6,1,.6],x:[0,s.x,0],y:[0,s.y,0],transition:{duration:pulseEvery,delay:s.d,repeat:Infinity,ease:\"easeInOut\"}}},i))]});}// Framer controls\naddPropertyControls(CloseChatButton,{size:{type:ControlType.Number,title:\"Core Size\",defaultValue:18,min:10,max:48,step:1},tapTarget:{type:ControlType.Number,title:\"Tap Target\",defaultValue:44,min:32,max:60,step:1},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:9999,min:0,max:60,step:1},ringWidth:{type:ControlType.Number,title:\"Ring (px)\",defaultValue:2,min:0,max:10,step:1},ringSpeed:{type:ControlType.Number,title:\"Ring Speed\",defaultValue:2.4,min:.6,max:8,step:.1},pulseEvery:{type:ControlType.Number,title:\"Pulse Loop (s)\",defaultValue:3.2,min:1.5,max:8,step:.1},bg:{type:ControlType.Color,title:\"Fill\",defaultValue:\"rgba(255,0,120,0.95)\"},ringFrom:{type:ControlType.Color,title:\"Ring From\",defaultValue:\"#ff00ff\"},ringTo:{type:ControlType.Color,title:\"Ring To\",defaultValue:\"#00fff0\"},glow:{type:ControlType.Color,title:\"Glow\",defaultValue:\"rgba(255,0,180,0.65)\"},top:{type:ControlType.Number,title:\"Top\",defaultValue:16,min:0,max:200,step:1},right:{type:ControlType.Number,title:\"Right\",defaultValue:16,min:0,max:200,step:1},showSparkles:{type:ControlType.Boolean,title:\"Sparkles\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CloseChatButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CloseChatButton.map"],"mappings":"8PAA2K,SAAwB,EAAgB,CAAC,OAAK,GAAG,YAAU,GAAG,SAAO,KAAK,YAAU,EAAE,YAAU,IAAI,aAAW,IAAI,KAAG,uBAAuB,WAAS,UAAU,SAAO,UAAU,OAAK,uBAAuB,MAAI,GAAG,QAAM,GAAG,eAAa,IAAM,CAAC,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