{"version":3,"file":"VIPSticky.CkVGSxvv.mjs","names":["React.useState","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","_e","c","init_jsx_runtime","ce","addPropertyControls","RenderTarget","init_framer_DKgW_P28","ControlType","VIPSticky","props","onCanvas","show","setShow","raf","check","a","showAfterId","b","hideWhenId","passed","atContact","onScroll","visible","style","fill","textColor","font","label","init_VIPSticky"],"sources":["https:/framerusercontent.com/modules/yh6IiBcP6AIEWTex33TU/bKPiDZfWEHDDhWA37axH/VIPSticky.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * VIP sticky contact button. Hidden until the visitor scrolls past the first in-page contact button,\n * hidden again while the contact section is on screen, so it never sits on top of content that matters.\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function VIPSticky(props){const{label,href,fill,textColor,font,showAfterId,hideWhenId,style}=props;const onCanvas=RenderTarget.current()===RenderTarget.canvas;const[show,setShow]=React.useState(false);React.useEffect(()=>{if(onCanvas||typeof window===\"undefined\")return;let raf=0;const check=()=>{raf=0;const a=showAfterId?document.getElementById(showAfterId):null;const b=hideWhenId?document.getElementById(hideWhenId):null;const passed=a?a.getBoundingClientRect().bottom<0:window.scrollY>600;const atContact=b?b.getBoundingClientRect().top<window.innerHeight-40:false;setShow(passed&&!atContact);};const onScroll=()=>{if(!raf)raf=requestAnimationFrame(check);};check();window.addEventListener(\"scroll\",onScroll,{passive:true});window.addEventListener(\"resize\",onScroll);return()=>{window.removeEventListener(\"scroll\",onScroll);window.removeEventListener(\"resize\",onScroll);if(raf)cancelAnimationFrame(raf);};},[showAfterId,hideWhenId,onCanvas]);const visible=onCanvas||show;return /*#__PURE__*/_jsx(\"a\",{href:href,\"aria-hidden\":!visible,tabIndex:visible?0:-1,style:{...style,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textDecoration:\"none\",boxSizing:\"border-box\",background:fill,color:textColor,borderRadius:999,fontFamily:font?.fontFamily||\"inherit\",fontWeight:600,fontSize:16,letterSpacing:\"0.01em\",boxShadow:\"0 10px 30px rgba(42,20,36,0.35)\",opacity:visible?1:0,transform:visible?\"translateY(0)\":\"translateY(140%)\",pointerEvents:visible?\"auto\":\"none\",transition:\"opacity .25s ease, transform .35s cubic-bezier(.2,.8,.2,1)\"},children:label});}VIPSticky.defaultProps={label:\"Book her\",href:\"#contact\",fill:\"#A99BFF\",textColor:\"#2A1424\",showAfterId:\"book-top\",hideWhenId:\"contact\"};addPropertyControls(VIPSticky,{label:{type:ControlType.String,title:\"Label\"},href:{type:ControlType.String,title:\"Link\"},fill:{type:ControlType.Color,title:\"Fill\"},textColor:{type:ControlType.Color,title:\"Text\"},font:{type:ControlType.Font,title:\"Font\",controls:\"basic\"},showAfterId:{type:ControlType.String,title:\"Show after id\"},hideWhenId:{type:ControlType.String,title:\"Hide at id\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VIPSticky\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VIPSticky.map"],"mappings":"A,uMAKG,SAAwBa,EAAU,EAAM,CAAC,GAAK,CAAC,QAAM,OAAK,OAAK,YAAU,OAAK,cAAY,aAAW,SAAOC,EAAYC,EAASL,EAAa,QAAQ,IAAIA,EAAa,OAAY,CAACM,EAAKC,GAASjB,EAAe,EAAK,EAAEQ,MAAoB,CAAC,GAAGO,GAAiBX,IAAS,OAAY,OAAO,IAAIc,EAAI,EAAQC,MAAU,CAAC,EAAI,EAAE,IAAMC,EAAEC,EAAY,SAAS,eAAeA,CAAW,EAAE,KAAWC,EAAEC,EAAW,SAAS,eAAeA,CAAU,EAAE,KAAWC,EAAOJ,EAAEA,EAAE,sBAAsB,CAAC,CAAC,OAAO,EA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