var e,r;"function"==typeof(e=globalThis.define)&&(r=e,e=null),function(r,t,n,o,i){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof s[o]&&s[o],u=a.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(e,t){if(!u[e]){if(!r[e]){var n="function"==typeof s[o]&&s[o];if(!t&&n)return n(e,!0);if(a)return a(e,!0);if(d&&"string"==typeof e)return d(e);var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}c.resolve=function(t){var n=r[e][1][t];return null!=n?n:t},c.cache={};var f=u[e]=new l.Module(e);r[e][0].call(f.exports,c,f,f.exports,this)}return u[e].exports;function c(e){var r=c.resolve(e);return!1===r?{}:l(r)}}l.isParcelRequire=!0,l.Module=function(e){this.id=e,this.bundle=l,this.exports={}},l.modules=r,l.cache=u,l.parent=a,l.register=function(e,t){r[e]=[function(e,r){r.exports=t},{}]},Object.defineProperty(l,"root",{get:function(){return s[o]}}),s[o]=l;for(var f=0;f<t.length;f++)l(t[f]);if(n){var c=l(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof e&&e.amd?e(function(){return c}):i&&(this[i]=c)}}({"7ug3O":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"config",()=>i);var o=e("../types/provider-messages");let i={matches:["https://*/*","http://localhost/*","http://127.0.0.1/*"],run_at:"document_start",all_frames:!1};function s(e){window.postMessage(e,window.location.origin)}window.addEventListener("message",e=>{if(e.source!==window||e.origin!==window.location.origin||!(0,o.isProviderPageRequest)(e.data))return;let r=e.data;chrome.runtime.sendMessage({type:"terra:provider:request",id:r.id,request:r.payload}).then(e=>{s({channel:o.TERRA_PROVIDER_CHANNEL,direction:"extension-to-page",type:"response",id:r.id,result:e?.result,error:e?.error})}).catch(e=>{s({channel:o.TERRA_PROVIDER_CHANNEL,direction:"extension-to-page",type:"response",id:r.id,error:{code:4900,message:e instanceof Error?e.message:"Nora Wallet is unavailable."}})})}),chrome.runtime.onMessage.addListener(e=>!!(0,o.isProviderRuntimeEvent)(e)&&(s({channel:o.TERRA_PROVIDER_CHANNEL,direction:"extension-to-page",type:"event",event:e.event,payload:e.payload}),!1))},{"../types/provider-messages":"9xHSx","@parcel/transformer-js/src/esmodule-helpers.js":"fRZO2"}],"9xHSx":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"TERRA_PROVIDER_CHANNEL",()=>o),n.export(t,"isProviderPageRequest",()=>i),n.export(t,"isProviderRuntimeRequest",()=>s),n.export(t,"isProviderRuntimeEvent",()=>a),n.export(t,"isProviderRequestArguments",()=>u);let o="terra-wallet-provider-v1";function i(e){return!!l(e)&&e.channel===o&&"page-to-extension"===e.direction&&"request"===e.type&&d(e.id)&&u(e.payload)}function s(e){return l(e)&&"terra:provider:request"===e.type&&d(e.id)&&u(e.request)}function a(e){return l(e)&&"terra:provider:event"===e.type&&["connect","disconnect","accountsChanged","chainChanged"].includes(String(e.event))}function u(e){return!!l(e)&&"string"==typeof e.method&&!!e.method&&!(e.method.length>128)&&(!("params"in e)||void 0===e.params||Array.isArray(e.params)||l(e.params))}function d(e){return"string"==typeof e&&e.length>0&&e.length<=128}function l(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}},{"@parcel/transformer-js/src/esmodule-helpers.js":"fRZO2"}],fRZO2:[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||r.hasOwnProperty(t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}]},["7ug3O"],"7ug3O","parcelRequirea29b"),globalThis.define=r;