var d=Object.defineProperty;var c=e=>{throw TypeError(e)};var h=(e,s,r)=>s in e?d(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r;var n=(e,s,r)=>h(e,typeof s!="symbol"?s+"":s,r),m=(e,s,r)=>s.has(e)||c("Cannot "+r);var a=(e,s,r)=>(m(e,s,"read from private field"),r?r.call(e):s.get(e)),u=(e,s,r)=>s.has(e)?c("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,r),o=(e,s,r,i)=>(m(e,s,"write to private field"),i?i.call(e,r):s.set(e,r),r);import{M as l}from"./MessageBridge-C2lz_3Ul.js";import"./Logger-kUgoCvAm.js";var t;class f extends l{constructor(r,i){super(r,i);u(this,t,!1);n(this,"init",async()=>{a(this,t)||(o(this,t,!0),chrome.runtime.onMessage.addListener(this.callback))});n(this,"destroy",async()=>{a(this,t)&&(o(this,t,!1),chrome.runtime.onMessage.removeListener(this.callback))});n(this,"sendMessage",async r=>await chrome.runtime.sendMessage(r))}}t=new WeakMap;export{f as R};