@metamask/snaps-execution-environments 3.5.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -1
- package/dist/browserify/iframe/bundle.js +5 -5
- package/dist/browserify/iframe/index.html +1 -1
- package/dist/browserify/node-process/bundle.js +4 -4
- package/dist/browserify/node-thread/bundle.js +4 -4
- package/dist/browserify/webview/bundle.js +9 -0
- package/dist/browserify/{offscreen → webview}/index.html +1 -1
- package/dist/browserify/worker-executor/bundle.js +6 -6
- package/dist/browserify/worker-pool/bundle.js +5 -5
- package/dist/browserify/worker-pool/index.html +1 -1
- package/dist/cjs/common/BaseSnapExecutor.js +2 -2
- package/dist/cjs/common/BaseSnapExecutor.js.map +1 -1
- package/dist/cjs/common/commands.js +9 -0
- package/dist/cjs/common/commands.js.map +1 -1
- package/dist/cjs/common/validation.js +14 -0
- package/dist/cjs/common/validation.js.map +1 -1
- package/dist/cjs/index.js +20 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/proxy/ProxySnapExecutor.js +2 -2
- package/dist/cjs/proxy/ProxySnapExecutor.js.map +1 -1
- package/dist/cjs/proxy/index.js +20 -0
- package/dist/cjs/proxy/index.js.map +1 -0
- package/dist/cjs/webview/WebViewExecutorStream.js +121 -0
- package/dist/cjs/webview/WebViewExecutorStream.js.map +1 -0
- package/dist/cjs/{offscreen → webview}/index.js +4 -4
- package/dist/cjs/webview/index.js.map +1 -0
- package/dist/esm/common/BaseSnapExecutor.js +1 -1
- package/dist/esm/common/BaseSnapExecutor.js.map +1 -1
- package/dist/esm/common/commands.js +10 -1
- package/dist/esm/common/commands.js.map +1 -1
- package/dist/esm/common/validation.js +15 -0
- package/dist/esm/common/validation.js.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/proxy/ProxySnapExecutor.js +2 -2
- package/dist/esm/proxy/ProxySnapExecutor.js.map +1 -1
- package/dist/esm/proxy/index.js +3 -0
- package/dist/esm/proxy/index.js.map +1 -0
- package/dist/esm/webview/WebViewExecutorStream.js +111 -0
- package/dist/esm/webview/WebViewExecutorStream.js.map +1 -0
- package/dist/esm/{offscreen → webview}/index.js +4 -4
- package/dist/esm/webview/index.js.map +1 -0
- package/dist/types/common/validation.d.ts +31 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/proxy/index.d.ts +1 -0
- package/dist/types/webview/WebViewExecutorStream.d.ts +32 -0
- package/package.json +5 -5
- package/dist/browserify/offscreen/bundle.js +0 -9
- package/dist/cjs/offscreen/index.js.map +0 -1
- package/dist/esm/offscreen/index.js.map +0 -1
- /package/dist/types/{offscreen → webview}/index.d.ts +0 -0
|
@@ -13287,10 +13287,10 @@ module.exports = {
|
|
|
13287
13287
|
|
|
13288
13288
|
})()
|
|
13289
13289
|
|
|
13290
|
-
LavaPack.loadBundle([[1,{"@metamask/rpc-errors":57,"@metamask/safe-event-emitter":59,"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i,o,a,c,u,l,d,f,p,h,m,g=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))},b=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},y=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},w=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.JsonRpcEngine=void 0;const v=e("@metamask/rpc-errors"),_=w(e("@metamask/safe-event-emitter")),E=e("@metamask/utils");class S extends _.default{constructor({notificationHandler:e}={}){super(),n.add(this),i.set(this,!1),o.set(this,void 0),a.set(this,void 0),b(this,o,[],"f"),b(this,a,e,"f")}destroy(){y(this,o,"f").forEach((e=>{"destroy"in e&&"function"==typeof e.destroy&&e.destroy()})),b(this,o,[],"f"),b(this,i,!0,"f")}push(e){y(this,n,"m",c).call(this),y(this,o,"f").push(e)}handle(e,t){if(y(this,n,"m",c).call(this),t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?y(this,n,"m",u).call(this,e,t):y(this,n,"m",u).call(this,e):t?y(this,n,"m",l).call(this,e,t):this._promiseHandle(e)}asMiddleware(){return y(this,n,"m",c).call(this),(e,t,r,n)=>g(this,void 0,void 0,(function*(){try{const[i,a,c]=yield y(S,s,"m",f).call(S,e,t,y(this,o,"f"));return a?(yield y(S,s,"m",h).call(S,c),n(i)):r((e=>g(this,void 0,void 0,(function*(){try{yield y(S,s,"m",h).call(S,c)}catch(t){return e(t)}return e()}))))}catch(e){return n(e)}}))}_promiseHandle(e){return g(this,void 0,void 0,(function*(){return new Promise(((t,r)=>{y(this,n,"m",l).call(this,e,((e,n)=>{e&&n===undefined?r(e):t(n)})).catch(r)}))}))}}function k(e){return JSON.stringify(e,null,2)}r.JsonRpcEngine=S,s=S,i=new WeakMap,o=new WeakMap,a=new WeakMap,n=new WeakSet,c=function(){if(y(this,i,"f"))throw new Error("This engine is destroyed and can no longer be used.")},u=function(e,t){return g(this,void 0,void 0,(function*(){try{if(0===e.length){const e=[{id:null,jsonrpc:"2.0",error:new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Request batch must contain plain objects. Received an empty array")}];return t?t(null,e):e}const r=(yield Promise.all(e.map(this._promiseHandle.bind(this)))).filter((e=>e!==undefined));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}))},l=function(e,t){var r;return g(this,void 0,void 0,(function*(){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:null,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const n=new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return y(this,a,"f")&&!(0,E.isJsonRpcRequest)(e)?t(null):t(n,{id:null!==(r=e.id)&&void 0!==r?r:null,jsonrpc:"2.0",error:n})}if(y(this,a,"f")&&!(0,E.isJsonRpcRequest)(e)){try{yield y(this,a,"f").call(this,e)}catch(n){return t(n)}return t(null)}let n=null;const i=Object.assign({},e),c={id:i.id,jsonrpc:i.jsonrpc};try{yield y(S,s,"m",d).call(S,i,c,y(this,o,"f"))}catch(e){n=e}return n&&(delete c.result,c.error||(c.error=(0,v.serializeError)(n))),t(n,c)}))},d=function(e,t,r){return g(this,void 0,void 0,(function*(){const[n,i,o]=yield y(S,s,"m",f).call(S,e,t,r);if(y(S,s,"m",m).call(S,e,t,i),yield y(S,s,"m",h).call(S,o),n)throw n}))},f=function(e,t,r){return g(this,void 0,void 0,(function*(){const n=[];let i=null,o=!1;for(const a of r)if([i,o]=yield y(S,s,"m",p).call(S,e,t,a,n),o)break;return[i,o,n.reverse()]}))},p=function(e,t,r,n){return g(this,void 0,void 0,(function*(){return new Promise((s=>{const i=e=>{const r=e||t.error;r&&(t.error=(0,v.serializeError)(r)),s([r,!0])},o=r=>{t.error?i(t.error):(r&&("function"!=typeof r&&i(new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${k(e)}`,{request:e})),n.push(r)),s([null,!1]))};try{r(e,t,o,i)}catch(e){i(e)}}))}))},h=function(e){return g(this,void 0,void 0,(function*(){for(const t of e)yield new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}))},m=function(e,t,r){if(!(0,E.hasProperty)(t,"result")&&!(0,E.hasProperty)(t,"error"))throw new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${k(e)}`,{request:e});if(!r)throw new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${k(e)}`,{request:e})}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/JsonRpcEngine.js"}],[2,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0}),r.createAsyncMiddleware=void 0,r.createAsyncMiddleware=function(e){return(t,r,s,i)=>n(this,void 0,void 0,(function*(){let o;const a=new Promise((e=>{o=e}));let c=null,u=!1;const l=()=>n(this,void 0,void 0,(function*(){return u=!0,s((e=>{c=e,o()})),a}));try{yield e(t,r,l),u?(yield a,c(null)):i(null)}catch(e){c?c(e):i(e)}}))}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/createAsyncMiddleware.js"}],[3,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createScaffoldMiddleware=void 0,r.createScaffoldMiddleware=function(e){return(t,r,n,s)=>{const i=e[t.method];return i===undefined?n():"function"==typeof i?i(t,r,n,s):(r.result=i,s())}}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/createScaffoldMiddleware.js"}],[4,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getUniqueId=void 0;const n=4294967295;let s=Math.floor(Math.random()*n);r.getUniqueId=function(){return s=(s+1)%n,s}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/getUniqueId.js"}],[5,{"./getUniqueId":4},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createIdRemapMiddleware=void 0;const n=e("./getUniqueId");r.createIdRemapMiddleware=function(){return(e,t,r,s)=>{const i=e.id,o=(0,n.getUniqueId)();e.id=o,t.id=o,r((r=>{e.id=i,t.id=i,r()}))}}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/idRemapMiddleware.js"}],[6,{"./JsonRpcEngine":1,"./createAsyncMiddleware":2,"./createScaffoldMiddleware":3,"./getUniqueId":4,"./idRemapMiddleware":5,"./mergeMiddleware":7},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./createAsyncMiddleware"),r),s(e("./createScaffoldMiddleware"),r),s(e("./getUniqueId"),r),s(e("./idRemapMiddleware"),r),s(e("./JsonRpcEngine"),r),s(e("./mergeMiddleware"),r)}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/index.js"}],[7,{"./JsonRpcEngine":1},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mergeMiddleware=void 0;const n=e("./JsonRpcEngine");r.mergeMiddleware=function(e){const t=new n.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/mergeMiddleware.js"}],[8,{"./Substream":9,once:142,"readable-stream":161},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ObjectMultiplex=void 0;const s=e("readable-stream"),i=n(e("once")),o=e("./Substream"),a=Symbol("IGNORE_SUBSTREAM");class c extends s.Duplex{constructor(e={}){super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new o.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const r=(0,i.default)(t);(0,s.finished)(e,{readable:!1},r),(0,s.finished)(e,{writable:!1},r)}(this,(e=>t.destroy(e||undefined))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=a}_read(){return undefined}_write(e,t,r){const{name:n,data:s}=e;if(!n)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const i=this._substreams[n];return i?(i!==a&&i.push(s),r()):(console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r())}}r.ObjectMultiplex=c}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/ObjectMultiplex.js"}],[9,{"readable-stream":161},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Substream=void 0;const n=e("readable-stream");class s extends n.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){return undefined}_write(e,t,r){this._parent.push({name:this._name,data:e}),r()}}r.Substream=s}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/Substream.js"}],[10,{"./ObjectMultiplex":8},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./ObjectMultiplex");t.exports=n.ObjectMultiplex}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/index.js"}],[11,{"readable-stream":161},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BasePostMessageStream=void 0;const n=e("readable-stream"),s=()=>undefined,i="SYN",o="ACK";class a extends n.Duplex{constructor(){super({objectMode:!0}),this._init=!1,this._haveSyn=!1,this._log=()=>null}_handshake(){this._write(i,null,s),this.cork()}_onData(e){if(this._init)try{this.push(e),this._log(e,!1)}catch(e){this.emit("error",e)}else e===i?(this._haveSyn=!0,this._write(o,null,s)):e===o&&(this._init=!0,this._haveSyn||this._write(o,null,s),this.uncork())}_read(){return undefined}_write(e,t,r){e!==o&&e!==i&&this._log(e,!0),this._postMessage(e),r()}_setLogger(e){this._log=e}}r.BasePostMessageStream=a}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/BasePostMessageStream.js"}],[12,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerParentPostMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({worker:e}){super(),this._target=s.DEDICATED_WORKER_NAME,this._worker=e,this._worker.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){this._worker.postMessage({target:this._target,data:e})}_onMessage(e){const t=e.data;(0,s.isValidStreamMessage)(t)&&this._onData(t.data)}_destroy(){this._worker.onmessage=null,this._worker=null}}r.WebWorkerParentPostMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerParentPostMessageStream.js"}],[13,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerPostMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor(){if("undefined"==typeof self||"undefined"==typeof WorkerGlobalScope)throw new Error("WorkerGlobalScope not found. This class should only be instantiated in a WebWorker.");super(),this._name=s.DEDICATED_WORKER_NAME,self.addEventListener("message",this._onMessage.bind(this)),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const t=e.data;(0,s.isValidStreamMessage)(t)&&t.target===this._name&&this._onData(t.data)}_destroy(){return undefined}}r.WebWorkerPostMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerPostMessageStream.js"}],[14,{"./BasePostMessageStream":11,"./WebWorker/WebWorkerParentPostMessageStream":12,"./WebWorker/WebWorkerPostMessageStream":13,"./node-process/ProcessMessageStream":15,"./node-process/ProcessParentMessageStream":16,"./node-thread/ThreadMessageStream":17,"./node-thread/ThreadParentMessageStream":18,"./runtime/BrowserRuntimePostMessageStream":19,"./window/WindowPostMessageStream":21},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./window/WindowPostMessageStream"),r),s(e("./WebWorker/WebWorkerPostMessageStream"),r),s(e("./WebWorker/WebWorkerParentPostMessageStream"),r),s(e("./node-process/ProcessParentMessageStream"),r),s(e("./node-process/ProcessMessageStream"),r),s(e("./node-thread/ThreadParentMessageStream"),r),s(e("./node-thread/ThreadMessageStream"),r),s(e("./runtime/BrowserRuntimePostMessageStream"),r),s(e("./BasePostMessageStream"),r)}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/index.js"}],[15,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ProcessMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor(){if(super(),"function"!=typeof globalThis.process.send)throw new Error("Parent IPC channel not found. This class should only be instantiated in a Node.js child process.");this._onMessage=this._onMessage.bind(this),globalThis.process.on("message",this._onMessage),this._handshake()}_postMessage(e){globalThis.process.send({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){globalThis.process.removeListener("message",this._onMessage)}}r.ProcessMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-process/ProcessMessageStream.js"}],[16,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ProcessParentMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({process:e}){super(),this._process=e,this._onMessage=this._onMessage.bind(this),this._process.on("message",this._onMessage),this._handshake()}_postMessage(e){this._process.send({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){this._process.removeListener("message",this._onMessage)}}r.ProcessParentMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-process/ProcessParentMessageStream.js"}],[17,{"../BasePostMessageStream":11,"../utils":20,worker_threads:"worker_threads"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.ThreadMessageStream=void 0;const o=e("worker_threads"),a=e("../BasePostMessageStream"),c=e("../utils");class u extends a.BasePostMessageStream{constructor(){if(super(),n.set(this,void 0),!o.parentPort)throw new Error("Parent port not found. This class should only be instantiated in a Node.js worker thread.");s(this,n,o.parentPort,"f"),this._onMessage=this._onMessage.bind(this),i(this,n,"f").on("message",this._onMessage),this._handshake()}_postMessage(e){i(this,n,"f").postMessage({data:e})}_onMessage(e){(0,c.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){i(this,n,"f").removeListener("message",this._onMessage)}}r.ThreadMessageStream=u,n=new WeakMap}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-thread/ThreadMessageStream.js"}],[18,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ThreadParentMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({thread:e}){super(),this._thread=e,this._onMessage=this._onMessage.bind(this),this._thread.on("message",this._onMessage),this._handshake()}_postMessage(e){this._thread.postMessage({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){this._thread.removeListener("message",this._onMessage)}}r.ThreadParentMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-thread/ThreadParentMessageStream.js"}],[19,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserRuntimePostMessageStream=void 0;const a=e("../BasePostMessageStream"),c=e("../utils");class u extends a.BasePostMessageStream{constructor({name:e,target:t}){super(),n.set(this,void 0),s.set(this,void 0),i(this,n,e,"f"),i(this,s,t,"f"),this._onMessage=this._onMessage.bind(this),this._getRuntime().onMessage.addListener(this._onMessage),this._handshake()}_postMessage(e){this._getRuntime().sendMessage({target:o(this,s,"f"),data:e})}_onMessage(e){(0,c.isValidStreamMessage)(e)&&e.target===o(this,n,"f")&&this._onData(e.data)}_getRuntime(){var e,t;if("chrome"in globalThis&&"function"==typeof(null===(e=null===chrome||void 0===chrome?void 0:chrome.runtime)||void 0===e?void 0:e.sendMessage))return chrome.runtime;if("browser"in globalThis&&"function"==typeof(null===(t=null===browser||void 0===browser?void 0:browser.runtime)||void 0===t?void 0:t.sendMessage))return browser.runtime;throw new Error("browser.runtime.sendMessage is not a function. This class should only be instantiated in a web extension.")}_destroy(){this._getRuntime().onMessage.removeListener(this._onMessage)}}r.BrowserRuntimePostMessageStream=u,n=new WeakMap,s=new WeakMap}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/runtime/BrowserRuntimePostMessageStream.js"}],[20,{"@metamask/utils":30},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isValidStreamMessage=r.DEDICATED_WORKER_NAME=void 0;const n=e("@metamask/utils");r.DEDICATED_WORKER_NAME="dedicatedWorker",r.isValidStreamMessage=function(e){return(0,n.isObject)(e)&&Boolean(e.data)&&("number"==typeof e.data||"object"==typeof e.data||"string"==typeof e.data)}}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/utils.js"}],[21,{"../BasePostMessageStream":11,"../utils":20,"@metamask/utils":30},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s;Object.defineProperty(r,"__esModule",{value:!0}),r.WindowPostMessageStream=void 0;const i=e("@metamask/utils"),o=e("../BasePostMessageStream"),a=e("../utils"),c=null===(n=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"source"))||void 0===n?void 0:n.get;(0,i.assert)(c,"MessageEvent.prototype.source getter is not defined.");const u=null===(s=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"origin"))||void 0===s?void 0:s.get;(0,i.assert)(u,"MessageEvent.prototype.origin getter is not defined.");class l extends o.BasePostMessageStream{constructor({name:e,target:t,targetOrigin:r=location.origin,targetWindow:n=window}){if(super(),"undefined"==typeof window||"function"!=typeof window.postMessage)throw new Error("window.postMessage is not a function. This class should only be instantiated in a Window.");this._name=e,this._target=t,this._targetOrigin=r,this._targetWindow=n,this._onMessage=this._onMessage.bind(this),window.addEventListener("message",this._onMessage,!1),this._handshake()}_postMessage(e){this._targetWindow.postMessage({target:this._target,data:e},this._targetOrigin)}_onMessage(e){const t=e.data;"*"!==this._targetOrigin&&u.call(e)!==this._targetOrigin||c.call(e)!==this._targetWindow||!(0,a.isValidStreamMessage)(t)||t.target!==this._name||this._onData(t.data)}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}r.WindowPostMessageStream=l}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/window/WindowPostMessageStream.js"}],[22,{superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const n=e("superstruct");function s(e,t){return r=e,Boolean("string"==typeof(null===(s=null===(n=null==r?void 0:r.prototype)||void 0===n?void 0:n.constructor)||void 0===s?void 0:s.name))?new e({message:t}):e({message:t});var r,n,s}class i extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=i,r.assert=function(e,t="Assertion failed.",r=i){if(!e){if(t instanceof Error)throw t;throw s(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",o=i){try{(0,n.assert)(e,t)}catch(e){throw s(o,`${r}: ${function(e){const t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/assert.js"}],[23,{"./assert":22,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const n=e("superstruct"),s=e("./assert");r.base64=(e,t={})=>{var r,i;const o=null!==(r=t.paddingRequired)&&void 0!==r&&r,a=null!==(i=t.characterSet)&&void 0!==i?i:"base64";let c,u;return"base64"===a?c=String.raw`[A-Za-z0-9+\/]`:((0,s.assert)("base64url"===a),c=String.raw`[-_A-Za-z0-9]`),u=o?new RegExp(`^(?:${c}{4})*(?:${c}{3}=|${c}{2}==)?$`,"u"):new RegExp(`^(?:${c}{4})*(?:${c}{2,3}|${c}{3}=|${c}{2}==)?$`,"u"),(0,n.pattern)(e,u)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/base64.js"}],[24,{"./assert":22,"./hex":29,buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const n=e("./assert"),s=e("./hex"),i=48,o=58,a=87;const c=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function u(e){return e instanceof Uint8Array}function l(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function d(e){if(l(e),0===e.length)return"0x";const t=c(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,s.add0x)(r.join(""))}function f(e){l(e);const t=d(e);return BigInt(t)}function p(e){var t;if("0x"===(null===(t=null==e?void 0:e.toLowerCase)||void 0===t?void 0:t.call(e)))return new Uint8Array;(0,s.assertIsHexString)(e);const r=(0,s.remove0x)(e).toLowerCase(),n=r.length%2==0?r:`0${r}`,c=new Uint8Array(n.length/2);for(let e=0;e<c.length;e++){const t=n.charCodeAt(2*e),r=n.charCodeAt(2*e+1),s=t-(t<o?i:a),u=r-(r<o?i:a);c[e]=16*s+u}return c}function h(e){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return p(e.toString(16))}function m(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return p(e.toString(16))}function g(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return h(e);if("number"==typeof e)return m(e);if("string"==typeof e)return e.startsWith("0x")?p(e):g(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=l,r.bytesToHex=d,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){l(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},r.bytesToNumber=function(e){l(e);const t=f(e);return(0,n.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},r.bytesToString=function(e){return l(e),(new TextDecoder).decode(e)},r.hexToBytes=p,r.bigIntToBytes=h,r.signedBigIntToBytes=function(e,t){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)("number"==typeof t,"Byte length must be a number."),(0,n.assert)(t>0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e<s.length;e++)s[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return s.reverse()},r.numberToBytes=m,r.stringToBytes=g,r.valueToBytes=b,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const s=b(e[n]);t[n]=s,r+=s.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},r.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/bytes.js"}],[25,{"./base64":23,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const n=e("superstruct"),s=e("./base64");r.ChecksumStruct=(0,n.size)((0,s.base64)((0,n.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/checksum.js"}],[26,{"./assert":22,"./bytes":24,"./hex":29,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const n=e("superstruct"),s=e("./assert"),i=e("./bytes"),o=e("./hex"),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),o.StrictHexStruct]),c=(0,n.coerce)((0,n.number)(),a,Number),u=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([o.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([o.StrictHexStruct]),i.hexToBytes)),d=(0,n.coerce)(o.StrictHexStruct,(0,n.instance)(Uint8Array),i.bytesToHex);r.createNumber=function(e){try{const t=(0,n.create)(e,c);return(0,s.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,n.create)(e,u)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,d)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/coercers.js"}],[27,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class a{constructor(e){n.set(this,void 0),i(this,n,new Map(e),"f"),Object.freeze(this)}get size(){return o(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return o(this,n,"f")[Symbol.iterator]()}entries(){return o(this,n,"f").entries()}forEach(e,t){return o(this,n,"f").forEach(((r,n,s)=>e.call(t,r,n,this)))}get(e){return o(this,n,"f").get(e)}has(e){return o(this,n,"f").has(e)}keys(){return o(this,n,"f").keys()}values(){return o(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=a;class c{constructor(e){s.set(this,void 0),i(this,s,new Set(e),"f"),Object.freeze(this)}get size(){return o(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return o(this,s,"f")[Symbol.iterator]()}entries(){return o(this,s,"f").entries()}forEach(e,t){return o(this,s,"f").forEach(((r,n,s)=>e.call(t,r,n,this)))}has(e){return o(this,s,"f").has(e)}keys(){return o(this,s,"f").keys()}values(){return o(this,s,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(a),Object.freeze(a.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/collections.js"}],[28,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/encryption-types.js"}],[29,{"./assert":22,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.StrictHexStruct=r.HexStruct=void 0;const n=e("superstruct"),s=e("./assert");function i(e){return(0,n.is)(e,r.HexStruct)}function o(e){return(0,n.is)(e,r.StrictHexStruct)}r.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),r.isHexString=i,r.isStrictHexString=o,r.assertIsHexString=function(e){(0,s.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,s.assert)(o(e),'Value must be a hexadecimal string, starting with "0x".')},r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/hex.js"}],[30,{"./assert":22,"./base64":23,"./bytes":24,"./checksum":25,"./coercers":26,"./collections":27,"./encryption-types":28,"./hex":29,"./json":31,"./keyring":32,"./logging":33,"./misc":34,"./number":35,"./opaque":36,"./time":37,"./transaction-types":38,"./versions":39},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./assert"),r),s(e("./base64"),r),s(e("./bytes"),r),s(e("./checksum"),r),s(e("./coercers"),r),s(e("./collections"),r),s(e("./encryption-types"),r),s(e("./hex"),r),s(e("./json"),r),s(e("./keyring"),r),s(e("./logging"),r),s(e("./misc"),r),s(e("./number"),r),s(e("./opaque"),r),s(e("./time"),r),s(e("./transaction-types"),r),s(e("./versions"),r)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/index.js"}],[31,{"./assert":22,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=void 0;const n=e("superstruct"),s=e("./assert");r.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>r.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,n.define)("Json",((e,t)=>{function n(e,r){const n=[...r.validator(e,t)];return!(n.length>0)||n}try{const t=n(e,r.UnsafeJsonStruct);return!0!==t?t:n(JSON.parse(JSON.stringify(e)),r.UnsafeJsonStruct)}catch(e){return e instanceof RangeError&&"Circular reference detected"}})),r.isValidJson=function(e){return(0,n.is)(e,r.JsonStruct)},r.getJsonSize=function(e){(0,s.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,n.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),r.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(r.JsonStruct),stack:(0,n.optional)((0,n.string)())}),r.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),r.JsonStruct),(0,n.array)(r.JsonStruct)])),r.JsonRpcRequestStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,n.string)(),params:r.JsonRpcParamsStruct}),r.JsonRpcNotificationStruct=(0,n.omit)(r.JsonRpcRequestStruct,["id"]),r.isJsonRpcNotification=function(e){return(0,n.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,s.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,n.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,s.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,n.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,n.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,n.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,s.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,n.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,s.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,n.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,s.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},e);return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/json.js"}],[32,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/keyring.js"}],[33,{debug:92},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const s=(0,n(e("debug")).default)("metamask");r.createProjectLogger=function(e){return s.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/logging.js"}],[34,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function n(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},r.isASCII=n,r.calculateStringSize=function(e){var t;return e.split("").reduce(((e,t)=>n(t)?e+1:e+2),0)+(null!==(t=e.match(r.ESCAPE_CHARACTERS_REGEXP))&&void 0!==t?t:[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/misc.js"}],[35,{"./assert":22,"./hex":29},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const n=e("./assert"),s=e("./hex");r.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,s.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,s.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,s.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,s.assertIsHexString)(e),BigInt((0,s.add0x)(e)))}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/number.js"}],[36,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/opaque.js"}],[37,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,function(e){e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year"}(r.Duration||(r.Duration={}));const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return n(e,"count"),e*t},r.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/time.js"}],[38,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/transaction-types.js"}],[39,{"./assert":22,semver:190,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const n=e("semver"),s=e("superstruct"),i=e("./assert");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,i.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,i.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/versions.js"}],[40,{"./messages":49,"./utils":53,"@metamask/json-rpc-engine":6,"@metamask/rpc-errors":57,"@metamask/safe-event-emitter":59,"fast-deep-equal":121},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.BaseProvider=void 0;const c=e("@metamask/json-rpc-engine"),u=e("@metamask/rpc-errors"),l=a(e("@metamask/safe-event-emitter")),d=a(e("fast-deep-equal")),f=a(e("./messages")),p=e("./utils");class h extends l.default{constructor({logger:e=console,maxEventListeners:t=100,rpcMiddleware:r=[]}={}){super(),n.set(this,void 0),s.set(this,void 0),this._log=e,this.setMaxListeners(t),this._state={...h._defaultState},i(this,s,null,"f"),i(this,n,null,"f"),this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this.request=this.request.bind(this);const o=new c.JsonRpcEngine;r.forEach((e=>o.push(e))),this._rpcEngine=o}get chainId(){return o(this,n,"f")}get selectedAddress(){return o(this,s,"f")}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw u.rpcErrors.invalidRequest({message:f.default.errors.invalidRequestArgs(),data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw u.rpcErrors.invalidRequest({message:f.default.errors.invalidRequestMethod(),data:e});if(r!==undefined&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw u.rpcErrors.invalidRequest({message:f.default.errors.invalidRequestParams(),data:e});const n=r===undefined||null===r?{method:t}:{method:t,params:r};return new Promise(((e,t)=>{this._rpcRequest(n,(0,p.getRpcPromiseCallback)(e,t))}))}_initializeState(e){if(this._state.initialized)throw new Error("Provider already initialized.");if(e){const{accounts:t,chainId:r,isUnlocked:n,networkVersion:s}=e;this._handleConnect(r),this._handleChainChanged({chainId:r,networkVersion:s}),this._handleUnlockStateChanged({accounts:t,isUnlocked:n}),this._handleAccountsChanged(t)}this._state.initialized=!0,this.emit("_initialized")}_rpcRequest(e,t){let r=t;return Array.isArray(e)||(e.jsonrpc||(e.jsonrpc="2.0"),"eth_accounts"!==e.method&&"eth_requestAccounts"!==e.method||(r=(r,n)=>{this._handleAccountsChanged(n.result??[],"eth_accounts"===e.method),t(r,n)})),this._rpcEngine.handle(e,r)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),this._log.debug(f.default.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new u.JsonRpcError(1013,t??f.default.errors.disconnected()),this._log.debug(r)):(r=new u.JsonRpcError(1011,t??f.default.errors.permanentlyDisconnected()),this._log.error(r),i(this,n,null,"f"),this._state.accounts=null,i(this,s,null,"f"),this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleChainChanged({chainId:e}={}){(0,p.isValidChainId)(e)?(this._handleConnect(e),e!==o(this,n,"f")&&(i(this,n,e,"f"),this._state.initialized&&this.emit("chainChanged",o(this,n,"f")))):this._log.error(f.default.errors.invalidNetworkParams(),{chainId:e})}_handleAccountsChanged(e,t=!1){let r=e;Array.isArray(e)||(this._log.error("MetaMask: Received invalid accounts parameter. Please report this bug.",e),r=[]);for(const t of e)if("string"!=typeof t){this._log.error("MetaMask: Received non-string account. Please report this bug.",e),r=[];break}if(!(0,d.default)(this._state.accounts,r)&&(t&&null!==this._state.accounts&&this._log.error("MetaMask: 'eth_accounts' unexpectedly updated accounts. Please report this bug.",r),this._state.accounts=r,o(this,s,"f")!==r[0]&&i(this,s,r[0]||null,"f"),this._state.initialized)){const e=[...r];this.emit("accountsChanged",e)}}_handleUnlockStateChanged({accounts:e,isUnlocked:t}={}){"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e??[])):this._log.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.")}}r.BaseProvider=h,n=new WeakMap,s=new WeakMap,h._defaultState={accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/BaseProvider.js"}],[41,{"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.announceProvider=r.requestProvider=void 0;const n=e("@metamask/utils");var s;!function(e){e.Announce="eip6963:announceProvider",e.Request="eip6963:requestProvider"}(s||(s={}));const i=/(?:^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}$)|(?:^0{8}-0{4}-0{4}-0{4}-0{12}$)/u,o=/(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9]\.)+[a-zA-Z]{2,63}$)/u;function a(e){if(!(0,n.isObject)(e)||!(0,n.isObject)(e.info)||!(0,n.isObject)(e.provider))return!1;const{info:t}=e;return"string"==typeof t.uuid&&i.test(t.uuid)&&"string"==typeof t.name&&Boolean(t.name)&&"string"==typeof t.icon&&t.icon.startsWith("data:image")&&"string"==typeof t.rdns&&o.test(t.rdns)}function c(e){throw new Error(`${e} See https://eips.ethereum.org/EIPS/eip-6963 for requirements.`)}r.requestProvider=function(e){window.addEventListener(s.Announce,(t=>{(function(e){return e instanceof CustomEvent&&e.type===s.Announce&&Object.isFrozen(e.detail)&&a(e.detail)})(t)||c(`Invalid EIP-6963 AnnounceProviderEvent object received from ${s.Announce} event.`),e(t.detail)})),window.dispatchEvent(new Event(s.Request))},r.announceProvider=function(e){a(e)||c("Invalid EIP-6963 ProviderDetail object.");const{info:t,provider:r}=e,n=()=>window.dispatchEvent(new CustomEvent(s.Announce,{detail:Object.freeze({info:{...t},provider:r})}));n(),window.addEventListener(s.Request,(e=>{(function(e){return e instanceof Event&&e.type===s.Request})(e)||c(`Invalid EIP-6963 RequestProviderEvent object received from ${s.Request} event.`),n()}))}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/EIP6963.js"}],[42,{"./StreamProvider":43,"./messages":49,"./siteMetadata":52,"./utils":53,"@metamask/rpc-errors":57},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.MetaMaskInpageProvider=r.MetaMaskInpageProviderStreamName=void 0;const a=e("@metamask/rpc-errors"),c=o(e("./messages")),u=e("./siteMetadata"),l=e("./StreamProvider"),d=e("./utils");r.MetaMaskInpageProviderStreamName="metamask-provider";class f extends l.AbstractStreamProvider{constructor(e,{jsonRpcStreamName:t=r.MetaMaskInpageProviderStreamName,logger:i=console,maxEventListeners:o=100,shouldSendMetadata:a}={}){if(super(e,{jsonRpcStreamName:t,logger:i,maxEventListeners:o,rpcMiddleware:(0,d.getDefaultExternalMiddleware)(i)}),this._sentWarnings={chainId:!1,networkVersion:!1,selectedAddress:!1,enable:!1,experimentalMethods:!1,send:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}},n.set(this,void 0),this._initializeStateAsync(),s(this,n,null,"f"),this.isMetaMask=!0,this._sendSync=this._sendSync.bind(this),this.enable=this.enable.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._metamask=this._getExperimentalApi(),this._jsonRpcConnection.events.on("notification",(e=>{const{method:t}=e;d.EMITTED_NOTIFICATIONS.includes(t)&&(this.emit("data",e),this.emit("notification",e.params.result))})),a)if("complete"===document.readyState)(0,u.sendSiteMetadata)(this._rpcEngine,this._log);else{const e=()=>{(0,u.sendSiteMetadata)(this._rpcEngine,this._log),window.removeEventListener("DOMContentLoaded",e)};window.addEventListener("DOMContentLoaded",e)}}get chainId(){return this._sentWarnings.chainId||(this._log.warn(c.default.warnings.chainIdDeprecation),this._sentWarnings.chainId=!0),super.chainId}get networkVersion(){return this._sentWarnings.networkVersion||(this._log.warn(c.default.warnings.networkVersionDeprecation),this._sentWarnings.networkVersion=!0),i(this,n,"f")}get selectedAddress(){return this._sentWarnings.selectedAddress||(this._log.warn(c.default.warnings.selectedAddressDeprecation),this._sentWarnings.selectedAddress=!0),super.selectedAddress}sendAsync(e,t){this._rpcRequest(e,t)}addListener(e,t){return this._warnOfDeprecation(e),super.addListener(e,t)}on(e,t){return this._warnOfDeprecation(e),super.on(e,t)}once(e,t){return this._warnOfDeprecation(e),super.once(e,t)}prependListener(e,t){return this._warnOfDeprecation(e),super.prependListener(e,t)}prependOnceListener(e,t){return this._warnOfDeprecation(e),super.prependOnceListener(e,t)}_handleDisconnect(e,t){super._handleDisconnect(e,t),i(this,n,"f")&&!e&&s(this,n,null,"f")}_warnOfDeprecation(e){!1===this._sentWarnings?.events[e]&&(this._log.warn(c.default.warnings.events[e]),this._sentWarnings.events[e]=!0)}async enable(){return this._sentWarnings.enable||(this._log.warn(c.default.warnings.enableDeprecation),this._sentWarnings.enable=!0),new Promise(((e,t)=>{try{this._rpcRequest({method:"eth_requestAccounts",params:[]},(0,d.getRpcPromiseCallback)(e,t))}catch(e){t(e)}}))}send(e,t){return this._sentWarnings.send||(this._log.warn(c.default.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof e||t&&!Array.isArray(t)?e&&"object"==typeof e&&"function"==typeof t?this._rpcRequest(e,t):this._sendSync(e):new Promise(((r,n)=>{try{this._rpcRequest({method:e,params:t},(0,d.getRpcPromiseCallback)(r,n,!1))}catch(e){n(e)}}))}_sendSync(e){let t;switch(e.method){case"eth_accounts":t=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":t=this.selectedAddress??null;break;case"eth_uninstallFilter":this._rpcRequest(e,d.NOOP),t=!0;break;case"net_version":t=i(this,n,"f")??null;break;default:throw new Error(c.default.errors.unsupportedSync(e.method))}return{id:e.id,jsonrpc:e.jsonrpc,result:t}}_getExperimentalApi(){return new Proxy({isUnlocked:async()=>(this._state.initialized||await new Promise((e=>{this.on("_initialized",(()=>e()))})),this._state.isUnlocked),requestBatch:async e=>{if(!Array.isArray(e))throw a.rpcErrors.invalidRequest({message:"Batch requests must be made with an array of request objects.",data:e});return new Promise(((t,r)=>{this._rpcRequest(e,(0,d.getRpcPromiseCallback)(t,r))}))}},{get:(e,t,...r)=>(this._sentWarnings.experimentalMethods||(this._log.warn(c.default.warnings.experimentalMethods),this._sentWarnings.experimentalMethods=!0),Reflect.get(e,t,...r))})}_handleChainChanged({chainId:e,networkVersion:t}={}){super._handleChainChanged({chainId:e,networkVersion:t}),this._state.isConnected&&t!==i(this,n,"f")&&(s(this,n,t,"f"),this._state.initialized&&this.emit("networkChanged",i(this,n,"f")))}}r.MetaMaskInpageProvider=f,n=new WeakMap}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/MetaMaskInpageProvider.js"}],[43,{"./BaseProvider":40,"./messages":49,"./utils":53,"@metamask/object-multiplex":10,"is-stream":137,"json-rpc-middleware-stream":141,"readable-stream":161},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.StreamProvider=r.AbstractStreamProvider=void 0;const s=n(e("@metamask/object-multiplex")),i=e("is-stream"),o=e("json-rpc-middleware-stream"),a=e("readable-stream"),c=e("./BaseProvider"),u=n(e("./messages")),l=e("./utils");class d extends c.BaseProvider{constructor(e,{jsonRpcStreamName:t,logger:r=console,maxEventListeners:n=100,rpcMiddleware:c=[]}){if(super({logger:r,maxEventListeners:n,rpcMiddleware:c}),!(0,i.duplex)(e))throw new Error(u.default.errors.invalidDuplexStream());this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this);const d=new s.default;(0,a.pipeline)(e,d,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._jsonRpcConnection=(0,o.createStreamMiddleware)({retryOnMessage:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}),(0,a.pipeline)(this._jsonRpcConnection.stream,d.createStream(t),this._jsonRpcConnection.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider")),this._rpcEngine.push(this._jsonRpcConnection.middleware),this._jsonRpcConnection.events.on("notification",(t=>{const{method:r,params:n}=t;"metamask_accountsChanged"===r?this._handleAccountsChanged(n):"metamask_unlockStateChanged"===r?this._handleUnlockStateChanged(n):"metamask_chainChanged"===r?this._handleChainChanged(n):l.EMITTED_NOTIFICATIONS.includes(r)?this.emit("message",{type:r,data:n}):"METAMASK_STREAM_FAILURE"===r&&e.destroy(new Error(u.default.errors.permanentlyDisconnected()))}))}async _initializeStateAsync(){let e;try{e=await this.request({method:"metamask_getProviderState"})}catch(e){this._log.error("MetaMask: Failed to get initial state. Please report this bug.",e)}this._initializeState(e)}_handleStreamDisconnect(e,t){let r=`MetaMask: Lost connection to "${e}".`;t?.stack&&(r+=`\n${t.stack}`),this._log.warn(r),this.listenerCount("error")>0&&this.emit("error",r),this._handleDisconnect(!1,t?t.message:undefined)}_handleChainChanged({chainId:e,networkVersion:t}={}){(0,l.isValidChainId)(e)&&(0,l.isValidNetworkVersion)(t)?"loading"===t?this._handleDisconnect(!0):super._handleChainChanged({chainId:e}):this._log.error(u.default.errors.invalidNetworkParams(),{chainId:e,networkVersion:t})}}r.AbstractStreamProvider=d;r.StreamProvider=class extends d{async initialize(){return this._initializeStateAsync()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/StreamProvider.js"}],[44,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERC20=r.ERC1155=r.ERC721=void 0,r.ERC721="ERC721",r.ERC1155="ERC1155",r.ERC20="ERC20"}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/constants.js"}],[45,{"../MetaMaskInpageProvider":42,"../StreamProvider":43,"../utils":53,"./external-extension-config.json":46,"detect-browser":94,"extension-port-stream":96},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createExternalExtensionProvider=void 0;const s=e("detect-browser"),i=n(e("extension-port-stream")),o=n(e("./external-extension-config.json")),a=e("../MetaMaskInpageProvider"),c=e("../StreamProvider"),u=e("../utils"),l=(0,s.detect)();r.createExternalExtensionProvider=function(e="stable"){let t;try{const r=function(e){return("firefox"===l?.name?o.default.firefoxIds:o.default.chromeIds)[e]??e}(e),n=chrome.runtime.connect(r),s=new i.default(n);t=new c.StreamProvider(s,{jsonRpcStreamName:a.MetaMaskInpageProviderStreamName,logger:console,rpcMiddleware:(0,u.getDefaultExternalMiddleware)(console)}),t.initialize()}catch(e){throw console.dir("MetaMask connect error.",e),e}return t}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/extension-provider/createExternalExtensionProvider.js"}],[46,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={chromeIds:{stable:"nkbihfbeogaeaoehlefnkodbefgpgknn",beta:"pbbkamfgmaedccnfkmjcofcecjhfgldn",flask:"ljfoeinjpaedjfecbmggjgodbgkmjkjk"},firefoxIds:{stable:"webextension@metamask.io",beta:"webextension-beta@metamask.io",flask:"webextension-flask@metamask.io"}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/extension-provider/external-extension-config.json"}],[47,{"./BaseProvider":40,"./EIP6963":41,"./MetaMaskInpageProvider":42,"./StreamProvider":43,"./extension-provider/createExternalExtensionProvider":45,"./initializeInpageProvider":48,"./shimWeb3":51},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.eip6963RequestProvider=r.eip6963AnnounceProvider=r.StreamProvider=r.shimWeb3=r.setGlobalProvider=r.MetaMaskInpageProvider=r.MetaMaskInpageProviderStreamName=r.initializeProvider=r.createExternalExtensionProvider=r.BaseProvider=void 0;const n=e("./BaseProvider");Object.defineProperty(r,"BaseProvider",{enumerable:!0,get:function(){return n.BaseProvider}});const s=e("./EIP6963");Object.defineProperty(r,"eip6963AnnounceProvider",{enumerable:!0,get:function(){return s.announceProvider}}),Object.defineProperty(r,"eip6963RequestProvider",{enumerable:!0,get:function(){return s.requestProvider}});const i=e("./extension-provider/createExternalExtensionProvider");Object.defineProperty(r,"createExternalExtensionProvider",{enumerable:!0,get:function(){return i.createExternalExtensionProvider}});const o=e("./initializeInpageProvider");Object.defineProperty(r,"initializeProvider",{enumerable:!0,get:function(){return o.initializeProvider}}),Object.defineProperty(r,"setGlobalProvider",{enumerable:!0,get:function(){return o.setGlobalProvider}});const a=e("./MetaMaskInpageProvider");Object.defineProperty(r,"MetaMaskInpageProvider",{enumerable:!0,get:function(){return a.MetaMaskInpageProvider}}),Object.defineProperty(r,"MetaMaskInpageProviderStreamName",{enumerable:!0,get:function(){return a.MetaMaskInpageProviderStreamName}});const c=e("./shimWeb3");Object.defineProperty(r,"shimWeb3",{enumerable:!0,get:function(){return c.shimWeb3}});const u=e("./StreamProvider");Object.defineProperty(r,"StreamProvider",{enumerable:!0,get:function(){return u.StreamProvider}})}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/index.js"}],[48,{"./EIP6963":41,"./MetaMaskInpageProvider":42,"./shimWeb3":51},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.setGlobalProvider=r.initializeProvider=void 0;const n=e("./EIP6963"),s=e("./MetaMaskInpageProvider"),i=e("./shimWeb3");function o(e){window.ethereum=e,window.dispatchEvent(new Event("ethereum#initialized"))}r.initializeProvider=function({connectionStream:e,jsonRpcStreamName:t,logger:r=console,maxEventListeners:a=100,providerInfo:c,shouldSendMetadata:u=!0,shouldSetOnWindow:l=!0,shouldShimWeb3:d=!1}){const f=new s.MetaMaskInpageProvider(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:a,shouldSendMetadata:u}),p=new Proxy(f,{deleteProperty:()=>!0,get:(e,t)=>e[t]});return c&&(0,n.announceProvider)({info:c,provider:p}),l&&o(p),d&&(0,i.shimWeb3)(p,r),p},r.setGlobalProvider=o}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/initializeInpageProvider.js"}],[49,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n={errors:{disconnected:()=>"MetaMask: Disconnected from chain. Attempting to connect.",permanentlyDisconnected:()=>"MetaMask: Disconnected from MetaMask background. Page reload required.",sendSiteMetadata:()=>"MetaMask: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`MetaMask: The MetaMask Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidNetworkParams:()=>"MetaMask: Received invalid network parameters. Please report this bug.",invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`MetaMask: Connected to chain with ID "${e}".`},warnings:{chainIdDeprecation:"MetaMask: 'ethereum.chainId' is deprecated and may be removed in the future. Please use the 'eth_chainId' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",networkVersionDeprecation:"MetaMask: 'ethereum.networkVersion' is deprecated and may be removed in the future. Please use the 'net_version' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",selectedAddressDeprecation:"MetaMask: 'ethereum.selectedAddress' is deprecated and may be removed in the future. Please use the 'eth_accounts' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",enableDeprecation:"MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1102",sendDeprecation:"MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193",events:{close:"MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect",data:"MetaMask: The event 'data' is deprecated and will be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message",networkChanged:"MetaMask: The event 'networkChanged' is deprecated and may be removed in the future. Use 'chainChanged' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#chainchanged",notification:"MetaMask: The event 'notification' is deprecated and may be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message"},rpc:{ethDecryptDeprecation:"MetaMask: The RPC method 'eth_decrypt' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",ethGetEncryptionPublicKeyDeprecation:"MetaMask: The RPC method 'eth_getEncryptionPublicKey' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",walletWatchAssetNFTExperimental:"MetaMask: The RPC method 'wallet_watchAsset' is experimental for ERC721/ERC1155 assets and may change in the future.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-1.md and https://github.com/MetaMask/metamask-improvement-proposals/blob/main/PROCESS-GUIDE.md#proposal-lifecycle"},experimentalMethods:"MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning."}};r.default=n}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/messages.js"}],[50,{"../constants":44,"../messages":49},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createRpcWarningMiddleware=void 0;const s=e("../constants"),i=n(e("../messages"));r.createRpcWarningMiddleware=function(e){const t={ethDecryptDeprecation:!1,ethGetEncryptionPublicKeyDeprecation:!1,walletWatchAssetNFTExperimental:!1};return(r,n,o)=>{t.ethDecryptDeprecation||"eth_decrypt"!==r.method?t.ethGetEncryptionPublicKeyDeprecation||"eth_getEncryptionPublicKey"!==r.method?!t.walletWatchAssetNFTExperimental&&"wallet_watchAsset"===r.method&&[s.ERC721,s.ERC1155].includes(r.params?.type||"")&&(e.warn(i.default.warnings.rpc.walletWatchAssetNFTExperimental),t.walletWatchAssetNFTExperimental=!0):(e.warn(i.default.warnings.rpc.ethGetEncryptionPublicKeyDeprecation),t.ethGetEncryptionPublicKeyDeprecation=!0):(e.warn(i.default.warnings.rpc.ethDecryptDeprecation),t.ethDecryptDeprecation=!0),o()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/middleware/createRpcWarningMiddleware.js"}],[51,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shimWeb3=void 0,r.shimWeb3=function(e,t=console){let r=!1,n=!1;if(!window.web3){const s="__isMetaMaskShim__";let i={currentProvider:e};Object.defineProperty(i,s,{value:!0,enumerable:!0,configurable:!1,writable:!1}),i=new Proxy(i,{get:(i,o,...a)=>("currentProvider"!==o||r?"currentProvider"===o||o===s||n||(n=!0,t.error("MetaMask no longer injects web3. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),e.request({method:"metamask_logWeb3ShimUsage"}).catch((e=>{t.debug("MetaMask: Failed to log web3 shim usage.",e)}))):(r=!0,t.warn("You are accessing the MetaMask window.web3.currentProvider shim. This property is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3")),Reflect.get(i,o,...a)),set:(...e)=>(t.warn("You are accessing the MetaMask window.web3 shim. This object is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),Reflect.set(...e))}),Object.defineProperty(window,"web3",{value:i,enumerable:!1,configurable:!0,writable:!0})}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/shimWeb3.js"}],[52,{"./messages":49,"./utils":53},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.sendSiteMetadata=void 0;const s=n(e("./messages")),i=e("./utils");function o(e){const{document:t}=e,r=t.querySelector('head > meta[property="og:site_name"]');if(r)return r.content;const n=t.querySelector('head > meta[name="title"]');return n?n.content:t.title&&t.title.length>0?t.title:window.location.hostname}async function a(e){const{document:t}=e,r=t.querySelectorAll('head > link[rel~="icon"]');for(const e of Array.from(r))if(e&&await c(e.href))return e.href;return null}async function c(e){return new Promise(((t,r)=>{try{const r=document.createElement("img");r.onload=()=>t(!0),r.onerror=()=>t(!1),r.src=e}catch(e){r(e)}}))}r.sendSiteMetadata=async function(e,t){try{const t=await async function(){return{name:o(window),icon:await a(window)}}();e.handle({jsonrpc:"2.0",id:1,method:"metamask_sendDomainMetadata",params:t},i.NOOP)}catch(e){t.error({message:s.default.errors.sendSiteMetadata(),originalError:e})}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/siteMetadata.js"}],[53,{"./middleware/createRpcWarningMiddleware":50,"@metamask/json-rpc-engine":6,"@metamask/rpc-errors":57},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NOOP=r.isValidNetworkVersion=r.isValidChainId=r.getRpcPromiseCallback=r.getDefaultExternalMiddleware=r.EMITTED_NOTIFICATIONS=void 0;const n=e("@metamask/json-rpc-engine"),s=e("@metamask/rpc-errors"),i=e("./middleware/createRpcWarningMiddleware");r.EMITTED_NOTIFICATIONS=Object.freeze(["eth_subscription"]);r.getDefaultExternalMiddleware=(e=console)=>{return[(0,n.createIdRemapMiddleware)(),(t=e,(e,r,n)=>{"string"==typeof e.method&&e.method||(r.error=s.rpcErrors.invalidRequest({message:"The request 'method' must be a non-empty string.",data:e})),n((e=>{const{error:n}=r;return n?(t.error(`MetaMask - RPC Error: ${n.message}`,n),e()):e()}))}),(0,i.createRpcWarningMiddleware)(e)];var t};r.getRpcPromiseCallback=(e,t,r=!0)=>(n,s)=>{n||s.error?t(n||s.error):!r||Array.isArray(s)?e(s):e(s.result)};r.isValidChainId=e=>Boolean(e)&&"string"==typeof e&&e.startsWith("0x");r.isValidNetworkVersion=e=>Boolean(e)&&"string"==typeof e;r.NOOP=()=>undefined}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/utils.js"}],[54,{"./utils":58,"@metamask/utils":81,"fast-safe-stringify":122},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.EthereumProviderError=r.JsonRpcError=void 0;const s=e("@metamask/utils"),i=n(e("fast-safe-stringify")),o=e("./utils");class a extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');super(t),this.code=e,r!==undefined&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return this.data!==undefined&&(e.data=this.data,(0,s.isPlainObject)(this.data)&&(e.data.cause=(0,o.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,i.default)(this.serialize(),c,2)}}r.JsonRpcError=a;function c(e,t){return"[Circular]"===t?undefined:t}r.EthereumProviderError=class extends a{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/classes.js"}],[55,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorValues=r.errorCodes=void 0,r.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},r.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/error-constants.js"}],[56,{"./classes":54,"./error-constants":55,"./utils":58},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerErrors=r.rpcErrors=void 0;const n=e("./classes"),s=e("./error-constants"),i=e("./utils");function o(e,t){const[r,s]=c(t);return new n.JsonRpcError(e,r??(0,i.getMessageFromCode)(e),s)}function a(e,t){const[r,s]=c(t);return new n.EthereumProviderError(e,r??(0,i.getMessageFromCode)(e),s)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??undefined,r]}}return[]}r.rpcErrors={parse:e=>o(s.errorCodes.rpc.parse,e),invalidRequest:e=>o(s.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(s.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(s.errorCodes.rpc.methodNotFound,e),internal:e=>o(s.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(s.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(s.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(s.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(s.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(s.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(s.errorCodes.rpc.limitExceeded,e)},r.providerErrors={userRejectedRequest:e=>a(s.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(s.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(s.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(s.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(s.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:s}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,s)}}}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/errors.js"}],[57,{"./classes":54,"./error-constants":55,"./errors":56,"./utils":58},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorCodes=r.providerErrors=r.rpcErrors=r.getMessageFromCode=r.serializeError=r.serializeCause=r.EthereumProviderError=r.JsonRpcError=void 0;var n=e("./classes");Object.defineProperty(r,"JsonRpcError",{enumerable:!0,get:function(){return n.JsonRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});var s=e("./utils");Object.defineProperty(r,"serializeCause",{enumerable:!0,get:function(){return s.serializeCause}}),Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return s.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return s.getMessageFromCode}});var i=e("./errors");Object.defineProperty(r,"rpcErrors",{enumerable:!0,get:function(){return i.rpcErrors}}),Object.defineProperty(r,"providerErrors",{enumerable:!0,get:function(){return i.providerErrors}});var o=e("./error-constants");Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/index.js"}],[58,{"./error-constants":55,"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.serializeCause=r.serializeError=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=e("@metamask/utils"),s=e("./error-constants"),i=s.errorCodes.rpc.internal,o={code:i,message:a(i)};function a(e,t="Unspecified error message. This is a bug, please report it."){if(c(e)){const t=e.toString();if((0,n.hasProperty)(s.errorValues,t))return s.errorValues[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){return Number.isInteger(e)}function u(e){return Array.isArray(e)?e.map((e=>(0,n.isValidJson)(e)?e:(0,n.isObject)(e)?l(e):null)):(0,n.isObject)(e)?l(e):(0,n.isValidJson)(e)?e:null}function l(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const s=e[r];return(0,n.isValidJson)(s)&&(t[r]=s),t}),{})}r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",r.getMessageFromCode=a,r.isValidCode=c,r.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:r=!0}={}){if(!(0,n.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const s=function(e,t){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,n.isJsonRpcError)(e))return e;const r=u(e),s={...t,data:{cause:r}};return s}(e,t);return r||delete s.stack,s},r.serializeCause=u}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/utils.js"}],[59,{events:"events"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("events");function s(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class i extends n.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(n!==undefined)r=r&&n.error===undefined;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const i=n[e];if(i===undefined)return!1;if("function"==typeof i)s(i,this,t);else{const e=i.length,r=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(i);for(let n=0;n<e;n+=1)s(r[n],this,t)}return!0}}r.default=i}}},{package:"@metamask/providers>@metamask/safe-event-emitter",file:"../../node_modules/@metamask/safe-event-emitter/index.js"}],[60,{debug:92},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n,s=e("debug"),i=((n=s)&&n.__esModule?n:{default:n}).default.call(void 0,"metamask");r.createProjectLogger=function(e){return i.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-2LBGT4GH.js"}],[61,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};r.__privateGet=(e,t,r)=>(n(e,t,"read from private field"),r?r.call(e):t.get(e)),r.__privateAdd=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},r.__privateSet=(e,t,r,s)=>(n(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-3W5G4CYI.js"}],[62,{"./chunk-6ZDHSOUV.js":67,semver:190,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-6ZDHSOUV.js"),s=e("semver"),i=e("superstruct"),o=i.refine.call(void 0,i.string.call(void 0),"Version",(e=>null!==s.valid.call(void 0,e)||`Expected SemVer version, got "${e}"`)),a=i.refine.call(void 0,i.string.call(void 0),"Version range",(e=>null!==s.validRange.call(void 0,e)||`Expected SemVer range, got "${e}"`));r.VersionStruct=o,r.VersionRangeStruct=a,r.isValidSemVerVersion=function(e){return i.is.call(void 0,e,o)},r.isValidSemVerRange=function(e){return i.is.call(void 0,e,a)},r.assertIsSemVerVersion=function(e){n.assertStruct.call(void 0,e,o)},r.assertIsSemVerRange=function(e){n.assertStruct.call(void 0,e,a)},r.gtVersion=function(e,t){return s.gt.call(void 0,e,t)},r.gtRange=function(e,t){return s.gtr.call(void 0,e,t)},r.satisfiesVersionRange=function(e,t){return s.satisfies.call(void 0,e,t,{includePrerelease:!0})}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-4D6XQBHA.js"}],[63,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const n=new Promise(((e,n)=>{t=e,r=n}));return e&&n.catch((e=>{})),{promise:n,resolve:t,reject:r}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-4NIRTM4M.js"}],[64,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=(e=>(e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year",e))(n||{}),s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.Duration=n,r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-4RMX5YWE.js"}],[65,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-5AVWINSB.js"}],[66,{"./chunk-6ZDHSOUV.js":67,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){return null!=e?e:t()}Object.defineProperty(r,"__esModule",{value:!0});var s=e("./chunk-6ZDHSOUV.js"),i=e("superstruct");r.base64=(e,t={})=>{const r=n(t.paddingRequired,(()=>!1)),o=n(t.characterSet,(()=>"base64"));let a,c;return"base64"===o?a=String.raw`[A-Za-z0-9+\/]`:(s.assert.call(void 0,"base64url"===o),a=String.raw`[-_A-Za-z0-9]`),c=r?new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),i.pattern.call(void 0,e,c)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-6NZW4WK4.js"}],[67,{"./chunk-IZC266HS.js":71,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-IZC266HS.js"),s=e("superstruct");function i(e){return Boolean("string"==typeof function(e){let t=undefined,r=e[0],n=1;for(;n<e.length;){const s=e[n],i=e[n+1];if(n+=2,("optionalAccess"===s||"optionalCall"===s)&&null==r)return undefined;"access"===s||"optionalAccess"===s?(t=r,r=i(r)):"call"!==s&&"optionalCall"!==s||(r=i(((...e)=>r.call(t,...e))),t=undefined)}return r}([e,"optionalAccess",e=>e.prototype,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name]))}function o(e,t){return i(e)?new e({message:t}):e({message:t})}var a=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};r.AssertionError=a,r.assert=function(e,t="Assertion failed.",r=a){if(!e){if(t instanceof Error)throw t;throw o(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=a){try{s.assert.call(void 0,e,t)}catch(e){throw o(i,`${r}: ${function(e){return n.getErrorMessage.call(void 0,e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-6ZDHSOUV.js"}],[68,{"./chunk-6ZDHSOUV.js":67,"./chunk-QEPVHEP7.js":74,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-QEPVHEP7.js"),s=e("./chunk-6ZDHSOUV.js"),i=e("superstruct"),o=i.union.call(void 0,[i.number.call(void 0),i.bigint.call(void 0),i.string.call(void 0),n.StrictHexStruct]),a=i.coerce.call(void 0,i.number.call(void 0),o,Number),c=i.coerce.call(void 0,i.bigint.call(void 0),o,BigInt),u=(i.union.call(void 0,[n.StrictHexStruct,i.instance.call(void 0,Uint8Array)]),i.coerce.call(void 0,i.instance.call(void 0,Uint8Array),i.union.call(void 0,[n.StrictHexStruct]),n.hexToBytes)),l=i.coerce.call(void 0,n.StrictHexStruct,i.instance.call(void 0,Uint8Array),n.bytesToHex);r.createNumber=function(e){try{const t=i.create.call(void 0,e,a);return s.assert.call(void 0,Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof i.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return i.create.call(void 0,e,c)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return i.create.call(void 0,e,u)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return i.create.call(void 0,e,l)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-DHVKFDHQ.js"}],[69,{"./chunk-6NZW4WK4.js":66,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-6NZW4WK4.js"),s=e("superstruct"),i=s.size.call(void 0,n.base64.call(void 0,s.string.call(void 0),{paddingRequired:!0}),44,44);r.ChecksumStruct=i}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-E4C7EW4R.js"}],[70,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-EQMZL4XU.js"}],[71,{"./chunk-QVEKZRZ2.js":75,"pony-cause":143},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-QVEKZRZ2.js"),s=e("pony-cause");function i(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=i,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:n.isNullOrUndefined.call(void 0,e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||n.isObject.call(void 0,r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new(0,s.ErrorWithCause)(t,{cause:e}),i(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-IZC266HS.js"}],[72,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-LC2CRSWD.js"}],[73,{"./chunk-6ZDHSOUV.js":67,"./chunk-QVEKZRZ2.js":75,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-6ZDHSOUV.js"),s=e("./chunk-QVEKZRZ2.js"),i=e("superstruct"),o=e=>i.object.call(void 0,e);function a({path:e,branch:t}){const r=e[e.length-1];return s.hasProperty.call(void 0,t[t.length-2],r)}function c(e){return new(0,i.Struct)({...e,type:`optional ${e.type}`,validator:(t,r)=>!a(r)||e.validator(t,r),refiner:(t,r)=>!a(r)||e.refiner(t,r)})}var u=i.union.call(void 0,[i.literal.call(void 0,null),i.boolean.call(void 0),i.define.call(void 0,"finite number",(e=>i.is.call(void 0,e,i.number.call(void 0))&&Number.isFinite(e))),i.string.call(void 0),i.array.call(void 0,i.lazy.call(void 0,(()=>u))),i.record.call(void 0,i.string.call(void 0),i.lazy.call(void 0,(()=>u)))]),l=i.coerce.call(void 0,u,i.any.call(void 0),(e=>(n.assertStruct.call(void 0,e,u),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))))));function d(e){return i.create.call(void 0,e,l)}var f=i.literal.call(void 0,"2.0"),p=i.nullable.call(void 0,i.union.call(void 0,[i.number.call(void 0),i.string.call(void 0)])),h=o({code:i.integer.call(void 0),message:i.string.call(void 0),data:c(l),stack:c(i.string.call(void 0))}),m=i.union.call(void 0,[i.record.call(void 0,i.string.call(void 0),l),i.array.call(void 0,l)]),g=o({id:p,jsonrpc:f,method:i.string.call(void 0),params:c(m)}),b=o({jsonrpc:f,method:i.string.call(void 0),params:c(m)});var y=i.object.call(void 0,{id:p,jsonrpc:f,result:i.optional.call(void 0,i.unknown.call(void 0)),error:i.optional.call(void 0,h)}),w=o({id:p,jsonrpc:f,result:l}),v=o({id:p,jsonrpc:f,error:h}),_=i.union.call(void 0,[w,v]);r.object=o,r.exactOptional=c,r.UnsafeJsonStruct=u,r.JsonStruct=l,r.isValidJson=function(e){try{return d(e),!0}catch(e){return!1}},r.getSafeJson=d,r.getJsonSize=function(e){n.assertStruct.call(void 0,e,l,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=f,r.JsonRpcIdStruct=p,r.JsonRpcErrorStruct=h,r.JsonRpcParamsStruct=m,r.JsonRpcRequestStruct=g,r.JsonRpcNotificationStruct=b,r.isJsonRpcNotification=function(e){return i.is.call(void 0,e,b)},r.assertIsJsonRpcNotification=function(e,t){n.assertStruct.call(void 0,e,b,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return i.is.call(void 0,e,g)},r.assertIsJsonRpcRequest=function(e,t){n.assertStruct.call(void 0,e,g,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=y,r.JsonRpcSuccessStruct=w,r.JsonRpcFailureStruct=v,r.JsonRpcResponseStruct=_,r.isPendingJsonRpcResponse=function(e){return i.is.call(void 0,e,y)},r.assertIsPendingJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,y,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return i.is.call(void 0,e,_)},r.assertIsJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,_,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return i.is.call(void 0,e,w)},r.assertIsJsonRpcSuccess=function(e,t){n.assertStruct.call(void 0,e,w,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return i.is.call(void 0,e,v)},r.assertIsJsonRpcFailure=function(e,t){n.assertStruct.call(void 0,e,v,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return i.is.call(void 0,e,h)},r.assertIsJsonRpcError=function(e,t){n.assertStruct.call(void 0,e,h,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-OLLG4H35.js"}],[74,{"./chunk-6ZDHSOUV.js":67,"@noble/hashes/sha3":85,"@scure/base":87,buffer:"buffer",superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-6ZDHSOUV.js"),s=e("@noble/hashes/sha3"),i=e("superstruct"),o=e("@scure/base"),a=48,c=58,u=87;var l=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function d(e){return e instanceof Uint8Array}function f(e){n.assert.call(void 0,d(e),"Value must be a Uint8Array.")}function p(e){if(f(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return O(r.join(""))}function h(e){f(e);const t=p(e);return BigInt(t)}function m(e){if("0x"===function(e){let t=undefined,r=e[0],n=1;for(;n<e.length;){const s=e[n],i=e[n+1];if(n+=2,("optionalAccess"===s||"optionalCall"===s)&&null==r)return undefined;"access"===s||"optionalAccess"===s?(t=r,r=i(r)):"call"!==s&&"optionalCall"!==s||(r=i(((...e)=>r.call(t,...e))),t=undefined)}return r}([e,"optionalAccess",e=>e.toLowerCase,"optionalCall",e=>e()]))return new Uint8Array;x(e);const t=P(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),s=r.charCodeAt(2*e+1),i=t-(t<c?a:u),o=s-(s<c?a:u);n[e]=16*i+o}return n}function g(e){n.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),n.assert.call(void 0,e>=BigInt(0),"Value must be a non-negative bigint.");return m(e.toString(16))}function b(e){n.assert.call(void 0,"number"==typeof e,"Value must be a number."),n.assert.call(void 0,e>=0,"Value must be a non-negative number."),n.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return m(e.toString(16))}function y(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function w(e){if("bigint"==typeof e)return g(e);if("number"==typeof e)return b(e);if("string"==typeof e)return e.startsWith("0x")?m(e):y(e);if(d(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}var v=i.pattern.call(void 0,i.string.call(void 0),/^(?:0x)?[0-9a-f]+$/iu),_=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]+$/iu),E=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]{40}$/u),S=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-fA-F]{40}$/u);function k(e){return i.is.call(void 0,e,v)}function T(e){return i.is.call(void 0,e,_)}function x(e){n.assert.call(void 0,k(e),"Value must be a hexadecimal string.")}function R(e){n.assert.call(void 0,i.is.call(void 0,e,S),"Invalid hex address.");const t=P(e.toLowerCase()),r=P(p(s.keccak_256.call(void 0,t)));return`0x${t.split("").map(((e,t)=>{const s=r[t];return n.assert.call(void 0,i.is.call(void 0,s,i.string.call(void 0)),"Hash shorter than address."),parseInt(s,16)>7?e.toUpperCase():e})).join("")}`}function j(e){return!!i.is.call(void 0,e,S)&&R(e)===e}function O(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`}function P(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=v,r.StrictHexStruct=_,r.HexAddressStruct=E,r.HexChecksumAddressStruct=S,r.isHexString=k,r.isStrictHexString=T,r.assertIsHexString=x,r.assertIsStrictHexString=function(e){n.assert.call(void 0,T(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return i.is.call(void 0,e,E)||j(e)},r.getChecksumAddress=R,r.isValidChecksumAddress=j,r.add0x=O,r.remove0x=P,r.isBytes=d,r.assertIsBytes=f,r.bytesToHex=p,r.bytesToBigInt=h,r.bytesToSignedBigInt=function(e){f(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},r.bytesToNumber=function(e){f(e);const t=h(e);return n.assert.call(void 0,t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},r.bytesToString=function(e){return f(e),(new TextDecoder).decode(e)},r.bytesToBase64=function(e){return f(e),o.base64.encode(e)},r.hexToBytes=m,r.bigIntToBytes=g,r.signedBigIntToBytes=function(e,t){n.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),n.assert.call(void 0,"number"==typeof t,"Byte length must be a number."),n.assert.call(void 0,t>0,"Byte length must be greater than 0."),n.assert.call(void 0,function(e,t){n.assert.call(void 0,t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e<s.length;e++)s[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return s.reverse()},r.numberToBytes=b,r.stringToBytes=y,r.base64ToBytes=function(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),o.base64.decode(e)},r.valueToBytes=w,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const s=w(e[n]);t[n]=s,r+=s.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},r.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-QEPVHEP7.js"}],[75,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=(e=>(e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date",e))(n||{}),s=/"|\\|\n|\r|\t/gu;function i(e){return e.charCodeAt(0)<=127}r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null==e},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},r.JsonSize=n,r.ESCAPE_CHARACTERS_REGEXP=s,r.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},r.isASCII=i,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>i(t)?e+1:e+2),0)+(t=e.match(s),r=()=>[],null!=t?t:r()).length;var t,r},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-QVEKZRZ2.js"}],[76,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-RKRGAFXY.js"}],[77,{superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){let t=undefined,r=e[0],n=1;for(;n<e.length;){const s=e[n],i=e[n+1];if(n+=2,("optionalAccess"===s||"optionalCall"===s)&&null==r)return undefined;"access"===s||"optionalAccess"===s?(t=r,r=i(r)):"call"!==s&&"optionalCall"!==s||(r=i(((...e)=>r.call(t,...e))),t=undefined)}return r}Object.defineProperty(r,"__esModule",{value:!0});var s=e("superstruct"),i=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,o=/^[-a-z0-9]{3,8}$/u,a=/^[-_a-zA-Z0-9]{1,32}$/u,c=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,u=/^[-.%a-zA-Z0-9]{1,128}$/u,l=s.pattern.call(void 0,s.string.call(void 0),i),d=s.pattern.call(void 0,s.string.call(void 0),o),f=s.pattern.call(void 0,s.string.call(void 0),a),p=s.pattern.call(void 0,s.string.call(void 0),c),h=s.pattern.call(void 0,s.string.call(void 0),u);r.CAIP_CHAIN_ID_REGEX=i,r.CAIP_NAMESPACE_REGEX=o,r.CAIP_REFERENCE_REGEX=a,r.CAIP_ACCOUNT_ID_REGEX=c,r.CAIP_ACCOUNT_ADDRESS_REGEX=u,r.CaipChainIdStruct=l,r.CaipNamespaceStruct=d,r.CaipReferenceStruct=f,r.CaipAccountIdStruct=p,r.CaipAccountAddressStruct=h,r.isCaipChainId=function(e){return s.is.call(void 0,e,l)},r.isCaipNamespace=function(e){return s.is.call(void 0,e,d)},r.isCaipReference=function(e){return s.is.call(void 0,e,f)},r.isCaipAccountId=function(e){return s.is.call(void 0,e,p)},r.isCaipAccountAddress=function(e){return s.is.call(void 0,e,h)},r.parseCaipChainId=function(e){const t=i.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=c.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-U7ZUGCE7.js"}],[78,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-UOTVU7OQ.js"}],[79,{"./chunk-6ZDHSOUV.js":67,"./chunk-QEPVHEP7.js":74},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-QEPVHEP7.js"),s=e("./chunk-6ZDHSOUV.js");r.numberToHex=e=>(s.assert.call(void 0,"number"==typeof e,"Value must be a number."),s.assert.call(void 0,e>=0,"Value must be a non-negative number."),s.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),n.add0x.call(void 0,e.toString(16))),r.bigIntToHex=e=>(s.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),s.assert.call(void 0,e>=0,"Value must be a non-negative bigint."),n.add0x.call(void 0,e.toString(16))),r.hexToNumber=e=>{n.assertIsHexString.call(void 0,e);const t=parseInt(e,16);return s.assert.call(void 0,Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},r.hexToBigInt=e=>(n.assertIsHexString.call(void 0,e),BigInt(n.add0x.call(void 0,e)))}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-VFXTVNXN.js"}],[80,{"./chunk-3W5G4CYI.js":61},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n,s,i=e("./chunk-3W5G4CYI.js"),o=class{constructor(e){i.__privateAdd.call(void 0,this,n,void 0),i.__privateSet.call(void 0,this,n,new Map(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,n).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,n)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,n).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,n).forEach(((r,n,s)=>e.call(t,r,n,this)))}get(e){return i.__privateGet.call(void 0,this,n).get(e)}has(e){return i.__privateGet.call(void 0,this,n).has(e)}keys(){return i.__privateGet.call(void 0,this,n).keys()}values(){return i.__privateGet.call(void 0,this,n).values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}};n=new WeakMap;var a=class{constructor(e){i.__privateAdd.call(void 0,this,s,void 0),i.__privateSet.call(void 0,this,s,new Set(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,s).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,s)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,s).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,s).forEach(((r,n,s)=>e.call(t,r,n,this)))}has(e){return i.__privateGet.call(void 0,this,s).has(e)}keys(){return i.__privateGet.call(void 0,this,s).keys()}values(){return i.__privateGet.call(void 0,this,s).values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}};s=new WeakMap,Object.freeze(o),Object.freeze(o.prototype),Object.freeze(a),Object.freeze(a.prototype),r.FrozenMap=o,r.FrozenSet=a}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-Z2RGWDD7.js"}],[81,{"./chunk-2LBGT4GH.js":60,"./chunk-3W5G4CYI.js":61,"./chunk-4D6XQBHA.js":62,"./chunk-4NIRTM4M.js":63,"./chunk-4RMX5YWE.js":64,"./chunk-5AVWINSB.js":65,"./chunk-6NZW4WK4.js":66,"./chunk-6ZDHSOUV.js":67,"./chunk-DHVKFDHQ.js":68,"./chunk-E4C7EW4R.js":69,"./chunk-EQMZL4XU.js":70,"./chunk-IZC266HS.js":71,"./chunk-LC2CRSWD.js":72,"./chunk-OLLG4H35.js":73,"./chunk-QEPVHEP7.js":74,"./chunk-QVEKZRZ2.js":75,"./chunk-RKRGAFXY.js":76,"./chunk-U7ZUGCE7.js":77,"./chunk-UOTVU7OQ.js":78,"./chunk-VFXTVNXN.js":79,"./chunk-Z2RGWDD7.js":80},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),e("./chunk-5AVWINSB.js");var n=e("./chunk-VFXTVNXN.js");e("./chunk-LC2CRSWD.js");var s=e("./chunk-4NIRTM4M.js"),i=e("./chunk-4RMX5YWE.js");e("./chunk-UOTVU7OQ.js");var o=e("./chunk-4D6XQBHA.js"),a=e("./chunk-OLLG4H35.js");e("./chunk-RKRGAFXY.js");var c=e("./chunk-2LBGT4GH.js"),u=e("./chunk-U7ZUGCE7.js"),l=e("./chunk-E4C7EW4R.js"),d=e("./chunk-6NZW4WK4.js"),f=e("./chunk-DHVKFDHQ.js"),p=e("./chunk-QEPVHEP7.js"),h=e("./chunk-6ZDHSOUV.js"),m=e("./chunk-IZC266HS.js"),g=e("./chunk-QVEKZRZ2.js"),b=e("./chunk-Z2RGWDD7.js");e("./chunk-3W5G4CYI.js"),e("./chunk-EQMZL4XU.js"),r.AssertionError=h.AssertionError,r.CAIP_ACCOUNT_ADDRESS_REGEX=u.CAIP_ACCOUNT_ADDRESS_REGEX,r.CAIP_ACCOUNT_ID_REGEX=u.CAIP_ACCOUNT_ID_REGEX,r.CAIP_CHAIN_ID_REGEX=u.CAIP_CHAIN_ID_REGEX,r.CAIP_NAMESPACE_REGEX=u.CAIP_NAMESPACE_REGEX,r.CAIP_REFERENCE_REGEX=u.CAIP_REFERENCE_REGEX,r.CaipAccountAddressStruct=u.CaipAccountAddressStruct,r.CaipAccountIdStruct=u.CaipAccountIdStruct,r.CaipChainIdStruct=u.CaipChainIdStruct,r.CaipNamespaceStruct=u.CaipNamespaceStruct,r.CaipReferenceStruct=u.CaipReferenceStruct,r.ChecksumStruct=l.ChecksumStruct,r.Duration=i.Duration,r.ESCAPE_CHARACTERS_REGEXP=g.ESCAPE_CHARACTERS_REGEXP,r.FrozenMap=b.FrozenMap,r.FrozenSet=b.FrozenSet,r.HexAddressStruct=p.HexAddressStruct,r.HexChecksumAddressStruct=p.HexChecksumAddressStruct,r.HexStruct=p.HexStruct,r.JsonRpcErrorStruct=a.JsonRpcErrorStruct,r.JsonRpcFailureStruct=a.JsonRpcFailureStruct,r.JsonRpcIdStruct=a.JsonRpcIdStruct,r.JsonRpcNotificationStruct=a.JsonRpcNotificationStruct,r.JsonRpcParamsStruct=a.JsonRpcParamsStruct,r.JsonRpcRequestStruct=a.JsonRpcRequestStruct,r.JsonRpcResponseStruct=a.JsonRpcResponseStruct,r.JsonRpcSuccessStruct=a.JsonRpcSuccessStruct,r.JsonRpcVersionStruct=a.JsonRpcVersionStruct,r.JsonSize=g.JsonSize,r.JsonStruct=a.JsonStruct,r.PendingJsonRpcResponseStruct=a.PendingJsonRpcResponseStruct,r.StrictHexStruct=p.StrictHexStruct,r.UnsafeJsonStruct=a.UnsafeJsonStruct,r.VersionRangeStruct=o.VersionRangeStruct,r.VersionStruct=o.VersionStruct,r.add0x=p.add0x,r.assert=h.assert,r.assertExhaustive=h.assertExhaustive,r.assertIsBytes=p.assertIsBytes,r.assertIsHexString=p.assertIsHexString,r.assertIsJsonRpcError=a.assertIsJsonRpcError,r.assertIsJsonRpcFailure=a.assertIsJsonRpcFailure,r.assertIsJsonRpcNotification=a.assertIsJsonRpcNotification,r.assertIsJsonRpcRequest=a.assertIsJsonRpcRequest,r.assertIsJsonRpcResponse=a.assertIsJsonRpcResponse,r.assertIsJsonRpcSuccess=a.assertIsJsonRpcSuccess,r.assertIsPendingJsonRpcResponse=a.assertIsPendingJsonRpcResponse,r.assertIsSemVerRange=o.assertIsSemVerRange,r.assertIsSemVerVersion=o.assertIsSemVerVersion,r.assertIsStrictHexString=p.assertIsStrictHexString,r.assertStruct=h.assertStruct,r.base64=d.base64,r.base64ToBytes=p.base64ToBytes,r.bigIntToBytes=p.bigIntToBytes,r.bigIntToHex=n.bigIntToHex,r.bytesToBase64=p.bytesToBase64,r.bytesToBigInt=p.bytesToBigInt,r.bytesToHex=p.bytesToHex,r.bytesToNumber=p.bytesToNumber,r.bytesToSignedBigInt=p.bytesToSignedBigInt,r.bytesToString=p.bytesToString,r.calculateNumberSize=g.calculateNumberSize,r.calculateStringSize=g.calculateStringSize,r.concatBytes=p.concatBytes,r.createBigInt=f.createBigInt,r.createBytes=f.createBytes,r.createDataView=p.createDataView,r.createDeferredPromise=s.createDeferredPromise,r.createHex=f.createHex,r.createModuleLogger=c.createModuleLogger,r.createNumber=f.createNumber,r.createProjectLogger=c.createProjectLogger,r.exactOptional=a.exactOptional,r.getChecksumAddress=p.getChecksumAddress,r.getErrorMessage=m.getErrorMessage,r.getJsonRpcIdValidator=a.getJsonRpcIdValidator,r.getJsonSize=a.getJsonSize,r.getKnownPropertyNames=g.getKnownPropertyNames,r.getSafeJson=a.getSafeJson,r.gtRange=o.gtRange,r.gtVersion=o.gtVersion,r.hasProperty=g.hasProperty,r.hexToBigInt=n.hexToBigInt,r.hexToBytes=p.hexToBytes,r.hexToNumber=n.hexToNumber,r.inMilliseconds=i.inMilliseconds,r.isASCII=g.isASCII,r.isBytes=p.isBytes,r.isCaipAccountAddress=u.isCaipAccountAddress,r.isCaipAccountId=u.isCaipAccountId,r.isCaipChainId=u.isCaipChainId,r.isCaipNamespace=u.isCaipNamespace,r.isCaipReference=u.isCaipReference,r.isErrorWithCode=m.isErrorWithCode,r.isErrorWithMessage=m.isErrorWithMessage,r.isErrorWithStack=m.isErrorWithStack,r.isHexString=p.isHexString,r.isJsonRpcError=a.isJsonRpcError,r.isJsonRpcFailure=a.isJsonRpcFailure,r.isJsonRpcNotification=a.isJsonRpcNotification,r.isJsonRpcRequest=a.isJsonRpcRequest,r.isJsonRpcResponse=a.isJsonRpcResponse,r.isJsonRpcSuccess=a.isJsonRpcSuccess,r.isNonEmptyArray=g.isNonEmptyArray,r.isNullOrUndefined=g.isNullOrUndefined,r.isObject=g.isObject,r.isPendingJsonRpcResponse=a.isPendingJsonRpcResponse,r.isPlainObject=g.isPlainObject,r.isStrictHexString=p.isStrictHexString,r.isValidChecksumAddress=p.isValidChecksumAddress,r.isValidHexAddress=p.isValidHexAddress,r.isValidJson=a.isValidJson,r.isValidSemVerRange=o.isValidSemVerRange,r.isValidSemVerVersion=o.isValidSemVerVersion,r.jsonrpc2=a.jsonrpc2,r.numberToBytes=p.numberToBytes,r.numberToHex=n.numberToHex,r.object=a.object,r.parseCaipAccountId=u.parseCaipAccountId,r.parseCaipChainId=u.parseCaipChainId,r.remove0x=p.remove0x,r.satisfiesVersionRange=o.satisfiesVersionRange,r.signedBigIntToBytes=p.signedBigIntToBytes,r.stringToBytes=p.stringToBytes,r.timeSince=i.timeSince,r.valueToBytes=p.valueToBytes,r.wrapError=m.wrapError}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/index.js"}],[82,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function s(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function c(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(r,"__esModule",{value:!0}),r.output=r.exists=r.hash=r.bytes=r.bool=r.number=void 0,r.number=n,r.bool=s,r.bytes=i,r.hash=o,r.exists=a,r.output=c;const u={number:n,bool:s,bytes:i,hash:o,exists:a,output:c};r.default=u}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/_assert.js"}],[83,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.add5L=r.add5H=r.add4H=r.add4L=r.add3H=r.add3L=r.add=r.rotlBL=r.rotlBH=r.rotlSL=r.rotlSH=r.rotr32L=r.rotr32H=r.rotrBL=r.rotrBH=r.rotrSL=r.rotrSH=r.shrSL=r.shrSH=r.toBig=r.split=r.fromBig=void 0;const n=BigInt(2**32-1),s=BigInt(32);function i(e,t=!1){return t?{h:Number(e&n),l:Number(e>>s&n)}:{h:0|Number(e>>s&n),l:0|Number(e&n)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let s=0;s<e.length;s++){const{h:o,l:a}=i(e[s],t);[r[s],n[s]]=[o,a]}return[r,n]}r.fromBig=i,r.split=o;const a=(e,t)=>BigInt(e>>>0)<<s|BigInt(t>>>0);r.toBig=a;const c=(e,t,r)=>e>>>r;r.shrSH=c;const u=(e,t,r)=>e<<32-r|t>>>r;r.shrSL=u;const l=(e,t,r)=>e>>>r|t<<32-r;r.rotrSH=l;const d=(e,t,r)=>e<<32-r|t>>>r;r.rotrSL=d;const f=(e,t,r)=>e<<64-r|t>>>r-32;r.rotrBH=f;const p=(e,t,r)=>e>>>r-32|t<<64-r;r.rotrBL=p;const h=(e,t)=>t;r.rotr32H=h;const m=(e,t)=>e;r.rotr32L=m;const g=(e,t,r)=>e<<r|t>>>32-r;r.rotlSH=g;const b=(e,t,r)=>t<<r|e>>>32-r;r.rotlSL=b;const y=(e,t,r)=>t<<r-32|e>>>64-r;r.rotlBH=y;const w=(e,t,r)=>e<<r-32|t>>>64-r;function v(e,t,r,n){const s=(t>>>0)+(n>>>0);return{h:e+r+(s/2**32|0)|0,l:0|s}}r.rotlBL=w,r.add=v;const _=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);r.add3L=_;const E=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;r.add3H=E;const S=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);r.add4L=S;const k=(e,t,r,n,s)=>t+r+n+s+(e/2**32|0)|0;r.add4H=k;const T=(e,t,r,n,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(s>>>0);r.add5L=T;const x=(e,t,r,n,s,i)=>t+r+n+s+i+(e/2**32|0)|0;r.add5H=x;const R={fromBig:i,split:o,toBig:a,shrSH:c,shrSL:u,rotrSH:l,rotrSL:d,rotrBH:f,rotrBL:p,rotr32H:h,rotr32L:m,rotlSH:g,rotlSL:b,rotlBH:y,rotlBL:w,add:v,add3L:_,add3H:E,add4L:S,add4H:k,add5H:x,add5L:T};r.default=R}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/_u64.js"}],[84,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.crypto=void 0,r.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:undefined}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/crypto.js"}],[85,{"./_assert.js":82,"./_u64.js":83,"./utils.js":86},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shake256=r.shake128=r.keccak_512=r.keccak_384=r.keccak_256=r.keccak_224=r.sha3_512=r.sha3_384=r.sha3_256=r.sha3_224=r.Keccak=r.keccakP=void 0;const n=e("./_assert.js"),s=e("./_u64.js"),i=e("./utils.js"),[o,a,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),d=BigInt(2),f=BigInt(7),p=BigInt(256),h=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],o.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let s=u;for(let e=0;e<7;e++)t=(t<<l^(t>>f)*h)%p,t&d&&(s^=l<<(l<<BigInt(e))-l);c.push(s)}const[m,g]=(0,s.split)(c,!0),b=(e,t,r)=>r>32?(0,s.rotlBH)(e,t,r):(0,s.rotlSH)(e,t,r),y=(e,t,r)=>r>32?(0,s.rotlBL)(e,t,r):(0,s.rotlSL)(e,t,r);function w(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,s=(t+2)%10,i=r[s],o=r[s+1],a=b(i,o,1)^r[n],c=y(i,o,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],s=e[3];for(let r=0;r<24;r++){const n=a[r],i=b(t,s,n),c=y(t,s,n),u=o[r];t=e[u],s=e[u+1],e[u]=i,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=m[n],e[1]^=g[n]}r.fill(0)}r.keccakP=w;class v extends i.Hash{constructor(e,t,r,s=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=s,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}keccak(){w(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){const i=Math.min(t-this.pos,s-n);for(let t=0;t<i;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,s=e.length;n<s;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,s-n);e.set(t.subarray(this.posOut,this.posOut+i),n),this.posOut+=i,n+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:s,enableXOF:i}=this;return e||(e=new v(t,r,n,i,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=r,e.outputLen=n,e.enableXOF=i,e.destroyed=this.destroyed,e}}r.Keccak=v;const _=(e,t,r)=>(0,i.wrapConstructor)((()=>new v(t,e,r)));r.sha3_224=_(6,144,28),r.sha3_256=_(6,136,32),r.sha3_384=_(6,104,48),r.sha3_512=_(6,72,64),r.keccak_224=_(1,144,28),r.keccak_256=_(1,136,32),r.keccak_384=_(1,104,48),r.keccak_512=_(1,72,64);const E=(e,t,r)=>(0,i.wrapXOFConstructorWithOpts)(((n={})=>new v(t,e,n.dkLen===undefined?r:n.dkLen,!0)));r.shake128=E(31,168,16),r.shake256=E(31,136,32)}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/sha3.js"}],[86,{"@noble/hashes/crypto":84},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
|
|
13290
|
+
LavaPack.loadBundle([[1,{"@metamask/rpc-errors":31,"@metamask/safe-event-emitter":33,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i,o,a,c,u,l,d,p,h,f,m,g=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))},b=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},y=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},w=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.JsonRpcEngine=void 0;const v=e("@metamask/rpc-errors"),E=w(e("@metamask/safe-event-emitter")),k=e("@metamask/utils");class _ extends E.default{constructor({notificationHandler:e}={}){super(),n.add(this),i.set(this,!1),o.set(this,void 0),a.set(this,void 0),b(this,o,[],"f"),b(this,a,e,"f")}destroy(){y(this,o,"f").forEach((e=>{"destroy"in e&&"function"==typeof e.destroy&&e.destroy()})),b(this,o,[],"f"),b(this,i,!0,"f")}push(e){y(this,n,"m",c).call(this),y(this,o,"f").push(e)}handle(e,t){if(y(this,n,"m",c).call(this),t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?y(this,n,"m",u).call(this,e,t):y(this,n,"m",u).call(this,e):t?y(this,n,"m",l).call(this,e,t):this._promiseHandle(e)}asMiddleware(){return y(this,n,"m",c).call(this),(e,t,r,n)=>g(this,void 0,void 0,(function*(){try{const[i,a,c]=yield y(_,s,"m",p).call(_,e,t,y(this,o,"f"));return a?(yield y(_,s,"m",f).call(_,c),n(i)):r((e=>g(this,void 0,void 0,(function*(){try{yield y(_,s,"m",f).call(_,c)}catch(t){return e(t)}return e()}))))}catch(e){return n(e)}}))}_promiseHandle(e){return g(this,void 0,void 0,(function*(){return new Promise(((t,r)=>{y(this,n,"m",l).call(this,e,((e,n)=>{e&&n===undefined?r(e):t(n)})).catch(r)}))}))}}function S(e){return JSON.stringify(e,null,2)}r.JsonRpcEngine=_,s=_,i=new WeakMap,o=new WeakMap,a=new WeakMap,n=new WeakSet,c=function(){if(y(this,i,"f"))throw new Error("This engine is destroyed and can no longer be used.")},u=function(e,t){return g(this,void 0,void 0,(function*(){try{if(0===e.length){const e=[{id:null,jsonrpc:"2.0",error:new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Request batch must contain plain objects. Received an empty array")}];return t?t(null,e):e}const r=(yield Promise.all(e.map(this._promiseHandle.bind(this)))).filter((e=>e!==undefined));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}))},l=function(e,t){var r;return g(this,void 0,void 0,(function*(){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:null,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const n=new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return y(this,a,"f")&&!(0,k.isJsonRpcRequest)(e)?t(null):t(n,{id:null!==(r=e.id)&&void 0!==r?r:null,jsonrpc:"2.0",error:n})}if(y(this,a,"f")&&!(0,k.isJsonRpcRequest)(e)){try{yield y(this,a,"f").call(this,e)}catch(n){return t(n)}return t(null)}let n=null;const i=Object.assign({},e),c={id:i.id,jsonrpc:i.jsonrpc};try{yield y(_,s,"m",d).call(_,i,c,y(this,o,"f"))}catch(e){n=e}return n&&(delete c.result,c.error||(c.error=(0,v.serializeError)(n))),t(n,c)}))},d=function(e,t,r){return g(this,void 0,void 0,(function*(){const[n,i,o]=yield y(_,s,"m",p).call(_,e,t,r);if(y(_,s,"m",m).call(_,e,t,i),yield y(_,s,"m",f).call(_,o),n)throw n}))},p=function(e,t,r){return g(this,void 0,void 0,(function*(){const n=[];let i=null,o=!1;for(const a of r)if([i,o]=yield y(_,s,"m",h).call(_,e,t,a,n),o)break;return[i,o,n.reverse()]}))},h=function(e,t,r,n){return g(this,void 0,void 0,(function*(){return new Promise((s=>{const i=e=>{const r=e||t.error;r&&(t.error=(0,v.serializeError)(r)),s([r,!0])},o=r=>{t.error?i(t.error):(r&&("function"!=typeof r&&i(new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${S(e)}`,{request:e})),n.push(r)),s([null,!1]))};try{r(e,t,o,i)}catch(e){i(e)}}))}))},f=function(e){return g(this,void 0,void 0,(function*(){for(const t of e)yield new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}))},m=function(e,t,r){if(!(0,k.hasProperty)(t,"result")&&!(0,k.hasProperty)(t,"error"))throw new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${S(e)}`,{request:e});if(!r)throw new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${S(e)}`,{request:e})}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/JsonRpcEngine.js"}],[2,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0}),r.createAsyncMiddleware=void 0,r.createAsyncMiddleware=function(e){return(t,r,s,i)=>n(this,void 0,void 0,(function*(){let o;const a=new Promise((e=>{o=e}));let c=null,u=!1;const l=()=>n(this,void 0,void 0,(function*(){return u=!0,s((e=>{c=e,o()})),a}));try{yield e(t,r,l),u?(yield a,c(null)):i(null)}catch(e){c?c(e):i(e)}}))}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/createAsyncMiddleware.js"}],[3,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createScaffoldMiddleware=void 0,r.createScaffoldMiddleware=function(e){return(t,r,n,s)=>{const i=e[t.method];return i===undefined?n():"function"==typeof i?i(t,r,n,s):(r.result=i,s())}}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/createScaffoldMiddleware.js"}],[4,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getUniqueId=void 0;const n=4294967295;let s=Math.floor(Math.random()*n);r.getUniqueId=function(){return s=(s+1)%n,s}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/getUniqueId.js"}],[5,{"./getUniqueId":4},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createIdRemapMiddleware=void 0;const n=e("./getUniqueId");r.createIdRemapMiddleware=function(){return(e,t,r,s)=>{const i=e.id,o=(0,n.getUniqueId)();e.id=o,t.id=o,r((r=>{e.id=i,t.id=i,r()}))}}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/idRemapMiddleware.js"}],[6,{"./JsonRpcEngine":1,"./createAsyncMiddleware":2,"./createScaffoldMiddleware":3,"./getUniqueId":4,"./idRemapMiddleware":5,"./mergeMiddleware":7},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./createAsyncMiddleware"),r),s(e("./createScaffoldMiddleware"),r),s(e("./getUniqueId"),r),s(e("./idRemapMiddleware"),r),s(e("./JsonRpcEngine"),r),s(e("./mergeMiddleware"),r)}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/index.js"}],[7,{"./JsonRpcEngine":1},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mergeMiddleware=void 0;const n=e("./JsonRpcEngine");r.mergeMiddleware=function(e){const t=new n.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/mergeMiddleware.js"}],[8,{"./Substream":9,once:88,"readable-stream":106},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ObjectMultiplex=void 0;const s=e("readable-stream"),i=n(e("once")),o=e("./Substream"),a=Symbol("IGNORE_SUBSTREAM");class c extends s.Duplex{constructor(e={}){super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new o.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const r=(0,i.default)(t);(0,s.finished)(e,{readable:!1},r),(0,s.finished)(e,{writable:!1},r)}(this,(e=>t.destroy(e||undefined))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=a}_read(){return undefined}_write(e,t,r){const{name:n,data:s}=e;if(!n)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const i=this._substreams[n];return i?(i!==a&&i.push(s),r()):(console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r())}}r.ObjectMultiplex=c}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/ObjectMultiplex.js"}],[9,{"readable-stream":106},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Substream=void 0;const n=e("readable-stream");class s extends n.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){return undefined}_write(e,t,r){this._parent.push({name:this._name,data:e}),r()}}r.Substream=s}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/Substream.js"}],[10,{"./ObjectMultiplex":8},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./ObjectMultiplex");t.exports=n.ObjectMultiplex}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/index.js"}],[11,{"readable-stream":106},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BasePostMessageStream=void 0;const n=e("readable-stream"),s=()=>undefined,i="SYN",o="ACK";class a extends n.Duplex{constructor(){super({objectMode:!0}),this._init=!1,this._haveSyn=!1,this._log=()=>null}_handshake(){this._write(i,null,s),this.cork()}_onData(e){if(this._init)try{this.push(e),this._log(e,!1)}catch(e){this.emit("error",e)}else e===i?(this._haveSyn=!0,this._write(o,null,s)):e===o&&(this._init=!0,this._haveSyn||this._write(o,null,s),this.uncork())}_read(){return undefined}_write(e,t,r){e!==o&&e!==i&&this._log(e,!0),this._postMessage(e),r()}_setLogger(e){this._log=e}}r.BasePostMessageStream=a}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/BasePostMessageStream.js"}],[12,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerParentPostMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({worker:e}){super(),this._target=s.DEDICATED_WORKER_NAME,this._worker=e,this._worker.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){this._worker.postMessage({target:this._target,data:e})}_onMessage(e){const t=e.data;(0,s.isValidStreamMessage)(t)&&this._onData(t.data)}_destroy(){this._worker.onmessage=null,this._worker=null}}r.WebWorkerParentPostMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerParentPostMessageStream.js"}],[13,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerPostMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor(){if("undefined"==typeof self||"undefined"==typeof WorkerGlobalScope)throw new Error("WorkerGlobalScope not found. This class should only be instantiated in a WebWorker.");super(),this._name=s.DEDICATED_WORKER_NAME,self.addEventListener("message",this._onMessage.bind(this)),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const t=e.data;(0,s.isValidStreamMessage)(t)&&t.target===this._name&&this._onData(t.data)}_destroy(){return undefined}}r.WebWorkerPostMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerPostMessageStream.js"}],[14,{"./BasePostMessageStream":11,"./WebWorker/WebWorkerParentPostMessageStream":12,"./WebWorker/WebWorkerPostMessageStream":13,"./node-process/ProcessMessageStream":15,"./node-process/ProcessParentMessageStream":16,"./node-thread/ThreadMessageStream":17,"./node-thread/ThreadParentMessageStream":18,"./runtime/BrowserRuntimePostMessageStream":19,"./window/WindowPostMessageStream":21},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./window/WindowPostMessageStream"),r),s(e("./WebWorker/WebWorkerPostMessageStream"),r),s(e("./WebWorker/WebWorkerParentPostMessageStream"),r),s(e("./node-process/ProcessParentMessageStream"),r),s(e("./node-process/ProcessMessageStream"),r),s(e("./node-thread/ThreadParentMessageStream"),r),s(e("./node-thread/ThreadMessageStream"),r),s(e("./runtime/BrowserRuntimePostMessageStream"),r),s(e("./BasePostMessageStream"),r)}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/index.js"}],[15,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ProcessMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor(){if(super(),"function"!=typeof globalThis.process.send)throw new Error("Parent IPC channel not found. This class should only be instantiated in a Node.js child process.");this._onMessage=this._onMessage.bind(this),globalThis.process.on("message",this._onMessage),this._handshake()}_postMessage(e){globalThis.process.send({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){globalThis.process.removeListener("message",this._onMessage)}}r.ProcessMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-process/ProcessMessageStream.js"}],[16,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ProcessParentMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({process:e}){super(),this._process=e,this._onMessage=this._onMessage.bind(this),this._process.on("message",this._onMessage),this._handshake()}_postMessage(e){this._process.send({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){this._process.removeListener("message",this._onMessage)}}r.ProcessParentMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-process/ProcessParentMessageStream.js"}],[17,{"../BasePostMessageStream":11,"../utils":20,worker_threads:"worker_threads"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.ThreadMessageStream=void 0;const o=e("worker_threads"),a=e("../BasePostMessageStream"),c=e("../utils");class u extends a.BasePostMessageStream{constructor(){if(super(),n.set(this,void 0),!o.parentPort)throw new Error("Parent port not found. This class should only be instantiated in a Node.js worker thread.");s(this,n,o.parentPort,"f"),this._onMessage=this._onMessage.bind(this),i(this,n,"f").on("message",this._onMessage),this._handshake()}_postMessage(e){i(this,n,"f").postMessage({data:e})}_onMessage(e){(0,c.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){i(this,n,"f").removeListener("message",this._onMessage)}}r.ThreadMessageStream=u,n=new WeakMap}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-thread/ThreadMessageStream.js"}],[18,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ThreadParentMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({thread:e}){super(),this._thread=e,this._onMessage=this._onMessage.bind(this),this._thread.on("message",this._onMessage),this._handshake()}_postMessage(e){this._thread.postMessage({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){this._thread.removeListener("message",this._onMessage)}}r.ThreadParentMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-thread/ThreadParentMessageStream.js"}],[19,{"../BasePostMessageStream":11,"../utils":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserRuntimePostMessageStream=void 0;const a=e("../BasePostMessageStream"),c=e("../utils");class u extends a.BasePostMessageStream{constructor({name:e,target:t}){super(),n.set(this,void 0),s.set(this,void 0),i(this,n,e,"f"),i(this,s,t,"f"),this._onMessage=this._onMessage.bind(this),this._getRuntime().onMessage.addListener(this._onMessage),this._handshake()}_postMessage(e){this._getRuntime().sendMessage({target:o(this,s,"f"),data:e})}_onMessage(e){(0,c.isValidStreamMessage)(e)&&e.target===o(this,n,"f")&&this._onData(e.data)}_getRuntime(){var e,t;if("chrome"in globalThis&&"function"==typeof(null===(e=null===chrome||void 0===chrome?void 0:chrome.runtime)||void 0===e?void 0:e.sendMessage))return chrome.runtime;if("browser"in globalThis&&"function"==typeof(null===(t=null===browser||void 0===browser?void 0:browser.runtime)||void 0===t?void 0:t.sendMessage))return browser.runtime;throw new Error("browser.runtime.sendMessage is not a function. This class should only be instantiated in a web extension.")}_destroy(){this._getRuntime().onMessage.removeListener(this._onMessage)}}r.BrowserRuntimePostMessageStream=u,n=new WeakMap,s=new WeakMap}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/runtime/BrowserRuntimePostMessageStream.js"}],[20,{"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isValidStreamMessage=r.DEDICATED_WORKER_NAME=void 0;const n=e("@metamask/utils");r.DEDICATED_WORKER_NAME="dedicatedWorker",r.isValidStreamMessage=function(e){return(0,n.isObject)(e)&&Boolean(e.data)&&("number"==typeof e.data||"object"==typeof e.data||"string"==typeof e.data)}}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/utils.js"}],[21,{"../BasePostMessageStream":11,"../utils":20,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s;Object.defineProperty(r,"__esModule",{value:!0}),r.WindowPostMessageStream=void 0;const i=e("@metamask/utils"),o=e("../BasePostMessageStream"),a=e("../utils"),c=null===(n=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"source"))||void 0===n?void 0:n.get;(0,i.assert)(c,"MessageEvent.prototype.source getter is not defined.");const u=null===(s=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"origin"))||void 0===s?void 0:s.get;(0,i.assert)(u,"MessageEvent.prototype.origin getter is not defined.");class l extends o.BasePostMessageStream{constructor({name:e,target:t,targetOrigin:r=location.origin,targetWindow:n=window}){if(super(),"undefined"==typeof window||"function"!=typeof window.postMessage)throw new Error("window.postMessage is not a function. This class should only be instantiated in a Window.");this._name=e,this._target=t,this._targetOrigin=r,this._targetWindow=n,this._onMessage=this._onMessage.bind(this),window.addEventListener("message",this._onMessage,!1),this._handshake()}_postMessage(e){this._targetWindow.postMessage({target:this._target,data:e},this._targetOrigin)}_onMessage(e){const t=e.data;"*"!==this._targetOrigin&&u.call(e)!==this._targetOrigin||c.call(e)!==this._targetWindow||!(0,a.isValidStreamMessage)(t)||t.target!==this._name||this._onData(t.data)}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}r.WindowPostMessageStream=l}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/window/WindowPostMessageStream.js"}],[22,{"./messages":25,"./utils":27,"@metamask/json-rpc-engine":6,"@metamask/rpc-errors":31,"@metamask/safe-event-emitter":33,"fast-deep-equal":67},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.BaseProvider=void 0;const c=e("@metamask/json-rpc-engine"),u=e("@metamask/rpc-errors"),l=a(e("@metamask/safe-event-emitter")),d=a(e("fast-deep-equal")),p=a(e("./messages")),h=e("./utils");class f extends l.default{constructor({logger:e=console,maxEventListeners:t=100,rpcMiddleware:r=[]}={}){super(),n.set(this,void 0),s.set(this,void 0),this._log=e,this.setMaxListeners(t),this._state={...f._defaultState},i(this,s,null,"f"),i(this,n,null,"f"),this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this.request=this.request.bind(this);const o=new c.JsonRpcEngine;r.forEach((e=>o.push(e))),this._rpcEngine=o}get chainId(){return o(this,n,"f")}get selectedAddress(){return o(this,s,"f")}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw u.rpcErrors.invalidRequest({message:p.default.errors.invalidRequestArgs(),data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw u.rpcErrors.invalidRequest({message:p.default.errors.invalidRequestMethod(),data:e});if(r!==undefined&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw u.rpcErrors.invalidRequest({message:p.default.errors.invalidRequestParams(),data:e});const n=r===undefined||null===r?{method:t}:{method:t,params:r};return new Promise(((e,t)=>{this._rpcRequest(n,(0,h.getRpcPromiseCallback)(e,t))}))}_initializeState(e){if(this._state.initialized)throw new Error("Provider already initialized.");if(e){const{accounts:t,chainId:r,isUnlocked:n,networkVersion:s}=e;this._handleConnect(r),this._handleChainChanged({chainId:r,networkVersion:s}),this._handleUnlockStateChanged({accounts:t,isUnlocked:n}),this._handleAccountsChanged(t)}this._state.initialized=!0,this.emit("_initialized")}_rpcRequest(e,t){let r=t;return Array.isArray(e)||(e.jsonrpc||(e.jsonrpc="2.0"),"eth_accounts"!==e.method&&"eth_requestAccounts"!==e.method||(r=(r,n)=>{this._handleAccountsChanged(n.result??[],"eth_accounts"===e.method),t(r,n)})),this._rpcEngine.handle(e,r)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),this._log.debug(p.default.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new u.JsonRpcError(1013,t??p.default.errors.disconnected()),this._log.debug(r)):(r=new u.JsonRpcError(1011,t??p.default.errors.permanentlyDisconnected()),this._log.error(r),i(this,n,null,"f"),this._state.accounts=null,i(this,s,null,"f"),this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleChainChanged({chainId:e}={}){(0,h.isValidChainId)(e)?(this._handleConnect(e),e!==o(this,n,"f")&&(i(this,n,e,"f"),this._state.initialized&&this.emit("chainChanged",o(this,n,"f")))):this._log.error(p.default.errors.invalidNetworkParams(),{chainId:e})}_handleAccountsChanged(e,t=!1){let r=e;Array.isArray(e)||(this._log.error("MetaMask: Received invalid accounts parameter. Please report this bug.",e),r=[]);for(const t of e)if("string"!=typeof t){this._log.error("MetaMask: Received non-string account. Please report this bug.",e),r=[];break}if(!(0,d.default)(this._state.accounts,r)&&(t&&null!==this._state.accounts&&this._log.error("MetaMask: 'eth_accounts' unexpectedly updated accounts. Please report this bug.",r),this._state.accounts=r,o(this,s,"f")!==r[0]&&i(this,s,r[0]||null,"f"),this._state.initialized)){const e=[...r];this.emit("accountsChanged",e)}}_handleUnlockStateChanged({accounts:e,isUnlocked:t}={}){"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e??[])):this._log.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.")}}r.BaseProvider=f,n=new WeakMap,s=new WeakMap,f._defaultState={accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/BaseProvider.js"}],[23,{"./BaseProvider":22,"./messages":25,"./utils":27,"@metamask/object-multiplex":10,"is-stream":83,"json-rpc-middleware-stream":87,"readable-stream":106},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.StreamProvider=r.AbstractStreamProvider=void 0;const s=n(e("@metamask/object-multiplex")),i=e("is-stream"),o=e("json-rpc-middleware-stream"),a=e("readable-stream"),c=e("./BaseProvider"),u=n(e("./messages")),l=e("./utils");class d extends c.BaseProvider{constructor(e,{jsonRpcStreamName:t,logger:r=console,maxEventListeners:n=100,rpcMiddleware:c=[]}){if(super({logger:r,maxEventListeners:n,rpcMiddleware:c}),!(0,i.duplex)(e))throw new Error(u.default.errors.invalidDuplexStream());this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this);const d=new s.default;(0,a.pipeline)(e,d,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._jsonRpcConnection=(0,o.createStreamMiddleware)({retryOnMessage:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}),(0,a.pipeline)(this._jsonRpcConnection.stream,d.createStream(t),this._jsonRpcConnection.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider")),this._rpcEngine.push(this._jsonRpcConnection.middleware),this._jsonRpcConnection.events.on("notification",(t=>{const{method:r,params:n}=t;"metamask_accountsChanged"===r?this._handleAccountsChanged(n):"metamask_unlockStateChanged"===r?this._handleUnlockStateChanged(n):"metamask_chainChanged"===r?this._handleChainChanged(n):l.EMITTED_NOTIFICATIONS.includes(r)?this.emit("message",{type:r,data:n}):"METAMASK_STREAM_FAILURE"===r&&e.destroy(new Error(u.default.errors.permanentlyDisconnected()))}))}async _initializeStateAsync(){let e;try{e=await this.request({method:"metamask_getProviderState"})}catch(e){this._log.error("MetaMask: Failed to get initial state. Please report this bug.",e)}this._initializeState(e)}_handleStreamDisconnect(e,t){let r=`MetaMask: Lost connection to "${e}".`;t?.stack&&(r+=`\n${t.stack}`),this._log.warn(r),this.listenerCount("error")>0&&this.emit("error",r),this._handleDisconnect(!1,t?t.message:undefined)}_handleChainChanged({chainId:e,networkVersion:t}={}){(0,l.isValidChainId)(e)&&(0,l.isValidNetworkVersion)(t)?"loading"===t?this._handleDisconnect(!0):super._handleChainChanged({chainId:e}):this._log.error(u.default.errors.invalidNetworkParams(),{chainId:e,networkVersion:t})}}r.AbstractStreamProvider=d;r.StreamProvider=class extends d{async initialize(){return this._initializeStateAsync()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/StreamProvider.js"}],[24,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERC20=r.ERC1155=r.ERC721=void 0,r.ERC721="ERC721",r.ERC1155="ERC1155",r.ERC20="ERC20"}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/constants.js"}],[25,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n={errors:{disconnected:()=>"MetaMask: Disconnected from chain. Attempting to connect.",permanentlyDisconnected:()=>"MetaMask: Disconnected from MetaMask background. Page reload required.",sendSiteMetadata:()=>"MetaMask: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`MetaMask: The MetaMask Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidNetworkParams:()=>"MetaMask: Received invalid network parameters. Please report this bug.",invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`MetaMask: Connected to chain with ID "${e}".`},warnings:{chainIdDeprecation:"MetaMask: 'ethereum.chainId' is deprecated and may be removed in the future. Please use the 'eth_chainId' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",networkVersionDeprecation:"MetaMask: 'ethereum.networkVersion' is deprecated and may be removed in the future. Please use the 'net_version' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",selectedAddressDeprecation:"MetaMask: 'ethereum.selectedAddress' is deprecated and may be removed in the future. Please use the 'eth_accounts' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",enableDeprecation:"MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1102",sendDeprecation:"MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193",events:{close:"MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect",data:"MetaMask: The event 'data' is deprecated and will be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message",networkChanged:"MetaMask: The event 'networkChanged' is deprecated and may be removed in the future. Use 'chainChanged' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#chainchanged",notification:"MetaMask: The event 'notification' is deprecated and may be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message"},rpc:{ethDecryptDeprecation:"MetaMask: The RPC method 'eth_decrypt' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",ethGetEncryptionPublicKeyDeprecation:"MetaMask: The RPC method 'eth_getEncryptionPublicKey' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",walletWatchAssetNFTExperimental:"MetaMask: The RPC method 'wallet_watchAsset' is experimental for ERC721/ERC1155 assets and may change in the future.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-1.md and https://github.com/MetaMask/metamask-improvement-proposals/blob/main/PROCESS-GUIDE.md#proposal-lifecycle"},experimentalMethods:"MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning."}};r.default=n}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/messages.js"}],[26,{"../constants":24,"../messages":25},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createRpcWarningMiddleware=void 0;const s=e("../constants"),i=n(e("../messages"));r.createRpcWarningMiddleware=function(e){const t={ethDecryptDeprecation:!1,ethGetEncryptionPublicKeyDeprecation:!1,walletWatchAssetNFTExperimental:!1};return(r,n,o)=>{t.ethDecryptDeprecation||"eth_decrypt"!==r.method?t.ethGetEncryptionPublicKeyDeprecation||"eth_getEncryptionPublicKey"!==r.method?!t.walletWatchAssetNFTExperimental&&"wallet_watchAsset"===r.method&&[s.ERC721,s.ERC1155].includes(r.params?.type||"")&&(e.warn(i.default.warnings.rpc.walletWatchAssetNFTExperimental),t.walletWatchAssetNFTExperimental=!0):(e.warn(i.default.warnings.rpc.ethGetEncryptionPublicKeyDeprecation),t.ethGetEncryptionPublicKeyDeprecation=!0):(e.warn(i.default.warnings.rpc.ethDecryptDeprecation),t.ethDecryptDeprecation=!0),o()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/middleware/createRpcWarningMiddleware.js"}],[27,{"./middleware/createRpcWarningMiddleware":26,"@metamask/json-rpc-engine":6,"@metamask/rpc-errors":31},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NOOP=r.isValidNetworkVersion=r.isValidChainId=r.getRpcPromiseCallback=r.getDefaultExternalMiddleware=r.EMITTED_NOTIFICATIONS=void 0;const n=e("@metamask/json-rpc-engine"),s=e("@metamask/rpc-errors"),i=e("./middleware/createRpcWarningMiddleware");r.EMITTED_NOTIFICATIONS=Object.freeze(["eth_subscription"]);r.getDefaultExternalMiddleware=(e=console)=>{return[(0,n.createIdRemapMiddleware)(),(t=e,(e,r,n)=>{"string"==typeof e.method&&e.method||(r.error=s.rpcErrors.invalidRequest({message:"The request 'method' must be a non-empty string.",data:e})),n((e=>{const{error:n}=r;return n?(t.error(`MetaMask - RPC Error: ${n.message}`,n),e()):e()}))}),(0,i.createRpcWarningMiddleware)(e)];var t};r.getRpcPromiseCallback=(e,t,r=!0)=>(n,s)=>{n||s.error?t(n||s.error):!r||Array.isArray(s)?e(s):e(s.result)};r.isValidChainId=e=>Boolean(e)&&"string"==typeof e&&e.startsWith("0x");r.isValidNetworkVersion=e=>Boolean(e)&&"string"==typeof e;r.NOOP=()=>undefined}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/utils.js"}],[28,{"./utils":32,"@metamask/utils":55,"fast-safe-stringify":68},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.EthereumProviderError=r.JsonRpcError=void 0;const s=e("@metamask/utils"),i=n(e("fast-safe-stringify")),o=e("./utils");class a extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');super(t),this.code=e,r!==undefined&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return this.data!==undefined&&(e.data=this.data,(0,s.isPlainObject)(this.data)&&(e.data.cause=(0,o.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,i.default)(this.serialize(),c,2)}}r.JsonRpcError=a;function c(e,t){return"[Circular]"===t?undefined:t}r.EthereumProviderError=class extends a{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/classes.js"}],[29,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorValues=r.errorCodes=void 0,r.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},r.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/error-constants.js"}],[30,{"./classes":28,"./error-constants":29,"./utils":32},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerErrors=r.rpcErrors=void 0;const n=e("./classes"),s=e("./error-constants"),i=e("./utils");function o(e,t){const[r,s]=c(t);return new n.JsonRpcError(e,r??(0,i.getMessageFromCode)(e),s)}function a(e,t){const[r,s]=c(t);return new n.EthereumProviderError(e,r??(0,i.getMessageFromCode)(e),s)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??undefined,r]}}return[]}r.rpcErrors={parse:e=>o(s.errorCodes.rpc.parse,e),invalidRequest:e=>o(s.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(s.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(s.errorCodes.rpc.methodNotFound,e),internal:e=>o(s.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(s.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(s.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(s.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(s.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(s.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(s.errorCodes.rpc.limitExceeded,e)},r.providerErrors={userRejectedRequest:e=>a(s.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(s.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(s.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(s.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(s.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:s}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,s)}}}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/errors.js"}],[31,{"./classes":28,"./error-constants":29,"./errors":30,"./utils":32},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorCodes=r.providerErrors=r.rpcErrors=r.getMessageFromCode=r.serializeError=r.serializeCause=r.EthereumProviderError=r.JsonRpcError=void 0;var n=e("./classes");Object.defineProperty(r,"JsonRpcError",{enumerable:!0,get:function(){return n.JsonRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});var s=e("./utils");Object.defineProperty(r,"serializeCause",{enumerable:!0,get:function(){return s.serializeCause}}),Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return s.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return s.getMessageFromCode}});var i=e("./errors");Object.defineProperty(r,"rpcErrors",{enumerable:!0,get:function(){return i.rpcErrors}}),Object.defineProperty(r,"providerErrors",{enumerable:!0,get:function(){return i.providerErrors}});var o=e("./error-constants");Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/index.js"}],[32,{"./error-constants":29,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.serializeCause=r.serializeError=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=e("@metamask/utils"),s=e("./error-constants"),i=s.errorCodes.rpc.internal,o={code:i,message:a(i)};function a(e,t="Unspecified error message. This is a bug, please report it."){if(c(e)){const t=e.toString();if((0,n.hasProperty)(s.errorValues,t))return s.errorValues[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){return Number.isInteger(e)}function u(e){return Array.isArray(e)?e.map((e=>(0,n.isValidJson)(e)?e:(0,n.isObject)(e)?l(e):null)):(0,n.isObject)(e)?l(e):(0,n.isValidJson)(e)?e:null}function l(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const s=e[r];return(0,n.isValidJson)(s)&&(t[r]=s),t}),{})}r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",r.getMessageFromCode=a,r.isValidCode=c,r.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:r=!0}={}){if(!(0,n.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const s=function(e,t){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,n.isJsonRpcError)(e))return e;const r=u(e),s={...t,data:{cause:r}};return s}(e,t);return r||delete s.stack,s},r.serializeCause=u}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/utils.js"}],[33,{events:"events"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("events");function s(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class i extends n.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(n!==undefined)r=r&&n.error===undefined;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const i=n[e];if(i===undefined)return!1;if("function"==typeof i)s(i,this,t);else{const e=i.length,r=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(i);for(let n=0;n<e;n+=1)s(r[n],this,t)}return!0}}r.default=i}}},{package:"@metamask/providers>@metamask/safe-event-emitter",file:"../../node_modules/@metamask/safe-event-emitter/index.js"}],[34,{debug:65},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n,s=e("debug"),i=((n=s)&&n.__esModule?n:{default:n}).default.call(void 0,"metamask");r.createProjectLogger=function(e){return i.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-2LBGT4GH.js"}],[35,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};r.__privateGet=(e,t,r)=>(n(e,t,"read from private field"),r?r.call(e):t.get(e)),r.__privateAdd=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},r.__privateSet=(e,t,r,s)=>(n(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-3W5G4CYI.js"}],[36,{"./chunk-6ZDHSOUV.js":41,semver:135,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-6ZDHSOUV.js"),s=e("semver"),i=e("superstruct"),o=i.refine.call(void 0,i.string.call(void 0),"Version",(e=>null!==s.valid.call(void 0,e)||`Expected SemVer version, got "${e}"`)),a=i.refine.call(void 0,i.string.call(void 0),"Version range",(e=>null!==s.validRange.call(void 0,e)||`Expected SemVer range, got "${e}"`));r.VersionStruct=o,r.VersionRangeStruct=a,r.isValidSemVerVersion=function(e){return i.is.call(void 0,e,o)},r.isValidSemVerRange=function(e){return i.is.call(void 0,e,a)},r.assertIsSemVerVersion=function(e){n.assertStruct.call(void 0,e,o)},r.assertIsSemVerRange=function(e){n.assertStruct.call(void 0,e,a)},r.gtVersion=function(e,t){return s.gt.call(void 0,e,t)},r.gtRange=function(e,t){return s.gtr.call(void 0,e,t)},r.satisfiesVersionRange=function(e,t){return s.satisfies.call(void 0,e,t,{includePrerelease:!0})}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-4D6XQBHA.js"}],[37,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const n=new Promise(((e,n)=>{t=e,r=n}));return e&&n.catch((e=>{})),{promise:n,resolve:t,reject:r}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-4NIRTM4M.js"}],[38,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=(e=>(e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year",e))(n||{}),s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.Duration=n,r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-4RMX5YWE.js"}],[39,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-5AVWINSB.js"}],[40,{"./chunk-6ZDHSOUV.js":41,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){return null!=e?e:t()}Object.defineProperty(r,"__esModule",{value:!0});var s=e("./chunk-6ZDHSOUV.js"),i=e("superstruct");r.base64=(e,t={})=>{const r=n(t.paddingRequired,(()=>!1)),o=n(t.characterSet,(()=>"base64"));let a,c;return"base64"===o?a=String.raw`[A-Za-z0-9+\/]`:(s.assert.call(void 0,"base64url"===o),a=String.raw`[-_A-Za-z0-9]`),c=r?new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),i.pattern.call(void 0,e,c)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-6NZW4WK4.js"}],[41,{"./chunk-IZC266HS.js":45,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-IZC266HS.js"),s=e("superstruct");function i(e){return Boolean("string"==typeof function(e){let t=undefined,r=e[0],n=1;for(;n<e.length;){const s=e[n],i=e[n+1];if(n+=2,("optionalAccess"===s||"optionalCall"===s)&&null==r)return undefined;"access"===s||"optionalAccess"===s?(t=r,r=i(r)):"call"!==s&&"optionalCall"!==s||(r=i(((...e)=>r.call(t,...e))),t=undefined)}return r}([e,"optionalAccess",e=>e.prototype,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name]))}function o(e,t){return i(e)?new e({message:t}):e({message:t})}var a=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};r.AssertionError=a,r.assert=function(e,t="Assertion failed.",r=a){if(!e){if(t instanceof Error)throw t;throw o(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=a){try{s.assert.call(void 0,e,t)}catch(e){throw o(i,`${r}: ${function(e){return n.getErrorMessage.call(void 0,e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-6ZDHSOUV.js"}],[42,{"./chunk-6ZDHSOUV.js":41,"./chunk-QEPVHEP7.js":48,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-QEPVHEP7.js"),s=e("./chunk-6ZDHSOUV.js"),i=e("superstruct"),o=i.union.call(void 0,[i.number.call(void 0),i.bigint.call(void 0),i.string.call(void 0),n.StrictHexStruct]),a=i.coerce.call(void 0,i.number.call(void 0),o,Number),c=i.coerce.call(void 0,i.bigint.call(void 0),o,BigInt),u=(i.union.call(void 0,[n.StrictHexStruct,i.instance.call(void 0,Uint8Array)]),i.coerce.call(void 0,i.instance.call(void 0,Uint8Array),i.union.call(void 0,[n.StrictHexStruct]),n.hexToBytes)),l=i.coerce.call(void 0,n.StrictHexStruct,i.instance.call(void 0,Uint8Array),n.bytesToHex);r.createNumber=function(e){try{const t=i.create.call(void 0,e,a);return s.assert.call(void 0,Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof i.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return i.create.call(void 0,e,c)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return i.create.call(void 0,e,u)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return i.create.call(void 0,e,l)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-DHVKFDHQ.js"}],[43,{"./chunk-6NZW4WK4.js":40,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-6NZW4WK4.js"),s=e("superstruct"),i=s.size.call(void 0,n.base64.call(void 0,s.string.call(void 0),{paddingRequired:!0}),44,44);r.ChecksumStruct=i}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-E4C7EW4R.js"}],[44,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-EQMZL4XU.js"}],[45,{"./chunk-QVEKZRZ2.js":49,"pony-cause":89},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-QVEKZRZ2.js"),s=e("pony-cause");function i(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=i,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:n.isNullOrUndefined.call(void 0,e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||n.isObject.call(void 0,r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new(0,s.ErrorWithCause)(t,{cause:e}),i(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-IZC266HS.js"}],[46,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-LC2CRSWD.js"}],[47,{"./chunk-6ZDHSOUV.js":41,"./chunk-QVEKZRZ2.js":49,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-6ZDHSOUV.js"),s=e("./chunk-QVEKZRZ2.js"),i=e("superstruct"),o=e=>i.object.call(void 0,e);function a({path:e,branch:t}){const r=e[e.length-1];return s.hasProperty.call(void 0,t[t.length-2],r)}function c(e){return new(0,i.Struct)({...e,type:`optional ${e.type}`,validator:(t,r)=>!a(r)||e.validator(t,r),refiner:(t,r)=>!a(r)||e.refiner(t,r)})}var u=i.union.call(void 0,[i.literal.call(void 0,null),i.boolean.call(void 0),i.define.call(void 0,"finite number",(e=>i.is.call(void 0,e,i.number.call(void 0))&&Number.isFinite(e))),i.string.call(void 0),i.array.call(void 0,i.lazy.call(void 0,(()=>u))),i.record.call(void 0,i.string.call(void 0),i.lazy.call(void 0,(()=>u)))]),l=i.coerce.call(void 0,u,i.any.call(void 0),(e=>(n.assertStruct.call(void 0,e,u),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))))));function d(e){return i.create.call(void 0,e,l)}var p=i.literal.call(void 0,"2.0"),h=i.nullable.call(void 0,i.union.call(void 0,[i.number.call(void 0),i.string.call(void 0)])),f=o({code:i.integer.call(void 0),message:i.string.call(void 0),data:c(l),stack:c(i.string.call(void 0))}),m=i.union.call(void 0,[i.record.call(void 0,i.string.call(void 0),l),i.array.call(void 0,l)]),g=o({id:h,jsonrpc:p,method:i.string.call(void 0),params:c(m)}),b=o({jsonrpc:p,method:i.string.call(void 0),params:c(m)});var y=i.object.call(void 0,{id:h,jsonrpc:p,result:i.optional.call(void 0,i.unknown.call(void 0)),error:i.optional.call(void 0,f)}),w=o({id:h,jsonrpc:p,result:l}),v=o({id:h,jsonrpc:p,error:f}),E=i.union.call(void 0,[w,v]);r.object=o,r.exactOptional=c,r.UnsafeJsonStruct=u,r.JsonStruct=l,r.isValidJson=function(e){try{return d(e),!0}catch(e){return!1}},r.getSafeJson=d,r.getJsonSize=function(e){n.assertStruct.call(void 0,e,l,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=p,r.JsonRpcIdStruct=h,r.JsonRpcErrorStruct=f,r.JsonRpcParamsStruct=m,r.JsonRpcRequestStruct=g,r.JsonRpcNotificationStruct=b,r.isJsonRpcNotification=function(e){return i.is.call(void 0,e,b)},r.assertIsJsonRpcNotification=function(e,t){n.assertStruct.call(void 0,e,b,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return i.is.call(void 0,e,g)},r.assertIsJsonRpcRequest=function(e,t){n.assertStruct.call(void 0,e,g,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=y,r.JsonRpcSuccessStruct=w,r.JsonRpcFailureStruct=v,r.JsonRpcResponseStruct=E,r.isPendingJsonRpcResponse=function(e){return i.is.call(void 0,e,y)},r.assertIsPendingJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,y,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return i.is.call(void 0,e,E)},r.assertIsJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,E,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return i.is.call(void 0,e,w)},r.assertIsJsonRpcSuccess=function(e,t){n.assertStruct.call(void 0,e,w,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return i.is.call(void 0,e,v)},r.assertIsJsonRpcFailure=function(e,t){n.assertStruct.call(void 0,e,v,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return i.is.call(void 0,e,f)},r.assertIsJsonRpcError=function(e,t){n.assertStruct.call(void 0,e,f,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-OLLG4H35.js"}],[48,{"./chunk-6ZDHSOUV.js":41,"@noble/hashes/sha3":59,"@scure/base":61,buffer:"buffer",superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-6ZDHSOUV.js"),s=e("@noble/hashes/sha3"),i=e("superstruct"),o=e("@scure/base"),a=48,c=58,u=87;var l=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function d(e){return e instanceof Uint8Array}function p(e){n.assert.call(void 0,d(e),"Value must be a Uint8Array.")}function h(e){if(p(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return j(r.join(""))}function f(e){p(e);const t=h(e);return BigInt(t)}function m(e){if("0x"===function(e){let t=undefined,r=e[0],n=1;for(;n<e.length;){const s=e[n],i=e[n+1];if(n+=2,("optionalAccess"===s||"optionalCall"===s)&&null==r)return undefined;"access"===s||"optionalAccess"===s?(t=r,r=i(r)):"call"!==s&&"optionalCall"!==s||(r=i(((...e)=>r.call(t,...e))),t=undefined)}return r}([e,"optionalAccess",e=>e.toLowerCase,"optionalCall",e=>e()]))return new Uint8Array;x(e);const t=P(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),s=r.charCodeAt(2*e+1),i=t-(t<c?a:u),o=s-(s<c?a:u);n[e]=16*i+o}return n}function g(e){n.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),n.assert.call(void 0,e>=BigInt(0),"Value must be a non-negative bigint.");return m(e.toString(16))}function b(e){n.assert.call(void 0,"number"==typeof e,"Value must be a number."),n.assert.call(void 0,e>=0,"Value must be a non-negative number."),n.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return m(e.toString(16))}function y(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function w(e){if("bigint"==typeof e)return g(e);if("number"==typeof e)return b(e);if("string"==typeof e)return e.startsWith("0x")?m(e):y(e);if(d(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}var v=i.pattern.call(void 0,i.string.call(void 0),/^(?:0x)?[0-9a-f]+$/iu),E=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]+$/iu),k=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]{40}$/u),_=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-fA-F]{40}$/u);function S(e){return i.is.call(void 0,e,v)}function T(e){return i.is.call(void 0,e,E)}function x(e){n.assert.call(void 0,S(e),"Value must be a hexadecimal string.")}function O(e){n.assert.call(void 0,i.is.call(void 0,e,_),"Invalid hex address.");const t=P(e.toLowerCase()),r=P(h(s.keccak_256.call(void 0,t)));return`0x${t.split("").map(((e,t)=>{const s=r[t];return n.assert.call(void 0,i.is.call(void 0,s,i.string.call(void 0)),"Hash shorter than address."),parseInt(s,16)>7?e.toUpperCase():e})).join("")}`}function R(e){return!!i.is.call(void 0,e,_)&&O(e)===e}function j(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`}function P(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=v,r.StrictHexStruct=E,r.HexAddressStruct=k,r.HexChecksumAddressStruct=_,r.isHexString=S,r.isStrictHexString=T,r.assertIsHexString=x,r.assertIsStrictHexString=function(e){n.assert.call(void 0,T(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return i.is.call(void 0,e,k)||R(e)},r.getChecksumAddress=O,r.isValidChecksumAddress=R,r.add0x=j,r.remove0x=P,r.isBytes=d,r.assertIsBytes=p,r.bytesToHex=h,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){p(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},r.bytesToNumber=function(e){p(e);const t=f(e);return n.assert.call(void 0,t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},r.bytesToString=function(e){return p(e),(new TextDecoder).decode(e)},r.bytesToBase64=function(e){return p(e),o.base64.encode(e)},r.hexToBytes=m,r.bigIntToBytes=g,r.signedBigIntToBytes=function(e,t){n.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),n.assert.call(void 0,"number"==typeof t,"Byte length must be a number."),n.assert.call(void 0,t>0,"Byte length must be greater than 0."),n.assert.call(void 0,function(e,t){n.assert.call(void 0,t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e<s.length;e++)s[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return s.reverse()},r.numberToBytes=b,r.stringToBytes=y,r.base64ToBytes=function(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),o.base64.decode(e)},r.valueToBytes=w,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const s=w(e[n]);t[n]=s,r+=s.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},r.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-QEPVHEP7.js"}],[49,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=(e=>(e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date",e))(n||{}),s=/"|\\|\n|\r|\t/gu;function i(e){return e.charCodeAt(0)<=127}r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null==e},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},r.JsonSize=n,r.ESCAPE_CHARACTERS_REGEXP=s,r.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},r.isASCII=i,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>i(t)?e+1:e+2),0)+(t=e.match(s),r=()=>[],null!=t?t:r()).length;var t,r},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-QVEKZRZ2.js"}],[50,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-RKRGAFXY.js"}],[51,{superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){let t=undefined,r=e[0],n=1;for(;n<e.length;){const s=e[n],i=e[n+1];if(n+=2,("optionalAccess"===s||"optionalCall"===s)&&null==r)return undefined;"access"===s||"optionalAccess"===s?(t=r,r=i(r)):"call"!==s&&"optionalCall"!==s||(r=i(((...e)=>r.call(t,...e))),t=undefined)}return r}Object.defineProperty(r,"__esModule",{value:!0});var s=e("superstruct"),i=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,o=/^[-a-z0-9]{3,8}$/u,a=/^[-_a-zA-Z0-9]{1,32}$/u,c=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,u=/^[-.%a-zA-Z0-9]{1,128}$/u,l=s.pattern.call(void 0,s.string.call(void 0),i),d=s.pattern.call(void 0,s.string.call(void 0),o),p=s.pattern.call(void 0,s.string.call(void 0),a),h=s.pattern.call(void 0,s.string.call(void 0),c),f=s.pattern.call(void 0,s.string.call(void 0),u);r.CAIP_CHAIN_ID_REGEX=i,r.CAIP_NAMESPACE_REGEX=o,r.CAIP_REFERENCE_REGEX=a,r.CAIP_ACCOUNT_ID_REGEX=c,r.CAIP_ACCOUNT_ADDRESS_REGEX=u,r.CaipChainIdStruct=l,r.CaipNamespaceStruct=d,r.CaipReferenceStruct=p,r.CaipAccountIdStruct=h,r.CaipAccountAddressStruct=f,r.isCaipChainId=function(e){return s.is.call(void 0,e,l)},r.isCaipNamespace=function(e){return s.is.call(void 0,e,d)},r.isCaipReference=function(e){return s.is.call(void 0,e,p)},r.isCaipAccountId=function(e){return s.is.call(void 0,e,h)},r.isCaipAccountAddress=function(e){return s.is.call(void 0,e,f)},r.parseCaipChainId=function(e){const t=i.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=c.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-U7ZUGCE7.js"}],[52,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-UOTVU7OQ.js"}],[53,{"./chunk-6ZDHSOUV.js":41,"./chunk-QEPVHEP7.js":48},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./chunk-QEPVHEP7.js"),s=e("./chunk-6ZDHSOUV.js");r.numberToHex=e=>(s.assert.call(void 0,"number"==typeof e,"Value must be a number."),s.assert.call(void 0,e>=0,"Value must be a non-negative number."),s.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),n.add0x.call(void 0,e.toString(16))),r.bigIntToHex=e=>(s.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),s.assert.call(void 0,e>=0,"Value must be a non-negative bigint."),n.add0x.call(void 0,e.toString(16))),r.hexToNumber=e=>{n.assertIsHexString.call(void 0,e);const t=parseInt(e,16);return s.assert.call(void 0,Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},r.hexToBigInt=e=>(n.assertIsHexString.call(void 0,e),BigInt(n.add0x.call(void 0,e)))}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-VFXTVNXN.js"}],[54,{"./chunk-3W5G4CYI.js":35},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n,s,i=e("./chunk-3W5G4CYI.js"),o=class{constructor(e){i.__privateAdd.call(void 0,this,n,void 0),i.__privateSet.call(void 0,this,n,new Map(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,n).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,n)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,n).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,n).forEach(((r,n,s)=>e.call(t,r,n,this)))}get(e){return i.__privateGet.call(void 0,this,n).get(e)}has(e){return i.__privateGet.call(void 0,this,n).has(e)}keys(){return i.__privateGet.call(void 0,this,n).keys()}values(){return i.__privateGet.call(void 0,this,n).values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}};n=new WeakMap;var a=class{constructor(e){i.__privateAdd.call(void 0,this,s,void 0),i.__privateSet.call(void 0,this,s,new Set(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,s).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,s)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,s).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,s).forEach(((r,n,s)=>e.call(t,r,n,this)))}has(e){return i.__privateGet.call(void 0,this,s).has(e)}keys(){return i.__privateGet.call(void 0,this,s).keys()}values(){return i.__privateGet.call(void 0,this,s).values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}};s=new WeakMap,Object.freeze(o),Object.freeze(o.prototype),Object.freeze(a),Object.freeze(a.prototype),r.FrozenMap=o,r.FrozenSet=a}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/chunk-Z2RGWDD7.js"}],[55,{"./chunk-2LBGT4GH.js":34,"./chunk-3W5G4CYI.js":35,"./chunk-4D6XQBHA.js":36,"./chunk-4NIRTM4M.js":37,"./chunk-4RMX5YWE.js":38,"./chunk-5AVWINSB.js":39,"./chunk-6NZW4WK4.js":40,"./chunk-6ZDHSOUV.js":41,"./chunk-DHVKFDHQ.js":42,"./chunk-E4C7EW4R.js":43,"./chunk-EQMZL4XU.js":44,"./chunk-IZC266HS.js":45,"./chunk-LC2CRSWD.js":46,"./chunk-OLLG4H35.js":47,"./chunk-QEPVHEP7.js":48,"./chunk-QVEKZRZ2.js":49,"./chunk-RKRGAFXY.js":50,"./chunk-U7ZUGCE7.js":51,"./chunk-UOTVU7OQ.js":52,"./chunk-VFXTVNXN.js":53,"./chunk-Z2RGWDD7.js":54},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),e("./chunk-5AVWINSB.js");var n=e("./chunk-VFXTVNXN.js");e("./chunk-LC2CRSWD.js");var s=e("./chunk-4NIRTM4M.js"),i=e("./chunk-4RMX5YWE.js");e("./chunk-UOTVU7OQ.js");var o=e("./chunk-4D6XQBHA.js"),a=e("./chunk-OLLG4H35.js");e("./chunk-RKRGAFXY.js");var c=e("./chunk-2LBGT4GH.js"),u=e("./chunk-U7ZUGCE7.js"),l=e("./chunk-E4C7EW4R.js"),d=e("./chunk-6NZW4WK4.js"),p=e("./chunk-DHVKFDHQ.js"),h=e("./chunk-QEPVHEP7.js"),f=e("./chunk-6ZDHSOUV.js"),m=e("./chunk-IZC266HS.js"),g=e("./chunk-QVEKZRZ2.js"),b=e("./chunk-Z2RGWDD7.js");e("./chunk-3W5G4CYI.js"),e("./chunk-EQMZL4XU.js"),r.AssertionError=f.AssertionError,r.CAIP_ACCOUNT_ADDRESS_REGEX=u.CAIP_ACCOUNT_ADDRESS_REGEX,r.CAIP_ACCOUNT_ID_REGEX=u.CAIP_ACCOUNT_ID_REGEX,r.CAIP_CHAIN_ID_REGEX=u.CAIP_CHAIN_ID_REGEX,r.CAIP_NAMESPACE_REGEX=u.CAIP_NAMESPACE_REGEX,r.CAIP_REFERENCE_REGEX=u.CAIP_REFERENCE_REGEX,r.CaipAccountAddressStruct=u.CaipAccountAddressStruct,r.CaipAccountIdStruct=u.CaipAccountIdStruct,r.CaipChainIdStruct=u.CaipChainIdStruct,r.CaipNamespaceStruct=u.CaipNamespaceStruct,r.CaipReferenceStruct=u.CaipReferenceStruct,r.ChecksumStruct=l.ChecksumStruct,r.Duration=i.Duration,r.ESCAPE_CHARACTERS_REGEXP=g.ESCAPE_CHARACTERS_REGEXP,r.FrozenMap=b.FrozenMap,r.FrozenSet=b.FrozenSet,r.HexAddressStruct=h.HexAddressStruct,r.HexChecksumAddressStruct=h.HexChecksumAddressStruct,r.HexStruct=h.HexStruct,r.JsonRpcErrorStruct=a.JsonRpcErrorStruct,r.JsonRpcFailureStruct=a.JsonRpcFailureStruct,r.JsonRpcIdStruct=a.JsonRpcIdStruct,r.JsonRpcNotificationStruct=a.JsonRpcNotificationStruct,r.JsonRpcParamsStruct=a.JsonRpcParamsStruct,r.JsonRpcRequestStruct=a.JsonRpcRequestStruct,r.JsonRpcResponseStruct=a.JsonRpcResponseStruct,r.JsonRpcSuccessStruct=a.JsonRpcSuccessStruct,r.JsonRpcVersionStruct=a.JsonRpcVersionStruct,r.JsonSize=g.JsonSize,r.JsonStruct=a.JsonStruct,r.PendingJsonRpcResponseStruct=a.PendingJsonRpcResponseStruct,r.StrictHexStruct=h.StrictHexStruct,r.UnsafeJsonStruct=a.UnsafeJsonStruct,r.VersionRangeStruct=o.VersionRangeStruct,r.VersionStruct=o.VersionStruct,r.add0x=h.add0x,r.assert=f.assert,r.assertExhaustive=f.assertExhaustive,r.assertIsBytes=h.assertIsBytes,r.assertIsHexString=h.assertIsHexString,r.assertIsJsonRpcError=a.assertIsJsonRpcError,r.assertIsJsonRpcFailure=a.assertIsJsonRpcFailure,r.assertIsJsonRpcNotification=a.assertIsJsonRpcNotification,r.assertIsJsonRpcRequest=a.assertIsJsonRpcRequest,r.assertIsJsonRpcResponse=a.assertIsJsonRpcResponse,r.assertIsJsonRpcSuccess=a.assertIsJsonRpcSuccess,r.assertIsPendingJsonRpcResponse=a.assertIsPendingJsonRpcResponse,r.assertIsSemVerRange=o.assertIsSemVerRange,r.assertIsSemVerVersion=o.assertIsSemVerVersion,r.assertIsStrictHexString=h.assertIsStrictHexString,r.assertStruct=f.assertStruct,r.base64=d.base64,r.base64ToBytes=h.base64ToBytes,r.bigIntToBytes=h.bigIntToBytes,r.bigIntToHex=n.bigIntToHex,r.bytesToBase64=h.bytesToBase64,r.bytesToBigInt=h.bytesToBigInt,r.bytesToHex=h.bytesToHex,r.bytesToNumber=h.bytesToNumber,r.bytesToSignedBigInt=h.bytesToSignedBigInt,r.bytesToString=h.bytesToString,r.calculateNumberSize=g.calculateNumberSize,r.calculateStringSize=g.calculateStringSize,r.concatBytes=h.concatBytes,r.createBigInt=p.createBigInt,r.createBytes=p.createBytes,r.createDataView=h.createDataView,r.createDeferredPromise=s.createDeferredPromise,r.createHex=p.createHex,r.createModuleLogger=c.createModuleLogger,r.createNumber=p.createNumber,r.createProjectLogger=c.createProjectLogger,r.exactOptional=a.exactOptional,r.getChecksumAddress=h.getChecksumAddress,r.getErrorMessage=m.getErrorMessage,r.getJsonRpcIdValidator=a.getJsonRpcIdValidator,r.getJsonSize=a.getJsonSize,r.getKnownPropertyNames=g.getKnownPropertyNames,r.getSafeJson=a.getSafeJson,r.gtRange=o.gtRange,r.gtVersion=o.gtVersion,r.hasProperty=g.hasProperty,r.hexToBigInt=n.hexToBigInt,r.hexToBytes=h.hexToBytes,r.hexToNumber=n.hexToNumber,r.inMilliseconds=i.inMilliseconds,r.isASCII=g.isASCII,r.isBytes=h.isBytes,r.isCaipAccountAddress=u.isCaipAccountAddress,r.isCaipAccountId=u.isCaipAccountId,r.isCaipChainId=u.isCaipChainId,r.isCaipNamespace=u.isCaipNamespace,r.isCaipReference=u.isCaipReference,r.isErrorWithCode=m.isErrorWithCode,r.isErrorWithMessage=m.isErrorWithMessage,r.isErrorWithStack=m.isErrorWithStack,r.isHexString=h.isHexString,r.isJsonRpcError=a.isJsonRpcError,r.isJsonRpcFailure=a.isJsonRpcFailure,r.isJsonRpcNotification=a.isJsonRpcNotification,r.isJsonRpcRequest=a.isJsonRpcRequest,r.isJsonRpcResponse=a.isJsonRpcResponse,r.isJsonRpcSuccess=a.isJsonRpcSuccess,r.isNonEmptyArray=g.isNonEmptyArray,r.isNullOrUndefined=g.isNullOrUndefined,r.isObject=g.isObject,r.isPendingJsonRpcResponse=a.isPendingJsonRpcResponse,r.isPlainObject=g.isPlainObject,r.isStrictHexString=h.isStrictHexString,r.isValidChecksumAddress=h.isValidChecksumAddress,r.isValidHexAddress=h.isValidHexAddress,r.isValidJson=a.isValidJson,r.isValidSemVerRange=o.isValidSemVerRange,r.isValidSemVerVersion=o.isValidSemVerVersion,r.jsonrpc2=a.jsonrpc2,r.numberToBytes=h.numberToBytes,r.numberToHex=n.numberToHex,r.object=a.object,r.parseCaipAccountId=u.parseCaipAccountId,r.parseCaipChainId=u.parseCaipChainId,r.remove0x=h.remove0x,r.satisfiesVersionRange=o.satisfiesVersionRange,r.signedBigIntToBytes=h.signedBigIntToBytes,r.stringToBytes=h.stringToBytes,r.timeSince=i.timeSince,r.valueToBytes=h.valueToBytes,r.wrapError=m.wrapError}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/index.js"}],[56,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function s(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function c(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(r,"__esModule",{value:!0}),r.output=r.exists=r.hash=r.bytes=r.bool=r.number=void 0,r.number=n,r.bool=s,r.bytes=i,r.hash=o,r.exists=a,r.output=c;const u={number:n,bool:s,bytes:i,hash:o,exists:a,output:c};r.default=u}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/_assert.js"}],[57,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.add5L=r.add5H=r.add4H=r.add4L=r.add3H=r.add3L=r.add=r.rotlBL=r.rotlBH=r.rotlSL=r.rotlSH=r.rotr32L=r.rotr32H=r.rotrBL=r.rotrBH=r.rotrSL=r.rotrSH=r.shrSL=r.shrSH=r.toBig=r.split=r.fromBig=void 0;const n=BigInt(2**32-1),s=BigInt(32);function i(e,t=!1){return t?{h:Number(e&n),l:Number(e>>s&n)}:{h:0|Number(e>>s&n),l:0|Number(e&n)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let s=0;s<e.length;s++){const{h:o,l:a}=i(e[s],t);[r[s],n[s]]=[o,a]}return[r,n]}r.fromBig=i,r.split=o;const a=(e,t)=>BigInt(e>>>0)<<s|BigInt(t>>>0);r.toBig=a;const c=(e,t,r)=>e>>>r;r.shrSH=c;const u=(e,t,r)=>e<<32-r|t>>>r;r.shrSL=u;const l=(e,t,r)=>e>>>r|t<<32-r;r.rotrSH=l;const d=(e,t,r)=>e<<32-r|t>>>r;r.rotrSL=d;const p=(e,t,r)=>e<<64-r|t>>>r-32;r.rotrBH=p;const h=(e,t,r)=>e>>>r-32|t<<64-r;r.rotrBL=h;const f=(e,t)=>t;r.rotr32H=f;const m=(e,t)=>e;r.rotr32L=m;const g=(e,t,r)=>e<<r|t>>>32-r;r.rotlSH=g;const b=(e,t,r)=>t<<r|e>>>32-r;r.rotlSL=b;const y=(e,t,r)=>t<<r-32|e>>>64-r;r.rotlBH=y;const w=(e,t,r)=>e<<r-32|t>>>64-r;function v(e,t,r,n){const s=(t>>>0)+(n>>>0);return{h:e+r+(s/2**32|0)|0,l:0|s}}r.rotlBL=w,r.add=v;const E=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);r.add3L=E;const k=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;r.add3H=k;const _=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);r.add4L=_;const S=(e,t,r,n,s)=>t+r+n+s+(e/2**32|0)|0;r.add4H=S;const T=(e,t,r,n,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(s>>>0);r.add5L=T;const x=(e,t,r,n,s,i)=>t+r+n+s+i+(e/2**32|0)|0;r.add5H=x;const O={fromBig:i,split:o,toBig:a,shrSH:c,shrSL:u,rotrSH:l,rotrSL:d,rotrBH:p,rotrBL:h,rotr32H:f,rotr32L:m,rotlSH:g,rotlSL:b,rotlBH:y,rotlBL:w,add:v,add3L:E,add3H:k,add4L:_,add4H:S,add5H:x,add5L:T};r.default=O}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/_u64.js"}],[58,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.crypto=void 0,r.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:undefined}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/crypto.js"}],[59,{"./_assert.js":56,"./_u64.js":57,"./utils.js":60},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shake256=r.shake128=r.keccak_512=r.keccak_384=r.keccak_256=r.keccak_224=r.sha3_512=r.sha3_384=r.sha3_256=r.sha3_224=r.Keccak=r.keccakP=void 0;const n=e("./_assert.js"),s=e("./_u64.js"),i=e("./utils.js"),[o,a,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),d=BigInt(2),p=BigInt(7),h=BigInt(256),f=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],o.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let s=u;for(let e=0;e<7;e++)t=(t<<l^(t>>p)*f)%h,t&d&&(s^=l<<(l<<BigInt(e))-l);c.push(s)}const[m,g]=(0,s.split)(c,!0),b=(e,t,r)=>r>32?(0,s.rotlBH)(e,t,r):(0,s.rotlSH)(e,t,r),y=(e,t,r)=>r>32?(0,s.rotlBL)(e,t,r):(0,s.rotlSL)(e,t,r);function w(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,s=(t+2)%10,i=r[s],o=r[s+1],a=b(i,o,1)^r[n],c=y(i,o,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],s=e[3];for(let r=0;r<24;r++){const n=a[r],i=b(t,s,n),c=y(t,s,n),u=o[r];t=e[u],s=e[u+1],e[u]=i,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=m[n],e[1]^=g[n]}r.fill(0)}r.keccakP=w;class v extends i.Hash{constructor(e,t,r,s=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=s,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}keccak(){w(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){const i=Math.min(t-this.pos,s-n);for(let t=0;t<i;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,s=e.length;n<s;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,s-n);e.set(t.subarray(this.posOut,this.posOut+i),n),this.posOut+=i,n+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:s,enableXOF:i}=this;return e||(e=new v(t,r,n,i,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=r,e.outputLen=n,e.enableXOF=i,e.destroyed=this.destroyed,e}}r.Keccak=v;const E=(e,t,r)=>(0,i.wrapConstructor)((()=>new v(t,e,r)));r.sha3_224=E(6,144,28),r.sha3_256=E(6,136,32),r.sha3_384=E(6,104,48),r.sha3_512=E(6,72,64),r.keccak_224=E(1,144,28),r.keccak_256=E(1,136,32),r.keccak_384=E(1,104,48),r.keccak_512=E(1,72,64);const k=(e,t,r)=>(0,i.wrapXOFConstructorWithOpts)(((n={})=>new v(t,e,n.dkLen===undefined?r:n.dkLen,!0)));r.shake128=k(31,168,16),r.shake256=k(31,136,32)}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/sha3.js"}],[60,{"@noble/hashes/crypto":58},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
|
|
13291
13291
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
13292
|
-
Object.defineProperty(r,"__esModule",{value:!0}),r.randomBytes=r.wrapXOFConstructorWithOpts=r.wrapConstructorWithOpts=r.wrapConstructor=r.checkOpts=r.Hash=r.concatBytes=r.toBytes=r.utf8ToBytes=r.asyncLoop=r.nextTick=r.hexToBytes=r.bytesToHex=r.isLE=r.rotr=r.createView=r.u32=r.u8=void 0;const n=e("@noble/hashes/crypto"),s=e=>e instanceof Uint8Array;r.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);r.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));r.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(r.rotr=(e,t)=>e<<32-t|e>>>t,r.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!r.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));r.bytesToHex=function(e){if(!s(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=i[e[r]];return t},r.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,s=e.slice(n,n+2),i=Number.parseInt(s,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");r[t]=i}return r};function o(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function a(e){if("string"==typeof e&&(e=o(e)),!s(e))throw new Error("expected Uint8Array, got "+typeof e);return e}r.nextTick=async()=>{},r.asyncLoop=async function(e,t,n){let s=Date.now();for(let i=0;i<e;i++){n(i);const e=Date.now()-s;e>=0&&e<t||(await(0,r.nextTick)(),s+=e)}},r.utf8ToBytes=o,r.toBytes=a,r.concatBytes=function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!s(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t};r.Hash=class{clone(){return this._cloneInto()}};const c={}.toString;r.checkOpts=function(e,t){if(t!==undefined&&"[object Object]"!==c.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},r.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},r.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},r.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},r.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/utils.js"}],[
|
|
13292
|
+
Object.defineProperty(r,"__esModule",{value:!0}),r.randomBytes=r.wrapXOFConstructorWithOpts=r.wrapConstructorWithOpts=r.wrapConstructor=r.checkOpts=r.Hash=r.concatBytes=r.toBytes=r.utf8ToBytes=r.asyncLoop=r.nextTick=r.hexToBytes=r.bytesToHex=r.isLE=r.rotr=r.createView=r.u32=r.u8=void 0;const n=e("@noble/hashes/crypto"),s=e=>e instanceof Uint8Array;r.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);r.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));r.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(r.rotr=(e,t)=>e<<32-t|e>>>t,r.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!r.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));r.bytesToHex=function(e){if(!s(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=i[e[r]];return t},r.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,s=e.slice(n,n+2),i=Number.parseInt(s,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");r[t]=i}return r};function o(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function a(e){if("string"==typeof e&&(e=o(e)),!s(e))throw new Error("expected Uint8Array, got "+typeof e);return e}r.nextTick=async()=>{},r.asyncLoop=async function(e,t,n){let s=Date.now();for(let i=0;i<e;i++){n(i);const e=Date.now()-s;e>=0&&e<t||(await(0,r.nextTick)(),s+=e)}},r.utf8ToBytes=o,r.toBytes=a,r.concatBytes=function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!s(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t};r.Hash=class{clone(){return this._cloneInto()}};const c={}.toString;r.checkOpts=function(e,t){if(t!==undefined&&"[object Object]"!==c.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},r.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},r.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},r.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},r.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/utils.js"}],[61,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function s(...e){const t=(e,t)=>r=>e(t(r));return{encode:Array.from(e).reverse().reduce(((e,r)=>e?t(e,r.encode):r.encode),undefined),decode:e.reduce(((e,r)=>e?t(e,r.decode):r.decode),undefined)}}function i(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(n(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const r=e.indexOf(t);if(-1===r)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return r}))}}}function o(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function a(e,t="="){if(n(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let n=r.length;if(n*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function c(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function u(e,t,r){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: wrong to=${r}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let s=0;const i=[],o=Array.from(e);for(o.forEach((e=>{if(n(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,n=!0;for(let i=s;i<o.length;i++){const a=o[i],c=t*e+a;if(!Number.isSafeInteger(c)||t*e/t!==e||c-a!=t*e)throw new Error("convertRadix: carry overflow");e=c%r;const u=Math.floor(c/r);if(o[i]=u,!Number.isSafeInteger(u)||u*r+e!==c)throw new Error("convertRadix: carry overflow");n&&(u?n=!1:s=i)}if(i.push(e),n)break}for(let t=0;t<e.length-1&&0===e[t];t++)i.push(0);return i.reverse()}
|
|
13293
13293
|
/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
13294
|
-
Object.defineProperty(r,"__esModule",{value:!0}),r.bytes=r.stringToBytes=r.str=r.bytesToString=r.hex=r.utf8=r.bech32m=r.bech32=r.base58check=r.base58xmr=r.base58xrp=r.base58flickr=r.base58=r.base64urlnopad=r.base64url=r.base64=r.base32crockford=r.base32hex=r.base32=r.base16=r.utils=r.assertNumber=void 0,r.assertNumber=n;const l=(e,t)=>t?l(t,e%t):e,d=(e,t)=>e+(t-l(e,t));function f(e,t,r,s){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(d(t,r)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${d(t,r)}`);let i=0,o=0;const a=2**r-1,c=[];for(const s of e){if(n(s),s>=2**t)throw new Error(`convertRadix2: invalid data word=${s} from=${t}`);if(i=i<<t|s,o+t>32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=r;o-=r)c.push((i>>o-r&a)>>>0);i&=2**o-1}if(i=i<<r-o&a,!s&&o>=t)throw new Error("Excess padding");if(!s&&i)throw new Error(`Non-zero padding: ${i}`);return s&&o>0&&c.push(i>>>0),c}function p(e){return n(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return u(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of strings");return Uint8Array.from(u(t,e,256))}}}function h(e,t=!1){if(n(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(d(8,e)>32||d(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!(r instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return f(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(f(r,e,8,t))}}}function m(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function g(e,t){if(n(e),"function"!=typeof t)throw new Error("checksum fn should be function");return{encode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");const n=t(r).slice(0,e),s=new Uint8Array(r.length+e);return s.set(r),s.set(n,r.length),s},decode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");const n=r.slice(0,-e),s=t(n).slice(0,e),i=r.slice(-e);for(let t=0;t<e;t++)if(s[t]!==i[t])throw new Error("Invalid checksum");return n}}}r.utils={alphabet:i,chain:s,checksum:g,radix:p,radix2:h,join:o,padding:a},r.base16=s(h(4),i("0123456789ABCDEF"),o("")),r.base32=s(h(5),i("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),a(5),o("")),r.base32hex=s(h(5),i("0123456789ABCDEFGHIJKLMNOPQRSTUV"),a(5),o("")),r.base32crockford=s(h(5),i("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),o(""),c((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),r.base64=s(h(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a(6),o("")),r.base64url=s(h(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(6),o("")),r.base64urlnopad=s(h(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),o(""));const b=e=>s(p(58),i(e),o(""));r.base58=b("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),r.base58flickr=b("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),r.base58xrp=b("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const y=[0,2,3,5,6,7,9,10,11];r.base58xmr={encode(e){let t="";for(let n=0;n<e.length;n+=8){const s=e.subarray(n,n+8);t+=r.base58.encode(s).padStart(y[s.length],"1")}return t},decode(e){let t=[];for(let n=0;n<e.length;n+=11){const s=e.slice(n,n+11),i=y.indexOf(s.length),o=r.base58.decode(s);for(let e=0;e<o.length-i;e++)if(0!==o[e])throw new Error("base58xmr: wrong padding");t=t.concat(Array.from(o.slice(o.length-i)))}return Uint8Array.from(t)}};r.base58check=e=>s(g(4,(t=>e(e(t)))),r.base58);const w=s(i("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),o("")),v=[996825010,642813549,513874426,1027748829,705979059];function _(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e<v.length;e++)1==(t>>e&1)&&(r^=v[e]);return r}function E(e,t,r=1){const n=e.length;let s=1;for(let t=0;t<n;t++){const r=e.charCodeAt(t);if(r<33||r>126)throw new Error(`Invalid prefix (${e})`);s=_(s)^r>>5}s=_(s);for(let t=0;t<n;t++)s=_(s)^31&e.charCodeAt(t);for(let e of t)s=_(s)^e;for(let e=0;e<6;e++)s=_(s);return s^=r,w.encode(f([s%2**30],30,5,!1))}function S(e){const t="bech32"===e?1:734539939,r=h(5),n=r.decode,s=r.encode,i=m(n);function o(e,r=90){if("string"!=typeof e)throw new Error("bech32.decode input should be string, not "+typeof e);if(e.length<8||!1!==r&&e.length>r)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);const n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const s=(e=n).lastIndexOf("1");if(0===s||-1===s)throw new Error('Letter "1" must be present between prefix and data only');const i=e.slice(0,s),o=e.slice(s+1);if(o.length<6)throw new Error("Data must be at least 6 characters long");const a=w.decode(o).slice(0,-6),c=E(i,a,t);if(!o.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:i,words:a}}return{encode:function(e,r,n=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof r);const s=e.length+7+r.length;if(!1!==n&&s>n)throw new TypeError(`Length ${s} exceeds limit ${n}`);const i=e.toLowerCase(),o=E(i,r,t);return`${i}1${w.encode(r)}${o}`},decode:o,decodeToBytes:function(e){const{prefix:t,words:r}=o(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:m(o),fromWords:n,fromWordsUnsafe:i,toWords:s}}r.bech32=S("bech32"),r.bech32m=S("bech32m"),r.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},r.hex=s(h(4),i("0123456789abcdef"),o(""),c((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));const k={utf8:r.utf8,hex:r.hex,base16:r.base16,base32:r.base32,base64:r.base64,base64url:r.base64url,base58:r.base58,base58xmr:r.base58xmr},T="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";r.bytesToString=(e,t)=>{if("string"!=typeof e||!k.hasOwnProperty(e))throw new TypeError(T);if(!(t instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return k[e].encode(t)},r.str=r.bytesToString;r.stringToBytes=(e,t)=>{if(!k.hasOwnProperty(e))throw new TypeError(T);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return k[e].decode(t)},r.bytes=r.stringToBytes}}},{package:"@metamask/utils>@scure/base",file:"../../node_modules/@scure/base/lib/index.js"}],[88,{"event-target-shim":95},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("event-target-shim");class s extends n.EventTarget{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const e=i.get(this);if("boolean"!=typeof e)throw new TypeError("Expected 'this' to be an 'AbortSignal' object, but got "+(null===this?"null":typeof this));return e}}n.defineEventAttribute(s.prototype,"abort");const i=new WeakMap;Object.defineProperties(s.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(s.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class o{constructor(){a.set(this,function(){const e=Object.create(s.prototype);return n.EventTarget.call(e),i.set(e,!1),e}())}get signal(){return c(this)}abort(){var e;e=c(this),!1===i.get(e)&&(i.set(e,!0),e.dispatchEvent({type:"abort"}))}}const a=new WeakMap;function c(e){const t=a.get(e);if(null==t)throw new TypeError("Expected 'this' to be an 'AbortController' object, but got "+(null===e?"null":typeof e));return t}Object.defineProperties(o.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(o.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"}),r.AbortController=o,r.AbortSignal=s,r.default=o,t.exports=o,t.exports.AbortController=t.exports.default=o,t.exports.AbortSignal=s}}},{package:"@metamask/providers>extension-port-stream>readable-stream>abort-controller",file:"../../node_modules/abort-controller/dist/abort-controller.js"}],[89,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=1e3,s=60*n,i=60*s,o=24*i,a=7*o,c=365.25*o;function u(e,t,r,n){var s=t>=1.5*r;return Math.round(e/r)+" "+n+(s?"s":"")}t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*c;case"weeks":case"week":case"w":return r*a;case"days":case"day":case"d":return r*o;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*s;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return undefined}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return u(e,t,o,"day");if(t>=i)return u(e,t,i,"hour");if(t>=s)return u(e,t,s,"minute");if(t>=n)return u(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=s)return Math.round(e/s)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}}},{package:"eslint>debug>ms",file:"../../node_modules/debug/node_modules/ms/index.js"}],[90,{"./common":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){r.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,s=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))})),e.splice(s,0,r)},r.save=function(e){try{e?r.storage.setItem("debug",e):r.storage.removeItem("debug")}catch(e){}},r.load=function(){let e;try{e=r.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},r.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage=function(){try{return localStorage}catch(e){}}(),r.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(r);const{formatters:n}=t.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/browser.js"}],[91,{ms:89},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(t){function r(e){let t,s,i,o=null;function a(...e){if(!a.enabled)return;const n=a,s=Number(new Date),i=s-(t||s);n.diff=i,n.prev=t,n.curr=s,t=s,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,s)=>{if("%%"===t)return"%";o++;const i=r.formatters[s];if("function"==typeof i){const r=e[o];t=i.call(n,r),e.splice(o,1),o--}return t})),r.formatArgs.call(n,e);(n.log||r.log).apply(n,e)}return a.namespace=e,a.useColors=r.useColors(),a.color=r.selectColor(e),a.extend=n,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(s!==r.namespaces&&(s=r.namespaces,i=r.enabled(e)),i),set:e=>{o=e}}),"function"==typeof r.init&&r.init(a),a}function n(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){const e=[...r.names.map(s),...r.skips.map(s).map((e=>"-"+e))].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.namespaces=e,r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),s=n.length;for(t=0;t<s;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.slice(1)+"$")):r.names.push(new RegExp("^"+e+"$")))},r.enabled=function(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=e("ms"),r.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((e=>{r[e]=t[e]})),r.names=[],r.skips=[],r.formatters={},r.selectColor=function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return r.colors[Math.abs(t)%r.colors.length]},r.enable(r.load()),r}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/common.js"}],[92,{"./browser.js":90,"./node.js":93},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?t.exports=e("./browser.js"):t.exports=e("./node.js")}}},{package:"eslint>debug",file:"../../node_modules/debug/src/index.js"}],[93,{"./common":91,"supports-color":211,tty:"tty",util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("tty"),s=e("util");r.init=function(e){e.inspectOpts={};const t=Object.keys(r.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=r.inspectOpts[t[n]]},r.log=function(...e){return process.stderr.write(s.format(...e)+"\n")},r.formatArgs=function(e){const{namespace:n,useColors:s}=this;if(s){const r=this.color,s="[3"+(r<8?r:"8;5;"+r),i=` ${s};1m${n} [0m`;e[0]=i+e[0].split("\n").join("\n"+i),e.push(s+"m+"+t.exports.humanize(this.diff)+"[0m")}else e[0]=function(){if(r.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+e[0]},r.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},r.load=function(){return process.env.DEBUG},r.useColors=function(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):n.isatty(process.stderr.fd)},r.destroy=s.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),r.colors=[6,2,3,4,5,1];try{const t=e("supports-color");t&&(t.stderr||t).level>=2&&(r.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}r.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),t.exports=e("./common")(r);const{formatters:i}=t.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts)}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/node.js"}],[94,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,s=0,i=t.length;s<i;s++)!n&&s in t||(n||(n=Array.prototype.slice.call(t,0,s)),n[s]=t[s]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.getNodeVersion=r.detectOS=r.parseUserAgent=r.browserName=r.detect=r.ReactNativeInfo=r.BotInfo=r.SearchBotDeviceInfo=r.NodeInfo=r.BrowserInfo=void 0;var s=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"};r.BrowserInfo=s;var i=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform};r.NodeInfo=i;var o=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"};r.SearchBotDeviceInfo=o;var a=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null};r.BotInfo=a;var c=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null};r.ReactNativeInfo=c;var u=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,l=3,d=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],f=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function p(e){return""!==e&&d.reduce((function(t,r){var n=r[0],s=r[1];if(t)return t;var i=s.exec(e);return!!i&&[n,i]}),!1)}function h(e){var t=p(e);if(!t)return null;var r=t[0],i=t[1];if("searchbot"===r)return new a;var c=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);c?c.length<l&&(c=n(n([],c,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(l-c.length),!0)):c=[];var d=c.join("."),f=m(e),h=u.exec(e);return h&&h[1]?new o(r,d,f,h[1]):new s(r,d,f)}function m(e){for(var t=0,r=f.length;t<r;t++){var n=f[t],s=n[0];if(n[1].exec(e))return s}return null}function g(){return"undefined"!=typeof process&&process.version?new i(process.version.slice(1)):null}r.detect=function(e){return e?h(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new c:"undefined"!=typeof navigator?h(navigator.userAgent):g()},r.browserName=function(e){var t=p(e);return t?t[0]:null},r.parseUserAgent=h,r.detectOS=m,r.getNodeVersion=g}}},{package:"@metamask/providers>detect-browser",file:"../../node_modules/detect-browser/index.js"}],[95,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=new WeakMap,s=new WeakMap;function i(e){const t=n.get(e);return console.assert(null!=t,"'this' is expected an Event object, but got",e),t}function o(e){null==e.passiveListener?e.event.cancelable&&(e.canceled=!0,"function"==typeof e.event.preventDefault&&e.event.preventDefault()):"undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",e.passiveListener)}function a(e,t){n.set(this,{eventTarget:e,event:t,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:t.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const r=Object.keys(t);for(let e=0;e<r.length;++e){const t=r[e];t in this||Object.defineProperty(this,t,c(t))}}function c(e){return{get(){return i(this).event[e]},set(t){i(this).event[e]=t},configurable:!0,enumerable:!0}}function u(e){return{value(){const t=i(this).event;return t[e].apply(t,arguments)},configurable:!0,enumerable:!0}}function l(e){if(null==e||e===Object.prototype)return a;let t=s.get(e);return null==t&&(t=function(e,t){const r=Object.keys(t);if(0===r.length)return e;function n(t,r){e.call(this,t,r)}n.prototype=Object.create(e.prototype,{constructor:{value:n,configurable:!0,writable:!0}});for(let s=0;s<r.length;++s){const i=r[s];if(!(i in e.prototype)){const e="function"==typeof Object.getOwnPropertyDescriptor(t,i).value;Object.defineProperty(n.prototype,i,e?u(i):c(i))}}return n}(l(Object.getPrototypeOf(e)),e),s.set(e,t)),t}function d(e){return i(e).immediateStopped}function f(e,t){i(e).passiveListener=t}a.prototype={get type(){return i(this).event.type},get target(){return i(this).eventTarget},get currentTarget(){return i(this).currentTarget},composedPath(){const e=i(this).currentTarget;return null==e?[]:[e]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return i(this).eventPhase},stopPropagation(){const e=i(this);e.stopped=!0,"function"==typeof e.event.stopPropagation&&e.event.stopPropagation()},stopImmediatePropagation(){const e=i(this);e.stopped=!0,e.immediateStopped=!0,"function"==typeof e.event.stopImmediatePropagation&&e.event.stopImmediatePropagation()},get bubbles(){return Boolean(i(this).event.bubbles)},get cancelable(){return Boolean(i(this).event.cancelable)},preventDefault(){o(i(this))},get defaultPrevented(){return i(this).canceled},get composed(){return Boolean(i(this).event.composed)},get timeStamp(){return i(this).timeStamp},get srcElement(){return i(this).eventTarget},get cancelBubble(){return i(this).stopped},set cancelBubble(e){if(!e)return;const t=i(this);t.stopped=!0,"boolean"==typeof t.event.cancelBubble&&(t.event.cancelBubble=!0)},get returnValue(){return!i(this).canceled},set returnValue(e){e||o(i(this))},initEvent(){}},Object.defineProperty(a.prototype,"constructor",{value:a,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.Event&&(Object.setPrototypeOf(a.prototype,window.Event.prototype),s.set(window.Event.prototype,a));const p=new WeakMap,h=3;function m(e){return null!==e&&"object"==typeof e}function g(e){const t=p.get(e);if(null==t)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return t}function b(e,t){Object.defineProperty(e,`on${t}`,function(e){return{get(){let t=g(this).get(e);for(;null!=t;){if(t.listenerType===h)return t.listener;t=t.next}return null},set(t){"function"==typeof t||m(t)||(t=null);const r=g(this);let n=null,s=r.get(e);for(;null!=s;)s.listenerType===h?null!==n?n.next=s.next:null!==s.next?r.set(e,s.next):r.delete(e):n=s,s=s.next;if(null!==t){const s={listener:t,listenerType:h,passive:!1,once:!1,next:null};null===n?r.set(e,s):n.next=s}},configurable:!0,enumerable:!0}}(t))}function y(e){function t(){w.call(this)}t.prototype=Object.create(w.prototype,{constructor:{value:t,configurable:!0,writable:!0}});for(let r=0;r<e.length;++r)b(t.prototype,e[r]);return t}function w(){if(!(this instanceof w)){if(1===arguments.length&&Array.isArray(arguments[0]))return y(arguments[0]);if(arguments.length>0){const e=new Array(arguments.length);for(let t=0;t<arguments.length;++t)e[t]=arguments[t];return y(e)}throw new TypeError("Cannot call a class as a function")}p.set(this,new Map)}w.prototype={addEventListener(e,t,r){if(null==t)return;if("function"!=typeof t&&!m(t))throw new TypeError("'listener' should be a function or an object.");const n=g(this),s=m(r),i=(s?Boolean(r.capture):Boolean(r))?1:2,o={listener:t,listenerType:i,passive:s&&Boolean(r.passive),once:s&&Boolean(r.once),next:null};let a=n.get(e);if(a===undefined)return void n.set(e,o);let c=null;for(;null!=a;){if(a.listener===t&&a.listenerType===i)return;c=a,a=a.next}c.next=o},removeEventListener(e,t,r){if(null==t)return;const n=g(this),s=(m(r)?Boolean(r.capture):Boolean(r))?1:2;let i=null,o=n.get(e);for(;null!=o;){if(o.listener===t&&o.listenerType===s)return void(null!==i?i.next=o.next:null!==o.next?n.set(e,o.next):n.delete(e));i=o,o=o.next}},dispatchEvent(e){if(null==e||"string"!=typeof e.type)throw new TypeError('"event.type" should be a string.');const t=g(this),r=e.type;let n=t.get(r);if(null==n)return!0;const s=function(e,t){return new(l(Object.getPrototypeOf(t)))(e,t)}(this,e);let o=null;for(;null!=n;){if(n.once?null!==o?o.next=n.next:null!==n.next?t.set(r,n.next):t.delete(r):o=n,f(s,n.passive?n.listener:null),"function"==typeof n.listener)try{n.listener.call(this,s)}catch(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e)}else n.listenerType!==h&&"function"==typeof n.listener.handleEvent&&n.listener.handleEvent(s);if(d(s))break;n=n.next}return f(s,null),function(e,t){i(e).eventPhase=t}(s,0),function(e,t){i(e).currentTarget=t}(s,null),!s.defaultPrevented}},Object.defineProperty(w.prototype,"constructor",{value:w,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.EventTarget&&Object.setPrototypeOf(w.prototype,window.EventTarget.prototype),r.defineEventAttribute=b,r.EventTarget=w,r.default=w,t.exports=w,t.exports.EventTarget=t.exports.default=w,t.exports.defineEventAttribute=b}}},{package:"@metamask/providers>extension-port-stream>readable-stream>abort-controller>event-target-shim",file:"../../node_modules/event-target-shim/dist/event-target-shim.js"}],[96,{buffer:"buffer","readable-stream":116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0});const n=e("readable-stream");class s extends n.Duplex{constructor(e){super({objectMode:!0}),this._port=e,this._port.onMessage.addListener((e=>this._onMessage(e))),this._port.onDisconnect.addListener((()=>this._onDisconnect())),this._log=()=>null}_onMessage(e){if(t.isBuffer(e)){const r=t.from(e);this._log(r,!1),this.push(r)}else this._log(e,!1),this.push(e)}_onDisconnect(){this.destroy()}_read(){return undefined}_write(e,r,n){try{if(t.isBuffer(e)){const t=e.toJSON();t._isBuffer=!0,this._log(t,!0),this._port.postMessage(t)}else this._log(e,!0),this._port.postMessage(e)}catch(e){return n(new Error("PortDuplexStream - disconnected"))}return n()}_setLogger(e){this._log=e}}r.default=s}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/providers>extension-port-stream",file:"../../node_modules/extension-port-stream/dist/index.js"}],[97,{"../../ours/errors":115,"./end-of-stream":103,"./utils":112},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{AbortError:n,codes:s}=e("../../ours/errors"),{isNodeStream:i,isWebStream:o,kControllerErrorFunction:a}=e("./utils"),c=e("./end-of-stream"),{ERR_INVALID_ARG_TYPE:u}=s;t.exports.addAbortSignal=function(e,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new u(t,"AbortSignal",e)})(e,"signal"),!i(r)&&!o(r))throw new u("stream",["ReadableStream","WritableStream","Stream"],r);return t.exports.addAbortSignalNoValidate(e,r)},t.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const r=i(t)?()=>{t.destroy(new n(undefined,{cause:e.reason}))}:()=>{t[a](new n(undefined,{cause:e.reason}))};return e.aborted?r():(e.addEventListener("abort",r),c(t,(()=>e.removeEventListener("abort",r)))),t}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"}],[98,{"../../ours/primordials":117,"../../ours/util":118,buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{StringPrototypeSlice:n,SymbolIterator:s,TypedArrayPrototypeSet:i,Uint8Array:o}=e("../../ours/primordials"),{Buffer:a}=e("buffer"),{inspect:c}=e("../../ours/util");t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)i(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[s](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,s=0;do{const i=r.data;if(!(e>i.length)){e===i.length?(t+=i,++s,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(i,0,e),this.head=r,r.data=n(i,e));break}t+=i,e-=i.length,++s}while(null!==(r=r.next));return this.length-=s,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,s=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(i(t,a,r-e),++s,n.next?this.head=n.next:this.head=this.tail=null):(i(t,new o(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}i(t,a,r-e),e-=a.length,++s}while(null!==(n=n.next));return this.length-=s,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return c(this,{...t,depth:0,customInspect:!1})}}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/buffer_list.js"}],[99,{"../../ours/errors":115,"./destroy":100,"./duplex":101,"./end-of-stream":103,"./pipeline":108,"./utils":112},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{pipeline:n}=e("./pipeline"),s=e("./duplex"),{destroyer:i}=e("./destroy"),{isNodeStream:o,isReadable:a,isWritable:c,isWebStream:u,isTransformStream:l,isWritableStream:d,isReadableStream:f}=e("./utils"),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:h,ERR_MISSING_ARGS:m}}=e("../../ours/errors"),g=e("./end-of-stream");t.exports=function(...e){if(0===e.length)throw new m("streams");if(1===e.length)return s.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=s.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=s.from(e[t])}for(let r=0;r<e.length;++r)if(o(e[r])||u(e[r])){if(r<e.length-1&&!(a(e[r])||f(e[r])||l(e[r])))throw new h(`streams[${r}]`,t[r],"must be readable");if(r>0&&!(c(e[r])||d(e[r])||l(e[r])))throw new h(`streams[${r}]`,t[r],"must be writable")}let r,b,y,w,v;const _=e[0],E=n(e,(function(e){const t=w;w=null,t?t(e):e?v.destroy(e):k||S||v.destroy()})),S=!!(c(_)||d(_)||l(_)),k=!!(a(E)||f(E)||l(E));if(v=new s({writableObjectMode:!(null===_||_===undefined||!_.writableObjectMode),readableObjectMode:!(null===E||E===undefined||!E.writableObjectMode),writable:S,readable:k}),S){if(o(_))v._write=function(e,t,n){_.write(e,t)?n():r=n},v._final=function(e){_.end(),b=e},_.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(_)){const e=(l(_)?_.writable:_).getWriter();v._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},v._final=async function(t){try{await e.ready,e.close().catch((()=>{})),b=t}catch(e){t(e)}}}const e=l(E)?E.readable:E;g(e,(()=>{if(b){const e=b;b=null,e()}}))}if(k)if(o(E))E.on("readable",(function(){if(y){const e=y;y=null,e()}})),E.on("end",(function(){v.push(null)})),v._read=function(){for(;;){const e=E.read();if(null===e)return void(y=v._read);if(!v.push(e))return}};else if(u(E)){const e=(l(E)?E.readable:E).getReader();v._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!v.push(t))return;if(r)return void v.push(null)}catch{return}}}return v._destroy=function(e,t){e||null===w||(e=new p),y=null,r=null,b=null,null===w?t(e):(w=t,o(E)&&i(E,e))},v}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/compose.js"}],[100,{"../../ours/errors":115,"../../ours/primordials":117,"./utils":112,"process/":146},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("process/"),{aggregateTwoErrors:s,codes:{ERR_MULTIPLE_CALLBACK:i},AbortError:o}=e("../../ours/errors"),{Symbol:a}=e("../../ours/primordials"),{kDestroyed:c,isDestroyed:u,isFinished:l,isServerRequest:d}=e("./utils"),f=a("kDestroy"),p=a("kConstruct");function h(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function m(e,t,r){let s=!1;function i(t){if(s)return;s=!0;const i=e._readableState,o=e._writableState;h(t,o,i),o&&(o.closed=!0),i&&(i.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(b,e)}try{e._destroy(t||null,i)}catch(t){i(t)}}function g(e,t){y(e,t),b(e)}function b(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!==r&&r!==undefined&&r.emitClose||null!==t&&t!==undefined&&t.emitClose)&&e.emit("close")}function y(e,t){const r=e._readableState,n=e._writableState;null!==n&&n!==undefined&&n.errorEmitted||null!==r&&r!==undefined&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function w(e,t,r){const s=e._readableState,i=e._writableState;if(null!==i&&i!==undefined&&i.destroyed||null!==s&&s!==undefined&&s.destroyed)return this;null!==s&&s!==undefined&&s.autoDestroy||null!==i&&i!==undefined&&i.autoDestroy?e.destroy(t):t&&(t.stack,i&&!i.errored&&(i.errored=t),s&&!s.errored&&(s.errored=t),r?n.nextTick(y,e,t):y(e,t))}function v(e){let t=!1;function r(r){if(t)return void w(e,null!==r&&r!==undefined?r:new i);t=!0;const s=e._readableState,o=e._writableState,a=o||s;s&&(s.constructed=!0),o&&(o.constructed=!0),a.destroyed?e.emit(f,r):r?w(e,r,!0):n.nextTick(_,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function _(e){e.emit(p)}function E(e){return(null===e||e===undefined?undefined:e.setHeader)&&"function"==typeof e.abort}function S(e){e.emit("close")}function k(e,t){e.emit("error",t),n.nextTick(S,e)}t.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,s=e._writableState;r&&(r.constructed=!1),s&&(s.constructed=!1),e.once(p,t),e.listenerCount(p)>1||n.nextTick(v,e)},destroyer:function(e,t){e&&!u(e)&&(t||l(e)||(t=new o),d(e)?(e.socket=null,e.destroy(t)):E(e)?e.abort():E(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(k,e,t):n.nextTick(S,e),e.destroyed||(e[c]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,i=n||r;return null!==n&&n!==undefined&&n.destroyed||null!==r&&r!==undefined&&r.destroyed?("function"==typeof t&&t(),this):(h(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),i.constructed?m(this,e,t):this.once(f,(function(r){m(this,s(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:w}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/destroy.js"}],[101,{"../../ours/primordials":117,"./duplexify":102,"./readable":109,"./writable":113},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:s,ObjectKeys:i,ObjectSetPrototypeOf:o}=e("../../ours/primordials");t.exports=u;const a=e("./readable"),c=e("./writable");o(u.prototype,a.prototype),o(u,a);{const e=i(c.prototype);for(let t=0;t<e.length;t++){const r=e[t];u.prototype[r]||(u.prototype[r]=c.prototype[r])}}function u(e){if(!(this instanceof u))return new u(e);a.call(this,e),c.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let l,d;function f(){return l===undefined&&(l={}),l}n(u.prototype,{writable:{__proto__:null,...s(c.prototype,"writable")},writableHighWaterMark:{__proto__:null,...s(c.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...s(c.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...s(c.prototype,"writableBuffer")},writableLength:{__proto__:null,...s(c.prototype,"writableLength")},writableFinished:{__proto__:null,...s(c.prototype,"writableFinished")},writableCorked:{__proto__:null,...s(c.prototype,"writableCorked")},writableEnded:{__proto__:null,...s(c.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...s(c.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),u.fromWeb=function(e,t){return f().newStreamDuplexFromReadableWritablePair(e,t)},u.toWeb=function(e){return f().newReadableWritablePairFromDuplex(e)},u.from=function(t){return d||(d=e("./duplexify")),d(t,"body")}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/duplex.js"}],[102,{"../../ours/errors":115,"../../ours/primordials":117,"../../ours/util":118,"./destroy":100,"./duplex":101,"./end-of-stream":103,"./from":104,"./readable":109,"./utils":112,"abort-controller":88,buffer:"buffer","process/":146},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("process/"),s=e("buffer"),{isReadable:i,isWritable:o,isIterable:a,isNodeStream:c,isReadableNodeStream:u,isWritableNodeStream:l,isDuplexNodeStream:d}=e("./utils"),f=e("./end-of-stream"),{AbortError:p,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:m}}=e("../../ours/errors"),{destroyer:g}=e("./destroy"),b=e("./duplex"),y=e("./readable"),{createDeferredPromise:w}=e("../../ours/util"),v=e("./from"),_=globalThis.Blob||s.Blob,E=void 0!==_?function(e){return e instanceof _}:function(e){return!1},S=globalThis.AbortController||e("abort-controller").AbortController,{FunctionPrototypeCall:k}=e("../../ours/primordials");class T extends b{constructor(e){super(e),!1===(null===e||e===undefined?undefined:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null===e||e===undefined?undefined:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function x(e){const t=e.readable&&"function"!=typeof e.readable.read?y.wrap(e.readable):e.readable,r=e.writable;let n,s,a,c,u,l=!!i(t),d=!!o(r);function h(e){const t=c;c=null,t?t(e):e&&u.destroy(e)}return u=new T({readableObjectMode:!(null===t||t===undefined||!t.readableObjectMode),writableObjectMode:!(null===r||r===undefined||!r.writableObjectMode),readable:l,writable:d}),d&&(f(r,(e=>{d=!1,e&&g(t,e),h(e)})),u._write=function(e,t,s){r.write(e,t)?s():n=s},u._final=function(e){r.end(),s=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(s){const e=s;s=null,e()}}))),l&&(f(t,(e=>{l=!1,e&&g(t,e),h(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(a=u._read);if(!u.push(e))return}}),u._destroy=function(e,i){e||null===c||(e=new p),a=null,n=null,s=null,null===c?i(e):(c=i,g(r,e),g(t,e))},u}t.exports=function e(t,r){if(d(t))return t;if(u(t))return x({readable:t});if(l(t))return x({writable:t});if(c(t))return x({writable:!1,readable:!1});if("function"==typeof t){const{value:e,write:s,final:i,destroy:o}=function(e){let{promise:t,resolve:r}=w();const s=new S,i=s.signal,o=e(async function*(){for(;;){const e=t;t=null;const{chunk:s,done:o,cb:a}=await e;if(n.nextTick(a),o)return;if(i.aborted)throw new p(undefined,{cause:i.reason});({promise:t,resolve:r}=w()),yield s}}(),{signal:i});return{value:o,write(e,t,n){const s=r;r=null,s({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){s.abort(),t(e)}}}(t);if(a(e))return v(T,e,{objectMode:!0,write:s,final:i,destroy:o});const c=null===e||e===undefined?undefined:e.then;if("function"==typeof c){let t;const r=k(c,e,(e=>{if(null!=e)throw new m("nully","body",e)}),(e=>{g(t,e)}));return t=new T({objectMode:!0,readable:!1,write:s,final(e){i((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:o})}throw new m("Iterable, AsyncIterable or AsyncFunction",r,e)}if(E(t))return e(t.arrayBuffer());if(a(t))return v(T,t,{objectMode:!0,writable:!1});if("object"==typeof(null===t||t===undefined?undefined:t.writable)||"object"==typeof(null===t||t===undefined?undefined:t.readable)){return x({readable:null!==t&&t!==undefined&&t.readable?u(null===t||t===undefined?undefined:t.readable)?null===t||t===undefined?undefined:t.readable:e(t.readable):undefined,writable:null!==t&&t!==undefined&&t.writable?l(null===t||t===undefined?undefined:t.writable)?null===t||t===undefined?undefined:t.writable:e(t.writable):undefined})}const s=null===t||t===undefined?undefined:t.then;if("function"==typeof s){let e;return k(s,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{g(e,t)})),e=new T({objectMode:!0,writable:!1,read(){}})}throw new h(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/duplexify.js"}],[103,{"../../ours/errors":115,"../../ours/primordials":117,"../../ours/util":118,"../validators":114,"./utils":112,"process/":146},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("process/"),{AbortError:s,codes:i}=e("../../ours/errors"),{ERR_INVALID_ARG_TYPE:o,ERR_STREAM_PREMATURE_CLOSE:a}=i,{kEmptyObject:c,once:u}=e("../../ours/util"),{validateAbortSignal:l,validateFunction:d,validateObject:f,validateBoolean:p}=e("../validators"),{Promise:h,PromisePrototypeThen:m}=e("../../ours/primordials"),{isClosed:g,isReadable:b,isReadableNodeStream:y,isReadableStream:w,isReadableFinished:v,isReadableErrored:_,isWritable:E,isWritableNodeStream:S,isWritableStream:k,isWritableFinished:T,isWritableErrored:x,isNodeStream:R,willEmitClose:j,kIsClosedPromise:O}=e("./utils");const P=()=>{};function A(e,t,r){var i,p;if(2===arguments.length?(r=t,t=c):null==t?t=c:f(t,"options"),d(r,"callback"),l(t.signal,"options.signal"),r=u(r),w(e)||k(e))return function(e,t,r){let i=!1,o=P;if(t.signal)if(o=()=>{i=!0,r.call(e,new s(undefined,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(o);else{const n=r;r=u(((...r)=>{t.signal.removeEventListener("abort",o),n.apply(e,r)})),t.signal.addEventListener("abort",o)}const a=(...t)=>{i||n.nextTick((()=>r.apply(e,t)))};return m(e[O].promise,a,a),P}(e,t,r);if(!R(e))throw new o("stream",["ReadableStream","WritableStream","Stream"],e);const h=null!==(i=t.readable)&&i!==undefined?i:y(e),A=null!==(p=t.writable)&&p!==undefined?p:S(e),M=e._writableState,I=e._readableState,N=()=>{e.writable||L()};let C=j(e)&&y(e)===h&&S(e)===A,$=T(e,!1);const L=()=>{$=!0,e.destroyed&&(C=!1),(!C||e.readable&&!h)&&(h&&!D||r.call(e))};let D=v(e,!1);const B=()=>{D=!0,e.destroyed&&(C=!1),(!C||e.writable&&!A)&&(A&&!$||r.call(e))},W=t=>{r.call(e,t)};let F=g(e);const V=()=>{F=!0;const t=x(e)||_(e);return t&&"boolean"!=typeof t?r.call(e,t):h&&!D&&y(e,!0)&&!v(e,!1)?r.call(e,new a):!A||$||T(e,!1)?void r.call(e):r.call(e,new a)},U=()=>{F=!0;const t=x(e)||_(e);if(t&&"boolean"!=typeof t)return r.call(e,t);r.call(e)},J=()=>{e.req.on("finish",L)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?A&&!M&&(e.on("end",N),e.on("close",N)):(e.on("complete",L),C||e.on("abort",V),e.req?J():e.on("request",J)),C||"boolean"!=typeof e.aborted||e.on("aborted",V),e.on("end",B),e.on("finish",L),!1!==t.error&&e.on("error",W),e.on("close",V),F?n.nextTick(V):null!==M&&M!==undefined&&M.errorEmitted||null!==I&&I!==undefined&&I.errorEmitted?C||n.nextTick(U):(h||C&&!b(e)||!$&&!1!==E(e))&&(A||C&&!E(e)||!D&&!1!==b(e))?I&&e.req&&e.aborted&&n.nextTick(U):n.nextTick(U);const H=()=>{r=P,e.removeListener("aborted",V),e.removeListener("complete",L),e.removeListener("abort",V),e.removeListener("request",J),e.req&&e.req.removeListener("finish",L),e.removeListener("end",N),e.removeListener("close",N),e.removeListener("finish",L),e.removeListener("end",B),e.removeListener("error",W),e.removeListener("close",V)};if(t.signal&&!F){const i=()=>{const n=r;H(),n.call(e,new s(undefined,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(i);else{const n=r;r=u(((...r)=>{t.signal.removeEventListener("abort",i),n.apply(e,r)})),t.signal.addEventListener("abort",i)}}return H}t.exports=A,t.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=c),null!==(r=t)&&r!==undefined&&r.cleanup&&(p(t.cleanup,"cleanup"),n=t.cleanup),new h(((r,s)=>{const i=A(e,t,(e=>{n&&i(),e?s(e):r()}))}))}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"}],[104,{"../../ours/errors":115,"../../ours/primordials":117,buffer:"buffer","process/":146},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("process/"),{PromisePrototypeThen:s,SymbolAsyncIterator:i,SymbolIterator:o}=e("../../ours/primordials"),{Buffer:a}=e("buffer"),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:u}=e("../../ours/errors").codes;t.exports=function(e,t,r){let l,d;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[i])d=!0,l=t[i]();else{if(!t||!t[o])throw new c("iterable",["Iterable"],t);d=!1,l=t[o]()}const f=new e({objectMode:!0,highWaterMark:1,...r});let p=!1;return f._read=function(){p||(p=!0,async function(){for(;;){try{const{value:e,done:t}=d?await l.next():l.next();if(t)f.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw p=!1,new u;if(f.push(t))continue;p=!1}}catch(e){f.destroy(e)}break}}())},f._destroy=function(e,t){s(async function(e){const t=e!==undefined&&null!==e,r="function"==typeof l.throw;if(t&&r){const{value:t,done:r}=await l.throw(e);if(await t,r)return}if("function"==typeof l.return){const{value:e}=await l.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},f}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/from.js"}],[105,{"../../ours/primordials":117,events:"events"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{ArrayIsArray:n,ObjectSetPrototypeOf:s}=e("../../ours/primordials"),{EventEmitter:i}=e("events");function o(e){i.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}s(o.prototype,i.prototype),s(o,i),o.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function s(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",s),e._isStdio||t&&!1===t.end||(r.on("end",c),r.on("close",u));let o=!1;function c(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){d(),0===i.listenerCount(this,"error")&&this.emit("error",e)}function d(){r.removeListener("data",n),e.removeListener("drain",s),r.removeListener("end",c),r.removeListener("close",u),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",d),r.removeListener("close",d),e.removeListener("close",d)}return a(r,"error",l),a(e,"error",l),r.on("end",d),r.on("close",d),e.on("close",d),e.emit("pipe",r),e},t.exports={Stream:o,prependListener:a}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/legacy.js"}],[106,{"../../ours/errors":115,"../../ours/primordials":117,"../validators":114,"./add-abort-signal":97,"./compose":99,"./end-of-stream":103,"./utils":112,"abort-controller":88},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=globalThis.AbortController||e("abort-controller").AbortController,{codes:{ERR_INVALID_ARG_VALUE:s,ERR_INVALID_ARG_TYPE:i,ERR_MISSING_ARGS:o,ERR_OUT_OF_RANGE:a},AbortError:c}=e("../../ours/errors"),{validateAbortSignal:u,validateInteger:l,validateObject:d}=e("../validators"),f=e("../../ours/primordials").Symbol("kWeak"),{finished:p}=e("./end-of-stream"),h=e("./compose"),{addAbortSignalNoValidate:m}=e("./add-abort-signal"),{isWritable:g,isNodeStream:b}=e("./utils"),{ArrayPrototypePush:y,MathFloor:w,Number:v,NumberIsNaN:_,Promise:E,PromiseReject:S,PromisePrototypeThen:k,Symbol:T}=e("../../ours/primordials"),x=T("kEmpty"),R=T("kEof");function j(e,t){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);null!=t&&d(t,"options"),null!=(null===t||t===undefined?undefined:t.signal)&&u(t.signal,"options.signal");let r=1;return null!=(null===t||t===undefined?undefined:t.concurrency)&&(r=w(t.concurrency)),l(r,"concurrency",1),async function*(){var s,i;const o=new n,a=this,u=[],l=o.signal,d={signal:l},f=()=>o.abort();let p,h;null!==t&&t!==undefined&&null!==(s=t.signal)&&s!==undefined&&s.aborted&&f(),null===t||t===undefined||null===(i=t.signal)||i===undefined?undefined:i.addEventListener("abort",f);let m=!1;function g(){m=!0}!async function(){try{for await(let t of a){var n;if(m)return;if(l.aborted)throw new c;try{t=e(t,d)}catch(e){t=S(e)}t!==x&&("function"==typeof(null===(n=t)||n===undefined?undefined:n.catch)&&t.catch(g),u.push(t),p&&(p(),p=null),!m&&u.length&&u.length>=r&&await new E((e=>{h=e})))}u.push(R)}catch(e){const t=S(e);k(t,undefined,g),u.push(t)}finally{var s;m=!0,p&&(p(),p=null),null===t||t===undefined||null===(s=t.signal)||s===undefined?undefined:s.removeEventListener("abort",f)}}();try{for(;;){for(;u.length>0;){const e=await u[0];if(e===R)return;if(l.aborted)throw new c;e!==x&&(yield e),u.shift(),h&&(h(),h=null)}await new E((e=>{p=e}))}}finally{o.abort(),m=!0,h&&(h(),h=null)}}.call(this)}async function O(e,t=undefined){for await(const r of P.call(this,e,t))return!0;return!1}function P(e,t){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);return j.call(this,(async function(t,r){return await e(t,r)?t:x}),t)}class A extends o{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function M(e){if(e=v(e),_(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}t.exports.streamReturningOperators={asIndexedPairs:function(e=undefined){return null!=e&&d(e,"options"),null!=(null===e||e===undefined?undefined:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!==e&&e!==undefined&&null!==(r=e.signal)&&r!==undefined&&r.aborted)throw new c({cause:e.signal.reason});yield[t++,n]}}.call(this)},drop:function(e,t=undefined){return null!=t&&d(t,"options"),null!=(null===t||t===undefined?undefined:t.signal)&&u(t.signal,"options.signal"),e=M(e),async function*(){var r;if(null!==t&&t!==undefined&&null!==(r=t.signal)&&r!==undefined&&r.aborted)throw new c;for await(const r of this){var n;if(null!==t&&t!==undefined&&null!==(n=t.signal)&&n!==undefined&&n.aborted)throw new c;e--<=0&&(yield r)}}.call(this)},filter:P,flatMap:function(e,t){const r=j.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:j,take:function(e,t=undefined){return null!=t&&d(t,"options"),null!=(null===t||t===undefined?undefined:t.signal)&&u(t.signal,"options.signal"),e=M(e),async function*(){var r;if(null!==t&&t!==undefined&&null!==(r=t.signal)&&r!==undefined&&r.aborted)throw new c;for await(const r of this){var n;if(null!==t&&t!==undefined&&null!==(n=t.signal)&&n!==undefined&&n.aborted)throw new c;if(!(e-- >0))return;yield r}}.call(this)},compose:function(e,t){if(null!=t&&d(t,"options"),null!=(null===t||t===undefined?undefined:t.signal)&&u(t.signal,"options.signal"),b(e)&&!g(e))throw new s("stream",e,"must be writable");const r=h(this,e);return null!==t&&t!==undefined&&t.signal&&m(t.signal,r),r}},t.exports.promiseReturningOperators={every:async function(e,t=undefined){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);return!await O.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);for await(const r of j.call(this,(async function(t,r){return await e(t,r),x}),t));},reduce:async function(e,t,r){var s;if("function"!=typeof e)throw new i("reducer",["Function","AsyncFunction"],e);null!=r&&d(r,"options"),null!=(null===r||r===undefined?undefined:r.signal)&&u(r.signal,"options.signal");let o=arguments.length>1;if(null!==r&&r!==undefined&&null!==(s=r.signal)&&s!==undefined&&s.aborted){const e=new c(undefined,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,l=a.signal;if(null!==r&&r!==undefined&&r.signal){const e={once:!0,[f]:this};r.signal.addEventListener("abort",(()=>a.abort()),e)}let h=!1;try{for await(const n of this){var m;if(h=!0,null!==r&&r!==undefined&&null!==(m=r.signal)&&m!==undefined&&m.aborted)throw new c;o?t=await e(t,n,{signal:l}):(t=n,o=!0)}if(!h&&!o)throw new A}finally{a.abort()}return t},toArray:async function(e){null!=e&&d(e,"options"),null!=(null===e||e===undefined?undefined:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!==e&&e!==undefined&&null!==(r=e.signal)&&r!==undefined&&r.aborted)throw new c(undefined,{cause:e.signal.reason});y(t,n)}return t},some:O,find:async function(e,t){for await(const r of P.call(this,e,t))return r;return undefined}}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/operators.js"}],[107,{"../../ours/primordials":117,"./transform":111},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{ObjectSetPrototypeOf:n}=e("../../ours/primordials");t.exports=i;const s=e("./transform");function i(e){if(!(this instanceof i))return new i(e);s.call(this,e)}n(i.prototype,s.prototype),n(i,s),i.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/passthrough.js"}],[108,{"../../ours/errors":115,"../../ours/primordials":117,"../../ours/util":118,"../validators":114,"./destroy":100,"./duplex":101,"./end-of-stream":103,"./passthrough":107,"./readable":109,"./utils":112,"abort-controller":88,"process/":146},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("process/"),{ArrayIsArray:s,Promise:i,SymbolAsyncIterator:o}=e("../../ours/primordials"),a=e("./end-of-stream"),{once:c}=e("../../ours/util"),u=e("./destroy"),l=e("./duplex"),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:f,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:h,ERR_STREAM_DESTROYED:m,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:b}=e("../../ours/errors"),{validateFunction:y,validateAbortSignal:w}=e("../validators"),{isIterable:v,isReadable:_,isReadableNodeStream:E,isNodeStream:S,isTransformStream:k,isWebStream:T,isReadableStream:x,isReadableEnded:R}=e("./utils"),j=globalThis.AbortController||e("abort-controller").AbortController;let O,P;function A(e,t,r){let n=!1;e.on("close",(()=>{n=!0}));return{destroy:t=>{n||(n=!0,u.destroyer(e,t||new m("pipe")))},cleanup:a(e,{readable:t,writable:r},(e=>{n=!e}))}}function M(t){if(v(t))return t;if(E(t))return async function*(t){P||(P=e("./readable"));yield*P.prototype[o].call(t)}(t);throw new f("val",["Readable","Iterable","AsyncIterable"],t)}async function I(e,t,r,{end:n}){let s,o=null;const c=e=>{if(e&&(s=e),o){const e=o;o=null,e()}},u=()=>new i(((e,t)=>{s?t(s):o=()=>{s?t(s):e()}}));t.on("drain",c);const l=a(t,{readable:!1},c);try{t.writableNeedDrain&&await u();for await(const r of e)t.write(r)||await u();n&&t.end(),await u(),r()}catch(e){r(s!==e?d(s,e):e)}finally{l(),t.off("drain",c)}}async function N(e,t,r,{end:n}){k(t)&&(t=t.writable);const s=t.getWriter();try{for await(const t of e)await s.ready,s.write(t).catch((()=>{}));await s.ready,n&&await s.close(),r()}catch(e){try{await s.abort(e),r(e)}catch(e){r(e)}}}function C(t,r,i){if(1===t.length&&s(t[0])&&(t=t[0]),t.length<2)throw new h("streams");const o=new j,a=o.signal,c=null===i||i===undefined?undefined:i.signal,u=[];function d(){L(new b)}let m,g;w(c,"options.signal"),null===c||c===undefined?undefined:c.addEventListener("abort",d);const y=[];let R,P=0;function C(e){L(e,0==--P)}function L(e,t){if(!e||m&&"ERR_STREAM_PREMATURE_CLOSE"!==m.code||(m=e),m||t){for(;y.length;)y.shift()(m);null===c||c===undefined?undefined:c.removeEventListener("abort",d),o.abort(),t&&(m||u.forEach((e=>e())),n.nextTick(r,m,g))}}for(let W=0;W<t.length;W++){const F=t[W],V=W<t.length-1,U=W>0,J=V||!1!==(null===i||i===undefined?undefined:i.end),H=W===t.length-1;if(S(F)){if(J){const{destroy:G,cleanup:z}=A(F,V,U);y.push(G),_(F)&&H&&u.push(z)}function q(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&C(e)}F.on("error",q),_(F)&&H&&u.push((()=>{F.removeListener("error",q)}))}if(0===W)if("function"==typeof F){if(R=F({signal:a}),!v(R))throw new p("Iterable, AsyncIterable or Stream","source",R)}else R=v(F)||E(F)||k(F)?F:l.from(F);else if("function"==typeof F){var D;if(k(R))R=M(null===(D=R)||D===undefined?undefined:D.readable);else R=M(R);if(R=F(R,{signal:a}),V){if(!v(R,!0))throw new p("AsyncIterable",`transform[${W-1}]`,R)}else{var B;O||(O=e("./passthrough"));const X=new O({objectMode:!0}),K=null===(B=R)||B===undefined?undefined:B.then;if("function"==typeof K)P++,K.call(R,(e=>{g=e,null!=e&&X.write(e),J&&X.end(),n.nextTick(C)}),(e=>{X.destroy(e),n.nextTick(C,e)}));else if(v(R,!0))P++,I(R,X,C,{end:J});else{if(!x(R)&&!k(R))throw new p("AsyncIterable or Promise","destination",R);{const Q=R.readable||R;P++,I(Q,X,C,{end:J})}}R=X;const{destroy:Z,cleanup:Y}=A(R,!1,!0);y.push(Z),H&&u.push(Y)}}else if(S(F)){if(E(R)){P+=2;const ee=$(R,F,C,{end:J});_(F)&&H&&u.push(ee)}else if(k(R)||x(R)){const te=R.readable||R;P++,I(te,F,C,{end:J})}else{if(!v(R))throw new f("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],R);P++,I(R,F,C,{end:J})}R=F}else if(T(F)){if(E(R))P++,N(M(R),F,C,{end:J});else if(x(R)||v(R))P++,N(R,F,C,{end:J});else{if(!k(R))throw new f("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],R);P++,N(R.readable,F,C,{end:J})}R=F}else R=l.from(F)}return(null!==a&&a!==undefined&&a.aborted||null!==c&&c!==undefined&&c.aborted)&&n.nextTick(d),R}function $(e,t,r,{end:s}){let i=!1;if(t.on("close",(()=>{i||r(new g)})),e.pipe(t,{end:!1}),s){function o(){i=!0,t.end()}R(e)?n.nextTick(o):e.once("end",o)}else r();return a(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),a(t,{readable:!1,writable:!0},r)}t.exports={pipelineImpl:C,pipeline:function(...e){return C(e,c(function(e){return y(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/pipeline.js"}],[109,{"../../ours/errors":115,"../../ours/primordials":117,"../../ours/util":118,"../validators":114,"./add-abort-signal":97,"./buffer_list":98,"./destroy":100,"./duplex":101,"./end-of-stream":103,"./from":104,"./legacy":105,"./state":110,buffer:"buffer",events:"events","process/":146,string_decoder:"string_decoder"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("process/"),{ArrayPrototypeIndexOf:s,NumberIsInteger:i,NumberIsNaN:o,NumberParseInt:a,ObjectDefineProperties:c,ObjectKeys:u,ObjectSetPrototypeOf:l,Promise:d,SafeSet:f,SymbolAsyncIterator:p,Symbol:h}=e("../../ours/primordials");t.exports=B,B.ReadableState=D;const{EventEmitter:m}=e("events"),{Stream:g,prependListener:b}=e("./legacy"),{Buffer:y}=e("buffer"),{addAbortSignal:w}=e("./add-abort-signal"),v=e("./end-of-stream");let _=e("../../ours/util").debuglog("stream",(e=>{_=e}));const E=e("./buffer_list"),S=e("./destroy"),{getHighWaterMark:k,getDefaultHighWaterMark:T}=e("./state"),{aggregateTwoErrors:x,codes:{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:j,ERR_OUT_OF_RANGE:O,ERR_STREAM_PUSH_AFTER_EOF:P,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:A}}=e("../../ours/errors"),{validateObject:M}=e("../validators"),I=h("kPaused"),{StringDecoder:N}=e("string_decoder"),C=e("./from");l(B.prototype,g.prototype),l(B,g);const $=()=>{},{errorOrDestroy:L}=S;function D(t,r,n){"boolean"!=typeof n&&(n=r instanceof e("./duplex")),this.objectMode=!(!t||!t.objectMode),n&&(this.objectMode=this.objectMode||!(!t||!t.readableObjectMode)),this.highWaterMark=t?k(this,t,"readableHighWaterMark",n):T(!1),this.buffer=new E,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[I]=null,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new N(t.encoding),this.encoding=t.encoding)}function B(t){if(!(this instanceof B))return new B(t);const r=this instanceof e("./duplex");this._readableState=new D(t,this,r),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!r&&w(t.signal,this)),g.call(this,t),S.construct(this,(()=>{this._readableState.needReadable&&H(this,this._readableState)}))}function W(e,t,r,n){_("readableAddChunk",t);const s=e._readableState;let i;if(s.objectMode||("string"==typeof t?(r=r||s.defaultEncoding,s.encoding!==r&&(n&&s.encoding?t=y.from(t,r).toString(s.encoding):(t=y.from(t,r),r=""))):t instanceof y?r="":g._isUint8Array(t)?(t=g._uint8ArrayToBuffer(t),r=""):null!=t&&(i=new R("chunk",["string","Buffer","Uint8Array"],t))),i)L(e,i);else if(null===t)s.reading=!1,function(e,t){if(_("onEofChunk"),t.ended)return;if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?U(e):(t.needReadable=!1,t.emittedReadable=!0,J(e))}(e,s);else if(s.objectMode||t&&t.length>0)if(n)if(s.endEmitted)L(e,new A);else{if(s.destroyed||s.errored)return!1;F(e,s,t,!0)}else if(s.ended)L(e,new P);else{if(s.destroyed||s.errored)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?F(e,s,t,!1):H(e,s)):F(e,s,t,!1)}else n||(s.reading=!1,H(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function F(e,t,r,n){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&U(e)),H(e,t)}B.prototype.destroy=S.destroy,B.prototype._undestroy=S.undestroy,B.prototype._destroy=function(e,t){t(e)},B.prototype[m.captureRejectionSymbol]=function(e){this.destroy(e)},B.prototype.push=function(e,t){return W(this,e,t,!1)},B.prototype.unshift=function(e,t){return W(this,e,t,!0)},B.prototype.isPaused=function(){const e=this._readableState;return!0===e[I]||!1===e.flowing},B.prototype.setEncoding=function(e){const t=new N(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this};function V(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:o(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function U(e){const t=e._readableState;_("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(_("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(J,e))}function J(e){const t=e._readableState;_("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,K(e)}function H(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(q,e,t))}function q(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){const r=t.length;if(_("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function G(e){const t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[I]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function z(e){_("readable nexttick read 0"),e.read(0)}function X(e,t){_("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),K(e),t.flowing&&!t.reading&&e.read(0)}function K(e){const t=e._readableState;for(_("flow",t.flowing);t.flowing&&null!==e.read(););}function Z(e,t){"function"!=typeof e.read&&(e=B.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=$;function s(t){this===e?(n(),n=$):n=t}e.on("readable",s);const i=v(e,{writable:!1},(e=>{r=e?x(r,e):null,n(),n=$}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new d(s)}}}catch(e){throw r=x(r,e),r}finally{!r&&!1===(null===t||t===undefined?undefined:t.destroyOnReturn)||r!==undefined&&!e._readableState.autoDestroy?(e.off("readable",s),i()):S.destroyer(e,null)}}(e,t);return r.stream=e,r}function Y(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Q(e){const t=e._readableState;_("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ee,t,e))}function ee(e,t){if(_("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(te,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function te(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let re;function ne(){return re===undefined&&(re={}),re}B.prototype.read=function(e){_("read",e),e===undefined?e=NaN:i(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new O("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return _("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Q(this):U(this),null;if(0===(e=V(e,t))&&t.ended)return 0===t.length&&Q(this),null;let n,s=t.needReadable;if(_("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&(s=!0,_("length less than watermark",s)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)s=!1,_("reading, ended or constructing",s);else if(s){_("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0);try{this._read(t.highWaterMark)}catch(e){L(this,e)}t.sync=!1,t.reading||(e=V(r,t))}return n=e>0?Y(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Q(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},B.prototype._read=function(e){throw new j("_read()")},B.prototype.pipe=function(e,t){const r=this,s=this._readableState;1===s.pipes.length&&(s.multiAwaitDrain||(s.multiAwaitDrain=!0,s.awaitDrainWriters=new f(s.awaitDrainWriters?[s.awaitDrainWriters]:[]))),s.pipes.push(e),_("pipe count=%d opts=%j",s.pipes.length,t);const i=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?a:g;function o(t,n){_("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,function(){_("cleanup"),e.removeListener("close",h),e.removeListener("finish",m),c&&e.removeListener("drain",c);e.removeListener("error",p),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",g),r.removeListener("data",d),u=!0,c&&s.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&c()}())}function a(){_("onend"),e.end()}let c;s.endEmitted?n.nextTick(i):r.once("end",i),e.on("unpipe",o);let u=!1;function l(){u||(1===s.pipes.length&&s.pipes[0]===e?(_("false write response, pause",0),s.awaitDrainWriters=e,s.multiAwaitDrain=!1):s.pipes.length>1&&s.pipes.includes(e)&&(_("false write response, pause",s.awaitDrainWriters.size),s.awaitDrainWriters.add(e)),r.pause()),c||(c=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(_("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(_("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",c))}function d(t){_("ondata");const r=e.write(t);_("dest.write",r),!1===r&&l()}function p(t){if(_("onerror",t),g(),e.removeListener("error",p),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?L(e,t):e.emit("error",t)}}function h(){e.removeListener("finish",m),g()}function m(){_("onfinish"),e.removeListener("close",h),g()}function g(){_("unpipe"),r.unpipe(e)}return r.on("data",d),b(e,"error",p),e.once("close",h),e.once("finish",m),e.emit("pipe",r),!0===e.writableNeedDrain?s.flowing&&l():s.flowing||(_("pipe resume"),r.resume()),e},B.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}const r=s(t.pipes,e);return-1===r||(t.pipes.splice(r,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},B.prototype.on=function(e,t){const r=g.prototype.on.call(this,e,t),s=this._readableState;return"data"===e?(s.readableListening=this.listenerCount("readable")>0,!1!==s.flowing&&this.resume()):"readable"===e&&(s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,_("on readable",s.length,s.reading),s.length?U(this):s.reading||n.nextTick(z,this))),r},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(e,t){const r=g.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(G,this),r},B.prototype.off=B.prototype.removeListener,B.prototype.removeAllListeners=function(e){const t=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&e!==undefined||n.nextTick(G,this),t},B.prototype.resume=function(){const e=this._readableState;return e.flowing||(_("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(X,e,t))}(this,e)),e[I]=!1,this},B.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[I]=!0,this},B.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{L(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let t=1;t<r.length;t++){const n=r[t];this[n]===undefined&&"function"==typeof e[n]&&(this[n]=e[n].bind(e))}return this},B.prototype[p]=function(){return Z(this)},B.prototype.iterator=function(e){return e!==undefined&&M(e,"options"),Z(this,e)},c(B.prototype,{readable:{__proto__:null,get(){const e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),c(D.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[I]},set(e){this[I]=!!e}}}),B._fromList=Y,B.from=function(e,t){return C(B,e,t)},B.fromWeb=function(e,t){return ne().newStreamReadableFromReadableStream(e,t)},B.toWeb=function(e,t){return ne().newReadableStreamFromStreamReadable(e,t)},B.wrap=function(e,t){var r,n;return new B({objectMode:null===(r=null!==(n=e.readableObjectMode)&&n!==undefined?n:e.objectMode)||r===undefined||r,...t,destroy(t,r){S.destroyer(e,t),r(t)}}).wrap(e)}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/readable.js"}],[110,{"../../ours/errors":115,"../../ours/primordials":117},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{MathFloor:n,NumberIsInteger:s}=e("../../ours/primordials"),{ERR_INVALID_ARG_VALUE:i}=e("../../ours/errors").codes;function o(e){return e?16:16384}t.exports={getHighWaterMark:function(e,t,r,a){const c=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=c){if(!s(c)||c<0){throw new i(a?`options.${r}`:"options.highWaterMark",c)}return n(c)}return o(e.objectMode)},getDefaultHighWaterMark:o}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/state.js"}],[111,{"../../ours/errors":115,"../../ours/primordials":117,"./duplex":101,"./state":110},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{ObjectSetPrototypeOf:n,Symbol:s}=e("../../ours/primordials");t.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:i}=e("../../ours/errors").codes,o=e("./duplex"),{getHighWaterMark:a}=e("./state");n(u.prototype,o.prototype),n(u,o);const c=s("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),o.call(this,e),this._readableState.sync=!1,this[c]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function l(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function d(){this._final!==l&&l.call(this)}u.prototype._final=l,u.prototype._transform=function(e,t,r){throw new i("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,s=this._writableState,i=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),s.ended||i===n.length||n.length<n.highWaterMark?r():this[c]=r)}))},u.prototype._read=function(){if(this[c]){const e=this[c];this[c]=null,e()}}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/transform.js"}],[112,{"../../ours/primordials":117},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{Symbol:n,SymbolAsyncIterator:s,SymbolIterator:i,SymbolFor:o}=e("../../ours/primordials"),a=n("kDestroyed"),c=n("kIsErrored"),u=n("kIsReadable"),l=n("kIsDisturbed"),d=o("nodejs.webstream.isClosedPromise"),f=o("nodejs.webstream.controllerErrorFunction");function p(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||r===undefined?undefined:r.readable)||e._writableState&&!e._readableState)}function h(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||t===undefined?undefined:t.writable))}function m(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||m(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function b(e){return!(!e||m(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function y(e){return!(!e||m(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function w(e){if(!m(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[a]||null!==n&&n!==undefined&&n.destroyed)}function v(e){if(!h(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null===t||t===undefined||!t.errored)&&("boolean"!=typeof(null===t||t===undefined?undefined:t.ended)?null:t.ended)}function _(e,t){if(!p(e))return null;const r=e._readableState;return(null===r||r===undefined||!r.errored)&&("boolean"!=typeof(null===r||r===undefined?undefined:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function E(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null===e||e===undefined?undefined:e.readable)?null:!w(e)&&(p(e)&&e.readable&&!_(e))}function S(e){return"boolean"!=typeof(null===e||e===undefined?undefined:e.writable)?null:!w(e)&&(h(e)&&e.writable&&!v(e))}function k(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function T(e){return"boolean"==typeof e._sent100&&k(e)}t.exports={kDestroyed:a,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[l])&&t!==undefined?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:l,isErrored:function(e){var t,r,n,s,i,o,a,u,l,d;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(s=null!==(i=null!==(o=e[c])&&o!==undefined?o:e.readableErrored)&&i!==undefined?i:e.writableErrored)&&s!==undefined?s:null===(a=e._readableState)||a===undefined?undefined:a.errorEmitted)&&n!==undefined?n:null===(u=e._writableState)||u===undefined?undefined:u.errorEmitted)&&r!==undefined?r:null===(l=e._readableState)||l===undefined?undefined:l.errored)&&t!==undefined?t:null===(d=e._writableState)||d===undefined?undefined:d.errored))},kIsErrored:c,isReadable:E,kIsReadable:u,kIsClosedPromise:d,kControllerErrorFunction:f,isClosed:function(e){if(!m(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null===t||t===undefined?undefined:t.closed)||"boolean"==typeof(null===r||r===undefined?undefined:r.closed)?(null===t||t===undefined?undefined:t.closed)||(null===r||r===undefined?undefined:r.closed):"boolean"==typeof e._closed&&k(e)?e._closed:null},isDestroyed:w,isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return m(e)?!!w(e)||(!1===(null===t||t===undefined?undefined:t.readable)||!E(e))&&(!1===(null===t||t===undefined?undefined:t.writable)||!S(e)):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[s]:!1===t?"function"==typeof e[i]:"function"==typeof e[s]||"function"==typeof e[i])},isReadableNodeStream:p,isReadableStream:g,isReadableEnded:function(e){if(!p(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null===t||t===undefined?undefined:t.ended)?null:t.ended)},isReadableFinished:_,isReadableErrored:function(e){var t,r;return m(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||r===undefined?undefined:r.errored)&&t!==undefined?t:null:null},isNodeStream:m,isWebStream:function(e){return g(e)||b(e)||y(e)},isWritable:S,isWritableNodeStream:h,isWritableStream:b,isWritableEnded:v,isWritableFinished:function(e,t){if(!h(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null===r||r===undefined||!r.errored)&&("boolean"!=typeof(null===r||r===undefined?undefined:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return m(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||r===undefined?undefined:r.errored)&&t!==undefined?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&(null===(t=e.req)||t===undefined?undefined:t.upgradeOrConnect)===undefined},isServerResponse:T,willEmitClose:function(e){if(!m(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&T(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:y}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/utils.js"}],[113,{"../../ours/errors":115,"../../ours/primordials":117,"./add-abort-signal":97,"./destroy":100,"./duplex":101,"./legacy":105,"./state":110,buffer:"buffer",events:"events","process/":146},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("process/"),{ArrayPrototypeSlice:s,Error:i,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:a,ObjectDefineProperties:c,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:l,Symbol:d,SymbolHasInstance:f}=e("../../ours/primordials");t.exports=N,N.WritableState=M;const{EventEmitter:p}=e("events"),h=e("./legacy").Stream,{Buffer:m}=e("buffer"),g=e("./destroy"),{addAbortSignal:b}=e("./add-abort-signal"),{getHighWaterMark:y,getDefaultHighWaterMark:w}=e("./state"),{ERR_INVALID_ARG_TYPE:v,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:E,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:k,ERR_STREAM_ALREADY_FINISHED:T,ERR_STREAM_NULL_VALUES:x,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:j}=e("../../ours/errors").codes,{errorOrDestroy:O}=g;function P(){}u(N.prototype,h.prototype),u(N,h);const A=d("kOnFinished");function M(t,r,n){"boolean"!=typeof n&&(n=r instanceof e("./duplex")),this.objectMode=!(!t||!t.objectMode),n&&(this.objectMode=this.objectMode||!(!t||!t.writableObjectMode)),this.highWaterMark=t?y(this,t,"writableHighWaterMark",n):w(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const s=!(!t||!1!==t.decodeStrings);this.decodeStrings=!s,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=D.bind(undefined,r),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,I(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[A]=[]}function I(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function N(t){const r=this instanceof e("./duplex");if(!r&&!o(N,this))return new N(t);this._writableState=new M(t,this,r),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&b(t.signal,this)),h.call(this,t),g.construct(this,(()=>{const e=this._writableState;e.writing||V(this,e),H(this,e)}))}function C(e,t,r,s){const i=e._writableState;if("function"==typeof r)s=r,r=i.defaultEncoding;else{if(r){if("buffer"!==r&&!m.isEncoding(r))throw new j(r)}else r=i.defaultEncoding;"function"!=typeof s&&(s=P)}if(null===t)throw new x;if(!i.objectMode)if("string"==typeof t)!1!==i.decodeStrings&&(t=m.from(t,r),r="buffer");else if(t instanceof m)r="buffer";else{if(!h._isUint8Array(t))throw new v("chunk",["string","Buffer","Uint8Array"],t);t=h._uint8ArrayToBuffer(t),r="buffer"}let o;return i.ending?o=new R:i.destroyed&&(o=new k("write")),o?(n.nextTick(s,o),O(e,o,!0),o):(i.pendingcb++,function(e,t,r,n,s){const i=t.objectMode?1:r.length;t.length+=i;const o=t.length<t.highWaterMark;o||(t.needDrain=!0);t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:r,encoding:n,callback:s}),t.allBuffers&&"buffer"!==n&&(t.allBuffers=!1),t.allNoop&&s!==P&&(t.allNoop=!1)):(t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,e._write(r,n,t.onwrite),t.sync=!1);return o&&!t.errored&&!t.destroyed}(e,i,t,r,s))}function $(e,t,r,n,s,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new k("write")):r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function L(e,t,r,n){--t.pendingcb,n(r),F(t),O(e,r)}function D(e,t){const r=e._writableState,s=r.sync,i=r.writecb;"function"==typeof i?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||(r.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),s?n.nextTick(L,e,r,t,i):L(e,r,t,i)):(r.buffered.length>r.bufferedIndex&&V(e,r),s?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===i?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:i,stream:e,state:r},n.nextTick(B,r.afterWriteTickInfo)):W(e,r,1,i))):O(e,new E)}function B({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,W(e,t,r,n)}function W(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&F(t),H(e,t)}function F(e){if(e.writing)return;for(let r=e.bufferedIndex;r<e.buffered.length;++r){var t;const{chunk:n,callback:s}=e.buffered[r],i=e.objectMode?1:n.length;e.length-=i,s(null!==(t=e.errored)&&t!==undefined?t:new k("write"))}const r=e[A].splice(0);for(let t=0;t<r.length;t++){var n;r[t](null!==(n=e.errored)&&n!==undefined?n:new k("end"))}I(e)}function V(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;const{buffered:r,bufferedIndex:n,objectMode:i}=t,o=r.length-n;if(!o)return;let a=n;if(t.bufferProcessing=!0,o>1&&e._writev){t.pendingcb-=o-1;const n=t.allNoop?P:e=>{for(let t=a;t<r.length;++t)r[t].callback(e)},i=t.allNoop&&0===a?r:s(r,a);i.allBuffers=t.allBuffers,$(e,t,!0,t.length,i,"",n),I(t)}else{do{const{chunk:n,encoding:s,callback:o}=r[a];r[a++]=null;$(e,t,!1,i?1:n.length,n,s,o)}while(a<r.length&&!t.writing);a===r.length?I(t):a>256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function U(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function J(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function s(s){if(r)O(e,null!==s&&s!==undefined?s:E());else if(r=!0,t.pendingcb--,s){const r=t[A].splice(0);for(let e=0;e<r.length;e++)r[e](s);O(e,s,t.sync)}else U(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,n.nextTick(q,e,t))}t.sync=!0,t.pendingcb++;try{e._final(s)}catch(e){s(e)}t.sync=!1}(e,t)))}function H(e,t,r){U(t)&&(J(e,t),0===t.pendingcb&&(r?(t.pendingcb++,n.nextTick(((e,t)=>{U(t)?q(e,t):t.pendingcb--}),e,t)):U(t)&&(t.pendingcb++,q(e,t))))}function q(e,t){t.pendingcb--,t.finished=!0;const r=t[A].splice(0);for(let e=0;e<r.length;e++)r[e]();if(e.emit("finish"),t.autoDestroy){const t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||!1===t.readable))&&e.destroy()}}M.prototype.getBuffer=function(){return s(this.buffered,this.bufferedIndex)},a(M.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),a(N,f,{__proto__:null,value:function(e){return!!o(this,e)||this===N&&(e&&e._writableState instanceof M)}}),N.prototype.pipe=function(){O(this,new S)},N.prototype.write=function(e,t,r){return!0===C(this,e,t,r)},N.prototype.cork=function(){this._writableState.corked++},N.prototype.uncork=function(){const e=this._writableState;e.corked&&(e.corked--,e.writing||V(this,e))},N.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=l(e)),!m.isEncoding(e))throw new j(e);return this._writableState.defaultEncoding=e,this},N.prototype._write=function(e,t,r){if(!this._writev)throw new _("_write()");this._writev([{chunk:e,encoding:t}],r)},N.prototype._writev=null,N.prototype.end=function(e,t,r){const s=this._writableState;let o;if("function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined){const r=C(this,e,t);r instanceof i&&(o=r)}return s.corked&&(s.corked=1,this.uncork()),o||(s.errored||s.ending?s.finished?o=new T("end"):s.destroyed&&(o=new k("end")):(s.ending=!0,H(this,s,!0),s.ended=!0)),"function"==typeof r&&(o||s.finished?n.nextTick(r,o):s[A].push(r)),this},c(N.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){const e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const e=this._writableState;return!!e&&(!e.destroyed&&!e.ending&&e.needDrain)}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const G=g.destroy;let z;function X(){return z===undefined&&(z={}),z}N.prototype.destroy=function(e,t){const r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[A].length)&&n.nextTick(F,r),G.call(this,e,t),this},N.prototype._undestroy=g.undestroy,N.prototype._destroy=function(e,t){t(e)},N.prototype[p.captureRejectionSymbol]=function(e){this.destroy(e)},N.fromWeb=function(e,t){return X().newStreamWritableFromWritableStream(e,t)},N.toWeb=function(e){return X().newWritableStreamFromStreamWritable(e)}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/streams/writable.js"}],[114,{"../ours/errors":115,"../ours/primordials":117,"../ours/util":118},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{ArrayIsArray:n,ArrayPrototypeIncludes:s,ArrayPrototypeJoin:i,ArrayPrototypeMap:o,NumberIsInteger:a,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:l,NumberParseInt:d,ObjectPrototypeHasOwnProperty:f,RegExpPrototypeExec:p,String:h,StringPrototypeToUpperCase:m,StringPrototypeTrim:g}=e("../ours/primordials"),{hideStackFrames:b,codes:{ERR_SOCKET_BAD_PORT:y,ERR_INVALID_ARG_TYPE:w,ERR_INVALID_ARG_VALUE:v,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:E}}=e("../ours/errors"),{normalizeEncoding:S}=e("../ours/util"),{isAsyncFunction:k,isArrayBufferView:T}=e("../ours/util").types,x={};const R=/^[0-7]+$/;const j=b(((e,t,r=l,n=u)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(e<r||e>n)throw new _(t,`>= ${r} && <= ${n}`,e)})),O=b(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(e<r||e>n)throw new _(t,`>= ${r} && <= ${n}`,e)})),P=b(((e,t,r=!1)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!a(e))throw new _(t,"an integer",e);const n=r?1:0,s=4294967295;if(e<n||e>s)throw new _(t,`>= ${n} && <= ${s}`,e)}));function A(e,t){if("string"!=typeof e)throw new w(t,"string",e)}const M=b(((e,t,r)=>{if(!s(r,e)){const n=i(o(r,(e=>"string"==typeof e?`'${e}'`:h(e))),", ");throw new v(t,e,"must be one of: "+n)}}));function I(e,t){if("boolean"!=typeof e)throw new w(t,"boolean",e)}function N(e,t,r){return null!=e&&f(e,t)?e[t]:r}const C=b(((e,t,r=null)=>{const s=N(r,"allowArray",!1),i=N(r,"allowFunction",!1);if(!N(r,"nullable",!1)&&null===e||!s&&n(e)||"object"!=typeof e&&(!i||"function"!=typeof e))throw new w(t,"Object",e)})),$=b(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new w(t,"a dictionary",e)})),L=b(((e,t,r=0)=>{if(!n(e))throw new w(t,"Array",e);if(e.length<r){throw new v(t,e,`must be longer than ${r}`)}}));const D=b(((e,t="buffer")=>{if(!T(e))throw new w(t,["Buffer","TypedArray","DataView"],e)}));const B=b(((e,t)=>{if(e!==undefined&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new w(t,"AbortSignal",e)})),W=b(((e,t)=>{if("function"!=typeof e)throw new w(t,"Function",e)})),F=b(((e,t)=>{if("function"!=typeof e||k(e))throw new w(t,"Function",e)})),V=b(((e,t)=>{if(e!==undefined)throw new w(t,"undefined",e)}));const U=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function J(e,t){if(void 0===e||!p(U,e))throw new v(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}t.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===p(R,e))throw new v(t,e,"must be a 32-bit unsigned integer or an octal string");e=d(e,8)}return P(e,t),e},validateArray:L,validateStringArray:function(e,t){L(e,t);for(let r=0;r<e.length;r++)A(e[r],`${t}[${r}]`)},validateBooleanArray:function(e,t){L(e,t);for(let r=0;r<e.length;r++)I(e[r],`${t}[${r}]`)},validateBoolean:I,validateBuffer:D,validateDictionary:$,validateEncoding:function(e,t){const r=S(t),n=e.length;if("hex"===r&&n%2!=0)throw new v("encoding",t,`is invalid for data of length ${n}`)},validateFunction:W,validateInt32:O,validateInteger:j,validateNumber:function(e,t,r=undefined,n){if("number"!=typeof e)throw new w(t,"number",e);if(null!=r&&e<r||null!=n&&e>n||(null!=r||null!=n)&&c(e))throw new _(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:C,validateOneOf:M,validatePlainFunction:F,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new y(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(A(e,t),x[e]===undefined){if(x[m(e)]!==undefined)throw new E(e+" (signals must use all capital letters)");throw new E(e)}},validateString:A,validateUint32:P,validateUndefined:V,validateUnion:function(e,t,r){if(!s(r,e))throw new w(t,`('${i(r,"|")}')`,e)},validateAbortSignal:B,validateLinkHeaderValue:function(e){if("string"==typeof e)return J(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n<t;n++){const s=e[n];J(s,"hints"),r+=s,n!==t-1&&(r+=", ")}return r}throw new v("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/internal/validators.js"}],[115,{"./util":118},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{format:n,inspect:s,AggregateError:i}=e("./util"),o=globalThis.AggregateError||i,a=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,l={};function d(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function f(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function p(e,t,r){r||(r=Error);class s extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return d(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const s=(t.match(/%[dfijoOs]/g)||[]).length;return d(s===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${s}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(s.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),s.prototype.code=e,s.prototype[a]=!0,l[e]=s}function h(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class m extends Error{constructor(e="The operation was aborted",t=undefined){if(t!==undefined&&"object"!=typeof t)throw new l.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}p("ERR_ASSERTION","%s",Error),p("ERR_INVALID_ARG_TYPE",((e,t,r)=>{d("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const i=[],o=[],a=[];for(const e of t)d("string"==typeof e,"All expected entries have to be of type string"),c.includes(e)?i.push(e.toLowerCase()):u.test(e)?o.push(e):(d("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(o.length>0){const e=i.indexOf("object");-1!==e&&(i.splice(i,e,1),o.push("Object"))}if(i.length>0){switch(i.length){case 1:n+=`of type ${i[0]}`;break;case 2:n+=`one of type ${i[0]} or ${i[1]}`;break;default:{const e=i.pop();n+=`one of type ${i.join(", ")}, or ${e}`}}(o.length>0||a.length>0)&&(n+=" or ")}if(o.length>0){switch(o.length){case 1:n+=`an instance of ${o[0]}`;break;case 2:n+=`an instance of ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`an instance of ${o.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var l;if(null!==(l=r.constructor)&&l!==undefined&&l.name)n+=`. Received an instance of ${r.constructor.name}`;else{n+=`. Received ${s(r,{depth:-1})}`}}else{let e=s(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),p("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=s(t);n.length>128&&(n=n.slice(0,128)+"...");return`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),p("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!==r&&r!==undefined&&null!==(n=r.constructor)&&n!==undefined&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),p("ERR_MISSING_ARGS",((...e)=>{let t;d(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),p("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return d(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=f(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=f(n)),n+="n"):n=s(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),p("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),p("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),p("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),p("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),p("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),p("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),p("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),p("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),p("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),p("ERR_STREAM_WRITE_AFTER_END","write after end",Error),p("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exports={AbortError:m,aggregateTwoErrors:h((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new o([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:h,codes:l}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/ours/errors.js"}],[116,{"../stream":119,"../stream/promises":120,stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("stream");if(n&&"disable"===process.env.READABLE_STREAM){const e=n.promises;t.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,t.exports._isUint8Array=n._isUint8Array,t.exports.isDisturbed=n.isDisturbed,t.exports.isErrored=n.isErrored,t.exports.isReadable=n.isReadable,t.exports.Readable=n.Readable,t.exports.Writable=n.Writable,t.exports.Duplex=n.Duplex,t.exports.Transform=n.Transform,t.exports.PassThrough=n.PassThrough,t.exports.addAbortSignal=n.addAbortSignal,t.exports.finished=n.finished,t.exports.destroy=n.destroy,t.exports.pipeline=n.pipeline,t.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>e}),t.exports.Stream=n.Stream}else{const r=e("../stream"),n=e("../stream/promises"),s=r.Readable.destroy;t.exports=r.Readable,t.exports._uint8ArrayToBuffer=r._uint8ArrayToBuffer,t.exports._isUint8Array=r._isUint8Array,t.exports.isDisturbed=r.isDisturbed,t.exports.isErrored=r.isErrored,t.exports.isReadable=r.isReadable,t.exports.Readable=r.Readable,t.exports.Writable=r.Writable,t.exports.Duplex=r.Duplex,t.exports.Transform=r.Transform,t.exports.PassThrough=r.PassThrough,t.exports.addAbortSignal=r.addAbortSignal,t.exports.finished=r.finished,t.exports.destroy=r.destroy,t.exports.destroy=s,t.exports.pipeline=r.pipeline,t.exports.compose=r.compose,Object.defineProperty(r,"promises",{configurable:!0,enumerable:!0,get:()=>n}),t.exports.Stream=r.Stream}t.exports.default=t.exports}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/ours/index.js"}],[117,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error:Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number:Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise:Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String:String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol:Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Uint8Array:Uint8Array}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/ours/primordials.js"}],[118,{buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("buffer"),s=Object.getPrototypeOf((async function(){})).constructor,i=globalThis.Blob||n.Blob,o=void 0!==i?function(e){return e instanceof i}:function(e){return!1};class a extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r<e.length;r++)t+=` ${e[r].stack}\n`;super(t),this.name="AggregateError",this.errors=e}}t.exports={AggregateError:a,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...r){t||(t=!0,e.apply(this,r))}},createDeferredPromise:function(){let e,t;return{promise:new Promise(((r,n)=>{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();if("f"===r)return n.toFixed(6);if("j"===r)return JSON.stringify(n);if("s"===r&&"object"==typeof n){return`${n.constructor!==Object?n.constructor.name:""} {}`.trim()}return n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof s,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:o},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/ours/util.js"}],[119,{"./internal/streams/add-abort-signal":97,"./internal/streams/compose":99,"./internal/streams/destroy":100,"./internal/streams/duplex":101,"./internal/streams/end-of-stream":103,"./internal/streams/legacy":105,"./internal/streams/operators":106,"./internal/streams/passthrough":107,"./internal/streams/pipeline":108,"./internal/streams/readable":109,"./internal/streams/transform":111,"./internal/streams/utils":112,"./internal/streams/writable":113,"./ours/errors":115,"./ours/primordials":117,"./ours/util":118,"./stream/promises":120,buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{Buffer:n}=e("buffer"),{ObjectDefineProperty:s,ObjectKeys:i,ReflectApply:o}=e("./ours/primordials"),{promisify:{custom:a}}=e("./ours/util"),{streamReturningOperators:c,promiseReturningOperators:u}=e("./internal/streams/operators"),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=e("./ours/errors"),d=e("./internal/streams/compose"),{pipeline:f}=e("./internal/streams/pipeline"),{destroyer:p}=e("./internal/streams/destroy"),h=e("./internal/streams/end-of-stream"),m=e("./stream/promises"),g=e("./internal/streams/utils"),b=t.exports=e("./internal/streams/legacy").Stream;b.isDisturbed=g.isDisturbed,b.isErrored=g.isErrored,b.isReadable=g.isReadable,b.Readable=e("./internal/streams/readable");for(const w of i(c)){const v=c[w];function _(...e){if(new.target)throw l();return b.Readable.from(o(v,this,e))}s(_,"name",{__proto__:null,value:v.name}),s(_,"length",{__proto__:null,value:v.length}),s(b.Readable.prototype,w,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}for(const E of i(u)){const S=u[E];function k(...e){if(new.target)throw l();return o(S,this,e)}s(k,"name",{__proto__:null,value:S.name}),s(k,"length",{__proto__:null,value:S.length}),s(b.Readable.prototype,E,{__proto__:null,value:k,enumerable:!1,configurable:!0,writable:!0})}b.Writable=e("./internal/streams/writable"),b.Duplex=e("./internal/streams/duplex"),b.Transform=e("./internal/streams/transform"),b.PassThrough=e("./internal/streams/passthrough"),b.pipeline=f;const{addAbortSignal:y}=e("./internal/streams/add-abort-signal");b.addAbortSignal=y,b.finished=h,b.destroy=p,b.compose=d,s(b,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>m}),s(f,a,{__proto__:null,enumerable:!0,get:()=>m.pipeline}),s(h,a,{__proto__:null,enumerable:!0,get:()=>m.finished}),b.Stream=b,b._isUint8Array=function(e){return e instanceof Uint8Array},b._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/stream.js"}],[120,{"../../lib/stream.js":119,"../internal/streams/end-of-stream":103,"../internal/streams/pipeline":108,"../internal/streams/utils":112,"../ours/primordials":117},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{ArrayPrototypePop:n,Promise:s}=e("../ours/primordials"),{isIterable:i,isNodeStream:o,isWebStream:a}=e("../internal/streams/utils"),{pipelineImpl:c}=e("../internal/streams/pipeline"),{finished:u}=e("../internal/streams/end-of-stream");e("../../lib/stream.js"),t.exports={finished:u,pipeline:function(...e){return new s(((t,r)=>{let s,u;const l=e[e.length-1];if(l&&"object"==typeof l&&!o(l)&&!i(l)&&!a(l)){const t=n(e);s=t.signal,u=t.end}c(e,((e,n)=>{e?r(e):t(n)}),{signal:s,end:u})}))}}}}},{package:"@metamask/providers>extension-port-stream>readable-stream",file:"../../node_modules/extension-port-stream/node_modules/readable-stream/lib/stream/promises.js"}],[121,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(s=n;0!=s--;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;0!=s--;){var o=i[s];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}}}},{package:"eslint>fast-deep-equal",file:"../../node_modules/fast-deep-equal/index.js"}],[122,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=c,c.default=c,c.stable=f,c.stableStringify=f;var n="[...]",s="[Circular]",i=[],o=[];function a(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function c(e,t,r,n){var s;void 0===n&&(n=a()),l(e,"",0,[],undefined,0,n);try{s=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,h(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var c=i.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function u(e,t,r,n){var s=Object.getOwnPropertyDescriptor(n,r);s.get!==undefined?s.configurable?(Object.defineProperty(n,r,{value:e}),i.push([n,r,t,s])):o.push([t,r,e]):(n[r]=e,i.push([n,r,t]))}function l(e,t,r,i,o,a,c){var d;if(a+=1,"object"==typeof e&&null!==e){for(d=0;d<i.length;d++)if(i[d]===e)return void u(s,e,t,o);if(void 0!==c.depthLimit&&a>c.depthLimit)return void u(n,e,t,o);if(void 0!==c.edgesLimit&&r+1>c.edgesLimit)return void u(n,e,t,o);if(i.push(e),Array.isArray(e))for(d=0;d<e.length;d++)l(e[d],d,d,i,e,a,c);else{var f=Object.keys(e);for(d=0;d<f.length;d++){var p=f[d];l(e[p],p,d,i,e,a,c)}}i.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function f(e,t,r,n){void 0===n&&(n=a());var s,c=p(e,"",0,[],undefined,0,n)||e;try{s=0===o.length?JSON.stringify(c,t,r):JSON.stringify(c,h(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var u=i.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function p(e,t,r,o,a,c,l){var f;if(c+=1,"object"==typeof e&&null!==e){for(f=0;f<o.length;f++)if(o[f]===e)return void u(s,e,t,a);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==l.depthLimit&&c>l.depthLimit)return void u(n,e,t,a);if(void 0!==l.edgesLimit&&r+1>l.edgesLimit)return void u(n,e,t,a);if(o.push(e),Array.isArray(e))for(f=0;f<e.length;f++)p(e[f],f,f,o,e,c,l);else{var h={},m=Object.keys(e).sort(d);for(f=0;f<m.length;f++){var g=m[f];p(e[g],g,f,o,e,c,l),h[g]=e[g]}if(void 0===a)return h;i.push([a,t,e]),a[t]=h}o.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(o.length>0)for(var n=0;n<o.length;n++){var s=o[n];if(s[1]===t&&s[0]===r){r=s[2],o.splice(n,1);break}}return e.call(this,t,r)}}}}},{package:"@metamask/rpc-errors>fast-safe-stringify",file:"../../node_modules/fast-safe-stringify/index.js"}],[123,{"./validator":125,"./xmlbuilder/json2xml":126,"./xmlparser/XMLParser":131},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./validator"),s=e("./xmlparser/XMLParser"),i=e("./xmlbuilder/json2xml");t.exports={XMLParser:s,XMLValidator:n,XMLBuilder:i}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/fxp.js"}],[124,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",s="["+n+"]["+(n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",i=new RegExp("^"+s+"$");r.isExist=function(e){return void 0!==e},r.isEmptyObject=function(e){return 0===Object.keys(e).length},r.merge=function(e,t,r){if(t){const n=Object.keys(t),s=n.length;for(let i=0;i<s;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},r.getValue=function(e){return r.isExist(e)?e:""},r.isName=function(e){const t=i.exec(e);return!(null==t)},r.getAllMatches=function(e,t){const r=[];let n=t.exec(e);for(;n;){const s=[];s.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)s.push(n[e]);r.push(s),n=t.exec(e)}return r},r.nameRegexp=s}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/util.js"}],[125,{"./util":124},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./util"),s={allowBooleanAttributes:!1,unpairedTags:[]};function i(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function o(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(r,t-r);if(t>5&&"xml"===n)return h("InvalidXml","XML declaration allowed only at the start of the document.",g(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function a(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}r.validate=function(e,t){t=Object.assign({},s,t);const r=[];let c=!1,u=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let s=0;s<e.length;s++)if("<"===e[s]&&"?"===e[s+1]){if(s+=2,s=o(e,s),s.err)return s}else{if("<"!==e[s]){if(i(e[s]))continue;return h("InvalidChar","char '"+e[s]+"' is not expected.",g(e,s))}{let m=s;if(s++,"!"===e[s]){s=a(e,s);continue}{let b=!1;"/"===e[s]&&(b=!0,s++);let y="";for(;s<e.length&&">"!==e[s]&&" "!==e[s]&&"\t"!==e[s]&&"\n"!==e[s]&&"\r"!==e[s];s++)y+=e[s];if(y=y.trim(),"/"===y[y.length-1]&&(y=y.substring(0,y.length-1),s--),d=y,!n.isName(d)){let t;return t=0===y.trim().length?"Invalid space after '<'.":"Tag '"+y+"' is an invalid name.",h("InvalidTag",t,g(e,s))}const w=l(e,s);if(!1===w)return h("InvalidAttr","Attributes for '"+y+"' have open quote.",g(e,s));let v=w.value;if(s=w.index,"/"===v[v.length-1]){const r=s-v.length;v=v.substring(0,v.length-1);const n=f(v,t);if(!0!==n)return h(n.err.code,n.err.msg,g(e,r+n.err.line));c=!0}else if(b){if(!w.tagClosed)return h("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",g(e,s));if(v.trim().length>0)return h("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",g(e,m));{const t=r.pop();if(y!==t.tagName){let r=g(e,t.tagStartPos);return h("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+y+"'.",g(e,m))}0==r.length&&(u=!0)}}else{const n=f(v,t);if(!0!==n)return h(n.err.code,n.err.msg,g(e,s-v.length+n.err.line));if(!0===u)return h("InvalidXml","Multiple possible root nodes found.",g(e,s));-1!==t.unpairedTags.indexOf(y)||r.push({tagName:y,tagStartPos:m}),c=!0}for(s++;s<e.length;s++)if("<"===e[s]){if("!"===e[s+1]){s++,s=a(e,s);continue}if("?"!==e[s+1])break;if(s=o(e,++s),s.err)return s}else if("&"===e[s]){const t=p(e,s);if(-1==t)return h("InvalidChar","char '&' is not expected.",g(e,s));s=t}else if(!0===u&&!i(e[s]))return h("InvalidXml","Extra text at the end",g(e,s));"<"===e[s]&&s--}}}var d;return c?1==r.length?h("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",g(e,r[0].tagStartPos)):!(r.length>0)||h("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):h("InvalidXml","Start tag expected.",1)};const c='"',u="'";function l(e,t){let r="",n="",s=!1;for(;t<e.length;t++){if(e[t]===c||e[t]===u)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){s=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:s}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function f(e,t){const r=n.getAllMatches(e,d),s={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return h("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",b(r[e]));if(r[e][3]!==undefined&&r[e][4]===undefined)return h("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",b(r[e]));if(r[e][3]===undefined&&!t.allowBooleanAttributes)return h("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",b(r[e]));const n=r[e][2];if(!m(n))return h("InvalidAttr","Attribute '"+n+"' is an invalid name.",b(r[e]));if(s.hasOwnProperty(n))return h("InvalidAttr","Attribute '"+n+"' is repeated.",b(r[e]));s[n]=1}return!0}function p(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function h(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function m(e){return n.isName(e)}function g(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function b(e){return e.startIndex+e[1].length}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/validator.js"}],[126,{"./orderedJs2Xml":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./orderedJs2Xml"),s={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function i(e){this.options=Object.assign({},s,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=o,this.options.format?(this.indentate=a,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function o(e,t,r){const n=this.j2x(e,r+1);return e[this.options.textNodeName]!==undefined&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjectNode(n.val,t,n.attrStr,r)}function a(e){return this.options.indentBy.repeat(e)}function c(e){return!!e.startsWith(this.options.attributeNamePrefix)&&e.substr(this.attrPrefixLen)}i.prototype.build=function(e){return this.options.preserveOrder?n(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},i.prototype.j2x=function(e,t){let r="",n="";for(let s in e)if(void 0===e[s]);else if(null===e[s])"?"===s[0]?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(e[s]instanceof Date)n+=this.buildTextValNode(e[s],s,"",t);else if("object"!=typeof e[s]){const i=this.isAttribute(s);if(i)r+=this.buildAttrPairStr(i,""+e[s]);else if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,""+e[s]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[s],s,"",t)}else if(Array.isArray(e[s])){const r=e[s].length;let i="";for(let o=0;o<r;o++){const r=e[s][o];void 0===r||(null===r?"?"===s[0]?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar:"object"==typeof r?this.options.oneListGroup?i+=this.j2x(r,t+1).val:i+=this.processTextOrObjNode(r,s,t):i+=this.buildTextValNode(r,s,"",t))}this.options.oneListGroup&&(i=this.buildObjectNode(i,s,"",t)),n+=i}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const t=Object.keys(e[s]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[s][t[i]])}else n+=this.processTextOrObjNode(e[s],s,t);return{attrStr:r,val:n}},i.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},i.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let s="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",s=""),r&&-1===e.indexOf("<")?this.indentate(n)+"<"+t+r+i+">"+e+s:!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`< ! --${e}-- >`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+s}},i.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},i.prototype.buildTextValNode=function(e,t,r,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`< ! --${e}-- >`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,e);return s=this.replaceEntitiesValue(s),""===s?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+s+"</"+t+this.tagEndChar}},i.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e},t.exports=i}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"}],[127,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t,r,c){let u="",l=!1;for(let d=0;d<e.length;d++){const f=e[d],p=s(f);let h="";if(h=0===r.length?p:`${r}.${p}`,p===t.textNodeName){let e=f[p];o(h,t)||(e=t.tagValueProcessor(p,e),e=a(e,t)),l&&(u+=c),u+=e,l=!1;continue}if(p===t.cdataPropName){l&&(u+=c),u+=`<![CDATA[${f[p][0][t.textNodeName]}]]>`,l=!1;continue}if(p===t.commentPropName){u+=c+`< ! --${f[p][0][t.textNodeName]}-- >`,l=!0;continue}if("?"===p[0]){const e=i(f[":@"],t),r="?xml"===p?"":c;let n=f[p][0][t.textNodeName];n=0!==n.length?" "+n:"",u+=r+`<${p}${n}${e}?>`,l=!0;continue}let m=c;""!==m&&(m+=t.indentBy);const g=c+`<${p}${i(f[":@"],t)}`,b=n(f[p],t,h,m);-1!==t.unpairedTags.indexOf(p)?t.suppressUnpairedNode?u+=g+">":u+=g+"/>":b&&0!==b.length||!t.suppressEmptyNode?b&&b.endsWith(">")?u+=g+`>${b}${c}</${p}>`:(u+=g+">",b&&""!==c&&(b.includes("/>")||b.includes("</"))?u+=c+t.indentBy+b+c:u+=b,u+=`</${p}>`):u+=g+"/>",l=!0}return u}function s(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function i(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){let s=t.attributeValueProcessor(n,e[n]);s=a(s,t),!0===s&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${s}"`}return r}function o(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function a(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}t.exports=function(e,t){let r="";return t.format&&t.indentBy.length>0&&(r="\n"),n(e,t,"",r)}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"}],[128,{"../util":124},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../util");function s(e,t){let r="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let s="";for(;t<e.length&&e[t]!==n;t++)s+=e[t];return[r,s,t]}function i(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function o(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function a(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function c(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function u(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function l(e){if(n.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}t.exports=function(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,d=!1,f=!1,p="";for(;t<e.length;t++)if("<"!==e[t]||f)if(">"===e[t]){if(f?"-"===e[t-1]&&"-"===e[t-2]&&(f=!1,n--):n--,0===n)break}else"["===e[t]?d=!0:p+=e[t];else{if(d&&o(e,t))t+=7,[entityName,val,t]=s(e,t+1),-1===val.indexOf("&")&&(r[l(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(d&&a(e,t))t+=8;else if(d&&c(e,t))t+=8;else if(d&&u(e,t))t+=9;else{if(!i)throw new Error("Invalid DOCTYPE");f=!0}n++,p=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"}],[129,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}};r.buildOptions=function(e){return Object.assign({},n,e)},r.defaultOptions=n}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"}],[130,{"../util":124,"./DocTypeReader":128,"./xmlNode":133,strnum:209},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../util"),s=e("./xmlNode"),i=e("./DocTypeReader"),o=e("strnum");"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,n.nameRegexp);function a(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function c(e,t,r,n,s,i,o){if(e!==undefined&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,r,s,i);if(null===n||n===undefined)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return v(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?v(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function u(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function d(e,t,r){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=n.getAllMatches(e,l),s=r.length,i={};for(let e=0;e<s;e++){const n=this.resolveNameSpace(r[e][1]);let s=r[e][4],o=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),s!==undefined){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const e=this.options.attributeValueProcessor(n,s,t);null===e||e===undefined?i[o]=s:i[o]=typeof e!=typeof s||e!==s?e:v(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[o]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const f=function(e){e=e.replace(/\r\n?/g,"\n");const t=new s("!xml");let r=t,n="",o="";for(let a=0;a<e.length;a++){if("<"===e[a])if("/"===e[a+1]){const t=b(e,">",a,"Closing Tag is not closed.");let s=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,o));const i=o.substring(o.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let c=0;i&&-1!==this.options.unpairedTags.indexOf(i)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),r=this.tagsNodeStack.pop(),n="",a=t}else if("?"===e[a+1]){let t=y(e,a,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new s(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o,t.tagName)),this.addChild(r,e,o)}a=t.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=b(e,"-- >",a+4,"Comment is not closed.");if(this.options.commentPropName){const s=e.substring(a+4,t-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}a=t}else if("!D"===e.substr(a+1,2)){const t=i(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=b(e,"]]>",a,"CDATA is not closed.")-2,s=e.substring(a+9,t);if(n=this.saveTextToParentTag(n,r,o),this.options.cdataPropName)r.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]);else{let e=this.parseTextData(s,r.tagname,o,!0,!1,!0);e==undefined&&(e=""),r.add(this.options.textNodeName,e)}a=t+2}else{let i=y(e,a,this.options.removeNSPrefix),c=i.tagName,u=i.tagExp,l=i.attrExpPresent,d=i.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1));const f=r;if(f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==t.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let t="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)a=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=i.closeIndex;else{const r=this.readStopNodeData(e,c,d+1);if(!r)throw new Error(`Unexpected end of ${c}`);a=r.i,t=r.tagContent}const n=new s(c);c!==u&&l&&(n[":@"]=this.buildAttributesMap(u,o,c)),t&&(t=this.parseTextData(t,c,o,!0,l,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,o)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new s(c);c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new s(c);this.tagsNodeStack.push(r),c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o),r=e}n="",a=d}}else n+=e[a]}return t.child};function p(e,t,r){const n=this.options.updateTag(t.tagname,r,t[":@"]);!1===n||("string"==typeof n?(t.tagname=n,e.addChild(t)):e.addChild(t))}const h=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function m(e,t,r,n){return e&&(n===undefined&&(n=0===Object.keys(t.child).length),(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))!==undefined&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function g(e,t,r){const n="*."+r;for(const r in e){const s=e[r];if(n===s||t===s)return!0}return!1}function b(e,t,r,n){const s=e.indexOf(t,r);if(-1===s)throw new Error(n);return s+t.length-1}function y(e,t,r,n=">"){const s=function(e,t,r=">"){let n,s="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:s,index:i};if(e[i+1]===r[1])return{data:s,index:i}}else"\t"===t&&(t=" ");s+=t}}(e,t+1,n);if(!s)return;let i=s.data;const o=s.index,a=i.search(/\s/);let c=i,u=!0;if(-1!==a&&(c=i.substr(0,a).replace(/\s\s*$/,""),i=i.substr(a+1)),r){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),u=c!==s.data.substr(e+1))}return{tagName:c,tagExp:i,closeIndex:o,attrExpPresent:u}}function w(e,t,r){const n=r;let s=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=b(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(s--,0===s))return{tagContent:e.substring(n,r),i:i};r=i}else if("?"===e[r+1]){r=b(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=b(e,"-- >",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=b(e,"]]>",r,"StopNode is not closed.")-2}else{const n=y(e,r,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&s++,r=n.closeIndex}}}function v(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&o(e,r)}return n.isExist(e)?e:""}t.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=a,this.parseXml=f,this.parseTextData=c,this.resolveNameSpace=u,this.buildAttributesMap=d,this.isItStopNode=g,this.replaceEntitiesValue=h,this.readStopNodeData=w,this.saveTextToParentTag=m,this.addChild=p}}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"}],[131,{"../validator":125,"./OptionsBuilder":129,"./OrderedObjParser":130,"./node2json":132},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{buildOptions:n}=e("./OptionsBuilder"),s=e("./OrderedObjParser"),{prettify:i}=e("./node2json"),o=e("../validator");t.exports=class{constructor(e){this.externalEntities={},this.options=n(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=o.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new s(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||n===undefined?n:i(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"}],[132,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t,r){let a;const c={};for(let u=0;u<e.length;u++){const l=e[u],d=s(l);let f="";if(f=r===undefined?d:r+"."+d,d===t.textNodeName)a===undefined?a=l[d]:a+=""+l[d];else{if(d===undefined)continue;if(l[d]){let e=n(l[d],t,f);const r=o(e,t);l[":@"]?i(e,l[":@"],f,t):1!==Object.keys(e).length||e[t.textNodeName]===undefined||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],c[d]!==undefined&&c.hasOwnProperty(d)?(Array.isArray(c[d])||(c[d]=[c[d]]),c[d].push(e)):t.isArray(d,f,r)?c[d]=[e]:c[d]=e}}}return"string"==typeof a?a.length>0&&(c[t.textNodeName]=a):a!==undefined&&(c[t.textNodeName]=a),c}function s(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function i(e,t,r,n){if(t){const s=Object.keys(t),i=s.length;for(let o=0;o<i;o++){const i=s[o];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function o(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}r.prettify=function(e,t){return n(e,t)}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/node2json.js"}],[133,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"}],[134,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return-1!==n&&(-1===s||n<s)}}}},{package:"istanbul-lib-report>supports-color>has-flag",file:"../../node_modules/has-flag/index.js"}],[135,{"./inherits_browser.js":136,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){try{var n=e("util");if("function"!=typeof n.inherits)throw"";t.exports=n.inherits}catch(r){t.exports=e("./inherits_browser.js")}}}},{package:"browserify>inherits",file:"../../node_modules/inherits/inherits.js"}],[136,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}}}},{package:"browserify>inherits",file:"../../node_modules/inherits/inherits_browser.js"}],[137,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;n.writable=e=>n(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,n.readable=e=>n(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&"function"==typeof e._transform&&"object"==typeof e._transformState,t.exports=n}}},{package:"@metamask/providers>is-stream",file:"../../node_modules/is-stream/index.js"}],[138,{"fast-xml-parser":123},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{XMLParser:n,XMLValidator:s}=e("fast-xml-parser"),i=e=>{if(e===undefined||null===e)return!1;if(0===(e=e.toString().trim()).length)return!1;if(!0!==s.validate(e))return!1;let t;const r=new n;try{t=r.parse(e)}catch(e){return!1}return!!t&&"svg"in t};t.exports=i,t.exports.default=i}}},{package:"@metamask/snaps-sdk>is-svg",file:"../../node_modules/is-svg/index.js"}],[139,{"readable-stream":161},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("readable-stream");r.default=function(e){if(!(null==e?void 0:e.engine))throw new Error("Missing engine parameter!");const{engine:t}=e,r=new n.Duplex({objectMode:!0,read:()=>undefined,write:function(e,n,s){t.handle(e,((e,t)=>{r.push(t)})),s()}});return t.on&&t.on("notification",(e=>{r.push(e)})),r}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/createEngineStream.js"}],[140,{"@metamask/safe-event-emitter":59,"readable-stream":161},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const s=n(e("@metamask/safe-event-emitter")),i=e("readable-stream");r.default=function(e={}){const t={},r=new i.Duplex({objectMode:!0,read:()=>undefined,write:function(r,s,i){let a=null;try{!r.id?function(r){(null==e?void 0:e.retryOnMessage)&&r.method===e.retryOnMessage&&Object.values(t).forEach((({req:e,retryCount:r=0})=>{if(e.id){if(r>=3)throw new Error(`StreamMiddleware - Retry limit exceeded for request id "${e.id}"`);t[e.id].retryCount=r+1,o(e)}}));n.emit("notification",r)}(r):function(e){const r=e.id,n=t[r];if(!n)return void console.warn(`StreamMiddleware - Unknown response id "${r}"`);delete t[r],Object.assign(n.res,e),setTimeout(n.end)}(r)}catch(e){a=e}i(a)}}),n=new s.default;return{events:n,middleware:(e,r,n,s)=>{t[e.id]={req:e,res:r,next:n,end:s},o(e)},stream:r};function o(e){r.push(e)}}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/createStreamMiddleware.js"}],[141,{"./createEngineStream":139,"./createStreamMiddleware":140},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createStreamMiddleware=r.createEngineStream=void 0;const s=n(e("./createEngineStream"));r.createEngineStream=s.default;const i=n(e("./createStreamMiddleware"));r.createStreamMiddleware=i.default}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/index.js"}],[142,{wrappy:213},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("wrappy");function s(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function i(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=n(s),t.exports.strict=n(i),s.proto=s((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return s(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return i(this)},configurable:!0})}))}}},{package:"@metamask/object-multiplex>once",file:"../../node_modules/once/once.js"}],[143,{"./lib/error-with-cause":144,"./lib/helpers":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{ErrorWithCause:n}=e("./lib/error-with-cause"),{findCauseByReference:s,getErrorCause:i,messageWithCauses:o,stackWithCauses:a}=e("./lib/helpers");t.exports={ErrorWithCause:n,findCauseByReference:s,getErrorCause:i,stackWithCauses:a,messageWithCauses:o}}}},{package:"@metamask/utils>pony-cause",file:"../../node_modules/pony-cause/index.js"}],[144,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){class n extends Error{constructor(e,{cause:t}={}){super(e),this.name=n.name,t&&(this.cause=t),this.message=e}}t.exports={ErrorWithCause:n}}}},{package:"@metamask/utils>pony-cause",file:"../../node_modules/pony-cause/lib/error-with-cause.js"}],[145,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"==typeof e.cause){const t=e.cause();return t instanceof Error?t:undefined}return e.cause instanceof Error?e.cause:undefined}},s=(e,t)=>{if(!(e instanceof Error))return"";const r=e.stack||"";if(t.has(e))return r+"\ncauses have become circular...";const i=n(e);return i?(t.add(e),r+"\ncaused by: "+s(i,t)):r},i=(e,t,r)=>{if(!(e instanceof Error))return"";const s=r?"":e.message||"";if(t.has(e))return s+": ...";const o=n(e);if(o){t.add(e);const r="cause"in e&&"function"==typeof e.cause;return s+(r?"":": ")+i(o,t,r)}return s};t.exports={findCauseByReference:(e,t)=>{if(!e||!t)return;if(!(e instanceof Error))return;if(!(t.prototype instanceof Error)&&t!==Error)return;const r=new Set;let s=e;for(;s&&!r.has(s);){if(r.add(s),s instanceof t)return s;s=n(s)}},getErrorCause:n,stackWithCauses:e=>s(e,new Set),messageWithCauses:e=>i(e,new Set)}}}},{package:"@metamask/utils>pony-cause",file:"../../node_modules/pony-cause/lib/helpers.js"}],[146,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=global.process}}},{package:"browserify>process",file:"../../node_modules/process/index.js"}],[147,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n={};function s(e,t,r){r||(r=Error);class s extends r{constructor(e,r,n){super(function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(e,r,n))}}s.prototype.name=r.name,s.prototype.code=e,n[e]=s}function i(e,t){if(Array.isArray(e)){const r=e.length;return e=e.map((e=>String(e))),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}s("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),s("ERR_INVALID_ARG_TYPE",(function(e,t,r){let n;var s,o;let a;if("string"==typeof t&&(s="not ",t.substr(!o||o<0?0:+o,s.length)===s)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(r===undefined||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a=`The ${e} ${n} ${i(t,"type")}`;else{const r=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a=`The "${e}" ${r} ${n} ${i(t,"type")}`}return a+=". Received type "+typeof r,a}),TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),s("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),s("ERR_STREAM_WRITE_AFTER_END","write after end"),s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),s("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n}}},{package:"readable-stream",file:"../../node_modules/readable-stream/errors.js"}],[148,{"./_stream_readable":150,"./_stream_writable":152,inherits:135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=u;var s=e("./_stream_readable"),i=e("./_stream_writable");e("inherits")(u,s);for(var o=n(i.prototype),a=0;a<o.length;a++){var c=o[a];u.prototype[c]||(u.prototype[c]=i.prototype[c])}function u(e){if(!(this instanceof u))return new u(e);s.call(this,e),i.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||process.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/_stream_duplex.js"}],[149,{"./_stream_transform":151,inherits:135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=s;var n=e("./_stream_transform");function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}e("inherits")(s,n),s.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/_stream_passthrough.js"}],[150,{"../errors":147,"./_stream_duplex":148,"./internal/streams/async_iterator":153,"./internal/streams/buffer_list":154,"./internal/streams/destroy":155,"./internal/streams/from":157,"./internal/streams/state":159,"./internal/streams/stream":160,buffer:"buffer",events:"events",inherits:135,"string_decoder/":208,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n;t.exports=k,k.ReadableState=S;e("events").EventEmitter;var s=function(e,t){return e.listeners(t).length},i=e("./internal/streams/stream"),o=e("buffer").Buffer,a=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,u=e("util");c=u&&u.debuglog?u.debuglog("stream"):function(){};var l,d,f,p=e("./internal/streams/buffer_list"),h=e("./internal/streams/destroy"),m=e("./internal/streams/state").getHighWaterMark,g=e("../errors").codes,b=g.ERR_INVALID_ARG_TYPE,y=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,v=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(k,i);var _=h.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(t,r,s){n=n||e("./_stream_duplex"),t=t||{},"boolean"!=typeof s&&(s=r instanceof n),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",s),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=e("string_decoder/").StringDecoder),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function k(t){if(n=n||e("./_stream_duplex"),!(this instanceof k))return new k(t);var r=this instanceof n;this._readableState=new S(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),i.call(this)}function T(e,t,r,n,s){c("readableAddChunk",t);var i,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}(e,u);else if(s||(i=function(e,t){var r;n=t,o.isBuffer(n)||n instanceof a||"string"==typeof t||t===undefined||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(u,t)),i)_(e,i);else if(u.objectMode||t&&t.length>0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),n)u.endEmitted?_(e,new v):x(e,u,t,!0);else if(u.ended)_(e,new y);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?x(e,u,t,!1):A(e,u)):x(e,u,t,!1)}else n||(u.reading=!1,A(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function x(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&O(e)),A(e,t)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=h.destroy,k.prototype._undestroy=h.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=o.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},k.prototype.unshift=function(e){return T(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(t){l||(l=e("string_decoder/").StringDecoder);var r=new l(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,s="";null!==n;)s+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==s&&this._readableState.buffer.push(s),this._readableState.length=s.length,this};var R=1073741824;function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(P,e))}function P(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,$(e)}function A(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(M,e,t))}function M(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function I(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){c("readable nexttick read 0"),e.read(0)}function C(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),$(e),t.flowing&&!t.reading&&e.read(0)}function $(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(B,t,e))}function B(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function W(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}k.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):O(this),null;if(0===(e=j(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,s=t.needReadable;return c("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",s=!0),t.ended||t.reading?c("reading or ended",s=!1):s&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(r,t))),null===(n=e>0?L(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){_(this,new w("_read()"))},k.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,c("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?a:m;function o(t,s){c("onunpipe"),t===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",m),r.removeListener("data",d),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function a(){c("onend"),e.end()}n.endEmitted?process.nextTick(i):r.once("end",i),e.on("unpipe",o);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,$(e))}}(r);e.on("drain",u);var l=!1;function d(t){c("ondata");var s=e.write(t);c("dest.write",s),!1===s&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==W(n.pipes,e))&&!l&&(c("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function f(t){c("onerror",t),m(),e.removeListener("error",f),0===s(e,"error")&&_(e,t)}function p(){e.removeListener("finish",h),m()}function h(){c("onfinish"),e.removeListener("close",p),m()}function m(){c("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",p),e.once("finish",h),e.emit("pipe",r),n.flowing||(c("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<s;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var o=W(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},k.prototype.on=function(e,t){var r=i.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c("on readable",n.length,n.reading),n.length?O(this):n.reading||process.nextTick(N,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=i.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(I,this),r},k.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&e!==undefined||process.nextTick(I,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(C,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var s in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){(c("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!r.objectMode||null!==s&&s!==undefined)&&((r.objectMode||s&&s.length)&&(t.push(s)||(n=!0,e.pause())))})),e)this[s]===undefined&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<E.length;i++)e.on(E[i],this.emit.bind(this,E[i]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return d===undefined&&(d=e("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=L,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(t,r){return f===undefined&&(f=e("./internal/streams/from")),f(k,t,r)})}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/_stream_readable.js"}],[151,{"../errors":147,"./_stream_duplex":148,inherits:135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=l;var n=e("../errors").codes,s=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,c=e("./_stream_duplex");function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);c.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,r){f(e,t,r)}))}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(l,c),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new s("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;(n.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,(function(e){t(e)}))}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/_stream_transform.js"}],[152,{"../errors":147,"./_stream_duplex":148,"./internal/streams/destroy":155,"./internal/streams/state":159,"./internal/streams/stream":160,buffer:"buffer",inherits:135,"util-deprecate":212},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var s=n.callback;t.pendingcb--,s(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var s;t.exports=k,k.WritableState=S;var i={deprecate:e("util-deprecate")},o=e("./internal/streams/stream"),a=e("buffer").Buffer,c=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,l=e("./internal/streams/destroy"),d=e("./internal/streams/state").getHighWaterMark,f=e("../errors").codes,p=f.ERR_INVALID_ARG_TYPE,h=f.ERR_METHOD_NOT_IMPLEMENTED,m=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,v=f.ERR_UNKNOWN_ENCODING,_=l.errorOrDestroy;function E(){}function S(t,r,i){s=s||e("./_stream_duplex"),t=t||{},"boolean"!=typeof i&&(i=r instanceof s),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,s=r.writecb;if("function"!=typeof s)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,s){--t.pendingcb,r?(process.nextTick(s,n),process.nextTick(P,e,t),e._writableState.errorEmitted=!0,_(e,n)):(s(n),e._writableState.errorEmitted=!0,_(e,n),P(e,t))}(e,r,n,t,s);else{var i=j(r)||e.destroyed;i||r.corked||r.bufferProcessing||!r.bufferedRequest||R(e,r),n?process.nextTick(x,e,r,i,s):x(e,r,i,s)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function k(t){var r=this instanceof(s=s||e("./_stream_duplex"));if(!r&&!u.call(k,this))return new k(t);this._writableState=new S(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),o.call(this)}function T(e,t,r,n,s,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function x(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),P(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var s=t.bufferedRequestCount,i=new Array(s),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,T(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,d=r.callback;if(T(e,t,!1,t.objectMode?1:u.length,u,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function j(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),P(e,t)}))}function P(e,t){var r=j(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}e("inherits")(k,o),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:i.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===k&&(e&&e._writableState instanceof S)}})):u=function(e){return e instanceof this},k.prototype.pipe=function(){_(this,new g)},k.prototype.write=function(e,t,r){var n,s=this._writableState,i=!1,o=!s.objectMode&&(n=e,a.isBuffer(n)||n instanceof c);return o&&!a.isBuffer(e)&&(e=function(e){return a.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=E),s.ending?function(e,t){var r=new w;_(e,r),process.nextTick(t,r)}(this,r):(o||function(e,t,r,n){var s;return null===r?s=new y:"string"==typeof r||t.objectMode||(s=new p("chunk",["string","Buffer"],r)),!s||(_(e,s),process.nextTick(n,s),!1)}(this,s,e,r))&&(s.pendingcb++,i=function(e,t,r,n,s,i){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,r));return t}(t,n,s);n!==o&&(r=!0,s="buffer",n=o)}var c=t.objectMode?1:n.length;t.length+=c;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:i,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,c,n,s,i);return u}(this,s,o,e,t,r)),i},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new h("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=l.destroy,k.prototype._undestroy=l.undestroy,k.prototype._destroy=function(e,t){t(e)}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/_stream_writable.js"}],[153,{"./end-of-stream":156},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n;function s(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=e("./end-of-stream"),o=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function p(e,t){return{value:e,done:t}}function h(e){var t=e[o];if(null!==t){var r=e[f].read();null!==r&&(e[l]=null,e[o]=null,e[a]=null,t(p(r,!1)))}}function m(e){process.nextTick(h,e)}var g=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((s(n={get stream(){return this[f]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(p(undefined,!0));if(this[f].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[c]?r(e[c]):t(p(undefined,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[u]?r(p(undefined,!0)):t[d](r,n)}),n)}}(n,this));else{var s=this[f].read();if(null!==s)return Promise.resolve(p(s,!1));r=new Promise(this[d])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),s(n,"return",(function(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){e?r(e):t(p(undefined,!0))}))}))})),n),g);t.exports=function(e){var t,r=Object.create(b,(s(t={},f,{value:e,writable:!0}),s(t,o,{value:null,writable:!0}),s(t,a,{value:null,writable:!0}),s(t,c,{value:null,writable:!0}),s(t,u,{value:e._readableState.endEmitted,writable:!0}),s(t,d,{value:function(e,t){var n=r[f].read();n?(r[l]=null,r[o]=null,r[a]=null,e(p(n,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[l]=null,i(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[l]=null,r[o]=null,r[a]=null,t(e)),void(r[c]=e)}var n=r[o];null!==n&&(r[l]=null,r[o]=null,r[a]=null,n(p(undefined,!0))),r[u]=!0})),e.on("readable",m.bind(null,r)),r}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/async_iterator.js"}],[154,{buffer:"buffer",util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var c=e("buffer").Buffer,u=e("util").inspect,l=u&&u.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t,r,n,s=c.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=i.data,r=s,n=o,c.prototype.copy.call(t,r,n),o+=i.data.length,i=i.next;return s}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var s=t.data,i=e>s.length?s.length:e;if(i===s.length?n+=s:n+=s.slice(0,e),0==(e-=i)){i===s.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=s.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var s=r.data,i=e>s.length?s.length:e;if(s.copy(t,t.length-e,0,i),0==(e-=i)){i===s.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=s.slice(i));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return u(this,s(s({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/buffer_list.js"}],[155,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){i(e,t),s(e)}function s(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,e)):process.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?process.nextTick(s,r):(r._writableState.errorEmitted=!0,process.nextTick(n,r,e)):process.nextTick(n,r,e):t?(process.nextTick(s,r),t(e)):process.nextTick(s,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/destroy.js"}],[156,{"../../../errors":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function s(){}t.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];e.apply(this,n)}}}(i||s);var o=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,c=function(){t.writable||l()},u=t._writableState&&t._writableState.finished,l=function(){a=!1,u=!0,o||i.call(t)},d=t._readableState&&t._readableState.endEmitted,f=function(){o=!1,d=!0,a||i.call(t)},p=function(e){i.call(t,e)},h=function(){var e;return o&&!d?(t._readableState&&t._readableState.ended||(e=new n),i.call(t,e)):a&&!u?(t._writableState&&t._writableState.ended||(e=new n),i.call(t,e)):void 0},m=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",c),t.on("close",c)):(t.on("complete",l),t.on("abort",h),t.req?m():t.on("request",m)),t.on("end",f),t.on("finish",l),!1!==r.error&&t.on("error",p),t.on("close",h),function(){t.removeListener("complete",l),t.removeListener("abort",h),t.removeListener("request",m),t.req&&t.req.removeListener("finish",l),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",l),t.removeListener("end",f),t.removeListener("error",p),t.removeListener("close",h)}}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js"}],[157,{"../../../errors":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t,r,n,s,i,o){try{var a=e[i](o),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,s)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=e("../../../errors").codes.ERR_INVALID_ARG_TYPE;t.exports=function(e,t,r){var a;if(t&&"function"==typeof t.next)a=t;else if(t&&t[Symbol.asyncIterator])a=t[Symbol.asyncIterator]();else{if(!t||!t[Symbol.iterator])throw new o("iterable",["Iterable"],t);a=t[Symbol.iterator]()}var c=new e(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({objectMode:!0},r)),u=!1;function l(){return d.apply(this,arguments)}function d(){var e;return e=function*(){try{var e=yield a.next(),t=e.value;e.done?c.push(null):c.push(yield t)?l():u=!1}catch(e){c.destroy(e)}},d=function(){var t=this,r=arguments;return new Promise((function(s,i){var o=e.apply(t,r);function a(e){n(o,s,i,a,c,"next",e)}function c(e){n(o,s,i,a,c,"throw",e)}a(undefined)}))},d.apply(this,arguments)}return c._read=function(){u||(u=!0,l())},c}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/from.js"}],[158,{"../../../errors":147,"./end-of-stream":156},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n;var s=e("../../../errors").codes,i=s.ERR_MISSING_ARGS,o=s.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e){e()}function u(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];var l,d=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new i("streams");var f=r.map((function(t,s){var i=s<r.length-1;return function(t,r,s,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var a=!1;t.on("close",(function(){a=!0})),n===undefined&&(n=e("./end-of-stream")),n(t,{readable:r,writable:s},(function(e){if(e)return i(e);a=!0,i()}));var c=!1;return function(e){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void i(e||new o("pipe"))}}(t,i,s>0,(function(e){l||(l=e),e&&f.forEach(c),i||(f.forEach(c),d(l))}))}));return r.reduce(u)}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/pipeline.js"}],[159,{"../../../errors":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,s){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,s,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(s?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/state.js"}],[160,{stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("stream")}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/stream.js"}],[161,{"./lib/_stream_duplex.js":148,"./lib/_stream_passthrough.js":149,"./lib/_stream_readable.js":150,"./lib/_stream_transform.js":151,"./lib/_stream_writable.js":152,"./lib/internal/streams/end-of-stream.js":156,"./lib/internal/streams/pipeline.js":158,stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("stream");"disable"===process.env.READABLE_STREAM&&n?(t.exports=n.Readable,Object.assign(t.exports,n),t.exports.Stream=n):((r=t.exports=e("./lib/_stream_readable.js")).Stream=n||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js"))}}},{package:"readable-stream",file:"../../node_modules/readable-stream/readable.js"}],[162,{buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
|
|
13294
|
+
Object.defineProperty(r,"__esModule",{value:!0}),r.bytes=r.stringToBytes=r.str=r.bytesToString=r.hex=r.utf8=r.bech32m=r.bech32=r.base58check=r.base58xmr=r.base58xrp=r.base58flickr=r.base58=r.base64urlnopad=r.base64url=r.base64=r.base32crockford=r.base32hex=r.base32=r.base16=r.utils=r.assertNumber=void 0,r.assertNumber=n;const l=(e,t)=>t?l(t,e%t):e,d=(e,t)=>e+(t-l(e,t));function p(e,t,r,s){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(d(t,r)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${d(t,r)}`);let i=0,o=0;const a=2**r-1,c=[];for(const s of e){if(n(s),s>=2**t)throw new Error(`convertRadix2: invalid data word=${s} from=${t}`);if(i=i<<t|s,o+t>32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=r;o-=r)c.push((i>>o-r&a)>>>0);i&=2**o-1}if(i=i<<r-o&a,!s&&o>=t)throw new Error("Excess padding");if(!s&&i)throw new Error(`Non-zero padding: ${i}`);return s&&o>0&&c.push(i>>>0),c}function h(e){return n(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return u(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of strings");return Uint8Array.from(u(t,e,256))}}}function f(e,t=!1){if(n(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(d(8,e)>32||d(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!(r instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return p(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(p(r,e,8,t))}}}function m(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function g(e,t){if(n(e),"function"!=typeof t)throw new Error("checksum fn should be function");return{encode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");const n=t(r).slice(0,e),s=new Uint8Array(r.length+e);return s.set(r),s.set(n,r.length),s},decode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");const n=r.slice(0,-e),s=t(n).slice(0,e),i=r.slice(-e);for(let t=0;t<e;t++)if(s[t]!==i[t])throw new Error("Invalid checksum");return n}}}r.utils={alphabet:i,chain:s,checksum:g,radix:h,radix2:f,join:o,padding:a},r.base16=s(f(4),i("0123456789ABCDEF"),o("")),r.base32=s(f(5),i("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),a(5),o("")),r.base32hex=s(f(5),i("0123456789ABCDEFGHIJKLMNOPQRSTUV"),a(5),o("")),r.base32crockford=s(f(5),i("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),o(""),c((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),r.base64=s(f(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a(6),o("")),r.base64url=s(f(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(6),o("")),r.base64urlnopad=s(f(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),o(""));const b=e=>s(h(58),i(e),o(""));r.base58=b("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),r.base58flickr=b("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),r.base58xrp=b("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const y=[0,2,3,5,6,7,9,10,11];r.base58xmr={encode(e){let t="";for(let n=0;n<e.length;n+=8){const s=e.subarray(n,n+8);t+=r.base58.encode(s).padStart(y[s.length],"1")}return t},decode(e){let t=[];for(let n=0;n<e.length;n+=11){const s=e.slice(n,n+11),i=y.indexOf(s.length),o=r.base58.decode(s);for(let e=0;e<o.length-i;e++)if(0!==o[e])throw new Error("base58xmr: wrong padding");t=t.concat(Array.from(o.slice(o.length-i)))}return Uint8Array.from(t)}};r.base58check=e=>s(g(4,(t=>e(e(t)))),r.base58);const w=s(i("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),o("")),v=[996825010,642813549,513874426,1027748829,705979059];function E(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e<v.length;e++)1==(t>>e&1)&&(r^=v[e]);return r}function k(e,t,r=1){const n=e.length;let s=1;for(let t=0;t<n;t++){const r=e.charCodeAt(t);if(r<33||r>126)throw new Error(`Invalid prefix (${e})`);s=E(s)^r>>5}s=E(s);for(let t=0;t<n;t++)s=E(s)^31&e.charCodeAt(t);for(let e of t)s=E(s)^e;for(let e=0;e<6;e++)s=E(s);return s^=r,w.encode(p([s%2**30],30,5,!1))}function _(e){const t="bech32"===e?1:734539939,r=f(5),n=r.decode,s=r.encode,i=m(n);function o(e,r=90){if("string"!=typeof e)throw new Error("bech32.decode input should be string, not "+typeof e);if(e.length<8||!1!==r&&e.length>r)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);const n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const s=(e=n).lastIndexOf("1");if(0===s||-1===s)throw new Error('Letter "1" must be present between prefix and data only');const i=e.slice(0,s),o=e.slice(s+1);if(o.length<6)throw new Error("Data must be at least 6 characters long");const a=w.decode(o).slice(0,-6),c=k(i,a,t);if(!o.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:i,words:a}}return{encode:function(e,r,n=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof r);const s=e.length+7+r.length;if(!1!==n&&s>n)throw new TypeError(`Length ${s} exceeds limit ${n}`);const i=e.toLowerCase(),o=k(i,r,t);return`${i}1${w.encode(r)}${o}`},decode:o,decodeToBytes:function(e){const{prefix:t,words:r}=o(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:m(o),fromWords:n,fromWordsUnsafe:i,toWords:s}}r.bech32=_("bech32"),r.bech32m=_("bech32m"),r.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},r.hex=s(f(4),i("0123456789abcdef"),o(""),c((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));const S={utf8:r.utf8,hex:r.hex,base16:r.base16,base32:r.base32,base64:r.base64,base64url:r.base64url,base58:r.base58,base58xmr:r.base58xmr},T="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";r.bytesToString=(e,t)=>{if("string"!=typeof e||!S.hasOwnProperty(e))throw new TypeError(T);if(!(t instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return S[e].encode(t)},r.str=r.bytesToString;r.stringToBytes=(e,t)=>{if(!S.hasOwnProperty(e))throw new TypeError(T);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return S[e].decode(t)},r.bytes=r.stringToBytes}}},{package:"@metamask/utils>@scure/base",file:"../../node_modules/@scure/base/lib/index.js"}],[62,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=1e3,s=60*n,i=60*s,o=24*i,a=7*o,c=365.25*o;function u(e,t,r,n){var s=t>=1.5*r;return Math.round(e/r)+" "+n+(s?"s":"")}t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*c;case"weeks":case"week":case"w":return r*a;case"days":case"day":case"d":return r*o;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*s;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return undefined}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return u(e,t,o,"day");if(t>=i)return u(e,t,i,"hour");if(t>=s)return u(e,t,s,"minute");if(t>=n)return u(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=s)return Math.round(e/s)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}}},{package:"eslint>debug>ms",file:"../../node_modules/debug/node_modules/ms/index.js"}],[63,{"./common":64},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){r.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,s=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))})),e.splice(s,0,r)},r.save=function(e){try{e?r.storage.setItem("debug",e):r.storage.removeItem("debug")}catch(e){}},r.load=function(){let e;try{e=r.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},r.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage=function(){try{return localStorage}catch(e){}}(),r.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(r);const{formatters:n}=t.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/browser.js"}],[64,{ms:62},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(t){function r(e){let t,s,i,o=null;function a(...e){if(!a.enabled)return;const n=a,s=Number(new Date),i=s-(t||s);n.diff=i,n.prev=t,n.curr=s,t=s,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,s)=>{if("%%"===t)return"%";o++;const i=r.formatters[s];if("function"==typeof i){const r=e[o];t=i.call(n,r),e.splice(o,1),o--}return t})),r.formatArgs.call(n,e);(n.log||r.log).apply(n,e)}return a.namespace=e,a.useColors=r.useColors(),a.color=r.selectColor(e),a.extend=n,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(s!==r.namespaces&&(s=r.namespaces,i=r.enabled(e)),i),set:e=>{o=e}}),"function"==typeof r.init&&r.init(a),a}function n(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){const e=[...r.names.map(s),...r.skips.map(s).map((e=>"-"+e))].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.namespaces=e,r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),s=n.length;for(t=0;t<s;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.slice(1)+"$")):r.names.push(new RegExp("^"+e+"$")))},r.enabled=function(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=e("ms"),r.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((e=>{r[e]=t[e]})),r.names=[],r.skips=[],r.formatters={},r.selectColor=function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return r.colors[Math.abs(t)%r.colors.length]},r.enable(r.load()),r}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/common.js"}],[65,{"./browser.js":63,"./node.js":66},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?t.exports=e("./browser.js"):t.exports=e("./node.js")}}},{package:"eslint>debug",file:"../../node_modules/debug/src/index.js"}],[66,{"./common":64,"supports-color":156,tty:"tty",util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("tty"),s=e("util");r.init=function(e){e.inspectOpts={};const t=Object.keys(r.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=r.inspectOpts[t[n]]},r.log=function(...e){return process.stderr.write(s.format(...e)+"\n")},r.formatArgs=function(e){const{namespace:n,useColors:s}=this;if(s){const r=this.color,s="[3"+(r<8?r:"8;5;"+r),i=` ${s};1m${n} [0m`;e[0]=i+e[0].split("\n").join("\n"+i),e.push(s+"m+"+t.exports.humanize(this.diff)+"[0m")}else e[0]=function(){if(r.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+e[0]},r.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},r.load=function(){return process.env.DEBUG},r.useColors=function(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):n.isatty(process.stderr.fd)},r.destroy=s.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),r.colors=[6,2,3,4,5,1];try{const t=e("supports-color");t&&(t.stderr||t).level>=2&&(r.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}r.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),t.exports=e("./common")(r);const{formatters:i}=t.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts)}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/node.js"}],[67,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(s=n;0!=s--;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;0!=s--;){var o=i[s];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}}}},{package:"eslint>fast-deep-equal",file:"../../node_modules/fast-deep-equal/index.js"}],[68,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=c,c.default=c,c.stable=p,c.stableStringify=p;var n="[...]",s="[Circular]",i=[],o=[];function a(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function c(e,t,r,n){var s;void 0===n&&(n=a()),l(e,"",0,[],undefined,0,n);try{s=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,f(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var c=i.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function u(e,t,r,n){var s=Object.getOwnPropertyDescriptor(n,r);s.get!==undefined?s.configurable?(Object.defineProperty(n,r,{value:e}),i.push([n,r,t,s])):o.push([t,r,e]):(n[r]=e,i.push([n,r,t]))}function l(e,t,r,i,o,a,c){var d;if(a+=1,"object"==typeof e&&null!==e){for(d=0;d<i.length;d++)if(i[d]===e)return void u(s,e,t,o);if(void 0!==c.depthLimit&&a>c.depthLimit)return void u(n,e,t,o);if(void 0!==c.edgesLimit&&r+1>c.edgesLimit)return void u(n,e,t,o);if(i.push(e),Array.isArray(e))for(d=0;d<e.length;d++)l(e[d],d,d,i,e,a,c);else{var p=Object.keys(e);for(d=0;d<p.length;d++){var h=p[d];l(e[h],h,d,i,e,a,c)}}i.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function p(e,t,r,n){void 0===n&&(n=a());var s,c=h(e,"",0,[],undefined,0,n)||e;try{s=0===o.length?JSON.stringify(c,t,r):JSON.stringify(c,f(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var u=i.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function h(e,t,r,o,a,c,l){var p;if(c+=1,"object"==typeof e&&null!==e){for(p=0;p<o.length;p++)if(o[p]===e)return void u(s,e,t,a);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==l.depthLimit&&c>l.depthLimit)return void u(n,e,t,a);if(void 0!==l.edgesLimit&&r+1>l.edgesLimit)return void u(n,e,t,a);if(o.push(e),Array.isArray(e))for(p=0;p<e.length;p++)h(e[p],p,p,o,e,c,l);else{var f={},m=Object.keys(e).sort(d);for(p=0;p<m.length;p++){var g=m[p];h(e[g],g,p,o,e,c,l),f[g]=e[g]}if(void 0===a)return f;i.push([a,t,e]),a[t]=f}o.pop()}}function f(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(o.length>0)for(var n=0;n<o.length;n++){var s=o[n];if(s[1]===t&&s[0]===r){r=s[2],o.splice(n,1);break}}return e.call(this,t,r)}}}}},{package:"@metamask/rpc-errors>fast-safe-stringify",file:"../../node_modules/fast-safe-stringify/index.js"}],[69,{"./validator":71,"./xmlbuilder/json2xml":72,"./xmlparser/XMLParser":77},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./validator"),s=e("./xmlparser/XMLParser"),i=e("./xmlbuilder/json2xml");t.exports={XMLParser:s,XMLValidator:n,XMLBuilder:i}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/fxp.js"}],[70,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",s="["+n+"]["+(n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",i=new RegExp("^"+s+"$");r.isExist=function(e){return void 0!==e},r.isEmptyObject=function(e){return 0===Object.keys(e).length},r.merge=function(e,t,r){if(t){const n=Object.keys(t),s=n.length;for(let i=0;i<s;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},r.getValue=function(e){return r.isExist(e)?e:""},r.isName=function(e){const t=i.exec(e);return!(null==t)},r.getAllMatches=function(e,t){const r=[];let n=t.exec(e);for(;n;){const s=[];s.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)s.push(n[e]);r.push(s),n=t.exec(e)}return r},r.nameRegexp=s}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/util.js"}],[71,{"./util":70},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./util"),s={allowBooleanAttributes:!1,unpairedTags:[]};function i(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function o(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(r,t-r);if(t>5&&"xml"===n)return f("InvalidXml","XML declaration allowed only at the start of the document.",g(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function a(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}r.validate=function(e,t){t=Object.assign({},s,t);const r=[];let c=!1,u=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let s=0;s<e.length;s++)if("<"===e[s]&&"?"===e[s+1]){if(s+=2,s=o(e,s),s.err)return s}else{if("<"!==e[s]){if(i(e[s]))continue;return f("InvalidChar","char '"+e[s]+"' is not expected.",g(e,s))}{let m=s;if(s++,"!"===e[s]){s=a(e,s);continue}{let b=!1;"/"===e[s]&&(b=!0,s++);let y="";for(;s<e.length&&">"!==e[s]&&" "!==e[s]&&"\t"!==e[s]&&"\n"!==e[s]&&"\r"!==e[s];s++)y+=e[s];if(y=y.trim(),"/"===y[y.length-1]&&(y=y.substring(0,y.length-1),s--),d=y,!n.isName(d)){let t;return t=0===y.trim().length?"Invalid space after '<'.":"Tag '"+y+"' is an invalid name.",f("InvalidTag",t,g(e,s))}const w=l(e,s);if(!1===w)return f("InvalidAttr","Attributes for '"+y+"' have open quote.",g(e,s));let v=w.value;if(s=w.index,"/"===v[v.length-1]){const r=s-v.length;v=v.substring(0,v.length-1);const n=p(v,t);if(!0!==n)return f(n.err.code,n.err.msg,g(e,r+n.err.line));c=!0}else if(b){if(!w.tagClosed)return f("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",g(e,s));if(v.trim().length>0)return f("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",g(e,m));{const t=r.pop();if(y!==t.tagName){let r=g(e,t.tagStartPos);return f("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+y+"'.",g(e,m))}0==r.length&&(u=!0)}}else{const n=p(v,t);if(!0!==n)return f(n.err.code,n.err.msg,g(e,s-v.length+n.err.line));if(!0===u)return f("InvalidXml","Multiple possible root nodes found.",g(e,s));-1!==t.unpairedTags.indexOf(y)||r.push({tagName:y,tagStartPos:m}),c=!0}for(s++;s<e.length;s++)if("<"===e[s]){if("!"===e[s+1]){s++,s=a(e,s);continue}if("?"!==e[s+1])break;if(s=o(e,++s),s.err)return s}else if("&"===e[s]){const t=h(e,s);if(-1==t)return f("InvalidChar","char '&' is not expected.",g(e,s));s=t}else if(!0===u&&!i(e[s]))return f("InvalidXml","Extra text at the end",g(e,s));"<"===e[s]&&s--}}}var d;return c?1==r.length?f("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",g(e,r[0].tagStartPos)):!(r.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):f("InvalidXml","Start tag expected.",1)};const c='"',u="'";function l(e,t){let r="",n="",s=!1;for(;t<e.length;t++){if(e[t]===c||e[t]===u)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){s=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:s}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function p(e,t){const r=n.getAllMatches(e,d),s={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return f("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",b(r[e]));if(r[e][3]!==undefined&&r[e][4]===undefined)return f("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",b(r[e]));if(r[e][3]===undefined&&!t.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",b(r[e]));const n=r[e][2];if(!m(n))return f("InvalidAttr","Attribute '"+n+"' is an invalid name.",b(r[e]));if(s.hasOwnProperty(n))return f("InvalidAttr","Attribute '"+n+"' is repeated.",b(r[e]));s[n]=1}return!0}function h(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function f(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function m(e){return n.isName(e)}function g(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function b(e){return e.startIndex+e[1].length}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/validator.js"}],[72,{"./orderedJs2Xml":73},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./orderedJs2Xml"),s={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function i(e){this.options=Object.assign({},s,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=o,this.options.format?(this.indentate=a,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function o(e,t,r){const n=this.j2x(e,r+1);return e[this.options.textNodeName]!==undefined&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjectNode(n.val,t,n.attrStr,r)}function a(e){return this.options.indentBy.repeat(e)}function c(e){return!!e.startsWith(this.options.attributeNamePrefix)&&e.substr(this.attrPrefixLen)}i.prototype.build=function(e){return this.options.preserveOrder?n(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},i.prototype.j2x=function(e,t){let r="",n="";for(let s in e)if(void 0===e[s]);else if(null===e[s])"?"===s[0]?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(e[s]instanceof Date)n+=this.buildTextValNode(e[s],s,"",t);else if("object"!=typeof e[s]){const i=this.isAttribute(s);if(i)r+=this.buildAttrPairStr(i,""+e[s]);else if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,""+e[s]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[s],s,"",t)}else if(Array.isArray(e[s])){const r=e[s].length;let i="";for(let o=0;o<r;o++){const r=e[s][o];void 0===r||(null===r?"?"===s[0]?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar:"object"==typeof r?this.options.oneListGroup?i+=this.j2x(r,t+1).val:i+=this.processTextOrObjNode(r,s,t):i+=this.buildTextValNode(r,s,"",t))}this.options.oneListGroup&&(i=this.buildObjectNode(i,s,"",t)),n+=i}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const t=Object.keys(e[s]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[s][t[i]])}else n+=this.processTextOrObjNode(e[s],s,t);return{attrStr:r,val:n}},i.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},i.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let s="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",s=""),r&&-1===e.indexOf("<")?this.indentate(n)+"<"+t+r+i+">"+e+s:!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`< ! --${e}-- >`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+s}},i.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},i.prototype.buildTextValNode=function(e,t,r,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`< ! --${e}-- >`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,e);return s=this.replaceEntitiesValue(s),""===s?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+s+"</"+t+this.tagEndChar}},i.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e},t.exports=i}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"}],[73,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t,r,c){let u="",l=!1;for(let d=0;d<e.length;d++){const p=e[d],h=s(p);let f="";if(f=0===r.length?h:`${r}.${h}`,h===t.textNodeName){let e=p[h];o(f,t)||(e=t.tagValueProcessor(h,e),e=a(e,t)),l&&(u+=c),u+=e,l=!1;continue}if(h===t.cdataPropName){l&&(u+=c),u+=`<![CDATA[${p[h][0][t.textNodeName]}]]>`,l=!1;continue}if(h===t.commentPropName){u+=c+`< ! --${p[h][0][t.textNodeName]}-- >`,l=!0;continue}if("?"===h[0]){const e=i(p[":@"],t),r="?xml"===h?"":c;let n=p[h][0][t.textNodeName];n=0!==n.length?" "+n:"",u+=r+`<${h}${n}${e}?>`,l=!0;continue}let m=c;""!==m&&(m+=t.indentBy);const g=c+`<${h}${i(p[":@"],t)}`,b=n(p[h],t,f,m);-1!==t.unpairedTags.indexOf(h)?t.suppressUnpairedNode?u+=g+">":u+=g+"/>":b&&0!==b.length||!t.suppressEmptyNode?b&&b.endsWith(">")?u+=g+`>${b}${c}</${h}>`:(u+=g+">",b&&""!==c&&(b.includes("/>")||b.includes("</"))?u+=c+t.indentBy+b+c:u+=b,u+=`</${h}>`):u+=g+"/>",l=!0}return u}function s(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function i(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){let s=t.attributeValueProcessor(n,e[n]);s=a(s,t),!0===s&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${s}"`}return r}function o(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function a(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}t.exports=function(e,t){let r="";return t.format&&t.indentBy.length>0&&(r="\n"),n(e,t,"",r)}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"}],[74,{"../util":70},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../util");function s(e,t){let r="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let s="";for(;t<e.length&&e[t]!==n;t++)s+=e[t];return[r,s,t]}function i(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function o(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function a(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function c(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function u(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function l(e){if(n.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}t.exports=function(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,d=!1,p=!1,h="";for(;t<e.length;t++)if("<"!==e[t]||p)if(">"===e[t]){if(p?"-"===e[t-1]&&"-"===e[t-2]&&(p=!1,n--):n--,0===n)break}else"["===e[t]?d=!0:h+=e[t];else{if(d&&o(e,t))t+=7,[entityName,val,t]=s(e,t+1),-1===val.indexOf("&")&&(r[l(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(d&&a(e,t))t+=8;else if(d&&c(e,t))t+=8;else if(d&&u(e,t))t+=9;else{if(!i)throw new Error("Invalid DOCTYPE");p=!0}n++,h=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"}],[75,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}};r.buildOptions=function(e){return Object.assign({},n,e)},r.defaultOptions=n}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"}],[76,{"../util":70,"./DocTypeReader":74,"./xmlNode":79,strnum:154},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../util"),s=e("./xmlNode"),i=e("./DocTypeReader"),o=e("strnum");"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,n.nameRegexp);function a(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function c(e,t,r,n,s,i,o){if(e!==undefined&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,r,s,i);if(null===n||n===undefined)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return v(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?v(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function u(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function d(e,t,r){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=n.getAllMatches(e,l),s=r.length,i={};for(let e=0;e<s;e++){const n=this.resolveNameSpace(r[e][1]);let s=r[e][4],o=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),s!==undefined){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const e=this.options.attributeValueProcessor(n,s,t);null===e||e===undefined?i[o]=s:i[o]=typeof e!=typeof s||e!==s?e:v(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[o]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const p=function(e){e=e.replace(/\r\n?/g,"\n");const t=new s("!xml");let r=t,n="",o="";for(let a=0;a<e.length;a++){if("<"===e[a])if("/"===e[a+1]){const t=b(e,">",a,"Closing Tag is not closed.");let s=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,o));const i=o.substring(o.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let c=0;i&&-1!==this.options.unpairedTags.indexOf(i)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),r=this.tagsNodeStack.pop(),n="",a=t}else if("?"===e[a+1]){let t=y(e,a,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new s(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o,t.tagName)),this.addChild(r,e,o)}a=t.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=b(e,"-- >",a+4,"Comment is not closed.");if(this.options.commentPropName){const s=e.substring(a+4,t-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}a=t}else if("!D"===e.substr(a+1,2)){const t=i(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=b(e,"]]>",a,"CDATA is not closed.")-2,s=e.substring(a+9,t);if(n=this.saveTextToParentTag(n,r,o),this.options.cdataPropName)r.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]);else{let e=this.parseTextData(s,r.tagname,o,!0,!1,!0);e==undefined&&(e=""),r.add(this.options.textNodeName,e)}a=t+2}else{let i=y(e,a,this.options.removeNSPrefix),c=i.tagName,u=i.tagExp,l=i.attrExpPresent,d=i.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1));const p=r;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==t.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let t="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)a=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=i.closeIndex;else{const r=this.readStopNodeData(e,c,d+1);if(!r)throw new Error(`Unexpected end of ${c}`);a=r.i,t=r.tagContent}const n=new s(c);c!==u&&l&&(n[":@"]=this.buildAttributesMap(u,o,c)),t&&(t=this.parseTextData(t,c,o,!0,l,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,o)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new s(c);c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new s(c);this.tagsNodeStack.push(r),c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o),r=e}n="",a=d}}else n+=e[a]}return t.child};function h(e,t,r){const n=this.options.updateTag(t.tagname,r,t[":@"]);!1===n||("string"==typeof n?(t.tagname=n,e.addChild(t)):e.addChild(t))}const f=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function m(e,t,r,n){return e&&(n===undefined&&(n=0===Object.keys(t.child).length),(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))!==undefined&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function g(e,t,r){const n="*."+r;for(const r in e){const s=e[r];if(n===s||t===s)return!0}return!1}function b(e,t,r,n){const s=e.indexOf(t,r);if(-1===s)throw new Error(n);return s+t.length-1}function y(e,t,r,n=">"){const s=function(e,t,r=">"){let n,s="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:s,index:i};if(e[i+1]===r[1])return{data:s,index:i}}else"\t"===t&&(t=" ");s+=t}}(e,t+1,n);if(!s)return;let i=s.data;const o=s.index,a=i.search(/\s/);let c=i,u=!0;if(-1!==a&&(c=i.substr(0,a).replace(/\s\s*$/,""),i=i.substr(a+1)),r){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),u=c!==s.data.substr(e+1))}return{tagName:c,tagExp:i,closeIndex:o,attrExpPresent:u}}function w(e,t,r){const n=r;let s=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=b(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(s--,0===s))return{tagContent:e.substring(n,r),i:i};r=i}else if("?"===e[r+1]){r=b(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=b(e,"-- >",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=b(e,"]]>",r,"StopNode is not closed.")-2}else{const n=y(e,r,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&s++,r=n.closeIndex}}}function v(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&o(e,r)}return n.isExist(e)?e:""}t.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=a,this.parseXml=p,this.parseTextData=c,this.resolveNameSpace=u,this.buildAttributesMap=d,this.isItStopNode=g,this.replaceEntitiesValue=f,this.readStopNodeData=w,this.saveTextToParentTag=m,this.addChild=h}}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"}],[77,{"../validator":71,"./OptionsBuilder":75,"./OrderedObjParser":76,"./node2json":78},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{buildOptions:n}=e("./OptionsBuilder"),s=e("./OrderedObjParser"),{prettify:i}=e("./node2json"),o=e("../validator");t.exports=class{constructor(e){this.externalEntities={},this.options=n(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=o.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new s(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||n===undefined?n:i(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"}],[78,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t,r){let a;const c={};for(let u=0;u<e.length;u++){const l=e[u],d=s(l);let p="";if(p=r===undefined?d:r+"."+d,d===t.textNodeName)a===undefined?a=l[d]:a+=""+l[d];else{if(d===undefined)continue;if(l[d]){let e=n(l[d],t,p);const r=o(e,t);l[":@"]?i(e,l[":@"],p,t):1!==Object.keys(e).length||e[t.textNodeName]===undefined||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],c[d]!==undefined&&c.hasOwnProperty(d)?(Array.isArray(c[d])||(c[d]=[c[d]]),c[d].push(e)):t.isArray(d,p,r)?c[d]=[e]:c[d]=e}}}return"string"==typeof a?a.length>0&&(c[t.textNodeName]=a):a!==undefined&&(c[t.textNodeName]=a),c}function s(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function i(e,t,r,n){if(t){const s=Object.keys(t),i=s.length;for(let o=0;o<i;o++){const i=s[o];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function o(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}r.prettify=function(e,t){return n(e,t)}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/node2json.js"}],[79,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser",file:"../../node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"}],[80,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return-1!==n&&(-1===s||n<s)}}}},{package:"istanbul-lib-report>supports-color>has-flag",file:"../../node_modules/has-flag/index.js"}],[81,{"./inherits_browser.js":82,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){try{var n=e("util");if("function"!=typeof n.inherits)throw"";t.exports=n.inherits}catch(r){t.exports=e("./inherits_browser.js")}}}},{package:"browserify>inherits",file:"../../node_modules/inherits/inherits.js"}],[82,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}}}},{package:"browserify>inherits",file:"../../node_modules/inherits/inherits_browser.js"}],[83,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;n.writable=e=>n(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,n.readable=e=>n(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&"function"==typeof e._transform&&"object"==typeof e._transformState,t.exports=n}}},{package:"@metamask/providers>is-stream",file:"../../node_modules/is-stream/index.js"}],[84,{"fast-xml-parser":69},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{XMLParser:n,XMLValidator:s}=e("fast-xml-parser"),i=e=>{if(e===undefined||null===e)return!1;if(0===(e=e.toString().trim()).length)return!1;if(!0!==s.validate(e))return!1;let t;const r=new n;try{t=r.parse(e)}catch(e){return!1}return!!t&&"svg"in t};t.exports=i,t.exports.default=i}}},{package:"@metamask/snaps-sdk>is-svg",file:"../../node_modules/is-svg/index.js"}],[85,{"readable-stream":106},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("readable-stream");r.default=function(e){if(!(null==e?void 0:e.engine))throw new Error("Missing engine parameter!");const{engine:t}=e,r=new n.Duplex({objectMode:!0,read:()=>undefined,write:function(e,n,s){t.handle(e,((e,t)=>{r.push(t)})),s()}});return t.on&&t.on("notification",(e=>{r.push(e)})),r}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/createEngineStream.js"}],[86,{"@metamask/safe-event-emitter":33,"readable-stream":106},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const s=n(e("@metamask/safe-event-emitter")),i=e("readable-stream");r.default=function(e={}){const t={},r=new i.Duplex({objectMode:!0,read:()=>undefined,write:function(r,s,i){let a=null;try{!r.id?function(r){(null==e?void 0:e.retryOnMessage)&&r.method===e.retryOnMessage&&Object.values(t).forEach((({req:e,retryCount:r=0})=>{if(e.id){if(r>=3)throw new Error(`StreamMiddleware - Retry limit exceeded for request id "${e.id}"`);t[e.id].retryCount=r+1,o(e)}}));n.emit("notification",r)}(r):function(e){const r=e.id,n=t[r];if(!n)return void console.warn(`StreamMiddleware - Unknown response id "${r}"`);delete t[r],Object.assign(n.res,e),setTimeout(n.end)}(r)}catch(e){a=e}i(a)}}),n=new s.default;return{events:n,middleware:(e,r,n,s)=>{t[e.id]={req:e,res:r,next:n,end:s},o(e)},stream:r};function o(e){r.push(e)}}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/createStreamMiddleware.js"}],[87,{"./createEngineStream":85,"./createStreamMiddleware":86},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createStreamMiddleware=r.createEngineStream=void 0;const s=n(e("./createEngineStream"));r.createEngineStream=s.default;const i=n(e("./createStreamMiddleware"));r.createStreamMiddleware=i.default}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/index.js"}],[88,{wrappy:158},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("wrappy");function s(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function i(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=n(s),t.exports.strict=n(i),s.proto=s((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return s(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return i(this)},configurable:!0})}))}}},{package:"@metamask/object-multiplex>once",file:"../../node_modules/once/once.js"}],[89,{"./lib/error-with-cause":90,"./lib/helpers":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{ErrorWithCause:n}=e("./lib/error-with-cause"),{findCauseByReference:s,getErrorCause:i,messageWithCauses:o,stackWithCauses:a}=e("./lib/helpers");t.exports={ErrorWithCause:n,findCauseByReference:s,getErrorCause:i,stackWithCauses:a,messageWithCauses:o}}}},{package:"@metamask/utils>pony-cause",file:"../../node_modules/pony-cause/index.js"}],[90,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){class n extends Error{constructor(e,{cause:t}={}){super(e),this.name=n.name,t&&(this.cause=t),this.message=e}}t.exports={ErrorWithCause:n}}}},{package:"@metamask/utils>pony-cause",file:"../../node_modules/pony-cause/lib/error-with-cause.js"}],[91,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"==typeof e.cause){const t=e.cause();return t instanceof Error?t:undefined}return e.cause instanceof Error?e.cause:undefined}},s=(e,t)=>{if(!(e instanceof Error))return"";const r=e.stack||"";if(t.has(e))return r+"\ncauses have become circular...";const i=n(e);return i?(t.add(e),r+"\ncaused by: "+s(i,t)):r},i=(e,t,r)=>{if(!(e instanceof Error))return"";const s=r?"":e.message||"";if(t.has(e))return s+": ...";const o=n(e);if(o){t.add(e);const r="cause"in e&&"function"==typeof e.cause;return s+(r?"":": ")+i(o,t,r)}return s};t.exports={findCauseByReference:(e,t)=>{if(!e||!t)return;if(!(e instanceof Error))return;if(!(t.prototype instanceof Error)&&t!==Error)return;const r=new Set;let s=e;for(;s&&!r.has(s);){if(r.add(s),s instanceof t)return s;s=n(s)}},getErrorCause:n,stackWithCauses:e=>s(e,new Set),messageWithCauses:e=>i(e,new Set)}}}},{package:"@metamask/utils>pony-cause",file:"../../node_modules/pony-cause/lib/helpers.js"}],[92,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n={};function s(e,t,r){r||(r=Error);class s extends r{constructor(e,r,n){super(function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(e,r,n))}}s.prototype.name=r.name,s.prototype.code=e,n[e]=s}function i(e,t){if(Array.isArray(e)){const r=e.length;return e=e.map((e=>String(e))),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}s("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),s("ERR_INVALID_ARG_TYPE",(function(e,t,r){let n;var s,o;let a;if("string"==typeof t&&(s="not ",t.substr(!o||o<0?0:+o,s.length)===s)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(r===undefined||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a=`The ${e} ${n} ${i(t,"type")}`;else{const r=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a=`The "${e}" ${r} ${n} ${i(t,"type")}`}return a+=". Received type "+typeof r,a}),TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),s("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),s("ERR_STREAM_WRITE_AFTER_END","write after end"),s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),s("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n}}},{package:"readable-stream",file:"../../node_modules/readable-stream/errors.js"}],[93,{"./_stream_readable":95,"./_stream_writable":97,inherits:81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=u;var s=e("./_stream_readable"),i=e("./_stream_writable");e("inherits")(u,s);for(var o=n(i.prototype),a=0;a<o.length;a++){var c=o[a];u.prototype[c]||(u.prototype[c]=i.prototype[c])}function u(e){if(!(this instanceof u))return new u(e);s.call(this,e),i.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||process.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/_stream_duplex.js"}],[94,{"./_stream_transform":96,inherits:81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=s;var n=e("./_stream_transform");function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}e("inherits")(s,n),s.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/_stream_passthrough.js"}],[95,{"../errors":92,"./_stream_duplex":93,"./internal/streams/async_iterator":98,"./internal/streams/buffer_list":99,"./internal/streams/destroy":100,"./internal/streams/from":102,"./internal/streams/state":104,"./internal/streams/stream":105,buffer:"buffer",events:"events",inherits:81,"string_decoder/":153,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n;t.exports=S,S.ReadableState=_;e("events").EventEmitter;var s=function(e,t){return e.listeners(t).length},i=e("./internal/streams/stream"),o=e("buffer").Buffer,a=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,u=e("util");c=u&&u.debuglog?u.debuglog("stream"):function(){};var l,d,p,h=e("./internal/streams/buffer_list"),f=e("./internal/streams/destroy"),m=e("./internal/streams/state").getHighWaterMark,g=e("../errors").codes,b=g.ERR_INVALID_ARG_TYPE,y=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,v=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(S,i);var E=f.errorOrDestroy,k=["error","close","destroy","pause","resume"];function _(t,r,s){n=n||e("./_stream_duplex"),t=t||{},"boolean"!=typeof s&&(s=r instanceof n),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",s),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=e("string_decoder/").StringDecoder),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function S(t){if(n=n||e("./_stream_duplex"),!(this instanceof S))return new S(t);var r=this instanceof n;this._readableState=new _(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),i.call(this)}function T(e,t,r,n,s){c("readableAddChunk",t);var i,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}(e,u);else if(s||(i=function(e,t){var r;n=t,o.isBuffer(n)||n instanceof a||"string"==typeof t||t===undefined||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(u,t)),i)E(e,i);else if(u.objectMode||t&&t.length>0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),n)u.endEmitted?E(e,new v):x(e,u,t,!0);else if(u.ended)E(e,new y);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?x(e,u,t,!1):M(e,u)):x(e,u,t,!1)}else n||(u.reading=!1,M(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function x(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&j(e)),M(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=f.destroy,S.prototype._undestroy=f.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=o.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},S.prototype.unshift=function(e){return T(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){l||(l=e("string_decoder/").StringDecoder);var r=new l(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,s="";null!==n;)s+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==s&&this._readableState.buffer.push(s),this._readableState.length=s.length,this};var O=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(P,e))}function P(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,$(e)}function M(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(A,e,t))}function A(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function C(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){c("readable nexttick read 0"),e.read(0)}function I(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),$(e),t.flowing&&!t.reading&&e.read(0)}function $(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(F,t,e))}function F(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function B(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}S.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):j(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,s=t.needReadable;return c("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",s=!0),t.ended||t.reading?c("reading or ended",s=!1):s&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(r,t))),null===(n=e>0?L(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(e){E(this,new w("_read()"))},S.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,c("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?a:m;function o(t,s){c("onunpipe"),t===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,c("cleanup"),e.removeListener("close",h),e.removeListener("finish",f),e.removeListener("drain",u),e.removeListener("error",p),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",m),r.removeListener("data",d),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function a(){c("onend"),e.end()}n.endEmitted?process.nextTick(i):r.once("end",i),e.on("unpipe",o);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,$(e))}}(r);e.on("drain",u);var l=!1;function d(t){c("ondata");var s=e.write(t);c("dest.write",s),!1===s&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==B(n.pipes,e))&&!l&&(c("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function p(t){c("onerror",t),m(),e.removeListener("error",p),0===s(e,"error")&&E(e,t)}function h(){e.removeListener("finish",f),m()}function f(){c("onfinish"),e.removeListener("close",h),m()}function m(){c("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",h),e.once("finish",f),e.emit("pipe",r),n.flowing||(c("pipe resume"),r.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<s;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var o=B(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},S.prototype.on=function(e,t){var r=i.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c("on readable",n.length,n.reading),n.length?j(this):n.reading||process.nextTick(N,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var r=i.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(C,this),r},S.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&e!==undefined||process.nextTick(C,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(I,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var s in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){(c("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!r.objectMode||null!==s&&s!==undefined)&&((r.objectMode||s&&s.length)&&(t.push(s)||(n=!0,e.pause())))})),e)this[s]===undefined&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<k.length;i++)e.on(k[i],this.emit.bind(this,k[i]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return d===undefined&&(d=e("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=L,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,r){return p===undefined&&(p=e("./internal/streams/from")),p(S,t,r)})}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/_stream_readable.js"}],[96,{"../errors":92,"./_stream_duplex":93,inherits:81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=l;var n=e("../errors").codes,s=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,c=e("./_stream_duplex");function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);c.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush((function(t,r){p(e,t,r)}))}function p(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(l,c),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new s("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;(n.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,(function(e){t(e)}))}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/_stream_transform.js"}],[97,{"../errors":92,"./_stream_duplex":93,"./internal/streams/destroy":100,"./internal/streams/state":104,"./internal/streams/stream":105,buffer:"buffer",inherits:81,"util-deprecate":157},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var s=n.callback;t.pendingcb--,s(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var s;t.exports=S,S.WritableState=_;var i={deprecate:e("util-deprecate")},o=e("./internal/streams/stream"),a=e("buffer").Buffer,c=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,l=e("./internal/streams/destroy"),d=e("./internal/streams/state").getHighWaterMark,p=e("../errors").codes,h=p.ERR_INVALID_ARG_TYPE,f=p.ERR_METHOD_NOT_IMPLEMENTED,m=p.ERR_MULTIPLE_CALLBACK,g=p.ERR_STREAM_CANNOT_PIPE,b=p.ERR_STREAM_DESTROYED,y=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,v=p.ERR_UNKNOWN_ENCODING,E=l.errorOrDestroy;function k(){}function _(t,r,i){s=s||e("./_stream_duplex"),t=t||{},"boolean"!=typeof i&&(i=r instanceof s),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,s=r.writecb;if("function"!=typeof s)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,s){--t.pendingcb,r?(process.nextTick(s,n),process.nextTick(P,e,t),e._writableState.errorEmitted=!0,E(e,n)):(s(n),e._writableState.errorEmitted=!0,E(e,n),P(e,t))}(e,r,n,t,s);else{var i=R(r)||e.destroyed;i||r.corked||r.bufferProcessing||!r.bufferedRequest||O(e,r),n?process.nextTick(x,e,r,i,s):x(e,r,i,s)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function S(t){var r=this instanceof(s=s||e("./_stream_duplex"));if(!r&&!u.call(S,this))return new S(t);this._writableState=new _(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),o.call(this)}function T(e,t,r,n,s,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function x(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),P(e,t)}function O(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var s=t.bufferedRequestCount,i=new Array(s),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,T(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,d=r.callback;if(T(e,t,!1,t.objectMode?1:u.length,u,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function j(e,t){e._final((function(r){t.pendingcb--,r&&E(e,r),t.prefinished=!0,e.emit("prefinish"),P(e,t)}))}function P(e,t){var r=R(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(j,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}e("inherits")(S,o),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(_.prototype,"buffer",{get:i.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===S&&(e&&e._writableState instanceof _)}})):u=function(e){return e instanceof this},S.prototype.pipe=function(){E(this,new g)},S.prototype.write=function(e,t,r){var n,s=this._writableState,i=!1,o=!s.objectMode&&(n=e,a.isBuffer(n)||n instanceof c);return o&&!a.isBuffer(e)&&(e=function(e){return a.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=k),s.ending?function(e,t){var r=new w;E(e,r),process.nextTick(t,r)}(this,r):(o||function(e,t,r,n){var s;return null===r?s=new y:"string"==typeof r||t.objectMode||(s=new h("chunk",["string","Buffer"],r)),!s||(E(e,s),process.nextTick(n,s),!1)}(this,s,e,r))&&(s.pendingcb++,i=function(e,t,r,n,s,i){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,r));return t}(t,n,s);n!==o&&(r=!0,s="buffer",n=o)}var c=t.objectMode?1:n.length;t.length+=c;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:i,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,c,n,s,i);return u}(this,s,o,e,t,r)),i},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||O(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,r){r(new f("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=l.destroy,S.prototype._undestroy=l.undestroy,S.prototype._destroy=function(e,t){t(e)}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/_stream_writable.js"}],[98,{"./end-of-stream":101},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n;function s(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=e("./end-of-stream"),o=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),d=Symbol("handlePromise"),p=Symbol("stream");function h(e,t){return{value:e,done:t}}function f(e){var t=e[o];if(null!==t){var r=e[p].read();null!==r&&(e[l]=null,e[o]=null,e[a]=null,t(h(r,!1)))}}function m(e){process.nextTick(f,e)}var g=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((s(n={get stream(){return this[p]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(h(undefined,!0));if(this[p].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[c]?r(e[c]):t(h(undefined,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[u]?r(h(undefined,!0)):t[d](r,n)}),n)}}(n,this));else{var s=this[p].read();if(null!==s)return Promise.resolve(h(s,!1));r=new Promise(this[d])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),s(n,"return",(function(){var e=this;return new Promise((function(t,r){e[p].destroy(null,(function(e){e?r(e):t(h(undefined,!0))}))}))})),n),g);t.exports=function(e){var t,r=Object.create(b,(s(t={},p,{value:e,writable:!0}),s(t,o,{value:null,writable:!0}),s(t,a,{value:null,writable:!0}),s(t,c,{value:null,writable:!0}),s(t,u,{value:e._readableState.endEmitted,writable:!0}),s(t,d,{value:function(e,t){var n=r[p].read();n?(r[l]=null,r[o]=null,r[a]=null,e(h(n,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[l]=null,i(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[l]=null,r[o]=null,r[a]=null,t(e)),void(r[c]=e)}var n=r[o];null!==n&&(r[l]=null,r[o]=null,r[a]=null,n(h(undefined,!0))),r[u]=!0})),e.on("readable",m.bind(null,r)),r}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/async_iterator.js"}],[99,{buffer:"buffer",util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var c=e("buffer").Buffer,u=e("util").inspect,l=u&&u.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t,r,n,s=c.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=i.data,r=s,n=o,c.prototype.copy.call(t,r,n),o+=i.data.length,i=i.next;return s}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var s=t.data,i=e>s.length?s.length:e;if(i===s.length?n+=s:n+=s.slice(0,e),0==(e-=i)){i===s.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=s.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var s=r.data,i=e>s.length?s.length:e;if(s.copy(t,t.length-e,0,i),0==(e-=i)){i===s.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=s.slice(i));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return u(this,s(s({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/buffer_list.js"}],[100,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){i(e,t),s(e)}function s(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,e)):process.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?process.nextTick(s,r):(r._writableState.errorEmitted=!0,process.nextTick(n,r,e)):process.nextTick(n,r,e):t?(process.nextTick(s,r),t(e)):process.nextTick(s,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/destroy.js"}],[101,{"../../../errors":92},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function s(){}t.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];e.apply(this,n)}}}(i||s);var o=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,c=function(){t.writable||l()},u=t._writableState&&t._writableState.finished,l=function(){a=!1,u=!0,o||i.call(t)},d=t._readableState&&t._readableState.endEmitted,p=function(){o=!1,d=!0,a||i.call(t)},h=function(e){i.call(t,e)},f=function(){var e;return o&&!d?(t._readableState&&t._readableState.ended||(e=new n),i.call(t,e)):a&&!u?(t._writableState&&t._writableState.ended||(e=new n),i.call(t,e)):void 0},m=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",c),t.on("close",c)):(t.on("complete",l),t.on("abort",f),t.req?m():t.on("request",m)),t.on("end",p),t.on("finish",l),!1!==r.error&&t.on("error",h),t.on("close",f),function(){t.removeListener("complete",l),t.removeListener("abort",f),t.removeListener("request",m),t.req&&t.req.removeListener("finish",l),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",l),t.removeListener("end",p),t.removeListener("error",h),t.removeListener("close",f)}}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js"}],[102,{"../../../errors":92},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t,r,n,s,i,o){try{var a=e[i](o),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,s)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=e("../../../errors").codes.ERR_INVALID_ARG_TYPE;t.exports=function(e,t,r){var a;if(t&&"function"==typeof t.next)a=t;else if(t&&t[Symbol.asyncIterator])a=t[Symbol.asyncIterator]();else{if(!t||!t[Symbol.iterator])throw new o("iterable",["Iterable"],t);a=t[Symbol.iterator]()}var c=new e(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({objectMode:!0},r)),u=!1;function l(){return d.apply(this,arguments)}function d(){var e;return e=function*(){try{var e=yield a.next(),t=e.value;e.done?c.push(null):c.push(yield t)?l():u=!1}catch(e){c.destroy(e)}},d=function(){var t=this,r=arguments;return new Promise((function(s,i){var o=e.apply(t,r);function a(e){n(o,s,i,a,c,"next",e)}function c(e){n(o,s,i,a,c,"throw",e)}a(undefined)}))},d.apply(this,arguments)}return c._read=function(){u||(u=!0,l())},c}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/from.js"}],[103,{"../../../errors":92,"./end-of-stream":101},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n;var s=e("../../../errors").codes,i=s.ERR_MISSING_ARGS,o=s.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e){e()}function u(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];var l,d=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new i("streams");var p=r.map((function(t,s){var i=s<r.length-1;return function(t,r,s,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var a=!1;t.on("close",(function(){a=!0})),n===undefined&&(n=e("./end-of-stream")),n(t,{readable:r,writable:s},(function(e){if(e)return i(e);a=!0,i()}));var c=!1;return function(e){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void i(e||new o("pipe"))}}(t,i,s>0,(function(e){l||(l=e),e&&p.forEach(c),i||(p.forEach(c),d(l))}))}));return r.reduce(u)}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/pipeline.js"}],[104,{"../../../errors":92},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,s){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,s,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(s?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/state.js"}],[105,{stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("stream")}}},{package:"readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/stream.js"}],[106,{"./lib/_stream_duplex.js":93,"./lib/_stream_passthrough.js":94,"./lib/_stream_readable.js":95,"./lib/_stream_transform.js":96,"./lib/_stream_writable.js":97,"./lib/internal/streams/end-of-stream.js":101,"./lib/internal/streams/pipeline.js":103,stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("stream");"disable"===process.env.READABLE_STREAM&&n?(t.exports=n.Readable,Object.assign(t.exports,n),t.exports.Stream=n):((r=t.exports=e("./lib/_stream_readable.js")).Stream=n||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js"))}}},{package:"readable-stream",file:"../../node_modules/readable-stream/readable.js"}],[107,{buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
|
|
13295
13295
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
13296
|
-
var n=e("buffer"),s=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=o),o.prototype=Object.create(s.prototype),i(s,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"browserify>browser-pack>safe-buffer",file:"../../node_modules/safe-buffer/index.js"}],[163,{"../functions/cmp":167,"../internal/debug":192,"../internal/parse-options":194,"../internal/re":195,"./range":164,"./semver":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Symbol("SemVer ANY");class s{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof s){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==undefined?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):(!(t=i(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}t.exports=s;const i=e("../internal/parse-options"),{safeRe:o,t:a}=e("../internal/re"),c=e("../functions/cmp"),u=e("../internal/debug"),l=e("./semver"),d=e("./range")}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/comparator.js"}],[164,{"../internal/constants":191,"../internal/debug":192,"../internal/parse-options":194,"../internal/re":195,"./comparator":163,"./semver":165,"lru-cache":196},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){class n{constructor(e,t){if(t=i(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&h)|(this.options.loose&&m))+":"+e,r=s.get(t);if(r)return r;const n=this.options.loose,i=n?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(i,O(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],d),a("comparator trim",e),e=e.replace(u[l.TILDETRIM],f),a("tilde trim",e),e=e.replace(u[l.CARETTRIM],p),a("caret trim",e);let c=e.split(" ").map((e=>w(e,this.options))).join(" ").split(/\s+/).map((e=>j(e,this.options)));n&&(c=c.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(u[l.COMPARATORLOOSE]))))),a("range list",c);const b=new Map,y=c.map((e=>new o(e,this.options)));for(const e of y){if(g(e))return[e];b.set(e.value,e)}b.size>1&&b.has("")&&b.delete("");const v=[...b.values()];return s.set(t,v),v}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>y(r,t)&&e.set.some((e=>y(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}t.exports=n;const s=new(e("lru-cache"))({max:1e3}),i=e("../internal/parse-options"),o=e("./comparator"),a=e("../internal/debug"),c=e("./semver"),{safeRe:u,t:l,comparatorTrimReplace:d,tildeTrimReplace:f,caretTrimReplace:p}=e("../internal/re"),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:m}=e("../internal/constants"),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,y=(e,t)=>{let r=!0;const n=e.slice();let s=n.pop();for(;r&&n.length;)r=n.every((e=>s.intersects(e,t))),s=n.pop();return r},w=(e,t)=>(a("comp",e,t),e=S(e,t),a("caret",e),e=_(e,t),a("tildes",e),e=T(e,t),a("xrange",e),e=R(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{const r=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(r,((t,r,n,s,i)=>{let o;return a("tilde",e,t,r,n,s,i),v(r)?o="":v(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:v(s)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(a("replaceTilde pr",i),o=`>=${r}.${n}.${s}-${i} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${s} <${r}.${+n+1}.0-0`,a("tilde return",o),o}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>k(e,t))).join(" "),k=(e,t)=>{a("caret",e,t);const r=t.loose?u[l.CARETLOOSE]:u[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,s,i,o)=>{let c;return a("caret",e,t,r,s,i,o),v(r)?c="":v(s)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:v(i)?c="0"===r?`>=${r}.${s}.0${n} <${r}.${+s+1}.0-0`:`>=${r}.${s}.0${n} <${+r+1}.0.0-0`:o?(a("replaceCaret pr",o),c="0"===r?"0"===s?`>=${r}.${s}.${i}-${o} <${r}.${s}.${+i+1}-0`:`>=${r}.${s}.${i}-${o} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${i}-${o} <${+r+1}.0.0-0`):(a("no pr"),c="0"===r?"0"===s?`>=${r}.${s}.${i}${n} <${r}.${s}.${+i+1}-0`:`>=${r}.${s}.${i}${n} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${i} <${+r+1}.0.0-0`),a("caret return",c),c}))},T=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>x(e,t))).join(" ")),x=(e,t)=>{e=e.trim();const r=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(r,((r,n,s,i,o,c)=>{a("xRange",e,r,n,s,i,o,c);const u=v(s),l=u||v(i),d=l||v(o),f=d;return"="===n&&f&&(n=""),c=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(l&&(i=0),o=0,">"===n?(n=">=",l?(s=+s+1,i=0,o=0):(i=+i+1,o=0)):"<="===n&&(n="<",l?s=+s+1:i=+i+1),"<"===n&&(c="-0"),r=`${n+s}.${i}.${o}${c}`):l?r=`>=${s}.0.0${c} <${+s+1}.0.0-0`:d&&(r=`>=${s}.${i}.0${c} <${s}.${+i+1}.0-0`),a("xRange return",r),r}))},R=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),j=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),O=e=>(t,r,n,s,i,o,a,c,u,l,d,f,p)=>`${r=v(n)?"":v(s)?`>=${n}.0.0${e?"-0":""}`:v(i)?`>=${n}.${s}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=v(u)?"":v(l)?`<${+u+1}.0.0-0`:v(d)?`<${u}.${+l+1}.0-0`:f?`<=${u}.${l}.${d}-${f}`:e?`<${u}.${l}.${+d+1}-0`:`<=${c}`}`.trim(),P=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(a(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/range.js"}],[165,{"../internal/constants":191,"../internal/debug":192,"../internal/identifiers":193,"../internal/parse-options":194,"../internal/re":195},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../internal/debug"),{MAX_LENGTH:s,MAX_SAFE_INTEGER:i}=e("../internal/constants"),{safeRe:o,t:a}=e("../internal/re"),c=e("../internal/parse-options"),{compareIdentifiers:u}=e("../internal/identifiers");class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>s)throw new TypeError(`version is longer than ${s} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(n("prerelease compare",t,r,s),r===undefined&&s===undefined)return 0;if(s===undefined)return 1;if(r===undefined)return-1;if(r!==s)return u(r,s)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(n("prerelease compare",t,r,s),r===undefined&&s===undefined)return 0;if(s===undefined)return 1;if(r===undefined)return-1;if(r!==s)return u(r,s)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}t.exports=l}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/semver.js"}],[166,{"./parse":182},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/clean.js"}],[167,{"./eq":173,"./gt":174,"./gte":175,"./lt":177,"./lte":178,"./neq":181},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./eq"),s=e("./neq"),i=e("./gt"),o=e("./gte"),a=e("./lt"),c=e("./lte");t.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return s(e,r,u);case">":return i(e,r,u);case">=":return o(e,r,u);case"<":return a(e,r,u);case"<=":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/cmp.js"}],[168,{"../classes/semver":165,"../internal/re":195,"./parse":182},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("./parse"),{safeRe:i,t:o}=e("../internal/re");t.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=i[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),i[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[o.COERCERTL].lastIndex=-1}else r=e.match(i[o.COERCE]);return null===r?null:s(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/coerce.js"}],[169,{"../classes/semver":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>{const s=new n(e,r),i=new n(t,r);return s.compare(i)||s.compareBuild(i)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare-build.js"}],[170,{"./compare":171},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t)=>n(e,t,!0)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare-loose.js"}],[171,{"../classes/semver":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare.js"}],[172,{"./parse.js":182},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse.js");t.exports=(e,t)=>{const r=n(e,null,!0),s=n(t,null,!0),i=r.compare(s);if(0===i)return null;const o=i>0,a=o?r:s,c=o?s:r,u=!!a.prerelease.length;if(!!c.prerelease.length&&!u)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=u?"pre":"";return r.major!==s.major?l+"major":r.minor!==s.minor?l+"minor":r.patch!==s.patch?l+"patch":"prerelease"}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/diff.js"}],[173,{"./compare":171},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0===n(e,t,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/eq.js"}],[174,{"./compare":171},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/gt.js"}],[175,{"./compare":171},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>=0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/gte.js"}],[176,{"../classes/semver":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r,s,i)=>{"string"==typeof r&&(i=s,s=r,r=undefined);try{return new n(e instanceof n?e.version:e,r).inc(t,s,i).version}catch(e){return null}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/inc.js"}],[177,{"./compare":171},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/lt.js"}],[178,{"./compare":171},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<=0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/lte.js"}],[179,{"../classes/semver":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).major}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/major.js"}],[180,{"../classes/semver":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).minor}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/minor.js"}],[181,{"./compare":171},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0!==n(e,t,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/neq.js"}],[182,{"../classes/semver":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/parse.js"}],[183,{"../classes/semver":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).patch}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/patch.js"}],[184,{"./parse":182},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/prerelease.js"}],[185,{"./compare":171},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(t,e,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/rcompare.js"}],[186,{"./compare-build":169},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/rsort.js"}],[187,{"../classes/range":164},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/satisfies.js"}],[188,{"./compare-build":169},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/sort.js"}],[189,{"./parse":182},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/valid.js"}],[190,{"./classes/comparator":163,"./classes/range":164,"./classes/semver":165,"./functions/clean":166,"./functions/cmp":167,"./functions/coerce":168,"./functions/compare":171,"./functions/compare-build":169,"./functions/compare-loose":170,"./functions/diff":172,"./functions/eq":173,"./functions/gt":174,"./functions/gte":175,"./functions/inc":176,"./functions/lt":177,"./functions/lte":178,"./functions/major":179,"./functions/minor":180,"./functions/neq":181,"./functions/parse":182,"./functions/patch":183,"./functions/prerelease":184,"./functions/rcompare":185,"./functions/rsort":186,"./functions/satisfies":187,"./functions/sort":188,"./functions/valid":189,"./internal/constants":191,"./internal/identifiers":193,"./internal/re":195,"./ranges/gtr":197,"./ranges/intersects":198,"./ranges/ltr":199,"./ranges/max-satisfying":200,"./ranges/min-satisfying":201,"./ranges/min-version":202,"./ranges/outside":203,"./ranges/simplify":204,"./ranges/subset":205,"./ranges/to-comparators":206,"./ranges/valid":207},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./internal/re"),s=e("./internal/constants"),i=e("./classes/semver"),o=e("./internal/identifiers"),a=e("./functions/parse"),c=e("./functions/valid"),u=e("./functions/clean"),l=e("./functions/inc"),d=e("./functions/diff"),f=e("./functions/major"),p=e("./functions/minor"),h=e("./functions/patch"),m=e("./functions/prerelease"),g=e("./functions/compare"),b=e("./functions/rcompare"),y=e("./functions/compare-loose"),w=e("./functions/compare-build"),v=e("./functions/sort"),_=e("./functions/rsort"),E=e("./functions/gt"),S=e("./functions/lt"),k=e("./functions/eq"),T=e("./functions/neq"),x=e("./functions/gte"),R=e("./functions/lte"),j=e("./functions/cmp"),O=e("./functions/coerce"),P=e("./classes/comparator"),A=e("./classes/range"),M=e("./functions/satisfies"),I=e("./ranges/to-comparators"),N=e("./ranges/max-satisfying"),C=e("./ranges/min-satisfying"),$=e("./ranges/min-version"),L=e("./ranges/valid"),D=e("./ranges/outside"),B=e("./ranges/gtr"),W=e("./ranges/ltr"),F=e("./ranges/intersects"),V=e("./ranges/simplify"),U=e("./ranges/subset");t.exports={parse:a,valid:c,clean:u,inc:l,diff:d,major:f,minor:p,patch:h,prerelease:m,compare:g,rcompare:b,compareLoose:y,compareBuild:w,sort:v,rsort:_,gt:E,lt:S,eq:k,neq:T,gte:x,lte:R,cmp:j,coerce:O,Comparator:P,Range:A,satisfies:M,toComparators:I,maxSatisfying:N,minSatisfying:C,minVersion:$,validRange:L,outside:D,gtr:B,ltr:W,intersects:F,simplifyRange:V,subset:U,SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:s.SEMVER_SPEC_VERSION,RELEASE_TYPES:s.RELEASE_TYPES,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/index.js"}],[191,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/constants.js"}],[192,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};t.exports=n}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/debug.js"}],[193,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=/^[0-9]+$/,s=(e,t)=>{const r=n.test(e),s=n.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:s,rcompareIdentifiers:(e,t)=>s(t,e)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/identifiers.js"}],[194,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Object.freeze({loose:!0}),s=Object.freeze({});t.exports=e=>e?"object"!=typeof e?n:e:s}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/parse-options.js"}],[195,{"./constants":191,"./debug":192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:i}=e("./constants"),o=e("./debug"),a=(r=t.exports={}).re=[],c=r.safeRe=[],u=r.src=[],l=r.t={};let d=0;const f="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",i],[f,s]],h=(e,t,r)=>{const n=(e=>{for(const[t,r]of p)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),s=d++;o(e,s,t),l[e]=s,u[s]=t,a[s]=new RegExp(t,r?"g":undefined),c[s]=new RegExp(n,r?"g":undefined)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),h("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${f}+`),h("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),h("FULL",`^${u[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),h("LOOSE",`^${u[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),h("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),h("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),h("COERCERTL",u[l.COERCE],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",h("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",h("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/re.js"}],[196,{yallist:215},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("yallist"),s=Symbol("max"),i=Symbol("length"),o=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),f=Symbol("cache"),p=Symbol("updateAgeOnGet"),h=()=>1;const m=(e,t,r)=>{const n=e[f].get(t);if(n){const t=n.value;if(g(e,t)){if(y(e,n),!e[a])return undefined}else r&&(e[p]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},b=e=>{if(e[i]>e[s])for(let t=e[d].tail;e[i]>e[s]&&null!==t;){const r=t.prev;y(e,t),t=r}},y=(e,t)=>{if(t){const r=t.value;e[u]&&e[u](r.key,r.value),e[i]-=r.length,e[f].delete(r.key),e[d].removeNode(t)}};class w{constructor(e,t,r,n,s){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=s||0}}const v=(e,t,r,n)=>{let s=r.value;g(e,s)&&(y(e,r),e[a]||(s=undefined)),s&&t.call(n,s.value,s.key,e)};t.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[s]=e.max||Infinity;const t=e.length||h;if(this[o]="function"!=typeof t?h:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[s]=e||Infinity,b(this)}get max(){return this[s]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,b(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[o]&&(this[o]=e,this[i]=0,this[d].forEach((e=>{e.length=this[o](e.value,e.key),this[i]+=e.length}))),b(this)}get lengthCalculator(){return this[o]}get length(){return this[i]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){const n=r.prev;v(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){const n=r.next;v(this,e,r,t),r=n}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[u]&&this[d]&&this[d].length&&this[d].forEach((e=>this[u](e.key,e.value))),this[f]=new Map,this[d]=new n,this[i]=0}dump(){return this[d].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[o](t,e);if(this[f].has(e)){if(a>this[s])return y(this,this[f].get(e)),!1;const o=this[f].get(e).value;return this[u]&&(this[l]||this[u](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[i]+=a-o.length,o.length=a,this.get(e),b(this),!0}const p=new w(e,t,a,n,r);return p.length>this[s]?(this[u]&&this[u](e,t),!1):(this[i]+=p.length,this[d].unshift(p),this[f].set(e,this[d].head),b(this),!0)}has(e){if(!this[f].has(e))return!1;const t=this[f].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[d].tail;return e?(y(this,e),e.value):null}del(e){y(this,this[f].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],s=n.e||0;if(0===s)this.set(n.k,n.v);else{const e=s-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[f].forEach(((e,t)=>m(this,t,!1)))}}}}},{package:"@swc/cli>semver>lru-cache",file:"../../node_modules/semver/node_modules/lru-cache/index.js"}],[197,{"./outside":203},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,">",r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/gtr.js"}],[198,{"../classes/range":164},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/intersects.js"}],[199,{"./outside":203},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,"<",r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/ltr.js"}],[200,{"../classes/range":164,"../classes/semver":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range");t.exports=(e,t,r)=>{let i=null,o=null,a=null;try{a=new s(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&-1!==o.compare(e)||(i=e,o=new n(i,r)))})),i}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/max-satisfying.js"}],[201,{"../classes/range":164,"../classes/semver":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range");t.exports=(e,t,r)=>{let i=null,o=null,a=null;try{a=new s(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&1!==o.compare(e)||(i=e,o=new n(i,r)))})),i}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/min-satisfying.js"}],[202,{"../classes/range":164,"../classes/semver":165,"../functions/gt":174},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range"),i=e("../functions/gt");t.exports=(e,t)=>{e=new s(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let o=null;s.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!i(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!o||r&&!i(r,o)||(r=o)}return r&&e.test(r)?r:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/min-version.js"}],[203,{"../classes/comparator":163,"../classes/range":164,"../classes/semver":165,"../functions/gt":174,"../functions/gte":175,"../functions/lt":177,"../functions/lte":178,"../functions/satisfies":187},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/comparator"),{ANY:i}=s,o=e("../classes/range"),a=e("../functions/satisfies"),c=e("../functions/gt"),u=e("../functions/lt"),l=e("../functions/lte"),d=e("../functions/gte");t.exports=(e,t,r,f)=>{let p,h,m,g,b;switch(e=new n(e,f),t=new o(t,f),r){case">":p=c,h=l,m=u,g=">",b=">=";break;case"<":p=u,h=d,m=c,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,f))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let o=null,a=null;if(n.forEach((e=>{e.semver===i&&(e=new s(">=0.0.0")),o=o||e,a=a||e,p(e.semver,o.semver,f)?o=e:m(e.semver,a.semver,f)&&(a=e)})),o.operator===g||o.operator===b)return!1;if((!a.operator||a.operator===g)&&h(e,a.semver))return!1;if(a.operator===b&&m(e,a.semver))return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/outside.js"}],[204,{"../functions/compare.js":171,"../functions/satisfies.js":187},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../functions/satisfies.js"),s=e("../functions/compare.js");t.exports=(e,t,r)=>{const i=[];let o=null,a=null;const c=e.sort(((e,t)=>s(e,t,r)));for(const e of c){n(e,t,r)?(a=e,o||(o=e)):(a&&i.push([o,a]),a=null,o=null)}o&&i.push([o,null]);const u=[];for(const[e,t]of i)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length<d.length?l:t}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/simplify.js"}],[205,{"../classes/comparator.js":163,"../classes/range.js":164,"../functions/compare.js":171,"../functions/satisfies.js":187},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range.js"),s=e("../classes/comparator.js"),{ANY:i}=s,o=e("../functions/satisfies.js"),a=e("../functions/compare.js"),c=[new s(">=0.0.0-0")],u=[new s(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===i){if(r.includePrerelease)return!0;t=u}const n=new Set;let s,l,p,h,m,g,b;for(const t of e)">"===t.operator||">="===t.operator?s=d(s,t,r):"<"===t.operator||"<="===t.operator?l=f(l,t,r):n.add(t.semver);if(n.size>1)return null;if(s&&l){if(p=a(s.semver,l.semver,r),p>0)return null;if(0===p&&(">="!==s.operator||"<="!==l.operator))return null}for(const e of n){if(s&&!o(e,String(s),r))return null;if(l&&!o(e,String(l),r))return null;for(const n of t)if(!o(e,String(n),r))return!1;return!0}let y=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,w=!(!s||r.includePrerelease||!s.semver.prerelease.length)&&s.semver;y&&1===y.prerelease.length&&"<"===l.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(b=b||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,s)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),">"===e.operator||">="===e.operator){if(h=d(s,e,r),h===e&&h!==s)return!1}else if(">="===s.operator&&!o(s.semver,String(e),r))return!1;if(l)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(m=f(l,e,r),m===e&&m!==l)return!1}else if("<="===l.operator&&!o(l.semver,String(e),r))return!1;if(!e.operator&&(l||s)&&0!==p)return!1}return!(s&&g&&!l&&0!==p)&&(!(l&&b&&!s&&0!==p)&&(!w&&!y))},d=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},f=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};t.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let s=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/subset.js"}],[206,{"../classes/range":164},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/to-comparators.js"}],[207,{"../classes/range":164},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/valid.js"}],[208,{"safe-buffer":162},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=o(t[n]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"browserify>string_decoder",file:"../../node_modules/string_decoder/lib/string_decoder.js"}],[209,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=/^[-+]?0x[a-fA-F0-9]+$/,s=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(e,t={}){if(t=Object.assign({},i,t),!e||"string"!=typeof e)return e;let r=e.trim();if(t.skipLike!==undefined&&t.skipLike.test(r))return e;if(t.hex&&n.test(r))return Number.parseInt(r,16);{const n=s.exec(r);if(n){const s=n[1],i=n[2];let o=function(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(n[3]);const a=n[4]||n[6];if(!t.leadingZeros&&i.length>0&&s&&"."!==r[2])return e;if(!t.leadingZeros&&i.length>0&&!s&&"."!==r[1])return e;{const n=Number(r),c=""+n;return-1!==c.search(/[eE]/)||a?t.eNotation?n:e:-1!==r.indexOf(".")?"0"===c&&""===o||c===o||s&&c==="-"+o?n:e:i?o===c||s+o===c?n:e:r===c||r===s+c?n:e}}return e}}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser>strnum",file:"../../node_modules/strnum/strnum.js"}],[210,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?n(r):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).Superstruct={})}(this,(function(e){class t extends TypeError{constructor(e,t){let r;const{message:n,explanation:s,...i}=e,{path:o}=e,a=0===o.length?n:`At path: ${o.join(".")} -- ${n}`;super(s??a),null!=s&&(this.cause=a),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function r(e){return"object"==typeof e&&null!=e}function n(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function i(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:c,key:i[i.length-1],path:i,branch:o,...e,message:u}}function*o(e,t,n,s){var o;r(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const r of e){const e=i(r,t,n,s);e&&(yield e)}}function*a(e,t,n={}){const{path:s=[],branch:i=[e],coerce:o=!1,mask:c=!1}=n,u={path:s,branch:i};if(o&&(e=t.coercer(e,u),c&&"type"!==t.type&&r(t.schema)&&r(e)&&!Array.isArray(e)))for(const r in e)t.schema[r]===undefined&&delete e[r];let l="valid";for(const r of t.validator(e,u))r.explanation=n.message,l="not_valid",yield[r,undefined];for(let[d,f,p]of t.entries(e,u)){const t=a(f,p,{path:d===undefined?s:[...s,d],branch:d===undefined?i:[...i,f],coerce:o,mask:c,message:n.message});for(const n of t)n[0]?(l=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],undefined]):o&&(f=n[1],d===undefined?e=f:e instanceof Map?e.set(d,f):e instanceof Set?e.add(f):r(e)&&(f!==undefined||d in e)&&(e[d]=f))}if("not_valid"!==l)for(const r of t.refiner(e,u))r.explanation=n.message,l="not_refined",yield[r,undefined];"valid"===l&&(yield[undefined,e])}class c{constructor(e){const{type:t,schema:r,validator:n,refiner:s,coercer:i=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=i,this.validator=n?(e,t)=>o(n(e,t),t,this,e):()=>[],this.refiner=s?(e,t)=>o(s(e,t),t,this,e):()=>[]}assert(e,t){return u(e,this,t)}create(e,t){return l(e,this,t)}is(e){return f(e,this)}mask(e,t){return d(e,this,t)}validate(e,t={}){return p(e,this,t)}}function u(e,t,r){const n=p(e,t,{message:r});if(n[0])throw n[0]}function l(e,t,r){const n=p(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t,r){const n=p(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function f(e,t){return!p(e,t)[0]}function p(e,r,n={}){const s=a(e,r,n),i=function(e){const{done:t,value:r}=e.next();return t?undefined:r}(s);if(i[0]){return[new t(i[0],(function*(){for(const e of s)e[0]&&(yield e[0])})),undefined]}{const e=i[1];return[undefined,e]}}function h(e,t){return new c({type:e,schema:null,validator:t})}function m(){return h("never",(()=>!1))}function g(e){const t=e?Object.keys(e):[],n=m();return new c({type:"object",schema:e||null,*entries(s){if(e&&r(s)){const r=new Set(Object.keys(s));for(const n of t)r.delete(n),yield[n,s[n],e[n]];for(const e of r)yield[e,s[e],n]}},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>r(e)?{...e}:e})}function b(e){return new c({...e,validator:(t,r)=>t===undefined||e.validator(t,r),refiner:(t,r)=>t===undefined||e.refiner(t,r)})}function y(){return h("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function w(e){const t=Object.keys(e);return new c({type:"type",schema:e,*entries(n){if(r(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>r(e)?{...e}:e})}function v(){return h("unknown",(()=>!0))}function _(e,t,r){return new c({...e,coercer:(n,s)=>f(n,t)?e.coercer(r(n,s),s):e.coercer(n,s)})}function E(e){return e instanceof Map||e instanceof Set?e.size:e.length}function S(e,t,r){return new c({...e,*refiner(n,s){yield*e.refiner(n,s);const i=o(r(n,s),s,e,n);for(const e of i)yield{...e,refinement:t}}})}e.Struct=c,e.StructError=t,e.any=function(){return h("any",(()=>!0))},e.array=function(e){return new c({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})},e.assert=u,e.assign=function(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?w(n):g(n)},e.bigint=function(){return h("bigint",(e=>"bigint"==typeof e))},e.boolean=function(){return h("boolean",(e=>"boolean"==typeof e))},e.coerce=_,e.create=l,e.date=function(){return h("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))},e.defaulted=function(e,t,r={}){return _(e,v(),(e=>{const s="function"==typeof t?t():t;if(e===undefined)return s;if(!r.strict&&n(e)&&n(s)){const t={...e};let r=!1;for(const e in s)t[e]===undefined&&(t[e]=s[e],r=!0);if(r)return t}return e}))},e.define=h,e.deprecated=function(e,t){return new c({...e,refiner:(t,r)=>t===undefined||e.refiner(t,r),validator:(r,n)=>r===undefined||(t(r,n),e.validator(r,n))})},e.dynamic=function(e){return new c({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})},e.empty=function(e){return S(e,"empty",(t=>{const r=E(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))},e.enums=function(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new c({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})},e.func=function(){return h("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))},e.instance=function(e){return h("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))},e.integer=function(){return h("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))},e.intersection=function(e){return new c({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})},e.is=f,e.lazy=function(e){let t;return new c({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})},e.literal=function(e){const t=s(e),r=typeof e;return new c({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})},e.map=function(e,t){return new c({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,s]of r.entries())yield[n,n,e],yield[n,s,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})},e.mask=d,e.max=function(e,t,r={}){const{exclusive:n}=r;return S(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.min=function(e,t,r={}){const{exclusive:n}=r;return S(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.never=m,e.nonempty=function(e){return S(e,"nonempty",(t=>E(t)>0||`Expected a nonempty ${e.type} but received an empty one`))},e.nullable=function(e){return new c({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})},e.number=function(){return h("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))},e.object=g,e.omit=function(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?w(n):g(n)},e.optional=b,e.partial=function(e){const t=e instanceof c?{...e.schema}:{...e};for(const e in t)t[e]=b(t[e]);return g(t)},e.pattern=function(e,t){return S(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))},e.pick=function(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return g(n)},e.record=function(e,t){return new c({type:"record",schema:null,*entries(n){if(r(n))for(const r in n){const s=n[r];yield[r,r,e],yield[r,s,t]}},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`})},e.refine=S,e.regexp=function(){return h("regexp",(e=>e instanceof RegExp))},e.set=function(e){return new c({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})},e.size=function(e,t,r=t){const n=`Expected a ${e.type}`,s=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return S(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${s} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=r||`${n} with a size ${s} but received one with a size of \`${i}\``}{const{length:i}=e;return t<=i&&i<=r||`${n} with a length ${s} but received one with a length of \`${i}\``}}))},e.string=y,e.struct=function(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),h(e,t)},e.trimmed=function(e){return _(e,y(),(e=>e.trim()))},e.tuple=function(e){const t=m();return new c({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let s=0;s<n;s++)yield[s,r[s],e[s]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${s(e)}`})},e.type=w,e.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new c({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const i=[];for(const t of e){const[...e]=a(r,t,n),[s]=e;if(!s[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...i]}})},e.unknown=v,e.validate=p}))}}},{package:"superstruct",file:"../../node_modules/superstruct/dist/index.cjs"}],[211,{"has-flag":134,os:"os",tty:"tty"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("os"),s=e("tty"),i=e("has-flag"),{env:o}=process;let a;function c(e,{streamIsTTY:t,sniffFlags:r=!0}={}){const s=function(){if("FORCE_COLOR"in o)return"true"===o.FORCE_COLOR?1:"false"===o.FORCE_COLOR?0:0===o.FORCE_COLOR.length?1:Math.min(Number.parseInt(o.FORCE_COLOR,10),3)}();s!==undefined&&(a=s);const c=r?a:s;if(0===c)return 0;if(r){if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2}if(e&&!t&&c===undefined)return 0;const u=c||0;if("dumb"===o.TERM)return u;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((e=>e in o))||"codeship"===o.CI_NAME?1:u;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=Number.parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:u}function u(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(c(e,{streamIsTTY:e&&e.isTTY,...t}))}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?a=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(a=1),t.exports={supportsColor:u,stdout:u({isTTY:s.isatty(1)}),stderr:u({isTTY:s.isatty(2)})}}}},{package:"@wdio/mocha-framework>mocha>supports-color",file:"../../node_modules/supports-color/index.js"}],[212,{util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("util").deprecate}}},{package:"readable-stream>util-deprecate",file:"../../node_modules/util-deprecate/node.js"}],[213,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),s=e[e.length-1];return"function"==typeof n&&n!==s&&Object.keys(s).forEach((function(e){n[e]=s[e]})),n}}}}},{package:"@metamask/object-multiplex>once>wrappy",file:"../../node_modules/wrappy/wrappy.js"}],[214,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}}}},{package:"@swc/cli>semver>lru-cache>yallist",file:"../../node_modules/yallist/iterator.js"}],[215,{"./iterator.js":214},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function s(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function i(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}t.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.pop=function(){if(!this.tail)return undefined;var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e},n.prototype.shift=function(){if(!this.head)return undefined;var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var s=0;null!==n;s++)r=e(r,n.value,s),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var s=this.length-1;null!==n;s--)r=e(r,n.value,s),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;var o=[];for(n=0;i&&n<t;n++)o.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(n=0;n<r.length;n++)i=s(this,i,r[n]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{e("./iterator.js")(n)}catch(e){}}}},{package:"@swc/cli>semver>lru-cache>yallist",file:"../../node_modules/yallist/yallist.js"}],[216,{"../logging":235,"./../../../snaps-sdk/src":241,"./../../../snaps-utils/src/index.executionenv":297,"./commands":217,"./endowments":222,"./globalEvents":229,"./sortParams":232,"./utils":233,"./validation":234,"@metamask/json-rpc-engine":6,"@metamask/providers":47,"@metamask/rpc-errors":57,"@metamask/utils":81,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BaseSnapExecutor=void 0;var n=e("@metamask/json-rpc-engine"),s=e("@metamask/providers"),i=e("@metamask/rpc-errors"),o=e("./../../../snaps-sdk/src"),a=e("./../../../snaps-utils/src/index.executionenv"),c=e("@metamask/utils"),u=e("superstruct"),l=e("../logging"),d=e("./commands"),f=e("./endowments"),p=e("./globalEvents"),h=e("./sortParams"),m=e("./utils"),g=e("./validation");function b(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function y(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const v={code:i.errorCodes.rpc.internal,message:"Execution Environment Error"},_=i.rpcErrors.internal({message:"Unhandled Snap Error"}).serialize(),E={ping:{struct:g.PingRequestArgumentsStruct,params:[]},executeSnap:{struct:g.ExecuteSnapRequestArgumentsStruct,params:["snapId","sourceCode","endowments"]},terminate:{struct:g.TerminateRequestArgumentsStruct,params:[]},snapRpc:{struct:g.SnapRpcRequestArgumentsStruct,params:["target","handler","origin","request"]}};var S=new WeakSet,k=new WeakSet,T=new WeakSet;async function x(e){return new Promise(((t,r)=>{this.commandStream.write(e,(e=>{e?r(e):t()}))}))}async function R(e){if(!(0,c.isValidJson)(e)||!(0,c.isObject)(e))throw i.rpcErrors.internal("JSON-RPC notifications must be JSON serializable objects");await w(this,S,x).call(this,{...e,jsonrpc:"2.0"})}async function j(e,t){(0,c.isValidJson)(t)&&(0,c.isObject)(t)?await w(this,S,x).call(this,{...t,id:e,jsonrpc:"2.0"}):await w(this,S,x).call(this,{error:(0,i.serializeError)(i.rpcErrors.internal("JSON-RPC responses must be JSON serializable objects.")),id:e,jsonrpc:"2.0"})}r.BaseSnapExecutor=class{constructor(e,t){b(this,T),b(this,k),b(this,S),y(this,"snapData",void 0),y(this,"commandStream",void 0),y(this,"rpcStream",void 0),y(this,"methods",void 0),y(this,"snapErrorHandler",void 0),y(this,"snapPromiseErrorHandler",void 0),y(this,"lastTeardown",0),this.snapData=new Map,this.commandStream=e,this.commandStream.on("data",(e=>{this.onCommandRequest(e).catch((e=>{(0,a.logError)(e)}))})),this.rpcStream=t,this.methods=(0,d.getCommandMethodImplementations)(this.startSnap.bind(this),(async(e,t,r)=>{const n=this.snapData.get(e),s=null==n?void 0:n.exports[t],{required:o}=a.SNAP_EXPORTS[t];if((0,c.assert)(!o||s!==undefined,`No ${t} handler exported for snap "${e}`,i.rpcErrors.methodNotSupported),!s)return null;let u=await this.executeInSnapContext(e,(()=>s(r)));u===undefined&&(u=null);try{return(0,c.getSafeJson)(u)}catch(e){throw i.rpcErrors.internal(`Received non-JSON-serializable value: ${e.message.replace(/^Assertion failed: /u,"")}`)}}),this.onTerminate.bind(this))}errorHandler(e,t){const r=(0,i.serializeError)(e,{fallbackError:_,shouldIncludeStack:!1}),n=(0,o.getErrorData)(r);w(this,k,R).call(this,{method:"UnhandledError",params:{error:{...r,data:{...n,...t}}}}).catch((e=>{(0,a.logError)(e)}))}async onCommandRequest(e){if(!(0,c.isJsonRpcRequest)(e))return void((0,c.hasProperty)(e,"id")&&(0,u.is)(e.id,c.JsonRpcIdStruct)?await w(this,S,x).call(this,{error:(0,i.serializeError)(i.rpcErrors.internal("JSON-RPC requests must be JSON serializable objects.")),id:e.id,jsonrpc:"2.0"}):(0,a.logInfo)("Command stream received a non-JSON-RPC request, and was unable to respond."));const{id:t,method:r,params:n}=e;if(!(0,c.hasProperty)(E,r))return void await w(this,T,j).call(this,t,{error:i.rpcErrors.methodNotFound({data:{method:r}}).serialize()});const s=E[r],o=(0,h.sortParamKeys)(s.params,n),[l]=(0,u.validate)(o,s.struct);if(l)await w(this,T,j).call(this,t,{error:i.rpcErrors.invalidParams({message:`Invalid parameters for method "${r}": ${l.message}.`,data:{method:r,params:o}}).serialize()});else try{const e=await this.methods[r](...o);await w(this,T,j).call(this,t,{result:e})}catch(e){await w(this,T,j).call(this,t,{error:(0,i.serializeError)(e,{fallbackError:v})})}}async startSnap(e,t,r){(0,l.log)(`Starting snap '${e}' in worker.`),this.snapPromiseErrorHandler&&(0,p.removeEventListener)("unhandledrejection",this.snapPromiseErrorHandler),this.snapErrorHandler&&(0,p.removeEventListener)("error",this.snapErrorHandler),this.snapErrorHandler=t=>{this.errorHandler(t.error,{snapId:e})},this.snapPromiseErrorHandler=t=>{this.errorHandler(t instanceof Error?t:t.reason,{snapId:e})};const o=new s.StreamProvider(this.rpcStream,{jsonRpcStreamName:"metamask-provider",rpcMiddleware:[(0,n.createIdRemapMiddleware)()]});await o.initialize();const c=this.createSnapGlobal(o),u=this.createEIP1193Provider(o),d={exports:{}};try{const{endowments:n,teardown:s}=(0,f.createEndowments)({snap:c,ethereum:u,snapId:e,endowments:r,notify:w(this,k,R).bind(this)});this.snapData.set(e,{idleTeardown:s,runningEvaluations:new Set,exports:{}}),(0,p.addEventListener)("unhandledRejection",this.snapPromiseErrorHandler),(0,p.addEventListener)("error",this.snapErrorHandler);const i=new Compartment({...n,module:d,exports:d.exports});i.globalThis.self=i.globalThis,i.globalThis.global=i.globalThis,i.globalThis.window=i.globalThis,await this.executeInSnapContext(e,(()=>{i.evaluate(t),this.registerSnapExports(e,d)}))}catch(t){this.removeSnap(e);const[r]=(0,a.unwrapError)(t);throw i.rpcErrors.internal({message:`Error while running snap '${e}': ${r.message}`,data:{cause:r.serialize()}})}}onTerminate(){this.snapData.forEach((e=>e.runningEvaluations.forEach((e=>e.stop())))),this.snapData.clear()}registerSnapExports(e,t){const r=this.snapData.get(e);r&&(r.exports=a.SNAP_EXPORT_NAMES.reduce(((e,r)=>{const n=t.exports[r],{validator:s}=a.SNAP_EXPORTS[r];return s(n)?{...e,[r]:n}:e}),{}))}createSnapGlobal(e){const t=e.request.bind(e),r=async e=>{const r=(0,m.sanitizeRequestArguments)(e);return(0,m.assertSnapOutboundRequest)(r),await(0,m.withTeardown)((async()=>{await w(this,k,R).call(this,{method:"OutboundRequest",params:{source:"snap.request"}});try{return await t(r)}finally{await w(this,k,R).call(this,{method:"OutboundResponse",params:{source:"snap.request"}})}})(),this)},n=new Proxy({},{has:(e,t)=>"string"==typeof t&&["request"].includes(t),get:(e,t)=>"request"===t?r:undefined});return harden(n)}createEIP1193Provider(e){const t=e.request.bind(e),r=(0,m.proxyStreamProvider)(e,(async e=>{const r=(0,m.sanitizeRequestArguments)(e);return(0,m.assertEthereumOutboundRequest)(r),await(0,m.withTeardown)((async()=>{await w(this,k,R).call(this,{method:"OutboundRequest",params:{source:"ethereum.request"}});try{return await t(r)}finally{await w(this,k,R).call(this,{method:"OutboundResponse",params:{source:"ethereum.request"}})}})(),this)}));return harden(r)}removeSnap(e){this.snapData.delete(e)}async executeInSnapContext(e,t){const r=this.snapData.get(e);if(r===undefined)throw i.rpcErrors.internal(`Tried to execute in context of unknown snap: "${e}".`);let n;const s=new Promise(((t,r)=>n=()=>r(i.rpcErrors.internal(`The snap "${e}" has been terminated during execution.`)))),o={stop:n};try{return r.runningEvaluations.add(o),await Promise.race([t(),s])}catch(e){throw new a.WrappedSnapError(e)}finally{r.runningEvaluations.delete(o),0===r.runningEvaluations.size&&(this.lastTeardown+=1,await r.idleTeardown())}}}}}},{package:"$root$",file:"src/common/BaseSnapExecutor.ts"}],[217,{"./../../../snaps-utils/src/index.executionenv":297,"./validation":234,"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getCommandMethodImplementations=function(e,t,r){return{ping:async()=>Promise.resolve("OK"),terminate:async()=>(r(),Promise.resolve("OK")),executeSnap:async(t,r,n)=>(await e(t,r,n),"OK"),snapRpc:async(e,r,n,s)=>await t(e,r,o(n,r,s))??null}},r.getHandlerArguments=o;var n=e("./../../../snaps-utils/src/index.executionenv"),s=e("@metamask/utils"),i=e("./validation");function o(e,t,r){switch(t){case n.HandlerType.OnTransaction:{(0,i.assertIsOnTransactionRequestArguments)(r.params);const{transaction:e,chainId:t,transactionOrigin:n}=r.params;return{transaction:e,chainId:t,transactionOrigin:n}}case n.HandlerType.OnSignature:{(0,i.assertIsOnSignatureRequestArguments)(r.params);const{signature:e,signatureOrigin:t}=r.params;return{signature:e,signatureOrigin:t}}case n.HandlerType.OnNameLookup:{(0,i.assertIsOnNameLookupRequestArguments)(r.params);const{chainId:e,domain:t,address:n}=r.params;return t?{chainId:e,domain:t}:{chainId:e,address:n}}case n.HandlerType.OnRpcRequest:case n.HandlerType.OnKeyringRequest:return{origin:e,request:r};case n.HandlerType.OnCronjob:case n.HandlerType.OnInstall:case n.HandlerType.OnUpdate:return{request:r};case n.HandlerType.OnHomePage:return{};default:return(0,s.assertExhaustive)(t)}}}}},{package:"$root$",file:"src/common/commands.ts"}],[218,{"../globalObject":230,"./console":219,"./crypto":220,"./date":221,"./interval":223,"./math":224,"./network":225,"./textDecoder":226,"./textEncoder":227,"./timeout":228},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject"),s=p(e("./console")),i=p(e("./crypto")),o=p(e("./date")),a=p(e("./interval")),c=p(e("./math")),u=p(e("./network")),l=p(e("./textDecoder")),d=p(e("./textEncoder")),f=p(e("./timeout"));function p(e){return e&&e.__esModule?e:{default:e}}const h=[{endowment:AbortController,name:"AbortController"},{endowment:AbortSignal,name:"AbortSignal"},{endowment:ArrayBuffer,name:"ArrayBuffer"},{endowment:atob,name:"atob",bind:!0},{endowment:BigInt,name:"BigInt"},{endowment:BigInt64Array,name:"BigInt64Array"},{endowment:BigUint64Array,name:"BigUint64Array"},{endowment:btoa,name:"btoa",bind:!0},{endowment:DataView,name:"DataView"},{endowment:Float32Array,name:"Float32Array"},{endowment:Float64Array,name:"Float64Array"},{endowment:Int8Array,name:"Int8Array"},{endowment:Int16Array,name:"Int16Array"},{endowment:Int32Array,name:"Int32Array"},{endowment:Uint8Array,name:"Uint8Array"},{endowment:Uint8ClampedArray,name:"Uint8ClampedArray"},{endowment:Uint16Array,name:"Uint16Array"},{endowment:Uint32Array,name:"Uint32Array"},{endowment:URL,name:"URL"},{endowment:WebAssembly,name:"WebAssembly"}];r.default=()=>{const e=[i.default,a.default,c.default,u.default,f.default,l.default,d.default,o.default,s.default];return h.forEach((t=>{const r={names:[t.name],factory:()=>{const e="function"==typeof t.endowment&&t.bind?t.endowment.bind(n.rootRealmGlobal):t.endowment;return{[t.name]:harden(e)}}};e.push(r)})),e}}}},{package:"$root$",file:"src/common/endowments/commonEndowmentFactory.ts"}],[219,{"../globalObject":230,"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.consoleMethods=r.consoleAttenuatedMethods=void 0;var n=e("@metamask/utils"),s=e("../globalObject");const i=r.consoleAttenuatedMethods=new Set(["log","assert","error","debug","info","warn"]),o=r.consoleMethods=new Set(["debug","error","info","log","warn","dir","dirxml","table","trace","group","groupCollapsed","groupEnd","clear","count","countReset","assert","profile","profileEnd","time","timeLog","timeEnd","timeStamp","context"]),a=["log","error","debug","info","warn"];function c(e,t,...r){const n=`[Snap: ${e}]`;return"string"==typeof t?[`${n} ${t}`,...r]:[n,t,...r]}const u={names:["console"],factory:function({snapId:e}={}){(0,n.assert)(e!==undefined);const t=Object.getOwnPropertyNames(s.rootRealmGlobal.console).reduce(((e,t)=>o.has(t)&&!i.has(t)?{...e,[t]:s.rootRealmGlobal.console[t]}:e),{});return harden({console:{...t,assert:(t,r,...n)=>{s.rootRealmGlobal.console.assert(t,...c(e,r,...n))},...a.reduce(((t,r)=>({...t,[r]:(t,...n)=>{s.rootRealmGlobal.console[r](...c(e,t,...n))}})),{})}})}};r.default=u}}},{package:"$root$",file:"src/common/endowments/console.ts"}],[220,{"../globalObject":230,crypto:"crypto"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.createCrypto=void 0;var n=e("../globalObject");const s=()=>{if("crypto"in n.rootRealmGlobal&&"object"==typeof n.rootRealmGlobal.crypto&&"SubtleCrypto"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.SubtleCrypto)return{crypto:harden(n.rootRealmGlobal.crypto),SubtleCrypto:harden(n.rootRealmGlobal.SubtleCrypto)};const t=e("crypto").webcrypto;return{crypto:harden(t),SubtleCrypto:harden(t.subtle.constructor)}};r.createCrypto=s;const i={names:["crypto","SubtleCrypto"],factory:s};r.default=i}}},{package:"$root$",file:"src/common/endowments/crypto.ts"}],[221,{"../globalObject":230},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject");const s={names:["Date"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Date);let t=0;const r=()=>{const e=n.rootRealmGlobal.Date.now(),r=Math.round(e+Math.random());return r>t&&(t=r),t},s=function(...e){return Reflect.construct(n.rootRealmGlobal.Date,0===e.length?[r()]:e,new.target)};return e.forEach((e=>{Reflect.defineProperty(s,e,{configurable:!1,writable:!1,value:"now"===e?r:n.rootRealmGlobal.Date[e]})})),{Date:harden(s)}}};r.default=s}}},{package:"$root$",file:"src/common/endowments/date.ts"}],[222,{"../globalObject":230,"./../../../../snaps-utils/src/index.executionenv":297,"./commonEndowmentFactory":218,"@metamask/rpc-errors":57,"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createEndowments=function({snap:e,ethereum:t,snapId:r,endowments:n,notify:u}){const l={},d=n.reduce((({allEndowments:e,teardowns:n},d)=>{if(c.has(d)){if(!(0,o.hasProperty)(l,d)){const{teardownFunction:e,...t}=c.get(d)({snapId:r,notify:u});Object.assign(l,t),e&&n.push(e)}e[d]=l[d]}else if("ethereum"===d)e[d]=t;else{if(!(d in a.rootRealmGlobal))throw s.rpcErrors.internal(`Unknown endowment: "${d}".`);{(0,i.logWarning)(`Access to unhardened global ${d}.`);const t=a.rootRealmGlobal[d];e[d]=t}}return{allEndowments:e,teardowns:n}}),{allEndowments:{snap:e},teardowns:[]});return{endowments:d.allEndowments,teardown:async()=>{await Promise.all(d.teardowns.map((e=>e())))}}};var n,s=e("@metamask/rpc-errors"),i=e("./../../../../snaps-utils/src/index.executionenv"),o=e("@metamask/utils"),a=e("../globalObject");const c=(0,((n=e("./commonEndowmentFactory"))&&n.__esModule?n:{default:n}).default)().reduce(((e,t)=>(t.names.forEach((r=>{e.set(r,t.factory)})),e)),new Map)}}},{package:"$root$",file:"src/common/endowments/index.ts"}],[223,{"@metamask/rpc-errors":57},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("@metamask/rpc-errors");const s={names:["setInterval","clearInterval"],factory:()=>{const e=new Map,t=t=>{harden(t);const r=e.get(t);r!==undefined&&(clearInterval(r),e.delete(t))};return{setInterval:harden(((t,r)=>{if("function"!=typeof t)throw n.rpcErrors.invalidInput(`The interval handler must be a function. Received: ${typeof t}.`);harden(t);const s=Object.freeze(Object.create(null)),i=setInterval(t,Math.max(10,r??0));return e.set(s,i),s})),clearInterval:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=s}}},{package:"$root$",file:"src/common/endowments/interval.ts"}],[224,{"../globalObject":230,"./crypto":220},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject"),s=e("./crypto");const i={names:["Math"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Math).reduce(((e,t)=>"random"===t?e:{...e,[t]:n.rootRealmGlobal.Math[t]}),{}),{crypto:t}=(0,s.createCrypto)();return harden({Math:{...e,random:()=>t.getRandomValues(new Uint32Array(1))[0]/2**32}})}};r.default=i}}},{package:"$root$",file:"src/common/endowments/math.ts"}],[225,{"../utils":233,"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("@metamask/utils"),s=e("../utils");function i(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function o(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,c(e,t,"get"))}function a(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,c(e,t,"set"),r),r}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var u=new WeakMap,l=new WeakMap,d=new WeakMap,f=new WeakMap;class p{constructor(e,t,r,n){i(this,u,{writable:!0,value:void 0}),i(this,l,{writable:!0,value:void 0}),i(this,d,{writable:!0,value:void 0}),i(this,f,{writable:!0,value:void 0}),a(this,l,e),a(this,u,t),a(this,d,r),a(this,f,n)}get body(){return o(this,l).body}get bodyUsed(){return o(this,l).bodyUsed}get headers(){return o(this,l).headers}get ok(){return o(this,l).ok}get redirected(){return o(this,l).redirected}get status(){return o(this,l).status}get statusText(){return o(this,l).statusText}get type(){return o(this,l).type}get url(){return o(this,l).url}async text(){return await(0,s.withTeardown)((async()=>{await o(this,d).call(this);try{return await o(this,l).text()}finally{await o(this,f).call(this)}})(),o(this,u))}async arrayBuffer(){return await(0,s.withTeardown)((async()=>{await o(this,d).call(this);try{return await o(this,l).arrayBuffer()}finally{await o(this,f).call(this)}})(),o(this,u))}async blob(){return await(0,s.withTeardown)((async()=>{await o(this,d).call(this);try{return await o(this,l).blob()}finally{await o(this,f).call(this)}})(),o(this,u))}clone(){const e=o(this,l).clone();return new p(e,o(this,u),o(this,d),o(this,f))}async formData(){return await(0,s.withTeardown)((async()=>{await o(this,d).call(this);try{return await o(this,l).formData()}finally{await o(this,f).call(this)}})(),o(this,u))}async json(){return await(0,s.withTeardown)((async()=>{await o(this,d).call(this);try{return await o(this,l).json()}finally{await o(this,f).call(this)}})(),o(this,u))}}const h={names:["fetch","Request","Headers","Response"],factory:({notify:e}={})=>{(0,n.assert)(e,"Notify must be passed to network endowment factory");const t=new Set,r={lastTeardown:0},i=new FinalizationRegistry((e=>e()));return{fetch:harden((async(n,o)=>{const a=new AbortController;if(null!==(null==o?void 0:o.signal)&&(null==o?void 0:o.signal)!==undefined){const e=o.signal;e.addEventListener("abort",(()=>{a.abort(e.reason)}),{once:!0})}let c=!1;const u=async()=>{c||(c=!0,await e({method:"OutboundRequest",params:{source:"fetch"}}))};let l=!1;const d=async()=>{l||(l=!0,await e({method:"OutboundResponse",params:{source:"fetch"}}))};let f,h;return await(0,s.withTeardown)((async()=>{try{await e({method:"OutboundRequest",params:{source:"fetch"}});const s=fetch(n,{...o,signal:a.signal});h={cancel:async()=>{a.abort();try{await s}catch{}}},t.add(h),f=new p(await s,r,u,d)}finally{h!==undefined&&t.delete(h),await e({method:"OutboundResponse",params:{source:"fetch"}})}if(null!==f.body){const e=new WeakRef(f.body),r={cancel:async()=>{try{var t;await(null===(t=e.deref())||void 0===t?void 0:t.cancel())}catch{}}};t.add(r),i.register(f.body,(()=>t.delete(r)))}return harden(f)})(),r)})),Request:harden(Request),Headers:harden(Headers),Response:harden(Response),teardownFunction:async()=>{r.lastTeardown+=1;const e=[];t.forEach((({cancel:t})=>e.push(t()))),t.clear(),await Promise.all(e)}}}};r.default=h}}},{package:"$root$",file:"src/common/endowments/network.ts"}],[226,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;const n={names:["TextDecoder"],factory:()=>({TextDecoder:harden(TextDecoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textDecoder.ts"}],[227,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;const n={names:["TextEncoder"],factory:()=>({TextEncoder:harden(TextEncoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textEncoder.ts"}],[228,{"@metamask/rpc-errors":57},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("@metamask/rpc-errors");const s={names:["setTimeout","clearTimeout"],factory:()=>{const e=new Map,t=t=>{const r=e.get(t);r!==undefined&&(clearTimeout(r),e.delete(t))};return{setTimeout:harden(((t,r)=>{if("function"!=typeof t)throw n.rpcErrors.internal(`The timeout handler must be a function. Received: ${typeof t}.`);harden(t);const s=Object.freeze(Object.create(null)),i=setTimeout((()=>{e.delete(s),t()}),Math.max(10,r??0));return e.set(s,i),s})),clearTimeout:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=s}}},{package:"$root$",file:"src/common/endowments/timeout.ts"}],[229,{"./globalObject":230,"@metamask/rpc-errors":57},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.addEventListener=function(e,t){if("addEventListener"in s.rootRealmGlobal&&"function"==typeof s.rootRealmGlobal.addEventListener)return s.rootRealmGlobal.addEventListener(e.toLowerCase(),t);if(s.rootRealmGlobal.process&&"on"in s.rootRealmGlobal.process&&"function"==typeof s.rootRealmGlobal.process.on)return s.rootRealmGlobal.process.on(e,t);throw n.rpcErrors.internal("Platform agnostic addEventListener failed.")},r.removeEventListener=function(e,t){if("removeEventListener"in s.rootRealmGlobal&&"function"==typeof s.rootRealmGlobal.removeEventListener)return s.rootRealmGlobal.removeEventListener(e.toLowerCase(),t);if(s.rootRealmGlobal.process&&"removeListener"in s.rootRealmGlobal.process&&"function"==typeof s.rootRealmGlobal.process.removeListener)return s.rootRealmGlobal.process.removeListener(e,t);throw new Error("Platform agnostic removeEventListener failed")};var n=e("@metamask/rpc-errors"),s=e("./globalObject")}}},{package:"$root$",file:"src/common/globalEvents.ts"}],[230,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rootRealmGlobalName=r.rootRealmGlobal=void 0;var n=function(e){return e.globalThis="globalThis",e.global="global",e.self="self",e.window="window",e}(n||{});let s,i;if("undefined"!=typeof globalThis)s=globalThis,i=n.globalThis;else if("undefined"!=typeof self)s=self,i=n.self;else if("undefined"!=typeof window)s=window,i=n.window;else{if("undefined"==typeof global)throw new Error("Unknown realm type; failed to identify global object.");s=global,i=n.global}r.rootRealmGlobal=s,r.rootRealmGlobalName=i}}},{package:"$root$",file:"src/common/globalObject.ts"}],[231,{"./../../../../snaps-utils/src/index.executionenv":297},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.executeLockdownMore=function(){try{const e=Reflect.ownKeys((new Compartment).globalThis),t=new Set(["eval","Function"]);new Set([...e]).forEach((e=>{const r=Reflect.getOwnPropertyDescriptor(globalThis,e);r&&(r.configurable&&(!function(e){return"set"in e||"get"in e}(r)?Object.defineProperty(globalThis,e,{configurable:!1,writable:!1}):Object.defineProperty(globalThis,e,{configurable:!1})),t.has(e)&&harden(globalThis[e]))}))}catch(e){throw(0,n.logError)("Protecting intrinsics failed:",e),e}};var n=e("./../../../../snaps-utils/src/index.executionenv")}}},{package:"$root$",file:"src/common/lockdown/lockdown-more.ts"}],[232,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.sortParamKeys=void 0;r.sortParamKeys=(e,t)=>{if(!t)return[];if(t instanceof Array)return t;const r=e.reduce(((e,t,r)=>({...e,[t]:r})),{});return Object.entries(t).sort((([e,t],[n,s])=>r[e]-r[n])).map((([e,t])=>t))}}}},{package:"$root$",file:"src/common/sortParams.ts"}],[233,{"../logging":235,"@metamask/rpc-errors":57,"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BLOCKED_RPC_METHODS=void 0,r.assertEthereumOutboundRequest=function(e){(0,s.assert)(!String.prototype.startsWith.call(e.method,"snap_"),n.rpcErrors.methodNotFound({data:{method:e.method}})),(0,s.assert)(!o.includes(e.method),n.rpcErrors.methodNotFound({data:{method:e.method}})),(0,s.assertStruct)(e,s.JsonStruct,"Provided value is not JSON-RPC compatible",n.rpcErrors.invalidParams)},r.assertSnapOutboundRequest=function(e){(0,s.assert)(String.prototype.startsWith.call(e.method,"wallet_")||String.prototype.startsWith.call(e.method,"snap_"),"The global Snap API only allows RPC methods starting with `wallet_*` and `snap_*`.",n.rpcErrors.methodNotSupported),(0,s.assert)(!o.includes(e.method),n.rpcErrors.methodNotFound({data:{method:e.method}})),(0,s.assertStruct)(e,s.JsonStruct,"Provided value is not JSON-RPC compatible",n.rpcErrors.invalidParams)},r.proxyStreamProvider=function(e,t){return new Proxy({},{has:(e,t)=>"string"==typeof t&&["request","on","removeListener"].includes(t),get:(r,n)=>"request"===n?t:["on","removeListener"].includes(n)?e[n]:undefined})},r.sanitizeRequestArguments=function(e){const t=JSON.parse(JSON.stringify(e));return(0,s.getSafeJson)(t)},r.withTeardown=async function(e,t){const r=t.lastTeardown;return new Promise(((n,s)=>{e.then((e=>{t.lastTeardown===r?n(e):(0,i.log)("Late promise received after Snap finished execution. Promise will be dropped.")})).catch((e=>{t.lastTeardown===r?s(e):(0,i.log)("Late promise received after Snap finished execution. Promise will be dropped.")}))}))};var n=e("@metamask/rpc-errors"),s=e("@metamask/utils"),i=e("../logging");const o=r.BLOCKED_RPC_METHODS=Object.freeze(["wallet_requestSnaps","wallet_requestPermissions","wallet_revokePermissions","eth_sendRawTransaction","eth_sendTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_registerOnboarding","wallet_scanQRCode"])}}},{package:"$root$",file:"src/common/utils.ts"}],[234,{"./../../../snaps-utils/src/index.executionenv":297,"@metamask/rpc-errors":57,"@metamask/utils":81,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.TerminateRequestArgumentsStruct=r.SnapRpcRequestArgumentsStruct=r.PingRequestArgumentsStruct=r.OnTransactionRequestArgumentsStruct=r.OnSignatureRequestArgumentsStruct=r.OnNameLookupRequestArgumentsStruct=r.JsonRpcRequestWithoutIdStruct=r.ExecuteSnapRequestArgumentsStruct=r.EndowmentStruct=void 0,r.assertIsOnNameLookupRequestArguments=function(e){(0,i.assertStruct)(e,g,"Invalid request params",n.rpcErrors.invalidParams)},r.assertIsOnSignatureRequestArguments=function(e){(0,i.assertStruct)(e,f,"Invalid request params",n.rpcErrors.invalidParams)},r.assertIsOnTransactionRequestArguments=function(e){(0,i.assertStruct)(e,d,"Invalid request params",n.rpcErrors.invalidParams)},r.isEndowment=u,r.isEndowmentsArray=function(e){return Array.isArray(e)&&e.every(u)};var n=e("@metamask/rpc-errors"),s=e("./../../../snaps-utils/src/index.executionenv"),i=e("@metamask/utils"),o=e("superstruct");const a=r.JsonRpcRequestWithoutIdStruct=(0,o.object)({jsonrpc:(0,o.optional)(i.JsonRpcVersionStruct),id:(0,o.optional)(i.JsonRpcIdStruct),method:(0,o.string)(),params:(0,o.optional)(i.JsonRpcParamsStruct)}),c=r.EndowmentStruct=(0,o.string)();function u(e){return(0,o.is)(e,c)}const l=(0,o.literal)("OK"),d=(r.PingRequestArgumentsStruct=(0,o.optional)((0,o.union)([(0,o.literal)(undefined),(0,o.array)()])),r.TerminateRequestArgumentsStruct=(0,o.union)([(0,o.literal)(undefined),(0,o.array)()]),r.ExecuteSnapRequestArgumentsStruct=(0,o.tuple)([(0,o.string)(),(0,o.string)(),(0,o.array)(c)]),r.SnapRpcRequestArgumentsStruct=(0,o.tuple)([(0,o.string)(),(0,o.enums)(Object.values(s.HandlerType)),(0,o.string)(),(0,o.assign)(a,(0,o.object)({params:(0,o.optional)((0,o.record)((0,o.string)(),i.JsonStruct))}))]),r.OnTransactionRequestArgumentsStruct=(0,o.object)({transaction:(0,o.record)((0,o.string)(),i.JsonStruct),chainId:s.ChainIdStruct,transactionOrigin:(0,o.nullable)((0,o.string)())}));const f=r.OnSignatureRequestArgumentsStruct=(0,o.object)({signature:(0,o.record)((0,o.string)(),i.JsonStruct),signatureOrigin:(0,o.nullable)((0,o.string)())});const p={chainId:s.ChainIdStruct},h=(0,o.object)({...p,address:(0,o.string)()}),m=(0,o.object)({...p,domain:(0,o.string)()}),g=r.OnNameLookupRequestArgumentsStruct=(0,o.union)([h,m]);(0,o.object)({id:i.JsonRpcIdStruct,jsonrpc:i.JsonRpcVersionStruct,result:l}),i.JsonRpcSuccessStruct}}},{package:"$root$",file:"src/common/validation.ts"}],[235,{"./../../snaps-utils/src/index.executionenv":297,"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.log=void 0;var n=e("./../../snaps-utils/src/index.executionenv"),s=e("@metamask/utils");r.log=(0,s.createModuleLogger)(n.snapsLogger,"snaps-execution-environments")}}},{package:"$root$",file:"src/logging.ts"}],[236,{"../common/BaseSnapExecutor":216,"../logging":235,"./../../../snaps-utils/src/index.executionenv":297,"@metamask/object-multiplex":10,"@metamask/post-message-stream":14,"readable-stream":161},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChildProcessSnapExecutor=void 0;var n,s=(n=e("@metamask/object-multiplex"))&&n.__esModule?n:{default:n},i=e("@metamask/post-message-stream"),o=e("./../../../snaps-utils/src/index.executionenv"),a=e("readable-stream"),c=e("../common/BaseSnapExecutor"),u=e("../logging");class l extends c.BaseSnapExecutor{static initialize(){(0,u.log)("Worker: Connecting to parent.");const e=new i.ProcessMessageStream,t=new s.default;(0,a.pipeline)(e,t,e,(e=>{e&&(0,o.logError)("Parent stream failure, closing worker.",e),self.close()}));const r=t.createStream(o.SNAP_STREAM_NAMES.COMMAND),n=t.createStream(o.SNAP_STREAM_NAMES.JSON_RPC);return new l(r,n)}}r.ChildProcessSnapExecutor=l}}},{package:"$root$",file:"src/node-process/ChildProcessSnapExecutor.ts"}],[237,{"../common/lockdown/lockdown-more":231,"./ChildProcessSnapExecutor":236},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../common/lockdown/lockdown-more"),s=e("./ChildProcessSnapExecutor");(0,n.executeLockdownMore)(),s.ChildProcessSnapExecutor.initialize()}}},{package:"$root$",file:"src/node-process/index.ts"}],[238,{"./internals":245,"@metamask/rpc-errors":57},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.UserRejectedRequestError=r.UnsupportedMethodError=r.UnauthorizedError=r.TransactionRejected=r.ResourceUnavailableError=r.ResourceNotFoundError=r.ParseError=r.MethodNotSupportedError=r.MethodNotFoundError=r.LimitExceededError=r.InvalidRequestError=r.InvalidParamsError=r.InvalidInputError=r.InternalError=r.DisconnectedError=r.ChainDisconnectedError=void 0;var n=e("@metamask/rpc-errors"),s=e("./internals");r.InternalError=(0,s.createSnapError)(n.rpcErrors.internal),r.InvalidInputError=(0,s.createSnapError)(n.rpcErrors.invalidInput),r.InvalidParamsError=(0,s.createSnapError)(n.rpcErrors.invalidParams),r.InvalidRequestError=(0,s.createSnapError)(n.rpcErrors.invalidRequest),r.LimitExceededError=(0,s.createSnapError)(n.rpcErrors.limitExceeded),r.MethodNotFoundError=(0,s.createSnapError)(n.rpcErrors.methodNotFound),r.MethodNotSupportedError=(0,s.createSnapError)(n.rpcErrors.methodNotSupported),r.ParseError=(0,s.createSnapError)(n.rpcErrors.parse),r.ResourceNotFoundError=(0,s.createSnapError)(n.rpcErrors.resourceNotFound),r.ResourceUnavailableError=(0,s.createSnapError)(n.rpcErrors.resourceUnavailable),r.TransactionRejected=(0,s.createSnapError)(n.rpcErrors.transactionRejected),r.ChainDisconnectedError=(0,s.createSnapError)(n.providerErrors.chainDisconnected),r.DisconnectedError=(0,s.createSnapError)(n.providerErrors.disconnected),r.UnauthorizedError=(0,s.createSnapError)(n.providerErrors.unauthorized),r.UnsupportedMethodError=(0,s.createSnapError)(n.providerErrors.unsupportedMethod),r.UserRejectedRequestError=(0,s.createSnapError)(n.providerErrors.userRejectedRequest)}}},{package:"external:../snaps-sdk/src/error-wrappers.ts",file:"../snaps-sdk/src/error-wrappers.ts"}],[239,{"./internals":245},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SnapError=void 0;var n=e("./internals");function s(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function i(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,a(e,t,"get"))}function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,a(e,t,"set"),r),r}function a(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var c=new WeakMap,u=new WeakMap,l=new WeakMap,d=new WeakMap;class f extends Error{constructor(e,t={}){const r=(0,n.getErrorMessage)(e);super(r),s(this,c,{writable:!0,value:void 0}),s(this,u,{writable:!0,value:void 0}),s(this,l,{writable:!0,value:void 0}),s(this,d,{writable:!0,value:void 0}),o(this,u,r),o(this,c,(0,n.getErrorCode)(e)),o(this,l,{...(0,n.getErrorData)(e),...t}),o(this,d,super.stack)}get name(){return"SnapError"}get code(){return i(this,c)}get message(){return i(this,u)}get data(){return i(this,l)}get stack(){return i(this,d)}toJSON(){return{code:n.SNAP_ERROR_CODE,message:n.SNAP_ERROR_MESSAGE,data:{cause:{code:this.code,message:this.message,stack:this.stack,data:this.data}}}}serialize(){return this.toJSON()}}r.SnapError=f}}},{package:"external:../snaps-sdk/src/errors.ts",file:"../snaps-sdk/src/errors.ts"}],[240,{"./ui":291,"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getImageComponent=async function(e,{width:t,height:r=t,request:o}){(0,n.assert)("number"==typeof t&&t>0,"Expected width to be a number greater than 0."),(0,n.assert)("number"==typeof r&&r>0,"Expected height to be a number greater than 0.");const a=await i(e,o),c=`width="${t}" height="${r}"`;return(0,s.image)(`<svg ${c.trim()} xmlns="http://www.w3.org/2000/svg"><image ${c.trim()} href="${a}" /></svg>`)},r.getImageData=i;var n=e("@metamask/utils"),s=e("./ui");async function i(e,t){const r=await async function(e,t){if("function"!=typeof fetch)throw new Error(`Failed to fetch image data from "${e}": Using this function requires the "endowment:network-access" permission.`);return fetch(e,t).then((async t=>{if(!t.ok)throw new Error(`Failed to fetch image data from "${e}": ${t.status} ${t.statusText}`);const r=await t.blob();return(0,n.assert)("image/jpeg"===r.type||"image/png"===r.type,"Expected image data to be a JPEG or PNG image."),r}))}(e,t),s=new Uint8Array(await r.arrayBuffer());return`data:${r.type};base64,${(0,n.bytesToBase64)(s)}`}}}},{package:"external:../snaps-sdk/src/images.ts",file:"../snaps-sdk/src/images.ts"}],[241,{"./error-wrappers":238,"./errors":239,"./images":240,"./internals":245,"./types":258,"./ui":291,"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n={getErrorData:!0,getErrorMessage:!0,getErrorStack:!0,SNAP_ERROR_CODE:!0,SNAP_ERROR_MESSAGE:!0,literal:!0,union:!0,enumValue:!0,assert:!0};Object.defineProperty(r,"SNAP_ERROR_CODE",{enumerable:!0,get:function(){return s.SNAP_ERROR_CODE}}),Object.defineProperty(r,"SNAP_ERROR_MESSAGE",{enumerable:!0,get:function(){return s.SNAP_ERROR_MESSAGE}}),Object.defineProperty(r,"assert",{enumerable:!0,get:function(){return i.assert}}),Object.defineProperty(r,"enumValue",{enumerable:!0,get:function(){return s.enumValue}}),Object.defineProperty(r,"getErrorData",{enumerable:!0,get:function(){return s.getErrorData}}),Object.defineProperty(r,"getErrorMessage",{enumerable:!0,get:function(){return s.getErrorMessage}}),Object.defineProperty(r,"getErrorStack",{enumerable:!0,get:function(){return s.getErrorStack}}),Object.defineProperty(r,"literal",{enumerable:!0,get:function(){return s.literal}}),Object.defineProperty(r,"union",{enumerable:!0,get:function(){return s.union}});var s=e("./internals"),i=e("@metamask/utils"),o=e("./errors");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./error-wrappers");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./images");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=e("./types");Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===u[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}}))}));var l=e("./ui");Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===l[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return l[e]}}))}))}}},{package:"external:../snaps-sdk/src/index.ts",file:"../snaps-sdk/src/index.ts"}],[242,{"../errors":239},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createSnapError=function(e){return class extends n.SnapError{constructor(t,r){const n=e(t);super({code:n.code,message:n.message,data:r})}}};var n=e("../errors")}}},{package:"external:../snaps-sdk/src/internals/error-wrappers.ts",file:"../snaps-sdk/src/internals/error-wrappers.ts"}],[243,{"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SNAP_ERROR_MESSAGE=r.SNAP_ERROR_CODE=void 0,r.getErrorCode=function(e){if((0,n.isObject)(e)&&(0,n.hasProperty)(e,"code")&&"number"==typeof e.code&&Number.isInteger(e.code))return e.code;return-32603},r.getErrorData=function(e){if((0,n.isObject)(e)&&(0,n.hasProperty)(e,"data")&&"object"==typeof e.data&&null!==e.data&&(0,n.isValidJson)(e.data)&&!Array.isArray(e.data))return e.data;return{}},r.getErrorMessage=function(e){if((0,n.isObject)(e)&&(0,n.hasProperty)(e,"message")&&"string"==typeof e.message)return e.message;return String(e)},r.getErrorStack=function(e){if((0,n.isObject)(e)&&(0,n.hasProperty)(e,"stack")&&"string"==typeof e.stack)return e.stack;return undefined};var n=e("@metamask/utils");r.SNAP_ERROR_CODE=-31002,r.SNAP_ERROR_MESSAGE="Snap Error"}}},{package:"external:../snaps-sdk/src/internals/errors.ts",file:"../snaps-sdk/src/internals/errors.ts"}],[244,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/internals/helpers.ts",file:"../snaps-sdk/src/internals/helpers.ts"}],[245,{"./error-wrappers":242,"./errors":243,"./helpers":244,"./structs":246},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./error-wrappers");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./errors");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./helpers");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./structs");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}))}}},{package:"external:../snaps-sdk/src/internals/index.ts",file:"../snaps-sdk/src/internals/index.ts"}],[246,{superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.enumValue=function(e){return s(e)},r.literal=s,r.union=function([e,...t]){const r=(0,n.union)([e,...t]);return new n.Struct({...r,schema:[e,...t]})};var n=e("superstruct");function s(e){return(0,n.define)(JSON.stringify(e),(0,n.literal)(e).validator)}}}},{package:"external:../snaps-sdk/src/internals/structs.ts",file:"../snaps-sdk/src/internals/structs.ts"}],[247,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/caip.ts",file:"../snaps-sdk/src/types/caip.ts"}],[248,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/global.ts",file:"../snaps-sdk/src/types/global.ts"}],[249,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/cronjob.ts",file:"../snaps-sdk/src/types/handlers/cronjob.ts"}],[250,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/home-page.ts",file:"../snaps-sdk/src/types/handlers/home-page.ts"}],[251,{"./cronjob":249,"./home-page":250,"./keyring":252,"./lifecycle":253,"./name-lookup":254,"./rpc-request":255,"./signature":256,"./transaction":257},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./cronjob");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./home-page");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./keyring");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./lifecycle");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./name-lookup");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./rpc-request");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=e("./transaction");Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===u[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}}))}));var l=e("./signature");Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===l[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return l[e]}}))}))}}},{package:"external:../snaps-sdk/src/types/handlers/index.ts",file:"../snaps-sdk/src/types/handlers/index.ts"}],[252,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/keyring.ts",file:"../snaps-sdk/src/types/handlers/keyring.ts"}],[253,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/lifecycle.ts",file:"../snaps-sdk/src/types/handlers/lifecycle.ts"}],[254,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/name-lookup.ts",file:"../snaps-sdk/src/types/handlers/name-lookup.ts"}],[255,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/rpc-request.ts",file:"../snaps-sdk/src/types/handlers/rpc-request.ts"}],[256,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/signature.ts",file:"../snaps-sdk/src/types/handlers/signature.ts"}],[257,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SeverityLevel=void 0;r.SeverityLevel=function(e){return e.Critical="critical",e}({})}}},{package:"external:../snaps-sdk/src/types/handlers/transaction.ts",file:"../snaps-sdk/src/types/handlers/transaction.ts"}],[258,{"./caip":247,"./global":248,"./handlers":251,"./methods":268,"./permissions":276,"./provider":277,"./snap":278},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),e("./global");var n=e("./caip");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./handlers");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./methods");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./permissions");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./provider");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./snap");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}}))}))}}},{package:"external:../snaps-sdk/src/types/index.ts",file:"../snaps-sdk/src/types/index.ts"}],[259,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.DialogType=void 0;r.DialogType=function(e){return e.Alert="alert",e.Confirmation="confirmation",e.Prompt="prompt",e}({})}}},{package:"external:../snaps-sdk/src/types/methods/dialog.ts",file:"../snaps-sdk/src/types/methods/dialog.ts"}],[260,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-bip32-entropy.ts",file:"../snaps-sdk/src/types/methods/get-bip32-entropy.ts"}],[261,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-bip32-public-key.ts",file:"../snaps-sdk/src/types/methods/get-bip32-public-key.ts"}],[262,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-bip44-entropy.ts",file:"../snaps-sdk/src/types/methods/get-bip44-entropy.ts"}],[263,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-client-status.ts",file:"../snaps-sdk/src/types/methods/get-client-status.ts"}],[264,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-entropy.ts",file:"../snaps-sdk/src/types/methods/get-entropy.ts"}],[265,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.AuxiliaryFileEncoding=void 0;r.AuxiliaryFileEncoding=function(e){return e.Base64="base64",e.Hex="hex",e.Utf8="utf8",e}({})}}},{package:"external:../snaps-sdk/src/types/methods/get-file.ts",file:"../snaps-sdk/src/types/methods/get-file.ts"}],[266,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-locale.ts",file:"../snaps-sdk/src/types/methods/get-locale.ts"}],[267,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-snaps.ts",file:"../snaps-sdk/src/types/methods/get-snaps.ts"}],[268,{"./dialog":259,"./get-bip32-entropy":260,"./get-bip32-public-key":261,"./get-bip44-entropy":262,"./get-client-status":263,"./get-entropy":264,"./get-file":265,"./get-locale":266,"./get-snaps":267,"./invoke-keyring":269,"./invoke-snap":270,"./manage-accounts":271,"./manage-state":272,"./methods":273,"./notify":274,"./request-snaps":275},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./dialog");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./get-bip32-entropy");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./get-bip32-public-key");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./get-bip44-entropy");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./get-client-status");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./get-entropy");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=e("./get-file");Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===u[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}}))}));var l=e("./get-locale");Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===l[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return l[e]}}))}));var d=e("./get-snaps");Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===d[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return d[e]}}))}));var f=e("./invoke-keyring");Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===f[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return f[e]}}))}));var p=e("./invoke-snap");Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===p[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return p[e]}}))}));var h=e("./manage-accounts");Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===h[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return h[e]}}))}));var m=e("./manage-state");Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===m[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return m[e]}}))}));var g=e("./methods");Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===g[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return g[e]}}))}));var b=e("./notify");Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===b[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return b[e]}}))}));var y=e("./request-snaps");Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===y[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return y[e]}}))}))}}},{package:"external:../snaps-sdk/src/types/methods/index.ts",file:"../snaps-sdk/src/types/methods/index.ts"}],[269,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/invoke-keyring.ts",file:"../snaps-sdk/src/types/methods/invoke-keyring.ts"}],[270,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/invoke-snap.ts",file:"../snaps-sdk/src/types/methods/invoke-snap.ts"}],[271,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/manage-accounts.ts",file:"../snaps-sdk/src/types/methods/manage-accounts.ts"}],[272,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ManageStateOperation=void 0;r.ManageStateOperation=function(e){return e.ClearState="clear",e.GetState="get",e.UpdateState="update",e}({})}}},{package:"external:../snaps-sdk/src/types/methods/manage-state.ts",file:"../snaps-sdk/src/types/methods/manage-state.ts"}],[273,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/methods.ts",file:"../snaps-sdk/src/types/methods/methods.ts"}],[274,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NotificationType=void 0;r.NotificationType=function(e){return e.InApp="inApp",e.Native="native",e}({})}}},{package:"external:../snaps-sdk/src/types/methods/notify.ts",file:"../snaps-sdk/src/types/methods/notify.ts"}],[275,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/request-snaps.ts",file:"../snaps-sdk/src/types/methods/request-snaps.ts"}],[276,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/permissions.ts",file:"../snaps-sdk/src/types/permissions.ts"}],[277,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/provider.ts",file:"../snaps-sdk/src/types/provider.ts"}],[278,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/snap.ts",file:"../snaps-sdk/src/types/snap.ts"}],[279,{"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createBuilder=function(e,t,r=[]){return(...s)=>{if(1===s.length&&(0,n.isPlainObject)(s[0])){const r={...s[0],type:e};return(0,n.assertStruct)(r,t,`Invalid ${e} component`),r}const i=r.reduce(((e,t,r)=>s[r]!==undefined?{...e,[t]:s[r]}:e),{type:e});return(0,n.assertStruct)(i,t,`Invalid ${e} component`),i}};var n=e("@metamask/utils")}}},{package:"external:../snaps-sdk/src/ui/builder.ts",file:"../snaps-sdk/src/ui/builder.ts"}],[280,{"./components":286,"@metamask/utils":81,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertIsComponent=function(e){(0,n.assertStruct)(e,i.ComponentStruct,"Invalid component")},r.isComponent=function(e){return(0,s.is)(e,i.ComponentStruct)};var n=e("@metamask/utils"),s=e("superstruct"),i=e("./components")}}},{package:"external:../snaps-sdk/src/ui/component.ts",file:"../snaps-sdk/src/ui/component.ts"}],[281,{"../builder":279,"../nodes":292,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.address=r.AddressStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.AddressStruct=(0,n.assign)(i.LiteralStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Address),value:(0,n.pattern)((0,n.string)(),/0x[a-fA-F0-9]{40}/u)}));r.address=(0,s.createBuilder)(i.NodeType.Address,o,["value"])}}},{package:"external:../snaps-sdk/src/ui/components/address.ts",file:"../snaps-sdk/src/ui/components/address.ts"}],[282,{"../builder":279,"../nodes":292,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.copyable=r.CopyableStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.CopyableStruct=(0,n.assign)(i.LiteralStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Copyable),value:(0,n.string)(),sensitive:(0,n.optional)((0,n.boolean)())}));r.copyable=(0,s.createBuilder)(i.NodeType.Copyable,o,["value","sensitive"])}}},{package:"external:../snaps-sdk/src/ui/components/copyable.ts",file:"../snaps-sdk/src/ui/components/copyable.ts"}],[283,{"../builder":279,"../nodes":292,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.divider=r.DividerStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.DividerStruct=(0,n.assign)(i.NodeStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Divider)}));r.divider=(0,s.createBuilder)(i.NodeType.Divider,o)}}},{package:"external:../snaps-sdk/src/ui/components/divider.ts",file:"../snaps-sdk/src/ui/components/divider.ts"}],[284,{"../builder":279,"../nodes":292,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.heading=r.HeadingStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.HeadingStruct=(0,n.assign)(i.LiteralStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Heading),value:(0,n.string)()}));r.heading=(0,s.createBuilder)(i.NodeType.Heading,o,["value"])}}},{package:"external:../snaps-sdk/src/ui/components/heading.ts",file:"../snaps-sdk/src/ui/components/heading.ts"}],[285,{"../builder":279,"../nodes":292,"is-svg":138,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.image=r.ImageStruct=void 0,r.svg=c;var n,s=(n=e("is-svg"))&&n.__esModule?n:{default:n},i=e("superstruct"),o=e("../builder"),a=e("../nodes");function c(){return(0,i.refine)((0,i.string)(),"SVG",(e=>!!(0,s.default)(e)||"Value is not a valid SVG."))}const u=r.ImageStruct=(0,i.assign)(a.NodeStruct,(0,i.object)({type:(0,i.literal)(a.NodeType.Image),value:c()}));r.image=(0,o.createBuilder)(a.NodeType.Image,u,["value"])}}},{package:"external:../snaps-sdk/src/ui/components/image.ts",file:"../snaps-sdk/src/ui/components/image.ts"}],[286,{"./address":281,"./copyable":282,"./divider":283,"./heading":284,"./image":285,"./panel":287,"./row":288,"./spinner":289,"./text":290},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n={image:!0,ImageStruct:!0,ComponentStruct:!0,panel:!0,PanelStruct:!0};Object.defineProperty(r,"ComponentStruct",{enumerable:!0,get:function(){return u.ComponentStruct}}),Object.defineProperty(r,"ImageStruct",{enumerable:!0,get:function(){return c.ImageStruct}}),Object.defineProperty(r,"PanelStruct",{enumerable:!0,get:function(){return u.PanelStruct}}),Object.defineProperty(r,"image",{enumerable:!0,get:function(){return c.image}}),Object.defineProperty(r,"panel",{enumerable:!0,get:function(){return u.panel}});var s=e("./address");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./copyable");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./divider");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./heading");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./image"),u=e("./panel"),l=e("./spinner");Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===l[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return l[e]}}))}));var d=e("./text");Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===d[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return d[e]}}))}));var f=e("./row");Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===f[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return f[e]}}))}))}}},{package:"external:../snaps-sdk/src/ui/components/index.ts",file:"../snaps-sdk/src/ui/components/index.ts"}],[287,{"../builder":279,"../nodes":292,"./address":281,"./copyable":282,"./divider":283,"./heading":284,"./image":285,"./row":288,"./spinner":289,"./text":290,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.panel=r.ParentStruct=r.PanelStruct=r.ComponentStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes"),o=e("./address"),a=e("./copyable"),c=e("./divider"),u=e("./heading"),l=e("./image"),d=e("./row"),f=e("./spinner"),p=e("./text");const h=r.ParentStruct=(0,n.assign)(i.NodeStruct,(0,n.object)({children:(0,n.array)((0,n.lazy)((()=>g)))})),m=r.PanelStruct=(0,n.assign)(h,(0,n.object)({type:(0,n.literal)(i.NodeType.Panel)})),g=(r.panel=(0,s.createBuilder)(i.NodeType.Panel,m,["children"]),r.ComponentStruct=(0,n.union)([a.CopyableStruct,c.DividerStruct,u.HeadingStruct,l.ImageStruct,m,f.SpinnerStruct,p.TextStruct,d.RowStruct,o.AddressStruct]))}}},{package:"external:../snaps-sdk/src/ui/components/panel.ts",file:"../snaps-sdk/src/ui/components/panel.ts"}],[288,{"../../internals":245,"../builder":279,"../nodes":292,"./address":281,"./image":285,"./text":290,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.row=r.RowVariant=r.RowStruct=void 0;var n=e("superstruct"),s=e("../../internals"),i=e("../builder"),o=e("../nodes"),a=e("./address"),c=e("./image"),u=e("./text");let l=r.RowVariant=function(e){return e.Default="default",e.Critical="critical",e.Warning="warning",e}({});const d=(0,n.union)([c.ImageStruct,u.TextStruct,a.AddressStruct]),f=r.RowStruct=(0,n.assign)(o.LiteralStruct,(0,n.object)({type:(0,n.literal)(o.NodeType.Row),variant:(0,n.optional)((0,n.union)([(0,s.enumValue)(l.Default),(0,s.enumValue)(l.Critical),(0,s.enumValue)(l.Warning)])),label:(0,n.string)(),value:d}));r.row=(0,i.createBuilder)(o.NodeType.Row,f,["label","value","variant"])}}},{package:"external:../snaps-sdk/src/ui/components/row.ts",file:"../snaps-sdk/src/ui/components/row.ts"}],[289,{"../builder":279,"../nodes":292,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.spinner=r.SpinnerStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.SpinnerStruct=(0,n.assign)(i.NodeStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Spinner)}));r.spinner=(0,s.createBuilder)(i.NodeType.Spinner,o)}}},{package:"external:../snaps-sdk/src/ui/components/spinner.ts",file:"../snaps-sdk/src/ui/components/spinner.ts"}],[290,{"../builder":279,"../nodes":292,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.text=r.TextStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.TextStruct=(0,n.assign)(i.LiteralStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Text),value:(0,n.string)(),markdown:(0,n.optional)((0,n.boolean)())}));r.text=(0,s.createBuilder)(i.NodeType.Text,o,["value","markdown"])}}},{package:"external:../snaps-sdk/src/ui/components/text.ts",file:"../snaps-sdk/src/ui/components/text.ts"}],[291,{"./component":280,"./components":286,"./nodes":292},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n={NodeType:!0};Object.defineProperty(r,"NodeType",{enumerable:!0,get:function(){return o.NodeType}});var s=e("./components");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./component");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./nodes")}}},{package:"external:../snaps-sdk/src/ui/index.ts",file:"../snaps-sdk/src/ui/index.ts"}],[292,{superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NodeType=r.NodeStruct=r.LiteralStruct=void 0;var n=e("superstruct");r.NodeType=function(e){return e.Copyable="copyable",e.Divider="divider",e.Heading="heading",e.Panel="panel",e.Spinner="spinner",e.Text="text",e.Image="image",e.Row="row",e.Address="address",e}({});const s=r.NodeStruct=(0,n.object)({type:(0,n.string)()});r.LiteralStruct=(0,n.assign)(s,(0,n.object)({value:(0,n.unknown)()}))}}},{package:"external:../snaps-sdk/src/ui/nodes.ts",file:"../snaps-sdk/src/ui/nodes.ts"}],[293,{"./../../snaps-sdk/src":241,"@metamask/rpc-errors":57,"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WrappedSnapError=r.SNAP_ERROR_WRAPPER_MESSAGE=r.SNAP_ERROR_WRAPPER_CODE=void 0,r.isSerializedSnapError=b,r.isSnapError=g,r.isWrappedSnapError=y,r.unwrapError=function(e){if(y(e)){if((0,i.isJsonRpcError)(e.data.cause)){if(b(e.data.cause)){const{code:t,message:r,stack:n,data:s}=e.data.cause.data.cause;return[w(t,r,n,s),!0]}const{code:t,message:r,stack:n,data:s}=e.data.cause;return[w(t,r,n,s),!1]}return[w(n.errorCodes.rpc.internal,(0,s.getErrorMessage)(e.data.cause),(0,s.getErrorStack)(e.data.cause)),!1]}if((0,i.isJsonRpcError)(e)){const{code:t,message:r,stack:n,data:s}=e;return[w(t,r,n,s),!1]}return[w(n.errorCodes.rpc.internal,(0,s.getErrorMessage)(e),(0,s.getErrorStack)(e)),!1]};var n=e("@metamask/rpc-errors"),s=e("./../../snaps-sdk/src"),i=e("@metamask/utils");function o(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function a(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,u(e,t,"get"))}function c(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,u(e,t,"set"),r),r}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}const l=r.SNAP_ERROR_WRAPPER_CODE=-31001,d=r.SNAP_ERROR_WRAPPER_MESSAGE="Wrapped Snap Error";var f=new WeakMap,p=new WeakMap,h=new WeakMap;class m extends Error{constructor(e){const t=(0,s.getErrorMessage)(e);super(t),o(this,f,{writable:!0,value:void 0}),o(this,p,{writable:!0,value:void 0}),o(this,h,{writable:!0,value:void 0}),c(this,f,e),c(this,p,t),c(this,h,(0,s.getErrorStack)(e))}get name(){return"WrappedSnapError"}get message(){return a(this,p)}get stack(){return a(this,h)}toJSON(){const e=g(a(this,f))?a(this,f).serialize():(0,n.serializeCause)(a(this,f));return{code:l,message:d,data:{cause:e}}}serialize(){return this.toJSON()}}function g(e){if((0,i.isObject)(e)&&"serialize"in e&&"function"==typeof e.serialize){const t=e.serialize();return(0,i.isJsonRpcError)(t)&&b(t)}return!1}function b(e){return e.code===s.SNAP_ERROR_CODE&&e.message===s.SNAP_ERROR_MESSAGE}function y(e){return(0,i.isJsonRpcError)(e)&&e.code===l&&e.message===d}function w(e,t,r,s){const i=new n.JsonRpcError(e,t,s);return i.stack=r,i}r.WrappedSnapError=m}}},{package:"external:../snaps-utils/src/errors.ts",file:"../snaps-utils/src/errors.ts"}],[294,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SNAP_EXPORT_NAMES=r.HandlerType=void 0;let n=r.HandlerType=function(e){return e.OnRpcRequest="onRpcRequest",e.OnSignature="onSignature",e.OnTransaction="onTransaction",e.OnCronjob="onCronjob",e.OnInstall="onInstall",e.OnUpdate="onUpdate",e.OnNameLookup="onNameLookup",e.OnKeyringRequest="onKeyringRequest",e.OnHomePage="onHomePage",e}({});r.SNAP_EXPORT_NAMES=Object.values(n)}}},{package:"external:../snaps-utils/src/handler-types.ts",file:"../snaps-utils/src/handler-types.ts"}],[295,{"./../../snaps-sdk/src":241,"./handler-types":294,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SNAP_EXPORTS=r.OnTransactionResponseStruct=r.OnSignatureResponseStruct=r.OnHomePageResponseStruct=void 0;var n=e("./../../snaps-sdk/src"),s=e("superstruct"),i=e("./handler-types");r.SNAP_EXPORTS={[i.HandlerType.OnRpcRequest]:{type:i.HandlerType.OnRpcRequest,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnTransaction]:{type:i.HandlerType.OnTransaction,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnCronjob]:{type:i.HandlerType.OnCronjob,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnNameLookup]:{type:i.HandlerType.OnNameLookup,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnInstall]:{type:i.HandlerType.OnInstall,required:!1,validator:e=>"function"==typeof e},[i.HandlerType.OnUpdate]:{type:i.HandlerType.OnUpdate,required:!1,validator:e=>"function"==typeof e},[i.HandlerType.OnKeyringRequest]:{type:i.HandlerType.OnKeyringRequest,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnHomePage]:{type:i.HandlerType.OnHomePage,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnSignature]:{type:i.HandlerType.OnSignature,required:!0,validator:e=>"function"==typeof e}};const o=r.OnTransactionResponseStruct=(0,s.nullable)((0,s.object)({content:n.ComponentStruct,severity:(0,s.optional)((0,s.literal)(n.SeverityLevel.Critical))}));r.OnSignatureResponseStruct=o,r.OnHomePageResponseStruct=(0,s.object)({content:n.ComponentStruct})}}},{package:"external:../snaps-utils/src/handlers.ts",file:"../snaps-utils/src/handlers.ts"}],[296,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createWindow=async function(e,t,r=!0){return await new Promise(((n,s)=>{const i=document.createElement("iframe");i.setAttribute("id",t),i.setAttribute("data-testid","snaps-iframe"),r&&i.setAttribute("sandbox","allow-scripts"),i.setAttribute("src",e),document.body.appendChild(i),i.addEventListener("load",(()=>{i.contentWindow?n(i.contentWindow):s(new Error(`iframe.contentWindow not present on load for job "${t}".`))}))}))}}}},{package:"external:../snaps-utils/src/iframe.ts",file:"../snaps-utils/src/iframe.ts"}],[297,{"./errors":293,"./handler-types":294,"./handlers":295,"./iframe":296,"./logging":298,"./namespace":299,"./types":300},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./errors");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./handlers");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./handler-types");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./iframe");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./logging");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./namespace");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=e("./types");Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===u[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}}))}))}}},{package:"external:../snaps-utils/src/index.executionenv.ts",file:"../snaps-utils/src/index.executionenv.ts"}],[298,{"@metamask/utils":81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.logError=function(e,...t){console.error(e,...t)},r.logInfo=function(e,...t){console.log(e,...t)},r.logWarning=function(e,...t){console.warn(e,...t)},r.snapsLogger=void 0;var n=e("@metamask/utils");r.snapsLogger=(0,n.createProjectLogger)("snaps")}}},{package:"external:../snaps-utils/src/logging.ts",file:"../snaps-utils/src/logging.ts"}],[299,{superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NamespaceStruct=r.NamespaceIdStruct=r.LimitedString=r.ChainStruct=r.ChainIdStruct=r.ChainIdStringStruct=r.CHAIN_ID_REGEX=r.AccountIdStruct=r.AccountIdArrayStruct=r.AccountAddressStruct=r.ACCOUNT_ID_REGEX=r.ACCOUNT_ADDRESS_REGEX=void 0,r.isAccountId=function(e){return(0,n.is)(e,l)},r.isAccountIdArray=function(e){return(0,n.is)(e,d)},r.isChainId=function(e){return(0,n.is)(e,u)},r.isNamespace=function(e){return(0,n.is)(e,p)},r.isNamespaceId=function(e){return(0,n.is)(e,h)},r.parseAccountId=function(e){const t=i.exec(e);if(null==t||!t.groups)throw new Error("Invalid account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.parseChainId=function(e){const t=s.exec(e);if(null==t||!t.groups)throw new Error("Invalid chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}};var n=e("superstruct");const s=r.CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})$/u,i=r.ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})):(?<accountAddress>[a-zA-Z0-9]{1,64})$/u,o=r.ACCOUNT_ADDRESS_REGEX=/^(?<accountAddress>[a-zA-Z0-9]{1,64})$/u;const a=r.LimitedString=(0,n.size)((0,n.string)(),1,40),c=r.ChainIdStringStruct=(0,n.define)("Chain ID",(0,n.string)().validator),u=r.ChainIdStruct=(0,n.pattern)(c,s),l=r.AccountIdStruct=(0,n.pattern)((0,n.string)(),i),d=r.AccountIdArrayStruct=(0,n.array)(l),f=(r.AccountAddressStruct=(0,n.pattern)((0,n.string)(),o),r.ChainStruct=(0,n.object)({id:u,name:a})),p=r.NamespaceStruct=(0,n.object)({chains:(0,n.array)(f),methods:(0,n.optional)((0,n.array)(a)),events:(0,n.optional)((0,n.array)(a))}),h=r.NamespaceIdStruct=(0,n.pattern)((0,n.string)(),/^[-a-z0-9]{3,8}$/u)}}},{package:"external:../snaps-utils/src/namespace.ts",file:"../snaps-utils/src/namespace.ts"}],[300,{"@metamask/utils":81,superstruct:210},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WALLET_SNAP_PERMISSION_KEY=r.SnapValidationFailureReason=r.SnapIdPrefixes=r.SNAP_STREAM_NAMES=r.NpmSnapPackageJsonStruct=r.NpmSnapFileNames=r.NameStruct=void 0,r.assertIsNpmSnapPackageJson=function(e){(0,n.assertStruct)(e,a,`"${i.PackageJson}" is invalid`)},r.isNpmSnapPackageJson=function(e){return(0,s.is)(e,a)},r.isValidUrl=function(e,t={}){return(0,s.is)(e,c(t))},r.uri=void 0;var n=e("@metamask/utils"),s=e("superstruct");let i=r.NpmSnapFileNames=function(e){return e.PackageJson="package.json",e.Manifest="snap.manifest.json",e}({});const o=r.NameStruct=(0,s.size)((0,s.pattern)((0,s.string)(),/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214),a=r.NpmSnapPackageJsonStruct=(0,s.type)({version:n.VersionStruct,name:o,main:(0,s.optional)((0,s.size)((0,s.string)(),1,Infinity)),repository:(0,s.optional)((0,s.object)({type:(0,s.size)((0,s.string)(),1,Infinity),url:(0,s.size)((0,s.string)(),1,Infinity)}))});r.SnapIdPrefixes=function(e){return e.npm="npm:",e.local="local:",e}({}),r.SnapValidationFailureReason=function(e){return e.NameMismatch='"name" field mismatch',e.VersionMismatch='"version" field mismatch',e.RepositoryMismatch='"repository" field mismatch',e.ShasumMismatch='"shasum" field mismatch',e}({}),r.SNAP_STREAM_NAMES=function(e){return e.JSON_RPC="jsonRpc",e.COMMAND="command",e}({});const c=(e={})=>(0,s.refine)((0,s.union)([(0,s.string)(),(0,s.instance)(URL)]),"uri",(t=>{try{const r=new URL(t),n=(0,s.type)(e);return(0,s.assert)(r,n),!0}catch{return`Expected URL, got "${t.toString()}".`}}));r.uri=c;r.WALLET_SNAP_PERMISSION_KEY="wallet_snap"}}},{package:"external:../snaps-utils/src/types.ts",file:"../snaps-utils/src/types.ts"}]],[237],{resources:{"@metamask/json-rpc-engine":{packages:{"@metamask/providers>@metamask/safe-event-emitter":!0,"@metamask/rpc-errors":!0,"@metamask/utils":!0}},"@metamask/object-multiplex":{globals:{"console.warn":!0},packages:{"@metamask/object-multiplex>once":!0,"readable-stream":!0}},"@metamask/object-multiplex>once":{packages:{"@metamask/object-multiplex>once>wrappy":!0}},"@metamask/post-message-stream":{builtin:{"worker_threads.parentPort":!0},globals:{"MessageEvent.prototype":!0,WorkerGlobalScope:!0,addEventListener:!0,browser:!0,chrome:!0,"location.origin":!0,postMessage:!0,"process.on":!0,"process.removeListener":!0,"process.send":!0,removeEventListener:!0},packages:{"@metamask/post-message-stream>@metamask/utils":!0,"readable-stream":!0,worker_threads:!0}},"@metamask/post-message-stream>@metamask/utils":{builtin:{"buffer.Buffer":!0},globals:{TextDecoder:!0,TextEncoder:!0},packages:{"@swc/cli>semver":!0,buffer:!0,"eslint>debug":!0,superstruct:!0}},"@metamask/providers":{globals:{CustomEvent:!0,Event:!0,addEventListener:!0,"chrome.runtime.connect":!0,console:!0,dispatchEvent:!0,"document.createElement":!0,"document.readyState":!0,ethereum:"write","location.hostname":!0,removeEventListener:!0,web3:!0},packages:{"@metamask/json-rpc-engine":!0,"@metamask/object-multiplex":!0,"@metamask/providers>@metamask/safe-event-emitter":!0,"@metamask/providers>detect-browser":!0,"@metamask/providers>extension-port-stream":!0,"@metamask/providers>is-stream":!0,"@metamask/providers>json-rpc-middleware-stream":!0,"@metamask/rpc-errors":!0,"@metamask/utils":!0,"eslint>fast-deep-equal":!0,"readable-stream":!0}},"@metamask/providers>@metamask/safe-event-emitter":{builtin:{"events.EventEmitter":!0},globals:{setTimeout:!0},packages:{events:!0}},"@metamask/providers>detect-browser":{globals:{document:!0,navigator:!0,process:!0}},"@metamask/providers>extension-port-stream":{builtin:{"buffer.Buffer":!0},packages:{"@metamask/providers>extension-port-stream>readable-stream":!0,buffer:!0}},"@metamask/providers>extension-port-stream>readable-stream":{builtin:{"buffer.Blob":!0,"buffer.Buffer":!0,"events.EventEmitter":!0,stream:!0,"string_decoder.StringDecoder":!0},globals:{AbortController:!0,AggregateError:!0,Blob:!0,new:!0,"process.env.READABLE_STREAM":!0,target:!0},packages:{"@metamask/providers>extension-port-stream>readable-stream>abort-controller":!0,"browserify>process":!0,buffer:!0,events:!0,stream:!0,string_decoder:!0}},"@metamask/providers>extension-port-stream>readable-stream>abort-controller":{packages:{"@metamask/providers>extension-port-stream>readable-stream>abort-controller>event-target-shim":!0}},"@metamask/providers>extension-port-stream>readable-stream>abort-controller>event-target-shim":{globals:{Event:!0,EventTarget:!0,console:!0}},"@metamask/providers>json-rpc-middleware-stream":{globals:{"console.warn":!0,setTimeout:!0},packages:{"@metamask/providers>@metamask/safe-event-emitter":!0,"readable-stream":!0}},"@metamask/rpc-errors":{packages:{"@metamask/rpc-errors>fast-safe-stringify":!0,"@metamask/utils":!0}},"@metamask/snaps-sdk>is-svg":{packages:{"@metamask/snaps-sdk>is-svg>fast-xml-parser":!0}},"@metamask/snaps-sdk>is-svg>fast-xml-parser":{globals:{entityName:!0,val:!0},packages:{"@metamask/snaps-sdk>is-svg>fast-xml-parser>strnum":!0}},"@metamask/utils":{builtin:{"buffer.Buffer":!0},globals:{TextDecoder:!0,TextEncoder:!0},packages:{"@metamask/utils>@noble/hashes":!0,"@metamask/utils>@scure/base":!0,"@metamask/utils>pony-cause":!0,"@swc/cli>semver":!0,buffer:!0,"eslint>debug":!0,superstruct:!0}},"@metamask/utils>@noble/hashes":{globals:{TextEncoder:!0,crypto:!0}},"@metamask/utils>@scure/base":{globals:{TextDecoder:!0,TextEncoder:!0}},"@swc/cli>semver":{globals:{"console.error":!0,process:!0},packages:{"@swc/cli>semver>lru-cache":!0}},"@swc/cli>semver>lru-cache":{packages:{"@swc/cli>semver>lru-cache>yallist":!0}},"@wdio/mocha-framework>mocha>supports-color":{builtin:{"os.release":!0,"tty.isatty":!0},globals:{"process.env":!0,"process.platform":!0},packages:{"istanbul-lib-report>supports-color>has-flag":!0,os:!0,tty:!0}},"browserify>browser-pack>safe-buffer":{builtin:{buffer:!0},packages:{buffer:!0}},"browserify>inherits":{builtin:{"util.inherits":!0},packages:{util:!0}},"browserify>process":{globals:{process:!0}},"browserify>string_decoder":{packages:{"browserify>browser-pack>safe-buffer":!0}},"eslint>debug":{builtin:{"tty.isatty":!0,"util.deprecate":!0,"util.format":!0,"util.inspect":!0},globals:{console:!0,document:!0,localStorage:!0,navigator:!0,process:!0},packages:{"@wdio/mocha-framework>mocha>supports-color":!0,"eslint>debug>ms":!0,tty:!0,util:!0}},"external:../snaps-sdk/src/error-wrappers.ts":{packages:{"@metamask/rpc-errors":!0,"external:../snaps-sdk/src/internals/index.ts":!0}},"external:../snaps-sdk/src/errors.ts":{packages:{"external:../snaps-sdk/src/internals/index.ts":!0}},"external:../snaps-sdk/src/images.ts":{globals:{fetch:!0},packages:{"@metamask/utils":!0,"external:../snaps-sdk/src/ui/index.ts":!0}},"external:../snaps-sdk/src/index.ts":{packages:{"@metamask/utils":!0,"external:../snaps-sdk/src/error-wrappers.ts":!0,"external:../snaps-sdk/src/errors.ts":!0,"external:../snaps-sdk/src/images.ts":!0,"external:../snaps-sdk/src/internals/index.ts":!0,"external:../snaps-sdk/src/types/index.ts":!0,"external:../snaps-sdk/src/ui/index.ts":!0}},"external:../snaps-sdk/src/internals/error-wrappers.ts":{packages:{"external:../snaps-sdk/src/errors.ts":!0}},"external:../snaps-sdk/src/internals/errors.ts":{packages:{"@metamask/utils":!0}},"external:../snaps-sdk/src/internals/index.ts":{packages:{"external:../snaps-sdk/src/internals/error-wrappers.ts":!0,"external:../snaps-sdk/src/internals/errors.ts":!0,"external:../snaps-sdk/src/internals/helpers.ts":!0,"external:../snaps-sdk/src/internals/structs.ts":!0}},"external:../snaps-sdk/src/internals/structs.ts":{packages:{superstruct:!0}},"external:../snaps-sdk/src/types/handlers/index.ts":{packages:{"external:../snaps-sdk/src/types/handlers/cronjob.ts":!0,"external:../snaps-sdk/src/types/handlers/home-page.ts":!0,"external:../snaps-sdk/src/types/handlers/keyring.ts":!0,"external:../snaps-sdk/src/types/handlers/lifecycle.ts":!0,"external:../snaps-sdk/src/types/handlers/name-lookup.ts":!0,"external:../snaps-sdk/src/types/handlers/rpc-request.ts":!0,"external:../snaps-sdk/src/types/handlers/signature.ts":!0,"external:../snaps-sdk/src/types/handlers/transaction.ts":!0}},"external:../snaps-sdk/src/types/index.ts":{packages:{"external:../snaps-sdk/src/types/caip.ts":!0,"external:../snaps-sdk/src/types/global.ts":!0,"external:../snaps-sdk/src/types/handlers/index.ts":!0,"external:../snaps-sdk/src/types/methods/index.ts":!0,"external:../snaps-sdk/src/types/permissions.ts":!0,"external:../snaps-sdk/src/types/provider.ts":!0,"external:../snaps-sdk/src/types/snap.ts":!0}},"external:../snaps-sdk/src/types/methods/index.ts":{packages:{"external:../snaps-sdk/src/types/methods/dialog.ts":!0,"external:../snaps-sdk/src/types/methods/get-bip32-entropy.ts":!0,"external:../snaps-sdk/src/types/methods/get-bip32-public-key.ts":!0,"external:../snaps-sdk/src/types/methods/get-bip44-entropy.ts":!0,"external:../snaps-sdk/src/types/methods/get-client-status.ts":!0,"external:../snaps-sdk/src/types/methods/get-entropy.ts":!0,"external:../snaps-sdk/src/types/methods/get-file.ts":!0,"external:../snaps-sdk/src/types/methods/get-locale.ts":!0,"external:../snaps-sdk/src/types/methods/get-snaps.ts":!0,"external:../snaps-sdk/src/types/methods/invoke-keyring.ts":!0,"external:../snaps-sdk/src/types/methods/invoke-snap.ts":!0,"external:../snaps-sdk/src/types/methods/manage-accounts.ts":!0,"external:../snaps-sdk/src/types/methods/manage-state.ts":!0,"external:../snaps-sdk/src/types/methods/methods.ts":!0,"external:../snaps-sdk/src/types/methods/notify.ts":!0,"external:../snaps-sdk/src/types/methods/request-snaps.ts":!0}},"external:../snaps-sdk/src/ui/builder.ts":{packages:{"@metamask/utils":!0}},"external:../snaps-sdk/src/ui/component.ts":{packages:{"@metamask/utils":!0,"external:../snaps-sdk/src/ui/components/index.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/address.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/copyable.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/divider.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/heading.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/image.ts":{packages:{"@metamask/snaps-sdk>is-svg":!0,"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/index.ts":{packages:{"external:../snaps-sdk/src/ui/components/address.ts":!0,"external:../snaps-sdk/src/ui/components/copyable.ts":!0,"external:../snaps-sdk/src/ui/components/divider.ts":!0,"external:../snaps-sdk/src/ui/components/heading.ts":!0,"external:../snaps-sdk/src/ui/components/image.ts":!0,"external:../snaps-sdk/src/ui/components/panel.ts":!0,"external:../snaps-sdk/src/ui/components/row.ts":!0,"external:../snaps-sdk/src/ui/components/spinner.ts":!0,"external:../snaps-sdk/src/ui/components/text.ts":!0}},"external:../snaps-sdk/src/ui/components/panel.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/components/address.ts":!0,"external:../snaps-sdk/src/ui/components/copyable.ts":!0,"external:../snaps-sdk/src/ui/components/divider.ts":!0,"external:../snaps-sdk/src/ui/components/heading.ts":!0,"external:../snaps-sdk/src/ui/components/image.ts":!0,"external:../snaps-sdk/src/ui/components/row.ts":!0,"external:../snaps-sdk/src/ui/components/spinner.ts":!0,"external:../snaps-sdk/src/ui/components/text.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/row.ts":{packages:{"external:../snaps-sdk/src/internals/index.ts":!0,"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/components/address.ts":!0,"external:../snaps-sdk/src/ui/components/image.ts":!0,"external:../snaps-sdk/src/ui/components/text.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/spinner.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/text.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/index.ts":{packages:{"external:../snaps-sdk/src/ui/component.ts":!0,"external:../snaps-sdk/src/ui/components/index.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0}},"external:../snaps-sdk/src/ui/nodes.ts":{packages:{superstruct:!0}},"external:../snaps-utils/src/errors.ts":{packages:{"@metamask/rpc-errors":!0,"@metamask/utils":!0,"external:../snaps-sdk/src/index.ts":!0}},"external:../snaps-utils/src/handlers.ts":{packages:{"external:../snaps-sdk/src/index.ts":!0,"external:../snaps-utils/src/handler-types.ts":!0,superstruct:!0}},"external:../snaps-utils/src/icon.ts":{builtin:{buffer:!0}},"external:../snaps-utils/src/iframe.ts":{globals:{"document.body.appendChild":!0,"document.createElement":!0}},"external:../snaps-utils/src/index.executionenv.ts":{packages:{"external:../snaps-utils/src/errors.ts":!0,"external:../snaps-utils/src/handler-types.ts":!0,"external:../snaps-utils/src/handlers.ts":!0,"external:../snaps-utils/src/iframe.ts":!0,"external:../snaps-utils/src/logging.ts":!0,"external:../snaps-utils/src/namespace.ts":!0,"external:../snaps-utils/src/types.ts":!0}},"external:../snaps-utils/src/logging.ts":{globals:{"console.error":!0,"console.log":!0,"console.warn":!0},packages:{"@metamask/utils":!0}},"external:../snaps-utils/src/namespace.ts":{packages:{superstruct:!0}},"external:../snaps-utils/src/types.ts":{globals:{URL:!0},packages:{"@metamask/utils":!0,superstruct:!0}},"istanbul-lib-report>supports-color>has-flag":{globals:{"process.argv":!0}},"readable-stream":{builtin:{"buffer.Buffer":!0,"events.EventEmitter":!0,stream:!0,util:!0},globals:{"process.env.READABLE_STREAM":!0,"process.nextTick":!0,"process.stderr":!0,"process.stdout":!0},packages:{"browserify>inherits":!0,"browserify>string_decoder":!0,buffer:!0,events:!0,"readable-stream>util-deprecate":!0,stream:!0,util:!0}},"readable-stream>util-deprecate":{builtin:{"util.deprecate":!0},packages:{util:!0}},superstruct:{globals:{"console.warn":!0,define:!0}}}});
|
|
13296
|
+
var n=e("buffer"),s=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=o),o.prototype=Object.create(s.prototype),i(s,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"browserify>browser-pack>safe-buffer",file:"../../node_modules/safe-buffer/index.js"}],[108,{"../functions/cmp":112,"../internal/debug":137,"../internal/parse-options":139,"../internal/re":140,"./range":109,"./semver":110},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Symbol("SemVer ANY");class s{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof s){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==undefined?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):(!(t=i(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}t.exports=s;const i=e("../internal/parse-options"),{safeRe:o,t:a}=e("../internal/re"),c=e("../functions/cmp"),u=e("../internal/debug"),l=e("./semver"),d=e("./range")}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/comparator.js"}],[109,{"../internal/constants":136,"../internal/debug":137,"../internal/parse-options":139,"../internal/re":140,"./comparator":108,"./semver":110,"lru-cache":141},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){class n{constructor(e,t){if(t=i(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&m))+":"+e,r=s.get(t);if(r)return r;const n=this.options.loose,i=n?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(i,j(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],d),a("comparator trim",e),e=e.replace(u[l.TILDETRIM],p),a("tilde trim",e),e=e.replace(u[l.CARETTRIM],h),a("caret trim",e);let c=e.split(" ").map((e=>w(e,this.options))).join(" ").split(/\s+/).map((e=>R(e,this.options)));n&&(c=c.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(u[l.COMPARATORLOOSE]))))),a("range list",c);const b=new Map,y=c.map((e=>new o(e,this.options)));for(const e of y){if(g(e))return[e];b.set(e.value,e)}b.size>1&&b.has("")&&b.delete("");const v=[...b.values()];return s.set(t,v),v}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>y(r,t)&&e.set.some((e=>y(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}t.exports=n;const s=new(e("lru-cache"))({max:1e3}),i=e("../internal/parse-options"),o=e("./comparator"),a=e("../internal/debug"),c=e("./semver"),{safeRe:u,t:l,comparatorTrimReplace:d,tildeTrimReplace:p,caretTrimReplace:h}=e("../internal/re"),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:m}=e("../internal/constants"),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,y=(e,t)=>{let r=!0;const n=e.slice();let s=n.pop();for(;r&&n.length;)r=n.every((e=>s.intersects(e,t))),s=n.pop();return r},w=(e,t)=>(a("comp",e,t),e=_(e,t),a("caret",e),e=E(e,t),a("tildes",e),e=T(e,t),a("xrange",e),e=O(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map((e=>k(e,t))).join(" "),k=(e,t)=>{const r=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(r,((t,r,n,s,i)=>{let o;return a("tilde",e,t,r,n,s,i),v(r)?o="":v(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:v(s)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(a("replaceTilde pr",i),o=`>=${r}.${n}.${s}-${i} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${s} <${r}.${+n+1}.0-0`,a("tilde return",o),o}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{a("caret",e,t);const r=t.loose?u[l.CARETLOOSE]:u[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,s,i,o)=>{let c;return a("caret",e,t,r,s,i,o),v(r)?c="":v(s)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:v(i)?c="0"===r?`>=${r}.${s}.0${n} <${r}.${+s+1}.0-0`:`>=${r}.${s}.0${n} <${+r+1}.0.0-0`:o?(a("replaceCaret pr",o),c="0"===r?"0"===s?`>=${r}.${s}.${i}-${o} <${r}.${s}.${+i+1}-0`:`>=${r}.${s}.${i}-${o} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${i}-${o} <${+r+1}.0.0-0`):(a("no pr"),c="0"===r?"0"===s?`>=${r}.${s}.${i}${n} <${r}.${s}.${+i+1}-0`:`>=${r}.${s}.${i}${n} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${i} <${+r+1}.0.0-0`),a("caret return",c),c}))},T=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>x(e,t))).join(" ")),x=(e,t)=>{e=e.trim();const r=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(r,((r,n,s,i,o,c)=>{a("xRange",e,r,n,s,i,o,c);const u=v(s),l=u||v(i),d=l||v(o),p=d;return"="===n&&p&&(n=""),c=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&p?(l&&(i=0),o=0,">"===n?(n=">=",l?(s=+s+1,i=0,o=0):(i=+i+1,o=0)):"<="===n&&(n="<",l?s=+s+1:i=+i+1),"<"===n&&(c="-0"),r=`${n+s}.${i}.${o}${c}`):l?r=`>=${s}.0.0${c} <${+s+1}.0.0-0`:d&&(r=`>=${s}.${i}.0${c} <${s}.${+i+1}.0-0`),a("xRange return",r),r}))},O=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),R=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),j=e=>(t,r,n,s,i,o,a,c,u,l,d,p,h)=>`${r=v(n)?"":v(s)?`>=${n}.0.0${e?"-0":""}`:v(i)?`>=${n}.${s}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=v(u)?"":v(l)?`<${+u+1}.0.0-0`:v(d)?`<${u}.${+l+1}.0-0`:p?`<=${u}.${l}.${d}-${p}`:e?`<${u}.${l}.${+d+1}-0`:`<=${c}`}`.trim(),P=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(a(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/range.js"}],[110,{"../internal/constants":136,"../internal/debug":137,"../internal/identifiers":138,"../internal/parse-options":139,"../internal/re":140},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../internal/debug"),{MAX_LENGTH:s,MAX_SAFE_INTEGER:i}=e("../internal/constants"),{safeRe:o,t:a}=e("../internal/re"),c=e("../internal/parse-options"),{compareIdentifiers:u}=e("../internal/identifiers");class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>s)throw new TypeError(`version is longer than ${s} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(n("prerelease compare",t,r,s),r===undefined&&s===undefined)return 0;if(s===undefined)return 1;if(r===undefined)return-1;if(r!==s)return u(r,s)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(n("prerelease compare",t,r,s),r===undefined&&s===undefined)return 0;if(s===undefined)return 1;if(r===undefined)return-1;if(r!==s)return u(r,s)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}t.exports=l}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/semver.js"}],[111,{"./parse":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/clean.js"}],[112,{"./eq":118,"./gt":119,"./gte":120,"./lt":122,"./lte":123,"./neq":126},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./eq"),s=e("./neq"),i=e("./gt"),o=e("./gte"),a=e("./lt"),c=e("./lte");t.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return s(e,r,u);case">":return i(e,r,u);case">=":return o(e,r,u);case"<":return a(e,r,u);case"<=":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/cmp.js"}],[113,{"../classes/semver":110,"../internal/re":140,"./parse":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("./parse"),{safeRe:i,t:o}=e("../internal/re");t.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=i[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),i[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[o.COERCERTL].lastIndex=-1}else r=e.match(i[o.COERCE]);return null===r?null:s(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/coerce.js"}],[114,{"../classes/semver":110},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>{const s=new n(e,r),i=new n(t,r);return s.compare(i)||s.compareBuild(i)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare-build.js"}],[115,{"./compare":116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t)=>n(e,t,!0)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare-loose.js"}],[116,{"../classes/semver":110},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare.js"}],[117,{"./parse.js":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse.js");t.exports=(e,t)=>{const r=n(e,null,!0),s=n(t,null,!0),i=r.compare(s);if(0===i)return null;const o=i>0,a=o?r:s,c=o?s:r,u=!!a.prerelease.length;if(!!c.prerelease.length&&!u)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=u?"pre":"";return r.major!==s.major?l+"major":r.minor!==s.minor?l+"minor":r.patch!==s.patch?l+"patch":"prerelease"}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/diff.js"}],[118,{"./compare":116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0===n(e,t,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/eq.js"}],[119,{"./compare":116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/gt.js"}],[120,{"./compare":116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>=0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/gte.js"}],[121,{"../classes/semver":110},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r,s,i)=>{"string"==typeof r&&(i=s,s=r,r=undefined);try{return new n(e instanceof n?e.version:e,r).inc(t,s,i).version}catch(e){return null}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/inc.js"}],[122,{"./compare":116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/lt.js"}],[123,{"./compare":116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<=0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/lte.js"}],[124,{"../classes/semver":110},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).major}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/major.js"}],[125,{"../classes/semver":110},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).minor}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/minor.js"}],[126,{"./compare":116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0!==n(e,t,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/neq.js"}],[127,{"../classes/semver":110},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/parse.js"}],[128,{"../classes/semver":110},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).patch}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/patch.js"}],[129,{"./parse":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/prerelease.js"}],[130,{"./compare":116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(t,e,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/rcompare.js"}],[131,{"./compare-build":114},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/rsort.js"}],[132,{"../classes/range":109},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/satisfies.js"}],[133,{"./compare-build":114},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/sort.js"}],[134,{"./parse":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/valid.js"}],[135,{"./classes/comparator":108,"./classes/range":109,"./classes/semver":110,"./functions/clean":111,"./functions/cmp":112,"./functions/coerce":113,"./functions/compare":116,"./functions/compare-build":114,"./functions/compare-loose":115,"./functions/diff":117,"./functions/eq":118,"./functions/gt":119,"./functions/gte":120,"./functions/inc":121,"./functions/lt":122,"./functions/lte":123,"./functions/major":124,"./functions/minor":125,"./functions/neq":126,"./functions/parse":127,"./functions/patch":128,"./functions/prerelease":129,"./functions/rcompare":130,"./functions/rsort":131,"./functions/satisfies":132,"./functions/sort":133,"./functions/valid":134,"./internal/constants":136,"./internal/identifiers":138,"./internal/re":140,"./ranges/gtr":142,"./ranges/intersects":143,"./ranges/ltr":144,"./ranges/max-satisfying":145,"./ranges/min-satisfying":146,"./ranges/min-version":147,"./ranges/outside":148,"./ranges/simplify":149,"./ranges/subset":150,"./ranges/to-comparators":151,"./ranges/valid":152},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./internal/re"),s=e("./internal/constants"),i=e("./classes/semver"),o=e("./internal/identifiers"),a=e("./functions/parse"),c=e("./functions/valid"),u=e("./functions/clean"),l=e("./functions/inc"),d=e("./functions/diff"),p=e("./functions/major"),h=e("./functions/minor"),f=e("./functions/patch"),m=e("./functions/prerelease"),g=e("./functions/compare"),b=e("./functions/rcompare"),y=e("./functions/compare-loose"),w=e("./functions/compare-build"),v=e("./functions/sort"),E=e("./functions/rsort"),k=e("./functions/gt"),_=e("./functions/lt"),S=e("./functions/eq"),T=e("./functions/neq"),x=e("./functions/gte"),O=e("./functions/lte"),R=e("./functions/cmp"),j=e("./functions/coerce"),P=e("./classes/comparator"),M=e("./classes/range"),A=e("./functions/satisfies"),C=e("./ranges/to-comparators"),N=e("./ranges/max-satisfying"),I=e("./ranges/min-satisfying"),$=e("./ranges/min-version"),L=e("./ranges/valid"),D=e("./ranges/outside"),F=e("./ranges/gtr"),B=e("./ranges/ltr"),U=e("./ranges/intersects"),V=e("./ranges/simplify"),H=e("./ranges/subset");t.exports={parse:a,valid:c,clean:u,inc:l,diff:d,major:p,minor:h,patch:f,prerelease:m,compare:g,rcompare:b,compareLoose:y,compareBuild:w,sort:v,rsort:E,gt:k,lt:_,eq:S,neq:T,gte:x,lte:O,cmp:R,coerce:j,Comparator:P,Range:M,satisfies:A,toComparators:C,maxSatisfying:N,minSatisfying:I,minVersion:$,validRange:L,outside:D,gtr:F,ltr:B,intersects:U,simplifyRange:V,subset:H,SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:s.SEMVER_SPEC_VERSION,RELEASE_TYPES:s.RELEASE_TYPES,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/index.js"}],[136,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/constants.js"}],[137,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};t.exports=n}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/debug.js"}],[138,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=/^[0-9]+$/,s=(e,t)=>{const r=n.test(e),s=n.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:s,rcompareIdentifiers:(e,t)=>s(t,e)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/identifiers.js"}],[139,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Object.freeze({loose:!0}),s=Object.freeze({});t.exports=e=>e?"object"!=typeof e?n:e:s}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/parse-options.js"}],[140,{"./constants":136,"./debug":137},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:i}=e("./constants"),o=e("./debug"),a=(r=t.exports={}).re=[],c=r.safeRe=[],u=r.src=[],l=r.t={};let d=0;const p="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[p,s]],f=(e,t,r)=>{const n=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),s=d++;o(e,s,t),l[e]=s,u[s]=t,a[s]=new RegExp(t,r?"g":undefined),c[s]=new RegExp(n,r?"g":undefined)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),f("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${p}+`),f("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),f("FULL",`^${u[l.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),f("LOOSE",`^${u[l.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),f("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),f("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),f("COERCERTL",u[l.COERCE],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",f("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",f("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/re.js"}],[141,{yallist:160},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("yallist"),s=Symbol("max"),i=Symbol("length"),o=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),p=Symbol("cache"),h=Symbol("updateAgeOnGet"),f=()=>1;const m=(e,t,r)=>{const n=e[p].get(t);if(n){const t=n.value;if(g(e,t)){if(y(e,n),!e[a])return undefined}else r&&(e[h]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},b=e=>{if(e[i]>e[s])for(let t=e[d].tail;e[i]>e[s]&&null!==t;){const r=t.prev;y(e,t),t=r}},y=(e,t)=>{if(t){const r=t.value;e[u]&&e[u](r.key,r.value),e[i]-=r.length,e[p].delete(r.key),e[d].removeNode(t)}};class w{constructor(e,t,r,n,s){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=s||0}}const v=(e,t,r,n)=>{let s=r.value;g(e,s)&&(y(e,r),e[a]||(s=undefined)),s&&t.call(n,s.value,s.key,e)};t.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[s]=e.max||Infinity;const t=e.length||f;if(this[o]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[s]=e||Infinity,b(this)}get max(){return this[s]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,b(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[o]&&(this[o]=e,this[i]=0,this[d].forEach((e=>{e.length=this[o](e.value,e.key),this[i]+=e.length}))),b(this)}get lengthCalculator(){return this[o]}get length(){return this[i]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){const n=r.prev;v(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){const n=r.next;v(this,e,r,t),r=n}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[u]&&this[d]&&this[d].length&&this[d].forEach((e=>this[u](e.key,e.value))),this[p]=new Map,this[d]=new n,this[i]=0}dump(){return this[d].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[o](t,e);if(this[p].has(e)){if(a>this[s])return y(this,this[p].get(e)),!1;const o=this[p].get(e).value;return this[u]&&(this[l]||this[u](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[i]+=a-o.length,o.length=a,this.get(e),b(this),!0}const h=new w(e,t,a,n,r);return h.length>this[s]?(this[u]&&this[u](e,t),!1):(this[i]+=h.length,this[d].unshift(h),this[p].set(e,this[d].head),b(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[d].tail;return e?(y(this,e),e.value):null}del(e){y(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],s=n.e||0;if(0===s)this.set(n.k,n.v);else{const e=s-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[p].forEach(((e,t)=>m(this,t,!1)))}}}}},{package:"@swc/cli>semver>lru-cache",file:"../../node_modules/semver/node_modules/lru-cache/index.js"}],[142,{"./outside":148},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,">",r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/gtr.js"}],[143,{"../classes/range":109},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/intersects.js"}],[144,{"./outside":148},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,"<",r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/ltr.js"}],[145,{"../classes/range":109,"../classes/semver":110},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range");t.exports=(e,t,r)=>{let i=null,o=null,a=null;try{a=new s(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&-1!==o.compare(e)||(i=e,o=new n(i,r)))})),i}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/max-satisfying.js"}],[146,{"../classes/range":109,"../classes/semver":110},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range");t.exports=(e,t,r)=>{let i=null,o=null,a=null;try{a=new s(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&1!==o.compare(e)||(i=e,o=new n(i,r)))})),i}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/min-satisfying.js"}],[147,{"../classes/range":109,"../classes/semver":110,"../functions/gt":119},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range"),i=e("../functions/gt");t.exports=(e,t)=>{e=new s(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let o=null;s.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!i(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!o||r&&!i(r,o)||(r=o)}return r&&e.test(r)?r:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/min-version.js"}],[148,{"../classes/comparator":108,"../classes/range":109,"../classes/semver":110,"../functions/gt":119,"../functions/gte":120,"../functions/lt":122,"../functions/lte":123,"../functions/satisfies":132},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/comparator"),{ANY:i}=s,o=e("../classes/range"),a=e("../functions/satisfies"),c=e("../functions/gt"),u=e("../functions/lt"),l=e("../functions/lte"),d=e("../functions/gte");t.exports=(e,t,r,p)=>{let h,f,m,g,b;switch(e=new n(e,p),t=new o(t,p),r){case">":h=c,f=l,m=u,g=">",b=">=";break;case"<":h=u,f=d,m=c,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,p))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let o=null,a=null;if(n.forEach((e=>{e.semver===i&&(e=new s(">=0.0.0")),o=o||e,a=a||e,h(e.semver,o.semver,p)?o=e:m(e.semver,a.semver,p)&&(a=e)})),o.operator===g||o.operator===b)return!1;if((!a.operator||a.operator===g)&&f(e,a.semver))return!1;if(a.operator===b&&m(e,a.semver))return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/outside.js"}],[149,{"../functions/compare.js":116,"../functions/satisfies.js":132},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../functions/satisfies.js"),s=e("../functions/compare.js");t.exports=(e,t,r)=>{const i=[];let o=null,a=null;const c=e.sort(((e,t)=>s(e,t,r)));for(const e of c){n(e,t,r)?(a=e,o||(o=e)):(a&&i.push([o,a]),a=null,o=null)}o&&i.push([o,null]);const u=[];for(const[e,t]of i)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length<d.length?l:t}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/simplify.js"}],[150,{"../classes/comparator.js":108,"../classes/range.js":109,"../functions/compare.js":116,"../functions/satisfies.js":132},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range.js"),s=e("../classes/comparator.js"),{ANY:i}=s,o=e("../functions/satisfies.js"),a=e("../functions/compare.js"),c=[new s(">=0.0.0-0")],u=[new s(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===i){if(r.includePrerelease)return!0;t=u}const n=new Set;let s,l,h,f,m,g,b;for(const t of e)">"===t.operator||">="===t.operator?s=d(s,t,r):"<"===t.operator||"<="===t.operator?l=p(l,t,r):n.add(t.semver);if(n.size>1)return null;if(s&&l){if(h=a(s.semver,l.semver,r),h>0)return null;if(0===h&&(">="!==s.operator||"<="!==l.operator))return null}for(const e of n){if(s&&!o(e,String(s),r))return null;if(l&&!o(e,String(l),r))return null;for(const n of t)if(!o(e,String(n),r))return!1;return!0}let y=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,w=!(!s||r.includePrerelease||!s.semver.prerelease.length)&&s.semver;y&&1===y.prerelease.length&&"<"===l.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(b=b||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,s)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),">"===e.operator||">="===e.operator){if(f=d(s,e,r),f===e&&f!==s)return!1}else if(">="===s.operator&&!o(s.semver,String(e),r))return!1;if(l)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(m=p(l,e,r),m===e&&m!==l)return!1}else if("<="===l.operator&&!o(l.semver,String(e),r))return!1;if(!e.operator&&(l||s)&&0!==h)return!1}return!(s&&g&&!l&&0!==h)&&(!(l&&b&&!s&&0!==h)&&(!w&&!y))},d=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};t.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let s=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/subset.js"}],[151,{"../classes/range":109},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/to-comparators.js"}],[152,{"../classes/range":109},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/valid.js"}],[153,{"safe-buffer":107},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=o(t[n]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"browserify>string_decoder",file:"../../node_modules/string_decoder/lib/string_decoder.js"}],[154,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=/^[-+]?0x[a-fA-F0-9]+$/,s=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(e,t={}){if(t=Object.assign({},i,t),!e||"string"!=typeof e)return e;let r=e.trim();if(t.skipLike!==undefined&&t.skipLike.test(r))return e;if(t.hex&&n.test(r))return Number.parseInt(r,16);{const n=s.exec(r);if(n){const s=n[1],i=n[2];let o=function(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(n[3]);const a=n[4]||n[6];if(!t.leadingZeros&&i.length>0&&s&&"."!==r[2])return e;if(!t.leadingZeros&&i.length>0&&!s&&"."!==r[1])return e;{const n=Number(r),c=""+n;return-1!==c.search(/[eE]/)||a?t.eNotation?n:e:-1!==r.indexOf(".")?"0"===c&&""===o||c===o||s&&c==="-"+o?n:e:i?o===c||s+o===c?n:e:r===c||r===s+c?n:e}}return e}}}}},{package:"@metamask/snaps-sdk>is-svg>fast-xml-parser>strnum",file:"../../node_modules/strnum/strnum.js"}],[155,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?n(r):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).Superstruct={})}(this,(function(e){class t extends TypeError{constructor(e,t){let r;const{message:n,explanation:s,...i}=e,{path:o}=e,a=0===o.length?n:`At path: ${o.join(".")} -- ${n}`;super(s??a),null!=s&&(this.cause=a),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function r(e){return"object"==typeof e&&null!=e}function n(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function i(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:c,key:i[i.length-1],path:i,branch:o,...e,message:u}}function*o(e,t,n,s){var o;r(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const r of e){const e=i(r,t,n,s);e&&(yield e)}}function*a(e,t,n={}){const{path:s=[],branch:i=[e],coerce:o=!1,mask:c=!1}=n,u={path:s,branch:i};if(o&&(e=t.coercer(e,u),c&&"type"!==t.type&&r(t.schema)&&r(e)&&!Array.isArray(e)))for(const r in e)t.schema[r]===undefined&&delete e[r];let l="valid";for(const r of t.validator(e,u))r.explanation=n.message,l="not_valid",yield[r,undefined];for(let[d,p,h]of t.entries(e,u)){const t=a(p,h,{path:d===undefined?s:[...s,d],branch:d===undefined?i:[...i,p],coerce:o,mask:c,message:n.message});for(const n of t)n[0]?(l=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],undefined]):o&&(p=n[1],d===undefined?e=p:e instanceof Map?e.set(d,p):e instanceof Set?e.add(p):r(e)&&(p!==undefined||d in e)&&(e[d]=p))}if("not_valid"!==l)for(const r of t.refiner(e,u))r.explanation=n.message,l="not_refined",yield[r,undefined];"valid"===l&&(yield[undefined,e])}class c{constructor(e){const{type:t,schema:r,validator:n,refiner:s,coercer:i=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=i,this.validator=n?(e,t)=>o(n(e,t),t,this,e):()=>[],this.refiner=s?(e,t)=>o(s(e,t),t,this,e):()=>[]}assert(e,t){return u(e,this,t)}create(e,t){return l(e,this,t)}is(e){return p(e,this)}mask(e,t){return d(e,this,t)}validate(e,t={}){return h(e,this,t)}}function u(e,t,r){const n=h(e,t,{message:r});if(n[0])throw n[0]}function l(e,t,r){const n=h(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t,r){const n=h(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function p(e,t){return!h(e,t)[0]}function h(e,r,n={}){const s=a(e,r,n),i=function(e){const{done:t,value:r}=e.next();return t?undefined:r}(s);if(i[0]){return[new t(i[0],(function*(){for(const e of s)e[0]&&(yield e[0])})),undefined]}{const e=i[1];return[undefined,e]}}function f(e,t){return new c({type:e,schema:null,validator:t})}function m(){return f("never",(()=>!1))}function g(e){const t=e?Object.keys(e):[],n=m();return new c({type:"object",schema:e||null,*entries(s){if(e&&r(s)){const r=new Set(Object.keys(s));for(const n of t)r.delete(n),yield[n,s[n],e[n]];for(const e of r)yield[e,s[e],n]}},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>r(e)?{...e}:e})}function b(e){return new c({...e,validator:(t,r)=>t===undefined||e.validator(t,r),refiner:(t,r)=>t===undefined||e.refiner(t,r)})}function y(){return f("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function w(e){const t=Object.keys(e);return new c({type:"type",schema:e,*entries(n){if(r(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>r(e)?{...e}:e})}function v(){return f("unknown",(()=>!0))}function E(e,t,r){return new c({...e,coercer:(n,s)=>p(n,t)?e.coercer(r(n,s),s):e.coercer(n,s)})}function k(e){return e instanceof Map||e instanceof Set?e.size:e.length}function _(e,t,r){return new c({...e,*refiner(n,s){yield*e.refiner(n,s);const i=o(r(n,s),s,e,n);for(const e of i)yield{...e,refinement:t}}})}e.Struct=c,e.StructError=t,e.any=function(){return f("any",(()=>!0))},e.array=function(e){return new c({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})},e.assert=u,e.assign=function(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?w(n):g(n)},e.bigint=function(){return f("bigint",(e=>"bigint"==typeof e))},e.boolean=function(){return f("boolean",(e=>"boolean"==typeof e))},e.coerce=E,e.create=l,e.date=function(){return f("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))},e.defaulted=function(e,t,r={}){return E(e,v(),(e=>{const s="function"==typeof t?t():t;if(e===undefined)return s;if(!r.strict&&n(e)&&n(s)){const t={...e};let r=!1;for(const e in s)t[e]===undefined&&(t[e]=s[e],r=!0);if(r)return t}return e}))},e.define=f,e.deprecated=function(e,t){return new c({...e,refiner:(t,r)=>t===undefined||e.refiner(t,r),validator:(r,n)=>r===undefined||(t(r,n),e.validator(r,n))})},e.dynamic=function(e){return new c({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})},e.empty=function(e){return _(e,"empty",(t=>{const r=k(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))},e.enums=function(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new c({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})},e.func=function(){return f("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))},e.instance=function(e){return f("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))},e.integer=function(){return f("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))},e.intersection=function(e){return new c({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})},e.is=p,e.lazy=function(e){let t;return new c({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})},e.literal=function(e){const t=s(e),r=typeof e;return new c({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})},e.map=function(e,t){return new c({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,s]of r.entries())yield[n,n,e],yield[n,s,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})},e.mask=d,e.max=function(e,t,r={}){const{exclusive:n}=r;return _(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.min=function(e,t,r={}){const{exclusive:n}=r;return _(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.never=m,e.nonempty=function(e){return _(e,"nonempty",(t=>k(t)>0||`Expected a nonempty ${e.type} but received an empty one`))},e.nullable=function(e){return new c({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})},e.number=function(){return f("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))},e.object=g,e.omit=function(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?w(n):g(n)},e.optional=b,e.partial=function(e){const t=e instanceof c?{...e.schema}:{...e};for(const e in t)t[e]=b(t[e]);return g(t)},e.pattern=function(e,t){return _(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))},e.pick=function(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return g(n)},e.record=function(e,t){return new c({type:"record",schema:null,*entries(n){if(r(n))for(const r in n){const s=n[r];yield[r,r,e],yield[r,s,t]}},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`})},e.refine=_,e.regexp=function(){return f("regexp",(e=>e instanceof RegExp))},e.set=function(e){return new c({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})},e.size=function(e,t,r=t){const n=`Expected a ${e.type}`,s=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return _(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${s} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=r||`${n} with a size ${s} but received one with a size of \`${i}\``}{const{length:i}=e;return t<=i&&i<=r||`${n} with a length ${s} but received one with a length of \`${i}\``}}))},e.string=y,e.struct=function(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),f(e,t)},e.trimmed=function(e){return E(e,y(),(e=>e.trim()))},e.tuple=function(e){const t=m();return new c({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let s=0;s<n;s++)yield[s,r[s],e[s]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${s(e)}`})},e.type=w,e.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new c({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const i=[];for(const t of e){const[...e]=a(r,t,n),[s]=e;if(!s[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...i]}})},e.unknown=v,e.validate=h}))}}},{package:"superstruct",file:"../../node_modules/superstruct/dist/index.cjs"}],[156,{"has-flag":80,os:"os",tty:"tty"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("os"),s=e("tty"),i=e("has-flag"),{env:o}=process;let a;function c(e,{streamIsTTY:t,sniffFlags:r=!0}={}){const s=function(){if("FORCE_COLOR"in o)return"true"===o.FORCE_COLOR?1:"false"===o.FORCE_COLOR?0:0===o.FORCE_COLOR.length?1:Math.min(Number.parseInt(o.FORCE_COLOR,10),3)}();s!==undefined&&(a=s);const c=r?a:s;if(0===c)return 0;if(r){if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2}if(e&&!t&&c===undefined)return 0;const u=c||0;if("dumb"===o.TERM)return u;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((e=>e in o))||"codeship"===o.CI_NAME?1:u;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=Number.parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:u}function u(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(c(e,{streamIsTTY:e&&e.isTTY,...t}))}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?a=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(a=1),t.exports={supportsColor:u,stdout:u({isTTY:s.isatty(1)}),stderr:u({isTTY:s.isatty(2)})}}}},{package:"@wdio/mocha-framework>mocha>supports-color",file:"../../node_modules/supports-color/index.js"}],[157,{util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("util").deprecate}}},{package:"readable-stream>util-deprecate",file:"../../node_modules/util-deprecate/node.js"}],[158,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),s=e[e.length-1];return"function"==typeof n&&n!==s&&Object.keys(s).forEach((function(e){n[e]=s[e]})),n}}}}},{package:"@metamask/object-multiplex>once>wrappy",file:"../../node_modules/wrappy/wrappy.js"}],[159,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}}}},{package:"@swc/cli>semver>lru-cache>yallist",file:"../../node_modules/yallist/iterator.js"}],[160,{"./iterator.js":159},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function s(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function i(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}t.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.pop=function(){if(!this.tail)return undefined;var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e},n.prototype.shift=function(){if(!this.head)return undefined;var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var s=0;null!==n;s++)r=e(r,n.value,s),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var s=this.length-1;null!==n;s--)r=e(r,n.value,s),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;var o=[];for(n=0;i&&n<t;n++)o.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(n=0;n<r.length;n++)i=s(this,i,r[n]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{e("./iterator.js")(n)}catch(e){}}}},{package:"@swc/cli>semver>lru-cache>yallist",file:"../../node_modules/yallist/yallist.js"}],[161,{"../logging":180,"./../../../snaps-sdk/src":186,"./../../../snaps-utils/src/index.executionenv":250,"./commands":162,"./endowments":167,"./globalEvents":174,"./sortParams":177,"./utils":178,"./validation":179,"@metamask/json-rpc-engine":6,"@metamask/providers/dist/StreamProvider":23,"@metamask/rpc-errors":31,"@metamask/utils":55,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BaseSnapExecutor=void 0;var n=e("@metamask/json-rpc-engine"),s=e("@metamask/providers/dist/StreamProvider"),i=e("@metamask/rpc-errors"),o=e("./../../../snaps-sdk/src"),a=e("./../../../snaps-utils/src/index.executionenv"),c=e("@metamask/utils"),u=e("superstruct"),l=e("../logging"),d=e("./commands"),p=e("./endowments"),h=e("./globalEvents"),f=e("./sortParams"),m=e("./utils"),g=e("./validation");function b(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function y(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const v={code:i.errorCodes.rpc.internal,message:"Execution Environment Error"},E=i.rpcErrors.internal({message:"Unhandled Snap Error"}).serialize(),k={ping:{struct:g.PingRequestArgumentsStruct,params:[]},executeSnap:{struct:g.ExecuteSnapRequestArgumentsStruct,params:["snapId","sourceCode","endowments"]},terminate:{struct:g.TerminateRequestArgumentsStruct,params:[]},snapRpc:{struct:g.SnapRpcRequestArgumentsStruct,params:["target","handler","origin","request"]}};var _=new WeakSet,S=new WeakSet,T=new WeakSet;async function x(e){return new Promise(((t,r)=>{this.commandStream.write(e,(e=>{e?r(e):t()}))}))}async function O(e){if(!(0,c.isValidJson)(e)||!(0,c.isObject)(e))throw i.rpcErrors.internal("JSON-RPC notifications must be JSON serializable objects");await w(this,_,x).call(this,{...e,jsonrpc:"2.0"})}async function R(e,t){(0,c.isValidJson)(t)&&(0,c.isObject)(t)?await w(this,_,x).call(this,{...t,id:e,jsonrpc:"2.0"}):await w(this,_,x).call(this,{error:(0,i.serializeError)(i.rpcErrors.internal("JSON-RPC responses must be JSON serializable objects.")),id:e,jsonrpc:"2.0"})}r.BaseSnapExecutor=class{constructor(e,t){b(this,T),b(this,S),b(this,_),y(this,"snapData",void 0),y(this,"commandStream",void 0),y(this,"rpcStream",void 0),y(this,"methods",void 0),y(this,"snapErrorHandler",void 0),y(this,"snapPromiseErrorHandler",void 0),y(this,"lastTeardown",0),this.snapData=new Map,this.commandStream=e,this.commandStream.on("data",(e=>{this.onCommandRequest(e).catch((e=>{(0,a.logError)(e)}))})),this.rpcStream=t,this.methods=(0,d.getCommandMethodImplementations)(this.startSnap.bind(this),(async(e,t,r)=>{const n=this.snapData.get(e),s=null==n?void 0:n.exports[t],{required:o}=a.SNAP_EXPORTS[t];if((0,c.assert)(!o||s!==undefined,`No ${t} handler exported for snap "${e}`,i.rpcErrors.methodNotSupported),!s)return null;let u=await this.executeInSnapContext(e,(()=>s(r)));u===undefined&&(u=null);try{return(0,c.getSafeJson)(u)}catch(e){throw i.rpcErrors.internal(`Received non-JSON-serializable value: ${e.message.replace(/^Assertion failed: /u,"")}`)}}),this.onTerminate.bind(this))}errorHandler(e,t){const r=(0,i.serializeError)(e,{fallbackError:E,shouldIncludeStack:!1}),n=(0,o.getErrorData)(r);w(this,S,O).call(this,{method:"UnhandledError",params:{error:{...r,data:{...n,...t}}}}).catch((e=>{(0,a.logError)(e)}))}async onCommandRequest(e){if(!(0,c.isJsonRpcRequest)(e))return void((0,c.hasProperty)(e,"id")&&(0,u.is)(e.id,c.JsonRpcIdStruct)?await w(this,_,x).call(this,{error:(0,i.serializeError)(i.rpcErrors.internal("JSON-RPC requests must be JSON serializable objects.")),id:e.id,jsonrpc:"2.0"}):(0,a.logInfo)("Command stream received a non-JSON-RPC request, and was unable to respond."));const{id:t,method:r,params:n}=e;if(!(0,c.hasProperty)(k,r))return void await w(this,T,R).call(this,t,{error:i.rpcErrors.methodNotFound({data:{method:r}}).serialize()});const s=k[r],o=(0,f.sortParamKeys)(s.params,n),[l]=(0,u.validate)(o,s.struct);if(l)await w(this,T,R).call(this,t,{error:i.rpcErrors.invalidParams({message:`Invalid parameters for method "${r}": ${l.message}.`,data:{method:r,params:o}}).serialize()});else try{const e=await this.methods[r](...o);await w(this,T,R).call(this,t,{result:e})}catch(e){await w(this,T,R).call(this,t,{error:(0,i.serializeError)(e,{fallbackError:v})})}}async startSnap(e,t,r){(0,l.log)(`Starting snap '${e}' in worker.`),this.snapPromiseErrorHandler&&(0,h.removeEventListener)("unhandledrejection",this.snapPromiseErrorHandler),this.snapErrorHandler&&(0,h.removeEventListener)("error",this.snapErrorHandler),this.snapErrorHandler=t=>{this.errorHandler(t.error,{snapId:e})},this.snapPromiseErrorHandler=t=>{this.errorHandler(t instanceof Error?t:t.reason,{snapId:e})};const o=new s.StreamProvider(this.rpcStream,{jsonRpcStreamName:"metamask-provider",rpcMiddleware:[(0,n.createIdRemapMiddleware)()]});await o.initialize();const c=this.createSnapGlobal(o),u=this.createEIP1193Provider(o),d={exports:{}};try{const{endowments:n,teardown:s}=(0,p.createEndowments)({snap:c,ethereum:u,snapId:e,endowments:r,notify:w(this,S,O).bind(this)});this.snapData.set(e,{idleTeardown:s,runningEvaluations:new Set,exports:{}}),(0,h.addEventListener)("unhandledRejection",this.snapPromiseErrorHandler),(0,h.addEventListener)("error",this.snapErrorHandler);const i=new Compartment({...n,module:d,exports:d.exports});i.globalThis.self=i.globalThis,i.globalThis.global=i.globalThis,i.globalThis.window=i.globalThis,await this.executeInSnapContext(e,(()=>{i.evaluate(t),this.registerSnapExports(e,d)}))}catch(t){this.removeSnap(e);const[r]=(0,a.unwrapError)(t);throw i.rpcErrors.internal({message:`Error while running snap '${e}': ${r.message}`,data:{cause:r.serialize()}})}}onTerminate(){this.snapData.forEach((e=>e.runningEvaluations.forEach((e=>e.stop())))),this.snapData.clear()}registerSnapExports(e,t){const r=this.snapData.get(e);r&&(r.exports=a.SNAP_EXPORT_NAMES.reduce(((e,r)=>{const n=t.exports[r],{validator:s}=a.SNAP_EXPORTS[r];return s(n)?{...e,[r]:n}:e}),{}))}createSnapGlobal(e){const t=e.request.bind(e),r=async e=>{const r=(0,m.sanitizeRequestArguments)(e);return(0,m.assertSnapOutboundRequest)(r),await(0,m.withTeardown)((async()=>{await w(this,S,O).call(this,{method:"OutboundRequest",params:{source:"snap.request"}});try{return await t(r)}finally{await w(this,S,O).call(this,{method:"OutboundResponse",params:{source:"snap.request"}})}})(),this)},n=new Proxy({},{has:(e,t)=>"string"==typeof t&&["request"].includes(t),get:(e,t)=>"request"===t?r:undefined});return harden(n)}createEIP1193Provider(e){const t=e.request.bind(e),r=(0,m.proxyStreamProvider)(e,(async e=>{const r=(0,m.sanitizeRequestArguments)(e);return(0,m.assertEthereumOutboundRequest)(r),await(0,m.withTeardown)((async()=>{await w(this,S,O).call(this,{method:"OutboundRequest",params:{source:"ethereum.request"}});try{return await t(r)}finally{await w(this,S,O).call(this,{method:"OutboundResponse",params:{source:"ethereum.request"}})}})(),this)}));return harden(r)}removeSnap(e){this.snapData.delete(e)}async executeInSnapContext(e,t){const r=this.snapData.get(e);if(r===undefined)throw i.rpcErrors.internal(`Tried to execute in context of unknown snap: "${e}".`);let n;const s=new Promise(((t,r)=>n=()=>r(i.rpcErrors.internal(`The snap "${e}" has been terminated during execution.`)))),o={stop:n};try{return r.runningEvaluations.add(o),await Promise.race([t(),s])}catch(e){throw new a.WrappedSnapError(e)}finally{r.runningEvaluations.delete(o),0===r.runningEvaluations.size&&(this.lastTeardown+=1,await r.idleTeardown())}}}}}},{package:"$root$",file:"src/common/BaseSnapExecutor.ts"}],[162,{"./../../../snaps-utils/src/index.executionenv":250,"./validation":179,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getCommandMethodImplementations=function(e,t,r){return{ping:async()=>Promise.resolve("OK"),terminate:async()=>(r(),Promise.resolve("OK")),executeSnap:async(t,r,n)=>(await e(t,r,n),"OK"),snapRpc:async(e,r,n,s)=>await t(e,r,o(n,r,s))??null}},r.getHandlerArguments=o;var n=e("./../../../snaps-utils/src/index.executionenv"),s=e("@metamask/utils"),i=e("./validation");function o(e,t,r){switch(t){case n.HandlerType.OnTransaction:{(0,i.assertIsOnTransactionRequestArguments)(r.params);const{transaction:e,chainId:t,transactionOrigin:n}=r.params;return{transaction:e,chainId:t,transactionOrigin:n}}case n.HandlerType.OnSignature:{(0,i.assertIsOnSignatureRequestArguments)(r.params);const{signature:e,signatureOrigin:t}=r.params;return{signature:e,signatureOrigin:t}}case n.HandlerType.OnNameLookup:{(0,i.assertIsOnNameLookupRequestArguments)(r.params);const{chainId:e,domain:t,address:n}=r.params;return t?{chainId:e,domain:t}:{chainId:e,address:n}}case n.HandlerType.OnRpcRequest:case n.HandlerType.OnKeyringRequest:return{origin:e,request:r};case n.HandlerType.OnCronjob:case n.HandlerType.OnInstall:case n.HandlerType.OnUpdate:return{request:r};case n.HandlerType.OnHomePage:return{};case n.HandlerType.OnUserInput:{(0,i.assertIsOnUserInputRequestArguments)(r.params);const{id:e,event:t}=r.params;return{id:e,event:t}}default:return(0,s.assertExhaustive)(t)}}}}},{package:"$root$",file:"src/common/commands.ts"}],[163,{"../globalObject":175,"./console":164,"./crypto":165,"./date":166,"./interval":168,"./math":169,"./network":170,"./textDecoder":171,"./textEncoder":172,"./timeout":173},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject"),s=h(e("./console")),i=h(e("./crypto")),o=h(e("./date")),a=h(e("./interval")),c=h(e("./math")),u=h(e("./network")),l=h(e("./textDecoder")),d=h(e("./textEncoder")),p=h(e("./timeout"));function h(e){return e&&e.__esModule?e:{default:e}}const f=[{endowment:AbortController,name:"AbortController"},{endowment:AbortSignal,name:"AbortSignal"},{endowment:ArrayBuffer,name:"ArrayBuffer"},{endowment:atob,name:"atob",bind:!0},{endowment:BigInt,name:"BigInt"},{endowment:BigInt64Array,name:"BigInt64Array"},{endowment:BigUint64Array,name:"BigUint64Array"},{endowment:btoa,name:"btoa",bind:!0},{endowment:DataView,name:"DataView"},{endowment:Float32Array,name:"Float32Array"},{endowment:Float64Array,name:"Float64Array"},{endowment:Int8Array,name:"Int8Array"},{endowment:Int16Array,name:"Int16Array"},{endowment:Int32Array,name:"Int32Array"},{endowment:Uint8Array,name:"Uint8Array"},{endowment:Uint8ClampedArray,name:"Uint8ClampedArray"},{endowment:Uint16Array,name:"Uint16Array"},{endowment:Uint32Array,name:"Uint32Array"},{endowment:URL,name:"URL"},{endowment:WebAssembly,name:"WebAssembly"}];r.default=()=>{const e=[i.default,a.default,c.default,u.default,p.default,l.default,d.default,o.default,s.default];return f.forEach((t=>{const r={names:[t.name],factory:()=>{const e="function"==typeof t.endowment&&t.bind?t.endowment.bind(n.rootRealmGlobal):t.endowment;return{[t.name]:harden(e)}}};e.push(r)})),e}}}},{package:"$root$",file:"src/common/endowments/commonEndowmentFactory.ts"}],[164,{"../globalObject":175,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.consoleMethods=r.consoleAttenuatedMethods=void 0;var n=e("@metamask/utils"),s=e("../globalObject");const i=r.consoleAttenuatedMethods=new Set(["log","assert","error","debug","info","warn"]),o=r.consoleMethods=new Set(["debug","error","info","log","warn","dir","dirxml","table","trace","group","groupCollapsed","groupEnd","clear","count","countReset","assert","profile","profileEnd","time","timeLog","timeEnd","timeStamp","context"]),a=["log","error","debug","info","warn"];function c(e,t,...r){const n=`[Snap: ${e}]`;return"string"==typeof t?[`${n} ${t}`,...r]:[n,t,...r]}const u={names:["console"],factory:function({snapId:e}={}){(0,n.assert)(e!==undefined);const t=Object.getOwnPropertyNames(s.rootRealmGlobal.console).reduce(((e,t)=>o.has(t)&&!i.has(t)?{...e,[t]:s.rootRealmGlobal.console[t]}:e),{});return harden({console:{...t,assert:(t,r,...n)=>{s.rootRealmGlobal.console.assert(t,...c(e,r,...n))},...a.reduce(((t,r)=>({...t,[r]:(t,...n)=>{s.rootRealmGlobal.console[r](...c(e,t,...n))}})),{})}})}};r.default=u}}},{package:"$root$",file:"src/common/endowments/console.ts"}],[165,{"../globalObject":175,crypto:"crypto"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.createCrypto=void 0;var n=e("../globalObject");const s=()=>{if("crypto"in n.rootRealmGlobal&&"object"==typeof n.rootRealmGlobal.crypto&&"SubtleCrypto"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.SubtleCrypto)return{crypto:harden(n.rootRealmGlobal.crypto),SubtleCrypto:harden(n.rootRealmGlobal.SubtleCrypto)};const t=e("crypto").webcrypto;return{crypto:harden(t),SubtleCrypto:harden(t.subtle.constructor)}};r.createCrypto=s;const i={names:["crypto","SubtleCrypto"],factory:s};r.default=i}}},{package:"$root$",file:"src/common/endowments/crypto.ts"}],[166,{"../globalObject":175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject");const s={names:["Date"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Date);let t=0;const r=()=>{const e=n.rootRealmGlobal.Date.now(),r=Math.round(e+Math.random());return r>t&&(t=r),t},s=function(...e){return Reflect.construct(n.rootRealmGlobal.Date,0===e.length?[r()]:e,new.target)};return e.forEach((e=>{Reflect.defineProperty(s,e,{configurable:!1,writable:!1,value:"now"===e?r:n.rootRealmGlobal.Date[e]})})),{Date:harden(s)}}};r.default=s}}},{package:"$root$",file:"src/common/endowments/date.ts"}],[167,{"../globalObject":175,"./../../../../snaps-utils/src/index.executionenv":250,"./commonEndowmentFactory":163,"@metamask/rpc-errors":31,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createEndowments=function({snap:e,ethereum:t,snapId:r,endowments:n,notify:u}){const l={},d=n.reduce((({allEndowments:e,teardowns:n},d)=>{if(c.has(d)){if(!(0,o.hasProperty)(l,d)){const{teardownFunction:e,...t}=c.get(d)({snapId:r,notify:u});Object.assign(l,t),e&&n.push(e)}e[d]=l[d]}else if("ethereum"===d)e[d]=t;else{if(!(d in a.rootRealmGlobal))throw s.rpcErrors.internal(`Unknown endowment: "${d}".`);{(0,i.logWarning)(`Access to unhardened global ${d}.`);const t=a.rootRealmGlobal[d];e[d]=t}}return{allEndowments:e,teardowns:n}}),{allEndowments:{snap:e},teardowns:[]});return{endowments:d.allEndowments,teardown:async()=>{await Promise.all(d.teardowns.map((e=>e())))}}};var n,s=e("@metamask/rpc-errors"),i=e("./../../../../snaps-utils/src/index.executionenv"),o=e("@metamask/utils"),a=e("../globalObject");const c=(0,((n=e("./commonEndowmentFactory"))&&n.__esModule?n:{default:n}).default)().reduce(((e,t)=>(t.names.forEach((r=>{e.set(r,t.factory)})),e)),new Map)}}},{package:"$root$",file:"src/common/endowments/index.ts"}],[168,{"@metamask/rpc-errors":31},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("@metamask/rpc-errors");const s={names:["setInterval","clearInterval"],factory:()=>{const e=new Map,t=t=>{harden(t);const r=e.get(t);r!==undefined&&(clearInterval(r),e.delete(t))};return{setInterval:harden(((t,r)=>{if("function"!=typeof t)throw n.rpcErrors.invalidInput(`The interval handler must be a function. Received: ${typeof t}.`);harden(t);const s=Object.freeze(Object.create(null)),i=setInterval(t,Math.max(10,r??0));return e.set(s,i),s})),clearInterval:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=s}}},{package:"$root$",file:"src/common/endowments/interval.ts"}],[169,{"../globalObject":175,"./crypto":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject"),s=e("./crypto");const i={names:["Math"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Math).reduce(((e,t)=>"random"===t?e:{...e,[t]:n.rootRealmGlobal.Math[t]}),{}),{crypto:t}=(0,s.createCrypto)();return harden({Math:{...e,random:()=>t.getRandomValues(new Uint32Array(1))[0]/2**32}})}};r.default=i}}},{package:"$root$",file:"src/common/endowments/math.ts"}],[170,{"../utils":178,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("@metamask/utils"),s=e("../utils");function i(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function o(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,c(e,t,"get"))}function a(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,c(e,t,"set"),r),r}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var u=new WeakMap,l=new WeakMap,d=new WeakMap,p=new WeakMap;class h{constructor(e,t,r,n){i(this,u,{writable:!0,value:void 0}),i(this,l,{writable:!0,value:void 0}),i(this,d,{writable:!0,value:void 0}),i(this,p,{writable:!0,value:void 0}),a(this,l,e),a(this,u,t),a(this,d,r),a(this,p,n)}get body(){return o(this,l).body}get bodyUsed(){return o(this,l).bodyUsed}get headers(){return o(this,l).headers}get ok(){return o(this,l).ok}get redirected(){return o(this,l).redirected}get status(){return o(this,l).status}get statusText(){return o(this,l).statusText}get type(){return o(this,l).type}get url(){return o(this,l).url}async text(){return await(0,s.withTeardown)((async()=>{await o(this,d).call(this);try{return await o(this,l).text()}finally{await o(this,p).call(this)}})(),o(this,u))}async arrayBuffer(){return await(0,s.withTeardown)((async()=>{await o(this,d).call(this);try{return await o(this,l).arrayBuffer()}finally{await o(this,p).call(this)}})(),o(this,u))}async blob(){return await(0,s.withTeardown)((async()=>{await o(this,d).call(this);try{return await o(this,l).blob()}finally{await o(this,p).call(this)}})(),o(this,u))}clone(){const e=o(this,l).clone();return new h(e,o(this,u),o(this,d),o(this,p))}async formData(){return await(0,s.withTeardown)((async()=>{await o(this,d).call(this);try{return await o(this,l).formData()}finally{await o(this,p).call(this)}})(),o(this,u))}async json(){return await(0,s.withTeardown)((async()=>{await o(this,d).call(this);try{return await o(this,l).json()}finally{await o(this,p).call(this)}})(),o(this,u))}}const f={names:["fetch","Request","Headers","Response"],factory:({notify:e}={})=>{(0,n.assert)(e,"Notify must be passed to network endowment factory");const t=new Set,r={lastTeardown:0},i=new FinalizationRegistry((e=>e()));return{fetch:harden((async(n,o)=>{const a=new AbortController;if(null!==(null==o?void 0:o.signal)&&(null==o?void 0:o.signal)!==undefined){const e=o.signal;e.addEventListener("abort",(()=>{a.abort(e.reason)}),{once:!0})}let c=!1;const u=async()=>{c||(c=!0,await e({method:"OutboundRequest",params:{source:"fetch"}}))};let l=!1;const d=async()=>{l||(l=!0,await e({method:"OutboundResponse",params:{source:"fetch"}}))};let p,f;return await(0,s.withTeardown)((async()=>{try{await e({method:"OutboundRequest",params:{source:"fetch"}});const s=fetch(n,{...o,signal:a.signal});f={cancel:async()=>{a.abort();try{await s}catch{}}},t.add(f),p=new h(await s,r,u,d)}finally{f!==undefined&&t.delete(f),await e({method:"OutboundResponse",params:{source:"fetch"}})}if(null!==p.body){const e=new WeakRef(p.body),r={cancel:async()=>{try{var t;await(null===(t=e.deref())||void 0===t?void 0:t.cancel())}catch{}}};t.add(r),i.register(p.body,(()=>t.delete(r)))}return harden(p)})(),r)})),Request:harden(Request),Headers:harden(Headers),Response:harden(Response),teardownFunction:async()=>{r.lastTeardown+=1;const e=[];t.forEach((({cancel:t})=>e.push(t()))),t.clear(),await Promise.all(e)}}}};r.default=f}}},{package:"$root$",file:"src/common/endowments/network.ts"}],[171,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;const n={names:["TextDecoder"],factory:()=>({TextDecoder:harden(TextDecoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textDecoder.ts"}],[172,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;const n={names:["TextEncoder"],factory:()=>({TextEncoder:harden(TextEncoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textEncoder.ts"}],[173,{"@metamask/rpc-errors":31},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("@metamask/rpc-errors");const s={names:["setTimeout","clearTimeout"],factory:()=>{const e=new Map,t=t=>{const r=e.get(t);r!==undefined&&(clearTimeout(r),e.delete(t))};return{setTimeout:harden(((t,r)=>{if("function"!=typeof t)throw n.rpcErrors.internal(`The timeout handler must be a function. Received: ${typeof t}.`);harden(t);const s=Object.freeze(Object.create(null)),i=setTimeout((()=>{e.delete(s),t()}),Math.max(10,r??0));return e.set(s,i),s})),clearTimeout:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=s}}},{package:"$root$",file:"src/common/endowments/timeout.ts"}],[174,{"./globalObject":175,"@metamask/rpc-errors":31},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.addEventListener=function(e,t){if("addEventListener"in s.rootRealmGlobal&&"function"==typeof s.rootRealmGlobal.addEventListener)return s.rootRealmGlobal.addEventListener(e.toLowerCase(),t);if(s.rootRealmGlobal.process&&"on"in s.rootRealmGlobal.process&&"function"==typeof s.rootRealmGlobal.process.on)return s.rootRealmGlobal.process.on(e,t);throw n.rpcErrors.internal("Platform agnostic addEventListener failed.")},r.removeEventListener=function(e,t){if("removeEventListener"in s.rootRealmGlobal&&"function"==typeof s.rootRealmGlobal.removeEventListener)return s.rootRealmGlobal.removeEventListener(e.toLowerCase(),t);if(s.rootRealmGlobal.process&&"removeListener"in s.rootRealmGlobal.process&&"function"==typeof s.rootRealmGlobal.process.removeListener)return s.rootRealmGlobal.process.removeListener(e,t);throw new Error("Platform agnostic removeEventListener failed")};var n=e("@metamask/rpc-errors"),s=e("./globalObject")}}},{package:"$root$",file:"src/common/globalEvents.ts"}],[175,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rootRealmGlobalName=r.rootRealmGlobal=void 0;var n=function(e){return e.globalThis="globalThis",e.global="global",e.self="self",e.window="window",e}(n||{});let s,i;if("undefined"!=typeof globalThis)s=globalThis,i=n.globalThis;else if("undefined"!=typeof self)s=self,i=n.self;else if("undefined"!=typeof window)s=window,i=n.window;else{if("undefined"==typeof global)throw new Error("Unknown realm type; failed to identify global object.");s=global,i=n.global}r.rootRealmGlobal=s,r.rootRealmGlobalName=i}}},{package:"$root$",file:"src/common/globalObject.ts"}],[176,{"./../../../../snaps-utils/src/index.executionenv":250},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.executeLockdownMore=function(){try{const e=Reflect.ownKeys((new Compartment).globalThis),t=new Set(["eval","Function"]);new Set([...e]).forEach((e=>{const r=Reflect.getOwnPropertyDescriptor(globalThis,e);r&&(r.configurable&&(!function(e){return"set"in e||"get"in e}(r)?Object.defineProperty(globalThis,e,{configurable:!1,writable:!1}):Object.defineProperty(globalThis,e,{configurable:!1})),t.has(e)&&harden(globalThis[e]))}))}catch(e){throw(0,n.logError)("Protecting intrinsics failed:",e),e}};var n=e("./../../../../snaps-utils/src/index.executionenv")}}},{package:"$root$",file:"src/common/lockdown/lockdown-more.ts"}],[177,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.sortParamKeys=void 0;r.sortParamKeys=(e,t)=>{if(!t)return[];if(t instanceof Array)return t;const r=e.reduce(((e,t,r)=>({...e,[t]:r})),{});return Object.entries(t).sort((([e,t],[n,s])=>r[e]-r[n])).map((([e,t])=>t))}}}},{package:"$root$",file:"src/common/sortParams.ts"}],[178,{"../logging":180,"@metamask/rpc-errors":31,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BLOCKED_RPC_METHODS=void 0,r.assertEthereumOutboundRequest=function(e){(0,s.assert)(!String.prototype.startsWith.call(e.method,"snap_"),n.rpcErrors.methodNotFound({data:{method:e.method}})),(0,s.assert)(!o.includes(e.method),n.rpcErrors.methodNotFound({data:{method:e.method}})),(0,s.assertStruct)(e,s.JsonStruct,"Provided value is not JSON-RPC compatible",n.rpcErrors.invalidParams)},r.assertSnapOutboundRequest=function(e){(0,s.assert)(String.prototype.startsWith.call(e.method,"wallet_")||String.prototype.startsWith.call(e.method,"snap_"),"The global Snap API only allows RPC methods starting with `wallet_*` and `snap_*`.",n.rpcErrors.methodNotSupported),(0,s.assert)(!o.includes(e.method),n.rpcErrors.methodNotFound({data:{method:e.method}})),(0,s.assertStruct)(e,s.JsonStruct,"Provided value is not JSON-RPC compatible",n.rpcErrors.invalidParams)},r.proxyStreamProvider=function(e,t){return new Proxy({},{has:(e,t)=>"string"==typeof t&&["request","on","removeListener"].includes(t),get:(r,n)=>"request"===n?t:["on","removeListener"].includes(n)?e[n]:undefined})},r.sanitizeRequestArguments=function(e){const t=JSON.parse(JSON.stringify(e));return(0,s.getSafeJson)(t)},r.withTeardown=async function(e,t){const r=t.lastTeardown;return new Promise(((n,s)=>{e.then((e=>{t.lastTeardown===r?n(e):(0,i.log)("Late promise received after Snap finished execution. Promise will be dropped.")})).catch((e=>{t.lastTeardown===r?s(e):(0,i.log)("Late promise received after Snap finished execution. Promise will be dropped.")}))}))};var n=e("@metamask/rpc-errors"),s=e("@metamask/utils"),i=e("../logging");const o=r.BLOCKED_RPC_METHODS=Object.freeze(["wallet_requestSnaps","wallet_requestPermissions","wallet_revokePermissions","eth_sendRawTransaction","eth_sendTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_registerOnboarding","wallet_scanQRCode"])}}},{package:"$root$",file:"src/common/utils.ts"}],[179,{"./../../../snaps-sdk/src":186,"./../../../snaps-utils/src/index.executionenv":250,"@metamask/rpc-errors":31,"@metamask/utils":55,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.TerminateRequestArgumentsStruct=r.SnapRpcRequestArgumentsStruct=r.PingRequestArgumentsStruct=r.OnUserInputArgumentsStruct=r.OnTransactionRequestArgumentsStruct=r.OnSignatureRequestArgumentsStruct=r.OnNameLookupRequestArgumentsStruct=r.JsonRpcRequestWithoutIdStruct=r.ExecuteSnapRequestArgumentsStruct=r.EndowmentStruct=void 0,r.assertIsOnNameLookupRequestArguments=function(e){(0,o.assertStruct)(e,b,"Invalid request params",n.rpcErrors.invalidParams)},r.assertIsOnSignatureRequestArguments=function(e){(0,o.assertStruct)(e,h,"Invalid request params",n.rpcErrors.invalidParams)},r.assertIsOnTransactionRequestArguments=function(e){(0,o.assertStruct)(e,p,"Invalid request params",n.rpcErrors.invalidParams)},r.assertIsOnUserInputRequestArguments=function(e){(0,o.assertStruct)(e,y,"Invalid request params",n.rpcErrors.invalidParams)},r.isEndowment=l,r.isEndowmentsArray=function(e){return Array.isArray(e)&&e.every(l)};var n=e("@metamask/rpc-errors"),s=e("./../../../snaps-sdk/src"),i=e("./../../../snaps-utils/src/index.executionenv"),o=e("@metamask/utils"),a=e("superstruct");const c=r.JsonRpcRequestWithoutIdStruct=(0,a.object)({jsonrpc:(0,a.optional)(o.JsonRpcVersionStruct),id:(0,a.optional)(o.JsonRpcIdStruct),method:(0,a.string)(),params:(0,a.optional)(o.JsonRpcParamsStruct)}),u=r.EndowmentStruct=(0,a.string)();function l(e){return(0,a.is)(e,u)}const d=(0,a.literal)("OK"),p=(r.PingRequestArgumentsStruct=(0,a.optional)((0,a.union)([(0,a.literal)(undefined),(0,a.array)()])),r.TerminateRequestArgumentsStruct=(0,a.union)([(0,a.literal)(undefined),(0,a.array)()]),r.ExecuteSnapRequestArgumentsStruct=(0,a.tuple)([(0,a.string)(),(0,a.string)(),(0,a.array)(u)]),r.SnapRpcRequestArgumentsStruct=(0,a.tuple)([(0,a.string)(),(0,a.enums)(Object.values(i.HandlerType)),(0,a.string)(),(0,a.assign)(c,(0,a.object)({params:(0,a.optional)((0,a.record)((0,a.string)(),o.JsonStruct))}))]),r.OnTransactionRequestArgumentsStruct=(0,a.object)({transaction:(0,a.record)((0,a.string)(),o.JsonStruct),chainId:i.ChainIdStruct,transactionOrigin:(0,a.nullable)((0,a.string)())}));const h=r.OnSignatureRequestArgumentsStruct=(0,a.object)({signature:(0,a.record)((0,a.string)(),o.JsonStruct),signatureOrigin:(0,a.nullable)((0,a.string)())});const f={chainId:i.ChainIdStruct},m=(0,a.object)({...f,address:(0,a.string)()}),g=(0,a.object)({...f,domain:(0,a.string)()}),b=r.OnNameLookupRequestArgumentsStruct=(0,a.union)([m,g]);const y=r.OnUserInputArgumentsStruct=(0,a.object)({id:(0,a.string)(),event:s.UserInputEventStruct});(0,a.object)({id:o.JsonRpcIdStruct,jsonrpc:o.JsonRpcVersionStruct,result:d}),o.JsonRpcSuccessStruct}}},{package:"$root$",file:"src/common/validation.ts"}],[180,{"./../../snaps-utils/src/index.executionenv":250,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.log=void 0;var n=e("./../../snaps-utils/src/index.executionenv"),s=e("@metamask/utils");r.log=(0,s.createModuleLogger)(n.snapsLogger,"snaps-execution-environments")}}},{package:"$root$",file:"src/logging.ts"}],[181,{"../common/BaseSnapExecutor":161,"../logging":180,"./../../../snaps-utils/src/index.executionenv":250,"@metamask/object-multiplex":10,"@metamask/post-message-stream":14,"readable-stream":106},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChildProcessSnapExecutor=void 0;var n,s=(n=e("@metamask/object-multiplex"))&&n.__esModule?n:{default:n},i=e("@metamask/post-message-stream"),o=e("./../../../snaps-utils/src/index.executionenv"),a=e("readable-stream"),c=e("../common/BaseSnapExecutor"),u=e("../logging");class l extends c.BaseSnapExecutor{static initialize(){(0,u.log)("Worker: Connecting to parent.");const e=new i.ProcessMessageStream,t=new s.default;(0,a.pipeline)(e,t,e,(e=>{e&&(0,o.logError)("Parent stream failure, closing worker.",e),self.close()}));const r=t.createStream(o.SNAP_STREAM_NAMES.COMMAND),n=t.createStream(o.SNAP_STREAM_NAMES.JSON_RPC);return new l(r,n)}}r.ChildProcessSnapExecutor=l}}},{package:"$root$",file:"src/node-process/ChildProcessSnapExecutor.ts"}],[182,{"../common/lockdown/lockdown-more":176,"./ChildProcessSnapExecutor":181},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../common/lockdown/lockdown-more"),s=e("./ChildProcessSnapExecutor");(0,n.executeLockdownMore)(),s.ChildProcessSnapExecutor.initialize()}}},{package:"$root$",file:"src/node-process/index.ts"}],[183,{"./internals":190,"@metamask/rpc-errors":31},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.UserRejectedRequestError=r.UnsupportedMethodError=r.UnauthorizedError=r.TransactionRejected=r.ResourceUnavailableError=r.ResourceNotFoundError=r.ParseError=r.MethodNotSupportedError=r.MethodNotFoundError=r.LimitExceededError=r.InvalidRequestError=r.InvalidParamsError=r.InvalidInputError=r.InternalError=r.DisconnectedError=r.ChainDisconnectedError=void 0;var n=e("@metamask/rpc-errors"),s=e("./internals");r.InternalError=(0,s.createSnapError)(n.rpcErrors.internal),r.InvalidInputError=(0,s.createSnapError)(n.rpcErrors.invalidInput),r.InvalidParamsError=(0,s.createSnapError)(n.rpcErrors.invalidParams),r.InvalidRequestError=(0,s.createSnapError)(n.rpcErrors.invalidRequest),r.LimitExceededError=(0,s.createSnapError)(n.rpcErrors.limitExceeded),r.MethodNotFoundError=(0,s.createSnapError)(n.rpcErrors.methodNotFound),r.MethodNotSupportedError=(0,s.createSnapError)(n.rpcErrors.methodNotSupported),r.ParseError=(0,s.createSnapError)(n.rpcErrors.parse),r.ResourceNotFoundError=(0,s.createSnapError)(n.rpcErrors.resourceNotFound),r.ResourceUnavailableError=(0,s.createSnapError)(n.rpcErrors.resourceUnavailable),r.TransactionRejected=(0,s.createSnapError)(n.rpcErrors.transactionRejected),r.ChainDisconnectedError=(0,s.createSnapError)(n.providerErrors.chainDisconnected),r.DisconnectedError=(0,s.createSnapError)(n.providerErrors.disconnected),r.UnauthorizedError=(0,s.createSnapError)(n.providerErrors.unauthorized),r.UnsupportedMethodError=(0,s.createSnapError)(n.providerErrors.unsupportedMethod),r.UserRejectedRequestError=(0,s.createSnapError)(n.providerErrors.userRejectedRequest)}}},{package:"external:../snaps-sdk/src/error-wrappers.ts",file:"../snaps-sdk/src/error-wrappers.ts"}],[184,{"./internals":190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SnapError=void 0;var n=e("./internals");function s(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function i(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,a(e,t,"get"))}function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,a(e,t,"set"),r),r}function a(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var c=new WeakMap,u=new WeakMap,l=new WeakMap,d=new WeakMap;class p extends Error{constructor(e,t={}){const r=(0,n.getErrorMessage)(e);super(r),s(this,c,{writable:!0,value:void 0}),s(this,u,{writable:!0,value:void 0}),s(this,l,{writable:!0,value:void 0}),s(this,d,{writable:!0,value:void 0}),o(this,u,r),o(this,c,(0,n.getErrorCode)(e)),o(this,l,{...(0,n.getErrorData)(e),...t}),o(this,d,super.stack)}get name(){return"SnapError"}get code(){return i(this,c)}get message(){return i(this,u)}get data(){return i(this,l)}get stack(){return i(this,d)}toJSON(){return{code:n.SNAP_ERROR_CODE,message:n.SNAP_ERROR_MESSAGE,data:{cause:{code:this.code,message:this.message,stack:this.stack,data:this.data}}}}serialize(){return this.toJSON()}}r.SnapError=p}}},{package:"external:../snaps-sdk/src/errors.ts",file:"../snaps-sdk/src/errors.ts"}],[185,{"./ui":244,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getImageComponent=async function(e,{width:t,height:r=t,request:o}){(0,n.assert)("number"==typeof t&&t>0,"Expected width to be a number greater than 0."),(0,n.assert)("number"==typeof r&&r>0,"Expected height to be a number greater than 0.");const a=await i(e,o),c=`width="${t}" height="${r}"`;return(0,s.image)(`<svg ${c.trim()} xmlns="http://www.w3.org/2000/svg"><image ${c.trim()} href="${a}" /></svg>`)},r.getImageData=i;var n=e("@metamask/utils"),s=e("./ui");async function i(e,t){const r=await async function(e,t){if("function"!=typeof fetch)throw new Error(`Failed to fetch image data from "${e}": Using this function requires the "endowment:network-access" permission.`);return fetch(e,t).then((async t=>{if(!t.ok)throw new Error(`Failed to fetch image data from "${e}": ${t.status} ${t.statusText}`);const r=await t.blob();return(0,n.assert)("image/jpeg"===r.type||"image/png"===r.type,"Expected image data to be a JPEG or PNG image."),r}))}(e,t),s=new Uint8Array(await r.arrayBuffer());return`data:${r.type};base64,${(0,n.bytesToBase64)(s)}`}}}},{package:"external:../snaps-sdk/src/images.ts",file:"../snaps-sdk/src/images.ts"}],[186,{"./error-wrappers":183,"./errors":184,"./images":185,"./internals":190,"./types":204,"./ui":244,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n={getErrorData:!0,getErrorMessage:!0,getErrorStack:!0,SNAP_ERROR_CODE:!0,SNAP_ERROR_MESSAGE:!0,literal:!0,union:!0,enumValue:!0,assert:!0};Object.defineProperty(r,"SNAP_ERROR_CODE",{enumerable:!0,get:function(){return s.SNAP_ERROR_CODE}}),Object.defineProperty(r,"SNAP_ERROR_MESSAGE",{enumerable:!0,get:function(){return s.SNAP_ERROR_MESSAGE}}),Object.defineProperty(r,"assert",{enumerable:!0,get:function(){return i.assert}}),Object.defineProperty(r,"enumValue",{enumerable:!0,get:function(){return s.enumValue}}),Object.defineProperty(r,"getErrorData",{enumerable:!0,get:function(){return s.getErrorData}}),Object.defineProperty(r,"getErrorMessage",{enumerable:!0,get:function(){return s.getErrorMessage}}),Object.defineProperty(r,"getErrorStack",{enumerable:!0,get:function(){return s.getErrorStack}}),Object.defineProperty(r,"literal",{enumerable:!0,get:function(){return s.literal}}),Object.defineProperty(r,"union",{enumerable:!0,get:function(){return s.union}});var s=e("./internals"),i=e("@metamask/utils"),o=e("./errors");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./error-wrappers");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./images");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=e("./types");Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===u[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}}))}));var l=e("./ui");Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===l[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return l[e]}}))}))}}},{package:"external:../snaps-sdk/src/index.ts",file:"../snaps-sdk/src/index.ts"}],[187,{"../errors":184},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createSnapError=function(e){return class extends n.SnapError{constructor(t,r){const n=e(t);super({code:n.code,message:n.message,data:r})}}};var n=e("../errors")}}},{package:"external:../snaps-sdk/src/internals/error-wrappers.ts",file:"../snaps-sdk/src/internals/error-wrappers.ts"}],[188,{"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SNAP_ERROR_MESSAGE=r.SNAP_ERROR_CODE=void 0,r.getErrorCode=function(e){if((0,n.isObject)(e)&&(0,n.hasProperty)(e,"code")&&"number"==typeof e.code&&Number.isInteger(e.code))return e.code;return-32603},r.getErrorData=function(e){if((0,n.isObject)(e)&&(0,n.hasProperty)(e,"data")&&"object"==typeof e.data&&null!==e.data&&(0,n.isValidJson)(e.data)&&!Array.isArray(e.data))return e.data;return{}},r.getErrorMessage=function(e){if((0,n.isObject)(e)&&(0,n.hasProperty)(e,"message")&&"string"==typeof e.message)return e.message;return String(e)},r.getErrorStack=function(e){if((0,n.isObject)(e)&&(0,n.hasProperty)(e,"stack")&&"string"==typeof e.stack)return e.stack;return undefined};var n=e("@metamask/utils");r.SNAP_ERROR_CODE=-31002,r.SNAP_ERROR_MESSAGE="Snap Error"}}},{package:"external:../snaps-sdk/src/internals/errors.ts",file:"../snaps-sdk/src/internals/errors.ts"}],[189,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/internals/helpers.ts",file:"../snaps-sdk/src/internals/helpers.ts"}],[190,{"./error-wrappers":187,"./errors":188,"./helpers":189,"./structs":191},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./error-wrappers");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./errors");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./helpers");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./structs");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}))}}},{package:"external:../snaps-sdk/src/internals/index.ts",file:"../snaps-sdk/src/internals/index.ts"}],[191,{superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.enumValue=function(e){return s(e)},r.literal=s,r.union=function([e,...t]){const r=(0,n.union)([e,...t]);return new n.Struct({...r,schema:[e,...t]})};var n=e("superstruct");function s(e){return(0,n.define)(JSON.stringify(e),(0,n.literal)(e).validator)}}}},{package:"external:../snaps-sdk/src/internals/structs.ts",file:"../snaps-sdk/src/internals/structs.ts"}],[192,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/caip.ts",file:"../snaps-sdk/src/types/caip.ts"}],[193,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/global.ts",file:"../snaps-sdk/src/types/global.ts"}],[194,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/cronjob.ts",file:"../snaps-sdk/src/types/handlers/cronjob.ts"}],[195,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/home-page.ts",file:"../snaps-sdk/src/types/handlers/home-page.ts"}],[196,{"./cronjob":194,"./home-page":195,"./keyring":197,"./lifecycle":198,"./name-lookup":199,"./rpc-request":200,"./signature":201,"./transaction":202,"./user-input":203},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./cronjob");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./home-page");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./keyring");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./lifecycle");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./name-lookup");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./rpc-request");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=e("./transaction");Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===u[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}}))}));var l=e("./signature");Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===l[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return l[e]}}))}));var d=e("./user-input");Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===d[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return d[e]}}))}))}}},{package:"external:../snaps-sdk/src/types/handlers/index.ts",file:"../snaps-sdk/src/types/handlers/index.ts"}],[197,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/keyring.ts",file:"../snaps-sdk/src/types/handlers/keyring.ts"}],[198,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/lifecycle.ts",file:"../snaps-sdk/src/types/handlers/lifecycle.ts"}],[199,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/name-lookup.ts",file:"../snaps-sdk/src/types/handlers/name-lookup.ts"}],[200,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/rpc-request.ts",file:"../snaps-sdk/src/types/handlers/rpc-request.ts"}],[201,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/handlers/signature.ts",file:"../snaps-sdk/src/types/handlers/signature.ts"}],[202,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SeverityLevel=void 0;r.SeverityLevel=function(e){return e.Critical="critical",e}({})}}},{package:"external:../snaps-sdk/src/types/handlers/transaction.ts",file:"../snaps-sdk/src/types/handlers/transaction.ts"}],[203,{superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.UserInputEventType=r.UserInputEventStruct=r.GenericEventStruct=r.FormSubmitEventStruct=r.ButtonClickEventStruct=void 0;var n=e("superstruct");let s=r.UserInputEventType=function(e){return e.ButtonClickEvent="ButtonClickEvent",e.FormSubmitEvent="FormSubmitEvent",e}({});const i=r.GenericEventStruct=(0,n.object)({type:(0,n.string)(),name:(0,n.optional)((0,n.string)())}),o=r.ButtonClickEventStruct=(0,n.assign)(i,(0,n.object)({type:(0,n.literal)(s.ButtonClickEvent)})),a=r.FormSubmitEventStruct=(0,n.assign)(i,(0,n.object)({type:(0,n.literal)(s.FormSubmitEvent),value:(0,n.record)((0,n.string)(),(0,n.string)()),name:(0,n.string)()}));r.UserInputEventStruct=(0,n.union)([o,a])}}},{package:"external:../snaps-sdk/src/types/handlers/user-input.ts",file:"../snaps-sdk/src/types/handlers/user-input.ts"}],[204,{"./caip":192,"./global":193,"./handlers":196,"./interface":205,"./methods":217,"./permissions":226,"./provider":227,"./snap":228},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),e("./global");var n=e("./caip");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./handlers");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./methods");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./permissions");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./provider");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./snap");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=e("./interface");Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===u[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}}))}))}}},{package:"external:../snaps-sdk/src/types/index.ts",file:"../snaps-sdk/src/types/index.ts"}],[205,{superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.InterfaceStateStruct=r.FormStateStruct=void 0;var n=e("superstruct");const s=r.FormStateStruct=(0,n.record)((0,n.string)(),(0,n.nullable)((0,n.string)()));r.InterfaceStateStruct=(0,n.record)((0,n.string)(),(0,n.union)([s,(0,n.nullable)((0,n.string)())]))}}},{package:"external:../snaps-sdk/src/types/interface.ts",file:"../snaps-sdk/src/types/interface.ts"}],[206,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/create-interface.ts",file:"../snaps-sdk/src/types/methods/create-interface.ts"}],[207,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.DialogType=void 0;r.DialogType=function(e){return e.Alert="alert",e.Confirmation="confirmation",e.Prompt="prompt",e}({})}}},{package:"external:../snaps-sdk/src/types/methods/dialog.ts",file:"../snaps-sdk/src/types/methods/dialog.ts"}],[208,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-bip32-entropy.ts",file:"../snaps-sdk/src/types/methods/get-bip32-entropy.ts"}],[209,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-bip32-public-key.ts",file:"../snaps-sdk/src/types/methods/get-bip32-public-key.ts"}],[210,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-bip44-entropy.ts",file:"../snaps-sdk/src/types/methods/get-bip44-entropy.ts"}],[211,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-client-status.ts",file:"../snaps-sdk/src/types/methods/get-client-status.ts"}],[212,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-entropy.ts",file:"../snaps-sdk/src/types/methods/get-entropy.ts"}],[213,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.AuxiliaryFileEncoding=void 0;r.AuxiliaryFileEncoding=function(e){return e.Base64="base64",e.Hex="hex",e.Utf8="utf8",e}({})}}},{package:"external:../snaps-sdk/src/types/methods/get-file.ts",file:"../snaps-sdk/src/types/methods/get-file.ts"}],[214,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-interface-state.ts",file:"../snaps-sdk/src/types/methods/get-interface-state.ts"}],[215,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-locale.ts",file:"../snaps-sdk/src/types/methods/get-locale.ts"}],[216,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/get-snaps.ts",file:"../snaps-sdk/src/types/methods/get-snaps.ts"}],[217,{"./create-interface":206,"./dialog":207,"./get-bip32-entropy":208,"./get-bip32-public-key":209,"./get-bip44-entropy":210,"./get-client-status":211,"./get-entropy":212,"./get-file":213,"./get-interface-state":214,"./get-locale":215,"./get-snaps":216,"./invoke-keyring":218,"./invoke-snap":219,"./manage-accounts":220,"./manage-state":221,"./methods":222,"./notify":223,"./request-snaps":224,"./update-interface":225},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./create-interface");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./dialog");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./get-bip32-entropy");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./get-bip32-public-key");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./get-bip44-entropy");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./get-client-status");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=e("./get-entropy");Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===u[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}}))}));var l=e("./get-file");Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===l[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return l[e]}}))}));var d=e("./get-interface-state");Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===d[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return d[e]}}))}));var p=e("./get-locale");Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===p[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return p[e]}}))}));var h=e("./get-snaps");Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===h[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return h[e]}}))}));var f=e("./invoke-keyring");Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===f[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return f[e]}}))}));var m=e("./invoke-snap");Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===m[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return m[e]}}))}));var g=e("./manage-accounts");Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===g[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return g[e]}}))}));var b=e("./manage-state");Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===b[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return b[e]}}))}));var y=e("./methods");Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===y[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return y[e]}}))}));var w=e("./notify");Object.keys(w).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===w[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return w[e]}}))}));var v=e("./request-snaps");Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===v[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return v[e]}}))}));var E=e("./update-interface");Object.keys(E).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===E[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return E[e]}}))}))}}},{package:"external:../snaps-sdk/src/types/methods/index.ts",file:"../snaps-sdk/src/types/methods/index.ts"}],[218,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/invoke-keyring.ts",file:"../snaps-sdk/src/types/methods/invoke-keyring.ts"}],[219,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/invoke-snap.ts",file:"../snaps-sdk/src/types/methods/invoke-snap.ts"}],[220,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/manage-accounts.ts",file:"../snaps-sdk/src/types/methods/manage-accounts.ts"}],[221,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ManageStateOperation=void 0;r.ManageStateOperation=function(e){return e.ClearState="clear",e.GetState="get",e.UpdateState="update",e}({})}}},{package:"external:../snaps-sdk/src/types/methods/manage-state.ts",file:"../snaps-sdk/src/types/methods/manage-state.ts"}],[222,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/methods.ts",file:"../snaps-sdk/src/types/methods/methods.ts"}],[223,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NotificationType=void 0;r.NotificationType=function(e){return e.InApp="inApp",e.Native="native",e}({})}}},{package:"external:../snaps-sdk/src/types/methods/notify.ts",file:"../snaps-sdk/src/types/methods/notify.ts"}],[224,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/request-snaps.ts",file:"../snaps-sdk/src/types/methods/request-snaps.ts"}],[225,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/methods/update-interface.ts",file:"../snaps-sdk/src/types/methods/update-interface.ts"}],[226,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/permissions.ts",file:"../snaps-sdk/src/types/permissions.ts"}],[227,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/provider.ts",file:"../snaps-sdk/src/types/provider.ts"}],[228,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-sdk/src/types/snap.ts",file:"../snaps-sdk/src/types/snap.ts"}],[229,{"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createBuilder=function(e,t,r=[]){return(...s)=>{if(1===s.length&&(0,n.isPlainObject)(s[0])){const r={...s[0],type:e};return(0,n.assertStruct)(r,t,`Invalid ${e} component`),r}const i=r.reduce(((e,t,r)=>s[r]!==undefined?{...e,[t]:s[r]}:e),{type:e});return(0,n.assertStruct)(i,t,`Invalid ${e} component`),i}};var n=e("@metamask/utils")}}},{package:"external:../snaps-sdk/src/ui/builder.ts",file:"../snaps-sdk/src/ui/builder.ts"}],[230,{"./components":238,"@metamask/utils":55,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertIsComponent=function(e){(0,n.assertStruct)(e,i.ComponentStruct,"Invalid component")},r.isComponent=function(e){return(0,s.is)(e,i.ComponentStruct)};var n=e("@metamask/utils"),s=e("superstruct"),i=e("./components")}}},{package:"external:../snaps-sdk/src/ui/component.ts",file:"../snaps-sdk/src/ui/component.ts"}],[231,{"../builder":229,"../nodes":245,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.address=r.AddressStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.AddressStruct=(0,n.assign)(i.LiteralStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Address),value:(0,n.pattern)((0,n.string)(),/0x[a-fA-F0-9]{40}/u)}));r.address=(0,s.createBuilder)(i.NodeType.Address,o,["value"])}}},{package:"external:../snaps-sdk/src/ui/components/address.ts",file:"../snaps-sdk/src/ui/components/address.ts"}],[232,{"../../internals":190,"../builder":229,"../nodes":245,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.button=r.ButtonVariant=r.ButtonType=r.ButtonStruct=void 0;var n=e("superstruct"),s=e("../../internals"),i=e("../builder"),o=e("../nodes");let a=r.ButtonVariant=function(e){return e.Primary="primary",e.Secondary="secondary",e}({}),c=r.ButtonType=function(e){return e.Button="button",e.Submit="submit",e}({});const u=r.ButtonStruct=(0,n.assign)(o.LiteralStruct,(0,n.object)({type:(0,n.literal)(o.NodeType.Button),value:(0,n.string)(),variant:(0,n.optional)((0,n.union)([(0,s.enumValue)(a.Primary),(0,s.enumValue)(a.Secondary)])),buttonType:(0,n.optional)((0,n.union)([(0,s.enumValue)(c.Button),(0,s.enumValue)(c.Submit)])),name:(0,n.optional)((0,n.string)())}));r.button=(0,i.createBuilder)(o.NodeType.Button,u,["value","buttonType","name","variant"])}}},{package:"external:../snaps-sdk/src/ui/components/button.ts",file:"../snaps-sdk/src/ui/components/button.ts"}],[233,{"../builder":229,"../nodes":245,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.copyable=r.CopyableStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.CopyableStruct=(0,n.assign)(i.LiteralStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Copyable),value:(0,n.string)(),sensitive:(0,n.optional)((0,n.boolean)())}));r.copyable=(0,s.createBuilder)(i.NodeType.Copyable,o,["value","sensitive"])}}},{package:"external:../snaps-sdk/src/ui/components/copyable.ts",file:"../snaps-sdk/src/ui/components/copyable.ts"}],[234,{"../builder":229,"../nodes":245,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.divider=r.DividerStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.DividerStruct=(0,n.assign)(i.NodeStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Divider)}));r.divider=(0,s.createBuilder)(i.NodeType.Divider,o)}}},{package:"external:../snaps-sdk/src/ui/components/divider.ts",file:"../snaps-sdk/src/ui/components/divider.ts"}],[235,{"../builder":229,"../nodes":245,"./button":232,"./input":239,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.form=r.FormStruct=r.FormComponentStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes"),o=e("./button"),a=e("./input");const c=r.FormComponentStruct=(0,n.union)([a.InputStruct,o.ButtonStruct]),u=r.FormStruct=(0,n.assign)(i.NodeStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Form),children:(0,n.array)(c),name:(0,n.string)()}));r.form=(0,s.createBuilder)(i.NodeType.Form,u,["name","children"])}}},{package:"external:../snaps-sdk/src/ui/components/form.ts",file:"../snaps-sdk/src/ui/components/form.ts"}],[236,{"../builder":229,"../nodes":245,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.heading=r.HeadingStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.HeadingStruct=(0,n.assign)(i.LiteralStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Heading),value:(0,n.string)()}));r.heading=(0,s.createBuilder)(i.NodeType.Heading,o,["value"])}}},{package:"external:../snaps-sdk/src/ui/components/heading.ts",file:"../snaps-sdk/src/ui/components/heading.ts"}],[237,{"../builder":229,"../nodes":245,"is-svg":84,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.image=r.ImageStruct=void 0,r.svg=c;var n,s=(n=e("is-svg"))&&n.__esModule?n:{default:n},i=e("superstruct"),o=e("../builder"),a=e("../nodes");function c(){return(0,i.refine)((0,i.string)(),"SVG",(e=>!!(0,s.default)(e)||"Value is not a valid SVG."))}const u=r.ImageStruct=(0,i.assign)(a.NodeStruct,(0,i.object)({type:(0,i.literal)(a.NodeType.Image),value:c()}));r.image=(0,o.createBuilder)(a.NodeType.Image,u,["value"])}}},{package:"external:../snaps-sdk/src/ui/components/image.ts",file:"../snaps-sdk/src/ui/components/image.ts"}],[238,{"./address":231,"./button":232,"./copyable":233,"./divider":234,"./form":235,"./heading":236,"./image":237,"./input":239,"./panel":240,"./row":241,"./spinner":242,"./text":243},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n={image:!0,ImageStruct:!0,ComponentStruct:!0,panel:!0,PanelStruct:!0};Object.defineProperty(r,"ComponentStruct",{enumerable:!0,get:function(){return u.ComponentStruct}}),Object.defineProperty(r,"ImageStruct",{enumerable:!0,get:function(){return c.ImageStruct}}),Object.defineProperty(r,"PanelStruct",{enumerable:!0,get:function(){return u.PanelStruct}}),Object.defineProperty(r,"image",{enumerable:!0,get:function(){return c.image}}),Object.defineProperty(r,"panel",{enumerable:!0,get:function(){return u.panel}});var s=e("./address");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./copyable");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./divider");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./heading");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./image"),u=e("./panel"),l=e("./spinner");Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===l[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return l[e]}}))}));var d=e("./text");Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===d[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return d[e]}}))}));var p=e("./row");Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===p[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return p[e]}}))}));var h=e("./button");Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===h[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return h[e]}}))}));var f=e("./input");Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===f[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return f[e]}}))}));var m=e("./form");Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===m[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return m[e]}}))}))}}},{package:"external:../snaps-sdk/src/ui/components/index.ts",file:"../snaps-sdk/src/ui/components/index.ts"}],[239,{"../../internals":190,"../builder":229,"../nodes":245,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.input=r.InputType=r.InputStruct=void 0;var n=e("superstruct"),s=e("../../internals"),i=e("../builder"),o=e("../nodes");let a=r.InputType=function(e){return e.Text="text",e.Number="number",e.Password="password",e}({});const c=r.InputStruct=(0,n.assign)(o.LiteralStruct,(0,n.object)({type:(0,n.literal)(o.NodeType.Input),value:(0,n.optional)((0,n.string)()),name:(0,n.string)(),inputType:(0,n.optional)((0,n.union)([(0,s.enumValue)(a.Text),(0,s.enumValue)(a.Password),(0,s.enumValue)(a.Number)])),placeholder:(0,n.optional)((0,n.string)()),label:(0,n.optional)((0,n.string)())}));r.input=(0,i.createBuilder)(o.NodeType.Input,c,["name","inputType","placeholder","value","label"])}}},{package:"external:../snaps-sdk/src/ui/components/input.ts",file:"../snaps-sdk/src/ui/components/input.ts"}],[240,{"../builder":229,"../nodes":245,"./address":231,"./button":232,"./copyable":233,"./divider":234,"./form":235,"./heading":236,"./image":237,"./input":239,"./row":241,"./spinner":242,"./text":243,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.panel=r.ParentStruct=r.PanelStruct=r.ComponentStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes"),o=e("./address"),a=e("./button"),c=e("./copyable"),u=e("./divider"),l=e("./form"),d=e("./heading"),p=e("./image"),h=e("./input"),f=e("./row"),m=e("./spinner"),g=e("./text");const b=r.ParentStruct=(0,n.assign)(i.NodeStruct,(0,n.object)({children:(0,n.array)((0,n.lazy)((()=>w)))})),y=r.PanelStruct=(0,n.assign)(b,(0,n.object)({type:(0,n.literal)(i.NodeType.Panel)})),w=(r.panel=(0,s.createBuilder)(i.NodeType.Panel,y,["children"]),r.ComponentStruct=(0,n.union)([c.CopyableStruct,u.DividerStruct,d.HeadingStruct,p.ImageStruct,y,m.SpinnerStruct,g.TextStruct,f.RowStruct,o.AddressStruct,h.InputStruct,l.FormStruct,a.ButtonStruct]))}}},{package:"external:../snaps-sdk/src/ui/components/panel.ts",file:"../snaps-sdk/src/ui/components/panel.ts"}],[241,{"../../internals":190,"../builder":229,"../nodes":245,"./address":231,"./image":237,"./text":243,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.row=r.RowVariant=r.RowStruct=void 0;var n=e("superstruct"),s=e("../../internals"),i=e("../builder"),o=e("../nodes"),a=e("./address"),c=e("./image"),u=e("./text");let l=r.RowVariant=function(e){return e.Default="default",e.Critical="critical",e.Warning="warning",e}({});const d=(0,n.union)([c.ImageStruct,u.TextStruct,a.AddressStruct]),p=r.RowStruct=(0,n.assign)(o.LiteralStruct,(0,n.object)({type:(0,n.literal)(o.NodeType.Row),variant:(0,n.optional)((0,n.union)([(0,s.enumValue)(l.Default),(0,s.enumValue)(l.Critical),(0,s.enumValue)(l.Warning)])),label:(0,n.string)(),value:d}));r.row=(0,i.createBuilder)(o.NodeType.Row,p,["label","value","variant"])}}},{package:"external:../snaps-sdk/src/ui/components/row.ts",file:"../snaps-sdk/src/ui/components/row.ts"}],[242,{"../builder":229,"../nodes":245,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.spinner=r.SpinnerStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.SpinnerStruct=(0,n.assign)(i.NodeStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Spinner)}));r.spinner=(0,s.createBuilder)(i.NodeType.Spinner,o)}}},{package:"external:../snaps-sdk/src/ui/components/spinner.ts",file:"../snaps-sdk/src/ui/components/spinner.ts"}],[243,{"../builder":229,"../nodes":245,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.text=r.TextStruct=void 0;var n=e("superstruct"),s=e("../builder"),i=e("../nodes");const o=r.TextStruct=(0,n.assign)(i.LiteralStruct,(0,n.object)({type:(0,n.literal)(i.NodeType.Text),value:(0,n.string)(),markdown:(0,n.optional)((0,n.boolean)())}));r.text=(0,s.createBuilder)(i.NodeType.Text,o,["value","markdown"])}}},{package:"external:../snaps-sdk/src/ui/components/text.ts",file:"../snaps-sdk/src/ui/components/text.ts"}],[244,{"./component":230,"./components":238,"./nodes":245},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n={NodeType:!0};Object.defineProperty(r,"NodeType",{enumerable:!0,get:function(){return o.NodeType}});var s=e("./components");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./component");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./nodes")}}},{package:"external:../snaps-sdk/src/ui/index.ts",file:"../snaps-sdk/src/ui/index.ts"}],[245,{superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NodeType=r.NodeStruct=r.LiteralStruct=void 0;var n=e("superstruct");r.NodeType=function(e){return e.Copyable="copyable",e.Divider="divider",e.Heading="heading",e.Panel="panel",e.Spinner="spinner",e.Text="text",e.Image="image",e.Row="row",e.Address="address",e.Button="button",e.Input="input",e.Form="form",e}({});const s=r.NodeStruct=(0,n.object)({type:(0,n.string)()});r.LiteralStruct=(0,n.assign)(s,(0,n.object)({value:(0,n.unknown)()}))}}},{package:"external:../snaps-sdk/src/ui/nodes.ts",file:"../snaps-sdk/src/ui/nodes.ts"}],[246,{"./../../snaps-sdk/src":186,"@metamask/rpc-errors":31,"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WrappedSnapError=r.SNAP_ERROR_WRAPPER_MESSAGE=r.SNAP_ERROR_WRAPPER_CODE=void 0,r.isSerializedSnapError=b,r.isSnapError=g,r.isWrappedSnapError=y,r.unwrapError=function(e){if(y(e)){if((0,i.isJsonRpcError)(e.data.cause)){if(b(e.data.cause)){const{code:t,message:r,stack:n,data:s}=e.data.cause.data.cause;return[w(t,r,n,s),!0]}const{code:t,message:r,stack:n,data:s}=e.data.cause;return[w(t,r,n,s),!1]}return[w(n.errorCodes.rpc.internal,(0,s.getErrorMessage)(e.data.cause),(0,s.getErrorStack)(e.data.cause)),!1]}if((0,i.isJsonRpcError)(e)){const{code:t,message:r,stack:n,data:s}=e;return[w(t,r,n,s),!1]}return[w(n.errorCodes.rpc.internal,(0,s.getErrorMessage)(e),(0,s.getErrorStack)(e)),!1]};var n=e("@metamask/rpc-errors"),s=e("./../../snaps-sdk/src"),i=e("@metamask/utils");function o(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function a(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,u(e,t,"get"))}function c(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,u(e,t,"set"),r),r}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}const l=r.SNAP_ERROR_WRAPPER_CODE=-31001,d=r.SNAP_ERROR_WRAPPER_MESSAGE="Wrapped Snap Error";var p=new WeakMap,h=new WeakMap,f=new WeakMap;class m extends Error{constructor(e){const t=(0,s.getErrorMessage)(e);super(t),o(this,p,{writable:!0,value:void 0}),o(this,h,{writable:!0,value:void 0}),o(this,f,{writable:!0,value:void 0}),c(this,p,e),c(this,h,t),c(this,f,(0,s.getErrorStack)(e))}get name(){return"WrappedSnapError"}get message(){return a(this,h)}get stack(){return a(this,f)}toJSON(){const e=g(a(this,p))?a(this,p).serialize():(0,n.serializeCause)(a(this,p));return{code:l,message:d,data:{cause:e}}}serialize(){return this.toJSON()}}function g(e){if((0,i.isObject)(e)&&"serialize"in e&&"function"==typeof e.serialize){const t=e.serialize();return(0,i.isJsonRpcError)(t)&&b(t)}return!1}function b(e){return e.code===s.SNAP_ERROR_CODE&&e.message===s.SNAP_ERROR_MESSAGE}function y(e){return(0,i.isJsonRpcError)(e)&&e.code===l&&e.message===d}function w(e,t,r,s){const i=new n.JsonRpcError(e,t,s);return i.stack=r,i}r.WrappedSnapError=m}}},{package:"external:../snaps-utils/src/errors.ts",file:"../snaps-utils/src/errors.ts"}],[247,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SNAP_EXPORT_NAMES=r.HandlerType=void 0;let n=r.HandlerType=function(e){return e.OnRpcRequest="onRpcRequest",e.OnSignature="onSignature",e.OnTransaction="onTransaction",e.OnCronjob="onCronjob",e.OnInstall="onInstall",e.OnUpdate="onUpdate",e.OnNameLookup="onNameLookup",e.OnKeyringRequest="onKeyringRequest",e.OnHomePage="onHomePage",e.OnUserInput="onUserInput",e}({});r.SNAP_EXPORT_NAMES=Object.values(n)}}},{package:"external:../snaps-utils/src/handler-types.ts",file:"../snaps-utils/src/handler-types.ts"}],[248,{"./../../snaps-sdk/src":186,"./handler-types":247,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SNAP_EXPORTS=r.OnTransactionSeverityResponseStruct=r.OnTransactionResponseWithIdStruct=r.OnTransactionResponseWithContentStruct=r.OnTransactionResponseStruct=r.OnSignatureResponseStruct=r.OnNameLookupResponseStruct=r.OnHomePageResponseWithIdStruct=r.OnHomePageResponseWithContentStruct=r.OnHomePageResponseStruct=r.DomainResolutionStruct=r.DomainResolutionResponseStruct=r.AddressResolutionStruct=r.AddressResolutionResponseStruct=void 0;var n=e("./../../snaps-sdk/src"),s=e("superstruct"),i=e("./handler-types");r.SNAP_EXPORTS={[i.HandlerType.OnRpcRequest]:{type:i.HandlerType.OnRpcRequest,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnTransaction]:{type:i.HandlerType.OnTransaction,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnCronjob]:{type:i.HandlerType.OnCronjob,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnNameLookup]:{type:i.HandlerType.OnNameLookup,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnInstall]:{type:i.HandlerType.OnInstall,required:!1,validator:e=>"function"==typeof e},[i.HandlerType.OnUpdate]:{type:i.HandlerType.OnUpdate,required:!1,validator:e=>"function"==typeof e},[i.HandlerType.OnKeyringRequest]:{type:i.HandlerType.OnKeyringRequest,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnHomePage]:{type:i.HandlerType.OnHomePage,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnSignature]:{type:i.HandlerType.OnSignature,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnUserInput]:{type:i.HandlerType.OnUserInput,required:!0,validator:e=>"function"==typeof e}};const o=r.OnTransactionSeverityResponseStruct=(0,s.object)({severity:(0,s.optional)((0,s.literal)(n.SeverityLevel.Critical))}),a=r.OnTransactionResponseWithIdStruct=(0,s.assign)(o,(0,s.object)({id:(0,s.string)()})),c=r.OnTransactionResponseWithContentStruct=(0,s.assign)(o,(0,s.object)({content:n.ComponentStruct})),u=r.OnTransactionResponseStruct=(0,s.nullable)((0,s.union)([c,a])),l=(r.OnSignatureResponseStruct=u,r.OnHomePageResponseWithContentStruct=(0,s.object)({content:n.ComponentStruct})),d=r.OnHomePageResponseWithIdStruct=(0,s.object)({id:(0,s.string)()}),p=(r.OnHomePageResponseStruct=(0,s.union)([l,d]),r.AddressResolutionStruct=(0,s.object)({protocol:(0,s.string)(),resolvedDomain:(0,s.string)()})),h=r.DomainResolutionStruct=(0,s.object)({protocol:(0,s.string)(),resolvedAddress:(0,s.string)()}),f=r.AddressResolutionResponseStruct=(0,s.object)({resolvedDomains:(0,s.size)((0,s.array)(p),1,Infinity)}),m=r.DomainResolutionResponseStruct=(0,s.object)({resolvedAddresses:(0,s.size)((0,s.array)(h),1,Infinity)});r.OnNameLookupResponseStruct=(0,s.nullable)((0,s.union)([f,m]))}}},{package:"external:../snaps-utils/src/handlers.ts",file:"../snaps-utils/src/handlers.ts"}],[249,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createWindow=async function(e,t,r=!0){return await new Promise(((n,s)=>{const i=document.createElement("iframe");i.setAttribute("id",t),i.setAttribute("data-testid","snaps-iframe"),r&&i.setAttribute("sandbox","allow-scripts"),i.setAttribute("src",e),document.body.appendChild(i),i.addEventListener("load",(()=>{i.contentWindow?n(i.contentWindow):s(new Error(`iframe.contentWindow not present on load for job "${t}".`))}))}))}}}},{package:"external:../snaps-utils/src/iframe.ts",file:"../snaps-utils/src/iframe.ts"}],[250,{"./errors":246,"./handler-types":247,"./handlers":248,"./iframe":249,"./logging":251,"./namespace":252,"./types":253},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./errors");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./handlers");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./handler-types");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./iframe");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./logging");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var c=e("./namespace");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=e("./types");Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===u[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}}))}))}}},{package:"external:../snaps-utils/src/index.executionenv.ts",file:"../snaps-utils/src/index.executionenv.ts"}],[251,{"@metamask/utils":55},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.logError=function(e,...t){console.error(e,...t)},r.logInfo=function(e,...t){console.log(e,...t)},r.logWarning=function(e,...t){console.warn(e,...t)},r.snapsLogger=void 0;var n=e("@metamask/utils");r.snapsLogger=(0,n.createProjectLogger)("snaps")}}},{package:"external:../snaps-utils/src/logging.ts",file:"../snaps-utils/src/logging.ts"}],[252,{superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NamespaceStruct=r.NamespaceIdStruct=r.LimitedString=r.ChainStruct=r.ChainIdStruct=r.ChainIdStringStruct=r.CHAIN_ID_REGEX=r.AccountIdStruct=r.AccountIdArrayStruct=r.AccountAddressStruct=r.ACCOUNT_ID_REGEX=r.ACCOUNT_ADDRESS_REGEX=void 0,r.isAccountId=function(e){return(0,n.is)(e,l)},r.isAccountIdArray=function(e){return(0,n.is)(e,d)},r.isChainId=function(e){return(0,n.is)(e,u)},r.isNamespace=function(e){return(0,n.is)(e,h)},r.isNamespaceId=function(e){return(0,n.is)(e,f)},r.parseAccountId=function(e){const t=i.exec(e);if(null==t||!t.groups)throw new Error("Invalid account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.parseChainId=function(e){const t=s.exec(e);if(null==t||!t.groups)throw new Error("Invalid chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}};var n=e("superstruct");const s=r.CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})$/u,i=r.ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})):(?<accountAddress>[a-zA-Z0-9]{1,64})$/u,o=r.ACCOUNT_ADDRESS_REGEX=/^(?<accountAddress>[a-zA-Z0-9]{1,64})$/u;const a=r.LimitedString=(0,n.size)((0,n.string)(),1,40),c=r.ChainIdStringStruct=(0,n.define)("Chain ID",(0,n.string)().validator),u=r.ChainIdStruct=(0,n.pattern)(c,s),l=r.AccountIdStruct=(0,n.pattern)((0,n.string)(),i),d=r.AccountIdArrayStruct=(0,n.array)(l),p=(r.AccountAddressStruct=(0,n.pattern)((0,n.string)(),o),r.ChainStruct=(0,n.object)({id:u,name:a})),h=r.NamespaceStruct=(0,n.object)({chains:(0,n.array)(p),methods:(0,n.optional)((0,n.array)(a)),events:(0,n.optional)((0,n.array)(a))}),f=r.NamespaceIdStruct=(0,n.pattern)((0,n.string)(),/^[-a-z0-9]{3,8}$/u)}}},{package:"external:../snaps-utils/src/namespace.ts",file:"../snaps-utils/src/namespace.ts"}],[253,{"@metamask/utils":55,superstruct:155},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WALLET_SNAP_PERMISSION_KEY=r.SnapValidationFailureReason=r.SnapIdPrefixes=r.SNAP_STREAM_NAMES=r.NpmSnapPackageJsonStruct=r.NpmSnapFileNames=r.NameStruct=void 0,r.assertIsNpmSnapPackageJson=function(e){(0,n.assertStruct)(e,a,`"${i.PackageJson}" is invalid`)},r.isNpmSnapPackageJson=function(e){return(0,s.is)(e,a)},r.isValidUrl=function(e,t={}){return(0,s.is)(e,c(t))},r.uri=void 0;var n=e("@metamask/utils"),s=e("superstruct");let i=r.NpmSnapFileNames=function(e){return e.PackageJson="package.json",e.Manifest="snap.manifest.json",e}({});const o=r.NameStruct=(0,s.size)((0,s.pattern)((0,s.string)(),/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214),a=r.NpmSnapPackageJsonStruct=(0,s.type)({version:n.VersionStruct,name:o,main:(0,s.optional)((0,s.size)((0,s.string)(),1,Infinity)),repository:(0,s.optional)((0,s.object)({type:(0,s.size)((0,s.string)(),1,Infinity),url:(0,s.size)((0,s.string)(),1,Infinity)}))});r.SnapIdPrefixes=function(e){return e.npm="npm:",e.local="local:",e}({}),r.SnapValidationFailureReason=function(e){return e.NameMismatch='"name" field mismatch',e.VersionMismatch='"version" field mismatch',e.RepositoryMismatch='"repository" field mismatch',e.ShasumMismatch='"shasum" field mismatch',e}({}),r.SNAP_STREAM_NAMES=function(e){return e.JSON_RPC="jsonRpc",e.COMMAND="command",e}({});const c=(e={})=>(0,s.refine)((0,s.union)([(0,s.string)(),(0,s.instance)(URL)]),"uri",(t=>{try{const r=new URL(t),n=(0,s.type)(e);return(0,s.assert)(r,n),!0}catch{return`Expected URL, got "${t.toString()}".`}}));r.uri=c;r.WALLET_SNAP_PERMISSION_KEY="wallet_snap"}}},{package:"external:../snaps-utils/src/types.ts",file:"../snaps-utils/src/types.ts"}]],[182],{resources:{"@metamask/json-rpc-engine":{packages:{"@metamask/providers>@metamask/safe-event-emitter":!0,"@metamask/rpc-errors":!0,"@metamask/utils":!0}},"@metamask/object-multiplex":{globals:{"console.warn":!0},packages:{"@metamask/object-multiplex>once":!0,"readable-stream":!0}},"@metamask/object-multiplex>once":{packages:{"@metamask/object-multiplex>once>wrappy":!0}},"@metamask/post-message-stream":{builtin:{"worker_threads.parentPort":!0},globals:{"MessageEvent.prototype":!0,WorkerGlobalScope:!0,addEventListener:!0,browser:!0,chrome:!0,"location.origin":!0,postMessage:!0,"process.on":!0,"process.removeListener":!0,"process.send":!0,removeEventListener:!0},packages:{"@metamask/utils":!0,"readable-stream":!0,worker_threads:!0}},"@metamask/providers":{globals:{console:!0},packages:{"@metamask/json-rpc-engine":!0,"@metamask/object-multiplex":!0,"@metamask/providers>@metamask/safe-event-emitter":!0,"@metamask/providers>is-stream":!0,"@metamask/providers>json-rpc-middleware-stream":!0,"@metamask/rpc-errors":!0,"eslint>fast-deep-equal":!0,"readable-stream":!0}},"@metamask/providers>@metamask/safe-event-emitter":{builtin:{"events.EventEmitter":!0},globals:{setTimeout:!0},packages:{events:!0}},"@metamask/providers>json-rpc-middleware-stream":{globals:{"console.warn":!0,setTimeout:!0},packages:{"@metamask/providers>@metamask/safe-event-emitter":!0,"readable-stream":!0}},"@metamask/rpc-errors":{packages:{"@metamask/rpc-errors>fast-safe-stringify":!0,"@metamask/utils":!0}},"@metamask/snaps-sdk>is-svg":{packages:{"@metamask/snaps-sdk>is-svg>fast-xml-parser":!0}},"@metamask/snaps-sdk>is-svg>fast-xml-parser":{globals:{entityName:!0,val:!0},packages:{"@metamask/snaps-sdk>is-svg>fast-xml-parser>strnum":!0}},"@metamask/utils":{builtin:{"buffer.Buffer":!0},globals:{TextDecoder:!0,TextEncoder:!0},packages:{"@metamask/utils>@noble/hashes":!0,"@metamask/utils>@scure/base":!0,"@metamask/utils>pony-cause":!0,"@swc/cli>semver":!0,buffer:!0,"eslint>debug":!0,superstruct:!0}},"@metamask/utils>@noble/hashes":{globals:{TextEncoder:!0,crypto:!0}},"@metamask/utils>@scure/base":{globals:{TextDecoder:!0,TextEncoder:!0}},"@swc/cli>semver":{globals:{"console.error":!0,process:!0},packages:{"@swc/cli>semver>lru-cache":!0}},"@swc/cli>semver>lru-cache":{packages:{"@swc/cli>semver>lru-cache>yallist":!0}},"@wdio/mocha-framework>mocha>supports-color":{builtin:{"os.release":!0,"tty.isatty":!0},globals:{"process.env":!0,"process.platform":!0},packages:{"istanbul-lib-report>supports-color>has-flag":!0,os:!0,tty:!0}},"browserify>browser-pack>safe-buffer":{builtin:{buffer:!0},packages:{buffer:!0}},"browserify>inherits":{builtin:{"util.inherits":!0},packages:{util:!0}},"browserify>string_decoder":{packages:{"browserify>browser-pack>safe-buffer":!0}},"eslint>debug":{builtin:{"tty.isatty":!0,"util.deprecate":!0,"util.format":!0,"util.inspect":!0},globals:{console:!0,document:!0,localStorage:!0,navigator:!0,process:!0},packages:{"@wdio/mocha-framework>mocha>supports-color":!0,"eslint>debug>ms":!0,tty:!0,util:!0}},"external:../snaps-sdk/src/error-wrappers.ts":{packages:{"@metamask/rpc-errors":!0,"external:../snaps-sdk/src/internals/index.ts":!0}},"external:../snaps-sdk/src/errors.ts":{packages:{"external:../snaps-sdk/src/internals/index.ts":!0}},"external:../snaps-sdk/src/images.ts":{globals:{fetch:!0},packages:{"@metamask/utils":!0,"external:../snaps-sdk/src/ui/index.ts":!0}},"external:../snaps-sdk/src/index.ts":{packages:{"@metamask/utils":!0,"external:../snaps-sdk/src/error-wrappers.ts":!0,"external:../snaps-sdk/src/errors.ts":!0,"external:../snaps-sdk/src/images.ts":!0,"external:../snaps-sdk/src/internals/index.ts":!0,"external:../snaps-sdk/src/types/index.ts":!0,"external:../snaps-sdk/src/ui/index.ts":!0}},"external:../snaps-sdk/src/internals/error-wrappers.ts":{packages:{"external:../snaps-sdk/src/errors.ts":!0}},"external:../snaps-sdk/src/internals/errors.ts":{packages:{"@metamask/utils":!0}},"external:../snaps-sdk/src/internals/index.ts":{packages:{"external:../snaps-sdk/src/internals/error-wrappers.ts":!0,"external:../snaps-sdk/src/internals/errors.ts":!0,"external:../snaps-sdk/src/internals/helpers.ts":!0,"external:../snaps-sdk/src/internals/structs.ts":!0}},"external:../snaps-sdk/src/internals/structs.ts":{packages:{superstruct:!0}},"external:../snaps-sdk/src/types/handlers/index.ts":{packages:{"external:../snaps-sdk/src/types/handlers/cronjob.ts":!0,"external:../snaps-sdk/src/types/handlers/home-page.ts":!0,"external:../snaps-sdk/src/types/handlers/keyring.ts":!0,"external:../snaps-sdk/src/types/handlers/lifecycle.ts":!0,"external:../snaps-sdk/src/types/handlers/name-lookup.ts":!0,"external:../snaps-sdk/src/types/handlers/rpc-request.ts":!0,"external:../snaps-sdk/src/types/handlers/signature.ts":!0,"external:../snaps-sdk/src/types/handlers/transaction.ts":!0,"external:../snaps-sdk/src/types/handlers/user-input.ts":!0}},"external:../snaps-sdk/src/types/handlers/user-input.ts":{packages:{superstruct:!0}},"external:../snaps-sdk/src/types/index.ts":{packages:{"external:../snaps-sdk/src/types/caip.ts":!0,"external:../snaps-sdk/src/types/global.ts":!0,"external:../snaps-sdk/src/types/handlers/index.ts":!0,"external:../snaps-sdk/src/types/interface.ts":!0,"external:../snaps-sdk/src/types/methods/index.ts":!0,"external:../snaps-sdk/src/types/permissions.ts":!0,"external:../snaps-sdk/src/types/provider.ts":!0,"external:../snaps-sdk/src/types/snap.ts":!0}},"external:../snaps-sdk/src/types/interface.ts":{packages:{superstruct:!0}},"external:../snaps-sdk/src/types/methods/index.ts":{packages:{"external:../snaps-sdk/src/types/methods/create-interface.ts":!0,"external:../snaps-sdk/src/types/methods/dialog.ts":!0,"external:../snaps-sdk/src/types/methods/get-bip32-entropy.ts":!0,"external:../snaps-sdk/src/types/methods/get-bip32-public-key.ts":!0,"external:../snaps-sdk/src/types/methods/get-bip44-entropy.ts":!0,"external:../snaps-sdk/src/types/methods/get-client-status.ts":!0,"external:../snaps-sdk/src/types/methods/get-entropy.ts":!0,"external:../snaps-sdk/src/types/methods/get-file.ts":!0,"external:../snaps-sdk/src/types/methods/get-interface-state.ts":!0,"external:../snaps-sdk/src/types/methods/get-locale.ts":!0,"external:../snaps-sdk/src/types/methods/get-snaps.ts":!0,"external:../snaps-sdk/src/types/methods/invoke-keyring.ts":!0,"external:../snaps-sdk/src/types/methods/invoke-snap.ts":!0,"external:../snaps-sdk/src/types/methods/manage-accounts.ts":!0,"external:../snaps-sdk/src/types/methods/manage-state.ts":!0,"external:../snaps-sdk/src/types/methods/methods.ts":!0,"external:../snaps-sdk/src/types/methods/notify.ts":!0,"external:../snaps-sdk/src/types/methods/request-snaps.ts":!0,"external:../snaps-sdk/src/types/methods/update-interface.ts":!0}},"external:../snaps-sdk/src/ui/builder.ts":{packages:{"@metamask/utils":!0}},"external:../snaps-sdk/src/ui/component.ts":{packages:{"@metamask/utils":!0,"external:../snaps-sdk/src/ui/components/index.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/address.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/button.ts":{packages:{"external:../snaps-sdk/src/internals/index.ts":!0,"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/copyable.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/divider.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/form.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/components/button.ts":!0,"external:../snaps-sdk/src/ui/components/input.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/heading.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/image.ts":{packages:{"@metamask/snaps-sdk>is-svg":!0,"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/index.ts":{packages:{"external:../snaps-sdk/src/ui/components/address.ts":!0,"external:../snaps-sdk/src/ui/components/button.ts":!0,"external:../snaps-sdk/src/ui/components/copyable.ts":!0,"external:../snaps-sdk/src/ui/components/divider.ts":!0,"external:../snaps-sdk/src/ui/components/form.ts":!0,"external:../snaps-sdk/src/ui/components/heading.ts":!0,"external:../snaps-sdk/src/ui/components/image.ts":!0,"external:../snaps-sdk/src/ui/components/input.ts":!0,"external:../snaps-sdk/src/ui/components/panel.ts":!0,"external:../snaps-sdk/src/ui/components/row.ts":!0,"external:../snaps-sdk/src/ui/components/spinner.ts":!0,"external:../snaps-sdk/src/ui/components/text.ts":!0}},"external:../snaps-sdk/src/ui/components/input.ts":{packages:{"external:../snaps-sdk/src/internals/index.ts":!0,"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/panel.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/components/address.ts":!0,"external:../snaps-sdk/src/ui/components/button.ts":!0,"external:../snaps-sdk/src/ui/components/copyable.ts":!0,"external:../snaps-sdk/src/ui/components/divider.ts":!0,"external:../snaps-sdk/src/ui/components/form.ts":!0,"external:../snaps-sdk/src/ui/components/heading.ts":!0,"external:../snaps-sdk/src/ui/components/image.ts":!0,"external:../snaps-sdk/src/ui/components/input.ts":!0,"external:../snaps-sdk/src/ui/components/row.ts":!0,"external:../snaps-sdk/src/ui/components/spinner.ts":!0,"external:../snaps-sdk/src/ui/components/text.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/row.ts":{packages:{"external:../snaps-sdk/src/internals/index.ts":!0,"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/components/address.ts":!0,"external:../snaps-sdk/src/ui/components/image.ts":!0,"external:../snaps-sdk/src/ui/components/text.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/spinner.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/components/text.ts":{packages:{"external:../snaps-sdk/src/ui/builder.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0,superstruct:!0}},"external:../snaps-sdk/src/ui/index.ts":{packages:{"external:../snaps-sdk/src/ui/component.ts":!0,"external:../snaps-sdk/src/ui/components/index.ts":!0,"external:../snaps-sdk/src/ui/nodes.ts":!0}},"external:../snaps-sdk/src/ui/nodes.ts":{packages:{superstruct:!0}},"external:../snaps-utils/src/errors.ts":{packages:{"@metamask/rpc-errors":!0,"@metamask/utils":!0,"external:../snaps-sdk/src/index.ts":!0}},"external:../snaps-utils/src/handlers.ts":{packages:{"external:../snaps-sdk/src/index.ts":!0,"external:../snaps-utils/src/handler-types.ts":!0,superstruct:!0}},"external:../snaps-utils/src/icon.ts":{builtin:{buffer:!0}},"external:../snaps-utils/src/iframe.ts":{globals:{"document.body.appendChild":!0,"document.createElement":!0}},"external:../snaps-utils/src/index.executionenv.ts":{packages:{"external:../snaps-utils/src/errors.ts":!0,"external:../snaps-utils/src/handler-types.ts":!0,"external:../snaps-utils/src/handlers.ts":!0,"external:../snaps-utils/src/iframe.ts":!0,"external:../snaps-utils/src/logging.ts":!0,"external:../snaps-utils/src/namespace.ts":!0,"external:../snaps-utils/src/types.ts":!0}},"external:../snaps-utils/src/logging.ts":{globals:{"console.error":!0,"console.log":!0,"console.warn":!0},packages:{"@metamask/utils":!0}},"external:../snaps-utils/src/namespace.ts":{packages:{superstruct:!0}},"external:../snaps-utils/src/types.ts":{globals:{URL:!0},packages:{"@metamask/utils":!0,superstruct:!0}},"istanbul-lib-report>supports-color>has-flag":{globals:{"process.argv":!0}},"readable-stream":{builtin:{"buffer.Buffer":!0,"events.EventEmitter":!0,stream:!0,util:!0},globals:{"process.env.READABLE_STREAM":!0,"process.nextTick":!0,"process.stderr":!0,"process.stdout":!0},packages:{"browserify>inherits":!0,"browserify>string_decoder":!0,buffer:!0,events:!0,"readable-stream>util-deprecate":!0,stream:!0,util:!0}},"readable-stream>util-deprecate":{builtin:{"util.deprecate":!0},packages:{util:!0}},superstruct:{globals:{"console.warn":!0,define:!0}}}});
|