{"version":3,"file":"l0XvKbXue.DN6fWMXU.mjs","names":["useState","useRef","useCallback","React.useContext","React.useMemo","React.Fragment","React.forwardRef","useRef","React.useId"],"sources":["https:/framerusercontent.com/modules/8jTiuOcUnbErAquIp5Bu/AEYQIoIrhFYYwKU5eQ7Y/Modal_Trigger.js","https:/framerusercontent.com/modules/UTM2tDrFGIN8Z5iM79OQ/AQy0iFXeW3M7hoLlodQe/l0XvKbXue.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useCallback,useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerIntrinsicHeight 0\n * @framerIntrinsicWidth 0\n */export default function ModalTrigger({showOnMouseLeave,delayConfig,scrollConfig}){const[hasBeenTriggered,setHasBeenTriggered]=useState(false);const triggerRef=useRef(null);// Event listeners added in the effect call don't have access to state\n// updates, so we'll use a ref and set both ref.current and state\n// in _setHasBeenTriggered.\nconst stateRef=useRef(hasBeenTriggered);const _setHasBeenTriggered=newState=>{stateRef.current=newState;setHasBeenTriggered(newState);};const showModal=useCallback(node=>{if(stateRef.current)return;simulateClick(node);_setHasBeenTriggered(true);},[]);const triggerOnMouseOut=useCallback(node=>e=>{// You can remove conditions if you'd prefer that the pop-up isn't\n    // triggered by the mouse leaving certain edges of the viewport.\n    if(// Top\n    e.clientY<=0||// Left\n    e.clientX<=0||// Right\n    e.clientX>=window.innerWidth||// Bottom\n    e.clientY>=window.innerHeight){showModal(node);}},[showModal]);// Listen for mouse leaving the viewport if showOnMouseLeave is true\nuseEffect(()=>{const triggerNode=triggerRef.current;if(triggerNode){if(showOnMouseLeave){window.addEventListener(\"mouseout\",triggerOnMouseOut(triggerNode));return()=>window.removeEventListener(\"mouseout\",triggerOnMouseOut(triggerNode));}}return;},[triggerOnMouseOut,showOnMouseLeave,showModal]);// Initialize a timer if showOnDelay is true\nuseEffect(()=>{const triggerNode=triggerRef.current;if(triggerNode){if(delayConfig.showOnDelay){const delay=setTimeout(()=>showModal(triggerNode),delayConfig.delaySeconds*1e3);return()=>clearTimeout(delay);}}return;},[delayConfig.showOnDelay,delayConfig.delaySeconds,showModal]);// Listen for clicks on the button and disable our triggers\n// if the button has been clicked\nuseEffect(()=>{const triggerNode=triggerRef.current;if(triggerNode){var _triggerNode_parentElement;const preventTriggers=()=>_setHasBeenTriggered(true);const button=(_triggerNode_parentElement=triggerNode.parentElement)===null||_triggerNode_parentElement===void 0?void 0:_triggerNode_parentElement.parentElement;if(button){button.addEventListener(\"keyup\",preventTriggers);button.addEventListener(\"mouseup\",preventTriggers);return()=>{window.removeEventListener(\"keyup\",preventTriggers);window.removeEventListener(\"mouseup\",preventTriggers);};}}return;},[]);// Listen for scroll if showOnScrollToPercentage is true\nuseEffect(()=>{if(scrollConfig.showOnScrollToPercentage){const initialYCoordBottomOfViewport=window.scrollY+window.innerHeight;const triggerNode=triggerRef.current;const body=document.querySelector(\"body\");if(triggerNode&&body){const scrollListener=()=>{const scrollPositionOfBottomOfViewport=window.scrollY+window.innerHeight;const triggerPoint=body.scrollHeight*scrollConfig.scrollPercentage/100;if(scrollPositionOfBottomOfViewport>=triggerPoint&&// Don't trigger if the user started below the trigger point\n// (this could happen after a refresh)\ninitialYCoordBottomOfViewport<triggerPoint){showModal(triggerNode);}};window.addEventListener(\"scroll\",scrollListener);return()=>window.removeEventListener(\"scroll\",scrollListener);}}return;},[scrollConfig.showOnScrollToPercentage,scrollConfig.scrollPercentage,showModal]);// It would be nice to aria-hide the container that Framer\n// wraps this in, but that would only be possible on the canvas\n// and it's not!\nreturn /*#__PURE__*/_jsx(\"div\",{ref:triggerRef,\"aria-hidden\":\"true\"});}// If this component breaks, it could be because Framer has decided to not wrap\n// code components in containers anymore. If that's the case, access\n// node.parentElement instead of node.parentElement.parentElement\nconst simulateClick=node=>{var _node_parentElement;if((_node_parentElement=node.parentElement)===null||_node_parentElement===void 0?void 0:_node_parentElement.parentElement){const button=node.parentElement.parentElement;button.dispatchEvent(new FocusEvent(\"focus\"));button.dispatchEvent(new KeyboardEvent(\"keydown\",{key:\"Enter\"}));button.dispatchEvent(new KeyboardEvent(\"keyup\",{key:\"Enter\"}));}};addPropertyControls(ModalTrigger,{showOnMouseLeave:{type:ControlType.Boolean,title:\"MouseLeave\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},delayConfig:{type:ControlType.Object,title:\"Delay\",buttonTitle:\"Configure\",controls:{showOnDelay:{type:ControlType.Boolean,title:\"Trigger\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},delaySeconds:{type:ControlType.Number,title:\"Seconds\",defaultValue:10,min:0,max:300,step:5,displayStepper:true,unit:\" s\"}}},scrollConfig:{type:ControlType.Object,title:\"Scroll\",buttonTitle:\"Configure\",controls:{showOnScrollToPercentage:{type:ControlType.Boolean,title:\"Trigger\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},scrollPercentage:{type:ControlType.Number,title:\"Scroll %\",defaultValue:50,min:0,max:100,step:1,displayStepper:true,unit:\" %\"}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ModalTrigger\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"0\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"0\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Modal_Trigger.map","// Generated by Framer (78d7c61)\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addFonts,cx,useComponentViewport,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";const enabledGestures={dyEJnmTCI:{hover:true}};const serializationHash=\"framer-I27gx\";const variantClassNames={dyEJnmTCI:\"framer-v-168o888\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const transition1={bounce:.4,delay:0,duration:.6,type:\"spring\"};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:\"dyEJnmTCI\",enabledGestures,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-168o888\",className,classNames),\"data-framer-name\":\"Variant 1\",layoutDependency:layoutDependency,layoutId:\"dyEJnmTCI\",ref:refBinding,style:{backgroundColor:\"var(--token-2798b65f-669d-4518-9886-03691cbf05ab, rgb(36, 117, 215))\",borderBottomLeftRadius:100,borderBottomRightRadius:100,borderTopLeftRadius:100,borderTopRightRadius:100,...style},variants:{\"dyEJnmTCI-hover\":{backgroundColor:\"var(--token-953747aa-a34c-4bf9-8c5b-ab157ff3830a, rgb(255, 255, 255))\"}},...addPropertyOverrides({\"dyEJnmTCI-hover\":{\"data-framer-name\":undefined}},baseVariant,gestureVariant),children:[/*#__PURE__*/_jsx(motion.div,{className:\"framer-1ilww7i\",layoutDependency:layoutDependency,layoutId:\"DszHb_ryA\",style:{backgroundColor:\"var(--token-beafb5d5-7be6-4d23-8711-f78775447718, rgb(4, 8, 20))\",borderBottomLeftRadius:50,borderBottomRightRadius:50,borderTopLeftRadius:50,borderTopRightRadius:50,rotate:45},variants:{\"dyEJnmTCI-hover\":{rotate:30}}}),/*#__PURE__*/_jsx(motion.div,{className:\"framer-1hlnezw\",layoutDependency:layoutDependency,layoutId:\"tVHCq4J0b\",style:{backgroundColor:\"var(--token-beafb5d5-7be6-4d23-8711-f78775447718, rgb(4, 8, 20))\",borderBottomLeftRadius:50,borderBottomRightRadius:50,borderTopLeftRadius:50,borderTopRightRadius:50,rotate:-45},variants:{\"dyEJnmTCI-hover\":{rotate:-60}}})]})})})});});const css=[\"@supports (aspect-ratio: 1) { body { --framer-aspect-ratio-supported: auto; } }\",\".framer-I27gx.framer-9zs8e2, .framer-I27gx .framer-9zs8e2 { display: block; }\",\".framer-I27gx.framer-168o888 { cursor: pointer; height: 40px; overflow: hidden; position: relative; width: 40px; will-change: var(--framer-will-change-override, transform); }\",\".framer-I27gx .framer-1ilww7i, .framer-I27gx .framer-1hlnezw { flex: none; height: 2px; left: calc(50.00000000000002% - 20px / 2); overflow: hidden; position: absolute; top: calc(50.00000000000002% - 2px / 2); width: 20px; will-change: var(--framer-will-change-override, transform); }\",\".framer-I27gx.framer-v-168o888.hover .framer-1ilww7i, .framer-I27gx.framer-v-168o888.hover .framer-1hlnezw { left: calc(50.00000000000002% - 26px / 2); width: 26px; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 40\n * @framerIntrinsicWidth 40\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"fixed\"]},\"mskBJMMd3\":{\"layout\":[\"fixed\",\"fixed\"]}}}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const Framerl0XvKbXue=withCSS(Component,css,\"framer-I27gx\");export default Framerl0XvKbXue;Framerl0XvKbXue.displayName=\"Close Button 2\";Framerl0XvKbXue.defaultProps={height:40,width:40};addFonts(Framerl0XvKbXue,[{explicitInter:true,fonts:[]}],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Framerl0XvKbXue\",\"slots\":[],\"annotations\":{\"framerComponentViewportWidth\":\"true\",\"framerIntrinsicWidth\":\"40\",\"framerIntrinsicHeight\":\"40\",\"framerDisplayContentsDiv\":\"false\",\"framerAutoSizeImages\":\"true\",\"framerImmutableVariables\":\"true\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"mskBJMMd3\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]}}}\",\"framerContractVersion\":\"1\",\"framerColorSyntax\":\"true\"}},\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./l0XvKbXue.map"],"mappings":"oWAGG,SAAwB,EAAa,CAAC,mBAAiB,cAAY,gBAAc,CAAC,GAAK,CAAC,EAAiB,GAAqBA,EAAS,EAAK,EAAQ,EAAWC,EAAO,IAAI,EAGvK,EAASA,EAAO,CAAgB,EAAQ,EAAqB,GAAU,CAAC,EAAS,QAAQ,EAAS,EAAoB,CAAQ,CAAE,EAAQ,EAAUC,EAAY,GAAM,CAAI,EAAS,UAAe,EAAc,CAAI,EAAE,EAAqB,EAAI,EAAE,EAAE,CAAC,CAAC,EAAQ,EAAkBA,EAAY,GAAM,GAAG,EAGpS,EAAE,SAAS,GACX,EAAE,SAAS,GACX,EAAE,SAAS,EAA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