{"version":3,"file":"PasswordGuard.BZ0z3wRB.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/66W1ra8zEerJnmtrGjKn/2DxupYLLWN7O0KguQOhp/PasswordGuard.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";const SESSION_KEY=\"portfolio_auth\";const PROTECTED_PATHS=[\"/title-closing-experience\",\"/seller-net-sheet-for-agents\",\"/first-time-homebuyer-edu-center\"];export function withPasswordGuard(Component){return function ProtectedPage(props){const[authed,setAuthed]=useState(false);useEffect(()=>{const path=window.location.pathname;const isProtected=PROTECTED_PATHS.some(p=>path.includes(p));if(!isProtected){setAuthed(true);return;}const isAuthed=sessionStorage.getItem(SESSION_KEY);if(!isAuthed){window.location.replace(\"/password?redirect=\"+encodeURIComponent(path));}else{setAuthed(true);}},[]);if(!authed)return null;return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withPasswordGuard\":{\"type\":\"reactHoc\",\"name\":\"withPasswordGuard\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PasswordGuard.map"],"mappings":"uIAA0O,SAAgB,EAAkB,EAAU,CAAC,OAAO,SAAuB,EAAM,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAS,EAAK,EAAuV,OAArV,MAAc,CAAC,IAAM,EAAK,EAAO,SAAS,SAAqE,GAAG,CAA7C,EAAgB,KAAK,GAAG,EAAK,SAAS,CAAC,CAAiB,EAAE,CAAC,EAAU,EAAI,EAAE,MAAO,CAAgB,eAAe,QAAQ,CAAwB,EAAiF,EAAU,EAAI,EAA5F,EAAO,SAAS,QAAQ,sBAAsB,mBAAmB,CAAI,CAAC,CAAyB,EAAE,CAAC,CAAC,EAAM,EAAuC,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,EAAlD,IAAoD,CAAE,yBAAhsB,IAAsC,EAAO,EAAY,iBAAuB,EAAgB,CAAC,4BAA4B,+BAA+B,kCAAkC"}