//#region src/services/storage.ts
var e = "tf_", t = class {
	prefix;
	constructor(t) {
		this.prefix = t?.prefix ?? e;
	}
	get(e) {
		let t = this.prefix + e;
		try {
			let e = localStorage.getItem(t);
			return e === null ? null : JSON.parse(e);
		} catch {
			return null;
		}
	}
	set(e, t) {
		let n = this.prefix + e;
		localStorage.setItem(n, JSON.stringify(t));
	}
	remove(e) {
		let t = this.prefix + e;
		localStorage.removeItem(t);
	}
	has(e) {
		let t = this.prefix + e;
		return localStorage.getItem(t) !== null;
	}
	clear() {
		let e = [];
		for (let t = 0; t < localStorage.length; t += 1) {
			let n = localStorage.key(t);
			n?.startsWith(this.prefix) === !0 && e.push(n);
		}
		for (let t of e) localStorage.removeItem(t);
	}
	getKeys() {
		let e = [];
		for (let t = 0; t < localStorage.length; t += 1) {
			let n = localStorage.key(t);
			n?.startsWith(this.prefix) === !0 && e.push(n.slice(this.prefix.length));
		}
		return e;
	}
}, n = new t();
function r(e) {
	return n.get(e);
}
function i(e, t) {
	n.set(e, t);
}
function a(e) {
	n.remove(e);
}
function o(e) {
	return n.has(e);
}
//#endregion
export { i as a, a as i, r as n, o as r, t };

//# sourceMappingURL=storage-B-gK537W.js.map