@metamask/snaps-execution-environments 0.30.0 → 0.32.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.
Files changed (61) hide show
  1. package/dist/browserify/iframe/bundle.js +6435 -0
  2. package/dist/{webpack → browserify}/iframe/index.html +1411 -178
  3. package/dist/browserify/node-process/bundle.js +15135 -0
  4. package/dist/browserify/node-thread/bundle.js +15135 -0
  5. package/dist/browserify/offscreen/bundle.js +2266 -0
  6. package/dist/{webpack → browserify}/offscreen/index.html +1411 -178
  7. package/dist/common/BaseSnapExecutor.js +32 -16
  8. package/dist/common/BaseSnapExecutor.js.map +1 -1
  9. package/dist/common/commands.js +1 -2
  10. package/dist/common/commands.js.map +1 -1
  11. package/dist/common/endowments/commonEndowmentFactory.d.ts +1 -0
  12. package/dist/common/endowments/commonEndowmentFactory.js +9 -3
  13. package/dist/common/endowments/commonEndowmentFactory.js.map +1 -1
  14. package/dist/common/endowments/crypto.js +2 -2
  15. package/dist/common/endowments/crypto.js.map +1 -1
  16. package/dist/common/endowments/index.d.ts +0 -7
  17. package/dist/common/endowments/index.js +6 -38
  18. package/dist/common/endowments/index.js.map +1 -1
  19. package/dist/common/endowments/interval.js +1 -1
  20. package/dist/common/endowments/interval.js.map +1 -1
  21. package/dist/common/endowments/math.js +6 -3
  22. package/dist/common/endowments/math.js.map +1 -1
  23. package/dist/common/endowments/network.js +8 -6
  24. package/dist/common/endowments/network.js.map +1 -1
  25. package/dist/common/endowments/timeout.js +1 -1
  26. package/dist/common/endowments/timeout.js.map +1 -1
  27. package/dist/common/keyring.js +1 -1
  28. package/dist/common/keyring.js.map +1 -1
  29. package/dist/common/lockdown/lockdown-events.d.ts +4 -0
  30. package/dist/common/lockdown/lockdown-events.js +60 -0
  31. package/dist/common/lockdown/lockdown-events.js.map +1 -0
  32. package/dist/common/sortParams.js +4 -1
  33. package/dist/common/sortParams.js.map +1 -1
  34. package/dist/common/utils.d.ts +13 -0
  35. package/dist/common/utils.js +45 -1
  36. package/dist/common/utils.js.map +1 -1
  37. package/dist/common/validation.js +1 -2
  38. package/dist/common/validation.js.map +1 -1
  39. package/dist/iframe/IFrameSnapExecutor.d.ts +3 -1
  40. package/dist/iframe/IFrameSnapExecutor.js +8 -8
  41. package/dist/iframe/IFrameSnapExecutor.js.map +1 -1
  42. package/dist/iframe/index.js +3 -2
  43. package/dist/iframe/index.js.map +1 -1
  44. package/dist/node-process/index.js +1 -2
  45. package/dist/node-process/index.js.map +1 -1
  46. package/dist/node-thread/index.js +1 -2
  47. package/dist/node-thread/index.js.map +1 -1
  48. package/dist/offscreen/index.js +3 -2
  49. package/dist/offscreen/index.js.map +1 -1
  50. package/package.json +43 -32
  51. package/dist/iframe-test/index.d.ts +0 -1
  52. package/dist/iframe-test/index.js +0 -8
  53. package/dist/iframe-test/index.js.map +0 -1
  54. package/dist/webpack/iframe/bundle.js +0 -2
  55. package/dist/webpack/iframe/bundle.js.LICENSE.txt +0 -14
  56. package/dist/webpack/node-process/bundle.js +0 -106821
  57. package/dist/webpack/node-process/lockdown.umd.min.js +0 -1
  58. package/dist/webpack/node-thread/bundle.js +0 -106821
  59. package/dist/webpack/node-thread/lockdown.umd.min.js +0 -1
  60. package/dist/webpack/offscreen/bundle.js +0 -2
  61. package/dist/webpack/offscreen/bundle.js.LICENSE.txt +0 -12
