{"version":3,"file":"StickyBookBar.DpDM48Oa.mjs","names":["Button","React.useContext","React.useMemo","React.Fragment","React.forwardRef","useRef","React.useId","useState","useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/r7tY0107K2zr6wCk250u/WOb80xwQH9qNnHJsP0gS/wH20iB4Y9.js","https:/framerusercontent.com/modules/I1dlihJ3hQx1aHogeYO6/SECoRtZyjy2r3WqWbESp/StickyBookBar.js"],"sourcesContent":["// Generated by Framer (78ccf22)\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addFonts,ComponentViewportProvider,cx,forwardLoader,getFonts,SmartComponentScopedContainer,useComponentViewport,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";import Button from\"https://framerusercontent.com/modules/u5u0RT76YwlJb0ZUT4hV/3wseRC40nCqJ1m21BDS9/l_CSzh0Vw.js\";const ButtonFonts=getFonts(Button);const serializationHash=\"framer-EUA72\";const variantClassNames={reMajFHAl:\"framer-v-t53yyl\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const transition1={bounce:.2,delay:0,duration:.4,type:\"spring\"};const matchVariant=(...args)=>{for(const arg of args){if(arg&&typeof arg===\"string\")return arg;}return undefined;};const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value??config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const Variants=motion.create(React.Fragment);const getProps=({height,id,width,...props})=>{return{...props};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const fallbackRef=useRef(null);const refBinding=ref??fallbackRef;const defaultLayoutId=React.useId();const{activeLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({defaultVariant:\"reMajFHAl\",ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId??defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsxs(motion.div,{...restProps,...gestureHandlers,className:cx(scopingClassNames,\"framer-t53yyl\",className,classNames),\"data-framer-name\":\"Variant 1\",layoutDependency:layoutDependency,layoutId:\"reMajFHAl\",ref:refBinding,style:{backgroundColor:\"var(--token-979c4f7f-50cc-4a0e-bb23-e44293e9da0a, rgb(255, 255, 255))\",...style},children:[/*#__PURE__*/_jsx(ComponentViewportProvider,{height:39,width:`max((${componentViewport?.width||\"100vw\"} - 56px) / 2, 1px)`,y:(componentViewport?.y||0)+(16+((componentViewport?.height||71)-32-39)/2),children:/*#__PURE__*/_jsx(SmartComponentScopedContainer,{className:\"framer-qvcosf-container\",layoutDependency:layoutDependency,layoutId:\"TwrYurjEO-container\",nodeId:\"TwrYurjEO\",rendersWithMotion:true,scopeId:\"wH20iB4Y9\",children:/*#__PURE__*/_jsx(Button,{dOlEDctIq:\"https://donwoodfootclinic.janeapp.com/\",height:\"100%\",hOfkYykJP:\"var(--token-adad57cf-ee1c-45aa-ab22-a56472af4da7, rgb(53, 96, 91))\",id:\"TwrYurjEO\",layoutId:\"TwrYurjEO\",style:{width:\"100%\"},TWNklkvk5:\"Book Appointment\",variant:matchVariant(\"XGgsh2T2D\"),width:\"100%\"})})}),/*#__PURE__*/_jsx(ComponentViewportProvider,{height:39,width:`max((${componentViewport?.width||\"100vw\"} - 56px) / 2, 1px)`,y:(componentViewport?.y||0)+(16+((componentViewport?.height||71)-32-39)/2),children:/*#__PURE__*/_jsx(SmartComponentScopedContainer,{className:\"framer-1tqss49-container\",layoutDependency:layoutDependency,layoutId:\"xQcisHQxA-container\",nodeId:\"xQcisHQxA\",rendersWithMotion:true,scopeId:\"wH20iB4Y9\",children:/*#__PURE__*/_jsx(Button,{dOlEDctIq:\"tel:+14164451414\",height:\"100%\",hOfkYykJP:\"rgb(44, 91, 37)\",id:\"xQcisHQxA\",layoutId:\"xQcisHQxA\",style:{width:\"100%\"},TWNklkvk5:\"(416) 445-1414\",variant:matchVariant(\"PZIiWQH6g\"),width:\"100%\"})})})]})})})});});const css=[\".framer-EUA72.framer-1fnyl6m, .framer-EUA72 .framer-1fnyl6m { display: block; }\",\".framer-EUA72.framer-t53yyl { align-content: center; align-items: center; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 16px; height: min-content; justify-content: flex-start; overflow: var(--overflow-clip-fallback, clip); padding: 16px 20px 16px 20px; position: relative; width: 560px; }\",\".framer-EUA72 .framer-qvcosf-container, .framer-EUA72 .framer-1tqss49-container { flex: 1 0 0px; height: auto; position: relative; width: 1px; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 71\n * @framerIntrinsicWidth 560\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"auto\"]}}}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const FramerwH20iB4Y9=withCSS(Component,css,\"framer-EUA72\");export default FramerwH20iB4Y9;FramerwH20iB4Y9.displayName=\"Sticky Booking CTA\";FramerwH20iB4Y9.defaultProps={height:71,width:560};addFonts(FramerwH20iB4Y9,[{explicitInter:true,fonts:[]},...ButtonFonts],{supportsExplicitInterCodegen:true});FramerwH20iB4Y9.loader={load:(props,context)=>{const locale=context.locale;return Promise.allSettled([forwardLoader(Button,{},context)]);}};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FramerwH20iB4Y9\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"560\",\"framerColorSyntax\":\"true\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"auto\\\"]}}}\",\"framerComponentViewportWidth\":\"true\",\"framerContractVersion\":\"1\",\"framerImmutableVariables\":\"true\",\"framerDisplayContentsDiv\":\"false\",\"framerIntrinsicHeight\":\"71\",\"framerAutoSizeImages\":\"true\"}},\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./wH20iB4Y9.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useEffect,useRef,useState}from\"react\";const SCROLL_THRESHOLD=280;// The chat widget (dfc-chatbot) reads this custom property off <html> and lifts\n// its bubble by that many pixels. We publish exactly how much of the screen\n// bottom the revealed bar covers — no gap of our own, because the widget already\n// holds the bubble 16px off the bottom and that margin becomes the gap. The\n// property is REMOVED whenever nothing is revealed, so the bubble drops back to\n// the default position it had before any of this existed.\nconst CHAT_OFFSET_VAR=\"--dfc-cta-offset\";// Backstop for a nonsense measurement — better a bubble overlapping the bar than\n// one stranded up by the header. (The widget clamps at 180px on its side too.)\nconst MAX_LIFT=160;// Module scope is shared by every element wearing this override, so if the\n// override is on more than one bar (Book + Call) they can't fight over the\n// variable — the bubble clears whichever is tallest.\nconst lifts=new Map;function republish(){const root=document.documentElement;let tallest=0;lifts.forEach(lift=>{if(lift>tallest)tallest=lift;});if(tallest>0){root.style.setProperty(CHAT_OFFSET_VAR,`${Math.round(tallest)}px`);}else{root.style.removeProperty(CHAT_OFFSET_VAR);}}export function withScrollReveal(Component){return /*#__PURE__*/forwardRef(function WithScrollReveal(props,ref){const[isVisible,setIsVisible]=useState(false);const nodeRef=useRef(null);// Keep our own handle on the DOM node while still honouring whatever ref\n// Framer passed down.\nconst setRefs=useCallback(node=>{nodeRef.current=node;if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;},[ref]);useEffect(()=>{if(typeof window===\"undefined\")return;function handleScroll(){const shouldShow=window.scrollY>SCROLL_THRESHOLD;startTransition(()=>setIsVisible(shouldShow));}handleScroll();window.addEventListener(\"scroll\",handleScroll,{passive:true});return()=>window.removeEventListener(\"scroll\",handleScroll);},[]);useEffect(()=>{const node=nodeRef.current;if(typeof window===\"undefined\"||!node)return;function forget(){lifts.delete(node);republish();}// Hidden bars still occupy the layout (we fade with opacity), so they\n// must not lift the bubble.\nif(!isVisible){forget();return forget;}let frame=0;function measure(){frame=0;const rect=node.getBoundingClientRect();// Two readings, because neither is trustworthy alone: height\n// over-reports when safe-area padding hangs below the viewport,\n// and (viewport bottom - top) blows up if the bar scrolls away\n// upward. The smaller is what actually covers the screen bottom.\nconst lift=Math.min(rect.height,window.innerHeight-rect.top,MAX_LIFT);lifts.set(node,Math.max(0,lift));republish();}// Coalesce to one layout read per frame — this runs on every scroll.\nfunction schedule(){if(!frame)frame=requestAnimationFrame(measure);}measure();// ResizeObserver keeps the bubble glued to the bar if its height ever\n// changes (label wraps to two lines, bigger font, another button).\n// Scroll/resize matter because iOS changes innerHeight when it\n// collapses its toolbar.\nconst observer=typeof ResizeObserver!==\"undefined\"?new ResizeObserver(schedule):null;observer?.observe(node);window.addEventListener(\"scroll\",schedule,{passive:true});window.addEventListener(\"resize\",schedule);window.addEventListener(\"orientationchange\",schedule);return()=>{if(frame)cancelAnimationFrame(frame);observer?.disconnect();window.removeEventListener(\"scroll\",schedule);window.removeEventListener(\"resize\",schedule);window.removeEventListener(\"orientationchange\",schedule);forget();};},[isVisible]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props,style:{...props.style,opacity:isVisible?1:0,pointerEvents:isVisible?\"auto\":\"none\",transition:\"opacity 0.3s ease\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withScrollReveal\":{\"type\":\"reactHoc\",\"name\":\"withScrollReveal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StickyBookBar.map"],"mappings":"ogBACwD,IAA0K,IAAkE,IAA4B,IAA2I,EAAO,EAAY,EAASA,CAAM,EAAQ,EAAkB,eAAqB,EAAkB,CAAC,UAAU,iBAAiB,EAA+L,EAAY,CAAC,OAAO,GAAG,MAAM,EAAE,SAAS,GAAG,KAAK,QAAQ,EAAQ,GAAc,GAAG,IAAO,CAAC,IAAI,IAAM,KAAO,EAAM,GAAG,GAAK,OAAO,GAAM,SAAS,OAAO,CAAsB,EAAQ,GAAY,CAAC,QAAM,cAAY,CAAC,IAAM,EAAOC,EAAiB,CAAmB,EAAQ,EAAW,GAAO,EAAO,WAAiB,EAAaC,OAAmB,CAAC,GAAG,EAAO,YAAU,GAAG,CAAC,KAAK,UAAU,CAAU,CAAC,CAAC,EAAE,OAAoB,EAAK,EAAoB,SAAS,CAAC,MAAM,EAAsB,UAAQ,CAAC,CAAE,EAAQ,EAAS,EAAO,OAAOC,CAAc,EAAQ,GAAU,CAAC,SAAO,KAAG,QAAM,GAAG,MAAgB,CAAC,GAAG,CAAK,GAAU,GAAwB,EAAM,IAAe,EAAM,iBAAwB,EAAS,KAAK,GAAG,EAAE,EAAM,iBAAwB,EAAS,KAAK,GAAG,EAU7+C,EAAgB,EAV8/CC,EAAiB,SAAS,EAAM,EAAI,CAAC,IAAM,EAAYC,EAAO,IAAI,EAAQ,EAAW,GAAK,EAAkB,EAAgBC,EAAY,EAAO,CAAC,eAAa,aAAW,EAAc,EAAQ,EAAkB,EAAqB,EAAO,CAAC,QAAM,YAAU,WAAS,UAAQ,GAAG,GAAW,EAAS,CAAK,EAAO,CAAC,cAAY,aAAW,sBAAoB,kBAAgB,iBAAe,YAAU,kB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