import{a as n}from"./Bi6vK2-C.js";function s(t,{log:o=!0}){try{return t()}catch(e){return o&&console.error(e.message),null}}const a="abc:news:deeptime:state",r=s(()=>JSON.parse(localStorage.getItem(a)||"{}"),{log:!1})||{};function i(t="",o){const e=n(r[t]||o);return e.subscribe(l=>{r[t]=l,s(()=>localStorage.setItem(a,JSON.stringify(r)),{log:!1})}),e}export{i as p};