{"version":3,"file":"Examples.CKOwicW6.mjs","names":["React.useContext","React.useMemo","React.Fragment","React.forwardRef","useRef","React.useId","useState","useRef","useCallback","__exportAll","pe","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","x","window","ie","_e","oe","p","c","init_jsx_runtime","ce","de","MotionConfigContext","LayoutGroup","init_framer_motion_DhsWWWsN","motion","addPropertyControls","useLocaleInfo","useComponentViewport","useVariantState","withFX","Data","withCSS","ControlType","useObserveData","RichText","cx","addFonts","init_framer_DKWANagr","PO3fQuztz_exports","__FramerMetadata__","FramerPO3fQuztz","addPropertyOverrides","variants","nextOverrides","variant","overrides","MotionDivWithFX","cycleOrder","serializationHash","variantClassNames","transition1","transition2","animation","transformTemplate1","Transition","humanReadableVariantMap","Variants","getProps","createLayoutDependency","init_PO3fQuztz","__esmMin","config","transition","value","contextValue","props","fallbackRef","refBinding","ref","defaultLayoutId","restProps","layoutDependency","scopingClassNames","isDisplayed","baseVariant","isDisplayed1","layoutId","gestureHandlers","className","classNames","style","gestureVariant","\"exports\"","\"Props\"","\"type\"","\"annotations\"","\"framerContractVersion\"","\"default\"","\"name\"","\"slots\"","\"framerIntrinsicWidth\"","\"framerAutoSizeImages\"","\"framerComponentViewportWidth\"","\"framerDisplayContentsDiv\"","\"framerIntrinsicHeight\"","\"framerColorSyntax\"","\"framerCanvasComponentVariantDetails\"","\"framerImmutableVariables\"","\"__FramerMetadata__\"","createStore","dataStore","state1","setDataStore","newState","storeState","storeSetters","setStoreState","setter","useStore","state","setState","init_createStore","init_store_js__1_0","centerContent","init_Utils","init_utils_js__0_9","withFormSuccessRedirect","redirectScheduledRef","timeoutRef","latestPropsRef","getFormFromEvent","currentTarget","event","target","found","scheduleRedirect","form","currentProps","redirectTo","redirectDelay","handleSubmit","handleSubmitCapture","Component","withSubmitButtonRedirect","handleClick","init_Examples"],"sources":["https:/framerusercontent.com/modules/LK2pVihD86DKafunhFT1/nxCGWLkiQZUtXGeHkZRT/PO3fQuztz.js","https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/4t0hhnDO5zN7QBKfShS1/GzXbcVI8tmZbkBsGIJGr/Examples.js"],"sourcesContent":["// Generated by Framer (7bba2ed)\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addFonts,addPropertyControls,ControlType,cx,RichText,useComponentViewport,useLocaleInfo,useVariantState,withCSS,withFX}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";const MotionDivWithFX=withFX(motion.div);const cycleOrder=[\"nUjg6tQNr\",\"G5_5TXPLX\",\"pwNdiAntz\",\"KLUAzQONN\",\"nX6WzLBwx\"];const serializationHash=\"framer-rk4MU\";const variantClassNames={G5_5TXPLX:\"framer-v-z3nllm\",KLUAzQONN:\"framer-v-h03jf6\",nUjg6tQNr:\"framer-v-zqszhz\",nX6WzLBwx:\"framer-v-8bhd6p\",pwNdiAntz:\"framer-v-8zj3wr\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const transition1={delay:0,duration:.2,ease:[.44,0,.56,1],type:\"tween\"};const transition2={delay:0,duration:1,ease:[0,0,1,1],type:\"tween\"};const animation={opacity:1,rotate:360,rotateX:0,rotateY:0,scale:1,skewX:0,skewY:0,x:0,y:0};const transformTemplate1=(_,t)=>`translateX(-50%) ${t}`;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 humanReadableVariantMap={Default:\"nUjg6tQNr\",Disabled:\"pwNdiAntz\",Error:\"nX6WzLBwx\",Loading:\"G5_5TXPLX\",Success:\"KLUAzQONN\"};const Variants=motion.create(React.Fragment);const getProps=({height,id,width,...props})=>{return{...props,variant:humanReadableVariantMap[props.variant]??props.variant??\"nUjg6tQNr\"};};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,contentLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({cycleOrder,defaultVariant:\"nUjg6tQNr\",ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);const isDisplayed=()=>{if(baseVariant===\"G5_5TXPLX\")return false;return true;};const isDisplayed1=()=>{if(baseVariant===\"G5_5TXPLX\")return true;return false;};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.button,{...restProps,...gestureHandlers,className:cx(scopingClassNames,\"framer-zqszhz\",className,classNames),\"data-framer-name\":\"Default\",\"data-reset\":\"button\",layoutDependency:layoutDependency,layoutId:\"nUjg6tQNr\",ref:refBinding,style:{backgroundColor:\"rgb(78, 168, 50)\",borderBottomLeftRadius:40,borderBottomRightRadius:40,borderTopLeftRadius:40,borderTopRightRadius:40,opacity:1,...style},variants:{KLUAzQONN:{backgroundColor:\"rgb(78, 168, 51)\",opacity:1},nX6WzLBwx:{backgroundColor:\"rgba(255, 34, 68, 0.15)\",opacity:1},pwNdiAntz:{opacity:.5}},...addPropertyOverrides({G5_5TXPLX:{\"data-framer-name\":\"Loading\"},KLUAzQONN:{\"data-framer-name\":\"Success\"},nX6WzLBwx:{\"data-framer-name\":\"Error\"},pwNdiAntz:{\"data-framer-name\":\"Disabled\"}},baseVariant,gestureVariant),children:[isDisplayed()&&/*#__PURE__*/_jsx(RichText,{__fromCanvasComponent:true,children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{dir:\"auto\",style:{\"--font-selector\":\"SW50ZXItU2VtaUJvbGQ=\",\"--framer-font-size\":\"17px\",\"--framer-font-weight\":\"600\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(255, 255, 255))\"},children:\"SOLICITAR OR\\xc7AMENTO\"})}),className:\"framer-12py5g5\",fonts:[\"Inter-SemiBold\"],layoutDependency:layoutDependency,layoutId:\"AI5BpIeZe\",style:{\"--extracted-r6o4lv\":\"rgb(255, 255, 255)\",\"--framer-link-text-color\":\"rgb(0, 153, 255)\",\"--framer-link-text-decoration\":\"underline\"},variants:{nX6WzLBwx:{\"--extracted-r6o4lv\":\"rgb(255, 34, 68)\"}},verticalAlignment:\"top\",withExternalLayout:true,...addPropertyOverrides({KLUAzQONN:{children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{dir:\"auto\",style:{\"--font-selector\":\"SW50ZXItU2VtaUJvbGQ=\",\"--framer-font-size\":\"17px\",\"--framer-font-weight\":\"600\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(255, 255, 255))\"},children:\"ENVIADO!\"})})},nX6WzLBwx:{children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{dir:\"auto\",style:{\"--font-selector\":\"SW50ZXItU2VtaUJvbGQ=\",\"--framer-font-size\":\"17px\",\"--framer-font-weight\":\"600\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(255, 34, 68))\"},children:\"TEM ALGO DE ERRADO!\"})})}},baseVariant,gestureVariant)}),isDisplayed1()&&/*#__PURE__*/_jsx(motion.div,{className:\"framer-125d51l\",\"data-framer-name\":\"Spinner\",layoutDependency:layoutDependency,layoutId:\"mIDkSdf5U\",style:{mask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\",WebkitMask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\"},children:/*#__PURE__*/_jsx(MotionDivWithFX,{__framer__loop:animation,__framer__loopEffectEnabled:true,__framer__loopPauseOffscreen:true,__framer__loopRepeatDelay:0,__framer__loopRepeatType:\"loop\",__framer__loopTransition:transition2,__perspectiveFX:false,__smartComponentFX:true,__targetOpacity:1,className:\"framer-1qlzi12\",\"data-framer-name\":\"Conic\",layoutDependency:layoutDependency,layoutId:\"NEImamBXV\",style:{background:\"conic-gradient(from 180deg at 50% 50%, var(--token-f0589f38-01cf-4053-acbd-b986cac8316e) 0deg, var(--token-f0589f38-01cf-4053-acbd-b986cac8316e) 360deg)\",backgroundColor:\"var(--token-f0589f38-01cf-4053-acbd-b986cac8316e)\",mask:\"none\",WebkitMask:\"none\"},variants:{G5_5TXPLX:{background:\"conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0) 7.208614864864882deg, rgb(255, 255, 255) 342deg)\",backgroundColor:\"rgba(0, 0, 0, 0)\",mask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\",WebkitMask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\"}},children:/*#__PURE__*/_jsx(motion.div,{className:\"framer-5qvu78\",\"data-framer-name\":\"Rounding\",layoutDependency:layoutDependency,layoutId:\"DBbuEMfyx\",style:{backgroundColor:\"rgb(255, 255, 255)\",borderBottomLeftRadius:1,borderBottomRightRadius:1,borderTopLeftRadius:1,borderTopRightRadius:1},transformTemplate:transformTemplate1})})})]})})})});});const css=[\".framer-rk4MU.framer-1ylyspt, .framer-rk4MU .framer-1ylyspt { display: block; }\",\".framer-rk4MU.framer-zqszhz { align-content: center; align-items: center; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 0px; height: 73px; justify-content: center; overflow: visible; padding: 0px; position: relative; width: 431px; }\",\".framer-rk4MU .framer-12py5g5 { -webkit-user-select: none; flex: none; height: auto; position: relative; user-select: none; white-space: pre; width: auto; }\",\".framer-rk4MU .framer-125d51l { aspect-ratio: 1 / 1; flex: none; gap: 10px; height: auto; overflow: hidden; position: relative; width: 20px; }\",\".framer-rk4MU .framer-1qlzi12 { bottom: 0px; flex: none; left: 0px; overflow: visible; position: absolute; right: 0px; top: 0px; }\",\".framer-rk4MU .framer-5qvu78 { aspect-ratio: 1 / 1; flex: none; height: auto; left: 50%; overflow: visible; position: absolute; top: 0px; width: 2px; }\",\".framer-rk4MU.framer-v-z3nllm .framer-1qlzi12 { overflow: hidden; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 73\n * @framerIntrinsicWidth 431\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"fixed\"]},\"G5_5TXPLX\":{\"layout\":[\"fixed\",\"fixed\"]},\"pwNdiAntz\":{\"layout\":[\"fixed\",\"fixed\"]},\"KLUAzQONN\":{\"layout\":[\"fixed\",\"fixed\"]},\"nX6WzLBwx\":{\"layout\":[\"fixed\",\"fixed\"]}}}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const FramerPO3fQuztz=withCSS(Component,css,\"framer-rk4MU\");export default FramerPO3fQuztz;FramerPO3fQuztz.displayName=\"Button 3\";FramerPO3fQuztz.defaultProps={height:73,width:431};addPropertyControls(FramerPO3fQuztz,{variant:{options:[\"nUjg6tQNr\",\"G5_5TXPLX\",\"pwNdiAntz\",\"KLUAzQONN\",\"nX6WzLBwx\"],optionTitles:[\"Default\",\"Loading\",\"Disabled\",\"Success\",\"Error\"],title:\"Variant\",type:ControlType.Enum}});addFonts(FramerPO3fQuztz,[{explicitInter:true,fonts:[{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/hyOgCu0Xnghbimh0pE8QTvtt2AU.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/NeGmSOXrPBfEFIy5YZeHq17LEDA.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/oYaAX5himiTPYuN8vLWnqBbfD2s.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/lEJLP4R0yuCaMCjSXYHtJw72M.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF\",url:\"https://framerusercontent.com/assets/cRJyLNuTJR5jbyKzGi33wU9cqIQ.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2070, U+2074-207E, U+2080-208E, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/yDtI2UI8XcEg1W2je9XPN3Noo.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB\",url:\"https://framerusercontent.com/assets/A0Wcc7NgXMjUuFdquHDrIZpzZw0.woff2\",weight:\"600\"}]}],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"FramerPO3fQuztz\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"431\",\"framerAutoSizeImages\":\"true\",\"framerComponentViewportWidth\":\"true\",\"framerDisplayContentsDiv\":\"false\",\"framerIntrinsicHeight\":\"73\",\"framerContractVersion\":\"1\",\"framerColorSyntax\":\"true\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"G5_5TXPLX\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"pwNdiAntz\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"KLUAzQONN\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"nX6WzLBwx\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]}}}\",\"framerImmutableVariables\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PO3fQuztz.map","import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","export const centerContent = {\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const autoSizingText = {\n    width: \"max-content\",\n    wordBreak: \"break-word\",\n    overflowWrap: \"break-word\",\n    overflow: \"hidden\",\n    whiteSpace: \"pre-wrap\",\n    flexShrink: 0\n};\nexport const defaultContainerStyles = {\n    ...centerContent,\n    overflow: \"hidden\"\n};\nexport const containerStyles = defaultContainerStyles;\nexport const randomColor = ()=>\"#\" + Math.floor(Math.random() * 16777215).toString(16)\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"centerContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"autoSizingText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultContainerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomColor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./Utils.map","/*\n * Utils (framer/utils@0.9.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useEffect,useRef}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}export function withFormSuccessRedirect(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const redirectScheduledRef=useRef(false);const timeoutRef=useRef(null);const latestPropsRef=useRef(props);latestPropsRef.current=props;const getFormFromEvent=useCallback(event=>{const currentTarget=event?.currentTarget;if(currentTarget instanceof HTMLFormElement)return currentTarget;const target=event?.target;if(target&&typeof target.closest===\"function\"&&typeof window!==\"undefined\"){const found=target.closest(\"form\");if(found instanceof HTMLFormElement)return found;}return null;},[]);const scheduleRedirect=useCallback(form=>{if(!form||typeof form.checkValidity!==\"function\")return;if(!form.checkValidity()){redirectScheduledRef.current=false;return;}if(redirectScheduledRef.current)return;redirectScheduledRef.current=true;const currentProps=latestPropsRef.current;const redirectTo=typeof currentProps.redirectTo===\"string\"&&currentProps.redirectTo.trim().length>0?currentProps.redirectTo:\"/obrigado\";const redirectDelay=typeof currentProps.redirectDelay===\"number\"&&Number.isFinite(currentProps.redirectDelay)?Math.max(0,currentProps.redirectDelay):700;if(typeof window!==\"undefined\"){timeoutRef.current=window.setTimeout(()=>{window.location.assign(redirectTo);},redirectDelay);}},[]);useEffect(()=>{return()=>{if(timeoutRef.current!==null&&typeof window!==\"undefined\"){window.clearTimeout(timeoutRef.current);}};},[]);const handleSubmit=useCallback(event=>{const currentProps=latestPropsRef.current;if(typeof currentProps.onSubmit===\"function\"){currentProps.onSubmit(event);}const form=getFormFromEvent(event);scheduleRedirect(form);},[getFormFromEvent,scheduleRedirect]);const handleSubmitCapture=useCallback(event=>{const currentProps=latestPropsRef.current;if(typeof currentProps.onSubmitCapture===\"function\"){currentProps.onSubmitCapture(event);}const form=getFormFromEvent(event);scheduleRedirect(form);},[getFormFromEvent,scheduleRedirect]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onSubmit:handleSubmit,onSubmitCapture:handleSubmitCapture});});}export function withSubmitButtonRedirect(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const redirectScheduledRef=useRef(false);const timeoutRef=useRef(null);const latestPropsRef=useRef(props);latestPropsRef.current=props;useEffect(()=>{return()=>{if(timeoutRef.current!==null&&typeof window!==\"undefined\"){window.clearTimeout(timeoutRef.current);}};},[]);const handleClick=useCallback(event=>{const currentProps=latestPropsRef.current;if(typeof currentProps.onClick===\"function\"){currentProps.onClick(event);}const currentTarget=event?.currentTarget;if(!currentTarget||typeof currentTarget.closest!==\"function\"||typeof window===\"undefined\"){return;}const form=currentTarget.closest(\"form\");if(!(form instanceof HTMLFormElement))return;const isValid=typeof form.reportValidity===\"function\"?form.reportValidity():typeof form.checkValidity===\"function\"?form.checkValidity():false;if(!isValid){redirectScheduledRef.current=false;return;}if(redirectScheduledRef.current)return;redirectScheduledRef.current=true;const redirectTo=typeof currentProps.redirectTo===\"string\"&&currentProps.redirectTo.trim().length>0?currentProps.redirectTo:\"/obrigado\";const redirectDelay=typeof currentProps.redirectDelay===\"number\"&&Number.isFinite(currentProps.redirectDelay)?Math.max(0,currentProps.redirectDelay):900;timeoutRef.current=window.setTimeout(()=>{window.location.assign(redirectTo);},redirectDelay);},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFormSuccessRedirect\":{\"type\":\"reactHoc\",\"name\":\"withFormSuccessRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSubmitButtonRedirect\":{\"type\":\"reactHoc\",\"name\":\"withSubmitButtonRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"A,scACioB,SAAS4C,EAAqB,EAAU,GAAGC,EAAS,CAAC,IAAMC,EAAc,CAAC,EAAuF,OAArFD,GAAU,QAAQ,GAAS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