1import{t as e}from"./D5s_M7sh.js";import{t}from"./BdI3R-z2.js";import{n}from"./CuDXvFXH.js";var r=[`unit`,`project`,`listing`],i=`:`;function a(e,t){let n=t==null?``:String(t).trim();return n?`${e}${i}${n}`:``}function o(e){let t=e.indexOf(i);if(t<=0)return null;let n=e.slice(0,t);return r.includes(n)?n:null}var s=n(`favorite`,{state:()=>({overrides:{},cached:{},seeded:{},hydrated:{},hydrating:{}}),getters:{hasOverride:e=>t=>!!t&&e.overrides[t]!==void 0,isAnswerable:e=>t=>!!e.hydrated[t]||!!e.seeded[t],resolve:e=>(t,n)=>{if(!t)return n;let r=e.overrides[t];if(r!==void 0)return r;let i=o(t);if(i&&e.hydrated[i])return!1;let a=e.cached[t];return a===void 0?n:a}},actions:{setFavorite(e,t){e&&(this.overrides[e]=t)},clearFavorite(e){e&&delete this.overrides[e]},beginHydration(e){return this.hydrated[e]||this.hydrating[e]?!1:(this.hydrating[e]=!0,!0)},hydrateNamespace(e,t){for(let e of t)!e||this.overrides[e]!==void 0||(this.overrides[e]=!0);this.hydrated[e]=!0,delete this.hydrating[e]},abortHydration(e){delete this.hydrating[e]},applyCachedFavorites(e,t){for(let e of t)e&&(this.cached[e]=!0);this.seeded[e]=!0},reset(){this.overrides={},this.cached={},this.seeded={},this.hydrated={},this.hydrating={}}}}),c=`real-public-favorites:`,l=e=>`${c}${e}`;function u(){try{return globalThis.sessionStorage??null}catch{return null}}function d(e){let t=u();if(!t)return null;try{let n=t.getItem(l(e));if(n===null)return null;let r=JSON.parse(n);return Array.isArray(r)?r.filter(e=>typeof e==`string`&&!!e):null}catch{return null}}function f(e,t){let n=u();if(n)try{n.setItem(l(e),JSON.stringify(t))}catch{}}function p(){let e=u();if(e)for(let t of r)try{e.removeItem(l(t))}catch{}}var m=n(`login`,{state:()=>({isLogin:!1,isInitializing:!0,loginOpen:!1,loginTab:`home-seeker`,registerOpen:!1,resetPasswordOpen:!1,signUpModalOpen:!1,userInfo:{}}),actions:{setIsLogin(e){this.isLogin=e},setIsInitializing(e){this.isInitializing=e},setLoginOpen(e){this.loginOpen=e},setLoginTab(e){this.loginTab=e},setRegisterOpen(e){this.registerOpen=e},setResetPasswordOpen(e){this.resetPasswordOpen=e},setUserInfo(e){this.userInfo=e},setSignUpModalOpen(e){this.signUpModalOpen=e},async logout(){this.isLogin=!1,this.isInitializing=!1,this.userInfo={},s().reset(),p();try{await e(`/api/auth/logout`,{method:`POST`})}catch(e){console.error(`Logout API error:`,e)}}},persist:[{key:`real-public-login`,storage:t.sessionStorage(),pick:[`loginOpen`,`registerOpen`,`resetPasswordOpen`,`signUpModalOpen`]}]});export{s as a,f as i,p as n,a as o,d as r,m as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.