(()=>{"use strict";globalThis.browser?.tabs||globalThis.chrome;var a=(a,e)=>!e.__internal&&a.source===globalThis.window&&a.data.name===e.name&&(void 0===e.relayId||a.data.relayId===e.relayId),e=(globalThis.browser?.tabs||globalThis.chrome,async a=>(()=>{let a=globalThis.browser?.runtime||globalThis.chrome?.runtime;if(!a)throw new Error("Extension runtime is not available");return a})().sendMessage(a.extensionId??null,a));((e,r,t=globalThis.window)=>{let n=async n=>{if(a(n,e)&&!n.data.relayed){let a={name:e.name,relayId:e.relayId,body:n.data.body},l=await(r?.(a));t.postMessage({name:e.name,relayId:e.relayId,instanceId:n.data.instanceId,body:l,relayed:!0},{targetOrigin:e.targetOrigin||"/"})}};t.addEventListener("message",n)})({name:"aix_datatool_background_trans"},async a=>{try{return await e(a)}catch(a){throw a}})})();