import{s as e}from"./preload-helper-CggyeTPP.js";var t=`recents`,n=`lastUsedFormat`,r=12;function i(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.id==`string`&&typeof t.name==`string`&&typeof t.target==`string`&&typeof t.ts==`number`&&typeof t.ok==`boolean`}async function a(){try{let n=(await e.storage.local.get(t))[t];return Array.isArray(n)?n.filter(i):[]}catch{return[]}}async function o(n){let i=await a();i.unshift(n),await e.storage.local.set({[t]:i.slice(0,r)})}async function s(){await e.storage.local.remove(t)}async function c(n){await e.storage.local.set({[t]:n.slice(0,r)})}async function l(){let t=(await e.storage.local.get(n))[n];return typeof t==`string`?t:void 0}async function u(t){await e.storage.local.set({[n]:t})}export{u as a,a as i,s as n,c as o,l as r,o as t};