{"version":3,"file":"ThentyForm.BasAwbaA.mjs","names":["u","s","i","f","l","o","a","n","c","e","r","t","t","e","s","u","a","i","c","o","l","n","r","l","r","e","n","o","a","s","u","i","d","t","p","faCore.withLoggedOut","useRef","useState","useRef","textOptions","useRef","useState","e","_Fragment","i"],"sources":["https:/cdn.framerauth.com/packages/overrides/core/live/latest/core.js","https:/cdn.framerauth.com/packages/overrides/store/live/latest/store.js","https:/cdn.framerauth.com/packages/overrides/extensions/live/latest/extensions.js","https:/framerusercontent.com/modules/nnW7SXygEgcUsB9yf31L/PtFMhGnPwpTx17VorRFd/FramerAuth.js","https:/framerusercontent.com/modules/e61m4Fbk5eP9eHvcc7Z8/D5tfieJj4z9ekFuijREx/SubmitButton.js","https:/framerusercontent.com/modules/qERhjgPA4cB5k1EvYnU6/Syq7IALRk21e0lIk5GD9/ThentyErrorMessage.js","https:/framerusercontent.com/modules/qWJhxYMaYl3NiGIZjw7a/Ncx1kJ1lLwUihBoa9hJZ/ThentyForm.js"],"sourcesContent":["import e,{useState as r,useEffect as t,useMemo as n,useRef as o}from\"react\";var u,s={exports:{}},i={};s.exports=function(){if(u)return i;u=1;var r=e,t=Symbol.for(\"react.element\"),n=Symbol.for(\"react.fragment\"),o=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,r,n){var u,i={},l=null,f=null;for(u in void 0!==n&&(l=\"\"+n),void 0!==r.key&&(l=\"\"+r.key),void 0!==r.ref&&(f=r.ref),r)o.call(r,u)&&!c.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps)for(u in r=e.defaultProps)void 0===i[u]&&(i[u]=r[u]);return{$$typeof:t,type:e,key:l,ref:f,props:i,_owner:s.current}}return i.Fragment=n,i.jsx=l,i.jsxs=l,i}();var c=s.exports;const l=window?.FramerAuth?window.FramerAuth:null,f=e=>{if(l){const[n,o]=r(l.getStoreState());return t((()=>{const r=l.subscribe((e=>{o(e)}),e);return()=>{r()}}),[e]),{store:n,setStore:l.setStoreState,getCurrentStore:l.getStoreState}}{const e={user:null,isAuthenticated:!1,isLoaded:!1};return{store:e,setStore:()=>{},getCurrentStore:()=>e}}},a=()=>\"undefined\"!=typeof window&&window.FramerAuth;function S(e){return r=>{const{store:t,setStore:n,getCurrentStore:o}=f();if(!t.user)return null;const u=t.user.first_name||\"\",s=t.user.last_name||\"\",i=s?`${u} ${s}`:u;return c.jsx(e,{...r,text:i})}}function d(e){return r=>{const{store:t}=f([\"user\"]),o=n((()=>t.user&&t.isAuthenticated?t:{...t,user:null,isAuthenticated:!1}),[t]);return c.jsx(e,{...r,store:o})}}function x(e){return r=>{const{store:t,setStore:n,getCurrentStore:o}=f();return c.jsx(e,{...r,store:t})}}function _(e){const r=()=>{a()&&window.FramerAuth.signOut(\"/\")};return t=>{const{store:n,setStore:o,getCurrentStore:u}=f();return n.user?c.jsx(e,{...t,onClick:r}):null}}function p(e){return r=>{const{store:t,setStore:n,getCurrentStore:o}=f();return t.user?c.jsx(e,{...r,text:t.user.email}):null}}function y(e){return r=>{const{store:t,setStore:n,getCurrentStore:o}=f();return t.user?c.jsx(e,{...r,text:t.user.first_name}):null}}function m(e){return r=>{const{store:u,setStore:s,getCurrentStore:i}=f(),l=o(null),a=n((()=>!!u.user&&u.isAuthenticated),[u.user]);t((()=>{l.current&&(l.current.style.display=a?\"\":\"none\")}),[l.current,a]);return n((()=>!0!==a?c.jsx(\"div\",{ref:l}):c.jsx(e,{ref:l,...r})),[r,a,void 0])}}function g(e){return r=>{const{store:u,setStore:s,getCurrentStore:i}=f(),l=o(null),a=n((()=>!!u.user&&u.isAuthenticated),[u.user]);t((()=>{l.current&&(l.current.style.display=a?\"none\":\"\")}),[l.current,a]);return n((()=>!1!==a?c.jsx(\"div\",{ref:l}):c.jsx(e,{ref:l,...r})),[r,a,void 0])}}export{f as useStore,d as withAuth,p as withEmail,y as withFirstName,S as withFullName,m as withLoggedIn,g as withLoggedOut,_ as withSignOut,x as withStore};\n","import t,{useState as r,useEffect as e}from\"react\";var n,s={exports:{}},o={};s.exports=function(){if(n)return o;n=1;var r=t,e=Symbol.for(\"react.element\"),s=Symbol.for(\"react.fragment\"),u=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(t,r,n){var s,o={},c=null,l=null;for(s in void 0!==n&&(c=\"\"+n),void 0!==r.key&&(c=\"\"+r.key),void 0!==r.ref&&(l=r.ref),r)u.call(r,s)&&!i.hasOwnProperty(s)&&(o[s]=r[s]);if(t&&t.defaultProps)for(s in r=t.defaultProps)void 0===o[s]&&(o[s]=r[s]);return{$$typeof:e,type:t,key:c,ref:l,props:o,_owner:a.current}}return o.Fragment=s,o.jsx=c,o.jsxs=c,o}();var u=s.exports;const a=window?.FramerAuth?window.FramerAuth:null,i=t=>{if(a){const[n,s]=r(a.getStoreState());return e((()=>{const r=a.subscribe((t=>{s(t)}),t);return()=>{r()}}),[t]),{store:n,setStore:a.setStoreState,getCurrentStore:a.getStoreState}}{const t={user:null,isAuthenticated:!1,isLoaded:!1};return{store:t,setStore:()=>{},getCurrentStore:()=>t}}};function c(t){return r=>{const{store:e}=i(),n=e.user?.licenses.some((t=>\"active\"===t.status));return n?u.jsx(t,{...r}):null}}function l(t){return r=>{const{store:e}=i(),n=e.user?.licenses.some((t=>\"active\"===t.status));return n?null:u.jsx(t,{...r})}}function f(t){return r=>{const{store:e}=i(),n=e.user?null:r?.variant;return u.jsx(t,{...r,variant:n})}}function v(t){return r=>{const{store:e}=i(),n=r?.productVariantId,s=e.user?.licenses.some((t=>{if(!n)return\"active\"===t.status;return n.split(\",\").map((t=>t.trim())).includes(t.variant_id)&&\"active\"===t.status})),o=s?null:r?.variant;return u.jsx(t,{...r,variant:o})}}function _(t,r){return e=>{const{store:n}=i(),s=n.user?.licenses.some((t=>t.variant_id===r&&\"active\"===t.status));return s?u.jsx(t,{...e}):null}}function d(t,r){return e=>{const{store:n}=i(),s=n.user?.licenses.some((t=>r.includes(t.variant_id)&&\"active\"===t.status));return s?u.jsx(t,{...e}):null}}function p(t,r){return e=>{const{store:n}=i(),s=e?.[r]&&n.user?.licenses.some((t=>t.variant_id===e[r]&&\"active\"===t.status))?null:e?.variant;return u.jsx(t,{...e,variant:s})}}export{c as withActiveLicense,l as withNoActiveLicense,_ as withPlan,d as withSomePlan,f as withVariant,v as withVariantActiveLicense,p as withVariantPlan};\n","import r,{useState as t,useEffect as e,useMemo as n,useRef as o}from\"react\";import{useRouter as a,RenderTarget as s,inferInitialRouteFromPath as u}from\"framer\";var i,d={exports:{}},l={};d.exports=function(){if(i)return l;i=1;var t=r,e=Symbol.for(\"react.element\"),n=Symbol.for(\"react.fragment\"),o=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(r,t,n){var u,i={},d=null,l=null;for(u in void 0!==n&&(d=\"\"+n),void 0!==t.key&&(d=\"\"+t.key),void 0!==t.ref&&(l=t.ref),t)o.call(t,u)&&!s.hasOwnProperty(u)&&(i[u]=t[u]);if(r&&r.defaultProps)for(u in t=r.defaultProps)void 0===i[u]&&(i[u]=t[u]);return{$$typeof:e,type:r,key:d,ref:l,props:i,_owner:a.current}}return l.Fragment=n,l.jsx=u,l.jsxs=u,l}();var c=d.exports;const f=window?.FramerAuth?window.FramerAuth:null,p=r=>{if(f){const[n,o]=t(f.getStoreState());return e((()=>{const t=f.subscribe((r=>{o(r)}),r);return()=>{t()}}),[r]),{store:n,setStore:f.setStoreState,getCurrentStore:f.getStoreState}}{const r={user:null,isAuthenticated:!1,isLoaded:!1};return{store:r,setStore:()=>{},getCurrentStore:()=>r}}},w=()=>\"undefined\"!=typeof window&&window.FramerAuth;function S(r,t,e=!0){return o=>{const{store:a,setStore:s,getCurrentStore:u}=p([\"user.data\"]),i=n((()=>{if(!a.user?.data)return!1;return!0===Object.entries(a.user.data).some((([r,n])=>r.startsWith(`${t}:`)&&n===e))}),[a.user?.data])?null:\"Empty State\";return c.jsx(r,{...o,variant:i})}}function v(r,t,a=!0){return s=>{const{store:u,setStore:i,getCurrentStore:d}=p([`user.data.${t}:${s?.slug}`]),l=o(null),f=n((()=>`${t}:${s?.slug}`),[s]),w=n((()=>!!g()||!(!f||!u?.user?.data)&&u?.user?.data?.[f]===a),[u,f]);e((()=>{if(l.current){const r=l.current.parentElement;if(!r)return;r.style.display=w?\"\":\"none\"}}),[l.current,w]);return n((()=>!0!==w?c.jsx(\"div\",{ref:l}):c.jsx(r,{ref:l,...s})),[s,w,void 0])}}function y(r,t,e=!0){return o=>{const s=a(),{store:i,setStore:d,getCurrentStore:l}=p([`user.data.${t}:${o?.slug}`]),f=n((()=>`${t}:${o?.slug}`),[o]),S=n((()=>void 0!==i?.user?.data&&i?.user?.data?.[f]===e),[i?.user?.data?.[f],f]),v=n((()=>S?o?.variant:void 0),[S,o?.variant]);return i.user?c.jsx(r,{...o,variant:v,onClick:async r=>{try{if(!w())throw new Error(\"FramerAuth library not found.\");if(!0===S){window.FramerAuth.patchUserData({[f]:null}).then((({data:r,error:e})=>{if(e)throw console.log(e),new Error(`Error updating ${t} status.`)}));const r=l(),e=void 0===r?.user?.data?{}:{...r.user.data,[f]:null},n={...r.user,data:e};d({user:n},[`user.data.${f}`])}else{window.FramerAuth.patchUserData({[f]:e}).then((({data:r,error:e})=>{if(e)throw console.log(e),new Error(`Error updating ${t} status.`)}));const r=l(),n=void 0===r?.user?.data?{}:{...r.user.data,[f]:e},a={...r.user,data:n};if(d({user:a},[`user.data.${f}`]),o?.link){const[r,t]=o.link.split(\"#\"),{routeId:e,pathVariables:n}=u(s.routes,r);e&&s.navigate(e,t,n)}}}catch(r){console.error(r)}}}):null}}function g(){return s.current()===s.canvas}function h(){return s.current()===s.preview}function m(r){return t=>{const{style:e,...n}=t;return c.jsx(r,{...n,style:{...e,gridAutoRows:\"auto\"}})}}export{g as isCanvas,h as isPreview,m as withDynamicGridHeight,v as withIsTagged,S as withTags,y as withToggleTag};\n","/*\n***************************\n**       FramerAuth      **\n***************************\nModifying the core functionality (core, store or extension overrides) will void your support\nPlease add custom overrides at the end of the file.\n*/// @ts-ignore\nimport*as faCore from\"https://cdn.framerauth.com/packages/overrides/core/live/latest/core.js\";// @ts-ignore\nimport*as faStore from\"https://cdn.framerauth.com/packages/overrides/store/live/latest/store.js\";// @ts-ignore\nimport*as faExtensions from\"https://cdn.framerauth.com/packages/overrides/extensions/live/latest/extensions.js\";/*\n ***************************\n **     Core overrides    **\n ***************************\n */export function withFullName(Component){return faCore.withFullName(Component);}export function withAuth(Component){return faCore.withAuth(Component);}export function withStore(Component){return faCore.withStore(Component);}export function withSignOut(Component){return faCore.withSignOut(Component);}export function withEmail(Component){return faCore.withEmail(Component);}export function withFirstName(Component){return faCore.withFirstName(Component);}export function withLoggedIn(Component){return faCore.withLoggedIn(Component);}export function withLoggedOut(Component){return faCore.withLoggedOut(Component);}/*\n ***************************\n **    Store overrides    **\n ***************************\n */export function withActiveLicense(Component){return faStore.withActiveLicense(Component);}export function withNoActiveLicense(Component){return faStore.withNoActiveLicense(Component);}export function withVariant(Component){return faStore.withVariant(Component);}export function withVariantActiveLicense(Component){return faStore.withVariantActiveLicense(Component);}/*\n ***************************\n **  Extension overrides  **\n ***************************\n */export function withDynamicGridHeight(Component){return faExtensions.withDynamicGridHeight(Component);}/*\n ***************************\n **    Legacy overrides   **\n ***************************\n */export function withIsLessonComplete(Component){return faExtensions.withIsTagged(Component,\"course:status\",\"completed\");}export function withActionCompleteLesson(Component){return faExtensions.withToggleTag(Component,\"course:status\",\"completed\");}/*\n***********************************************************\n** FramerAuth -- Make your own CUSTOM withPlan overrides **\n***********************************************************\nTo make your own overrides for withPlan, follow these 3 steps:\n1. Copy the override below and change the override name \"withPlanStandard\" to something else (e.g. withPlanPremium).\n2. Change the licenseId field inside your new override to the license ID you want to use.\n3. Start using your new override on your site. Make sure the override code is updated on your site.\n*/export function withPlanStandard(Component){// Enter your own LemonSqueezy Product Variant ID here\nconst licenseId=\"123456\"// <-- Your LemonSqueezy Product Variant ID for this override goes here (example)\n;return faStore.withPlan(Component,licenseId);}// copy until here\n/*\n**************************************************************\n** FramerAuth -- Make your own CUSTOM bookmarking overrides **\n**************************************************************\nTo make your own overrides for bookmarking, follow these 4 steps:\n1. Copy the override below and change the override name \"withComponentBookmarkBlog\" to something else (e.g. withComponentBookmarkLesson).\n2. Change the prefix field inside your new override (e.g. \"bookmark:lesson\")\n3. Repeat steps 1 & 2 for withToggleBookmarkBlog & withToggleBookmarkLesson\n3. Start using your new override on your site. Make sure the override code is updated on your site.\n*/export function withComponentBookmarkBlog(Component){const prefix=\"bookmark:blog\"// <--- Your custom prefix for this override goes here (example)\n;return faExtensions.withTags(Component,prefix);}export function withIsBookmarkedBlog(Component){const prefix=\"bookmark:blog\"// <--- Your custom prefix for this override goes here (example)\n;return faExtensions.withIsTagged(Component,prefix);}export function withToggleBookmarkBlog(Component){const prefix=\"bookmark:blog\"// <--- Your custom prefix for this override goes here (example)\n;return faExtensions.withToggleTag(Component,prefix);}\nexport const __FramerMetadata__ = {\"exports\":{\"withDynamicGridHeight\":{\"type\":\"reactHoc\",\"name\":\"withDynamicGridHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVariantActiveLicense\":{\"type\":\"reactHoc\",\"name\":\"withVariantActiveLicense\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLoggedOut\":{\"type\":\"reactHoc\",\"name\":\"withLoggedOut\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAuth\":{\"type\":\"reactHoc\",\"name\":\"withAuth\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFirstName\":{\"type\":\"reactHoc\",\"name\":\"withFirstName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFullName\":{\"type\":\"reactHoc\",\"name\":\"withFullName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStore\":{\"type\":\"reactHoc\",\"name\":\"withStore\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPlanStandard\":{\"type\":\"reactHoc\",\"name\":\"withPlanStandard\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmail\":{\"type\":\"reactHoc\",\"name\":\"withEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withIsLessonComplete\":{\"type\":\"reactHoc\",\"name\":\"withIsLessonComplete\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withComponentBookmarkBlog\":{\"type\":\"reactHoc\",\"name\":\"withComponentBookmarkBlog\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLoggedIn\":{\"type\":\"reactHoc\",\"name\":\"withLoggedIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withToggleBookmarkBlog\":{\"type\":\"reactHoc\",\"name\":\"withToggleBookmarkBlog\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNoActiveLicense\":{\"type\":\"reactHoc\",\"name\":\"withNoActiveLicense\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withIsBookmarkedBlog\":{\"type\":\"reactHoc\",\"name\":\"withIsBookmarkedBlog\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withActionCompleteLesson\":{\"type\":\"reactHoc\",\"name\":\"withActionCompleteLesson\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withActiveLicense\":{\"type\":\"reactHoc\",\"name\":\"withActiveLicense\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVariant\":{\"type\":\"reactHoc\",\"name\":\"withVariant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSignOut\":{\"type\":\"reactHoc\",\"name\":\"withSignOut\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FramerAuth.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,useRef}from\"react\";import{FormState,Events,StandardButton,standardButtonPropertyControls,useThentyForm}from\"https://framerusercontent.com/modules/diyk5889JEo4mM5y5sJr/WO0BY8LwVoqggEJBPHWk/ThentyShared.js\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 300\n * @framerDisableUnlink\n */export default function SubmitButton(props){const{defaultText,successText,errorText,successEvent,errorEvent,loadingEvent}=props;const ref=useRef(null);const[loading,setLoading]=useState(false);const{formState,setFormState,fireFormEvent}=useThentyForm(ref);useEffect(()=>{switch(formState){case FormState.Success:successEvent?.();setLoading(false);break;case FormState.Error:errorEvent?.();setLoading(false);break;case FormState.Loading:loadingEvent?.();setLoading(true);break;}},[formState]);const onClick=()=>{fireFormEvent(Events.SubmitButtonClick);};return /*#__PURE__*/_jsx(StandardButton,{ref:ref,...props,loading:loading,\"data-thenty-submit-button\":true,onClick:onClick,\"data-no-enter-focus\":true,children:formState===FormState.Success?successText||defaultText:formState===FormState.Error?errorText||defaultText:defaultText});}SubmitButton.displayName=\"Thenty Submit Button\";addPropertyControls(SubmitButton,{defaultText:{type:ControlType.String,placeholder:\"Button Text\",defaultValue:\"Submit\",title:\"Default\"},successText:{type:ControlType.String,placeholder:\"Success Text\",defaultValue:\"Success!\",title:\"Success\"},errorText:{type:ControlType.String,placeholder:\"Error Text\",defaultValue:\"Error\",title:\"Error\"},...standardButtonPropertyControls({defaultColor:\"#FFFFFF\",defaultFill:\"#0075FF\",defaultHoverFill:\"#1A81FF\",hasDefaultBorder:false,loadingSpinner:true}),successEvent:{type:ControlType.EventHandler,title:\"Success\"},errorEvent:{type:ControlType.EventHandler,title:\"Error\"},loadingEvent:{type:ControlType.EventHandler,title:\"Loading\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SubmitButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"300\",\"framerSupportedLayoutHeight\":\"any\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget,withCSS}from\"framer\";import{useRef}from\"react\";import{textOptions,textOptionsToStyles,useThentyForm}from\"https://framerusercontent.com/modules/diyk5889JEo4mM5y5sJr/WO0BY8LwVoqggEJBPHWk/ThentyShared.js\";const CANVAS_HIDDEN_CLASS_NAME=\"thenty-error-canvas-hidden\";const HIDDEN_CLASS_NAME=\"thenty-error-hidden\";function ThentyFormErrorMessageComponent(props){const{font,color,prefix,suffix,style,textOptions}=props;const Tag=props.tag||\"p\";const isCanvas=RenderTarget.current()===RenderTarget.canvas;const ref=useRef(null);const{formError}=useThentyForm(ref);let className=\"\";if(isCanvas){className=CANVAS_HIDDEN_CLASS_NAME;}else if(!formError){className=HIDDEN_CLASS_NAME;}return /*#__PURE__*/_jsxs(Tag,{ref:ref,className:className,style:{color,margin:0,whiteSpace:style?.width?undefined:\"nowrap\",fontWeight:400,textAlign:\"center\",...textOptionsToStyles(textOptions),...font,...style},children:[prefix,isCanvas?\"Error message\":formError,suffix]});}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 300\n * @framerDisableUnlink\n */const ThentyFormErrorMessage=withCSS(ThentyFormErrorMessageComponent,[`[data-framer-component-container=\"true\"] div:has(> .${CANVAS_HIDDEN_CLASS_NAME}) { display: none !important; }`,`div:has(> .${HIDDEN_CLASS_NAME}) { display: none !important; }`,`.${HIDDEN_CLASS_NAME} { display: none !important; }`],\"\");export default ThentyFormErrorMessage;ThentyFormErrorMessage.displayName=\"Thenty Error Message\";addPropertyControls(ThentyFormErrorMessage,{font:{type:\"font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:12,lineHeight:1.4,textAlign:\"center\"}},color:{type:ControlType.Color,defaultValue:\"#FF5A6F\"},prefix:{type:ControlType.String,defaultValue:\"\"},suffix:{type:ControlType.String,defaultValue:\"\"},textOptions:textOptions()});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ThentyFormErrorMessage\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"300\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget,Link}from\"framer\";import{useRef,useEffect,useState}from\"react\";import{HiddenComponentLabel,FormState,Events,ThentyLogo,useThentyForm,useThenty}from\"https://framerusercontent.com/modules/diyk5889JEo4mM5y5sJr/WO0BY8LwVoqggEJBPHWk/ThentyShared.js\";import{thentyAuth}from\"https://cdn.thenty.io/beta/thenty-sdk.min.js\";const formInputNames=[\"email_address\",\"password\",\"name\",\"conditions\"];const updateProfilePrefillInputs=[\"email_address\",\"name\"];var FormType;(function(FormType){FormType[\"SignUp\"]=\"signUp\";FormType[\"LogIn\"]=\"logIn\";FormType[\"ForgotPassword\"]=\"forgotPassword\";FormType[\"UpdateProfile\"]=\"updateProfile\";FormType[\"UpdatePassword\"]=\"updatePassword\";FormType[\"AcceptInvite\"]=\"acceptInvite\";})(FormType||(FormType={}));const FORM_TYPE_NAME={[\"signUp\"]:\"Sign Up\",[\"logIn\"]:\"Log In\",[\"forgotPassword\"]:\"Forgot Password\",[\"updateProfile\"]:\"Update Profile\",[\"updatePassword\"]:\"Update Password\",[\"acceptInvite\"]:\"Accept Invite\"};/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerDisableUnlink\n */export default function ThentyForm({formType,productId,redirectLink,redirectDelay,prefillUrlParameters,successEvent,errorEvent,loadingEvent}){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const ref=useRef(null);const redirectLinkRef=useRef(null);const[redirectHref,setRedirectHref]=useState(redirectLink);const{formRef,setFormState,fireFormEvent}=useThentyForm(ref);const{authorization}=useThenty();const onError=error=>{setFormState(FormState.Error);if(typeof error===\"string\"){fireFormEvent(Events.Error,error);}else if(error instanceof Error){fireFormEvent(Events.Error,error.message);}errorEvent?.();};useEffect(()=>{const onSubmitButtonClick=async()=>{const form=formRef.current;if(!form){return;}const formData=collectFormData(form);setFormState(FormState.Loading);loadingEvent?.();let endpoint=\"\";let data=formData;let method=\"POST\";let updateAuthorization=false;let authValue=undefined;switch(formType){case\"signUp\":endpoint=`/auth/members/register`;data={...data,...getThentyFetchData(productId)};updateAuthorization=true;break;case\"logIn\":endpoint=`/auth/members/login`;updateAuthorization=true;break;case\"forgotPassword\":endpoint=`/auth/members/reset`;break;case\"updateProfile\":endpoint=`/members/${authorization?.member?.id}`;method=\"PUT\";authValue=authorization?.authorization?.key;if(!data.hasOwnProperty(\"email_address\")&&authorization?.member?.email){data={...data,email_address:authorization.member.email};}break;case\"updatePassword\":case\"acceptInvite\":const url=window?.location?new URL(window.location.toString()):null;const token=url?.searchParams?.get(\"token\");endpoint=`/auth/members/password/${token}`;method=\"PUT\";break;}if(endpoint){try{const responseBody=await thentyAuth.fetchGeneric(endpoint,method,data,authValue);if(updateAuthorization){thentyAuth.setAuthorization(responseBody);}setFormState(FormState.Success);successEvent?.();let hasRedirect=redirectLink?true:false;const responseRedirectUrl=responseBody?.redirect_url;if(responseRedirectUrl&&!hasRedirect){const relativePath=getRelativePath(responseRedirectUrl);setRedirectHref(relativePath);hasRedirect=true;}if(hasRedirect&&redirectLinkRef.current){setTimeout(()=>{if(redirectLinkRef.current){redirectLinkRef.current.click();}},Math.max(redirectDelay*1e3,100));}}catch(error){onError(error);}}};const onGoogleSignIn=async()=>{try{const responseBody=await thentyAuth.fetchGeneric(`/oauth/members/code/google`,\"POST\",getThentyFetchData(productId));if(responseBody.redirect_url){window.open(toURLPath(responseBody.redirect_url),\"_self\");}}catch(error){onError(error);}};const handleEnterKey=e=>{if(e.key===\"Enter\"&&e.target.tagName!==\"TEXTAREA\"){e.preventDefault();const form=formRef.current;if(!form)return;const inputs=getInputsInForm(form);const currentIndex=inputs.indexOf(e.target);if(currentIndex===inputs.length-1){// If on last input, submit the form\nfireFormEvent(Events.SubmitButtonClick);}else if(currentIndex!==-1){// Focus next input\ninputs[currentIndex+1].focus();}}};if(ref.current){const form=ref.current.parentElement.parentElement;if(form){form.setAttribute(\"data-thenty-form\",\"true\");formRef.current=form;window.dispatchEvent(new Event(Events.FormInitialized));// Add keypress event listener\nform.addEventListener(\"keydown\",handleEnterKey);// Check URL parameters for prefill values\nif(prefillUrlParameters){const urlParams=new URLSearchParams(window?.location?.search);const nameParam=urlParams.get(prefillUrlParameters.name);if(nameParam){prefillInput(form,\"name\",nameParam);}const emailParam=urlParams.get(prefillUrlParameters.email);if(emailParam){prefillInput(form,\"email_address\",emailParam);}}form.addEventListener(Events.SubmitButtonClick,onSubmitButtonClick);form.addEventListener(Events.GoogleSignIn,onGoogleSignIn);// Pre-fill update profile fields\nif(formType===\"updateProfile\"&&!isCanvas){if(authorization?.member){setFormState(FormState.Default);for(const[key,value]of Object.entries(authorization.member)){if(updateProfilePrefillInputs.includes(key)||key.startsWith(\"custom:\")){prefillInput(form,key,value);}// Legacy fix for cognito change\nif(key===\"email\"){prefillInput(form,\"email_address\",value);}}}}}}return()=>{if(formRef.current){formRef.current.removeEventListener(Events.SubmitButtonClick,onSubmitButtonClick);formRef.current.removeEventListener(Events.GoogleSignIn,onGoogleSignIn);formRef.current.removeEventListener(\"keydown\",handleEnterKey);}};},[]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(HiddenComponentLabel,{ref:ref,\"data-thenty-form-manager\":true,children:[/*#__PURE__*/_jsx(ThentyLogo,{}),/*#__PURE__*/_jsxs(\"span\",{children:[FORM_TYPE_NAME[formType],\" Form\"]})]}),/*#__PURE__*/_jsx(Link,{ref:redirectLinkRef,href:redirectHref,openInNewTab:false,smoothScroll:false,children:/*#__PURE__*/_jsx(\"a\",{style:{display:\"none\"}})})]});}ThentyForm.displayName=\"Thenty Form Manager\";addPropertyControls(ThentyForm,{formType:{type:ControlType.Enum,defaultValue:\"signUp\",options:Object.keys(FORM_TYPE_NAME),optionTitles:Object.values(FORM_TYPE_NAME),displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},productId:{type:ControlType.String,defaultValue:\"\",placeholder:\"Thenty Product ID\",title:\"Product ID\",hidden:props=>props.formType!==\"signUp\"},redirectLink:{type:ControlType.Link,title:\"Redirect Override\",description:\"Note: This will override the redirect URL returned from thenty including stripe checkout links\"},redirectDelay:{type:ControlType.Number,defaultValue:0,min:0,step:.1,displayStepper:true,title:\"Delay\"},prefillUrlParameters:{type:ControlType.Object,optional:true,defaultValue:{name:\"name\",email:\"email_address\"},title:\"Prefill\",controls:{name:{type:ControlType.String,defaultValue:\"name\",title:\"Name\"},email:{type:ControlType.String,defaultValue:\"email_address\",title:\"Email\",description:\"Prefill the name and email fields with URL parameters.\"}}},successEvent:{type:ControlType.EventHandler,title:\"Success\"},errorEvent:{type:ControlType.EventHandler,title:\"Error\"},loadingEvent:{type:ControlType.EventHandler,title:\"Loading\"}});function collectFormData(form){const data={};const inputs=form.querySelectorAll(\"input, textarea, select\");let isValid=true;let errorMessage=\"\";for(let i=0;i<inputs.length;i++){const input=inputs[i];if(input&&input.name&&!input.disabled&&input.type!==\"submit\"&&input.type!==\"button\"&&(formInputNames.includes(input.name)||input.name.startsWith(\"custom:\"))){// Check if the field is required and empty\nif(input.hasAttribute(\"required\")&&!input.value.trim()){isValid=false;errorMessage=`${input.name} is required.`;input.focus();input.setCustomValidity(\"Please fill out this field.\");input.reportValidity();break;}else{input.setCustomValidity(\"\");}// Validate email address\nif(input.name===\"email_address\"&&input.value.trim()){if(!isValidEmail(input.value.trim())){isValid=false;errorMessage=\"Please enter a valid email address.\";input.focus();input.setCustomValidity(\"Please enter a valid email address.\");input.reportValidity();break;}}if(input.type===\"checkbox\"||input.type===\"radio\"){// For checkboxes and radio buttons, only include if checked\nif(input.checked){data[input.name]=input.value;}}else{// For all other inputs (text, number, etc.), add the value directly\ndata[input.name]=input.value;}}}return data;}function getThentyFetchData(productId){const urlParams=new URLSearchParams(window?.location?.search);const planId=urlParams?.get(\"planID\");const referral=window.Rewardful?.referral;return{...productId?{planIdOverride:productId}:{},...planId&&{planIdOverride:planId},...referral&&{rewardfulClientReferenceId:referral}};}function prefillInput(form,inputName,value){const input=form.querySelector(`\n\t\tinput[name=\"${inputName}\" i]:not([data-framerforms-no-prefill]),\n\t\tselect[name=\"${inputName}\" i]:not([data-framerforms-no-prefill]),\n\t\ttextarea[name=\"${inputName}\" i]:not([data-framerforms-no-prefill])`);if(input){if(input.tagName==\"INPUT\"&&input.getAttribute(\"type\")==\"hidden\"){if(input.hasAttribute(\"data-framerforms-set-value-event\")){input.dispatchEvent(new CustomEvent(\"framerFormsSetValue\",{bubbles:true,detail:value}));}}else{const elementType=input.tagName==\"INPUT\"?window.HTMLInputElement:input.tagName==\"TEXTAREA\"?window.HTMLTextAreaElement:input.tagName==\"SELECT\"?window.HTMLSelectElement:null;if(elementType){const nativeInputValueSetter=Object.getOwnPropertyDescriptor(elementType.prototype,\"value\").set;nativeInputValueSetter.call(input,value);input.dispatchEvent(new Event(\"input\",{bubbles:true}));}else{input.value=value;}}}}const getRelativePath=url=>{if(typeof window===\"undefined\"){return url;}// If it's already a relative path starting with '/', return it as is\nif(url.startsWith(\"/\")){return thentyAuth.assessPathForAccess(url);}// If it's an absolute URL, check if it's on the same domain\nif(url.startsWith(\"http\")){try{const urlObj=new URL(url);const currentDomain=window.location.origin;if(urlObj.origin===currentDomain){return thentyAuth.assessPathForAccess(urlObj.pathname,urlObj.search+urlObj.hash);}return url;}catch(e){// If URL is invalid, return the original input\nreturn url;}}// For any other case, add a leading '/'\nreturn thentyAuth.assessPathForAccess(url);};const toURLPath=url=>{if(url.startsWith(\"http\")){return url;}if(url.startsWith(\"/\")){return url;}return`/${url}`;};function getInputsInForm(form){return Array.from(form.querySelectorAll(`input:not([type=\"hidden\"]):not([disabled]):not([name=\"\"]):not([tabindex=\"-1\"]):not([data-framerforms-set-value-event]),\n\t\t\ttextarea:not([disabled]):not([name=\"\"]):not([tabindex=\"-1\"]),\n\t\t\tselect:not([disabled]):not([name=\"\"]):not([tabindex=\"-1\"]),\n\t\t\tbutton:not([disabled]):not([tabindex=\"-1\"]):not([data-no-enter-focus])`)).filter(el=>window.getComputedStyle(el).display!==\"none\");}function isValidEmail(email){// Regular expression pattern for email validation\nconst emailRegex=/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;// Test the email against the regex pattern\nreturn emailRegex.test(email);}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ThentyForm\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ThentyForm.map"],"mappings":"0XAA8vE,SAAS,EAAE,EAAE,CAAC,MAAO,IAAG,CAAC,GAAK,CAAC,MAAMA,EAAE,SAASC,EAAE,gBAAgBC,GAAGC,GAAG,CAACC,EAAEC,EAAE,KAAK,CAACC,EAAEC,OAAO,CAAC,CAACP,EAAE,MAAMA,EAAE,iBAAiB,CAACA,EAAE,KAAK,CAAC,CAA2E,OAA1E,OAAO,CAAC,EAAE,UAAU,EAAE,QAAQ,MAAM,QAAQM,EAAE,OAAO,MAAM,CAACF,EAAE,QAAQE,EAAE,CAAC,CAAQC,OAAO,CAAC,IAAID,EAAuBE,EAAE,IAAIC,EAAE,CAAC,IAAIL,EAA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