{
  "version": 3,
  "sources": ["ssg:https://cdn.thenty.co/beta/thenty-sdk.min.js", "ssg:https://framerusercontent.com/modules/e4iDEzmwwFTJzZrwe2oR/YFfLVZh9S6nmk0pce5BS/Show_Hide_Login_Status.js"],
  "sourcesContent": ["const logStyle=\"color:white;background-color:#FF4A29;font-family:system-ui;font-size:1.2rem;font-weight:bold\";class ThentySDK{constructor(){console.log(\"%cthenty SDK Beta Module\",logStyle),this.apiURL=\"https://api.thenty.io\"}fetchAuthorizationKey(){return(window?.location?new URL(window.location.origin):\"\").host+\".authorization\"}fetchAuthorization(){var e=localStorage.getItem(this.fetchAuthorizationKey());return e?JSON.parse(e):null}setAuthorization(e){var t=this.fetchAuthorizationKey();localStorage.setItem(t,JSON.stringify(e)),window.dispatchEvent(new CustomEvent(\"storage\",{detail:{key:t,newValue:e}}))}fetchMetadataKey(){return(window?.location?new URL(window.location.origin):\"\").host+\".metadata\"}fetchMetadata(){var e=localStorage.getItem(this.fetchMetadataKey());return e?JSON.parse(e):null}logout(e=\"/\"){localStorage.removeItem(this.fetchAuthorizationKey()),window.location.pathname=e}checkForProduct(e=[],t=null){let o=t,r=(o=o||this.fetchAuthorization(),!1);if(o?.hasOwnProperty(\"member\"))for(const a of(o.member.products??[]).map(e=>e.id))if(e.includes(a)){r=!0;break}return r}getRequestHeaders(e=!1){let t=!1;return e&&(t=this.fetchAuthorization()),{\"Content-Type\":\"application/json\",Accept:\"application/json\",\"x-secret-key\":window.variables.secretKey,\"x-site-key\":window.variables.siteKey,\"x-refresh-token\":window.variables.siteKey,...t&&{authorization:t?.authorization?.key,\"x-refresh-token\":t?.authorization.refresh}}}isGoogleRedirect(e=null){e=e??new URLSearchParams(window.location.search);return e?.has(\"code\")&&e?.has(\"state\")&&\"GOOGLE_LOGIN\"===e?.get(\"state\")}fetchGoogleCallback(e=null,t=null){const o=t??new URLSearchParams(window.location.search);fetch(this.apiURL+\"/oauth/members/callback/google\",{method:\"POST\",headers:this.getRequestHeaders(),body:JSON.stringify({code:o.get(\"code\"),...e&&{planIdOverride:e},...window?.Rewardful?.referral&&{rewardfulClientReferenceId:window.Rewardful.referral}})}).then(async e=>{var t=await e.json();if(200<e.status)throw new Error(t.errorMessage);return t}).then(e=>{o.delete(\"code\"),o.delete(\"state\");var t=new URL(window.location.href);t.search=o.toString(),history.replaceState(null,\"\",t.toString()),this.setAuthorization(e),setTimeout(()=>{window.open(e.redirect_url??\"#\",\"_self\")},500)})}refetchSiteMetadataTrigger=()=>{var e=new URL(window.location.origin);window.dispatchEvent(new CustomEvent(\"storage\",{detail:{key:e.host+\".reauth\",newValue:!0}}))};toggleBookmark(e,t,o=void 0){var r=this.fetchAuthorization();return this.fetchGeneric(\"/bookmarks\",\"POST\",{slug:t,collection:e,...void 0!==o&&{value:o}},r?.authorization?.key).then(this.refetchSiteMetadataTrigger)}fetchGeneric(e,t=\"GET\",o=null,r=null){return fetch(\"\"+this.apiURL+e,{method:t,headers:this.getRequestHeaders(r),...o&&{body:JSON.stringify(o)}}).then(async e=>{var t=await e.json();if(200<e.status)throw new Error(t.errorMessage);return t})}}const thentyAuth=new ThentySDK;export{thentyAuth};", "import{jsx as _jsx}from\"react/jsx-runtime\";import{fetchUserData}from\"https://framer.com/m/ThentyHelpers-I0Oh.js\";import{thentyAuth}from\"https://cdn.thenty.co/beta/thenty-sdk.min.js\";export const withLogout=Component=>props=>/*#__PURE__*/_jsx(Component,{...props,onClick:()=>{thentyAuth.logout();}});export const showWhenLoggedIn=Component=>props=>{const{loggedIn}=fetchUserData();return!loggedIn?null:/*#__PURE__*/_jsx(Component,{...props});};export const hideWhenLoggedIn=Component=>props=>{const{loggedIn}=fetchUserData();return loggedIn?null:/*#__PURE__*/_jsx(Component,{...props});};export const withFirstName=Component=>props=>{var _userData_name;const{loggedIn,userData}=fetchUserData();var _userData_name_split_;return!loggedIn||!userData?null:/*#__PURE__*/_jsx(Component,{...props,text:(_userData_name_split_=userData===null||userData===void 0?void 0:(_userData_name=userData.name)===null||_userData_name===void 0?void 0:_userData_name.split(\" \")[0])!==null&&_userData_name_split_!==void 0?_userData_name_split_:\"\"});};export const withFullName=Component=>props=>{const{loggedIn,userData}=fetchUserData();return!loggedIn||!userData?null:/*#__PURE__*/_jsx(Component,{...props,text:userData===null||userData===void 0?void 0:userData.name});};export const withEmail=Component=>props=>{const{loggedIn,userData}=fetchUserData();return!loggedIn||!userData?null:/*#__PURE__*/_jsx(Component,{...props,text:userData===null||userData===void 0?void 0:userData.email});};\nexport const __FramerMetadata__ = {\"exports\":{\"showWhenLoggedIn\":{\"type\":\"reactHoc\",\"name\":\"showWhenLoggedIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"hideWhenLoggedIn\":{\"type\":\"reactHoc\",\"name\":\"hideWhenLoggedIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFullName\":{\"type\":\"reactHoc\",\"name\":\"withFullName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLogout\":{\"type\":\"reactHoc\",\"name\":\"withLogout\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFirstName\":{\"type\":\"reactHoc\",\"name\":\"withFirstName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmail\":{\"type\":\"reactHoc\",\"name\":\"withEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Show_Hide_Login_Status.map"],
  "mappings": "2HAAA,IAAMA,EAAS,+FAAqGC,EAAN,KAAe,CAAC,aAAa,CAAC,QAAQ,IAAI,2BAA2BD,CAAQ,EAAE,KAAK,OAAO,uBAAuB,CAAC,uBAAuB,CAAC,OAAOE,GAAQ,SAAS,IAAI,IAAIA,EAAO,SAAS,MAAM,EAAE,IAAI,KAAK,gBAAgB,CAAC,oBAAoB,CAAC,IAAIC,EAAE,aAAa,QAAQ,KAAK,sBAAsB,CAAC,EAAE,OAAOA,EAAE,KAAK,MAAMA,CAAC,EAAE,IAAI,CAAC,iBAAiB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AU,CAACM,EAAS,KAAkBJ,EAAKJ,EAAU,CAAC,GAAGC,EAAM,KAA+CO,GAAS,IAAI,CAAC,CAAE,EAAeG,EAAUX,GAAWC,GAAO,CAAC,GAAK,CAAC,SAAAC,EAAS,SAAAM,CAAQ,EAAEL,EAAc,EAAE,MAAM,CAACD,GAAU,CAACM,EAAS,KAAkBJ,EAAKJ,EAAU,CAAC,GAAGC,EAAM,KAA+CO,GAAS,KAAK,CAAC,CAAE",
  "names": ["logStyle", "ThentySDK", "window", "e", "t", "r", "a", "thentyAuth", "showWhenLoggedIn", "Component", "props", "loggedIn", "fetchUserData", "p", "hideWhenLoggedIn", "withFirstName", "_userData_name", "userData", "_userData_name_split_", "withFullName", "withEmail"]
}
