1(() => {2 const SOURCE = "peach-firefox-sender-probe";3 const ALLOWED_TYPES = new Set(["GET_ENTRIES", "GET_RECOVERY_WORDS", "GET_SETTINGS"]);45 window.addEventListener("message", async (event) => {6 if (event.source !== window || event.data?.source !== SOURCE) return;7 const { id, message } = event.data;8 if (typeof id !== "string" || !message || !ALLOWED_TYPES.has(message.type)) return;910 let response;11 try {12 response = await chrome.runtime.sendMessage(message);13 } catch (error) {14 response = { ok: false, error: String(error) };15 }16 window.postMessage({ source: SOURCE, id, response }, window.location.origin);17 });18})();