LavaPack.loadBundle([["/home/runner/work/metamask-extension/metamask-extension/ui/store/background-connection.ts",{"../../shared/constants/messages":"/home/runner/work/metamask-extension/metamask-extension/shared/constants/messages.ts"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.generateActionId=void 0,t.setBackgroundConnection=async function(e){a=e},t.submitRequestToBackground=r,t.subscribeToMessengerEvent=async function(e,n){await r("messengerSubscribe",[e]);const t=t=>{var s;t.method===o.MESSENGER_SUBSCRIPTION_NOTIFICATION&&(null===(s=t.params)||void 0===s?void 0:s[0])===e&&n(t.params[1])};return a.onNotification(t),()=>(a.removeOnNotification(t),r("messengerUnsubscribe",[e]))};var o=e("../../shared/constants/messages");const s="Background connection is not set. Please initialize the background connection before making requests.";let a;function r(e,n){return a?a[e](...n??[]):(console.warn(s),Promise.resolve())}t.generateActionId=()=>Date.now()+Math.random()}}},{package:"$root$",file:"ui/store/background-connection.ts"}]],[],{});