{"version":3,"file":"FramerAuthV2.96te3Set.mjs","names":["showIfSignedOut","showIfSignedIn","buttonSignOut","useUser"],"sources":["https:/framerusercontent.com/modules/0BfdLsKKp56JeKiUhcpk/VGj4OAODtUBAlRHOyVQK/FramerAuthV2.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{buttonSignOut,showIfSignedIn,showIfSignedOut,showIfWithTag,showIfWithoutTag,toggleVariant,toggleVariantIfWithTag,useUser,withBookmarks,withIsBookmarked,withToggleBookmark}from\"https://cdn.jsdelivr.net/npm/@framerauth/sdk@2/dist/framerauth.mjs\";import{forwardRef}from\"react\";/**\n * [START] FRAMEAUTH OVERRIDES\n *//* [START] AUTH */export function ShowIfSignedOut(Component){return showIfSignedOut(Component);}export function ShowIfSignedIn(Component){return showIfSignedIn(Component);}export function SignOut(Component){const redirectLink=\"/\";const options={redirectTo:redirectLink};return buttonSignOut(Component,options);}/* [END] AUTH *//* [START] BASICS */export function EmailAddress(Component){return props=>{const userStore=useUser();if(!userStore||!userStore.user)return null;const email=userStore.user.email;return /*#__PURE__*/_jsx(Component,{...props,text:email});};}export function Name(Component){return props=>{const userStore=useUser();if(!userStore||!userStore.user)return null;const name=userStore.user.name;return /*#__PURE__*/_jsx(Component,{...props,text:name});};}export function ShowIfWithTag(Component){return showIfWithTag(Component);}export function ShowIfWithoutTag(Component){return showIfWithoutTag(Component);}export function ToggleVariant(Component){return toggleVariant(Component);}export function ToggleVariantIfWithTag(Component){return toggleVariantIfWithTag(Component);}/* [END] BASICS *//* [START] MARK AS COMPLETE */export function CompleteLesson(Component){return withToggleBookmark(Component,\"completed\");}export function IsComplete(Component){return withIsBookmarked(Component,\"completed\");}/* [END] MARK AS COMPLETE *//* [START] BOOKMARKING */export function BookmarkList(Component){return withBookmarks(Component,\"saved-for-later\");}export function ShowIfBookmarked(Component){return withIsBookmarked(Component,\"saved-for-later\");}export function ToggleBookmark(Component){return withToggleBookmark(Component,\"saved-for-later\");}/* [END] BOOKMARKING */export function withCategorySearch(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const{onClick}=props;const handleClick=event=>{if(typeof window===\"undefined\")return;const isPlainPrimaryClick=event.button===0&&!event.metaKey&&!event.ctrlKey&&!event.shiftKey&&!event.altKey;if(!isPlainPrimaryClick){if(typeof onClick===\"function\")onClick(event);return;}const clickedElement=event.currentTarget;if(!clickedElement)return;const selectSelector='select[name=\"Category\"]';const selectedCategoryLabelSelector='[aria-label=\"Selected category\"]';let categorySelect=null;let selectedCategoryLabelElement=null;const closestForm=clickedElement.closest(\"form\");if(closestForm){selectedCategoryLabelElement=closestForm.querySelector(selectedCategoryLabelSelector);categorySelect=closestForm.querySelector(selectSelector);}if(!selectedCategoryLabelElement||!categorySelect){let current=clickedElement.parentElement;while(current&&(!selectedCategoryLabelElement||!categorySelect)){if(!selectedCategoryLabelElement){selectedCategoryLabelElement=current.querySelector(selectedCategoryLabelSelector);}if(!categorySelect){categorySelect=current.querySelector(selectSelector);}current=current.parentElement;}}const normalizeCategory=raw=>{const normalized=(raw??\"\").trim().toLowerCase();if(normalized===\"horses\")return\"Horses\";if(normalized===\"equipment\")return\"Equipment\";if(normalized===\"services\")return\"Services\";if(normalized===\"farms\")return\"Farms\";return null;};const selectedLabelText=selectedCategoryLabelElement?.textContent??\"\";const selectedText=categorySelect?.selectedOptions?.[0]?.textContent??\"\";const selectedValue=categorySelect?.value??\"\";const category=normalizeCategory(selectedLabelText)??normalizeCategory(selectedText)??normalizeCategory(selectedValue)??\"Horses\";event.preventDefault();window.location.assign(`/listings?category=${encodeURIComponent(category)}`);};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick});});}/**\n * [END] FRAMEAUTH OVERRIDES\n */\nexport const __FramerMetadata__ = {\"exports\":{\"BookmarkList\":{\"type\":\"reactHoc\",\"name\":\"BookmarkList\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CompleteLesson\":{\"type\":\"reactHoc\",\"name\":\"CompleteLesson\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCategorySearch\":{\"type\":\"reactHoc\",\"name\":\"withCategorySearch\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SignOut\":{\"type\":\"reactHoc\",\"name\":\"SignOut\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ToggleVariantIfWithTag\":{\"type\":\"reactHoc\",\"name\":\"ToggleVariantIfWithTag\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfWithTag\":{\"type\":\"reactHoc\",\"name\":\"ShowIfWithTag\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfBookmarked\":{\"type\":\"reactHoc\",\"name\":\"ShowIfBookmarked\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"IsComplete\":{\"type\":\"reactHoc\",\"name\":\"IsComplete\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfSignedIn\":{\"type\":\"reactHoc\",\"name\":\"ShowIfSignedIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ToggleVariant\":{\"type\":\"reactHoc\",\"name\":\"ToggleVariant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ToggleBookmark\":{\"type\":\"reactHoc\",\"name\":\"ToggleBookmark\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Name\":{\"type\":\"reactHoc\",\"name\":\"Name\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfSignedOut\":{\"type\":\"reactHoc\",\"name\":\"ShowIfSignedOut\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfWithoutTag\":{\"type\":\"reactHoc\",\"name\":\"ShowIfWithoutTag\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"EmailAddress\":{\"type\":\"reactHoc\",\"name\":\"EmailAddress\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FramerAuthV2.map"],"mappings":"0MAEqB,SAAgB,EAAgB,EAAU,CAAC,OAAOA,EAAgB,CAA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