import{n as w}from"./rolldown-runtime-M0oDzQ_3.js";import{En as E,Rn as l,Rt as I}from"./ui-vendor-CepnLjNg.js";import{_ as J,g as K}from"./vue-vendor-BQwgTLLQ.js";import{G as p,W as M}from"./index-8_-Evm_R.js";function v(){try{return p().activeProfileName||"default"}catch{return localStorage.getItem("hermes_active_profile_name")||"default"}}function f(n){return`${h}${n}`}function c(n){return`${d}${n}`}function a(n,e){try{const t=localStorage.getItem(n);return t?JSON.parse(t):e}catch{return e}}function m(n,e){try{localStorage.setItem(n,JSON.stringify(e))}catch{}}function R(n,e){return n.length===e.length&&n.every((t,u)=>t===e[u])}var h,d,$,A=w((()=>{J(),I(),M(),h="hermes_session_pins_v1_",d="hermes_human_only_v1_",$=K("session-browser-prefs",()=>{const n=l(v()),e=l(a(f(n.value),[])),t=l(a(c(n.value),!0));function u(){n.value=v(),e.value=a(f(n.value),[]),t.value=a(c(n.value),!0)}function s(){m(f(n.value),e.value)}function g(){m(c(n.value),t.value)}function o(r){return e.value.includes(r)}function y(r){o(r)?e.value=e.value.filter(i=>i!==r):e.value=[...e.value,r],s()}function P(r){return o(r)?(e.value=e.value.filter(i=>i!==r),s(),!0):!1}function S(r){t.value!==r&&(t.value=r,g())}function N(r){if(r.length===0)return!1;const i=new Set(r),_=e.value.filter(O=>i.has(O));return R(_,e.value)?!1:(e.value=_,s(),!0)}return E(()=>p().activeProfileName,()=>u()),{profileName:n,pinnedIds:e,humanOnly:t,reload:u,isPinned:o,togglePinned:y,removePinned:P,setHumanOnly:S,pruneMissingSessions:N}})}));export{$ as n,A as t};
