{"version":3,"file":"WithFormValidation.oe8U57MF.mjs","names":[],"sources":["https:/framerusercontent.com/modules/RFFLI2lslEl8a1qMHbDq/NOMyYNYZE0DMLNuljJ7H/QQxgjFXpt.js","https:/framerusercontent.com/modules/pn6Ii4Gfi2QFvtvku0kP/YmJi3cQfjhC18pQVxqWT/WithFormValidation.js"],"sourcesContent":["// Generated by Framer (20dc3ed)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"FS;Montserrat-semibold\",\"Inter-Black\",\"Inter-BlackItalic\",\"Inter-BoldItalic\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"Montserrat\",source:\"fontshare\",style:\"normal\",url:\"https://framerusercontent.com/third-party-assets/fontshare/wf/DELXRVKO253LHPYOBD6KD7EW3TJKXCXF/L6SILXET3P727LN5N75LL5PG77IET2IT/6DP3DAT2N5LSQGN5ISPRN63WPP32A54A.woff2\",weight:\"600\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/mkY5Sgyq51ik0AMrSBwhm9DJg.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/X5hj6qzcHUYv7h1390c8Rhm6550.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/gQhNpS3tN86g8RcVKYUUaKt2oMQ.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/cugnVhSraaRyANCaUtI5FV17wk.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"normal\",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/5HcVoGak8k5agFJSaKa4floXVu0.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/jn4BtSPLlS0NDp1KiFAtFKiiY0o.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"normal\",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/P2Bw01CtL0b9wqygO0sSVogWbo.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/05KsVHGDmqXSBXM4yRZ65P8i0s.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/ky8ovPukK4dJ1Pxq74qGhOqCYI.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/vvNSqIj42qeQ2bvCRBIWKHscrc.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/3ZmXbBKToJifDV9gwcifVd1tEY.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"italic\",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/FNfhX3dt4ChuLJq2PwdlxHO7PU.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/g0c8vEViiXNlKAgI4Ymmk3Ig.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"italic\",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/efTfQcBJ53kM2pB1hezSZ3RDUFs.woff2\",weight:\"900\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/H89BbHkbHDzlxZzxi8uPzTsp90.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/u6gJwDuwB143kpNK1T1MDKDWkMc.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/43sJ6MfOPh1LCJt46OvyDuSbA6o.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/wccHG0r4gBDAIRhfHiOlq6oEkqw.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",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/WZ367JPwf9bRW6LdTHN8rXgSjw.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/QxmhnWTzLtyjIiZcfaLIJ8EFBXU.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",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/2A4Xx7CngadFGlVV4xrO06OBHY.woff2\",weight:\"700\"}]}];export const css=['.framer-Qxct7 .framer-styles-preset-1cghvcb:not(.rich-text-wrapper), .framer-Qxct7 .framer-styles-preset-1cghvcb.rich-text-wrapper h2 { --framer-font-family: \"Montserrat\", \"Montserrat Placeholder\", sans-serif; --framer-font-family-bold: \"Inter\", sans-serif; --framer-font-family-bold-italic: \"Inter\", sans-serif; --framer-font-family-italic: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 26px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 900; --framer-font-weight-bold-italic: 900; --framer-font-weight-italic: 700; --framer-letter-spacing: -0.01em; --framer-line-height: 1.2em; --framer-paragraph-spacing: 40px; --framer-text-alignment: center; --framer-text-color: #ffffff; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-Qxct7\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";/**\n * @framerDisableUnlink\n * @framerIntrinsicWidth 100\n * @framerIntrinsicHeight 100\n */export function withFormValidation(Component){return function FormValidationHOC(props){useEffect(()=>{// Locate the inputs\nconst phoneInput=document.querySelector(\"input[name='phone-number']\");const emailInput=document.querySelector(\"input[name='email-address']\");const nameInput=document.querySelector(\"input[name='name']\");// Phone number validation function\nconst validatePhoneNumber=()=>{if(!phoneInput)return;const phonePattern=/^\\d{10,13}$/;const value=phoneInput.value;if(/[^\\d]/.test(value)){phoneInput.setCustomValidity(\"Formato Inv\\xe1lido - Digite apenas n\\xfameros (c\\xf3digo de \\xe1rea + n\\xfamero)\");}else if(value&&!phonePattern.test(value)){phoneInput.setCustomValidity(\"Formato Inv\\xe1lido: Digite o c\\xf3digo de \\xe1rea + n\\xfamero; (DDD + n\\xfamero), sem espa\\xe7os ou caracteres especiais\");}else{phoneInput.setCustomValidity(\"\");}};// Email validation function\nconst validateEmail=()=>{if(!emailInput)return;const emailPattern=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.(com|net|org|gov|edu|mil|co|il|uk|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|ca|br|in|ar|mx|cn|za|gr|dk|fi|pl|be|pt|tr|xyz|info|biz|me|io|co\\.il)$/;const value=emailInput.value;if(value===\"\"){emailInput.setCustomValidity(\"\");}else if(!emailPattern.test(value)){emailInput.setCustomValidity(\"Formato de Email Inv\\xe1lido. Confira se o formato utilizado \\xe9 `exemplo@dom\\xednio.com` ou outro formato v\\xe1lido\");}else{emailInput.setCustomValidity(\"\");}};// Name validation function\nconst validateName=()=>{if(!nameInput)return;const namePattern=/^[a-zA-Z\\s\\-]+$/// Only letters, spaces, and dashes allowed\n;const value=nameInput.value;if(value===\"\"){nameInput.setCustomValidity(\"\");}else if(!namePattern.test(value)){nameInput.setCustomValidity(\"Formato de Nome Inv\\xe1lido - Apenas letras, espa\\xe7os e h\\xedfens s\\xe3o permitidas.\");}else if(value.length>25){nameInput.setCustomValidity(\"Nome Completo n\\xe3o pode exceder 25 caracteres\");}else{nameInput.setCustomValidity(\"\");}};// Attach event listeners if inputs exist\nphoneInput?.addEventListener(\"blur\",validatePhoneNumber);emailInput?.addEventListener(\"blur\",validateEmail);nameInput?.addEventListener(\"blur\",validateName);// Cleanup event listeners on component unmount\nreturn()=>{phoneInput?.removeEventListener(\"blur\",validatePhoneNumber);emailInput?.removeEventListener(\"blur\",validateEmail);nameInput?.removeEventListener(\"blur\",validateName);};},[])// Run only once on mount\n;return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withFormValidation\":{\"type\":\"reactHoc\",\"name\":\"withFormValidation\",\"annotations\":{\"framerDisableUnlink\":\"* @framerIntrinsicWidth 100\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"100\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithFormValidation.map"],"mappings":"0LAC8B,GAAU,UAAU,CAAC,yBAAyB,cAAc,oBAAoB,mBAAmB,CAAC,CAAc,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,OAAO,aAAa,OAAO,YAAY,MAAM,SAAS,IAAI,yKAAyK,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,0EAA0E,IAAI,uEAAuE,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,wDAAwD,IAAI,yEAAyE,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,cAAc,IAAI,yEAA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