@@ -1,2 +0,0 @@
1
- /*! For license information please see bundle.js.LICENSE.txt */
2
- (()=>{var e={7209:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectMultiplex=void 0;const i=r(7525),s=n(r(8797)),o=n(r(9928)),a=r(9067),u=Symbol("IGNORE_SUBSTREAM");class c extends i.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 a.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const r=o.default(t);s.default(e,{readable:!1},r),s.default(e,{writable:!1},r)}(this,(e=>t.destroy(e||void 0))),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]=u}_read(){}_write(e,t,r){const{name:n,data:i}=e;if(!n)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const s=this._substreams[n];return s?(s!==u&&s.push(i),r()):(console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r())}}t.ObjectMultiplex=c},9067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Substream=void 0;const n=r(7525);class i extends n.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){}_write(e,t,r){this._parent.push({name:this._name,data:e}),r()}}t.Substream=i},9952:(e,t,r)=>{"use strict";const n=r(7209);e.exports=n.ObjectMultiplex},470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePostMessageStream=void 0;const n=r(5800),i=()=>{},s="ACK";class o extends n.Duplex{constructor(){super({objectMode:!0}),this._init=!1,this._haveSyn=!1}_handshake(){this._write("SYN",null,i),this.cork()}_onData(e){if(this._init)try{this.push(e)}catch(e){this.emit("error",e)}else"SYN"===e?(this._haveSyn=!0,this._write(s,null,i)):e===s&&(this._init=!0,this._haveSyn||this._write(s,null,i),this.uncork())}_read(){}_write(e,t,r){this._postMessage(e),r()}}t.BasePostMessageStream=o},6993:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebWorkerParentPostMessageStream=void 0;const n=r(470),i=r(7131);class s extends n.BasePostMessageStream{constructor({worker:e}){super(),this._target=i.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,i.isValidStreamMessage)(t)&&this._onData(t.data)}_destroy(){this._worker.onmessage=null,this._worker=null}}t.WebWorkerParentPostMessageStream=s},672:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebWorkerPostMessageStream=void 0;const n=r(470),i=r(7131);class s extends n.BasePostMessageStream{constructor(){if("undefined"==typeof self||"undefined"==typeof WorkerGlobalScope||!(self instanceof WorkerGlobalScope))throw new Error("WorkerGlobalScope not found. This class should only be instantiated in a WebWorker.");super(),this._name=i.DEDICATED_WORKER_NAME,self.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const t=e.data;(0,i.isValidStreamMessage)(t)&&t.target===this._name&&this._onData(t.data)}_destroy(){}}t.WebWorkerPostMessageStream=s},5968:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=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(t,"__esModule",{value:!0}),i(r(2121),t),i(r(672),t),i(r(6993),t),i(r(7410),t),i(r(470),t)},7410:function(e,t,r){"use strict";var n,i,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.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(t,"__esModule",{value:!0}),t.BrowserRuntimePostMessageStream=void 0;const a=r(470),u=r(7131);class c extends a.BasePostMessageStream{constructor({name:e,target:t}){super(),n.set(this,void 0),i.set(this,void 0),s(this,n,e,"f"),s(this,i,t,"f"),this._onMessage=this._onMessage.bind(this),this._getRuntime().onMessage.addListener(this._onMessage),this._handshake()}_postMessage(e){this._getRuntime().sendMessage({target:o(this,i,"f"),data:e})}_onMessage(e){(0,u.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)}}t.BrowserRuntimePostMessageStream=c,n=new WeakMap,i=new WeakMap},7131:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidStreamMessage=t.DEDICATED_WORKER_NAME=void 0;const n=r(5554);t.DEDICATED_WORKER_NAME="dedicatedWorker",t.isValidStreamMessage=function(e){return(0,n.isObject)(e)&&Boolean(e.data)&&("number"==typeof e.data||"object"==typeof e.data||"string"==typeof e.data)}},2121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowPostMessageStream=void 0;const n=r(470),i=r(7131);class s extends n.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&&e.origin!==this._targetOrigin||e.source!==this._targetWindow||!(0,i.isValidStreamMessage)(t)||t.target!==this._name||this._onData(t.data)}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}t.WindowPostMessageStream=s},2646:(e,t,r)=>{"use strict";var n=r(4406);!n.version||0===n.version.indexOf("v0.")||0===n.version.indexOf("v1.")&&0!==n.version.indexOf("v1.8.")?e.exports=function(e,t,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,o,a=arguments.length;switch(a){case 0:case 1:return n.nextTick(e);case 2:return n.nextTick((function(){e.call(null,t)}));case 3:return n.nextTick((function(){e.call(null,t,r)}));case 4:return n.nextTick((function(){e.call(null,t,r,i)}));default:for(s=new Array(a-1),o=0;o<s.length;)s[o++]=arguments[o];return n.nextTick((function(){e.apply(null,s)}))}}:e.exports=n.nextTick},1034:(e,t,r)=>{"use strict";var n=r(2646),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var s=r(7646);s.inherits=r(1285);var o=r(7187),a=r(3597);s.inherits(h,o);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];h.prototype[l]||(h.prototype[l]=a.prototype[l])}function h(e){if(!(this instanceof h))return new h(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||n(f,this)}function f(e){e.end()}Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),h.prototype._destroy=function(e,t){this.push(null),this.end(),n(t,e)}},2598:(e,t,r)=>{"use strict";e.exports=s;var n=r(2287),i=r(7646);function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=r(1285),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}},7187:(e,t,r)=>{"use strict";var n=r(4406),i=r(2646);e.exports=w;var s,o=r(7906);w.ReadableState=b;r(2699).EventEmitter;var a=function(e,t){return e.listeners(t).length},u=r(979),c=r(5691).Buffer,l=r.g.Uint8Array||function(){};var h=r(7646);h.inherits=r(1285);var d=r(4857),f=void 0;f=d&&d.debuglog?d.debuglog("stream"):function(){};var p,m=r(8991),g=r(8374);h.inherits(w,u);var y=["error","close","destroy","pause","resume"];function b(e,t){s=s||r(1034),e=e||{},this.objectMode=!!e.objectMode,t instanceof s&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,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.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(5099).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function w(e){if(s=s||r(1034),!(this instanceof w))return new w(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function v(e,t,r,n,i){var s,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(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,R(e)}(e,o)):(i||(s=function(e,t){var r;n=t,c.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):S(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?S(e,o,t,!1):M(e,o)):S(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function S(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&R(e)),M(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.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=c.from(e,t),t=""),r=!0),v(this,e,t,!1,r)},w.prototype.unshift=function(e){return v(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(e){return p||(p=r(5099).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var E=8388608;function _(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>=E?e=E:(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 R(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i(O,e):O(e))}function O(e){f("emit readable"),e.emit("readable"),I(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i(x,e,t))}function x(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function T(e){f("readable nexttick read 0"),e.read(0)}function C(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function A(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.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),0===(e-=o)){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),0===(e-=o)){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function k(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function j(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?k(this):R(this),null;if(0===(e=_(e,t))&&t.ended)return 0===t.length&&k(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("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,t))),null===(n=e>0?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&k(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,f("pipe count=%d opts=%j",s.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:w;function c(t,n){f("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,f("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",h),e.removeListener("error",g),e.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",w),r.removeListener("data",m),d=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function l(){f("onend"),e.end()}s.endEmitted?i(u):r.once("end",u),e.on("unpipe",c);var h=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,I(e))}}(r);e.on("drain",h);var d=!1;var p=!1;function m(t){f("ondata"),p=!1,!1!==e.write(t)||p||((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==j(s.pipes,e))&&!d&&(f("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(t){f("onerror",t),w(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),w()}function b(){f("onfinish"),e.removeListener("close",y),w()}function w(){f("unpipe"),r.unpipe(e)}return r.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",y),e.once("finish",b),e.emit("pipe",r),s.flowing||(f("pipe resume"),r.resume()),e},w.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,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var o=j(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},w.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&R(this):i(T,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i(C,e,t))}(this,e)),this},w.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var i in e.on("end",(function(){if(f("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(i){(f("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i)||(t.objectMode||i&&i.length)&&(n.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<y.length;s++)e.on(y[s],n.emit.bind(n,y[s]));return n._read=function(t){f("wrapped _read",t),r&&(r=!1,e.resume())},n},w._fromList=A},2287:(e,t,r)=>{"use strict";e.exports=o;var n=r(1034),i=r(7646);function s(e){this.afterTransform=function(t,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=r&&e.push(r);i(t);var s=e._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&e._read(s.highWaterMark)}(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState=new s(this);var t=this;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.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e,r){a(t,e,r)})):a(t)}))}function a(e,t,r){if(t)return e.emit("error",t);null!=r&&e.push(r);var n=e._writableState,i=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(1285),i.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},3597:(e,t,r)=>{"use strict";var n=r(4406),i=r(2646);function s(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 i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var o,a=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?setImmediate:i;y.WritableState=g;var u=r(7646);u.inherits=r(1285);var c={deprecate:r(5803)},l=r(979),h=r(5691).Buffer,d=r.g.Uint8Array||function(){};var f,p=r(8374);function m(){}function g(e,t){o=o||r(1034),e=e||{},this.objectMode=!!e.objectMode,t instanceof o&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.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(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?(i(s,n),i(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(s(n),e._writableState.errorEmitted=!0,e.emit("error",n),_(e,t))}(e,r,n,t,s);else{var o=S(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),n?a(w,e,r,o,s):w(e,r,o,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(o=o||r(1034),!(f.call(y,this)||this instanceof o))return new y(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function b(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),_(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,b(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 s(t)}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,l,h),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),_(e,t)}))}function _(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i(E,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(y,l),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:c.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]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||e&&e._writableState instanceof g}})):f=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var n,s=this._writableState,o=!1,a=(n=e,(h.isBuffer(n)||n instanceof d)&&!s.objectMode);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=m),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i(t,r)}(this,r):(a||function(e,t,r,n){var s=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),i(n,o),s=!1),s}(this,s,e,r))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,a,n,i,s);return u}(this,s,a,e,t,r)),o},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},y.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 TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,_(e,t),r&&(t.finished?i(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}},8991:(e,t,r)=>{"use strict";var n=r(5691).Buffer;e.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}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=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}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,s=n.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=s,i=a,t.copy(r,i),a+=o.data.length,o=o.next;return s},e}()},8374:(e,t,r)=>{"use strict";var n=r(2646);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;s||o?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n(i,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})))},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.finished=!1,this._writableState.errorEmitted=!1)}}},979:(e,t,r)=>{e.exports=r(2699).EventEmitter},5800:(e,t,r)=>{(t=e.exports=r(7187)).Stream=t,t.Readable=t,t.Writable=r(3597),t.Duplex=r(1034),t.Transform=r(2287),t.PassThrough=r(2598)},5691:(e,t,r)=>{var n=r(8834),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=o),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"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 i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},5099:(e,t,r)=>{"use strict";var n=r(5691).Buffer,i=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 s(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===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}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:-1}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(r);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(r+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}(this,e,t);return void 0!==r?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 u(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 c(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 h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))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||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;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)},s.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}},4044:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseProvider=void 0;const i=n(r(3795)),s=r(8094),o=n(r(8787)),a=r(1280),u=n(r(2371)),c=r(4022);class l extends i.default{constructor({logger:e=console,maxEventListeners:t=100,rpcMiddleware:r=[]}={}){super(),this._log=e,this.setMaxListeners(t),this._state=Object.assign({},l._defaultState),this.selectedAddress=null,this.chainId=null,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 n=new a.JsonRpcEngine;r.forEach((e=>n.push(e))),this._rpcEngine=n}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw s.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestArgs(),data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw s.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestMethod(),data:e});if(void 0!==r&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw s.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestParams(),data:e});return new Promise(((e,n)=>{this._rpcRequest({method:t,params:r},c.getRpcPromiseCallback(e,n))}))}_initializeState(e){if(!0===this._state.initialized)throw new Error("Provider already initialized.");if(e){const{accounts:t,chainId:r,isUnlocked:n,networkVersion:i}=e;this._handleConnect(r),this._handleChainChanged({chainId:r,networkVersion:i}),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(u.default.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new s.EthereumRpcError(1013,t||u.default.errors.disconnected()),this._log.debug(r)):(r=new s.EthereumRpcError(1011,t||u.default.errors.permanentlyDisconnected()),this._log.error(r),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleChainChanged({chainId:e}={}){c.isValidChainId(e)?(this._handleConnect(e),e!==this.chainId&&(this.chainId=e,this._state.initialized&&this.emit("chainChanged",this.chainId))):this._log.error(u.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}o.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,this.selectedAddress!==r[0]&&(this.selectedAddress=r[0]||null),this._state.initialized&&this.emit("accountsChanged",r))}_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.")}}t.BaseProvider=l,l._defaultState={accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1}},9461:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MetaMaskInpageProvider=t.MetaMaskInpageProviderStreamName=void 0;const i=r(8094),s=r(23),o=n(r(2371)),a=r(4022),u=r(908);t.MetaMaskInpageProviderStreamName="metamask-provider";class c extends u.AbstractStreamProvider{constructor(e,{jsonRpcStreamName:r=t.MetaMaskInpageProviderStreamName,logger:n=console,maxEventListeners:i,shouldSendMetadata:o}={}){if(super(e,{jsonRpcStreamName:r,logger:n,maxEventListeners:i,rpcMiddleware:a.getDefaultExternalMiddleware(n)}),this._sentWarnings={enable:!1,experimentalMethods:!1,send:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}},this._initializeStateAsync(),this.networkVersion=null,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;a.EMITTED_NOTIFICATIONS.includes(t)&&(this.emit("data",e),this.emit("notification",e.params.result))})),o)if("complete"===document.readyState)s.sendSiteMetadata(this._rpcEngine,this._log);else{const e=()=>{s.sendSiteMetadata(this._rpcEngine,this._log),window.removeEventListener("DOMContentLoaded",e)};window.addEventListener("DOMContentLoaded",e)}}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),this.networkVersion&&!e&&(this.networkVersion=null)}_warnOfDeprecation(e){var t;!1===(null===(t=this._sentWarnings)||void 0===t?void 0:t.events[e])&&(this._log.warn(o.default.warnings.events[e]),this._sentWarnings.events[e]=!0)}enable(){return this._sentWarnings.enable||(this._log.warn(o.default.warnings.enableDeprecation),this._sentWarnings.enable=!0),new Promise(((e,t)=>{try{this._rpcRequest({method:"eth_requestAccounts",params:[]},a.getRpcPromiseCallback(e,t))}catch(e){t(e)}}))}send(e,t){return this._sentWarnings.send||(this._log.warn(o.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},a.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,a.NOOP),t=!0;break;case"net_version":t=this.networkVersion||null;break;default:throw new Error(o.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 i.ethErrors.rpc.invalidRequest({message:"Batch requests must be made with an array of request objects.",data:e});return new Promise(((t,r)=>{this._rpcRequest(e,a.getRpcPromiseCallback(t,r))}))}},{get:(e,t,...r)=>(this._sentWarnings.experimentalMethods||(this._log.warn(o.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!==this.networkVersion&&(this.networkVersion=t,this._state.initialized&&this.emit("networkChanged",this.networkVersion))}}t.MetaMaskInpageProvider=c},908:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StreamProvider=t.AbstractStreamProvider=void 0;const i=n(r(9952)),s=r(8607),o=r(1384),a=n(r(3171)),u=n(r(2371)),c=r(4022),l=r(4044);class h extends l.BaseProvider{constructor(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:n,rpcMiddleware:l}){if(super({logger:r,maxEventListeners:n,rpcMiddleware:l}),!s.duplex(e))throw new Error(u.default.errors.invalidDuplexStream());this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this);const h=new i.default;a.default(e,h,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._jsonRpcConnection=o.createStreamMiddleware({retryOnMessage:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}),a.default(this._jsonRpcConnection.stream,h.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):c.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}".`;(null==t?void 0:t.stack)&&(r+=`\n${t.stack}`),this._log.warn(r),this.listenerCount("error")>0&&this.emit("error",r),this._handleDisconnect(!1,t?t.message:void 0)}_handleChainChanged({chainId:e,networkVersion:t}={}){c.isValidChainId(e)&&c.isValidNetworkVersion(t)?"loading"===t?this._handleDisconnect(!0):super._handleChainChanged({chainId:e}):this._log.error(u.default.errors.invalidNetworkParams(),{chainId:e,networkVersion:t})}}t.AbstractStreamProvider=h;t.StreamProvider=class extends h{async initialize(){return this._initializeStateAsync()}}},5817:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createExternalExtensionProvider=void 0;const i=n(r(3274)),s=r(4924),o=r(9461),a=r(908),u=r(4022),c=n(r(5543)),l=s.detect();t.createExternalExtensionProvider=function(){let e;try{const t=function(){switch(null==l?void 0:l.name){case"chrome":default:return c.default.CHROME_ID;case"firefox":return c.default.FIREFOX_ID}}(),r=chrome.runtime.connect(t),n=new i.default(r);e=new a.StreamProvider(n,{jsonRpcStreamName:o.MetaMaskInpageProviderStreamName,logger:console,rpcMiddleware:u.getDefaultExternalMiddleware(console)}),e.initialize()}catch(e){throw console.dir("MetaMask connect error.",e),e}return e}},2972:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamProvider=t.shimWeb3=t.setGlobalProvider=t.MetaMaskInpageProvider=t.MetaMaskInpageProviderStreamName=t.initializeProvider=t.createExternalExtensionProvider=t.BaseProvider=void 0;const n=r(4044);Object.defineProperty(t,"BaseProvider",{enumerable:!0,get:function(){return n.BaseProvider}});const i=r(5817);Object.defineProperty(t,"createExternalExtensionProvider",{enumerable:!0,get:function(){return i.createExternalExtensionProvider}});const s=r(6352);Object.defineProperty(t,"initializeProvider",{enumerable:!0,get:function(){return s.initializeProvider}}),Object.defineProperty(t,"setGlobalProvider",{enumerable:!0,get:function(){return s.setGlobalProvider}});const o=r(9461);Object.defineProperty(t,"MetaMaskInpageProvider",{enumerable:!0,get:function(){return o.MetaMaskInpageProvider}}),Object.defineProperty(t,"MetaMaskInpageProviderStreamName",{enumerable:!0,get:function(){return o.MetaMaskInpageProviderStreamName}});const a=r(6473);Object.defineProperty(t,"shimWeb3",{enumerable:!0,get:function(){return a.shimWeb3}});const u=r(908);Object.defineProperty(t,"StreamProvider",{enumerable:!0,get:function(){return u.StreamProvider}})},6352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setGlobalProvider=t.initializeProvider=void 0;const n=r(9461),i=r(6473);function s(e){window.ethereum=e,window.dispatchEvent(new Event("ethereum#initialized"))}t.initializeProvider=function({connectionStream:e,jsonRpcStreamName:t,logger:r=console,maxEventListeners:o=100,shouldSendMetadata:a=!0,shouldSetOnWindow:u=!0,shouldShimWeb3:c=!1}){const l=new n.MetaMaskInpageProvider(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:o,shouldSendMetadata:a}),h=new Proxy(l,{deleteProperty:()=>!0});return u&&s(h),c&&i.shimWeb3(h,r),h},t.setGlobalProvider=s},2371:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={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:{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"},experimentalMethods:"MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning."}};t.default=r},2072:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createRpcWarningMiddleware=void 0;const i=n(r(2371));t.createRpcWarningMiddleware=function(e){const t={ethDecryptDeprecation:!1,ethGetEncryptionPublicKeyDeprecation:!1};return(r,n,s)=>{!1===t.ethDecryptDeprecation&&"eth_decrypt"===r.method?(e.warn(i.default.warnings.rpc.ethDecryptDeprecation),t.ethDecryptDeprecation=!0):!1===t.ethGetEncryptionPublicKeyDeprecation&&"eth_getEncryptionPublicKey"===r.method&&(e.warn(i.default.warnings.rpc.ethGetEncryptionPublicKeyDeprecation),t.ethGetEncryptionPublicKeyDeprecation=!0),s()}}},6473:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shimWeb3=void 0,t.shimWeb3=function(e,t=console){let r=!1,n=!1;if(!window.web3){const i="__isMetaMaskShim__";let s={currentProvider:e};Object.defineProperty(s,i,{value:!0,enumerable:!0,configurable:!1,writable:!1}),s=new Proxy(s,{get:(s,o,...a)=>("currentProvider"!==o||r?"currentProvider"===o||o===i||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(s,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:s,enumerable:!1,configurable:!0,writable:!0})}}},23:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendSiteMetadata=void 0;const i=n(r(2371)),s=r(4022);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 r)if(e&&await u(e.href))return e.href;return null}function u(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)}}))}t.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},s.NOOP)}catch(e){t.error({message:i.default.errors.sendSiteMetadata(),originalError:e})}}},4022:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP=t.isValidNetworkVersion=t.isValidChainId=t.getRpcPromiseCallback=t.getDefaultExternalMiddleware=t.EMITTED_NOTIFICATIONS=void 0;const n=r(1280),i=r(8094),s=r(2072);t.EMITTED_NOTIFICATIONS=Object.freeze(["eth_subscription"]);t.getDefaultExternalMiddleware=(e=console)=>{return[n.createIdRemapMiddleware(),(t=e,(e,r,n)=>{"string"==typeof e.method&&e.method||(r.error=i.ethErrors.rpc.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()}))}),s.createRpcWarningMiddleware(e)];var t};t.getRpcPromiseCallback=(e,t,r=!0)=>(n,i)=>{n||i.error?t(n||i.error):!r||Array.isArray(i)?e(i):e(i.result)};t.isValidChainId=e=>Boolean(e)&&"string"==typeof e&&e.startsWith("0x");t.isValidNetworkVersion=e=>Boolean(e)&&"string"==typeof e;t.NOOP=()=>{}},8787:e=>{"use strict";var t=Array.isArray,r=Object.keys,n=Object.prototype.hasOwnProperty;e.exports=function e(i,s){if(i===s)return!0;if(i&&s&&"object"==typeof i&&"object"==typeof s){var o,a,u,c=t(i),l=t(s);if(c&&l){if((a=i.length)!=s.length)return!1;for(o=a;0!=o--;)if(!e(i[o],s[o]))return!1;return!0}if(c!=l)return!1;var h=i instanceof Date,d=s instanceof Date;if(h!=d)return!1;if(h&&d)return i.getTime()==s.getTime();var f=i instanceof RegExp,p=s instanceof RegExp;if(f!=p)return!1;if(f&&p)return i.toString()==s.toString();var m=r(i);if((a=m.length)!==r(s).length)return!1;for(o=a;0!=o--;)if(!n.call(s,m[o]))return!1;for(o=a;0!=o--;)if(!e(i[u=m[o]],s[u]))return!1;return!0}return i!=i&&s!=s}},3795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2699);function i(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class s extends n.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(void 0!==n)r=r&&void 0===n.error;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 s=n[e];if(void 0===s)return!1;if("function"==typeof s)i(s,this,t);else{const e=s.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}(s);for(let n=0;n<e;n+=1)i(r[n],this,t)}return!0}}t.default=s},2875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertExhaustive=t.assertStruct=t.assert=t.AssertionError=void 0;const n=r(9249);function i(e,t){return r=e,Boolean("string"==typeof(null===(i=null===(n=null==r?void 0:r.prototype)||void 0===n?void 0:n.constructor)||void 0===i?void 0:i.name))?new e({message:t}):e({message:t});var r,n,i}class s extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}t.AssertionError=s,t.assert=function(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw i(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",o=s){try{(0,n.assert)(e,t)}catch(e){throw i(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)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},7552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.base64=void 0;const n=r(9249),i=r(2875);t.base64=(e,t={})=>{var r,s;const o=null!==(r=t.paddingRequired)&&void 0!==r&&r,a=null!==(s=t.characterSet)&&void 0!==s?s:"base64";let u,c;return"base64"===a?u=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===a),u=String.raw`[-_A-Za-z0-9]`),c=o?new RegExp(`^(?:${u}{4})*(?:${u}{3}=|${u}{2}==)?$`,"u"):new RegExp(`^(?:${u}{4})*(?:${u}{2,3}|${u}{3}=|${u}{2}==)?$`,"u"),(0,n.pattern)(e,c)}},638:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createDataView=t.concatBytes=t.valueToBytes=t.stringToBytes=t.numberToBytes=t.signedBigIntToBytes=t.bigIntToBytes=t.hexToBytes=t.bytesToString=t.bytesToNumber=t.bytesToSignedBigInt=t.bytesToBigInt=t.bytesToHex=t.assertIsBytes=t.isBytes=void 0;const i=r(2875),s=r(7657),o=48,a=58,u=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 l(e){return e instanceof Uint8Array}function h(e){(0,i.assert)(l(e),"Value must be a Uint8Array.")}function d(e){if(h(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){h(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}`,i=new Uint8Array(n.length/2);for(let e=0;e<i.length;e++){const t=n.charCodeAt(2*e),r=n.charCodeAt(2*e+1),s=t-(t<a?o:u),c=r-(r<a?o:u);i[e]=16*s+c}return i}function m(e){(0,i.assert)("bigint"==typeof e,"Value must be a bigint."),(0,i.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return p(e.toString(16))}function g(e){(0,i.assert)("number"==typeof e,"Value must be a number."),(0,i.assert)(e>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return p(e.toString(16))}function y(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return m(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?p(e):y(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}t.isBytes=l,t.assertIsBytes=h,t.bytesToHex=d,t.bytesToBigInt=f,t.bytesToSignedBigInt=function(e){h(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},t.bytesToNumber=function(e){h(e);const t=f(e);return(0,i.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},t.bytesToString=function(e){return h(e),(new TextDecoder).decode(e)},t.hexToBytes=p,t.bigIntToBytes=m,t.signedBigIntToBytes=function(e,t){(0,i.assert)("bigint"==typeof e,"Value must be a bigint."),(0,i.assert)("number"==typeof t,"Byte length must be a number."),(0,i.assert)(t>0,"Byte length must be greater than 0."),(0,i.assert)(function(e,t){(0,i.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 n=new Uint8Array(t);for(let e=0;e<n.length;e++)n[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()},t.numberToBytes=g,t.stringToBytes=y,t.valueToBytes=b,t.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const i=b(e[n]);t[n]=i,r+=i.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},t.createDataView=function(e){if(void 0!==n&&e instanceof n){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}},2793:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChecksumStruct=void 0;const n=r(9249),i=r(7552);t.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},5740:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHex=t.createBytes=t.createBigInt=t.createNumber=void 0;const n=r(9249),i=r(2875),s=r(638),o=r(7657),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),o.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),c=(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]),s.hexToBytes)),h=(0,n.coerce)(o.StrictHexStruct,(0,n.instance)(Uint8Array),s.bytesToHex);t.createNumber=function(e){try{const t=(0,n.create)(e,u);return(0,i.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}},t.createBigInt=function(e){try{return(0,n.create)(e,c)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},t.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}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,h)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},6618:function(e,t){"use strict";var r,n,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},s=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(t,"__esModule",{value:!0}),t.FrozenSet=t.FrozenMap=void 0;class o{constructor(e){r.set(this,void 0),i(this,r,new Map(e),"f"),Object.freeze(this)}get size(){return s(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return s(this,r,"f")[Symbol.iterator]()}entries(){return s(this,r,"f").entries()}forEach(e,t){return s(this,r,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}get(e){return s(this,r,"f").get(e)}has(e){return s(this,r,"f").has(e)}keys(){return s(this,r,"f").keys()}values(){return s(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}t.FrozenMap=o;class a{constructor(e){n.set(this,void 0),i(this,n,new Set(e),"f"),Object.freeze(this)}get size(){return s(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return s(this,n,"f")[Symbol.iterator]()}entries(){return s(this,n,"f").entries()}forEach(e,t){return s(this,n,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}has(e){return s(this,n,"f").has(e)}keys(){return s(this,n,"f").keys()}values(){return s(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}t.FrozenSet=a,Object.freeze(o),Object.freeze(o.prototype),Object.freeze(a),Object.freeze(a.prototype)},7657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const n=r(9249),i=r(2875);function s(e){return(0,n.is)(e,t.HexStruct)}function o(e){return(0,n.is)(e,t.StrictHexStruct)}t.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),t.isHexString=s,t.isStrictHexString=o,t.assertIsHexString=function(e){(0,i.assert)(s(e),"Value must be a hexadecimal string.")},t.assertIsStrictHexString=function(e){(0,i.assert)(o(e),'Value must be a hexadecimal string, starting with "0x".')},t.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},t.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}},5554:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=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(t,"__esModule",{value:!0}),i(r(2875),t),i(r(7552),t),i(r(638),t),i(r(2793),t),i(r(5740),t),i(r(6618),t),i(r(7657),t),i(r(9545),t),i(r(3621),t),i(r(758),t),i(r(4030),t),i(r(368),t),i(r(2968),t),i(r(3191),t)},9545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateJsonAndGetSize=t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.isValidJson=t.JsonStruct=void 0;const n=r(9249),i=r(2875),s=r(758);function o(e,t=!1){const r=new Set;return function e(t,n){if(void 0===t)return[!1,0];if(null===t)return[!0,n?0:s.JsonSize.Null];const i=typeof t;try{if("function"===i)return[!1,0];if("string"===i||t instanceof String)return[!0,n?0:(0,s.calculateStringSize)(t)+2*s.JsonSize.Quote];if("boolean"===i||t instanceof Boolean)return n?[!0,0]:[!0,1==t?s.JsonSize.True:s.JsonSize.False];if("number"===i||t instanceof Number)return n?[!0,0]:[!0,(0,s.calculateNumberSize)(t)];if(t instanceof Date)return n?[!0,0]:[!0,isNaN(t.getDate())?s.JsonSize.Null:s.JsonSize.Date+2*s.JsonSize.Quote]}catch(e){return[!1,0]}if(!(0,s.isPlainObject)(t)&&!Array.isArray(t))return[!1,0];if(r.has(t))return[!1,0];r.add(t);try{return[!0,Object.entries(t).reduce(((i,[o,a],u,c)=>{let[l,h]=e(a,n);if(!l)throw new Error("JSON validation did not pass. Validation process stopped.");if(r.delete(t),n)return 0;return i+(Array.isArray(t)?0:o.length+s.JsonSize.Comma+2*s.JsonSize.Colon)+h+(u<c.length-1?s.JsonSize.Comma:0)}),n?0:2*s.JsonSize.Wrapper)]}catch(e){return[!1,0]}}(e,t)}t.JsonStruct=(0,n.define)("Json",(e=>{const[t]=o(e,!0);return!!t||"Expected a valid JSON-serializable value"})),t.isValidJson=function(e){return(0,n.is)(e,t.JsonStruct)},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,n.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),t.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(t.JsonStruct),stack:(0,n.optional)((0,n.string)())}),t.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),t.JsonStruct),(0,n.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,n.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,n.omit)(t.JsonRpcRequestStruct,["id"]),t.isJsonRpcNotification=function(e){return(0,n.is)(e,t.JsonRpcNotificationStruct)},t.assertIsJsonRpcNotification=function(e,r){(0,i.assertStruct)(e,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",r)},t.isJsonRpcRequest=function(e){return(0,n.is)(e,t.JsonRpcRequestStruct)},t.assertIsJsonRpcRequest=function(e,r){(0,i.assertStruct)(e,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",r)},t.PendingJsonRpcResponseStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,n.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]),t.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,t.PendingJsonRpcResponseStruct)},t.assertIsPendingJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",r)},t.isJsonRpcResponse=function(e){return(0,n.is)(e,t.JsonRpcResponseStruct)},t.assertIsJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",r)},t.isJsonRpcSuccess=function(e){return(0,n.is)(e,t.JsonRpcSuccessStruct)},t.assertIsJsonRpcSuccess=function(e,r){(0,i.assertStruct)(e,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",r)},t.isJsonRpcFailure=function(e){return(0,n.is)(e,t.JsonRpcFailureStruct)},t.assertIsJsonRpcFailure=function(e,r){(0,i.assertStruct)(e,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",r)},t.isJsonRpcError=function(e){return(0,n.is)(e,t.JsonRpcErrorStruct)},t.assertIsJsonRpcError=function(e,r){(0,i.assertStruct)(e,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",r)},t.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)},t.validateJsonAndGetSize=o},3621:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.createProjectLogger=void 0;const i=(0,n(r(5130)).default)("metamask");t.createProjectLogger=function(e){return i.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},758:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0,t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function r(e){return e.charCodeAt(0)<=127}t.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"}(t.JsonSize||(t.JsonSize={})),t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,t.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}},t.isASCII=r,t.calculateStringSize=function(e){var n;return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(null!==(n=e.match(t.ESCAPE_CHARACTERS_REGEXP))&&void 0!==n?n:[]).length},t.calculateNumberSize=function(e){return e.toString().length}},4030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToBigInt=t.hexToNumber=t.bigIntToHex=t.numberToHex=void 0;const n=r(2875),i=r(7657);t.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,i.add0x)(e.toString(16)));t.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,i.add0x)(e.toString(16)));t.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};t.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},368:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.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"}(t.Duration||(t.Duration={}));const r=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.inMilliseconds=function(e,t){return r(e,"count"),e*t},t.timeSince=function(e){return r(e,"timestamp"),Date.now()-e}},3191:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const n=r(7699),i=r(9249),s=r(2875);t.VersionStruct=(0,i.refine)((0,i.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),t.VersionRangeStruct=(0,i.refine)((0,i.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),t.isValidSemVerVersion=function(e){return(0,i.is)(e,t.VersionStruct)},t.isValidSemVerRange=function(e){return(0,i.is)(e,t.VersionRangeStruct)},t.assertIsSemVerVersion=function(e){(0,s.assertStruct)(e,t.VersionStruct)},t.assertIsSemVerRange=function(e){(0,s.assertStruct)(e,t.VersionRangeStruct)},t.gtVersion=function(e,t){return(0,n.gt)(e,t)},t.gtRange=function(e,t){return(0,n.gtr)(e,t)},t.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}},3525:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function s(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function o(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 a(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(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=i,t.hash=s,t.exists=o,t.output=a;const u={number:r,bool:n,bytes:i,hash:s,exists:o,output:a};t.default=u},9350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(3525),i=r(64);class s extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){n.default.exists(this);const{view:t,buffer:r,blockLen:s}=this,o=(e=(0,i.toBytes)(e)).length;for(let n=0;n<o;){const a=Math.min(s-this.pos,o-n);if(a!==s)r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===s&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;s<=o-n;n+=s)this.process(t,n)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){n.default.exists(this),n.default.output(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:s,isLE:o}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>s-a&&(this.process(r,0),a=0);for(let e=a;e<s;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),u=n?4:0,c=n?0:4;e.setUint32(t+u,o,n),e.setUint32(t+c,a,n)}(r,s-8,BigInt(8*this.length),o),this.process(r,0);const u=(0,i.createView)(e);this.get().forEach(((e,t)=>u.setUint32(4*t,e,o)))}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:s,pos:o}=this;return e.length=n,e.pos=o,e.finished=i,e.destroyed=s,n%t&&e.buffer.set(r),e}}t.SHA2=s},4661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto={node:void 0,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0}},6053:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha256=void 0;const n=r(9350),i=r(64),s=(e,t,r)=>e&t^e&r^t&r,o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:s,G:o,H:a}=this;return[e,t,r,n,i,s,o,a]}set(e,t,r,n,i,s,o,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=u[e-15],r=u[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,s=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;u[e]=s+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:a,D:c,E:l,F:h,G:d,H:f}=this;for(let e=0;e<64;e++){const t=f+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&h^~p&d)+o[e]+u[e]|0,m=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+s(r,n,a)|0;f=d,d=h,h=l,l=c+t|0,c=a,a=n,n=r,r=t+m|0}var p;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,c=c+this.D|0,l=l+this.E|0,h=h+this.F|0,d=d+this.G|0,f=f+this.H|0,this.set(r,n,a,c,l,h,d,f)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}t.sha256=(0,i.wrapConstructor)((()=>new c))},64:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(4661);t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.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")));t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=i[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r,i=e.slice(n,n+2),s=Number.parseInt(i,16);if(Number.isNaN(s)||s<0)throw new Error("Invalid byte sequence");t[r]=s}return t};function s(e){if("string"!=typeof e)throw new TypeError("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)}function o(e){if("string"==typeof e&&(e=s(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let s=0;s<e;s++){n(s);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=s,t.toBytes=o,t.concatBytes=function(...e){if(!e.every((e=>e instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r};t.Hash=class{clone(){return this._cloneInto()}};const a=e=>"[object Object]"===Object.prototype.toString.call(e)&&e.constructor===Object;t.checkOpts=function(e,t){if(void 0!==t&&("object"!=typeof t||!a(t)))throw new TypeError("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(o(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(o(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto.web)return n.crypto.web.getRandomValues(new Uint8Array(e));if(n.crypto.node)return new Uint8Array(n.crypto.node.randomBytes(e).buffer);throw new Error("The environment doesn't have randomBytes function")}},6237:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function n(...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),void 0),decode:e.reduce(((e,r)=>e?t(e,r.decode):r.decode),void 0)}}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(r(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 s(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 o(e,t="="){if(r(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 a(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,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let i=0;const s=[],o=Array.from(e);for(o.forEach((e=>{if(r(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,r=!0;for(let s=i;s<o.length;s++){const a=o[s],u=t*e+a;if(!Number.isSafeInteger(u)||t*e/t!==e||u-a!=t*e)throw new Error("convertRadix: carry overflow");if(e=u%n,o[s]=Math.floor(u/n),!Number.isSafeInteger(o[s])||o[s]*n+e!==u)throw new Error("convertRadix: carry overflow");r&&(o[s]?r=!1:i=s)}if(s.push(e),r)break}for(let t=0;t<e.length-1&&0===e[t];t++)s.push(0);return s.reverse()}Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=t.stringToBytes=t.str=t.bytesToString=t.hex=t.utf8=t.bech32m=t.bech32=t.base58check=t.base58xmr=t.base58xrp=t.base58flickr=t.base58=t.base64url=t.base64=t.base32crockford=t.base32hex=t.base32=t.base16=t.utils=t.assertNumber=void 0,t.assertNumber=r;const c=(e,t)=>t?c(t,e%t):e,l=(e,t)=>e+(t-c(e,t));function h(e,t,n,i){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(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(l(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${l(t,n)}`);let s=0,o=0;const a=2**n-1,u=[];for(const i of e){if(r(i),i>=2**t)throw new Error(`convertRadix2: invalid data word=${i} from=${t}`);if(s=s<<t|i,o+t>32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=n;o-=n)u.push((s>>o-n&a)>>>0);s&=2**o-1}if(s=s<<n-o&a,!i&&o>=t)throw new Error("Excess padding");if(!i&&s)throw new Error(`Non-zero padding: ${s}`);return i&&o>0&&u.push(s>>>0),u}function d(e){return r(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(r(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(l(8,e)>32||l(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 h(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(h(r,e,8,t))}}}function p(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 m(e,t){if(r(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),i=new Uint8Array(r.length+e);return i.set(r),i.set(n,r.length),i},decode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");const n=r.slice(0,-e),i=t(n).slice(0,e),s=r.slice(-e);for(let t=0;t<e;t++)if(i[t]!==s[t])throw new Error("Invalid checksum");return n}}}t.utils={alphabet:i,chain:n,checksum:m,radix:d,radix2:f,join:s,padding:o},t.base16=n(f(4),i("0123456789ABCDEF"),s("")),t.base32=n(f(5),i("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),o(5),s("")),t.base32hex=n(f(5),i("0123456789ABCDEFGHIJKLMNOPQRSTUV"),o(5),s("")),t.base32crockford=n(f(5),i("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),s(""),a((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),t.base64=n(f(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),o(6),s("")),t.base64url=n(f(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),o(6),s(""));const g=e=>n(d(58),i(e),s(""));t.base58=g("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base58flickr=g("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),t.base58xrp=g("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const y=[0,2,3,5,6,7,9,10,11];t.base58xmr={encode(e){let r="";for(let n=0;n<e.length;n+=8){const i=e.subarray(n,n+8);r+=t.base58.encode(i).padStart(y[i.length],"1")}return r},decode(e){let r=[];for(let n=0;n<e.length;n+=11){const i=e.slice(n,n+11),s=y.indexOf(i.length),o=t.base58.decode(i);for(let e=0;e<o.length-s;e++)if(0!==o[e])throw new Error("base58xmr: wrong padding");r=r.concat(Array.from(o.slice(o.length-s)))}return Uint8Array.from(r)}};t.base58check=e=>n(m(4,(t=>e(e(t)))),t.base58);const b=n(i("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),s("")),w=[996825010,642813549,513874426,1027748829,705979059];function v(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e<w.length;e++)1==(t>>e&1)&&(r^=w[e]);return r}function S(e,t,r=1){const n=e.length;let i=1;for(let t=0;t<n;t++){const r=e.charCodeAt(t);if(r<33||r>126)throw new Error(`Invalid prefix (${e})`);i=v(i)^r>>5}i=v(i);for(let t=0;t<n;t++)i=v(i)^31&e.charCodeAt(t);for(let e of t)i=v(i)^e;for(let e=0;e<6;e++)i=v(i);return i^=r,b.encode(h([i%2**30],30,5,!1))}function E(e){const t="bech32"===e?1:734539939,r=f(5),n=r.decode,i=r.encode,s=p(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 i=(e=n).lastIndexOf("1");if(0===i||-1===i)throw new Error('Letter "1" must be present between prefix and data only');const s=e.slice(0,i),o=e.slice(i+1);if(o.length<6)throw new Error("Data must be at least 6 characters long");const a=b.decode(o).slice(0,-6),u=S(s,a,t);if(!o.endsWith(u))throw new Error(`Invalid checksum in ${e}: expected "${u}"`);return{prefix:s,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 i=e.length+7+r.length;if(!1!==n&&i>n)throw new TypeError(`Length ${i} exceeds limit ${n}`);return`${e=e.toLowerCase()}1${b.encode(r)}${S(e,r,t)}`},decode:o,decodeToBytes:function(e){const{prefix:t,words:r}=o(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:p(o),fromWords:n,fromWordsUnsafe:s,toWords:i}}t.bech32=E("bech32"),t.bech32m=E("bech32m"),t.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},t.hex=n(f(4),i("0123456789abcdef"),s(""),a((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 _={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},R=`Invalid encoding type. Available types: ${Object.keys(_).join(", ")}`;t.bytesToString=(e,t)=>{if("string"!=typeof e||!_.hasOwnProperty(e))throw new TypeError(R);if(!(t instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return _[e].encode(t)},t.str=t.bytesToString;t.stringToBytes=(e,t)=>{if(!_.hasOwnProperty(e))throw new TypeError(R);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return _[e].decode(t)},t.bytes=t.stringToBytes},5766:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,s=u(e),o=s[0],a=s[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,a)),l=0,h=a>0?o-4:o;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],o=16383,a=0,u=n-i;a<u;a+=o)s.push(c(e,a,a+o>u?u:a+o));1===i?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o<a;++o)r[o]=s[o],n[s.charCodeAt(o)]=o;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,s,o=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8834:(e,t,r)=>{"use strict";const n=r(5766),i=r(2333),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=a(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return f(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?a(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return l(e),a(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(i)return n?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return M(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,i){let s,o=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(s=r;s<a;s++)if(c(e,s)===c(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===u)return n*o}else-1!==n&&(s-=s-n),n=-1}else for(r+u>a&&(r=a-u),s=r;s>=0;s--){let r=!0;for(let n=0;n<u;n++)if(c(e,s+n)!==c(t,n)){r=!1;break}if(r)return s}return-1}function v(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const s=t.length;let o;for(n>s/2&&(n=s/2),o=0;o<n;++o){const n=parseInt(t.substr(2*o,2),16);if(Y(n))return o;e[r+o]=n}return o}function S(e,t,r,n){return G(J(t,e.length-r),e,r,n)}function E(e,t,r,n){return G(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return G(H(t),e,r,n)}function R(e,t,r,n){return G(function(e,t){let r,n,i;const s=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function M(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let s=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,a,u;switch(o){case 1:t<128&&(s=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(s=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(s=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(s=u))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=o}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}t.kMaxLength=o,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return h(e)},u.allocUnsafeSlow=function(e){return h(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(Z(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?M(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const a=Math.min(s,o),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==l[e]){s=c[e],o=l[e];break}return s<o?-1:o<s?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return S(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function T(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function C(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function I(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=X[e[n]];return i}function A(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function k(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,s){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function j(e,t,r,n,i){V(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function P(e,t,r,n,i){V(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function L(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,s){return t=+t,r>>>=0,s||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function $(e,t,r,n,s){return t=+t,r>>>=0,s||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=K((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=K((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let n=t,i=1,s=this[e+--n];for(;n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=K((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=K((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=K((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=K((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,s=1,o=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=K((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=K((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const s=u.isBuffer(e)?e:u.from(e,n),o=s.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%o]}return this};const B={};function F(e,t,r){B[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function U(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 V(e,t,r,n,i,s){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=s>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||W(t,e.length-(r+1))}(n,i,s)}function q(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,r){if(Math.floor(e)!==e)throw q(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const z=/[^+/0-9A-Za-z-_]/g;function J(e,t){let r;t=t||1/0;const n=e.length;let i=null;const s=[];for(let o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function H(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function K(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},5890:(e,t,r)=>{"use strict";var n=r(4406);const i=r(7699),s=["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","punycode","querystring","readline","repl","stream","string_decoder","sys","timers","tls","tty","url","util","vm","zlib"],o={freelist:"<6.0.0",v8:">=1.0.0",process:">=1.1.0",inspector:">=8.0.0",async_hooks:">=8.1.0",http2:">=8.4.0",perf_hooks:">=8.5.0",trace_events:">=10.0.0",worker_threads:">=12.0.0","node:test":">=18.0.0"},a={worker_threads:">=10.5.0",wasi:">=12.16.0",diagnostics_channel:"^14.17.0 || >=15.1.0"};e.exports=({version:e=n.version,experimental:t=!1}={})=>{const r=[...s];for(const[t,n]of Object.entries(o))("*"===e||i.satisfies(e,n))&&r.push(t);if(t)for(const[t,n]of Object.entries(a))r.includes(t)||"*"!==e&&!i.satisfies(e,n)||r.push(t);return r}},7646:(e,t,r)=>{var n=r(8834).Buffer;function i(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===i(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===i(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===i(e)},t.isError=function(e){return"[object Error]"===i(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n.isBuffer},4167:(e,t,r)=>{"use strict";var n=r(8085);function i(e,t){var r={zone:t};if(e?e instanceof i?this._date=e._date:e instanceof Date?this._date=n.DateTime.fromJSDate(e,r):"number"==typeof e?this._date=n.DateTime.fromMillis(e,r):"string"==typeof e&&(this._date=n.DateTime.fromISO(e,r),this._date.isValid||(this._date=n.DateTime.fromRFC2822(e,r)),this._date.isValid||(this._date=n.DateTime.fromSQL(e,r)),this._date.isValid||(this._date=n.DateTime.fromFormat(e,"EEE, d MMM yyyy HH:mm:ss",r))):this._date=n.DateTime.local(),!this._date||!this._date.isValid)throw new Error("CronDate: unhandled timestamp: "+JSON.stringify(e));t&&t!==this._date.zoneName&&(this._date=this._date.setZone(t))}i.prototype.addYear=function(){this._date=this._date.plus({years:1})},i.prototype.addMonth=function(){this._date=this._date.plus({months:1}).startOf("month")},i.prototype.addDay=function(){this._date=this._date.plus({days:1}).startOf("day")},i.prototype.addHour=function(){var e=this._date;this._date=this._date.plus({hours:1}).startOf("hour"),this._date<=e&&(this._date=this._date.plus({hours:1}))},i.prototype.addMinute=function(){var e=this._date;this._date=this._date.plus({minutes:1}).startOf("minute"),this._date<e&&(this._date=this._date.plus({hours:1}))},i.prototype.addSecond=function(){var e=this._date;this._date=this._date.plus({seconds:1}).startOf("second"),this._date<e&&(this._date=this._date.plus({hours:1}))},i.prototype.subtractYear=function(){this._date=this._date.minus({years:1})},i.prototype.subtractMonth=function(){this._date=this._date.minus({months:1}).endOf("month").startOf("second")},i.prototype.subtractDay=function(){this._date=this._date.minus({days:1}).endOf("day").startOf("second")},i.prototype.subtractHour=function(){var e=this._date;this._date=this._date.minus({hours:1}).endOf("hour").startOf("second"),this._date>=e&&(this._date=this._date.minus({hours:1}))},i.prototype.subtractMinute=function(){var e=this._date;this._date=this._date.minus({minutes:1}).endOf("minute").startOf("second"),this._date>e&&(this._date=this._date.minus({hours:1}))},i.prototype.subtractSecond=function(){var e=this._date;this._date=this._date.minus({seconds:1}).startOf("second"),this._date>e&&(this._date=this._date.minus({hours:1}))},i.prototype.getDate=function(){return this._date.day},i.prototype.getFullYear=function(){return this._date.year},i.prototype.getDay=function(){var e=this._date.weekday;return 7==e?0:e},i.prototype.getMonth=function(){return this._date.month-1},i.prototype.getHours=function(){return this._date.hour},i.prototype.getMinutes=function(){return this._date.minute},i.prototype.getSeconds=function(){return this._date.second},i.prototype.getMilliseconds=function(){return this._date.millisecond},i.prototype.getTime=function(){return this._date.valueOf()},i.prototype.getUTCDate=function(){return this._getUTC().day},i.prototype.getUTCFullYear=function(){return this._getUTC().year},i.prototype.getUTCDay=function(){var e=this._getUTC().weekday;return 7==e?0:e},i.prototype.getUTCMonth=function(){return this._getUTC().month-1},i.prototype.getUTCHours=function(){return this._getUTC().hour},i.prototype.getUTCMinutes=function(){return this._getUTC().minute},i.prototype.getUTCSeconds=function(){return this._getUTC().second},i.prototype.toISOString=function(){return this._date.toUTC().toISO()},i.prototype.toJSON=function(){return this._date.toJSON()},i.prototype.setDate=function(e){this._date=this._date.set({day:e})},i.prototype.setFullYear=function(e){this._date=this._date.set({year:e})},i.prototype.setDay=function(e){this._date=this._date.set({weekday:e})},i.prototype.setMonth=function(e){this._date=this._date.set({month:e+1})},i.prototype.setHours=function(e){this._date=this._date.set({hour:e})},i.prototype.setMinutes=function(e){this._date=this._date.set({minute:e})},i.prototype.setSeconds=function(e){this._date=this._date.set({second:e})},i.prototype.setMilliseconds=function(e){this._date=this._date.set({millisecond:e})},i.prototype._getUTC=function(){return this._date.toUTC()},i.prototype.toString=function(){return this.toDate().toString()},i.prototype.toDate=function(){return this._date.toJSDate()},i.prototype.isLastDayOfMonth=function(){var e=this._date.plus({days:1}).startOf("day");return this._date.month!==e.month},i.prototype.isLastWeekdayOfMonth=function(){var e=this._date.plus({days:7}).startOf("day");return this._date.month!==e.month},e.exports=i},2249:(e,t,r)=>{"use strict";var n=r(4167),i=r(9661);function s(e,t){this._options=t,this._utc=t.utc||!1,this._tz=this._utc?"UTC":t.tz,this._currentDate=new n(t.currentDate,this._tz),this._startDate=t.startDate?new n(t.startDate,this._tz):null,this._endDate=t.endDate?new n(t.endDate,this._tz):null,this._isIterator=t.iterator||!1,this._hasIterated=!1,this._nthDayOfWeek=t.nthDayOfWeek||0,this.fields=s._freezeFields(e)}s.map=["second","minute","hour","dayOfMonth","month","dayOfWeek"],s.predefined={"@yearly":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@hourly":"0 * * * *"},s.constraints=[{min:0,max:59,chars:[]},{min:0,max:59,chars:[]},{min:0,max:23,chars:[]},{min:1,max:31,chars:["L"]},{min:1,max:12,chars:[]},{min:0,max:7,chars:["L"]}],s.daysInMonth=[31,29,31,30,31,30,31,31,30,31,30,31],s.aliases={month:{jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},dayOfWeek:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6}},s.parseDefaults=["0","*","*","*","*","*"],s.standardValidCharacters=/^[,*\d/-]+$/,s.dayOfWeekValidCharacters=/^[?,*\dL#/-]+$/,s.dayOfMonthValidCharacters=/^[?,*\dL/-]+$/,s.validCharacters={second:s.standardValidCharacters,minute:s.standardValidCharacters,hour:s.standardValidCharacters,dayOfMonth:s.dayOfMonthValidCharacters,month:s.standardValidCharacters,dayOfWeek:s.dayOfWeekValidCharacters},s._isValidConstraintChar=function(e,t){return"string"==typeof t&&e.chars.some((function(e){return t.indexOf(e)>-1}))},s._parseField=function(e,t,r){switch(e){case"month":case"dayOfWeek":var n=s.aliases[e];t=t.replace(/[a-z]{3}/gi,(function(e){if(e=e.toLowerCase(),void 0!==n[e])return n[e];throw new Error('Validation error, cannot resolve alias "'+e+'"')}))}if(!s.validCharacters[e].test(t))throw new Error("Invalid characters, got value: "+t);function i(e){var t=e.split("/");return t.length>1?(t[0]==+t[0]&&(t=[t[0]+"-"+r.max,t[1]]),o(t[0],t[t.length-1])):o(e,1)}function o(e,t){var n=[],i=e.split("-");if(i.length>1){if(i.length<2)return+e;if(!i[0].length){if(!i[1].length)throw new Error("Invalid range: "+e);return+e}var s=+i[0],o=+i[1];if(Number.isNaN(s)||Number.isNaN(o)||s<r.min||o>r.max)throw new Error("Constraint error, got range "+s+"-"+o+" expected range "+r.min+"-"+r.max);if(s>=o)throw new Error("Invalid range: "+e);var a=+t;if(Number.isNaN(a)||a<=0)throw new Error("Constraint error, cannot repeat at every "+a+" time.");for(var u=s,c=o;u<=c;u++)a>0&&a%t==0?(a=1,n.push(u)):a++;return n}return Number.isNaN(+e)?e:+e}return-1!==t.indexOf("*")?t=t.replace(/\*/g,r.min+"-"+r.max):-1!==t.indexOf("?")&&(t=t.replace(/\?/g,r.min+"-"+r.max)),function(t){var n=[];function o(t){if(t instanceof Array)for(var i=0,o=t.length;i<o;i++){var a=t[i];if(s._isValidConstraintChar(r,a))n.push(a);else{if("number"!=typeof a||Number.isNaN(a)||a<r.min||a>r.max)throw new Error("Constraint error, got value "+a+" expected range "+r.min+"-"+r.max);n.push(a)}}else{if(s._isValidConstraintChar(r,t))return void n.push(t);var u=+t;if(Number.isNaN(u)||u<r.min||u>r.max)throw new Error("Constraint error, got value "+t+" expected range "+r.min+"-"+r.max);"dayOfWeek"===e&&(u%=7),n.push(u)}}var a=t.split(",");if(!a.every((function(e){return e.length>0})))throw new Error("Invalid list value format");if(a.length>1)for(var u=0,c=a.length;u<c;u++)o(i(a[u]));else o(i(t));return n.sort(s._sortCompareFn),n}(t)},s._sortCompareFn=function(e,t){var r="number"==typeof e,n="number"==typeof t;return r&&n?e-t:!r&&n?1:r&&!n?-1:e.localeCompare(t)},s._handleMaxDaysInMonth=function(e){if(1===e.month.length){var t=s.daysInMonth[e.month[0]-1];if(e.dayOfMonth[0]>t)throw new Error("Invalid explicit day of month definition");return e.dayOfMonth.filter((function(e){return"L"===e||e<=t})).sort(s._sortCompareFn)}},s._freezeFields=function(e){for(var t=0,r=s.map.length;t<r;++t){var n=s.map[t],i=e[n];e[n]=Object.freeze(i)}return Object.freeze(e)},s.prototype._applyTimezoneShift=function(e,t,r){if("Month"===r||"Day"===r){var n=e.getTime();e[t+r](),n===e.getTime()&&(0===e.getMinutes()&&0===e.getSeconds()?e.addHour():59===e.getMinutes()&&59===e.getSeconds()&&e.subtractHour())}else{var i=e.getHours();e[t+r]();var s=e.getHours(),o=s-i;2===o?24!==this.fields.hour.length&&(this._dstStart=s):0===o&&0===e.getMinutes()&&0===e.getSeconds()&&24!==this.fields.hour.length&&(this._dstEnd=s)}},s.prototype._findSchedule=function(e){function t(e,t){for(var r=0,n=t.length;r<n;r++)if(t[r]>=e)return t[r]===e;return t[0]===e}function r(e,t){if(t<6){if(e.getDate()<8&&1===t)return!0;var r=e.getDate()%7?1:0,n=e.getDate()-e.getDate()%7;return Math.floor(n/7)+r===t}return!1}function i(e){return e.length>0&&e.some((function(e){return"string"==typeof e&&e.indexOf("L")>=0}))}var o=(e=e||!1)?"subtract":"add",a=new n(this._currentDate,this._tz),u=this._startDate,c=this._endDate,l=a.getTime(),h=0;for(;h<1e4;){if(h++,e){if(u&&a.getTime()-u.getTime()<0)throw new Error("Out of the timespan range")}else if(c&&c.getTime()-a.getTime()<0)throw new Error("Out of the timespan range");var d=t(a.getDate(),this.fields.dayOfMonth);i(this.fields.dayOfMonth)&&(d=d||a.isLastDayOfMonth());var f=t(a.getDay(),this.fields.dayOfWeek);i(this.fields.dayOfWeek)&&(f=f||this.fields.dayOfWeek.some((function(e){if(!i([e]))return!1;var t=Number.parseInt(e[0])%7;if(Number.isNaN(t))throw new Error("Invalid last weekday of the month expression: "+e);return a.getDay()===t&&a.isLastWeekdayOfMonth()})));var p=this.fields.dayOfMonth.length>=s.daysInMonth[a.getMonth()],m=this.fields.dayOfWeek.length===s.constraints[5].max-s.constraints[5].min+1,g=a.getHours();if(d||f&&!m)if(p||!m||d)if(!p||m||f)if(this._nthDayOfWeek>0&&!r(a,this._nthDayOfWeek))this._applyTimezoneShift(a,o,"Day");else if(t(a.getMonth()+1,this.fields.month)){if(t(g,this.fields.hour)){if(this._dstEnd===g&&!e){this._dstEnd=null,this._applyTimezoneShift(a,"add","Hour");continue}}else{if(this._dstStart!==g){this._dstStart=null,this._applyTimezoneShift(a,o,"Hour");continue}if(!t(g-1,this.fields.hour)){a[o+"Hour"]();continue}}if(t(a.getMinutes(),this.fields.minute))if(t(a.getSeconds(),this.fields.second)){if(l!==a.getTime())break;"add"===o||0===a.getMilliseconds()?this._applyTimezoneShift(a,o,"Second"):a.setMilliseconds(0)}else this._applyTimezoneShift(a,o,"Second");else this._applyTimezoneShift(a,o,"Minute")}else this._applyTimezoneShift(a,o,"Month");else this._applyTimezoneShift(a,o,"Day");else this._applyTimezoneShift(a,o,"Day");else this._applyTimezoneShift(a,o,"Day")}if(h>=1e4)throw new Error("Invalid expression, loop limit exceeded");return this._currentDate=new n(a,this._tz),this._hasIterated=!0,a},s.prototype.next=function(){var e=this._findSchedule();return this._isIterator?{value:e,done:!this.hasNext()}:e},s.prototype.prev=function(){var e=this._findSchedule(!0);return this._isIterator?{value:e,done:!this.hasPrev()}:e},s.prototype.hasNext=function(){var e=this._currentDate,t=this._hasIterated;try{return this._findSchedule(),!0}catch(e){return!1}finally{this._currentDate=e,this._hasIterated=t}},s.prototype.hasPrev=function(){var e=this._currentDate,t=this._hasIterated;try{return this._findSchedule(!0),!0}catch(e){return!1}finally{this._currentDate=e,this._hasIterated=t}},s.prototype.iterate=function(e,t){var r=[];if(e>=0)for(var n=0,i=e;n<i;n++)try{var s=this.next();r.push(s),t&&t(s,n)}catch(e){break}else for(n=0,i=e;n>i;n--)try{s=this.prev();r.push(s),t&&t(s,n)}catch(e){break}return r},s.prototype.reset=function(e){this._currentDate=new n(e||this._options.currentDate)},s.prototype.stringify=function(e){for(var t=[],r=e?0:1,n=s.map.length;r<n;++r){var o=s.map[r],a=this.fields[o],u=s.constraints[r];t.push(i(a,u.min,u.max))}return t.join(" ")},s.parse=function(e,t){var r=this;function i(e,t){t||(t={}),void 0===t.currentDate&&(t.currentDate=new n(void 0,r._tz)),s.predefined[e]&&(e=s.predefined[e]);var i=[],o=(e+"").trim().split(/\s+/);if(o.length>6)throw new Error("Invalid cron expression");for(var a=s.map.length-o.length,u=0,c=s.map.length;u<c;++u){var l=s.map[u],h=o[o.length>c?u:u-a];if(u<a||!h)i.push(s._parseField(l,s.parseDefaults[u],s.constraints[u]));else{var d="dayOfWeek"===l?m(h):h;i.push(s._parseField(l,d,s.constraints[u]))}}var f={};for(u=0,c=s.map.length;u<c;u++){f[s.map[u]]=i[u]}var p=s._handleMaxDaysInMonth(f);return f.dayOfMonth=p||f.dayOfMonth,new s(f,t);function m(e){var r=e.split("#");if(r.length>1){var n=+r[r.length-1];if(/,/.test(e))throw new Error("Constraint error, invalid dayOfWeek `#` and `,` special characters are incompatible");if(/\//.test(e))throw new Error("Constraint error, invalid dayOfWeek `#` and `/` special characters are incompatible");if(/-/.test(e))throw new Error("Constraint error, invalid dayOfWeek `#` and `-` special characters are incompatible");if(r.length>2||Number.isNaN(n)||n<1||n>5)throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return t.nthDayOfWeek=n,r[0]}return e}}return"function"==typeof t&&(t={}),i(e,t)},s.fieldsToExpression=function(e,t){function r(e,t,r){if(!t)throw new Error("Validation error, Field "+e+" is missing");if(0===t.length)throw new Error("Validation error, Field "+e+" contains no values");for(var n=0,i=t.length;n<i;n++){var o=t[n];if(!s._isValidConstraintChar(r,o)&&("number"!=typeof o||Number.isNaN(o)||o<r.min||o>r.max))throw new Error("Constraint error, got value "+o+" expected range "+r.min+"-"+r.max)}}for(var n={},i=0,o=s.map.length;i<o;++i){var a=s.map[i],u=e[a];r(a,u,s.constraints[i]);for(var c=[],l=-1;++l<u.length;)c[l]=u[l];if((u=c.sort(s._sortCompareFn).filter((function(e,t,r){return!t||e!==r[t-1]}))).length!==c.length)throw new Error("Validation error, Field "+a+" contains duplicate values");n[a]=u}var h=s._handleMaxDaysInMonth(n);return n.dayOfMonth=h||n.dayOfMonth,new s(n,t||{})},e.exports=s},7156:e=>{"use strict";function t(e){return{start:e,count:1}}function r(e,t){e.end=t,e.step=t-e.start,e.count=2}function n(e,r,n){r&&(2===r.count?(e.push(t(r.start)),e.push(t(r.end))):e.push(r)),n&&e.push(n)}e.exports=function(e){for(var i=[],s=void 0,o=0;o<e.length;o++){var a=e[o];"number"!=typeof a?(n(i,s,t(a)),s=void 0):s?1===s.count?r(s,a):s.step===a-s.end?(s.count++,s.end=a):2===s.count?(i.push(t(s.start)),r(s=t(s.end),a)):(n(i,s),s=t(a)):s=t(a)}return n(i,s),i}},9661:(e,t,r)=>{"use strict";var n=r(7156);e.exports=function(e,t,r){var i=n(e);if(1===i.length){var s=i[0];if(1===(c=s.step)&&s.start===t&&s.end===r)return"*";if(1!==c&&s.start===t&&s.end===r-c+1)return"*/"+c}for(var o=[],a=0,u=i.length;a<u;++a){var c,l=i[a];if(1===l.count)o.push(l.start);else 1===(c=l.step)?o.push(l.start+"-"+l.end):l.end===r-c+1?o.push(l.start+"/"+c):o.push(l.start+"-"+l.end+"/"+c)}return o.join(",")}},3601:(e,t,r)=>{"use strict";var n=r(2249);function i(){}i._parseEntry=function(e){var t=e.split(" ");if(6===t.length)return{interval:n.parse(e)};if(t.length>6)return{interval:n.parse(t.slice(0,6).join(" ")),command:t.slice(6,t.length)};throw new Error("Invalid entry: "+e)},i.parseExpression=function(e,t){return n.parse(e,t)},i.fieldsToExpression=function(e,t){return n.fieldsToExpression(e,t)},i.parseString=function(e){for(var t=e.split("\n"),r={variables:{},expressions:[],errors:{}},n=0,s=t.length;n<s;n++){var o=null,a=t[n].trim();if(a.length>0){if(a.match(/^#/))continue;if(o=a.match(/^(.*)=(.*)$/))r.variables[o[1]]=o[2];else{var u=null;try{u=i._parseEntry("0 "+a),r.expressions.push(u.interval)}catch(e){r.errors[a]=e}}}}return r},i.parseFile=function(e,t){r(6831).readFile(e,(function(e,r){if(!e)return t(null,i.parseString(r.toString()));t(e)}))},e.exports=i},5881:e=>{var t=1e3,r=60*t,n=60*r,i=24*n,s=7*i,o=365.25*i;function a(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,u){u=u||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\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(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(e);if("number"===c&&isFinite(e))return u.long?function(e){var s=Math.abs(e);if(s>=i)return a(e,s,i,"day");if(s>=n)return a(e,s,n,"hour");if(s>=r)return a(e,s,r,"minute");if(s>=t)return a(e,s,t,"second");return e+" ms"}(e):function(e){var s=Math.abs(e);if(s>=i)return Math.round(e/i)+"d";if(s>=n)return Math.round(e/n)+"h";if(s>=r)return Math.round(e/r)+"m";if(s>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5130:(e,t,r)=>{var n=r(4406);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG);return e},t.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+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.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`."))}})(),t.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"],t.log=console.debug||console.log||(()=>{}),e.exports=r(7123)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7123:(e,t,r)=>{e.exports=function(e){function t(e){let r,i,s,o=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),s=i-(r||i);n.diff=s,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";o++;const s=t.formatters[i];if("function"==typeof s){const t=e[o];r=s.call(n,t),e.splice(o,1),o--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(5881),t.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(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},4924:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BotInfo:()=>u,BrowserInfo:()=>s,NodeInfo:()=>o,ReactNativeInfo:()=>c,SearchBotDeviceInfo:()=>a,browserName:()=>g,detect:()=>p,detectOS:()=>b,getNodeVersion:()=>w,parseUserAgent:()=>y});var n=r(4406),i=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},s=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"},o=function(e){this.version=e,this.type="node",this.name="node",this.os=n.platform},a=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"},u=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},c=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},l=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,h=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?y(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new c:"undefined"!=typeof navigator?y(navigator.userAgent):w()}function m(e){return""!==e&&d.reduce((function(t,r){var n=r[0],i=r[1];if(t)return t;var s=i.exec(e);return!!s&&[n,s]}),!1)}function g(e){var t=m(e);return t?t[0]:null}function y(e){var t=m(e);if(!t)return null;var r=t[0],n=t[1];if("searchbot"===r)return new u;var o=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);o?o.length<h&&(o=i(i([],o,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(h-o.length),!0)):o=[];var c=o.join("."),d=b(e),f=l.exec(e);return f&&f[1]?new a(r,c,d,f[1]):new s(r,c,d)}function b(e){for(var t=0,r=f.length;t<r;t++){var n=f[t],i=n[0];if(n[1].exec(e))return i}return null}function w(){return void 0!==n&&n.version?new o(n.version.slice(1)):null}},8797:(e,t,r)=>{var n=r(4406),i=r(9928),s=function(){},o=function(e,t,r){if("function"==typeof t)return o(e,null,t);t||(t={}),r=i(r||s);var a=e._writableState,u=e._readableState,c=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,h=!1,d=function(){e.writable||f()},f=function(){l=!1,c||r.call(e)},p=function(){c=!1,l||r.call(e)},m=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},g=function(t){r.call(e,t)},y=function(){n.nextTick(b)},b=function(){if(!h)return(!c||u&&u.ended&&!u.destroyed)&&(!l||a&&a.ended&&!a.destroyed)?void 0:r.call(e,new Error("premature close"))},w=function(){e.req.on("finish",f)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?l&&!a&&(e.on("end",d),e.on("close",d)):(e.on("complete",f),e.on("abort",y),e.req?w():e.on("request",w)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",m),e.on("end",p),e.on("finish",f),!1!==t.error&&e.on("error",g),e.on("close",y),function(){h=!0,e.removeListener("complete",f),e.removeListener("abort",y),e.removeListener("request",w),e.req&&e.req.removeListener("finish",f),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",f),e.removeListener("exit",m),e.removeListener("end",p),e.removeListener("error",g),e.removeListener("close",y)}};e.exports=o},4723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const n=r(6920);class i 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 nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),s,2)}}t.EthereumRpcError=i;function s(e,t){if("[Circular]"!==t)return t}t.EthereumProviderError=class extends i{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)}}},4792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.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}},t.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."}}},8159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const n=r(4723),i=r(894),s=r(4792);function o(e,t){const[r,s]=u(t);return new n.EthereumRpcError(e,r||i.getMessageFromCode(e),s)}function a(e,t){const[r,s]=u(t);return new n.EthereumProviderError(e,r||i.getMessageFromCode(e),s)}function u(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||void 0,r]}}return[]}t.ethErrors={rpc:{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)},provider:{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:i}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,i)}}}},8094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const n=r(4723);Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const i=r(894);Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const s=r(8159);Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return s.ethErrors}});const o=r(4792);Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(4792),i=r(4723),s=n.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",a={code:s,message:u(s)};function u(e,r=o){if(Number.isInteger(e)){const r=e.toString();if(d(n.errorValues,r))return n.errorValues[r].message;if(l(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function c(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!l(e)}function l(e){return e>=-32099&&e<=-32e3}function h(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=u,t.isValidCode=c,t.serializeError=function(e,{fallbackError:t=a,shouldIncludeStack:r=!1}={}){var n,s;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();const o={};if(e&&"object"==typeof e&&!Array.isArray(e)&&d(e,"code")&&c(e.code)){const t=e;o.code=t.code,t.message&&"string"==typeof t.message?(o.message=t.message,d(t,"data")&&(o.data=t.data)):(o.message=u(o.code),o.data={originalError:h(e)})}else{o.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;o.message=r&&"string"==typeof r?r:t.message,o.data={originalError:h(e)}}const l=null===(s=e)||void 0===s?void 0:s.stack;return r&&e&&l&&"string"==typeof l&&(o.stack=l),o}},2699:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,s),n(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,s,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,r)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,s,o,c;if(a(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),o=s[t]),void 0===o)o=s[t]=r,++e._eventsCount;else if("function"==typeof o?o=s[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){n.once&&e.removeEventListener(t,i),r(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=s[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,l=p(u,c);for(r=0;r<c;++r)n(l[r],this,t)}return!0},s.prototype.addListener=function(e,t){return c(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return c(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,s,o;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){o=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(i=s[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},3274:(e,t,r)=>{"use strict";var n=r(8834).Buffer;const i=r(4851);e.exports=class extends i.Duplex{constructor(e){super({objectMode:!0}),this._port=e,this._port.onMessage.addListener((e=>this._onMessage(e))),this._port.onDisconnect.addListener((()=>this._onDisconnect()))}_onMessage(e){if(n.isBuffer(e)){const t=n.from(e);this.push(t)}else this.push(e)}_onDisconnect(){this.destroy()}_read(){}_write(e,t,r){try{if(n.isBuffer(e)){const t=e.toJSON();t._isBuffer=!0,this._port.postMessage(t)}else this._port.postMessage(e)}catch(e){return r(new Error("PortDuplexStream - disconnected"))}return r()}}},5695:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},s={key:n,value:e[n]};return r(i,s)}}),s=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,o;if(Array.isArray(t)){for(o="[",r=0;r<t.length;r++)r&&(o+=","),o+=e(t[r])||"null";return o+"]"}if(null===t)return"null";if(-1!==s.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var a=s.push(t)-1,u=Object.keys(t).sort(i&&i(t));for(o="",r=0;r<u.length;r++){var c=u[r],l=e(t[c]);l&&(o&&(o+=","),o+=JSON.stringify(c)+":"+l)}return s.splice(a,1),"{"+o+"}"}}(e)}},6920:e=>{e.exports=n,n.default=n,n.stable=o,n.stableStringify=o;var t=[],r=[];function n(e,n,s){var o;for(i(e,"",[],void 0),o=0===r.length?JSON.stringify(e,n,s):JSON.stringify(e,u(n),s);0!==t.length;){var a=t.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}return o}function i(e,n,s,o){var a;if("object"==typeof e&&null!==e){for(a=0;a<s.length;a++)if(s[a]===e){var u=Object.getOwnPropertyDescriptor(o,n);return void(void 0!==u.get?u.configurable?(Object.defineProperty(o,n,{value:"[Circular]"}),t.push([o,n,e,u])):r.push([e,n]):(o[n]="[Circular]",t.push([o,n,e])))}if(s.push(e),Array.isArray(e))for(a=0;a<e.length;a++)i(e[a],a,s,e);else{var c=Object.keys(e);for(a=0;a<c.length;a++){var l=c[a];i(e[l],l,s,e)}}s.pop()}}function s(e,t){return e<t?-1:e>t?1:0}function o(e,n,i){var s,o=a(e,"",[],void 0)||e;for(s=0===r.length?JSON.stringify(o,n,i):JSON.stringify(o,u(n),i);0!==t.length;){var c=t.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}return s}function a(e,n,i,o){var u;if("object"==typeof e&&null!==e){for(u=0;u<i.length;u++)if(i[u]===e){var c=Object.getOwnPropertyDescriptor(o,n);return void(void 0!==c.get?c.configurable?(Object.defineProperty(o,n,{value:"[Circular]"}),t.push([o,n,e,c])):r.push([e,n]):(o[n]="[Circular]",t.push([o,n,e])))}if("function"==typeof e.toJSON)return;if(i.push(e),Array.isArray(e))for(u=0;u<e.length;u++)a(e[u],u,i,e);else{var l={},h=Object.keys(e).sort(s);for(u=0;u<h.length;u++){var d=h[u];a(e[d],d,i,e),l[d]=e[d]}if(void 0===o)return l;t.push([o,n,e]),o[n]=l}i.pop()}}function u(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(r.length>0)for(var i=0;i<r.length;i++){var s=r[i];if(s[1]===t&&s[0]===n){n="[Circular]",r.splice(i,1);break}}return e.call(this,t,n)}}},2333:(e,t)=>{t.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,h=r?i-1:0,d=r?-1:1,f=e[t+h];for(h+=d,s=f&(1<<-l)-1,f>>=-l,l+=a;l>0;s=256*s+e[t+h],h+=d,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=n;l>0;o=256*o+e[t+h],h+=d,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),s-=c}return(f?-1:1)*o*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var o,a,u,c=8*s-i-1,l=(1<<c)-1,h=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(o++,u/=2),o+h>=l?(a=0,o=l):o+h>=1?(a=(t*u-1)*Math.pow(2,i),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+f]=255&a,f+=p,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[r+f]=255&o,f+=p,o/=256,c-=8);e[r+f-p]|=128*m}},1285:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},8607:e=>{"use strict";const t=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform&&"object"==typeof e._transformState,e.exports=t},7906:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},2539:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcEngine=void 0;const i=n(r(3795)),s=r(8094);class o extends i.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[i,s,a]=await o._runAllMiddleware(e,t,this._middleware);return s?(await o._runReturnHandlers(a),n(i)):r((async e=>{try{await o._runReturnHandlers(a)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,r)=>{t(r)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new s.EthereumRpcError(s.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:void 0,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const r=new s.EthereumRpcError(s.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=Object.assign({},e),n={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,n)}catch(e){i=e}return i&&(delete n.result,n.error||(n.error=s.serializeError(i))),t(i,n)}async _processRequest(e,t){const[r,n,i]=await o._runAllMiddleware(e,t,this._middleware);if(o._checkForCompletion(e,t,n),await o._runReturnHandlers(i),r)throw r}static async _runAllMiddleware(e,t,r){const n=[];let i=null,s=!1;for(const a of r)if([i,s]=await o._runMiddleware(e,t,a,n),s)break;return[i,s,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((i=>{const o=e=>{const r=e||t.error;r&&(t.error=s.serializeError(r)),i([r,!0])},u=r=>{t.error?o(t.error):(r&&("function"!=typeof r&&o(new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${a(e)}`,{request:e})),n.push(r)),i([null,!1]))};try{r(e,t,u,o)}catch(e){o(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${a(e)}`,{request:e});if(!r)throw new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${a(e)}`,{request:e})}}function a(e){return JSON.stringify(e,null,2)}t.JsonRpcEngine=o},7573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAsyncMiddleware=void 0,t.createAsyncMiddleware=function(e){return async(t,r,n,i)=>{let s;const o=new Promise((e=>{s=e}));let a=null,u=!1;const c=async()=>{u=!0,n((e=>{a=e,s()})),await o};try{await e(t,r,c),u?(await o,a(null)):i(null)}catch(e){a?a(e):i(e)}}}},9141:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createScaffoldMiddleware=void 0,t.createScaffoldMiddleware=function(e){return(t,r,n,i)=>{const s=e[t.method];return void 0===s?n():"function"==typeof s?s(t,r,n,i):(r.result=s,i())}}},5104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUniqueId=void 0;const r=4294967295;let n=Math.floor(Math.random()*r);t.getUniqueId=function(){return n=(n+1)%r,n}},169:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createIdRemapMiddleware=void 0;const n=r(5104);t.createIdRemapMiddleware=function(){return(e,t,r,i)=>{const s=e.id,o=n.getUniqueId();e.id=o,t.id=o,r((r=>{e.id=s,t.id=s,r()}))}}},1280:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=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(t,"__esModule",{value:!0}),i(r(169),t),i(r(7573),t),i(r(9141),t),i(r(5104),t),i(r(2539),t),i(r(1759),t)},1759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMiddleware=void 0;const n=r(2539);t.mergeMiddleware=function(e){const t=new n.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}},2408:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7525);t.default=function(e){if(!e||!e.engine)throw new Error("Missing engine parameter!");const{engine:t}=e,r=new n.Duplex({objectMode:!0,read:()=>{},write:function(e,n,i){t.handle(e,((e,t)=>{r.push(t)})),i()}});return t.on&&t.on("notification",(e=>{r.push(e)})),r}},3603:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(3795)),s=r(7525);t.default=function(e={}){const t={},r=new s.Duplex({objectMode:!0,read:()=>{},write:function(r,i,s){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=t[e.id];if(!r)return void console.warn(`StreamMiddleware - Unknown response id "${e.id}"`);delete t[e.id],Object.assign(r.res,e),setTimeout(r.end)}(r)}catch(e){a=e}s(a)}}),n=new i.default;return{events:n,middleware:(e,r,n,i)=>{o(e),t[e.id]={req:e,res:r,next:n,end:i}},stream:r};function o(e){r.push(e)}}},1384:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createStreamMiddleware=t.createEngineStream=void 0;const i=n(r(2408));t.createEngineStream=i.default;const s=n(r(3603));t.createStreamMiddleware=s.default},8085:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{}class n extends r{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class i extends r{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class s extends r{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class o extends r{}class a extends r{constructor(e){super(`Invalid unit ${e}`)}}class u extends r{}class c extends r{constructor(){super("Zone is an abstract class")}}const l="numeric",h="short",d="long",f={year:l,month:l,day:l},p={year:l,month:h,day:l},m={year:l,month:h,day:l,weekday:h},g={year:l,month:d,day:l},y={year:l,month:d,day:l,weekday:d},b={hour:l,minute:l},w={hour:l,minute:l,second:l},v={hour:l,minute:l,second:l,timeZoneName:h},S={hour:l,minute:l,second:l,timeZoneName:d},E={hour:l,minute:l,hourCycle:"h23"},_={hour:l,minute:l,second:l,hourCycle:"h23"},R={hour:l,minute:l,second:l,hourCycle:"h23",timeZoneName:h},O={hour:l,minute:l,second:l,hourCycle:"h23",timeZoneName:d},M={year:l,month:l,day:l,hour:l,minute:l},x={year:l,month:l,day:l,hour:l,minute:l,second:l},T={year:l,month:h,day:l,hour:l,minute:l},C={year:l,month:h,day:l,hour:l,minute:l,second:l},I={year:l,month:h,day:l,weekday:h,hour:l,minute:l},A={year:l,month:d,day:l,hour:l,minute:l,timeZoneName:h},k={year:l,month:d,day:l,hour:l,minute:l,second:l,timeZoneName:h},N={year:l,month:d,day:l,weekday:d,hour:l,minute:l,timeZoneName:d},j={year:l,month:d,day:l,weekday:d,hour:l,minute:l,second:l,timeZoneName:d};function P(e){return void 0===e}function L(e){return"number"==typeof e}function D(e){return"number"==typeof e&&e%1==0}function $(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function B(e,t,r){if(0!==e.length)return e.reduce(((e,n)=>{const i=[t(n),n];return e&&r(e[0],i[0])===e[0]?e:i}),null)[1]}function F(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U(e,t,r){return D(e)&&e>=t&&e<=r}function V(e,t=2){let r;return r=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),r}function q(e){return P(e)||null===e||""===e?void 0:parseInt(e,10)}function W(e){return P(e)||null===e||""===e?void 0:parseFloat(e)}function z(e){if(!P(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function J(e,t,r=!1){const n=10**t;return(r?Math.trunc:Math.round)(e*n)/n}function H(e){return e%4==0&&(e%100!=0||e%400==0)}function G(e){return H(e)?366:365}function Z(e,t){const r=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===r?H(e+(t-r)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function Y(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function X(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,n=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return 4===t||3===n?53:52}function K(e){return e>99?e:e>60?1900+e:2e3+e}function Q(e,t,r,n=null){const i=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(s.timeZone=n);const o={timeZoneName:t,...s},a=new Intl.DateTimeFormat(r,o).formatToParts(i).find((e=>"timezonename"===e.type.toLowerCase()));return a?a.value:null}function ee(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const n=parseInt(t,10)||0;return 60*r+(r<0||Object.is(r,-0)?-n:n)}function te(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new u(`Invalid unit value ${e}`);return t}function re(e,t){const r={};for(const n in e)if(F(e,n)){const i=e[n];if(null==i)continue;r[t(n)]=te(i)}return r}function ne(e,t){const r=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${V(r,2)}:${V(n,2)}`;case"narrow":return`${i}${r}${n>0?`:${n}`:""}`;case"techie":return`${i}${V(r,2)}${V(n,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ie(e){return function(e,t){return t.reduce(((t,r)=>(t[r]=e[r],t)),{})}(e,["hour","minute","second","millisecond"])}const se=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,oe=["January","February","March","April","May","June","July","August","September","October","November","December"],ae=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ue=["J","F","M","A","M","J","J","A","S","O","N","D"];function ce(e){switch(e){case"narrow":return[...ue];case"short":return[...ae];case"long":return[...oe];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const le=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],he=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],de=["M","T","W","T","F","S","S"];function fe(e){switch(e){case"narrow":return[...de];case"short":return[...he];case"long":return[...le];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const pe=["AM","PM"],me=["Before Christ","Anno Domini"],ge=["BC","AD"],ye=["B","A"];function be(e){switch(e){case"narrow":return[...ye];case"short":return[...ge];case"long":return[...me];default:return null}}function we(e,t){let r="";for(const n of e)n.literal?r+=n.val:r+=t(n.val);return r}const ve={D:f,DD:p,DDD:g,DDDD:y,t:b,tt:w,ttt:v,tttt:S,T:E,TT:_,TTT:R,TTTT:O,f:M,ff:T,fff:A,ffff:N,F:x,FF:C,FFF:k,FFFF:j};class Se{static create(e,t={}){return new Se(e,t)}static parseFormat(e){let t=null,r="",n=!1;const i=[];for(let s=0;s<e.length;s++){const o=e.charAt(s);"'"===o?(r.length>0&&i.push({literal:n,val:r}),t=null,r="",n=!n):n||o===t?r+=o:(r.length>0&&i.push({literal:!1,val:r}),r=o,t=o)}return r.length>0&&i.push({literal:n,val:r}),i}static macroTokenToFormatOpts(e){return ve[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return V(e,t);const r={...this.opts};return t>0&&(r.padTo=t),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const r="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,r)=>this.loc.extract(e,t,r),s=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",o=()=>r?function(e){return pe[e.hour<12?0:1]}(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(t,n)=>r?function(e,t){return ce(t)[e.month-1]}(e,t):i(n?{month:t}:{month:t,day:"numeric"},"month"),u=(t,n)=>r?function(e,t){return fe(t)[e.weekday-1]}(e,t):i(n?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),c=t=>{const r=Se.macroTokenToFormatOpts(t);return r?this.formatWithSystemDefault(e,r):t},l=t=>r?function(e,t){return be(t)[e.year<0?0:1]}(e,t):i({era:t},"era");return we(Se.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return n?i({day:"numeric"},"day"):this.num(e.day);case"dd":return n?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return n?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return n?i({month:"numeric"},"month"):this.num(e.month);case"MM":return n?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return n?i({year:"numeric"},"year"):this.num(e.year);case"yy":return n?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return l("short");case"GG":return l("long");case"GGGGG":return l("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return c(t)}}))}formatDurationFromString(e,t){const r=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=Se.parseFormat(t),i=n.reduce(((e,{literal:t,val:r})=>t?e:e.concat(r)),[]);return we(n,(e=>t=>{const n=r(t);return n?this.num(e.get(n),t.length):t})(e.shiftTo(...i.map(r).filter((e=>e)))))}}class Ee{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class _e{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}}let Re=null;class Oe extends _e{static get instance(){return null===Re&&(Re=new Oe),Re}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Q(e,t,r)}formatOffset(e,t){return ne(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let Me={};const xe={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let Te={};class Ce extends _e{static create(e){return Te[e]||(Te[e]=new Ce(e)),Te[e]}static resetCache(){Te={},Me={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=Ce.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Q(e,t,r,this.name)}formatOffset(e,t){return ne(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const r=(n=this.name,Me[n]||(Me[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Me[n]);var n;let[i,s,o,a,u,c,l]=r.formatToParts?function(e,t){const r=e.formatToParts(t),n=[];for(let e=0;e<r.length;e++){const{type:t,value:i}=r[e],s=xe[t];"era"===t?n[s]=i:P(s)||(n[s]=parseInt(i,10))}return n}(r,t):function(e,t){const r=e.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,i,s,o,a,u,c,l]=n;return[o,i,s,a,u,c,l]}(r,t);"BC"===a&&(i=1-Math.abs(i));let h=+t;const d=h%1e3;return h-=d>=0?d:1e3+d,(Y({year:i,month:s,day:o,hour:24===u?0:u,minute:c,second:l,millisecond:0})-h)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let Ie=null;class Ae extends _e{static get utcInstance(){return null===Ie&&(Ie=new Ae(0)),Ie}static instance(e){return 0===e?Ae.utcInstance:new Ae(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Ae(ee(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${ne(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${ne(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ne(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class ke extends _e{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ne(e,t){if(P(e)||null===e)return t;if(e instanceof _e)return e;if("string"==typeof e){const r=e.toLowerCase();return"local"===r||"system"===r?t:"utc"===r||"gmt"===r?Ae.utcInstance:Ae.parseSpecifier(r)||Ce.create(e)}return L(e)?Ae.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new ke(e)}let je,Pe=()=>Date.now(),Le="system",De=null,$e=null,Be=null;class Fe{static get now(){return Pe}static set now(e){Pe=e}static set defaultZone(e){Le=e}static get defaultZone(){return Ne(Le,Oe.instance)}static get defaultLocale(){return De}static set defaultLocale(e){De=e}static get defaultNumberingSystem(){return $e}static set defaultNumberingSystem(e){$e=e}static get defaultOutputCalendar(){return Be}static set defaultOutputCalendar(e){Be=e}static get throwOnInvalid(){return je}static set throwOnInvalid(e){je=e}static resetCaches(){Xe.resetCache(),Ce.resetCache()}}let Ue={};let Ve={};function qe(e,t={}){const r=JSON.stringify([e,t]);let n=Ve[r];return n||(n=new Intl.DateTimeFormat(e,t),Ve[r]=n),n}let We={};let ze={};let Je=null;function He(e,t,r,n,i){const s=e.listingMode(r);return"error"===s?null:"en"===s?n(t):i(t)}class Ge{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:n,floor:i,...s}=r;if(!t||Object.keys(s).length>0){const t={useGrouping:!1,...r};r.padTo>0&&(t.minimumIntegerDigits=r.padTo),this.inf=function(e,t={}){const r=JSON.stringify([e,t]);let n=We[r];return n||(n=new Intl.NumberFormat(e,t),We[r]=n),n}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return V(this.floor?Math.floor(e):J(e,3),this.padTo)}}class Ze{constructor(e,t,r){let n;if(this.opts=r,e.zone.isUniversal){const t=e.offset/60*-1,i=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&Ce.create(i).valid?(n=i,this.dt=e):(n="UTC",r.timeZoneName?this.dt=e:this.dt=0===e.offset?e:Xr.fromMillis(e.ts+60*e.offset*1e3))}else"system"===e.zone.type?this.dt=e:(this.dt=e,n=e.zone.name);const i={...this.opts};n&&(i.timeZone=n),this.dtf=qe(t,i)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class Ye{constructor(e,t,r){this.opts={style:"long",...r},!t&&$()&&(this.rtf=function(e,t={}){const{base:r,...n}=t,i=JSON.stringify([e,n]);let s=ze[i];return s||(s=new Intl.RelativeTimeFormat(e,t),ze[i]=s),s}(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,r="always",n=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===r&&s){const r="days"===e;switch(t){case 1:return r?"tomorrow":`next ${i[e][0]}`;case-1:return r?"yesterday":`last ${i[e][0]}`;case 0:return r?"today":`this ${i[e][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),u=1===a,c=i[e],l=n?u?c[1]:c[2]||c[1]:u?i[e][0]:e;return o?`${a} ${l} ago`:`in ${a} ${l}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Xe{static fromOpts(e){return Xe.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,r,n=!1){const i=e||Fe.defaultLocale,s=i||(n?"en-US":Je||(Je=(new Intl.DateTimeFormat).resolvedOptions().locale,Je)),o=t||Fe.defaultNumberingSystem,a=r||Fe.defaultOutputCalendar;return new Xe(s,o,a,i)}static resetCache(){Je=null,Ve={},We={},ze={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:r}={}){return Xe.create(e,t,r)}constructor(e,t,r,n){const[i,s,o]=function(e){const t=e.indexOf("-u-");if(-1===t)return[e];{let r;const n=e.substring(0,t);try{r=qe(e).resolvedOptions()}catch(e){r=qe(n).resolvedOptions()}const{numberingSystem:i,calendar:s}=r;return[n,i,s]}}(e);this.locale=i,this.numberingSystem=t||s||null,this.outputCalendar=r||o||null,this.intl=function(e,t,r){return r||t?(e+="-u",r&&(e+=`-ca-${r}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?Xe.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,r=!0){return He(this,e,r,ce,(()=>{const r=t?{month:e,day:"numeric"}:{month:e},n=t?"format":"standalone";return this.monthsCache[n][e]||(this.monthsCache[n][e]=function(e){const t=[];for(let r=1;r<=12;r++){const n=Xr.utc(2016,r,1);t.push(e(n))}return t}((e=>this.extract(e,r,"month")))),this.monthsCache[n][e]}))}weekdays(e,t=!1,r=!0){return He(this,e,r,fe,(()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=t?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=function(e){const t=[];for(let r=1;r<=7;r++){const n=Xr.utc(2016,11,13+r);t.push(e(n))}return t}((e=>this.extract(e,r,"weekday")))),this.weekdaysCache[n][e]}))}meridiems(e=!0){return He(this,void 0,e,(()=>pe),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Xr.utc(2016,11,13,9),Xr.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e,t=!0){return He(this,e,t,be,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Xr.utc(-40,1,1),Xr.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,r){const n=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===r));return n?n.value:null}numberFormatter(e={}){return new Ge(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Ze(e,this.intl,t)}relFormatter(e={}){return new Ye(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const r=JSON.stringify([e,t]);let n=Ue[r];return n||(n=new Intl.ListFormat(e,t),Ue[r]=n),n}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Ke(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function Qe(...e){return t=>e.reduce((([e,r,n],i)=>{const[s,o,a]=i(t,n);return[{...e,...s},o||r,a]}),[{},null,1]).slice(0,2)}function et(e,...t){if(null==e)return[null,null];for(const[r,n]of t){const t=r.exec(e);if(t)return n(t)}return[null,null]}function tt(...e){return(t,r)=>{const n={};let i;for(i=0;i<e.length;i++)n[e[i]]=q(t[r+i]);return[n,null,r+i]}}const rt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,nt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,it=RegExp(`${nt.source}${`(?:${rt.source}?(?:\\[(${se.source})\\])?)?`}`),st=RegExp(`(?:T${it.source})?`),ot=tt("weekYear","weekNumber","weekDay"),at=tt("year","ordinal"),ut=RegExp(`${nt.source} ?(?:${rt.source}|(${se.source}))?`),ct=RegExp(`(?: ${ut.source})?`);function lt(e,t,r){const n=e[t];return P(n)?r:q(n)}function ht(e,t){return[{hours:lt(e,t,0),minutes:lt(e,t+1,0),seconds:lt(e,t+2,0),milliseconds:z(e[t+3])},null,t+4]}function dt(e,t){const r=!e[t]&&!e[t+1],n=ee(e[t+1],e[t+2]);return[{},r?null:Ae.instance(n),t+3]}function ft(e,t){return[{},e[t]?Ce.create(e[t]):null,t+1]}const pt=RegExp(`^T?${nt.source}$`),mt=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function gt(e){const[t,r,n,i,s,o,a,u,c]=e,l="-"===t[0],h=u&&"-"===u[0],d=(e,t=!1)=>void 0!==e&&(t||e&&l)?-e:e;return[{years:d(W(r)),months:d(W(n)),weeks:d(W(i)),days:d(W(s)),hours:d(W(o)),minutes:d(W(a)),seconds:d(W(u),"-0"===u),milliseconds:d(z(c),h)}]}const yt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function bt(e,t,r,n,i,s,o){const a={year:2===t.length?K(q(t)):q(t),month:ae.indexOf(r)+1,day:q(n),hour:q(i),minute:q(s)};return o&&(a.second=q(o)),e&&(a.weekday=e.length>3?le.indexOf(e)+1:he.indexOf(e)+1),a}const wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function vt(e){const[,t,r,n,i,s,o,a,u,c,l,h]=e,d=bt(t,i,n,r,s,o,a);let f;return f=u?yt[u]:c?0:ee(l,h),[d,new Ae(f)]}const St=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Et=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,_t=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Rt(e){const[,t,r,n,i,s,o,a]=e;return[bt(t,i,n,r,s,o,a),Ae.utcInstance]}function Ot(e){const[,t,r,n,i,s,o,a]=e;return[bt(t,a,r,n,i,s,o),Ae.utcInstance]}const Mt=Ke(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,st),xt=Ke(/(\d{4})-?W(\d\d)(?:-?(\d))?/,st),Tt=Ke(/(\d{4})-?(\d{3})/,st),Ct=Ke(it),It=Qe((function(e,t){return[{year:lt(e,t),month:lt(e,t+1,1),day:lt(e,t+2,1)},null,t+3]}),ht,dt,ft),At=Qe(ot,ht,dt,ft),kt=Qe(at,ht,dt,ft),Nt=Qe(ht,dt,ft);const jt=Qe(ht);const Pt=Ke(/(\d{4})-(\d\d)-(\d\d)/,ct),Lt=Ke(ut),Dt=Qe(ht,dt,ft);const $t={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Bt={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...$t},Ft=365.2425,Ut=30.436875,Vt={years:{quarters:4,months:12,weeks:52.1775,days:Ft,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:Ut,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...$t},qt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Wt=qt.slice(0).reverse();function zt(e,t,r=!1){const n={values:r?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Ht(n)}function Jt(e,t,r,n,i){const s=e[i][r],o=t[r]/s,a=!(Math.sign(o)===Math.sign(n[i]))&&0!==n[i]&&Math.abs(o)<=1?function(e){return e<0?Math.floor(e):Math.ceil(e)}(o):Math.trunc(o);n[i]+=a,t[r]-=a*s}class Ht{constructor(e){const t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Xe.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Vt:Bt,this.isLuxonDuration=!0}static fromMillis(e,t){return Ht.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new u("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Ht({values:re(e,Ht.normalizeUnit),loc:Xe.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(L(e))return Ht.fromMillis(e);if(Ht.isDuration(e))return e;if("object"==typeof e)return Ht.fromObject(e);throw new u(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=function(e){return et(e,[mt,gt])}(e);return r?Ht.fromObject(r,t):Ht.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=function(e){return et(e,[pt,jt])}(e);return r?Ht.fromObject(r,t):Ht.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Duration is invalid");const r=e instanceof Ee?e:new Ee(e,t);if(Fe.throwOnInvalid)throw new s(r);return new Ht({invalid:r})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new a(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const r={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Se.create(this.loc,r).formatDurationFromString(this,e):"Invalid Duration"}toHuman(e={}){const t=qt.map((t=>{const r=this.values[t];return P(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(r)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=J(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const r=this.shiftTo("hours","minutes","seconds","milliseconds");let n="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===r.seconds&&0===r.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===r.milliseconds||(n+=".SSS"));let i=r.toFormat(n);return e.includePrefix&&(i="T"+i),i}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Ht.fromDurationLike(e),r={};for(const e of qt)(F(t.values,e)||F(this.values,e))&&(r[e]=t.get(e)+this.get(e));return zt(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=Ht.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=te(e(this.values[r],r));return zt(this,{values:t},!0)}get(e){return this[Ht.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return zt(this,{values:{...this.values,...re(e,Ht.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r}={}){const n={loc:this.loc.clone({locale:e,numberingSystem:t})};return r&&(n.conversionAccuracy=r),zt(this,n)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return function(e,t){Wt.reduce(((r,n)=>P(t[n])?r:(r&&Jt(e,t,r,t,n),n)),null)}(this.matrix,e),zt(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>Ht.normalizeUnit(e)));const t={},r={},n=this.toObject();let i;for(const s of qt)if(e.indexOf(s)>=0){i=s;let e=0;for(const t in r)e+=this.matrix[t][s]*r[t],r[t]=0;L(n[s])&&(e+=n[s]);const o=Math.trunc(e);t[s]=o,r[s]=(1e3*e-1e3*o)/1e3;for(const e in n)qt.indexOf(e)>qt.indexOf(s)&&Jt(this.matrix,n,e,t,s)}else L(n[s])&&(r[s]=n[s]);for(const e in r)0!==r[e]&&(t[i]+=e===i?r[e]:r[e]/this.matrix[i][e]);return zt(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return zt(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const n of qt)if(t=this.values[n],r=e.values[n],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1;var t,r;return!0}}const Gt="Invalid Interval";class Zt{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Interval is invalid");const r=e instanceof Ee?e:new Ee(e,t);if(Fe.throwOnInvalid)throw new i(r);return new Zt({invalid:r})}static fromDateTimes(e,t){const r=Kr(e),n=Kr(t),i=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?Zt.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:Zt.invalid("missing or invalid end"):Zt.invalid("missing or invalid start")}(r,n);return null==i?new Zt({start:r,end:n}):i}static after(e,t){const r=Ht.fromDurationLike(t),n=Kr(e);return Zt.fromDateTimes(n,n.plus(r))}static before(e,t){const r=Ht.fromDurationLike(t),n=Kr(e);return Zt.fromDateTimes(n.minus(r),n)}static fromISO(e,t){const[r,n]=(e||"").split("/",2);if(r&&n){let e,i,s,o;try{e=Xr.fromISO(r,t),i=e.isValid}catch(n){i=!1}try{s=Xr.fromISO(n,t),o=s.isValid}catch(n){o=!1}if(i&&o)return Zt.fromDateTimes(e,s);if(i){const r=Ht.fromISO(n,t);if(r.isValid)return Zt.after(e,r)}else if(o){const e=Ht.fromISO(r,t);if(e.isValid)return Zt.before(s,e)}}return Zt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds"){if(!this.isValid)return NaN;const t=this.start.startOf(e),r=this.end.startOf(e);return Math.floor(r.diff(t,e).get(e))+1}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?Zt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Kr).filter((e=>this.contains(e))).sort(),r=[];let{s:n}=this,i=0;for(;n<this.e;){const e=t[i]||this.e,s=+e>+this.e?this.e:e;r.push(Zt.fromDateTimes(n,s)),n=s,i+=1}return r}splitBy(e){const t=Ht.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let r,{s:n}=this,i=1;const s=[];for(;n<this.e;){const e=this.start.plus(t.mapUnits((e=>e*i)));r=+e>+this.e?this.e:e,s.push(Zt.fromDateTimes(n,r)),n=r,i+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e==+e.s}abutsEnd(e){return!!this.isValid&&+e.e==+this.s}engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return t>=r?null:Zt.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return Zt.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],r)=>t?t.overlaps(r)||t.abutsStart(r)?[e,t.union(r)]:[e.concat([t]),r]:[e,r]),[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const n=[],i=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),s=Array.prototype.concat(...i).sort(((e,t)=>e.time-t.time));for(const e of s)r+="s"===e.type?1:-1,1===r?t=e.time:(t&&+t!=+e.time&&n.push(Zt.fromDateTimes(t,e.time)),t=null);return Zt.merge(n)}difference(...e){return Zt.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Gt}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Gt}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Gt}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Gt}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Gt}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Ht.invalid(this.invalidReason)}mapEndpoints(e){return Zt.fromDateTimes(e(this.s),e(this.e))}}class Yt{static hasDST(e=Fe.defaultZone){const t=Xr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Ce.isValidZone(e)}static normalizeZone(e){return Ne(e,Fe.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null,outputCalendar:i="gregory"}={}){return(n||Xe.create(t,r,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null,outputCalendar:i="gregory"}={}){return(n||Xe.create(t,r,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null}={}){return(n||Xe.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null}={}){return(n||Xe.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Xe.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Xe.create(t,null,"gregory").eras(e)}static features(){return{relative:$()}}}function Xt(e,t){const r=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(t)-r(e);return Math.floor(Ht.fromMillis(n).as("days"))}function Kt(e,t,r,n){let[i,s,o,a]=function(e,t,r){const n=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const r=Xt(e,t);return(r-r%7)/7}],["days",Xt]],i={};let s,o;for(const[a,u]of n)if(r.indexOf(a)>=0){s=a;let r=u(e,t);o=e.plus({[a]:r}),o>t?(e=e.plus({[a]:r-1}),r-=1):e=o,i[a]=r}return[e,i,o,s]}(e,t,r);const u=t-i,c=r.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===c.length&&(o<t&&(o=i.plus({[a]:1})),o!==i&&(s[a]=(s[a]||0)+u/(o-i)));const l=Ht.fromObject(s,n);return c.length>0?Ht.fromMillis(u,n).shiftTo(...c).plus(l):l}const Qt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},er={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},tr=Qt.hanidec.replace(/[\[|\]]/g,"").split("");function rr({numberingSystem:e},t=""){return new RegExp(`${Qt[e||"latn"]}${t}`)}const nr="missing Intl.DateTimeFormat.formatToParts support";function ir(e,t=(e=>e)){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);if(-1!==e[r].search(Qt.hanidec))t+=tr.indexOf(e[r]);else for(const e in er){const[r,i]=er[e];n>=r&&n<=i&&(t+=n-r)}}return parseInt(t,10)}return t}(e))}}const sr=`[ ${String.fromCharCode(160)}]`,or=new RegExp(sr,"g");function ar(e){return e.replace(/\./g,"\\.?").replace(or,sr)}function ur(e){return e.replace(/\./g,"").replace(or," ").toLowerCase()}function cr(e,t){return null===e?null:{regex:RegExp(e.map(ar).join("|")),deser:([r])=>e.findIndex((e=>ur(r)===ur(e)))+t}}function lr(e,t){return{regex:e,deser:([,e,t])=>ee(e,t),groups:t}}function hr(e){return{regex:e,deser:([e])=>e}}const dr={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};let fr=null;function pr(e,t){if(e.literal)return e;const r=Se.macroTokenToFormatOpts(e.val);if(!r)return e;const n=Se.create(t,r).formatDateTimeParts((fr||(fr=Xr.fromMillis(1555555555555)),fr)).map((e=>function(e,t,r){const{type:n,value:i}=e;if("literal"===n)return{literal:!0,val:i};const s=r[n];let o=dr[n];return"object"==typeof o&&(o=o[s]),o?{literal:!1,val:o}:void 0}(e,0,r)));return n.includes(void 0)?e:n}function mr(e,t,r){const n=function(e,t){return Array.prototype.concat(...e.map((e=>pr(e,t))))}(Se.parseFormat(r),e),i=n.map((t=>function(e,t){const r=rr(t),n=rr(t,"{2}"),i=rr(t,"{3}"),s=rr(t,"{4}"),o=rr(t,"{6}"),a=rr(t,"{1,2}"),u=rr(t,"{1,3}"),c=rr(t,"{1,6}"),l=rr(t,"{1,9}"),h=rr(t,"{2,4}"),d=rr(t,"{4,6}"),f=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},p=(p=>{if(e.literal)return f(p);switch(p.val){case"G":return cr(t.eras("short",!1),0);case"GG":return cr(t.eras("long",!1),0);case"y":return ir(c);case"yy":case"kk":return ir(h,K);case"yyyy":case"kkkk":return ir(s);case"yyyyy":return ir(d);case"yyyyyy":return ir(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return ir(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return ir(n);case"MMM":return cr(t.months("short",!0,!1),1);case"MMMM":return cr(t.months("long",!0,!1),1);case"LLL":return cr(t.months("short",!1,!1),1);case"LLLL":return cr(t.months("long",!1,!1),1);case"o":case"S":return ir(u);case"ooo":case"SSS":return ir(i);case"u":return hr(l);case"uu":return hr(a);case"uuu":case"E":case"c":return ir(r);case"a":return cr(t.meridiems(),0);case"EEE":return cr(t.weekdays("short",!1,!1),1);case"EEEE":return cr(t.weekdays("long",!1,!1),1);case"ccc":return cr(t.weekdays("short",!0,!1),1);case"cccc":return cr(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return lr(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return lr(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return hr(/[a-z_+-/]{1,256}?/i);default:return f(p)}})(e)||{invalidReason:nr};return p.token=e,p}(t,e))),s=i.find((e=>e.invalidReason));if(s)return{input:t,tokens:n,invalidReason:s.invalidReason};{const[e,r]=function(e){return[`^${e.map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"")}$`,e]}(i),s=RegExp(e,"i"),[a,u]=function(e,t,r){const n=e.match(t);if(n){const e={};let t=1;for(const i in r)if(F(r,i)){const s=r[i],o=s.groups?s.groups+1:1;!s.literal&&s.token&&(e[s.token.val[0]]=s.deser(n.slice(t,t+o))),t+=o}return[n,e]}return[n,{}]}(t,s,r),[c,l,h]=u?function(e){let t,r=null;return P(e.z)||(r=Ce.create(e.z)),P(e.Z)||(r||(r=new Ae(e.Z)),t=e.Z),P(e.q)||(e.M=3*(e.q-1)+1),P(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),P(e.u)||(e.S=z(e.u)),[Object.keys(e).reduce(((t,r)=>{const n=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(r);return n&&(t[n]=e[r]),t}),{}),r,t]}(u):[null,null,void 0];if(F(u,"a")&&F(u,"H"))throw new o("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:n,regex:s,rawMatches:a,matches:u,result:c,zone:l,specificOffset:h}}}const gr=[0,31,59,90,120,151,181,212,243,273,304,334],yr=[0,31,60,91,121,152,182,213,244,274,305,335];function br(e,t){return new Ee("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function wr(e,t,r){const n=new Date(Date.UTC(e,t-1,r));e<100&&e>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const i=n.getUTCDay();return 0===i?7:i}function vr(e,t,r){return r+(H(e)?yr:gr)[t-1]}function Sr(e,t){const r=H(e)?yr:gr,n=r.findIndex((e=>e<t));return{month:n+1,day:t-r[n]}}function Er(e){const{year:t,month:r,day:n}=e,i=vr(t,r,n),s=wr(t,r,n);let o,a=Math.floor((i-s+10)/7);return a<1?(o=t-1,a=X(o)):a>X(t)?(o=t+1,a=1):o=t,{weekYear:o,weekNumber:a,weekday:s,...ie(e)}}function _r(e){const{weekYear:t,weekNumber:r,weekday:n}=e,i=wr(t,1,4),s=G(t);let o,a=7*r+n-i-3;a<1?(o=t-1,a+=G(o)):a>s?(o=t+1,a-=G(t)):o=t;const{month:u,day:c}=Sr(o,a);return{year:o,month:u,day:c,...ie(e)}}function Rr(e){const{year:t,month:r,day:n}=e;return{year:t,ordinal:vr(t,r,n),...ie(e)}}function Or(e){const{year:t,ordinal:r}=e,{month:n,day:i}=Sr(t,r);return{year:t,month:n,day:i,...ie(e)}}function Mr(e){const t=D(e.year),r=U(e.month,1,12),n=U(e.day,1,Z(e.year,e.month));return t?r?!n&&br("day",e.day):br("month",e.month):br("year",e.year)}function xr(e){const{hour:t,minute:r,second:n,millisecond:i}=e,s=U(t,0,23)||24===t&&0===r&&0===n&&0===i,o=U(r,0,59),a=U(n,0,59),u=U(i,0,999);return s?o?a?!u&&br("millisecond",i):br("second",n):br("minute",r):br("hour",t)}const Tr="Invalid DateTime",Cr=864e13;function Ir(e){return new Ee("unsupported zone",`the zone "${e.name}" is not supported`)}function Ar(e){return null===e.weekData&&(e.weekData=Er(e.c)),e.weekData}function kr(e,t){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Xr({...r,...t,old:r})}function Nr(e,t,r){let n=e-60*t*1e3;const i=r.offset(n);if(t===i)return[n,t];n-=60*(i-t)*1e3;const s=r.offset(n);return i===s?[n,i]:[e-60*Math.min(i,s)*1e3,Math.max(i,s)]}function jr(e,t){const r=new Date(e+=60*t*1e3);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function Pr(e,t,r){return Nr(Y(e),t,r)}function Lr(e,t){const r=e.o,n=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s={...e.c,year:n,month:i,day:Math.min(e.c.day,Z(n,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},o=Ht.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Y(s);let[u,c]=Nr(a,r,e.zone);return 0!==o&&(u+=o,c=e.zone.offset(u)),{ts:u,o:c}}function Dr(e,t,r,n,i,s){const{setZone:o,zone:a}=r;if(e&&0!==Object.keys(e).length){const n=t||a,i=Xr.fromObject(e,{...r,zone:n,specificOffset:s});return o?i:i.setZone(a)}return Xr.invalid(new Ee("unparsable",`the input "${i}" can't be parsed as ${n}`))}function $r(e,t,r=!0){return e.isValid?Se.create(Xe.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Br(e,t){const r=e.c.year>9999||e.c.year<0;let n="";return r&&e.c.year>=0&&(n+="+"),n+=V(e.c.year,r?6:4),t?(n+="-",n+=V(e.c.month),n+="-",n+=V(e.c.day)):(n+=V(e.c.month),n+=V(e.c.day)),n}function Fr(e,t,r,n,i,s){let o=V(e.c.hour);return t?(o+=":",o+=V(e.c.minute),0===e.c.second&&r||(o+=":")):o+=V(e.c.minute),0===e.c.second&&r||(o+=V(e.c.second),0===e.c.millisecond&&n||(o+=".",o+=V(e.c.millisecond,3))),i&&(e.isOffsetFixed&&0===e.offset&&!s?o+="Z":e.o<0?(o+="-",o+=V(Math.trunc(-e.o/60)),o+=":",o+=V(Math.trunc(-e.o%60))):(o+="+",o+=V(Math.trunc(e.o/60)),o+=":",o+=V(Math.trunc(e.o%60)))),s&&(o+="["+e.zone.ianaName+"]"),o}const Ur={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Vr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},qr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Wr=["year","month","day","hour","minute","second","millisecond"],zr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Jr=["year","ordinal","hour","minute","second","millisecond"];function Hr(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new a(e);return t}function Gr(e,t){const r=Ne(t.zone,Fe.defaultZone),n=Xe.fromObject(t),i=Fe.now();let s,o;if(P(e.year))s=i;else{for(const t of Wr)P(e[t])&&(e[t]=Ur[t]);const t=Mr(e)||xr(e);if(t)return Xr.invalid(t);const n=r.offset(i);[s,o]=Pr(e,n,r)}return new Xr({ts:s,zone:r,loc:n,o})}function Zr(e,t,r){const n=!!P(r.round)||r.round,i=(e,i)=>{e=J(e,n||r.calendary?0:2,!0);return t.loc.clone(r).relFormatter(r).format(e,i)},s=n=>r.calendary?t.hasSame(e,n)?0:t.startOf(n).diff(e.startOf(n),n).get(n):t.diff(e,n).get(n);if(r.unit)return i(s(r.unit),r.unit);for(const e of r.units){const t=s(e);if(Math.abs(t)>=1)return i(t,e)}return i(e>t?-0:0,r.units[r.units.length-1])}function Yr(e){let t,r={};return e.length>0&&"object"==typeof e[e.length-1]?(r=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[r,t]}class Xr{constructor(e){const t=e.zone||Fe.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new Ee("invalid input"):null)||(t.isValid?null:Ir(t));this.ts=P(e.ts)?Fe.now():e.ts;let n=null,i=null;if(!r){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[n,i]=[e.old.c,e.old.o];else{const e=t.offset(this.ts);n=jr(this.ts,e),r=Number.isNaN(n.year)?new Ee("invalid input"):null,n=r?null:n,i=r?null:e}}this._zone=t,this.loc=e.loc||Xe.create(),this.invalid=r,this.weekData=null,this.c=n,this.o=i,this.isLuxonDateTime=!0}static now(){return new Xr({})}static local(){const[e,t]=Yr(arguments),[r,n,i,s,o,a,u]=t;return Gr({year:r,month:n,day:i,hour:s,minute:o,second:a,millisecond:u},e)}static utc(){const[e,t]=Yr(arguments),[r,n,i,s,o,a,u]=t;return e.zone=Ae.utcInstance,Gr({year:r,month:n,day:i,hour:s,minute:o,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const r=(n=e,"[object Date]"===Object.prototype.toString.call(n)?e.valueOf():NaN);var n;if(Number.isNaN(r))return Xr.invalid("invalid input");const i=Ne(t.zone,Fe.defaultZone);return i.isValid?new Xr({ts:r,zone:i,loc:Xe.fromObject(t)}):Xr.invalid(Ir(i))}static fromMillis(e,t={}){if(L(e))return e<-Cr||e>Cr?Xr.invalid("Timestamp out of range"):new Xr({ts:e,zone:Ne(t.zone,Fe.defaultZone),loc:Xe.fromObject(t)});throw new u(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(L(e))return new Xr({ts:1e3*e,zone:Ne(t.zone,Fe.defaultZone),loc:Xe.fromObject(t)});throw new u("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=Ne(t.zone,Fe.defaultZone);if(!r.isValid)return Xr.invalid(Ir(r));const n=Fe.now(),i=P(t.specificOffset)?r.offset(n):t.specificOffset,s=re(e,Hr),a=!P(s.ordinal),u=!P(s.year),c=!P(s.month)||!P(s.day),l=u||c,h=s.weekYear||s.weekNumber,d=Xe.fromObject(t);if((l||a)&&h)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&a)throw new o("Can't mix ordinal dates with month/day");const f=h||s.weekday&&!l;let p,m,g=jr(n,i);f?(p=zr,m=Vr,g=Er(g)):a?(p=Jr,m=qr,g=Rr(g)):(p=Wr,m=Ur);let y=!1;for(const e of p){P(s[e])?s[e]=y?m[e]:g[e]:y=!0}const b=f?function(e){const t=D(e.weekYear),r=U(e.weekNumber,1,X(e.weekYear)),n=U(e.weekday,1,7);return t?r?!n&&br("weekday",e.weekday):br("week",e.week):br("weekYear",e.weekYear)}(s):a?function(e){const t=D(e.year),r=U(e.ordinal,1,G(e.year));return t?!r&&br("ordinal",e.ordinal):br("year",e.year)}(s):Mr(s),w=b||xr(s);if(w)return Xr.invalid(w);const v=f?_r(s):a?Or(s):s,[S,E]=Pr(v,i,r),_=new Xr({ts:S,zone:r,o:E,loc:d});return s.weekday&&l&&e.weekday!==_.weekday?Xr.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${_.toISO()}`):_}static fromISO(e,t={}){const[r,n]=function(e){return et(e,[Mt,It],[xt,At],[Tt,kt],[Ct,Nt])}(e);return Dr(r,n,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,n]=function(e){return et(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[wt,vt])}(e);return Dr(r,n,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,n]=function(e){return et(e,[St,Rt],[Et,Rt],[_t,Ot])}(e);return Dr(r,n,t,"HTTP",t)}static fromFormat(e,t,r={}){if(P(e)||P(t))throw new u("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:i=null}=r,s=Xe.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0}),[o,a,c,l]=function(e,t,r){const{result:n,zone:i,specificOffset:s,invalidReason:o}=mr(e,t,r);return[n,i,s,o]}(s,e,t);return l?Xr.invalid(l):Dr(o,a,r,`format ${t}`,e,c)}static fromString(e,t,r={}){return Xr.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,n]=function(e){return et(e,[Pt,It],[Lt,Dt])}(e);return Dr(r,n,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the DateTime is invalid");const r=e instanceof Ee?e:new Ee(e,t);if(Fe.throwOnInvalid)throw new n(r);return new Xr({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ar(this).weekYear:NaN}get weekNumber(){return this.isValid?Ar(this).weekNumber:NaN}get weekday(){return this.isValid?Ar(this).weekday:NaN}get ordinal(){return this.isValid?Rr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Yt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Yt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Yt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Yt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}get isInLeapYear(){return H(this.year)}get daysInMonth(){return Z(this.year,this.month)}get daysInYear(){return this.isValid?G(this.year):NaN}get weeksInWeekYear(){return this.isValid?X(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:n}=Se.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:n}}toUTC(e=0,t={}){return this.setZone(Ae.instance(e),t)}toLocal(){return this.setZone(Fe.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if((e=Ne(e,Fe.defaultZone)).equals(this.zone))return this;if(e.isValid){let n=this.ts;if(t||r){const t=e.offset(this.ts),r=this.toObject();[n]=Pr(r,t,e)}return kr(this,{ts:n,zone:e})}return Xr.invalid(Ir(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){return kr(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=re(e,Hr),r=!P(t.weekYear)||!P(t.weekNumber)||!P(t.weekday),n=!P(t.ordinal),i=!P(t.year),s=!P(t.month)||!P(t.day),a=i||s,u=t.weekYear||t.weekNumber;if((a||n)&&u)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&n)throw new o("Can't mix ordinal dates with month/day");let c;r?c=_r({...Er(this.c),...t}):P(t.ordinal)?(c={...this.toObject(),...t},P(t.day)&&(c.day=Math.min(Z(c.year,c.month),c.day))):c=Or({...Rr(this.c),...t});const[l,h]=Pr(c,this.o,this.zone);return kr(this,{ts:l,o:h})}plus(e){if(!this.isValid)return this;return kr(this,Lr(this,Ht.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return kr(this,Lr(this,Ht.fromDurationLike(e).negate()))}startOf(e){if(!this.isValid)return this;const t={},r=Ht.normalizeUnit(e);switch(r){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===r&&(t.weekday=1),"quarters"===r){const e=Math.ceil(this.month/3);t.month=3*(e-1)+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?Se.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Tr}toLocaleString(e=f,t={}){return this.isValid?Se.create(this.loc.clone(t),e).formatDateTime(this):Tr}toLocaleParts(e={}){return this.isValid?Se.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:n=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const s="extended"===e;let o=Br(this,s);return o+="T",o+=Fr(this,s,t,r,n,i),o}toISODate({format:e="extended"}={}){return this.isValid?Br(this,"extended"===e):null}toISOWeekDate(){return $r(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:n=!1,extendedZone:i=!1,format:s="extended"}={}){if(!this.isValid)return null;return(n?"T":"")+Fr(this,"extended"===s,t,e,r,i)}toRFC2822(){return $r(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return $r(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Br(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:r=!0}={}){let n="HH:mm:ss.SSS";return(t||e)&&(r&&(n+=" "),t?n+="z":e&&(n+="ZZ")),$r(this,n,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Tr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",r={}){if(!this.isValid||!e.isValid)return Ht.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=(a=t,Array.isArray(a)?a:[a]).map(Ht.normalizeUnit),s=e.valueOf()>this.valueOf(),o=Kt(s?this:e,s?e:this,i,n);var a;return s?o.negate():o}diffNow(e="milliseconds",t={}){return this.diff(Xr.now(),e,t)}until(e){return this.isValid?Zt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const r=e.valueOf(),n=this.setZone(e.zone,{keepLocalTime:!0});return n.startOf(t)<=r&&r<=n.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Xr.fromObject({},{zone:this.zone}),r=e.padding?this<t?-e.padding:e.padding:0;let n=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(n=e.unit,i=void 0),Zr(t,this.plus(r),{...e,numeric:"always",units:n,unit:i})}toRelativeCalendar(e={}){return this.isValid?Zr(e.base||Xr.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Xr.isDateTime))throw new u("min requires all arguments be DateTimes");return B(e,(e=>e.valueOf()),Math.min)}static max(...e){if(!e.every(Xr.isDateTime))throw new u("max requires all arguments be DateTimes");return B(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:n=null,numberingSystem:i=null}=r;return mr(Xe.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,r={}){return Xr.fromFormatExplain(e,t,r)}static get DATE_SHORT(){return f}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return g}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return b}static get TIME_WITH_SECONDS(){return w}static get TIME_WITH_SHORT_OFFSET(){return v}static get TIME_WITH_LONG_OFFSET(){return S}static get TIME_24_SIMPLE(){return E}static get TIME_24_WITH_SECONDS(){return _}static get TIME_24_WITH_SHORT_OFFSET(){return R}static get TIME_24_WITH_LONG_OFFSET(){return O}static get DATETIME_SHORT(){return M}static get DATETIME_SHORT_WITH_SECONDS(){return x}static get DATETIME_MED(){return T}static get DATETIME_MED_WITH_SECONDS(){return C}static get DATETIME_MED_WITH_WEEKDAY(){return I}static get DATETIME_FULL(){return A}static get DATETIME_FULL_WITH_SECONDS(){return k}static get DATETIME_HUGE(){return N}static get DATETIME_HUGE_WITH_SECONDS(){return j}}function Kr(e){if(Xr.isDateTime(e))return e;if(e&&e.valueOf&&L(e.valueOf()))return Xr.fromJSDate(e);if(e&&"object"==typeof e)return Xr.fromObject(e);throw new u(`Unknown datetime argument: ${e}, of type ${typeof e}`)}t.DateTime=Xr,t.Duration=Ht,t.FixedOffsetZone=Ae,t.IANAZone=Ce,t.Info=Yt,t.Interval=Zt,t.InvalidZone=ke,t.Settings=Fe,t.SystemZone=Oe,t.VERSION="2.5.2",t.Zone=_e},9928:(e,t,r)=>{var n=r(8892);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function s(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}e.exports=n(i),e.exports.strict=n(s),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})}))},2884:(e,t,r)=>{"use strict";var n=r(4406);void 0===n||!n.version||0===n.version.indexOf("v0.")||0===n.version.indexOf("v1.")&&0!==n.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,o,a=arguments.length;switch(a){case 0:case 1:return n.nextTick(e);case 2:return n.nextTick((function(){e.call(null,t)}));case 3:return n.nextTick((function(){e.call(null,t,r)}));case 4:return n.nextTick((function(){e.call(null,t,r,i)}));default:for(s=new Array(a-1),o=0;o<s.length;)s[o++]=arguments[o];return n.nextTick((function(){e.apply(null,s)}))}}}:e.exports=n},4406:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var a,u=[],c=!1,l=-1;function h(){c&&a&&(c=!1,a.length?u=a.concat(u):l=-1,u.length&&d())}function d(){if(!c){var e=o(h);c=!0;for(var t=u.length;t;){for(a=u,u=[];++l<t;)a&&a[l].run();l=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new f(e,t)),1!==u.length||c||o(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},3171:(e,t,r)=>{var n=r(4406),i=r(9928),s=r(8797),o=r(3558),a=function(){},u=/^v?\.0/.test(n.version),c=function(e){return"function"==typeof e},l=function(e,t,r,n){n=i(n);var l=!1;e.on("close",(function(){l=!0})),s(e,{readable:t,writable:r},(function(e){if(e)return n(e);l=!0,n()}));var h=!1;return function(t){if(!l&&!h)return h=!0,function(e){return!!u&&!!o&&(e instanceof(o.ReadStream||a)||e instanceof(o.WriteStream||a))&&c(e.close)}(e)?e.close(a):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void n(t||new Error("stream was destroyed"))}},h=function(e){e()},d=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=c(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(i,s){var o=s<t.length-1;return l(i,o,s>0,(function(t){e||(e=t),t&&n.forEach(h),o||(n.forEach(h),r(e))}))}));return t.reduce(d)}},7073:(e,t,r)=>{"use strict";var n=r(2884),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var s=Object.create(r(7646));s.inherits=r(1285);var o=r(8051),a=r(2557);s.inherits(h,o);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];h.prototype[l]||(h.prototype[l]=a.prototype[l])}function h(e){if(!(this instanceof h))return new h(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),h.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},5163:(e,t,r)=>{"use strict";e.exports=s;var n=r(7640),i=Object.create(r(7646));function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=r(1285),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}},8051:(e,t,r)=>{"use strict";var n=r(4406),i=r(2884);e.exports=w;var s,o=r(7906);w.ReadableState=b;r(2699).EventEmitter;var a=function(e,t){return e.listeners(t).length},u=r(5010),c=r(2521).Buffer,l=r.g.Uint8Array||function(){};var h=Object.create(r(7646));h.inherits=r(1285);var d=r(6602),f=void 0;f=d&&d.debuglog?d.debuglog("stream"):function(){};var p,m=r(9128),g=r(2262);h.inherits(w,u);var y=["error","close","destroy","pause","resume"];function b(e,t){e=e||{};var n=t instanceof(s=s||r(7073));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,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.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(1922).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function w(e){if(s=s||r(7073),!(this instanceof w))return new w(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function v(e,t,r,n,i){var s,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(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,R(e)}(e,o)):(i||(s=function(e,t){var r;n=t,c.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):S(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?S(e,o,t,!1):M(e,o)):S(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function S(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&R(e)),M(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.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=c.from(e,t),t=""),r=!0),v(this,e,t,!1,r)},w.prototype.unshift=function(e){return v(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(e){return p||(p=r(1922).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var E=8388608;function _(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>=E?e=E:(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 R(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(O,e):O(e))}function O(e){f("emit readable"),e.emit("readable"),I(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(x,e,t))}function x(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function T(e){f("readable nexttick read 0"),e.read(0)}function C(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function A(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.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),0===(e-=o)){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),0===(e-=o)){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function k(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function j(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?k(this):R(this),null;if(0===(e=_(e,t))&&t.ended)return 0===t.length&&k(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("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,t))),null===(n=e>0?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&k(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,f("pipe count=%d opts=%j",s.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:w;function c(t,n){f("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,f("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",h),e.removeListener("error",g),e.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",w),r.removeListener("data",m),d=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function l(){f("onend"),e.end()}s.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",c);var h=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,I(e))}}(r);e.on("drain",h);var d=!1;var p=!1;function m(t){f("ondata"),p=!1,!1!==e.write(t)||p||((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==j(s.pipes,e))&&!d&&(f("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(t){f("onerror",t),w(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),w()}function b(){f("onfinish"),e.removeListener("close",y),w()}function w(){f("unpipe"),r.unpipe(e)}return r.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",y),e.once("finish",b),e.emit("pipe",r),s.flowing||(f("pipe resume"),r.resume()),e},w.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,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var o=j(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},w.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&R(this):i.nextTick(T,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(C,e,t))}(this,e)),this},w.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<y.length;s++)e.on(y[s],this.emit.bind(this,y[s]));return this._read=function(t){f("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=A},7640:(e,t,r)=>{"use strict";e.exports=o;var n=r(7073),i=Object.create(r(7646));function s(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState={afterTransform:s.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",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(1285),i.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},2557:(e,t,r)=>{"use strict";var n=r(4406),i=r(2884);function s(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 i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var o,a=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?setImmediate:i.nextTick;y.WritableState=g;var u=Object.create(r(7646));u.inherits=r(1285);var c={deprecate:r(5803)},l=r(5010),h=r(2521).Buffer,d=r.g.Uint8Array||function(){};var f,p=r(2262);function m(){}function g(e,t){o=o||r(7073),e=e||{};var n=t instanceof o;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var u=e.highWaterMark,c=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.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(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?(i.nextTick(s,n),i.nextTick(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(s(n),e._writableState.errorEmitted=!0,e.emit("error",n),_(e,t))}(e,r,n,t,s);else{var o=S(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),n?a(w,e,r,o,s):w(e,r,o,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(o=o||r(7073),!(f.call(y,this)||this instanceof o))return new y(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function b(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),_(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,b(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 s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,l,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),_(e,t)}))}function _(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(E,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(y,l),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:c.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]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===y&&(e&&e._writableState instanceof g)}})):f=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,h.isBuffer(n)||n instanceof d);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=m),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var s=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),i.nextTick(n,o),s=!1),s}(this,s,e,r))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,a,n,i,s);return u}(this,s,a,e,t,r)),o},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},y.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 TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,_(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}},9128:(e,t,r)=>{"use strict";var n=r(2521).Buffer,i=r(4854);e.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}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=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}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,s=n.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=s,i=a,t.copy(r,i),a+=o.data.length,o=o.next;return s},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},2262:(e,t,r)=>{"use strict";var n=r(2884);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.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?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),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.finished=!1,this._writableState.errorEmitted=!1)}}},5010:(e,t,r)=>{e.exports=r(2699).EventEmitter},2521:(e,t,r)=>{var n=r(8834),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=o),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"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 i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},1922:(e,t,r)=>{"use strict";var n=r(2521).Buffer,i=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 s(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===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}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 void 0!==r?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 u(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 c(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 h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))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||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;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)},s.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}},7525:(e,t,r)=>{(t=e.exports=r(8051)).Stream=t,t.Readable=t,t.Writable=r(2557),t.Duplex=r(7073),t.Transform=r(7640),t.PassThrough=r(5163)},7152:(e,t,r)=>{"use strict";var n=r(8834).Buffer;function i(e){return e instanceof n?n.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){return(e=e||{}).circles?function(e){var t=[],r=[];return e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return n(s,e);if(s instanceof Map)return new Map(n(Array.from(s),e));if(s instanceof Set)return new Set(n(Array.from(s),e));var o={};for(var a in t.push(s),r.push(o),s){var u=s[a];if("object"!=typeof u||null===u)o[a]=u;else if(u instanceof Date)o[a]=new Date(u);else if(u instanceof Map)o[a]=new Map(n(Array.from(u),e));else if(u instanceof Set)o[a]=new Set(n(Array.from(u),e));else if(ArrayBuffer.isView(u))o[a]=i(u);else{var c=t.indexOf(u);o[a]=-1!==c?r[c]:e(u)}}return t.pop(),r.pop(),o}:function e(s){if("object"!=typeof s||null===s)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return n(s,e);if(s instanceof Map)return new Map(n(Array.from(s),e));if(s instanceof Set)return new Set(n(Array.from(s),e));var o={};for(var a in t.push(s),r.push(o),s)if(!1!==Object.hasOwnProperty.call(s,a)){var u=s[a];if("object"!=typeof u||null===u)o[a]=u;else if(u instanceof Date)o[a]=new Date(u);else if(u instanceof Map)o[a]=new Map(n(Array.from(u),e));else if(u instanceof Set)o[a]=new Set(n(Array.from(u),e));else if(ArrayBuffer.isView(u))o[a]=i(u);else{var c=t.indexOf(u);o[a]=-1!==c?r[c]:e(u)}}return t.pop(),r.pop(),o};function n(e,n){for(var s=Object.keys(e),o=new Array(s.length),a=0;a<s.length;a++){var u=s[a],c=e[u];if("object"!=typeof c||null===c)o[u]=c;else if(c instanceof Date)o[u]=new Date(c);else if(ArrayBuffer.isView(c))o[u]=i(c);else{var l=t.indexOf(c);o[u]=-1!==l?r[l]:n(c)}}return o}}(e):e.proto?function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return t(r,e);if(r instanceof Map)return new Map(t(Array.from(r),e));if(r instanceof Set)return new Set(t(Array.from(r),e));var n={};for(var s in r){var o=r[s];"object"!=typeof o||null===o?n[s]=o:o instanceof Date?n[s]=new Date(o):o instanceof Map?n[s]=new Map(t(Array.from(o),e)):o instanceof Set?n[s]=new Set(t(Array.from(o),e)):ArrayBuffer.isView(o)?n[s]=i(o):n[s]=e(o)}return n}:function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return t(r,e);if(r instanceof Map)return new Map(t(Array.from(r),e));if(r instanceof Set)return new Set(t(Array.from(r),e));var n={};for(var s in r)if(!1!==Object.hasOwnProperty.call(r,s)){var o=r[s];"object"!=typeof o||null===o?n[s]=o:o instanceof Date?n[s]=new Date(o):o instanceof Map?n[s]=new Map(t(Array.from(o),e)):o instanceof Set?n[s]=new Set(t(Array.from(o),e)):ArrayBuffer.isView(o)?n[s]=i(o):n[s]=e(o)}return n};function t(e,t){for(var r=Object.keys(e),n=new Array(r.length),s=0;s<r.length;s++){var o=r[s],a=e[o];"object"!=typeof a||null===a?n[o]=a:a instanceof Date?n[o]=new Date(a):ArrayBuffer.isView(a)?n[o]=i(a):n[o]=t(a)}return n}}},7834:(e,t,r)=>{var n=r(8834),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"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 i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},7847:(e,t,r)=>{const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=s(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}c("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,c("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=void 0!==r[1]?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(c("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 u(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new h(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new h(this.value,t).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),s=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=u(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=u(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||n||s&&o||a||c}}e.exports=i;const s=r(1388),{re:o,t:a}=r(4808),u=r(8117),c=r(952),l=r(2435),h=r(6843)},6843:(e,t,r)=>{class n{constructor(e,t){if(t=s(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,this.set=e.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!p(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&&m(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){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,r=i.get(t);if(r)return r;const n=this.options.loose,s=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,x(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[l.COMPARATORTRIM],h),a("comparator trim",e);let u=(e=(e=(e=e.replace(c[l.TILDETRIM],d)).replace(c[l.CARETTRIM],f)).split(/\s+/).join(" ")).split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>M(e,this.options)));n&&(u=u.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(c[l.COMPARATORLOOSE]))))),a("range list",u);const m=new Map,g=u.map((e=>new o(e,this.options)));for(const e of g){if(p(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const b=[...m.values()];return i.set(t,b),b}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>g(r,t)&&e.set.some((e=>g(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 u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(T(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const i=new(r(293))({max:1e3}),s=r(1388),o=r(7847),a=r(952),u=r(2435),{re:c,t:l,comparatorTrimReplace:h,tildeTrimReplace:d,caretTrimReplace:f}=r(4808),p=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,g=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every((e=>i.intersects(e,t))),i=n.pop();return r},y=(e,t)=>(a("comp",e,t),e=S(e,t),a("caret",e),e=w(e,t),a("tildes",e),e=_(e,t),a("xrange",e),e=O(e,t),a("stars",e),e),b=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map((e=>v(e,t))).join(" "),v=(e,t)=>{const r=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(r,((t,r,n,i,s)=>{let o;return a("tilde",e,t,r,n,i,s),b(r)?o="":b(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:b(i)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(a("replaceTilde pr",s),o=`>=${r}.${n}.${i}-${s} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,a("tilde return",o),o}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{a("caret",e,t);const r=t.loose?c[l.CARETLOOSE]:c[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,s,o)=>{let u;return a("caret",e,t,r,i,s,o),b(r)?u="":b(i)?u=`>=${r}.0.0${n} <${+r+1}.0.0-0`:b(s)?u="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:o?(a("replaceCaret pr",o),u="0"===r?"0"===i?`>=${r}.${i}.${s}-${o} <${r}.${i}.${+s+1}-0`:`>=${r}.${i}.${s}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${s}-${o} <${+r+1}.0.0-0`):(a("no pr"),u="0"===r?"0"===i?`>=${r}.${i}.${s}${n} <${r}.${i}.${+s+1}-0`:`>=${r}.${i}.${s}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${s} <${+r+1}.0.0-0`),a("caret return",u),u}))},_=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>R(e,t))).join(" ")),R=(e,t)=>{e=e.trim();const r=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(r,((r,n,i,s,o,u)=>{a("xRange",e,r,n,i,s,o,u);const c=b(i),l=c||b(s),h=l||b(o),d=h;return"="===n&&d&&(n=""),u=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(l&&(s=0),o=0,">"===n?(n=">=",l?(i=+i+1,s=0,o=0):(s=+s+1,o=0)):"<="===n&&(n="<",l?i=+i+1:s=+s+1),"<"===n&&(u="-0"),r=`${n+i}.${s}.${o}${u}`):l?r=`>=${i}.0.0${u} <${+i+1}.0.0-0`:h&&(r=`>=${i}.${s}.0${u} <${i}.${+s+1}.0-0`),a("xRange return",r),r}))},O=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[l.STAR],"")),M=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),x=e=>(t,r,n,i,s,o,a,u,c,l,h,d,f)=>`${r=b(n)?"":b(i)?`>=${n}.0.0${e?"-0":""}`:b(s)?`>=${n}.${i}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${u=b(c)?"":b(l)?`<${+c+1}.0.0-0`:b(h)?`<${c}.${+l+1}.0-0`:d?`<=${c}.${l}.${h}-${d}`:e?`<${c}.${l}.${+h+1}-0`:`<=${u}`}`.trim(),T=(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}},2435:(e,t,r)=>{const n=r(952),{MAX_LENGTH:i,MAX_SAFE_INTEGER:s}=r(5558),{re:o,t:a}=r(4808),u=r(1388),{compareIdentifiers:c}=r(4935);class l{constructor(e,t){if(t=u(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: ${e}`);if(e.length>i)throw new TypeError(`version is longer than ${i} 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>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||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<s)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)),c(this.major,e.major)||c(this.minor,e.minor)||c(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],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return c(r,i)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],i=e.build[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return c(r,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);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":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=l},6694:(e,t,r)=>{const n=r(9943);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},8117:(e,t,r)=>{const n=r(3276),i=r(7893),s=r(6379),o=r(8463),a=r(1897),u=r(506);e.exports=(e,t,r,c)=>{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,c);case"!=":return i(e,r,c);case">":return s(e,r,c);case">=":return o(e,r,c);case"<":return a(e,r,c);case"<=":return u(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},8686:(e,t,r)=>{const n=r(2435),i=r(9943),{re:s,t:o}=r(4808);e.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=s[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),s[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;s[o.COERCERTL].lastIndex=-1}else r=e.match(s[o.COERCE]);return null===r?null:i(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},5914:(e,t,r)=>{const n=r(2435);e.exports=(e,t,r)=>{const i=new n(e,r),s=new n(t,r);return i.compare(s)||i.compareBuild(s)}},5404:(e,t,r)=>{const n=r(2271);e.exports=(e,t)=>n(e,t,!0)},2271:(e,t,r)=>{const n=r(2435);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},6007:(e,t,r)=>{const n=r(9943),i=r(3276);e.exports=(e,t)=>{if(i(e,t))return null;{const r=n(e),i=n(t),s=r.prerelease.length||i.prerelease.length,o=s?"pre":"",a=s?"prerelease":"";for(const e in r)if(("major"===e||"minor"===e||"patch"===e)&&r[e]!==i[e])return o+e;return a}}},3276:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>0===n(e,t,r)},6379:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>n(e,t,r)>0},8463:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>n(e,t,r)>=0},6360:(e,t,r)=>{const n=r(2435);e.exports=(e,t,r,i)=>{"string"==typeof r&&(i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i).version}catch(e){return null}}},1897:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>n(e,t,r)<0},506:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>n(e,t,r)<=0},4551:(e,t,r)=>{const n=r(2435);e.exports=(e,t)=>new n(e,t).major},469:(e,t,r)=>{const n=r(2435);e.exports=(e,t)=>new n(e,t).minor},7893:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>0!==n(e,t,r)},9943:(e,t,r)=>{const{MAX_LENGTH:n}=r(5558),{re:i,t:s}=r(4808),o=r(2435),a=r(1388);e.exports=(e,t)=>{if(t=a(t),e instanceof o)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?i[s.LOOSE]:i[s.FULL]).test(e))return null;try{return new o(e,t)}catch(e){return null}}},4250:(e,t,r)=>{const n=r(2435);e.exports=(e,t)=>new n(e,t).patch},8204:(e,t,r)=>{const n=r(9943);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},733:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>n(t,e,r)},2961:(e,t,r)=>{const n=r(5914);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},9844:(e,t,r)=>{const n=r(6843);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},1116:(e,t,r)=>{const n=r(5914);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},7230:(e,t,r)=>{const n=r(9943);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},7699:(e,t,r)=>{const n=r(4808),i=r(5558),s=r(2435),o=r(4935),a=r(9943),u=r(7230),c=r(6694),l=r(6360),h=r(6007),d=r(4551),f=r(469),p=r(4250),m=r(8204),g=r(2271),y=r(733),b=r(5404),w=r(5914),v=r(1116),S=r(2961),E=r(6379),_=r(1897),R=r(3276),O=r(7893),M=r(8463),x=r(506),T=r(8117),C=r(8686),I=r(7847),A=r(6843),k=r(9844),N=r(8865),j=r(3727),P=r(4338),L=r(1542),D=r(6240),$=r(9106),B=r(995),F=r(7805),U=r(2013),V=r(1338),q=r(3122);e.exports={parse:a,valid:u,clean:c,inc:l,diff:h,major:d,minor:f,patch:p,prerelease:m,compare:g,rcompare:y,compareLoose:b,compareBuild:w,sort:v,rsort:S,gt:E,lt:_,eq:R,neq:O,gte:M,lte:x,cmp:T,coerce:C,Comparator:I,Range:A,satisfies:k,toComparators:N,maxSatisfying:j,minSatisfying:P,minVersion:L,validRange:D,outside:$,gtr:B,ltr:F,intersects:U,simplifyRange:V,subset:q,SemVer:s,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}},5558:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},952:(e,t,r)=>{var n=r(4406);const i="object"==typeof n&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=i},4935:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},1388:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},4808:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(5558),i=r(952),s=(t=e.exports={}).re=[],o=t.src=[],a=t.t={};let u=0;const c=(e,t,r)=>{const n=u++;i(e,n,t),a[e]=n,o[n]=t,s[n]=new RegExp(t,r?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`),c("FULL",`^${o[a.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`),c("LOOSE",`^${o[a.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${o[a.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?)?)?`),c("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),c("COERCERTL",o[a.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})\\s+-\\s+(${o[a.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[a.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},293:(e,t,r)=>{"use strict";const n=r(8006),i=Symbol("max"),s=Symbol("length"),o=Symbol("lengthCalculator"),a=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),h=Symbol("lruList"),d=Symbol("cache"),f=Symbol("updateAgeOnGet"),p=()=>1;const m=(e,t,r)=>{const n=e[d].get(t);if(n){const t=n.value;if(g(e,t)){if(b(e,n),!e[a])return}else r&&(e[f]&&(n.value.now=Date.now()),e[h].unshiftNode(n));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]},y=e=>{if(e[s]>e[i])for(let t=e[h].tail;e[s]>e[i]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[s]-=r.length,e[d].delete(r.key),e[h].removeNode(t)}};class w{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const v=(e,t,r,n)=>{let i=r.value;g(e,i)&&(b(e,r),e[a]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.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[i]=e.max||1/0;const t=e.length||p;if(this[o]="function"!=typeof t?p:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[f]=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[i]=e||1/0,y(this)}get max(){return this[i]}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[u]=e,y(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[o]&&(this[o]=e,this[s]=0,this[h].forEach((e=>{e.length=this[o](e.value,e.key),this[s]+=e.length}))),y(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let r=this[h].tail;null!==r;){const n=r.prev;v(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[h].head;null!==r;){const n=r.next;v(this,e,r,t),r=n}}keys(){return this[h].toArray().map((e=>e.key))}values(){return this[h].toArray().map((e=>e.value))}reset(){this[c]&&this[h]&&this[h].length&&this[h].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[h]=new n,this[s]=0}dump(){return this[h].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[h]}set(e,t,r){if((r=r||this[u])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[o](t,e);if(this[d].has(e)){if(a>this[i])return b(this,this[d].get(e)),!1;const o=this[d].get(e).value;return this[c]&&(this[l]||this[c](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[s]+=a-o.length,o.length=a,this.get(e),y(this),!0}const f=new w(e,t,a,n,r);return f.length>this[i]?(this[c]&&this[c](e,t),!1):(this[s]+=f.length,this[h].unshift(f),this[d].set(e,this[h].head),y(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].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[h].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[d].forEach(((e,t)=>m(this,t,!1)))}}},995:(e,t,r)=>{const n=r(9106);e.exports=(e,t,r)=>n(e,t,">",r)},2013:(e,t,r)=>{const n=r(6843);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t))},7805:(e,t,r)=>{const n=r(9106);e.exports=(e,t,r)=>n(e,t,"<",r)},3727:(e,t,r)=>{const n=r(2435),i=r(6843);e.exports=(e,t,r)=>{let s=null,o=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==o.compare(e)||(s=e,o=new n(s,r)))})),s}},4338:(e,t,r)=>{const n=r(2435),i=r(6843);e.exports=(e,t,r)=>{let s=null,o=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==o.compare(e)||(s=e,o=new n(s,r)))})),s}},1542:(e,t,r)=>{const n=r(2435),i=r(6843),s=r(6379);e.exports=(e,t)=>{e=new i(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 i=e.set[t];let o=null;i.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&&!s(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!o||r&&!s(r,o)||(r=o)}return r&&e.test(r)?r:null}},9106:(e,t,r)=>{const n=r(2435),i=r(7847),{ANY:s}=i,o=r(6843),a=r(9844),u=r(6379),c=r(1897),l=r(506),h=r(8463);e.exports=(e,t,r,d)=>{let f,p,m,g,y;switch(e=new n(e,d),t=new o(t,d),r){case">":f=u,p=l,m=c,g=">",y=">=";break;case"<":f=c,p=h,m=u,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d))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===s&&(e=new i(">=0.0.0")),o=o||e,a=a||e,f(e.semver,o.semver,d)?o=e:m(e.semver,a.semver,d)&&(a=e)})),o.operator===g||o.operator===y)return!1;if((!a.operator||a.operator===g)&&p(e,a.semver))return!1;if(a.operator===y&&m(e,a.semver))return!1}return!0}},1338:(e,t,r)=>{const n=r(9844),i=r(2271);e.exports=(e,t,r)=>{const s=[];let o=null,a=null;const u=e.sort(((e,t)=>i(e,t,r)));for(const e of u){n(e,t,r)?(a=e,o||(o=e)):(a&&s.push([o,a]),a=null,o=null)}o&&s.push([o,null]);const c=[];for(const[e,t]of s)e===t?c.push(e):t||e!==u[0]?t?e===u[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const l=c.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t}},3122:(e,t,r)=>{const n=r(6843),i=r(7847),{ANY:s}=i,o=r(9844),a=r(2271),u=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=r.includePrerelease?[new i(">=0.0.0-0")]:[new i(">=0.0.0")]}if(1===t.length&&t[0].semver===s){if(r.includePrerelease)return!0;t=[new i(">=0.0.0")]}const n=new Set;let u,h,d,f,p,m,g;for(const t of e)">"===t.operator||">="===t.operator?u=c(u,t,r):"<"===t.operator||"<="===t.operator?h=l(h,t,r):n.add(t.semver);if(n.size>1)return null;if(u&&h){if(d=a(u.semver,h.semver,r),d>0)return null;if(0===d&&(">="!==u.operator||"<="!==h.operator))return null}for(const e of n){if(u&&!o(e,String(u),r))return null;if(h&&!o(e,String(h),r))return null;for(const n of t)if(!o(e,String(n),r))return!1;return!0}let y=!(!h||r.includePrerelease||!h.semver.prerelease.length)&&h.semver,b=!(!u||r.includePrerelease||!u.semver.prerelease.length)&&u.semver;y&&1===y.prerelease.length&&"<"===h.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,u)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),">"===e.operator||">="===e.operator){if(f=c(u,e,r),f===e&&f!==u)return!1}else if(">="===u.operator&&!o(u.semver,String(e),r))return!1;if(h)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(p=l(h,e,r),p===e&&p!==h)return!1}else if("<="===h.operator&&!o(h.semver,String(e),r))return!1;if(!e.operator&&(h||u)&&0!==d)return!1}return!(u&&m&&!h&&0!==d)&&(!(h&&g&&!u&&0!==d)&&(!b&&!y))},c=(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},l=(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};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(const n of e.set){for(const e of t.set){const t=u(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},8865:(e,t,r)=>{const n=r(6843);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},6240:(e,t,r)=>{const n=r(6843);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},4851:(e,t,r)=>{e.exports=i;var n=r(2699).EventEmitter;function i(){n.call(this)}r(1285)(i,n),i.Readable=r(3323),i.Writable=r(8234),i.Duplex=r(5929),i.Transform=r(9535),i.PassThrough=r(61),i.finished=r(2529),i.pipeline=r(9125),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function s(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",s),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",u));var o=!1;function a(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",s),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",c),e.on("error",c),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},9150:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,s,o,a;if("string"==typeof t&&(s="not ",t.substr(!o||o<0?0:+o,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var u=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 "'.concat(e,'" ').concat(u," ").concat(i," ").concat(n(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=t},5929:(e,t,r)=>{"use strict";var n=r(4406),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var s=r(3323),o=r(8234);r(1285)(l,s);for(var a=i(o.prototype),u=0;u<a.length;u++){var c=a[u];l.prototype[c]||(l.prototype[c]=o.prototype[c])}function l(e){if(!(this instanceof l))return new l(e);s.call(this,e),o.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",h)))}function h(){this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},61:(e,t,r)=>{"use strict";e.exports=i;var n=r(9535);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(1285)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},3323:(e,t,r)=>{"use strict";var n,i=r(4406);e.exports=O,O.ReadableState=R;r(2699).EventEmitter;var s=function(e,t){return e.listeners(t).length},o=r(4811),a=r(8834).Buffer,u=r.g.Uint8Array||function(){};var c,l=r(9255);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,d,f,p=r(3413),m=r(163),g=r(4774).getHighWaterMark,y=r(9150).codes,b=y.ERR_INVALID_ARG_TYPE,w=y.ERR_STREAM_PUSH_AFTER_EOF,v=y.ERR_METHOD_NOT_IMPLEMENTED,S=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1285)(O,o);var E=m.errorOrDestroy,_=["error","close","destroy","pause","resume"];function R(e,t,i){n=n||r(5929),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),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!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=r(214).StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function O(e){if(n=n||r(5929),!(this instanceof O))return new O(e);var t=this instanceof n;this._readableState=new R(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function M(e,t,r,n,i){c("readableAddChunk",t);var s,o=e._readableState;if(null===t)o.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?I(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,A(e)))}(e,o);else if(i||(s=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(o,t)),s)E(e,s);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)o.endEmitted?E(e,new S):x(e,o,t,!0);else if(o.ended)E(e,new w);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):k(e,o)):x(e,o,t,!1)}else n||(o.reading=!1,k(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.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&&I(e)),k(e,t)}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),O.prototype.destroy=m.destroy,O.prototype._undestroy=m.undestroy,O.prototype._destroy=function(e,t){t(e)},O.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=a.from(e,t),t=""),r=!0),M(this,e,t,!1,r)},O.prototype.unshift=function(e){return M(this,e,null,!0,!1)},O.prototype.isPaused=function(){return!1===this._readableState.flowing},O.prototype.setEncoding=function(e){h||(h=r(214).StringDecoder);var t=new h(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var T=1073741824;function C(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>=T?e=T:(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 I(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(A,e))}function A(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,D(e)}function k(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(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 j(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 P(e){c("readable nexttick read 0"),e.read(0)}function L(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function $(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 B(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.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 U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}O.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?B(this):I(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(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=C(r,t))),null===(n=e>0?$(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&&B(this)),null!==n&&this.emit("data",n),n},O.prototype._read=function(e){E(this,new v("_read()"))},O.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 o=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:g;function a(t,i){c("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",l),e.removeListener("error",f),e.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",d),h=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function u(){c("onend"),e.end()}n.endEmitted?i.nextTick(o):r.once("end",o),e.on("unpipe",a);var l=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,D(e))}}(r);e.on("drain",l);var h=!1;function d(t){c("ondata");var i=e.write(t);c("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!h&&(c("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function f(t){c("onerror",t),g(),e.removeListener("error",f),0===s(e,"error")&&E(e,t)}function p(){e.removeListener("finish",m),g()}function m(){c("onfinish"),e.removeListener("close",p),g()}function g(){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",m),e.emit("pipe",r),n.flowing||(c("pipe resume"),r.resume()),e},O.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,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=U(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},O.prototype.on=function(e,t){var r=o.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?I(this):n.reading||i.nextTick(P,this))),r},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(j,this),r},O.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(j,this),t},O.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(L,e,t))}(this,e)),e.paused=!1,this},O.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},O.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i 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(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<_.length;s++)e.on(_[s],this.emit.bind(this,_[s]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(O.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=r(4020)),d(this)}),Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(O.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(O.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),O._fromList=$,Object.defineProperty(O.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(O.from=function(e,t){return void 0===f&&(f=r(7324)),f(O,e,t)})},9535:(e,t,r)=>{"use strict";e.exports=l;var n=r(9150).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(5929);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:c.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",h)}function h(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,r){d(e,t,r)}))}function d(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)}r(1285)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_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 i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.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){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},8234:(e,t,r)=>{"use strict";var n,i=r(4406);function s(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 i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=O,O.WritableState=R;var o={deprecate:r(5803)},a=r(4811),u=r(8834).Buffer,c=r.g.Uint8Array||function(){};var l,h=r(163),d=r(4774).getHighWaterMark,f=r(9150).codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,y=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,w=f.ERR_STREAM_NULL_VALUES,v=f.ERR_STREAM_WRITE_AFTER_END,S=f.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function _(){}function R(e,t,o){n=n||r(5929),e=e||{},"boolean"!=typeof o&&(o=t instanceof n),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.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 g;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?(i.nextTick(s,n),i.nextTick(A,e,t),e._writableState.errorEmitted=!0,E(e,n)):(s(n),e._writableState.errorEmitted=!0,E(e,n),A(e,t))}(e,r,n,t,s);else{var o=C(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),n?i.nextTick(x,e,r,o,s):x(e,r,o,s)}}(t,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!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function O(e){var t=this instanceof(n=n||r(5929));if(!t&&!l.call(O,this))return new O(e);this._writableState=new R(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function M(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,s,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(),A(e,t)}function T(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,M(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 s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(M(e,t,!1,t.objectMode?1:c.length,c,l,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(r){t.pendingcb--,r&&E(e,r),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var r=C(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,i.nextTick(I,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}r(1285)(O,a),R.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(R.prototype,"buffer",{get:o.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]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===O&&(e&&e._writableState instanceof R)}})):l=function(e){return e instanceof this},O.prototype.pipe=function(){E(this,new y)},O.prototype.write=function(e,t,r){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,u.isBuffer(n)||n instanceof c);return a&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=_),s.ending?function(e,t){var r=new v;E(e,r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var s;return null===r?s=new w:"string"==typeof r||t.objectMode||(s=new p("chunk",["string","Buffer"],r)),!s||(E(e,s),i.nextTick(n,s),!1)}(this,s,e,r))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else M(e,t,!1,a,n,i,s);return c}(this,s,a,e,t,r)),o},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},O.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 S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(e,t,r){r(new m("_write()"))},O.prototype._writev=null,O.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&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),O.prototype.destroy=h.destroy,O.prototype._undestroy=h.undestroy,O.prototype._destroy=function(e,t){t(e)}},4020:(e,t,r)=>{"use strict";var n,i=r(4406);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(2529),a=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),h=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function p(e,t){return{value:e,done:t}}function m(e){var t=e[a];if(null!==t){var r=e[f].read();null!==r&&(e[h]=null,e[a]=null,e[u]=null,t(p(r,!1)))}}function g(e){i.nextTick(m,e)}var y=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[l])return Promise.resolve(p(void 0,!0));if(this[f].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,n=this[h];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[l]?r(p(void 0,!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[h]=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(void 0,!0))}))}))})),n),y);e.exports=function(e){var t,r=Object.create(b,(s(t={},f,{value:e,writable:!0}),s(t,a,{value:null,writable:!0}),s(t,u,{value:null,writable:!0}),s(t,c,{value:null,writable:!0}),s(t,l,{value:e._readableState.endEmitted,writable:!0}),s(t,d,{value:function(e,t){var n=r[f].read();n?(r[h]=null,r[a]=null,r[u]=null,e(p(n,!1))):(r[a]=e,r[u]=t)},writable:!0}),t));return r[h]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[h]=null,r[a]=null,r[u]=null,t(e)),void(r[c]=e)}var n=r[a];null!==n&&(r[h]=null,r[a]=null,r[u]=null,n(p(void 0,!0))),r[l]=!0})),e.on("readable",g.bind(null,r)),r}},3413:(e,t,r)=>{"use strict";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 i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(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,n.key,n)}}var o=r(8834).Buffer,a=r(7267).inspect,u=a&&a.custom||"inspect";e.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,c;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 o.alloc(0);for(var t,r,n,i=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=i,n=a,o.prototype.copy.call(t,r,n),a+=s.data.length,s=s.next;return i}},{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 i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return a(this,function(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}({},t,{depth:0,customInspect:!1}))}}],r&&s(t.prototype,r),c&&s(t,c),e}()},163:(e,t,r)=>{"use strict";var n=r(4406);function i(e,t){o(e,t),s(e)}function s(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(o,this,e)):n.nextTick(o,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?n.nextTick(s,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(s,r),t(e)):n.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)}}},2529:(e,t,r)=>{"use strict";var n=r(9150).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);r||(r={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(s||i);var o=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},c=t._writableState&&t._writableState.finished,l=function(){a=!1,c=!0,o||s.call(t)},h=t._readableState&&t._readableState.endEmitted,d=function(){o=!1,h=!0,a||s.call(t)},f=function(e){s.call(t,e)},p=function(){var e;return o&&!h?(t._readableState&&t._readableState.ended||(e=new n),s.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new n),s.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",u),t.on("close",u)):(t.on("complete",l),t.on("abort",p),t.req?m():t.on("request",m)),t.on("end",d),t.on("finish",l),!1!==r.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",d),t.removeListener("error",f),t.removeListener("close",p)}}},7324:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9125:(e,t,r)=>{"use strict";var n;var i=r(9150).codes,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var l,h=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var d=t.map((function(e,i){var s=i<t.length-1;return function(e,t,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;e.on("close",(function(){a=!0})),void 0===n&&(n=r(2529)),n(e,{readable:t,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var u=!1;return function(t){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new o("pipe"))}}(e,s,i>0,(function(e){l||(l=e),e&&d.forEach(u),s||(d.forEach(u),h(l))}))}));return t.reduce(c)}},4774:(e,t,r)=>{"use strict";var n=r(9150).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(i?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},4811:(e,t,r)=>{e.exports=r(2699).EventEmitter},214:(e,t,r)=>{"use strict";var n=r(7834).Buffer,i=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 s(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===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}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 void 0!==r?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 u(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 c(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 h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))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||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;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)},s.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}},5803:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},9189:(e,t,r)=>{"use strict";var n=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),i=r(5890),s=["node_modules","favicon.ico"];var o=function(e,t){var r={validForNewPackages:0===t.length&&0===e.length,validForOldPackages:0===t.length,warnings:e,errors:t};return r.warnings.length||delete r.warnings,r.errors.length||delete r.errors,r};e.exports=function(e){var t=[],r=[];if(null===e)return r.push("name cannot be null"),o(t,r);if(void 0===e)return r.push("name cannot be undefined"),o(t,r);if("string"!=typeof e)return r.push("name must be a string"),o(t,r);if(e.length||r.push("name length must be greater than zero"),e.match(/^\./)&&r.push("name cannot start with a period"),e.match(/^_/)&&r.push("name cannot start with an underscore"),e.trim()!==e&&r.push("name cannot contain leading or trailing spaces"),s.forEach((function(t){e.toLowerCase()===t&&r.push(t+" is a blacklisted name")})),i({version:"*"}).forEach((function(r){e.toLowerCase()===r&&t.push(r+" is a core module name")})),e.length>214&&t.push("name can no longer contain more than 214 characters"),e.toLowerCase()!==e&&t.push("name can no longer contain capital letters"),/[~'!()*]/.test(e.split("/").slice(-1)[0])&&t.push('name can no longer contain special characters ("~\'!()*")'),encodeURIComponent(e)!==e){var a=e.match(n);if(a){var u=a[1],c=a[2];if(encodeURIComponent(u)===u&&encodeURIComponent(c)===c)return o(t,r)}r.push("name can only contain URL-friendly characters")}return o(t,r)}},8892:e=>{e.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),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}}},8268:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},8006:(e,t,r)=>{"use strict";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,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(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 s(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}e.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++)s(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){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){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,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.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 i=0;null!==n;i++)r=e(r,n.value,i),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 i=this.length-1;null!==n;i--)r=e(r,n.value,i),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 i=0,s=this.head;null!==s&&i<e;i++)s=s.next;for(;null!==s&&i<t;i++,s=s.next)r.push(s.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 i=this.length,s=this.tail;null!==s&&i>t;i--)s=s.prev;for(;null!==s&&i>e;i--,s=s.prev)r.push(s.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,s=this.head;null!==s&&n<e;n++)s=s.next;var o=[];for(n=0;s&&n<t;n++)o.push(s.value),s=this.removeNode(s);null===s&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(n=0;n<r.length;n++)s=i(this,s,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{r(8268)(n)}catch(e){}},6881:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseSnapExecutor:()=>v});var n=r(2972),i=r(1037),s=r(5554),o=r(8094),a=r(1280),u=r(9249),c=r(6815),l=r(201),h=r(1298),d=r(7448),f=r(3909),p=r(8739),m=r(3298),g=r(6107),y=r(8157);const b={code:o.errorCodes.rpc.internal,message:"Execution Environment Error"},w={ping:{struct:y.PingRequestArgumentsStruct,params:[]},executeSnap:{struct:y.ExecuteSnapRequestArgumentsStruct,params:["snapName","sourceCode","endowments"]},terminate:{struct:y.TerminateRequestArgumentsStruct,params:[]},snapRpc:{struct:y.SnapRpcRequestArgumentsStruct,params:["target","handler","origin","request"]}};class v{lastTeardown=0;constructor(e,t){this.snapData=new Map,this.commandStream=e,this.commandStream.on("data",(e=>{this.onCommandRequest(e).catch((e=>{(0,i.logError)(e)}))})),this.rpcStream=t,this.methods=(0,h.getCommandMethodImplementations)(this.startSnap.bind(this),(async(e,t,r)=>{const n=this.snapData.get(e),o=t===i.HandlerType.SnapKeyring?(0,p.wrapKeyring)(this.notify.bind(this),n?.exports.keyring):n?.exports[t];(0,s.assert)(void 0!==o,`No ${t} handler exported for snap "${e}`);let a=await this.executeInSnapContext(e,(()=>o(r)));return void 0===a&&(a=null),(0,s.assert)((0,s.isValidJson)(a),new TypeError("Received non-JSON-serializable value.")),a}),this.onTerminate.bind(this))}errorHandler(e,t){const r=(0,g.constructError)(e),n=(0,o.serializeError)(r,{fallbackError:b,shouldIncludeStack:!1}),i={...t,stack:r?.stack??null};this.notify({method:"UnhandledError",params:{error:{...n,data:i}}})}async onCommandRequest(e){if(!(0,s.isJsonRpcRequest)(e))throw new Error("Command stream received a non-JSON-RPC request.");const{id:t,method:r,params:n}=e;if("rpc.discover"===r)return void this.respond(t,{result:l});if(!(0,s.hasProperty)(w,r))return void this.respond(t,{error:o.ethErrors.rpc.methodNotFound({data:{method:r}}).serialize()});const i=w[r],a=(0,m.sortParamKeys)(i.params,n),[c]=(0,u.validate)(a,i.struct);if(c)this.respond(t,{error:o.ethErrors.rpc.invalidParams({message:`Invalid parameters for method "${r}": ${c.message}.`,data:{method:r,params:a}}).serialize()});else try{const e=await this.methods[r](...a);this.respond(t,{result:e})}catch(e){this.respond(t,{error:(0,o.serializeError)(e,{fallbackError:b})})}}notify(e){if(!(0,s.isValidJson)(e)||!(0,s.isObject)(e))throw new Error("JSON-RPC notifications must be JSON serializable objects");this.commandStream.write({...e,jsonrpc:"2.0"})}respond(e,t){if(!(0,s.isValidJson)(t)||!(0,s.isObject)(t))throw new Error("JSON-RPC responses must be JSON serializable objects.");this.commandStream.write({...t,id:e,jsonrpc:"2.0"})}async startSnap(e,t,r){(0,c.log)(`Starting snap '${e}' in worker.`),this.snapPromiseErrorHandler&&(0,f.removeEventListener)("unhandledrejection",this.snapPromiseErrorHandler),this.snapErrorHandler&&(0,f.removeEventListener)("error",this.snapErrorHandler),this.snapErrorHandler=t=>{this.errorHandler(t.error,{snapName:e})},this.snapPromiseErrorHandler=t=>{this.errorHandler(t instanceof Error?t:t.reason,{snapName:e})};const i=new n.StreamProvider(this.rpcStream,{jsonRpcStreamName:"metamask-provider",rpcMiddleware:[(0,a.createIdRemapMiddleware)()]});await i.initialize();const s=this.createSnapGlobal(i),o=this.createEIP1193Provider(i),u={exports:{}};try{const{endowments:n,teardown:i}=(0,d.createEndowments)(s,o,r);this.snapData.set(e,{idleTeardown:i,runningEvaluations:new Set,exports:{}}),(0,f.addEventListener)("unhandledRejection",this.snapPromiseErrorHandler),(0,f.addEventListener)("error",this.snapErrorHandler);const a=new Compartment({...n,module:u,exports:u.exports,window:{...n},self:{...n}});await this.executeInSnapContext(e,(()=>{a.evaluate(t),this.registerSnapExports(e,u)}))}catch(t){throw this.removeSnap(e),new Error(`Error while running snap '${e}': ${t.message}`)}}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=i.SNAP_EXPORT_NAMES.reduce(((e,r)=>{const n=t.exports[r];return(0,y.validateExport)(r,n)?{...e,[r]:n}:e}),{}))}createSnapGlobal(e){const t=e.request.bind(e),r=async 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_*`."),this.notify({method:"OutboundRequest"});try{return await(0,g.withTeardown)(t(e),this)}finally{this.notify({method:"OutboundResponse"})}},n=new Proxy({},{has:(e,t)=>"string"==typeof t&&["request"].includes(t),get(e,t){if("request"===t)return r}});return harden(n)}createEIP1193Provider(e){const t=e.request.bind(e),r=(0,g.proxyStreamProvider)(e,(async e=>{(0,s.assert)(!String.prototype.startsWith.call(e.method,"snap_"),o.ethErrors.rpc.methodNotFound({data:{method:e.method}})),this.notify({method:"OutboundRequest"});try{return await(0,g.withTeardown)(t(e),this)}finally{this.notify({method:"OutboundResponse"})}}));return harden(r)}removeSnap(e){this.snapData.delete(e)}async executeInSnapContext(e,t){const r=this.snapData.get(e);if(void 0===r)throw new Error(`Tried to execute in context of unknown snap: "${e}".`);let n;const i=new Promise(((t,r)=>n=()=>r(o.ethErrors.rpc.internal(`The snap "${e}" has been terminated during execution.`)))),s={stop:n};try{return r.runningEvaluations.add(s),await Promise.race([t(),i])}finally{r.runningEvaluations.delete(s),0===r.runningEvaluations.size&&(this.lastTeardown+=1,await r.idleTeardown())}}}},1298:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getCommandMethodImplementations:()=>a,getHandlerArguments:()=>o});var n=r(1037),i=r(5554),s=r(8157);function o(e,t,r){switch(t){case n.HandlerType.OnTransaction:{(0,s.assertIsOnTransactionRequestArguments)(r.params);const{transaction:e,chainId:t,transactionOrigin:n}=r.params;return{transaction:e,chainId:t,transactionOrigin:n}}case n.HandlerType.OnRpcRequest:case n.HandlerType.SnapKeyring:return{origin:e,request:r};case n.HandlerType.OnCronjob:return{request:r};default:return(0,i.assertExhaustive)(t)}}function a(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,i)=>await t(e,r,o(n,r,i))??null}}},8472:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(3623),i=r(8840),s=r(9971),o=r(1779),a=r(8589),u=r(5909),c=r(3093),l=r(432);const h=[{endowment:AbortController,name:"AbortController"},{endowment:AbortSignal,name:"AbortSignal"},{endowment:ArrayBuffer,name:"ArrayBuffer"},{endowment:atob,name:"atob"},{endowment:BigInt,name:"BigInt"},{endowment:BigInt64Array,name:"BigInt64Array"},{endowment:BigUint64Array,name:"BigUint64Array"},{endowment:btoa,name:"btoa"},{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"}],d=()=>{const e=[n.default,s.default,o.default,a.default,l.default,u.default,c.default,i.default];return h.forEach((t=>{const r={names:[t.name],factory:()=>({[t.name]:harden(t.endowment)})};e.push(r)})),e}},3623:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=r(8127);const i={names:["crypto","SubtleCrypto"],factory:()=>{if("crypto"in n.rootRealmGlobal&&"object"==typeof n.rootRealmGlobal.crypto&&"SubtleCrypto"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.SubtleCrypto)return{crypto:n.rootRealmGlobal.crypto,SubtleCrypto:n.rootRealmGlobal.SubtleCrypto};const e=r(836).webcrypto;return{crypto:harden(e),SubtleCrypto:harden(e.subtle.constructor)}}}},8840:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=r(8127);const i={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},i=function(...e){return Reflect.construct(n.rootRealmGlobal.Date,0===e.length?[r()]:e,new.target)};return e.forEach((e=>{Reflect.defineProperty(i,e,{configurable:!1,writable:!1,value:"now"===e?r:n.rootRealmGlobal.Date[e]})})),{Date:harden(i)}}}},7448:(e,t,r)=>{"use strict";r.r(t),r.d(t,{createEndowments:()=>o,isConstructor:()=>a});var n=r(5554),i=r(8127);const s=(0,r(8472).default)().reduce(((e,t)=>(t.names.forEach((r=>{e.set(r,t.factory)})),e)),new Map);function o(e,t,r=[]){const o={},u=r.reduce((({allEndowments:e,teardowns:r},u)=>{if(s.has(u)){if(!(0,n.hasProperty)(o,u)){const{teardownFunction:e,...t}=s.get(u)();Object.assign(o,t),e&&r.push(e)}e[u]=o[u]}else if("ethereum"===u)e[u]=t;else{if(!(u in i.rootRealmGlobal))throw new Error(`Unknown endowment: "${u}".`);{const t=i.rootRealmGlobal[u];e[u]="function"!=typeof t||a(t)?t:t.bind(i.rootRealmGlobal)}}return{allEndowments:e,teardowns:r}}),{allEndowments:{snap:e},teardowns:[]});return{endowments:u.allEndowments,teardown:async()=>{await Promise.all(u.teardowns.map((e=>e())))}}}function a(e){return Boolean("string"==typeof e.prototype?.constructor?.name)}},9971:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={names:["setInterval","clearInterval"],factory:()=>{const e=new Map,t=t=>{harden(t);const r=e.get(t);void 0!==r&&(clearInterval(r),e.delete(t))};return{setInterval:harden(((t,r)=>{if("function"!=typeof t)throw new Error("The interval handler must be a function. Received: "+typeof t);harden(t);const n=Object.freeze(Object.create(null)),i=setInterval(t,Math.max(10,r??0));return e.set(n,i),n})),clearInterval:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}}},1779:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=r(8127);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]}),{});return harden({Math:{...e,random:()=>crypto.getRandomValues(new Uint32Array(1))[0]/2**32}})}}},8589:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(6107);class i{#e;#t;constructor(e,t){this.#t=e,this.#e=t}get body(){return this.#t.body}get bodyUsed(){return this.#t.bodyUsed}get headers(){return this.#t.headers}get ok(){return this.#t.ok}get redirected(){return this.#t.redirected}get status(){return this.#t.status}get statusText(){return this.#t.statusText}get type(){return this.#t.type}get url(){return this.#t.url}async text(){return(0,n.withTeardown)(this.#t.text(),this)}async arrayBuffer(){return(0,n.withTeardown)(this.#t.arrayBuffer(),this)}async blob(){return(0,n.withTeardown)(this.#t.blob(),this)}clone(){const e=this.#t.clone();return new i(e,this.#e)}async formData(){return(0,n.withTeardown)(this.#t.formData(),this)}async json(){return(0,n.withTeardown)(this.#t.json(),this)}}const s={names:["fetch"],factory:()=>{const e=new Set,t={lastTeardown:0},r=new FinalizationRegistry((e=>e()));return{fetch:harden((async(s,o)=>{const a=new AbortController;if(null!=o?.signal){const e=o.signal;e.addEventListener("abort",(()=>{a.abort(e.reason)}),{once:!0})}let u,c;try{const r=fetch(s,{...o,signal:a.signal});c={cancel:async()=>{a.abort();try{await r}catch{}}},e.add(c),u=new i(await(0,n.withTeardown)(r,t),t)}finally{void 0!==c&&e.delete(c)}if(null!==u.body){const t=new WeakRef(u.body),n={cancel:async()=>{try{await(t.deref()?.cancel())}catch{}}};e.add(n),r.register(u.body,(()=>e.delete(n)))}return harden(u)})),teardownFunction:async()=>{t.lastTeardown+=1;const r=[];e.forEach((({cancel:e})=>r.push(e()))),e.clear(),await Promise.all(r)}}}}},5909:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={names:["TextDecoder"],factory:()=>({TextDecoder:harden(TextDecoder)})}},3093:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={names:["TextEncoder"],factory:()=>({TextEncoder:harden(TextEncoder)})}},432:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={names:["setTimeout","clearTimeout"],factory:()=>{const e=new Map,t=t=>{const r=e.get(t);void 0!==r&&(clearTimeout(r),e.delete(t))};return{setTimeout:harden(((t,r)=>{if("function"!=typeof t)throw new Error("The timeout handler must be a function. Received: "+typeof t);harden(t);const n=Object.freeze(Object.create(null)),i=setTimeout((()=>{e.delete(n),t()}),Math.max(10,r??0));return e.set(n,i),n})),clearTimeout:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}}},3909:(e,t,r)=>{"use strict";r.r(t),r.d(t,{addEventListener:()=>i,removeEventListener:()=>s});var n=r(8127);function i(e,t){if("addEventListener"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.addEventListener)return n.rootRealmGlobal.addEventListener(e.toLowerCase(),t);if(n.rootRealmGlobal.process&&"on"in n.rootRealmGlobal.process&&"function"==typeof n.rootRealmGlobal.process.on)return n.rootRealmGlobal.process.on(e,t);throw new Error("Platform agnostic addEventListener failed")}function s(e,t){if("removeEventListener"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.removeEventListener)return n.rootRealmGlobal.removeEventListener(e.toLowerCase(),t);if(n.rootRealmGlobal.process&&"removeListener"in n.rootRealmGlobal.process&&"function"==typeof n.rootRealmGlobal.process.removeListener)return n.rootRealmGlobal.process.removeListener(e,t);throw new Error("Platform agnostic removeEventListener failed")}},8127:(e,t,r)=>{"use strict";var n;let i,s;if(r.r(t),r.d(t,{rootRealmGlobal:()=>o,rootRealmGlobalName:()=>a}),function(e){e.globalThis="globalThis",e.global="global",e.self="self",e.window="window"}(n||(n={})),"undefined"!=typeof globalThis)i=globalThis,s=n.globalThis;else if("undefined"!=typeof self)i=self,s=n.self;else if("undefined"!=typeof window)i=window,s=n.window;else{if(void 0===r.g)throw new Error("Unknown realm type; failed to identify global object.");i=r.g,s=n.global}const o=i,a=s},8739:(e,t,r)=>{"use strict";r.r(t),r.d(t,{wrapKeyring:()=>i});var n=r(5554);function i(e,t){if(!t)throw new Error("Keyring not exported");return({request:r})=>{const{method:i,params:s}=r;if(!(i in t))throw new Error(`Keyring does not expose ${i}`);let o=s??[];const a=t[i];(0,n.assert)(void 0!==a);const u=a.bind(t);if("on"===i){const t=o[0];o=[t,(...r)=>((0,n.assert)((0,n.isValidJson)(r),new TypeError("Keyrings .on listener received non-JSON-serializable value.")),e({method:"SnapKeyringEvent",params:{data:t,args:r}}))]}return u(...o)}}},6019:(e,t,r)=>{"use strict";r.r(t),r.d(t,{executeLockdownMore:()=>i});var n=r(1037);function i(){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}}},3225:(e,t,r)=>{"use strict";r.r(t),r.d(t,{executeLockdown:()=>i});var n=r(1037);function i(){try{lockdown({consoleTaming:"unsafe",errorTaming:"unsafe",mathTaming:"unsafe",dateTaming:"unsafe",overrideTaming:"severe"})}catch(e){throw(0,n.logError)("Lockdown failed:",e),e}}},3298:(e,t,r)=>{"use strict";r.r(t),r.d(t,{sortParamKeys:()=>n});const n=(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,i])=>r[e]-r[n])).map((([e,t])=>t))}},6107:(e,t,r)=>{"use strict";r.r(t),r.d(t,{constructError:()=>i,proxyStreamProvider:()=>o,withTeardown:()=>s});var n=r(6815);function i(e){let t;return e instanceof Error?t=e:"string"==typeof e&&(t=new Error(e),delete t.stack),t}async function s(e,t){const r=t.lastTeardown;return new Promise(((i,s)=>{e.then((e=>{t.lastTeardown===r?i(e):(0,n.log)("Late promise received after Snap finished execution. Promise will be dropped.")})).catch((e=>{t.lastTeardown===r?s(e):(0,n.log)("Late promise received after Snap finished execution. Promise will be dropped.")}))}))}function o(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]:void 0})}},8157:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EndowmentStruct:()=>l,ExecuteSnapRequestArgumentsStruct:()=>g,JsonRpcRequestWithoutIdStruct:()=>c,OnTransactionRequestArgumentsStruct:()=>b,PingRequestArgumentsStruct:()=>p,SnapRpcRequestArgumentsStruct:()=>y,TerminateRequestArgumentsStruct:()=>m,assertIsOnTransactionRequestArguments:()=>w,isEndowment:()=>h,isEndowmentsArray:()=>d,validateExport:()=>u});var n=r(1037),i=r(5554),s=r(9249);const o={[n.HandlerType.OnRpcRequest]:a,[n.HandlerType.OnTransaction]:a,[n.HandlerType.SnapKeyring]:function(e){return"object"==typeof e},[n.HandlerType.OnCronjob]:a};function a(e){return"function"==typeof e}function u(e,t){const r=o[e];return r?.(t)??!1}const c=(0,s.assign)((0,s.omit)(i.JsonRpcRequestStruct,["id"]),(0,s.object)({id:(0,s.optional)(i.JsonRpcIdStruct)})),l=(0,s.string)();function h(e){return(0,s.is)(e,l)}function d(e){return Array.isArray(e)&&e.every(h)}const f=(0,s.literal)("OK"),p=(0,s.optional)((0,s.union)([(0,s.literal)(void 0),(0,s.array)()])),m=(0,s.union)([(0,s.literal)(void 0),(0,s.array)()]),g=(0,s.tuple)([(0,s.string)(),(0,s.string)(),(0,s.optional)((0,s.array)(l))]),y=(0,s.tuple)([(0,s.string)(),(0,s.enums)(Object.values(n.HandlerType)),(0,s.string)(),(0,s.assign)(c,(0,s.object)({params:(0,s.optional)((0,s.record)((0,s.string)(),i.JsonStruct))}))]),b=(0,s.object)({transaction:(0,s.record)((0,s.string)(),i.JsonStruct),chainId:n.ChainIdStruct,transactionOrigin:(0,s.nullable)((0,s.string)())});function w(e){(0,i.assertStruct)(e,b,"Invalid request params")}(0,s.assign)(i.JsonRpcSuccessStruct,(0,s.object)({result:f})),i.JsonRpcSuccessStruct},5188:(e,t,r)=>{"use strict";r.r(t),r.d(t,{IFrameSnapExecutor:()=>h});var n=r(9952),i=r.n(n),s=r(5968),o=r(1037),a=r(3171),u=r.n(a),c=r(6881),l=r(6815);class h extends c.BaseSnapExecutor{static initialize(){(0,l.log)("Worker: Connecting to parent.");const e=new s.WindowPostMessageStream({name:"child",target:"parent",targetWindow:self.parent,targetOrigin:"*"}),t=new(i());u()(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 h(r,n)}}},6815:(e,t,r)=>{"use strict";r.r(t),r.d(t,{log:()=>s});var n=r(1037),i=r(5554);const s=(0,i.createModuleLogger)(n.snapsLogger,"snaps-execution-environments")},7178:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnapCaveatType=void 0,function(e){e.PermittedDerivationPaths="permittedDerivationPaths",e.PermittedCoinTypes="permittedCoinTypes",e.SnapKeyring="snapKeyring",e.SnapCronjob="snapCronjob",e.TransactionOrigin="transactionOrigin",e.RpcOrigin="rpcOrigin",e.SnapIds="snapIds"}(t.SnapCaveatType||(t.SnapCaveatType={}))},8376:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checksumFiles=t.checksum=void 0;const n=r(5554),i=r(6053),s=r(6404);function o(e){const t=e instanceof s.VirtualFile?e.value:e;return(0,i.sha256)(t)}t.checksum=o,t.checksumFiles=function(e){return o((0,n.concatBytes)([...e].sort(((e,t)=>((0,n.assert)(e.path!==t.path,"Tried to sort files with non-unique paths."),e.path<t.path?-1:1))).map((e=>o(e)))))}},9703:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCronjobSpecificationArray=t.CronjobSpecificationArrayStruct=t.isCronjobSpecification=t.CronjobSpecificationStruct=t.parseCronExpression=t.CronExpressionStruct=t.CronjobRpcRequestStruct=void 0;const n=r(5554),i=r(3601),s=r(9249);t.CronjobRpcRequestStruct=(0,s.assign)((0,s.partial)((0,s.pick)(n.JsonRpcRequestStruct,["id","jsonrpc"])),(0,s.omit)(n.JsonRpcRequestStruct,["id","jsonrpc"])),t.CronExpressionStruct=(0,s.refine)((0,s.coerce)((0,s.string)(),(0,s.object)({minute:(0,s.optional)((0,s.string)()),hour:(0,s.optional)((0,s.string)()),dayOfMonth:(0,s.optional)((0,s.string)()),month:(0,s.optional)((0,s.string)()),dayOfWeek:(0,s.optional)((0,s.string)())}),(e=>{var t,r,n,i,s;return`${null!==(t=e.minute)&&void 0!==t?t:"*"} ${null!==(r=e.hour)&&void 0!==r?r:"*"} ${null!==(n=e.dayOfMonth)&&void 0!==n?n:"*"} ${null!==(i=e.month)&&void 0!==i?i:"*"} ${null!==(s=e.dayOfWeek)&&void 0!==s?s:"*"}`})),"CronExpression",(e=>{try{return(0,i.parseExpression)(e),!0}catch(e){return!1}})),t.parseCronExpression=function(e){const r=(0,s.create)(e,t.CronExpressionStruct);return(0,i.parseExpression)(r)},t.CronjobSpecificationStruct=(0,s.object)({expression:t.CronExpressionStruct,request:t.CronjobRpcRequestStruct}),t.isCronjobSpecification=function(e){try{return(0,s.create)(e,t.CronjobSpecificationStruct),!0}catch(e){return!1}},t.CronjobSpecificationArrayStruct=(0,s.array)(t.CronjobSpecificationStruct),t.isCronjobSpecificationArray=function(e){try{return(0,s.create)(e,t.CronjobSpecificationArrayStruct),!0}catch(e){return!1}}},7706:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.deepClone=void 0;const i=n(r(7152));t.deepClone=(0,i.default)({proto:!1,circles:!1})},4214:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_ENDOWMENTS=void 0,t.DEFAULT_ENDOWMENTS=Object.freeze(["atob","btoa","BigInt","console","crypto","Date","Math","setTimeout","clearTimeout","SubtleCrypto","TextDecoder","TextEncoder","URL","setInterval","clearInterval","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","DataView","ArrayBuffer","AbortController","AbortSignal"])},5197:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STATE_ENCRYPTION_MAGIC_VALUE=t.SIP_6_MAGIC_VALUE=void 0,t.SIP_6_MAGIC_VALUE="1399742832'",t.STATE_ENCRYPTION_MAGIC_VALUE="572232532'"},8859:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=t.flatten=void 0;t.flatten=e=>e.reduce(((e,t)=>Array.isArray(t)?[...e,...t]:(e.push(t),e)),[]);t.flatMap=(e,r)=>(0,t.flatten)(e.map(r))},5355:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWindow=void 0,t.createWindow=async function(e,t){return await new Promise(((r,n)=>{const i=document.createElement("iframe");i.setAttribute("id",t),i.setAttribute("sandbox","allow-scripts"),i.setAttribute("src",e),document.body.appendChild(i),i.addEventListener("load",(()=>{i.contentWindow?r(i.contentWindow):n(new Error(`iframe.contentWindow not present on load for job "${t}".`))}))}))}},1037:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=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(t,"__esModule",{value:!0}),i(r(7178),t),i(r(8376),t),i(r(9703),t),i(r(7706),t),i(r(4214),t),i(r(5197),t),i(r(8859),t),i(r(5355),t),i(r(6605),t),i(r(1677),t),i(r(7538),t),i(r(4175),t),i(r(5002),t),i(r(3776),t),i(r(9652),t),i(r(8545),t),i(r(5993),t),i(r(7048),t),i(r(6191),t),i(r(2407),t)},1677:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsJsonRpcSuccess=t.assertIsRpcOrigins=t.RpcOriginsStruct=void 0;const n=r(5554),i=r(9249);t.RpcOriginsStruct=(0,i.refine)((0,i.object)({dapps:(0,i.optional)((0,i.boolean)()),snaps:(0,i.optional)((0,i.boolean)())}),"RPC origins",(e=>{if(!Object.values(e).some(Boolean))throw new Error("Must specify at least one JSON-RPC origin");return!0})),t.assertIsRpcOrigins=function(e,r){(0,n.assertStruct)(e,t.RpcOriginsStruct,"Invalid JSON-RPC origins",r)},t.assertIsJsonRpcSuccess=function(e){if(!(0,n.isJsonRpcSuccess)(e)){if((0,n.isJsonRpcFailure)(e))throw new Error(`JSON-RPC request failed: ${e.error.message}`);throw new Error("Invalid JSON-RPC response.")}}},7538:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logWarning=t.logError=t.logInfo=t.snapsLogger=void 0;const n=r(5554);t.snapsLogger=(0,n.createProjectLogger)("snaps"),t.logInfo=function(e,...t){console.log(e,...t)},t.logError=function(e,...t){console.error(e,...t)},t.logWarning=function(e,...t){console.warn(e,...t)}},4175:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=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(t,"__esModule",{value:!0}),i(r(6410),t)},6410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSnapManifest=t.assertIsSnapManifest=t.isSnapManifest=t.SnapManifestStruct=t.PermissionsStruct=t.SnapGetBip32EntropyPermissionsStruct=t.Bip32EntropyStruct=t.bip32entropy=t.Bip32PathStruct=void 0;const n=r(5554),i=r(9249),s=r(9703),o=r(5197),a=r(1677),u=r(5002),c=r(7048),l=[o.SIP_6_MAGIC_VALUE,o.STATE_ENCRYPTION_MAGIC_VALUE],h=/^\d+'?$/u;t.Bip32PathStruct=(0,i.refine)((0,i.array)((0,i.string)()),"BIP-32 path",(e=>0===e.length?"Path must be a non-empty BIP-32 derivation path array":"m"!==e[0]?'Path must start with "m".':e.length<3?"Paths must have a length of at least three.":e.slice(1).some((e=>!h.test(e)))?"Path must be a valid BIP-32 derivation path array.":!l.includes(e[1])||`The purpose "${e[1]}" is not allowed for entropy derivation.`));t.bip32entropy=e=>(0,i.refine)(e,"BIP-32 entropy",(e=>"ed25519"!==e.curve||!e.path.slice(1).some((e=>!e.endsWith("'")))||"Ed25519 does not support unhardened paths.")),t.Bip32EntropyStruct=(0,t.bip32entropy)((0,i.type)({path:t.Bip32PathStruct,curve:(0,i.enums)(["ed25519","secp256k1"])})),t.SnapGetBip32EntropyPermissionsStruct=(0,i.size)((0,i.array)(t.Bip32EntropyStruct),1,1/0),t.PermissionsStruct=(0,i.type)({"endowment:long-running":(0,i.optional)((0,i.object)({})),"endowment:network-access":(0,i.optional)((0,i.object)({})),"endowment:webassembly":(0,i.optional)((0,i.object)({})),"endowment:transaction-insight":(0,i.optional)((0,i.object)({allowTransactionOrigin:(0,i.optional)((0,i.boolean)())})),"endowment:cronjob":(0,i.optional)((0,i.object)({jobs:s.CronjobSpecificationArrayStruct})),"endowment:rpc":(0,i.optional)(a.RpcOriginsStruct),snap_confirm:(0,i.optional)((0,i.object)({})),snap_manageState:(0,i.optional)((0,i.object)({})),snap_notify:(0,i.optional)((0,i.object)({})),snap_getBip32Entropy:(0,i.optional)(t.SnapGetBip32EntropyPermissionsStruct),snap_getBip32PublicKey:(0,i.optional)(t.SnapGetBip32EntropyPermissionsStruct),snap_getBip44Entropy:(0,i.optional)((0,i.size)((0,i.array)((0,i.object)({coinType:(0,i.size)((0,i.integer)(),0,2**32-1)})),1,1/0)),snap_getEntropy:(0,i.optional)((0,i.object)({})),"endowment:keyring":(0,i.optional)((0,i.object)({namespaces:u.NamespacesStruct}))}),t.SnapManifestStruct=(0,i.object)({version:n.VersionStruct,description:(0,i.size)((0,i.string)(),1,280),proposedName:(0,i.size)((0,i.pattern)((0,i.string)(),/^(?:[A-Za-z0-9-_]+( [A-Za-z0-9-_]+)*)|(?:(?:@[A-Za-z0-9-*~][A-Za-z0-9-*._~]*\/)?[A-Za-z0-9-~][A-Za-z0-9-._~]*)$/u),1,214),repository:(0,i.optional)((0,i.object)({type:(0,i.size)((0,i.string)(),1,1/0),url:(0,i.size)((0,i.string)(),1,1/0)})),source:(0,i.object)({shasum:n.ChecksumStruct,location:(0,i.object)({npm:(0,i.object)({filePath:(0,i.size)((0,i.string)(),1,1/0),iconPath:(0,i.optional)((0,i.size)((0,i.string)(),1,1/0)),packageName:c.NameStruct,registry:(0,i.union)([(0,i.literal)("https://registry.npmjs.org"),(0,i.literal)("https://registry.npmjs.org/")])})})}),initialPermissions:t.PermissionsStruct,manifestVersion:(0,i.literal)("0.1")}),t.isSnapManifest=function(e){return(0,i.is)(e,t.SnapManifestStruct)},t.assertIsSnapManifest=function(e){(0,n.assertStruct)(e,t.SnapManifestStruct,`"${c.NpmSnapFileNames.Manifest}" is invalid`)},t.createSnapManifest=function(e){return(0,i.create)(e,t.SnapManifestStruct)}},5002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsNamespacesObject=t.isNamespacesObject=t.isNamespace=t.assertIsMultiChainRequest=t.isMultiChainRequest=t.assertIsConnectArguments=t.isConnectArguments=t.isAccountIdArray=t.isAccountId=t.isChainId=t.isNamespaceId=t.MultiChainRequestStruct=t.RequestArgumentsStruct=t.ConnectArgumentsStruct=t.assertIsSession=t.SessionStruct=t.NamespacesStruct=t.NamespaceIdStruct=t.SessionNamespaceStruct=t.RequestNamespaceStruct=t.NamespaceStruct=t.ChainStruct=t.AccountIdArrayStruct=t.AccountIdStruct=t.ChainIdStruct=t.LimitedString=t.parseAccountId=t.parseChainId=t.ACCOUNT_ID_REGEX=t.CHAIN_ID_REGEX=void 0;const n=r(5554),i=r(9249);t.CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})$/u,t.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,t.parseChainId=function(e){const r=t.CHAIN_ID_REGEX.exec(e);if(!(null==r?void 0:r.groups))throw new Error("Invalid chain ID.");return{namespace:r.groups.namespace,reference:r.groups.reference}},t.parseAccountId=function(e){const r=t.ACCOUNT_ID_REGEX.exec(e);if(!(null==r?void 0:r.groups))throw new Error("Invalid account ID.");return{address:r.groups.accountAddress,chainId:r.groups.chainId,chain:{namespace:r.groups.namespace,reference:r.groups.reference}}},t.LimitedString=(0,i.size)((0,i.string)(),1,40),t.ChainIdStruct=(0,i.pattern)((0,i.string)(),t.CHAIN_ID_REGEX),t.AccountIdStruct=(0,i.pattern)((0,i.string)(),t.ACCOUNT_ID_REGEX),t.AccountIdArrayStruct=(0,i.array)(t.AccountIdStruct),t.ChainStruct=(0,i.object)({id:t.ChainIdStruct,name:t.LimitedString}),t.NamespaceStruct=(0,i.object)({chains:(0,i.array)(t.ChainStruct),methods:(0,i.optional)((0,i.array)(t.LimitedString)),events:(0,i.optional)((0,i.array)(t.LimitedString))}),t.RequestNamespaceStruct=(0,i.assign)((0,i.omit)(t.NamespaceStruct,["chains"]),(0,i.object)({chains:(0,i.array)(t.ChainIdStruct)})),t.SessionNamespaceStruct=(0,i.assign)(t.RequestNamespaceStruct,(0,i.object)({accounts:(0,i.array)(t.AccountIdStruct)})),t.NamespaceIdStruct=(0,i.pattern)((0,i.string)(),/^[-a-z0-9]{3,8}$/u),t.NamespacesStruct=(0,i.record)(t.NamespaceIdStruct,t.NamespaceStruct),t.SessionStruct=(0,i.object)({namespaces:(0,i.record)(t.NamespaceIdStruct,t.SessionNamespaceStruct)}),t.assertIsSession=function(e){(0,n.assertStruct)(e,t.SessionStruct,"Invalid session")},t.ConnectArgumentsStruct=(0,i.object)({requiredNamespaces:(0,i.record)(t.NamespaceIdStruct,t.RequestNamespaceStruct)}),t.RequestArgumentsStruct=(0,i.assign)((0,i.partial)((0,i.pick)(n.JsonRpcRequestStruct,["id","jsonrpc"])),(0,i.omit)(n.JsonRpcRequestStruct,["id","jsonrpc"])),t.MultiChainRequestStruct=(0,i.object)({chainId:t.ChainIdStruct,request:t.RequestArgumentsStruct}),t.isNamespaceId=function(e){return(0,i.is)(e,t.NamespaceIdStruct)},t.isChainId=function(e){return(0,i.is)(e,t.ChainIdStruct)},t.isAccountId=function(e){return(0,i.is)(e,t.AccountIdStruct)},t.isAccountIdArray=function(e){return(0,i.is)(e,t.AccountIdArrayStruct)},t.isConnectArguments=function(e){return(0,i.is)(e,t.ConnectArgumentsStruct)},t.assertIsConnectArguments=function(e){(0,n.assertStruct)(e,t.ConnectArgumentsStruct,"Invalid connect arguments")},t.isMultiChainRequest=function(e){return(0,i.is)(e,t.MultiChainRequestStruct)},t.assertIsMultiChainRequest=function(e){(0,n.assertStruct)(e,t.MultiChainRequestStruct,"Invalid request arguments")},t.isNamespace=function(e){return(0,i.is)(e,t.NamespaceStruct)},t.isNamespacesObject=function(e){return(0,i.is)(e,t.NamespacesStruct)},t.assertIsNamespacesObject=function(e,r){(0,n.assertStruct)(e,t.NamespacesStruct,"Invalid namespaces object",r)}},3776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsMetaMaskNotification=t.isMetaMaskNotification=t.MetaMaskNotificationStruct=t.assertIsEvent=t.isEvent=t.EventStruct=void 0;const n=r(5554),i=r(9249),s=r(5002);t.EventStruct=(0,i.object)({name:(0,i.string)(),data:(0,i.unknown)()}),t.isEvent=function(e){return(0,i.is)(e,t.EventStruct)},t.assertIsEvent=function(e){(0,n.assertStruct)(e,t.EventStruct,"Invalid event")},t.MetaMaskNotificationStruct=(0,i.object)({method:(0,i.literal)("multichainHack_metamask_event"),params:(0,i.object)({chainId:s.ChainIdStruct,event:t.EventStruct})}),t.isMetaMaskNotification=function(e){return(0,i.is)(e,t.MetaMaskNotificationStruct)},t.assertIsMetaMaskNotification=function(e){(0,n.assertStruct)(e,t.MetaMaskNotificationStruct,"Invalid notification")}},9652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEntries=void 0;t.fromEntries=e=>e.reduce(((e,[t,r])=>Object.assign(Object.assign({},e),{[t]:r})),{})},8545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeRelative=void 0;const n=r(5554);t.normalizeRelative=function(e){return(0,n.assert)(!e.startsWith("/")),(0,n.assert)(-1===e.search(/:|\/\//u),`Path "${e}" potentially an URI instead of local relative`),e.startsWith("./")?e.slice(2):e}},5993:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.verifyRequestedSnapPermissions=t.isSnapPermitted=t.isCaipChainId=t.validateSnapId=t.getSnapPrefix=t.HttpSnapIdStruct=t.NpmSnapIdStruct=t.LocalSnapIdStruct=t.LOCALHOST_HOSTNAMES=t.validateSnapShasum=t.getSnapChecksum=t.ProgrammaticallyFixableSnapError=t.SnapStatusEvents=t.SnapStatus=t.PROPOSED_NAME_REGEX=void 0;const i=r(5554),s=r(6237),o=n(r(5695)),a=r(9249),u=n(r(9189)),c=r(7178),l=r(8376),h=r(7048);t.PROPOSED_NAME_REGEX=/^(?:[A-Za-z0-9-_]+( [A-Za-z0-9-_]+)*)|(?:(?:@[A-Za-z0-9-*~][A-Za-z0-9-*._~]*\/)?[A-Za-z0-9-~][A-Za-z0-9-._~]*)$/u,function(e){e.Installing="installing",e.Updating="updating",e.Running="running",e.Stopped="stopped",e.Crashed="crashed"}(t.SnapStatus||(t.SnapStatus={})),function(e){e.Start="START",e.Stop="STOP",e.Crash="CRASH",e.Update="UPDATE"}(t.SnapStatusEvents||(t.SnapStatusEvents={}));class d extends Error{constructor(e,t){super(e),this.reason=t}}function f(e){const t=e.clone();return delete t.result.source.shasum,t.value=(0,o.default)(t.result),t}function p(e){const{manifest:t,sourceCode:r,svgIcon:n}=e,i=[f(t),r,n].filter((e=>void 0!==e));return s.base64.encode((0,l.checksumFiles)(i))}t.ProgrammaticallyFixableSnapError=d,t.getSnapChecksum=p,t.validateSnapShasum=function(e,t="Invalid Snap manifest: manifest shasum does not match computed shasum."){if(e.manifest.result.source.shasum!==p(e))throw new d(t,h.SnapValidationFailureReason.ShasumMismatch)},t.LOCALHOST_HOSTNAMES=["localhost","127.0.0.1","[::1]"];const m=(0,h.uri)({protocol:(0,a.enums)(["http:","https:"]),hostname:(0,a.enums)(t.LOCALHOST_HOSTNAMES),hash:(0,a.empty)((0,a.string)()),search:(0,a.empty)((0,a.string)())});t.LocalSnapIdStruct=(0,a.refine)((0,a.string)(),"local Snap Id",(e=>{if(!e.startsWith(h.SnapIdPrefixes.local))return`Expected local Snap ID, got "${e}".`;const[t]=(0,a.validate)(e.slice(h.SnapIdPrefixes.local.length),m);return null==t||t})),t.NpmSnapIdStruct=(0,a.intersection)([(0,a.string)(),(0,h.uri)({protocol:(0,a.literal)(h.SnapIdPrefixes.npm),pathname:(0,a.refine)((0,a.string)(),"package name",(function*(e){const t=e.startsWith("/")?e.slice(1):e,{errors:r,validForNewPackages:n,warnings:s}=(0,u.default)(t);return n||(void 0===r?((0,i.assert)(void 0!==s),yield*s):yield*r),!0})),search:(0,a.empty)((0,a.string)()),hash:(0,a.empty)((0,a.string)())})]),t.HttpSnapIdStruct=(0,a.intersection)([(0,a.string)(),(0,h.uri)({protocol:(0,a.enums)(["http:","https:"]),search:(0,a.empty)((0,a.string)()),hash:(0,a.empty)((0,a.string)())})]),t.getSnapPrefix=function(e){const t=Object.values(h.SnapIdPrefixes).find((t=>e.startsWith(t)));if(void 0!==t)return t;throw new Error(`Invalid or no prefix found for "${e}"`)},t.validateSnapId=function(e){if(!e||"string"!=typeof e)throw new Error("Invalid snap id. Not a string.");for(const t of Object.values(h.SnapIdPrefixes))if(e.startsWith(t)&&e.replace(t,"").length>0)return;throw new Error(`Invalid snap id. Unknown prefix. Received: "${e}".`)},t.isCaipChainId=function(e){return"string"==typeof e&&/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})$/u.test(e)},t.isSnapPermitted=function(e,t){var r,n,i,s;return Boolean(null===(s=(null!==(i=null===(n=null===(r=null==e?void 0:e.wallet_snap)||void 0===r?void 0:r.caveats)||void 0===n?void 0:n.find((e=>e.type===c.SnapCaveatType.SnapIds)))&&void 0!==i?i:{}).value)||void 0===s?void 0:s[t])},t.verifyRequestedSnapPermissions=function(e){(0,i.assert)((0,i.isObject)(e),"Requested permissions must be an object.");const{wallet_snap:t}=e;(0,i.assert)((0,i.isObject)(t),"wallet_snap is missing from the requested permissions.");const{caveats:r}=t;(0,i.assert)(Array.isArray(r)&&1===r.length,"wallet_snap must have a caveat property with a single-item array value.");const[n]=r;(0,i.assert)((0,i.isObject)(n)&&n.type===c.SnapCaveatType.SnapIds&&(0,i.isObject)(n.value),`The requested permissions do not have a valid ${c.SnapCaveatType.SnapIds} caveat.`)}},7048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WALLET_SNAP_PERMISSION_KEY=t.isValidUrl=t.uri=t.SNAP_EXPORT_NAMES=t.HandlerType=t.SNAP_STREAM_NAMES=t.SnapValidationFailureReason=t.SnapIdPrefixes=t.assertIsNpmSnapPackageJson=t.isNpmSnapPackageJson=t.NpmSnapPackageJsonStruct=t.NameStruct=t.NpmSnapFileNames=void 0;const n=r(5554),i=r(9249);var s,o;!function(e){e.PackageJson="package.json",e.Manifest="snap.manifest.json"}(s=t.NpmSnapFileNames||(t.NpmSnapFileNames={})),t.NameStruct=(0,i.size)((0,i.pattern)((0,i.string)(),/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214),t.NpmSnapPackageJsonStruct=(0,i.type)({version:n.VersionStruct,name:t.NameStruct,main:(0,i.optional)((0,i.size)((0,i.string)(),1,1/0)),repository:(0,i.optional)((0,i.object)({type:(0,i.size)((0,i.string)(),1,1/0),url:(0,i.size)((0,i.string)(),1,1/0)}))}),t.isNpmSnapPackageJson=function(e){return(0,i.is)(e,t.NpmSnapPackageJsonStruct)},t.assertIsNpmSnapPackageJson=function(e){(0,n.assertStruct)(e,t.NpmSnapPackageJsonStruct,`"${s.PackageJson}" is invalid`)},function(e){e.npm="npm:",e.local="local:"}(t.SnapIdPrefixes||(t.SnapIdPrefixes={})),function(e){e.NameMismatch='"name" field mismatch',e.VersionMismatch='"version" field mismatch',e.RepositoryMismatch='"repository" field mismatch',e.ShasumMismatch='"shasum" field mismatch'}(t.SnapValidationFailureReason||(t.SnapValidationFailureReason={})),function(e){e.JSON_RPC="jsonRpc",e.COMMAND="command"}(t.SNAP_STREAM_NAMES||(t.SNAP_STREAM_NAMES={})),function(e){e.OnRpcRequest="onRpcRequest",e.OnTransaction="onTransaction",e.SnapKeyring="keyring",e.OnCronjob="onCronjob"}(o=t.HandlerType||(t.HandlerType={})),t.SNAP_EXPORT_NAMES=Object.values(o);t.uri=(e={})=>(0,i.refine)((0,i.union)([(0,i.string)(),(0,i.instance)(URL)]),"uri",(t=>{try{const r=new URL(t),n=(0,i.type)(e);return(0,i.assert)(r,n),!0}catch(e){return`Expected URL, got "${t.toString()}".`}})),t.isValidUrl=function(e,r={}){return(0,i.is)(e,(0,t.uri)(r))},t.WALLET_SNAP_PERMISSION_KEY="wallet_snap"},6191:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveVersionRange=t.getTargetVersion=t.DEFAULT_REQUESTED_SNAP_VERSION=void 0;const n=r(5554),i=r(7699),s=r(9249);t.DEFAULT_REQUESTED_SNAP_VERSION="*",t.getTargetVersion=function(e,t){const r=(0,i.maxSatisfying)(e,t);return r||(0,i.maxSatisfying)(e,t,{includePrerelease:!0})},t.resolveVersionRange=function(e){return void 0===e||"latest"===e?[void 0,t.DEFAULT_REQUESTED_SNAP_VERSION]:(0,s.validate)(e,n.VersionRangeStruct)}},6404:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualFile=void 0;const n=r(5554),i=r(7706);class s{constructor(e){var t,r,n,i;let s;s="string"==typeof e||e instanceof Uint8Array?{value:e}:e,this.value=null!==(t=null==s?void 0:s.value)&&void 0!==t?t:"",this.result=null!==(r=null==s?void 0:s.result)&&void 0!==r?r:void 0,this.data=null!==(n=null==s?void 0:s.data)&&void 0!==n?n:{},this.path=null!==(i=null==s?void 0:s.path)&&void 0!==i?i:"/"}toString(e){if("string"==typeof this.value)return(0,n.assert)(void 0===e,"Tried to encode string."),this.value;return new TextDecoder(e).decode(this.value)}clone(){const e=new s;return"string"==typeof this.value?e.value=this.value:e.value=this.value.slice(0),e.result=(0,i.deepClone)(this.result),e.data=(0,i.deepClone)(this.data),e.path=this.path,e}}t.VirtualFile=s},2407:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=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(t,"__esModule",{value:!0}),i(r(6404),t)},4857:()=>{},6831:()=>{},3558:()=>{},4854:()=>{},6602:()=>{},7267:()=>{},9255:()=>{},836:()=>{},9249:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Struct:()=>l,StructError:()=>n,any:()=>O,array:()=>M,assert:()=>h,assign:()=>g,bigint:()=>x,boolean:()=>T,coerce:()=>Y,create:()=>d,date:()=>C,defaulted:()=>X,define:()=>y,deprecated:()=>b,dynamic:()=>w,empty:()=>Q,enums:()=>I,func:()=>A,instance:()=>k,integer:()=>N,intersection:()=>j,is:()=>p,lazy:()=>v,literal:()=>P,map:()=>L,mask:()=>f,max:()=>te,min:()=>re,never:()=>D,nonempty:()=>ne,nullable:()=>$,number:()=>B,object:()=>F,omit:()=>S,optional:()=>U,partial:()=>E,pattern:()=>ie,pick:()=>_,record:()=>V,refine:()=>oe,regexp:()=>q,set:()=>W,size:()=>se,string:()=>z,struct:()=>R,trimmed:()=>K,tuple:()=>J,type:()=>H,union:()=>G,unknown:()=>Z,validate:()=>m});class n extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...s}=e,{path:o}=e,a=0===o.length?n:`At path: ${o.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function i(e){return"object"==typeof e&&null!=e}function s(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function o(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:s}=t,{type:a}=r,{refinement:u,message:c=`Expected a value of type \`${a}\`${u?` with refinement \`${u}\``:""}, but received: \`${o(n)}\``}=e;return{value:n,type:a,refinement:u,key:i[i.length-1],path:i,branch:s,...e,message:c}}function*u(e,t,r,n){var s;i(s=e)&&"function"==typeof s[Symbol.iterator]||(e=[e]);for(const i of e){const e=a(i,t,r,n);e&&(yield e)}}function*c(e,t,r={}){const{path:n=[],branch:s=[e],coerce:o=!1,mask:a=!1}=r,u={path:n,branch:s};if(o&&(e=t.coercer(e,u),a&&"type"!==t.type&&i(t.schema)&&i(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let l="valid";for(const n of t.validator(e,u))n.explanation=r.message,l="not_valid",yield[n,void 0];for(let[h,d,f]of t.entries(e,u)){const t=c(d,f,{path:void 0===h?n:[...n,h],branch:void 0===h?s:[...s,d],coerce:o,mask:a,message:r.message});for(const r of t)r[0]?(l=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):o&&(d=r[1],void 0===h?e=d:e instanceof Map?e.set(h,d):e instanceof Set?e.add(d):i(e)&&(void 0!==d||h in e)&&(e[h]=d))}if("not_valid"!==l)for(const n of t.refiner(e,u))n.explanation=r.message,l="not_refined",yield[n,void 0];"valid"===l&&(yield[void 0,e])}class l{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:s=(e=>e),entries:o=function*(){}}=e;this.type=t,this.schema=r,this.entries=o,this.coercer=s,this.validator=n?(e,t)=>u(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>u(i(e,t),t,this,e):()=>[]}assert(e,t){return h(e,this,t)}create(e,t){return d(e,this,t)}is(e){return p(e,this)}mask(e,t){return f(e,this,t)}validate(e,t={}){return m(e,this,t)}}function h(e,t,r){const n=m(e,t,{message:r});if(n[0])throw n[0]}function d(e,t,r){const n=m(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function f(e,t,r){const n=m(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function p(e,t){return!m(e,t)[0]}function m(e,t,r={}){const i=c(e,t,r),s=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(i);if(s[0]){return[new n(s[0],(function*(){for(const e of i)e[0]&&(yield e[0])})),void 0]}return[void 0,s[1]]}function g(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?H(n):F(n)}function y(e,t){return new l({type:e,schema:null,validator:t})}function b(e,t){return new l({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})}function w(e){return new l({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)})}function v(e){let t;return new l({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))})}function S(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?H(n):F(n)}function E(e){const t=e instanceof l?{...e.schema}:{...e};for(const e in t)t[e]=U(t[e]);return F(t)}function _(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return F(n)}function R(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),y(e,t)}function O(){return y("any",(()=>!0))}function M(e){return new l({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: ${o(e)}`})}function x(){return y("bigint",(e=>"bigint"==typeof e))}function T(){return y("boolean",(e=>"boolean"==typeof e))}function C(){return y("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${o(e)}`))}function I(e){const t={},r=e.map((e=>o(e))).join();for(const r of e)t[r]=r;return new l({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${o(t)}`})}function A(){return y("func",(e=>"function"==typeof e||`Expected a function, but received: ${o(e)}`))}function k(e){return y("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${o(t)}`))}function N(){return y("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${o(e)}`))}function j(e){return new l({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)}})}function P(e){const t=o(e),r=typeof e;return new l({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${o(r)}`})}function L(e,t){return new l({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,e],yield[n,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${o(e)}`})}function D(){return y("never",(()=>!1))}function $(e){return new l({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function B(){return y("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${o(e)}`))}function F(e){const t=e?Object.keys(e):[],r=D();return new l({type:"object",schema:e||null,*entries(n){if(e&&i(n)){const i=new Set(Object.keys(n));for(const r of t)i.delete(r),yield[r,n[r],e[r]];for(const e of i)yield[e,n[e],r]}},validator:e=>i(e)||`Expected an object, but received: ${o(e)}`,coercer:e=>i(e)?{...e}:e})}function U(e){return new l({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function V(e,t){return new l({type:"record",schema:null,*entries(r){if(i(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>i(e)||`Expected an object, but received: ${o(e)}`})}function q(){return y("regexp",(e=>e instanceof RegExp))}function W(e){return new l({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: ${o(e)}`})}function z(){return y("string",(e=>"string"==typeof e||`Expected a string, but received: ${o(e)}`))}function J(e){const t=D();return new l({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${o(e)}`})}function H(e){const t=Object.keys(e);return new l({type:"type",schema:e,*entries(r){if(i(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>i(e)||`Expected an object, but received: ${o(e)}`,coercer:e=>i(e)?{...e}:e})}function G(e){const t=e.map((e=>e.type)).join(" | ");return new l({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]=c(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: ${o(r)}`,...i]}})}function Z(){return y("unknown",(()=>!0))}function Y(e,t,r){return new l({...e,coercer:(n,i)=>p(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}function X(e,t,r={}){return Y(e,Z(),(e=>{const n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&s(e)&&s(n)){const t={...e};let r=!1;for(const e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))}function K(e){return Y(e,z(),(e=>e.trim()))}function Q(e){return oe(e,"empty",(t=>{const r=ee(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t,r={}){const{exclusive:n}=r;return oe(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))}function re(e,t,r={}){const{exclusive:n}=r;return oe(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))}function ne(e){return oe(e,"nonempty",(t=>ee(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function ie(e,t){return oe(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))}function se(e,t,r=t){const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return oe(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${i} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:s}=e;return t<=s&&s<=r||`${n} with a size ${i} but received one with a size of \`${s}\``}{const{length:s}=e;return t<=s&&s<=r||`${n} with a length ${i} but received one with a length of \`${s}\``}}))}function oe(e,t,r){return new l({...e,*refiner(n,i){yield*e.refiner(n,i);const s=u(r(n,i),i,e,n);for(const e of s)yield{...e,refinement:t}}})}},5543:e=>{"use strict";e.exports=JSON.parse('{"CHROME_ID":"nkbihfbeogaeaoehlefnkodbefgpgknn","FIREFOX_ID":"webextension@metamask.io"}')},201:e=>{"use strict";e.exports=JSON.parse('{"openrpc":"1.2.4","info":{"title":"MetaMask Snaps Execution Environment API","version":"0.0.0-development"},"methods":[{"name":"ping","description":"confirms that a connection has been established with the execution environment","params":[],"result":{"name":"PingResult","schema":{"$ref":"#/components/schemas/OK"}}},{"name":"terminate","description":"tells the execution environment that it is being shut down","params":[],"result":{"name":"TerminateResult","schema":{"$ref":"#/components/schemas/OK"}}},{"name":"executeSnap","description":"executes a snap in the environment. The snap can then be interacted with via `snapRpc`","params":[{"name":"snapName","required":true,"description":"the name of the snap","schema":{"title":"SnapName","type":"string"}},{"name":"sourceCode","description":"a snaps source code that gets executed in the environment","required":true,"schema":{"title":"SourceCode","type":"string"}},{"name":"endowments","description":"A list of endowments to provide to SES","required":false,"schema":{"title":"Endowments","description":"An array of the names of the endowments","type":"array","items":{"title":"Endowment","type":"string"}}}],"result":{"name":"executeSnapResult","schema":{"$ref":"#/components/schemas/OK"}},"examples":[{"name":"BasicTestSnapExecuteExample","params":[{"name":"snapName","value":"TestSnap"},{"name":"sourceCode","value":"module.exports.onRpcRequest = async ({ request }) => { return request.method + request.id }"}],"result":{"name":"BasicTestSnapExampleResult","value":"OK"}}]},{"name":"snapRpc","params":[{"name":"target","required":true,"description":"the name of the snap","schema":{"title":"Target","type":"string"}},{"name":"handler","required":true,"description":"the handler to trigger on the snap","schema":{"title":"Handler","type":"string","enum":["onRpcRequest","onTransaction","keyring"]}},{"name":"origin","required":true,"description":"Origin of the snap JSON-RPC request","schema":{"title":"Origin","type":"string"}},{"name":"request","required":true,"description":"JSON-RPC request","schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}],"result":{"name":"HandleSnapRpcResult","schema":{"title":"SnapRpcResult"}},"examples":[{"name":"TestSnapExample","params":[{"name":"target","value":"TestSnap"},{"name":"origin","value":"foo.com"},{"name":"request","value":{"jsonrpc":"2.0","method":"hello","params":[],"id":1}}],"result":{"name":"TestSnapResultExample","value":"hello1"}}]}],"components":{"schemas":{"OK":{"title":"OK","type":"string","const":"OK"},"JsonRpcRequest":{"title":"JsonRpcRequest","type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"title":"JSONRPCString","type":"string","const":"2.0"},"id":{"title":"JSONRPCID","oneOf":[{"type":"string"},{"type":"number"}]},"method":{"title":"JSONRPCMethod","description":"the name of the method","type":"string"},"params":{"title":"JSONRPCParams","type":["array","object"]}}}}}}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n);var e=r(3225),t=r(6019),i=r(5188);(0,e.executeLockdown)(),(0,t.executeLockdownMore)(),i.IFrameSnapExecutor.initialize()})()})();