{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/ZvRJvU5lbgCqegXw9Ig4/W1qw3GYCTifPIF7JA5SY/Trial_form.js"],
  "sourcesContent": ["import{jsx as e}from\"react/jsx-runtime\";import{Data as o}from\"framer\";let t=o({email:\"\",username:\"\",company:\"\",message:\"\",checkedTerms:!1});export function withCheckTerms(o){return t=>/*#__PURE__*/e(\"div\",{onClick:e=>{console.log(\"checked???\",t),console.log(\"check\",e);},style:{cursor:\"pointer\"},children:/*#__PURE__*/e(o,{...t,checked:\"true\"})});}let n={height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\"};export function withText(o){return n=>/*#__PURE__*/e(o,{...n,text:t.message});}export function customerName(o){return n=>/*#__PURE__*/e(o,{...n,text:t.username});}export function termsAndConditions(o){return t=>/*#__PURE__*/e(o,{...t,text:\"By continuing, you agree to Flexiana's Terms and Privacy Policy.\"});}let r=RegExp(\"^(?!-)(?!.*--)[A-Za-z0-9-]{3,100}(?<!-)$\");function a(e){return(// Check empty\n0===e.username.length||0===e.company.length||0===e.email.length?\"Please, fill all the fields\":e.username.length>=100||e.company.length>=100||e.email.length>=100?\"Fields shouldn't be more than 100 characters\":e.company.length<=2?\"Name of the company shouldn't be less than 3 characters.\":r.test(e.company)?null:\"Name of the company should contain only letters, numbers or one dash between them.\");}export const withRedirectSubmit=o=>n=>/*#__PURE__*/e(\"div\",{onClick:()=>{//window.alert(\"clicked\")\n        let e=a(t);null===e?fetch(\"https://test.frankiesaas.flexiana.com/api/activate\",{method:\"POST\",headers:{\"content-type\":\"application/json;charset=UTF-8\"},body:JSON.stringify({\"company-name\":t.username,\"company-domain\":t.company.toLowerCase(),email:t.email,trial:!0})}).then(e=>{e.ok?// handle successful login\n        e.json().then(e=>{0===e.status?// Handle response with status 0\n        //console.log(\"Response body:\", data)\n        //window.alert(data.link)\n        // Redirect to the link received in the response\n        window.location.href=e.link:(//data.message =\n        //  \"Sorry, there was an error. Try again please.\"\n        window.alert(e.message),console.log(\"Response body:\",e.message));}):(// handle failed login\n        window.alert(\"Sorry, there was an error. Try again please.\"),////data.message =\n        //\"Sorry, there was an error. Try again please.\"\n        console.debug(e.body));}).catch(e=>{// handle network\n        window.alert(\"Error!\"),console.error(\"Error message:\",e.message),console.error(\"Error status:\",e.response.status);}):(window.alert(e),console.error(\"Validation error: \",e));//window.location.href = \"https://\" + data.company + \".frankie.pro/\"\n        },style:{cursor:\"pointer\"},children:/*#__PURE__*/e(o,{...n})});export const withStoreName=o=>n=>/*#__PURE__*/e(o,{...n,onChange:e=>{t.username=e;}});export const withStoreCompany=o=>n=>/*#__PURE__*/e(o,{...n,onChange:e=>{t.company=e;}});export const withStoreEmail=o=>n=>/*#__PURE__*/e(o,{...n,onChange:e=>{t.email=e;}});export const withCheckterms=o=>n=>/*#__PURE__*/e(o,{...n,onChange:e=>{t.checkedTerms=e,console.log(\"checked???\",e),console.log(\"checked???\",n);}});export const withConsoleLog=o=>t=>/*#__PURE__*/e(o,{...t,onChange:e=>{// Log the input letter to the console\n        console.log(\"Input changed:\",e);}});\nexport const __FramerMetadata__ = {\"exports\":{\"termsAndConditions\":{\"type\":\"reactHoc\",\"name\":\"termsAndConditions\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStoreEmail\":{\"type\":\"reactHoc\",\"name\":\"withStoreEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStoreName\":{\"type\":\"reactHoc\",\"name\":\"withStoreName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCheckTerms\":{\"type\":\"reactHoc\",\"name\":\"withCheckTerms\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withText\":{\"type\":\"reactHoc\",\"name\":\"withText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCheckterms\":{\"type\":\"reactHoc\",\"name\":\"withCheckterms\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStoreCompany\":{\"type\":\"reactHoc\",\"name\":\"withStoreCompany\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRedirectSubmit\":{\"type\":\"reactHoc\",\"name\":\"withRedirectSubmit\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withConsoleLog\":{\"type\":\"reactHoc\",\"name\":\"withConsoleLog\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"customerName\":{\"type\":\"reactHoc\",\"name\":\"customerName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Trial_form.map"],
  "mappings": "2HAAsE,IAAIA,EAAEC,EAAE,CAAC,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,EAAE,CAAC,EAA0mB,IAAIC,EAAE,OAAO,0CAA0C,EAAE,SAASC,EAAE,EAAE,CAAC,OACvzB,EAAE,SAAS,SAAf,GAA2B,EAAE,QAAQ,SAAd,GAA0B,EAAE,MAAM,SAAZ,EAAmB,8BAA8B,EAAE,SAAS,QAAQ,KAAK,EAAE,QAAQ,QAAQ,KAAK,EAAE,MAAM,QAAQ,IAAI,+CAA+C,EAAE,QAAQ,QAAQ,EAAE,2DAA2DD,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,oFAAsF,CAAQ,IAAME,EAAmBC,GAAGC,GAAgBC,EAAE,MAAM,CAAC,QAAQ,IAAI,CAC7c,IAAIC,EAAEL,EAAEM,CAAC,EAASD,IAAP,KAAS,MAAM,qDAAqD,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,gCAAgC,EAAE,KAAK,KAAK,UAAU,CAAC,eAAeC,EAAE,SAAS,iBAAiBA,EAAE,QAAQ,YAAY,EAAE,MAAMA,EAAE,MAAM,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,KAAKD,GAAG,CAACA,EAAE,GACtRA,EAAE,KAAK,EAAE,KAAKA,GAAG,CAAKA,EAAE,SAAN,EAIlBE,EAAO,SAAS,KAAKF,EAAE,MAEvBE,EAAO,MAAMF,EAAE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