Files
Administrator a0720d80dc fefdwef
2025-11-12 12:54:37 +08:00

56 lines
1.5 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function e(t,n,r){function i(o,a){if(!n[o]){if(!t[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(s)return s(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[o]={exports:{}};t[o][0].call(l.exports,(function(e){return i(t[o][1][e]||e)}),l,l.exports,e,t,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.COOKIE_ID_MARKETING_WHITELIST_ORIGINS=n.COOKIE_ID_MARKETING_WHITELIST=void 0;const r=n.COOKIE_ID_MARKETING_WHITELIST=["https://metamask.io","https://learn.metamask.io","https://mmi-support.zendesk.com","https://community.metamask.io","https://support.metamask.io"];n.COOKIE_ID_MARKETING_WHITELIST_ORIGINS=r.map((e=>new URL(e).origin))},{}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PHISHING_WARNING_PAGE=n.PHISHING_STREAM=n.PHISHING_SAFELIST=n.METAMASK_PROVIDER=n.METAMASK_INPAGE=n.METAMASK_COOKIE_HANDLER=n.LEGACY_PUBLIC_CONFIG=n.LEGACY_PROVIDER=n.LEGACY_INPAGE=n.LEGACY_CONTENT_SCRIPT=n.CONTENT_SCRIPT=void 0;n.CONTENT_SCRIPT="metamask-contentscript",n.METAMASK_INPAGE="metamask-inpage",n.PHISHING_WARNING_PAGE="metamask-phishing-warning-page",n.METAMASK_COOKIE_HANDLER="metamask-cookie-handler",n.METAMASK_PROVIDER="metamask-provider",n.PHISHING_SAFELIST="metamask-phishing-safelist",n.PHISHING_STREAM="phishing",n.LEGACY_CONTENT_SCRIPT="contentscript",n.LEGACY_INPAGE="inpage",n.LEGACY_PROVIDER="provider",n.LEGACY_PUBLIC_CONFIG="publicConfig"},{}],3:[function(e,t,n){"use strict";var r,i=e("../../shared/modules/browser-runtime.utils"),s=(r=e("../../shared/modules/provider-injection"))&&r.__esModule?r:{default:r},o=e("./streams/provider-stream"),a=e("./streams/phishing-stream"),c=e("./streams/cookie-handler-stream");a.isDetectedPhishingSite?(0,a.initPhishingStreams)():(c.isDetectedCookieMarketingSite&&(0,c.initializeCookieHandlerSteam)(),(0,s.default)()&&((0,o.initStreams)(),document.prerendering&&(0,i.getIsBrowserPrerenderBroken)()&&document.addEventListener("prerenderingchange",(()=>{(0,o.onDisconnectDestroyStreams)(new Error("Prerendered page has become active."))})),window.addEventListener("pageshow",(e=>{e.persisted&&(console.warn("BFCached page has become active. Restoring the streams."),(0,o.setupExtensionStreams)())})),window.addEventListener("pagehide",(e=>{e.persisted&&(console.warn("Page may become BFCached. Destroying the streams."),(0,o.destroyStreams)())}))))},{"../../shared/modules/browser-runtime.utils":583,"../../shared/modules/provider-injection":584,"./streams/cookie-handler-stream":4,"./streams/phishing-stream":5,"./streams/provider-stream":6}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setupCookieHandlerExtStreams=n.isDetectedCookieMarketingSite=n.initializeCookieHandlerSteam=void 0;var r=p(e("webextension-polyfill")),i=e("@metamask/post-message-stream"),s=p(e("@metamask/object-multiplex")),o=e("readable-stream"),a=p(e("extension-port-stream")),c=e("../../../shared/constants/app"),u=e("../constants/marketing-site-whitelist"),l=e("../../../shared/modules/browser-runtime.utils"),d=e("../constants/stream"),h=e("./stream-utils");function p(e){return e&&e.__esModule?e:{default:e}}n.isDetectedCookieMarketingSite=u.COOKIE_ID_MARKETING_WHITELIST_ORIGINS.some((e=>e===window.location.origin));let f,m,y,g,b,v;const w=()=>{y=r.default.runtime.connect({name:d.CONTENT_SCRIPT}),g=new a.default(y),b=new s.default,b.setMaxListeners(25),(0,o.pipeline)(b,g,b,(e=>{(0,h.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),window.postMessage({target:"CookieHandlerPage",data:{name:d.METAMASK_COOKIE_HANDLER,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)})),v=b.createStream(d.METAMASK_COOKIE_HANDLER),b.ignoreStream(d.LEGACY_PUBLIC_CONFIG),b.ignoreStream(d.LEGACY_PROVIDER),b.ignoreStream(d.METAMASK_PROVIDER),b.ignoreStream(d.PHISHING_SAFELIST),b.ignoreStream(d.PHISHING_STREAM),(0,o.pipeline)(m,v,m,(e=>console.debug(`MetaMask: Muxed traffic for channel "${d.METAMASK_COOKIE_HANDLER}" failed.`,e))),y.onDisconnect.addListener(x)};n.setupCookieHandlerExtStreams=w;const x=()=>{const e=(0,l.checkForLastError)();y.onDisconnect.removeListener(x),m.removeAllListeners(),b.removeAllListeners(),b.destroy(),v.removeAllListeners(),v.destroy(),g=null,e&&(console.warn(`${e} Resetting the phishing streams.`),setTimeout(w,1e3))},E=e=>{if(e.name===c.EXTENSION_MESSAGES.READY)return g||w(),Promise.resolve(`MetaMask: handled "${c.EXTENSION_MESSAGES.READY}" for phishing streams`)};n.initializeCookieHandlerSteam=()=>{const{origin:e}=window.location;!function(e){const t=new i.WindowPostMessageStream({name:d.CONTENT_SCRIPT,target:"CookieHandlerPage",targetWindow:window,targetOrigin:e});f=new s.default,f.setMaxListeners(25),(0,o.pipeline)(f,t,f,(e=>(0,h.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),m=f.createStream(d.METAMASK_COOKIE_HANDLER),f.ignoreStream(d.LEGACY_PUBLIC_CONFIG),f.ignoreStream(d.LEGACY_PROVIDER),f.ignoreStream(d.METAMASK_PROVIDER),f.ignoreStream(d.PHISHING_SAFELIST),f.ignoreStream(d.PHISHING_STREAM)}(e),w(),r.default.runtime.onMessage.addListener(E)}},{"../../../shared/constants/app":580,"../../../shared/modules/browser-runtime.utils":583,"../constants/marketing-site-whitelist":1,"../constants/stream":2,"./stream-utils":7,"@metamask/object-multiplex":73,"@metamask/post-message-stream":89,"extension-port-stream":453,"readable-stream":525,"webextension-polyfill":578}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.connectPhishingChannelToWarningSystem=function(e){w=e.createStream(l.PHISHING_STREAM),e.ignoreStream(l.METAMASK_COOKIE_HANDLER),e.ignoreStream(l.LEGACY_PROVIDER),e.ignoreStream(l.PHISHING_SAFELIST),w.once("data",A)},n.isDetectedPhishingSite=n.initPhishingStreams=void 0,n.redirectToPhishingWarning=A,n.setupPhishingExtStreams=void 0;var r=e("@metamask/post-message-stream"),i=h(e("@metamask/object-multiplex")),s=e("readable-stream"),o=h(e("webextension-polyfill")),a=h(e("extension-port-stream")),c=e("../../../shared/modules/browser-runtime.utils"),u=e("../../../shared/constants/app"),l=e("../constants/stream"),d=e("./stream-utils");function h(e){return e&&e.__esModule?e:{default:e}}const p=new URL("https://metamask.github.io/phishing-warning/v4.1.0/");let f,m,y,g,b,v,w;const x=()=>{y=o.default.runtime.connect({name:l.CONTENT_SCRIPT}),g=new a.default(y),m=new i.default,m.setMaxListeners(25),(0,s.pipeline)(m,g,m,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),window.postMessage({target:l.PHISHING_WARNING_PAGE,data:{name:l.PHISHING_SAFELIST,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)})),f=m.createStream(l.PHISHING_SAFELIST),(0,s.pipeline)(b,f,b,(e=>console.debug(`MetaMask: Muxed traffic for channel "${l.PHISHING_SAFELIST}" failed.`,e))),m.ignoreStream(l.METAMASK_COOKIE_HANDLER),m.ignoreStream(l.LEGACY_PUBLIC_CONFIG),m.ignoreStream(l.LEGACY_PROVIDER),m.ignoreStream(l.METAMASK_PROVIDER),m.ignoreStream(l.PHISHING_STREAM),y.onDisconnect.addListener(E)};n.setupPhishingExtStreams=x;const E=()=>{const e=(0,c.checkForLastError)();y.onDisconnect.removeListener(E),b.removeAllListeners(),m.removeAllListeners(),m.destroy(),f.removeAllListeners(),f.destroy(),g=null,e&&(console.warn(`${e} Resetting the phishing streams.`),setTimeout(x,1e3))},S=e=>{if(e.name===u.EXTENSION_MESSAGES.READY)return g||x(),Promise.resolve(`MetaMask: handled "${u.EXTENSION_MESSAGES.READY}" for phishing streams`)};n.isDetectedPhishingSite=window.location.origin===p.origin&&window.location.pathname===p.pathname;function A(){console.debug("MetaMask: Routing to Phishing Warning page.");const{hostname:e,href:t}=window.location,n=new URLSearchParams({hostname:e,href:t});for(window.location.href=`https://metamask.github.io/phishing-warning/v4.1.0/#${n}`;;)console.log("MetaMask: Locking js execution, redirection will complete shortly")}n.initPhishingStreams=()=>{!function(){const e=new r.WindowPostMessageStream({name:l.CONTENT_SCRIPT,target:l.PHISHING_WARNING_PAGE});v=new i.default,v.setMaxListeners(25),(0,s.pipeline)(v,e,v,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),b=v.createStream(l.PHISHING_SAFELIST),v.ignoreStream(l.METAMASK_COOKIE_HANDLER),v.ignoreStream(l.LEGACY_PUBLIC_CONFIG),v.ignoreStream(l.LEGACY_PROVIDER),v.ignoreStream(l.METAMASK_PROVIDER),v.ignoreStream(l.PHISHING_STREAM)}(),x(),o.default.runtime.onMessage.addListener(S)}},{"../../../shared/constants/app":580,"../../../shared/modules/browser-runtime.utils":583,"../constants/stream":2,"./stream-utils":7,"@metamask/object-multiplex":73,"@metamask/post-message-stream":89,"extension-port-stream":453,"readable-stream":525,"webextension-polyfill":578}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.destroyStreams=j,n.initStreams=void 0,n.onDisconnectDestroyStreams=R,n.setupExtensionStreams=void 0;var r=p(e("@metamask/object-multiplex")),i=e("@metamask/post-message-stream"),s=p(e("extension-port-stream")),o=e("readable-stream"),a=p(e("webextension-polyfill")),c=e("../constants/stream"),u=e("../../../shared/constants/app"),l=e("../../../shared/modules/browser-runtime.utils"),d=e("./stream-utils"),h=e("./phishing-stream");function p(e){return e&&e.__esModule?e:{default:e}}let f,m,y,g,b,v,w,x,E,S,A,_,T;let k=!1;const C=()=>{k=!0,S=a.default.runtime.connect({name:c.CONTENT_SCRIPT}),A=new s.default(S),A.on("data",B),x=new r.default,x.setMaxListeners(25),x.ignoreStream(c.LEGACY_PUBLIC_CONFIG),(0,o.pipeline)(x,A,x,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),N()})),E=x.createStream(c.METAMASK_PROVIDER),(0,o.pipeline)(T,E,T,(e=>console.debug(`MetaMask: Muxed traffic for channel "${c.METAMASK_PROVIDER}" failed.`,e))),(0,h.connectPhishingChannelToWarningSystem)(x),S.onDisconnect.addListener(R)};n.setupExtensionStreams=C;const P=()=>{T.removeAllListeners(),x.removeAllListeners(),x.destroy(),E.removeAllListeners(),E.destroy(),A=null},O=()=>{f=new r.default,f.setMaxListeners(25),w=new o.Transform({highWaterMark:16,objectMode:!0,transform:(e,t,n)=>{var r;(null==e?void 0:e.name)===c.METAMASK_PROVIDER&&"metamask_accountsChanged"===(null===(r=e.data)||void 0===r?void 0:r.method)&&(e.data.method="wallet_accountsChanged",e.data.result=e.data.params,delete e.data.params),n(null,e)}}),(0,o.pipeline)(f,A,w,f,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Legacy Multiplex",e),N()})),m=f.createStream(c.METAMASK_PROVIDER),(0,o.pipeline)(b,m,b,(e=>console.debug(`MetaMask: Muxed traffic between channels "${c.LEGACY_PROVIDER}" and "${c.METAMASK_PROVIDER}" failed.`,e))),y=f.createStream(c.LEGACY_PUBLIC_CONFIG),(0,o.pipeline)(v,y,v,(e=>console.debug(`MetaMask: Muxed traffic for channel "${c.LEGACY_PUBLIC_CONFIG}" failed.`,e))),f.ignoreStream(c.METAMASK_COOKIE_HANDLER),f.ignoreStream(c.LEGACY_PROVIDER),f.ignoreStream(c.PHISHING_SAFELIST),f.ignoreStream(c.PHISHING_STREAM)},I=()=>{b.removeAllListeners(),v.removeAllListeners(),f.removeAllListeners(),f.destroy(),m.removeAllListeners(),m.destroy(),y.removeAllListeners(),y.destroy()},M=e=>{if(e.name===u.EXTENSION_MESSAGES.READY)return A||(C(),O()),Promise.resolve(`MetaMask: handled ${u.EXTENSION_MESSAGES.READY}`)};function j(){S&&(S.onDisconnect.removeListener(R),P(),I(),S.disconnect(),S=null,k=!1)}function R(e){const t=e||(0,l.checkForLastError)();j(),t&&(console.warn(`${t} Resetting the streams.`),setTimeout(C,1e3))}function B(e){k&&"metamask_chainChanged"===e.data.method&&(k=!1,window.postMessage({target:c.METAMASK_INPAGE,data:{name:c.METAMASK_PROVIDER,data:{jsonrpc:"2.0",method:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}}},window.location.origin))}function N(){window.postMessage({target:c.METAMASK_INPAGE,data:{name:c.METAMASK_PROVIDER,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)}n.initStreams=()=>{(()=>{const e=new i.WindowPostMessageStream({name:c.CONTENT_SCRIPT,target:c.METAMASK_INPAGE});_=new r.default,_.setMaxListeners(25),(0,o.pipeline)(_,e,_,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),T=_.createStream(c.METAMASK_PROVIDER),_.ignoreStream(c.METAMASK_COOKIE_HANDLER),_.ignoreStream(c.LEGACY_PROVIDER),_.ignoreStream(c.LEGACY_PUBLIC_CONFIG),_.ignoreStream(c.PHISHING_SAFELIST),_.ignoreStream(c.PHISHING_STREAM)})(),(()=>{const e=new i.WindowPostMessageStream({name:c.LEGACY_CONTENT_SCRIPT,target:c.LEGACY_INPAGE});g=new r.default,g.setMaxListeners(25),(0,o.pipeline)(g,e,g,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Legacy Inpage Multiplex",e))),b=g.createStream(c.LEGACY_PROVIDER),v=g.createStream(c.LEGACY_PUBLIC_CONFIG),g.ignoreStream(c.METAMASK_COOKIE_HANDLER),g.ignoreStream(c.METAMASK_PROVIDER),g.ignoreStream(c.PHISHING_SAFELIST),g.ignoreStream(c.PHISHING_STREAM)})(),C(),O(),a.default.runtime.onMessage.addListener(M)}},{"../../../shared/constants/app":580,"../../../shared/modules/browser-runtime.utils":583,"../constants/stream":2,"./phishing-stream":5,"./stream-utils":7,"@metamask/object-multiplex":73,"@metamask/post-message-stream":89,"extension-port-stream":453,"readable-stream":525,"webextension-polyfill":578}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logStreamDisconnectWarning=function(e,t){console.debug(`MetaMask: Content script lost connection to "${e}".`,t)}},{}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.accountBodyToRLP=n.accountBodyToSlim=n.accountBodyFromSlim=n.isZeroAddress=n.zeroAddress=n.importPublic=n.privateToAddress=n.privateToPublic=n.publicToAddress=n.pubToAddress=n.isValidPublic=n.isValidPrivate=n.generateAddress2=n.generateAddress=n.isValidChecksumAddress=n.toChecksumAddress=n.isValidAddress=n.Account=void 0;const r=e("@ethereumjs/rlp"),i=e("ethereum-cryptography/keccak.js"),s=e("ethereum-cryptography/secp256k1.js"),o=e("./bytes.js"),a=e("./constants.js"),c=e("./helpers.js"),u=e("./internal.js");class l{constructor(e=a.BIGINT_0,t=a.BIGINT_0,n=a.KECCAK256_RLP,r=a.KECCAK256_NULL,i=null,s=0){this._nonce=null,this._balance=null,this._storageRoot=null,this._codeHash=null,this._codeSize=null,this._version=null,this._nonce=e,this._balance=t,this._storageRoot=n,this._codeHash=r,null!==i||null===r||this.isContract()||(i=0),this._codeSize=i,this._version=s,this._validate()}get version(){if(null!==this._version)return this._version;throw Error(`version=${this._version} not loaded`)}set version(e){this._version=e}get nonce(){if(null!==this._nonce)return this._nonce;throw Error(`nonce=${this._nonce} not loaded`)}set nonce(e){this._nonce=e}get balance(){if(null!==this._balance)return this._balance;throw Error(`balance=${this._balance} not loaded`)}set balance(e){this._balance=e}get storageRoot(){if(null!==this._storageRoot)return this._storageRoot;throw Error(`storageRoot=${this._storageRoot} not loaded`)}set storageRoot(e){this._storageRoot=e}get codeHash(){if(null!==this._codeHash)return this._codeHash;throw Error(`codeHash=${this._codeHash} not loaded`)}set codeHash(e){this._codeHash=e}get codeSize(){if(null!==this._codeSize)return this._codeSize;throw Error(`codeHash=${this._codeSize} not loaded`)}set codeSize(e){this._codeSize=e}static fromAccountData(e){const{nonce:t,balance:n,storageRoot:r,codeHash:i}=e;if(null===t||null===n||null===r||null===i)throw Error("Partial fields not supported in fromAccountData");return new l(void 0!==t?(0,o.bytesToBigInt)((0,o.toBytes)(t)):void 0,void 0!==n?(0,o.bytesToBigInt)((0,o.toBytes)(n)):void 0,void 0!==r?(0,o.toBytes)(r):void 0,void 0!==i?(0,o.toBytes)(i):void 0)}static fromPartialAccountData(e){const{nonce:t,balance:n,storageRoot:r,codeHash:i,codeSize:s,version:a}=e;if(null===t&&null===n&&null===r&&null===i&&null===s&&null===a)throw Error("All partial fields null");return new l(null!=t?(0,o.bytesToBigInt)((0,o.toBytes)(t)):t,null!=n?(0,o.bytesToBigInt)((0,o.toBytes)(n)):n,null!=r?(0,o.toBytes)(r):r,null!=i?(0,o.toBytes)(i):i,null!=s?(0,o.bytesToInt)((0,o.toBytes)(s)):s,null!=a?(0,o.bytesToInt)((0,o.toBytes)(a)):a)}static fromRlpSerializedAccount(e){const t=r.RLP.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromRlpSerializedPartialAccount(e){const t=r.RLP.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");let n=null;if(!Array.isArray(t[0]))throw new Error("Invalid partial nonce encoding. Must be array");{const e=(0,o.bytesToInt)(t[0][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for nonce`);1===e&&(n=(0,o.bytesToBigInt)(t[0][1]))}let i=null;if(!Array.isArray(t[1]))throw new Error("Invalid partial balance encoding. Must be array");{const e=(0,o.bytesToInt)(t[1][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for balance`);1===e&&(i=(0,o.bytesToBigInt)(t[1][1]))}let s=null;if(!Array.isArray(t[2]))throw new Error("Invalid partial storageRoot encoding. Must be array");{const e=(0,o.bytesToInt)(t[2][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for storageRoot`);1===e&&(s=t[2][1])}let a=null;if(!Array.isArray(t[3]))throw new Error("Invalid partial codeHash encoding. Must be array");{const e=(0,o.bytesToInt)(t[3][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for codeHash`);1===e&&(a=t[3][1])}let c=null;if(!Array.isArray(t[4]))throw new Error("Invalid partial codeSize encoding. Must be array");{const e=(0,o.bytesToInt)(t[4][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for codeSize`);1===e&&(c=(0,o.bytesToInt)(t[4][1]))}let u=null;if(!Array.isArray(t[5]))throw new Error("Invalid partial version encoding. Must be array");{const e=(0,o.bytesToInt)(t[5][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for version`);1===e&&(u=(0,o.bytesToInt)(t[5][1]))}return this.fromPartialAccountData({balance:i,nonce:n,storageRoot:s,codeHash:a,codeSize:c,version:u})}static fromValuesArray(e){const[t,n,r,i]=e;return new l((0,o.bytesToBigInt)(t),(0,o.bytesToBigInt)(n),r,i)}_validate(){if(null!==this._nonce&&this._nonce<a.BIGINT_0)throw new Error("nonce must be greater than zero");if(null!==this._balance&&this._balance<a.BIGINT_0)throw new Error("balance must be greater than zero");if(null!==this._storageRoot&&32!==this._storageRoot.length)throw new Error("storageRoot must have a length of 32");if(null!==this._codeHash&&32!==this._codeHash.length)throw new Error("codeHash must have a length of 32");if(null!==this._codeSize&&this._codeSize<a.BIGINT_0)throw new Error("codeSize must be greater than zero")}raw(){return[(0,o.bigIntToUnpaddedBytes)(this.nonce),(0,o.bigIntToUnpaddedBytes)(this.balance),this.storageRoot,this.codeHash]}serialize(){return r.RLP.encode(this.raw())}serializeWithPartialInfo(){const e=[],t=(0,o.intToUnpaddedBytes)(0),n=(0,o.intToUnpaddedBytes)(1);return null!==this._nonce?e.push([n,(0,o.bigIntToUnpaddedBytes)(this._nonce)]):e.push([t]),null!==this._balance?e.push([n,(0,o.bigIntToUnpaddedBytes)(this._balance)]):e.push([t]),null!==this._storageRoot?e.push([n,this._storageRoot]):e.push([t]),null!==this._codeHash?e.push([n,this._codeHash]):e.push([t]),null!==this._codeSize?e.push([n,(0,o.intToUnpaddedBytes)(this._codeSize)]):e.push([t]),null!==this._version?e.push([n,(0,o.intToUnpaddedBytes)(this._version)]):e.push([t]),r.RLP.encode(e)}isContract(){if(null===this._codeHash&&null===this._codeSize)throw Error("Insufficient data as codeHash=null and codeSize=null");return null!==this._codeHash&&!(0,o.equalsBytes)(this._codeHash,a.KECCAK256_NULL)||null!==this._codeSize&&0!==this._codeSize}isEmpty(){return!(null!==this._balance&&this.balance!==a.BIGINT_0||null===this._nonce&&this.nonce!==a.BIGINT_0||null!==this._codeHash&&!(0,o.equalsBytes)(this.codeHash,a.KECCAK256_NULL))&&(this.balance===a.BIGINT_0&&this.nonce===a.BIGINT_0&&(0,o.equalsBytes)(this.codeHash,a.KECCAK256_NULL))}}n.Account=l;n.isValidAddress=function(e){try{(0,c.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};n.toChecksumAddress=function(e,t){(0,c.assertIsHexString)(e);const n=(0,u.stripHexPrefix)(e).toLowerCase();let r="";if(void 0!==t){r=(0,o.bytesToBigInt)((0,o.toBytes)(t)).toString()+"0x"}const s=(0,o.utf8ToBytes)(r+n),a=(0,o.bytesToHex)((0,i.keccak256)(s)).slice(2);let l="";for(let e=0;e<n.length;e++)parseInt(a[e],16)>=8?l+=n[e].toUpperCase():l+=n[e];return`0x${l}`};n.isValidChecksumAddress=function(e,t){return(0,n.isValidAddress)(e)&&(0,n.toChecksumAddress)(e,t)===e};n.generateAddress=function(e,t){return(0,c.assertIsBytes)(e),(0,c.assertIsBytes)(t),(0,o.bytesToBigInt)(t)===a.BIGINT_0?(0,i.keccak256)(r.RLP.encode([e,Uint8Array.from([])])).subarray(-20):(0,i.keccak256)(r.RLP.encode([e,t])).subarray(-20)};n.generateAddress2=function(e,t,n){if((0,c.assertIsBytes)(e),(0,c.assertIsBytes)(t),(0,c.assertIsBytes)(n),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");return(0,i.keccak256)((0,o.concatBytes)((0,o.hexToBytes)("0xff"),e,t,(0,i.keccak256)(n))).subarray(-20)};n.isValidPrivate=function(e){return s.secp256k1.utils.isValidPrivateKey(e)};n.isValidPublic=function(e,t=!1){if((0,c.assertIsBytes)(e),64===e.length)try{return s.secp256k1.ProjectivePoint.fromHex((0,o.concatBytes)(Uint8Array.from([4]),e)),!0}catch(e){return!1}if(!t)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}};n.pubToAddress=function(e,t=!1){if((0,c.assertIsBytes)(e),t&&64!==e.length&&(e=s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1)),64!==e.length)throw new Error("Expected pubKey to be of length 64");return(0,i.keccak256)(e).subarray(-20)},n.publicToAddress=n.pubToAddress;n.privateToPublic=function(e){return(0,c.assertIsBytes)(e),s.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1)};n.privateToAddress=function(e){return(0,n.publicToAddress)((0,n.privateToPublic)(e))};n.importPublic=function(e){return(0,c.assertIsBytes)(e),64!==e.length&&(e=s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1)),e};n.zeroAddress=function(){const e=(0,o.zeros)(20);return(0,o.bytesToHex)(e)};function d(e){const[t,n,r,i]=e;return[t,n,0===r.length?a.KECCAK256_RLP:r,0===i.length?a.KECCAK256_NULL:i]}n.isZeroAddress=function(e){try{(0,c.assertIsString)(e)}catch(e){return!1}return(0,n.zeroAddress)()===e},n.accountBodyFromSlim=d;const h=new Uint8Array(0);n.accountBodyToSlim=function(e){const[t,n,r,i]=e;return[t,n,(0,o.equalsBytes)(r,a.KECCAK256_RLP)?h:r,(0,o.equalsBytes)(i,a.KECCAK256_NULL)?h:i]},n.accountBodyToRLP=function(e,t=!0){const n=t?d(e):e;return r.RLP.encode(n)}},{"./bytes.js":12,"./constants.js":13,"./helpers.js":16,"./internal.js":18,"@ethereumjs/rlp":29,"ethereum-cryptography/keccak.js":432,"ethereum-cryptography/secp256k1.js":449}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Address=void 0;const r=e("./account.js"),i=e("./bytes.js"),s=e("./constants.js");class o{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.bytes=e}static zero(){return new o((0,i.zeros)(20))}static fromString(e){if(!(0,r.isValidAddress)(e))throw new Error(`Invalid address input=${e}`);return new o((0,i.hexToBytes)(e))}static fromPublicKey(e){if(!(e instanceof Uint8Array))throw new Error("Public key should be Uint8Array");const t=(0,r.pubToAddress)(e);return new o(t)}static fromPrivateKey(e){if(!(e instanceof Uint8Array))throw new Error("Private key should be Uint8Array");const t=(0,r.privateToAddress)(e);return new o(t)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new o((0,r.generateAddress)(e.bytes,(0,i.bigIntToBytes)(t)))}static generate2(e,t,n){if(!(t instanceof Uint8Array))throw new Error("Expected salt to be a Uint8Array");if(!(n instanceof Uint8Array))throw new Error("Expected initCode to be a Uint8Array");return new o((0,r.generateAddress2)(e.bytes,t,n))}equals(e){return(0,i.equalsBytes)(this.bytes,e.bytes)}isZero(){return this.equals(o.zero())}isPrecompileOrSystemAddress(){const e=(0,i.bytesToBigInt)(this.bytes),t=s.BIGINT_0,n=BigInt("0xffff");return e>=t&&e<=n}toString(){return(0,i.bytesToHex)(this.bytes)}toBytes(){return new Uint8Array(this.bytes)}}n.Address=o},{"./account.js":8,"./bytes.js":12,"./constants.js":13}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AsyncEventEmitter=void 0;const r=e("events");class i extends r.EventEmitter{emit(e,...t){let[n,r]=t;const i=this;let s=i._events[e]??[];return void 0===r&&"function"==typeof n&&(r=n,n=void 0),"newListener"!==e&&"removeListener"!==e||(n={event:n,fn:r},r=void 0),s=Array.isArray(s)?s:[s],async function(e,t,n){let r;for await(const i of t)try{i.length<2?i.call(e,n):await new Promise(((t,r)=>{i.call(e,n,(e=>{e?r(e):t()}))}))}catch(e){r=e}if(r)throw r}(i,s.slice(),n).then(r).catch(r),i.listenerCount(e)>0}once(e,t){const n=this;let r;if("function"!=typeof t)throw new TypeError("listener must be a function");return r=t.length>=2?function(i,s){n.removeListener(e,r),t(i,s)}:function(i){n.removeListener(e,r),t(i,r)},n.on(e,r),n}first(e,t){let n=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(n)||(this._events[e]=n=[n]),n.unshift(t),this}before(e,t,n){return this.beforeOrAfter(e,t,n)}after(e,t,n){return this.beforeOrAfter(e,t,n,"after")}beforeOrAfter(e,t,n,r){let i,s,o=this._events[e]??[];const a="after"===r?1:0;if("function"!=typeof n)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(o)||(this._events[e]=o=[o]),s=o.length,i=o.length;i--;)if(o[i]===t){s=i+a;break}return o.splice(s,0,n),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}n.AsyncEventEmitter=i},{events:452}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.commitmentsToVersionedHashes=n.computeVersionedHash=n.blobsToProofs=n.blobsToCommitments=n.getBlobs=void 0;const r=e("ethereum-cryptography/sha256.js"),i=e("./bytes.js"),s=4096,o=131072;function a(e){const t=new Uint8Array(131072);for(let n=0;n<s;n++){const r=new Uint8Array(32);r.set(e.subarray(31*n,31*(n+1)),0),t.set(r,32*n)}return t}n.getBlobs=e=>{const t=(0,i.utf8ToBytes)(e),n=t.byteLength;if(0===n)throw Error("invalid blob data");if(n>262143)throw Error("blob data is too large");const r=Math.ceil(n/o),s=function(e,t){const n=new Uint8Array(t*o).fill(0);return n.set(e),n[e.byteLength]=128,n}(t,r),c=[];for(let e=0;e<r;e++){const t=a(s.subarray(e*o,(e+1)*o));c.push(t)}return c};n.blobsToCommitments=(e,t)=>{const n=[];for(const r of t)n.push(e.blobToKzgCommitment(r));return n};n.blobsToProofs=(e,t,n)=>t.map(((t,r)=>e.computeBlobKzgProof(t,n[r])));n.computeVersionedHash=(e,t)=>{const n=new Uint8Array(32);return n.set([t],0),n.set((0,r.sha256)(e).subarray(1),1),n};n.commitmentsToVersionedHashes=e=>{const t=[];for(const r of e)t.push((0,n.computeVersionedHash)(r,1));return t}},{"./bytes.js":12,"ethereum-cryptography/sha256.js":450}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hexToBigInt=n.utf8ToBytes=n.equalsBytes=n.bytesToUtf8=n.bigInt64ToBytes=n.int32ToBytes=n.bytesToBigInt64=n.bytesToInt32=n.concatBytes=n.randomBytes=n.compareBytes=n.intToUnpaddedBytes=n.bigIntToAddressBytes=n.bigIntToUnpaddedBytes=n.bigIntMin=n.bigIntMax=n.bigIntToHex=n.validateNoLeadingZeroes=n.short=n.addHexPrefix=n.toUnsigned=n.fromSigned=n.toBytes=n.unpadHex=n.unpadArray=n.unpadBytes=n.setLengthRight=n.setLengthLeft=n.zeros=n.bigIntToBytes=n.intToBytes=n.intToHex=n.hexToBytes=n.bytesToInt=n.bytesToBigInt=n.bytesToHex=n.unprefixedHexToBytes=n.bytesToUnprefixedHex=void 0;const r=e("ethereum-cryptography/random.js"),i=e("ethereum-cryptography/utils.js"),s=e("./helpers.js"),o=e("./internal.js"),a=BigInt(0);n.bytesToUnprefixedHex=i.bytesToHex;const c={},u={};for(let e=0;e<16;e++){const t=e,n=16*e,r=e.toString(16).toLowerCase();u[r]=t,u[r.toUpperCase()]=t,c[r]=n,c[r.toUpperCase()]=n}function l(e){const t=e.length,n=new Uint8Array(t/2);for(let r=0;r<t;r+=2)n[r/2]=c[e[r]]+u[e[r+1]];return n}n.unprefixedHexToBytes=e=>{if("0x"===e.slice(0,2))throw new Error("hex string is prefixed with 0x, should be unprefixed");return l((0,o.padToEven)(e))};const d=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));n.bytesToHex=e=>{let t="0x";if(void 0===e||0===e.length)return t;for(const n of e)t=`${t}${d[n]}`;return t};const h=[];for(let e=0;e<=65535;e++)h[e]=BigInt(e);n.bytesToBigInt=(e,t=!1)=>{t&&e.reverse();const r=(0,n.bytesToHex)(e);return"0x"===r?a:4===r.length?h[e[0]]:6===r.length?h[256*e[0]+e[1]]:BigInt(r)};n.bytesToInt=e=>{const t=Number((0,n.bytesToBigInt)(e));if(!Number.isSafeInteger(t))throw new Error("Number exceeds 53 bits");return t};n.hexToBytes=e=>{if("string"!=typeof e)throw new Error(`hex argument type ${typeof e} must be of type string`);if(!/^0x[0-9a-fA-F]*$/.test(e))throw new Error(`Input must be a 0x-prefixed hexadecimal string, got ${e}`);const t=e.slice(2);return l(t.length%2==0?t:(0,o.padToEven)(t))};n.intToHex=e=>{if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};n.intToBytes=e=>{const t=(0,n.intToHex)(e);return(0,n.hexToBytes)(t)};n.bigIntToBytes=(e,t=!1)=>{const r=(0,n.toBytes)(`0x${(0,o.padToEven)(e.toString(16))}`);return t?r.reverse():r};n.zeros=e=>new Uint8Array(e);const p=(e,t,r)=>r?e.length<t?new Uint8Array([...e,...(0,n.zeros)(t-e.length)]):e.subarray(0,t):e.length<t?new Uint8Array([...(0,n.zeros)(t-e.length),...e]):e.subarray(-t);n.setLengthLeft=(e,t)=>((0,s.assertIsBytes)(e),p(e,t,!1));n.setLengthRight=(e,t)=>((0,s.assertIsBytes)(e),p(e,t,!0));const f=e=>{let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};n.unpadBytes=e=>((0,s.assertIsBytes)(e),f(e));n.unpadArray=e=>((0,s.assertIsArray)(e),f(e));n.unpadHex=e=>((0,s.assertIsHexString)(e),`0x${f((0,o.stripHexPrefix)(e))}`);n.toBytes=e=>{if(null==e)return new Uint8Array;if(Array.isArray(e)||e instanceof Uint8Array)return Uint8Array.from(e);if("string"==typeof e){if(!(0,o.isHexString)(e))throw new Error(`Cannot convert string to Uint8Array. toBytes only supports 0x-prefixed hex strings and this string was given: ${e}`);return(0,n.hexToBytes)(e)}if("number"==typeof e)return(0,n.intToBytes)(e);if("bigint"==typeof e){if(e<a)throw new Error(`Cannot convert negative bigint to Uint8Array. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),(0,n.unprefixedHexToBytes)(t)}if(void 0!==e.toBytes)return e.toBytes();throw new Error("invalid type")};n.fromSigned=e=>BigInt.asIntN(256,(0,n.bytesToBigInt)(e));n.toUnsigned=e=>(0,n.bigIntToBytes)(BigInt.asUintN(256,e));n.addHexPrefix=e=>"string"!=typeof e||(0,o.isHexString)(e)?e:`0x${e}`;n.short=(e,t=50)=>{const r=e instanceof Uint8Array?(0,n.bytesToHex)(e):e,i="0x"===r.slice(0,2)?t+2:t;return r.length<=i?r:r.slice(0,i)+"…"};n.validateNoLeadingZeroes=e=>{for(const[t,r]of Object.entries(e))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${t} cannot have leading zeroes, received: ${(0,n.bytesToHex)(r)}`)};n.bigIntToHex=e=>`0x${e.toString(16)}`;n.bigIntMax=(...e)=>e.reduce(((e,t)=>t>e?t:e));n.bigIntMin=(...e)=>e.reduce(((e,t)=>t<e?t:e));n.bigIntToUnpaddedBytes=e=>(0,n.unpadBytes)((0,n.bigIntToBytes)(e));n.bigIntToAddressBytes=(e,t=!0)=>{const r=(0,n.bigIntToBytes)(e);if(t&&r.length>20)throw Error(`Invalid address bytes length=${r.length} strict=${t}`);return(0,n.setLengthLeft)(r,20)};n.intToUnpaddedBytes=e=>(0,n.unpadBytes)((0,n.intToBytes)(e));n.compareBytes=(e,t)=>{const r=(0,n.bytesToBigInt)(e),i=(0,n.bytesToBigInt)(t);return r>i?1:r<i?-1:0};n.randomBytes=e=>(0,r.getRandomBytesSync)(e);n.concatBytes=(...e)=>{if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n},n.bytesToInt32=function(e,t=!1){return e.length<4&&(e=p(e,4,t)),new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,t)},n.bytesToBigInt64=function(e,t=!1){return e.length<8&&(e=p(e,8,t)),new DataView(e.buffer,e.byteOffset,e.byteLength).getBigUint64(0,t)},n.int32ToBytes=function(e,t=!1){const n=new ArrayBuffer(4);return new DataView(n).setUint32(0,e,t),new Uint8Array(n)},n.bigInt64ToBytes=function(e,t=!1){const n=new ArrayBuffer(8);return new DataView(n).setBigUint64(0,e,t),new Uint8Array(n)};var m=e("ethereum-cryptography/utils.js");Object.defineProperty(n,"bytesToUtf8",{enumerable:!0,get:function(){return m.bytesToUtf8}}),Object.defineProperty(n,"equalsBytes",{enumerable:!0,get:function(){return m.equalsBytes}}),Object.defineProperty(n,"utf8ToBytes",{enumerable:!0,get:function(){return m.utf8ToBytes}}),n.hexToBigInt=function(e){return(0,n.bytesToBigInt)((0,n.hexToBytes)((0,o.isHexString)(e)?e:`0x${e}`))}},{"./helpers.js":16,"./internal.js":18,"ethereum-cryptography/random.js":448,"ethereum-cryptography/utils.js":451}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BIGINT_2EXP256=n.BIGINT_2EXP224=n.BIGINT_2EXP160=n.BIGINT_2EXP96=n.BIGINT_224=n.BIGINT_160=n.BIGINT_100=n.BIGINT_96=n.BIGINT_256=n.BIGINT_255=n.BIGINT_128=n.BIGINT_64=n.BIGINT_32=n.BIGINT_31=n.BIGINT_28=n.BIGINT_27=n.BIGINT_8=n.BIGINT_7=n.BIGINT_3=n.BIGINT_2=n.BIGINT_1=n.BIGINT_0=n.BIGINT_NEG1=n.RIPEMD160_ADDRESS_STRING=n.MAX_WITHDRAWALS_PER_PAYLOAD=n.RLP_EMPTY_STRING=n.KECCAK256_RLP=n.KECCAK256_RLP_S=n.KECCAK256_RLP_ARRAY=n.KECCAK256_RLP_ARRAY_S=n.KECCAK256_NULL=n.KECCAK256_NULL_S=n.TWO_POW256=n.SECP256K1_ORDER_DIV_2=n.SECP256K1_ORDER=n.MAX_INTEGER_BIGINT=n.MAX_INTEGER=n.MAX_UINT64=void 0;const r=e("ethereum-cryptography/secp256k1.js"),i=e("./bytes.js");n.MAX_UINT64=BigInt("0xffffffffffffffff"),n.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),n.SECP256K1_ORDER=r.secp256k1.CURVE.n,n.SECP256K1_ORDER_DIV_2=r.secp256k1.CURVE.n/BigInt(2),n.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),n.KECCAK256_NULL_S="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",n.KECCAK256_NULL=(0,i.hexToBytes)(n.KECCAK256_NULL_S),n.KECCAK256_RLP_ARRAY_S="0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",n.KECCAK256_RLP_ARRAY=(0,i.hexToBytes)(n.KECCAK256_RLP_ARRAY_S),n.KECCAK256_RLP_S="0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",n.KECCAK256_RLP=(0,i.hexToBytes)(n.KECCAK256_RLP_S),n.RLP_EMPTY_STRING=Uint8Array.from([128]),n.MAX_WITHDRAWALS_PER_PAYLOAD=16,n.RIPEMD160_ADDRESS_STRING="0000000000000000000000000000000000000003",n.BIGINT_NEG1=BigInt(-1),n.BIGINT_0=BigInt(0),n.BIGINT_1=BigInt(1),n.BIGINT_2=BigInt(2),n.BIGINT_3=BigInt(3),n.BIGINT_7=BigInt(7),n.BIGINT_8=BigInt(8),n.BIGINT_27=BigInt(27),n.BIGINT_28=BigInt(28),n.BIGINT_31=BigInt(31),n.BIGINT_32=BigInt(32),n.BIGINT_64=BigInt(64),n.BIGINT_128=BigInt(128),n.BIGINT_255=BigInt(255),n.BIGINT_256=BigInt(256),n.BIGINT_96=BigInt(96),n.BIGINT_100=BigInt(100),n.BIGINT_160=BigInt(160),n.BIGINT_224=BigInt(224),n.BIGINT_2EXP96=BigInt(7922816251426434e13),n.BIGINT_2EXP160=BigInt(1461501637330903e33),n.BIGINT_2EXP224=BigInt(2695994666715064e52),n.BIGINT_2EXP256=n.BIGINT_2**n.BIGINT_256},{"./bytes.js":12,"ethereum-cryptography/secp256k1.js":449}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ValueEncoding=n.KeyEncoding=void 0,function(e){e.String="string",e.Bytes="view",e.Number="number"}(n.KeyEncoding||(n.KeyEncoding={})),function(e){e.String="string",e.Bytes="view",e.JSON="json"}(n.ValueEncoding||(n.ValueEncoding={}))},{}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseGethGenesisState=void 0;const r=e("./bytes.js"),i=e("./internal.js");n.parseGethGenesisState=function(e){const t={};for(const n of Object.keys(e.alloc)){let{balance:s,code:o,storage:a,nonce:c}=e.alloc[n];const u=(0,r.addHexPrefix)(n.toLowerCase());s=(0,i.isHexString)(s)?s:(0,r.bigIntToHex)(BigInt(s)),o=void 0!==o?(0,r.addHexPrefix)(o):void 0,a=void 0!==a?Object.entries(a):void 0,c=void 0!==c?(0,r.addHexPrefix)(c):void 0,t[u]=[s,o,a,c]}return t}},{"./bytes.js":12,"./internal.js":18}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsString=n.assertIsArray=n.assertIsBytes=n.assertIsHexString=void 0;const r=e("./internal.js");n.assertIsHexString=function(e){if(!(0,r.isHexString)(e)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)}};n.assertIsBytes=function(e){if(!(e instanceof Uint8Array)){throw new Error(`This method only supports Uint8Array but input was: ${e}`)}};n.assertIsArray=function(e){if(!Array.isArray(e)){throw new Error(`This method only supports number arrays but input was: ${e}`)}};n.assertIsString=function(e){if("string"!=typeof e){throw new Error(`This method only supports strings but input was: ${e}`)}}},{"./internal.js":18}],17:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.toAscii=n.stripHexPrefix=n.padToEven=n.isHexString=n.getKeys=n.getBinarySize=n.fromUtf8=n.fromAscii=n.arrayContainsArray=void 0,i(e("./constants.js"),n),i(e("./units.js"),n),i(e("./account.js"),n),i(e("./address.js"),n),i(e("./db.js"),n),i(e("./withdrawal.js"),n),i(e("./signature.js"),n),i(e("./bytes.js"),n),i(e("./types.js"),n),i(e("./asyncEventEmitter.js"),n),i(e("./blobs.js"),n),i(e("./genesis.js"),n);var s=e("./internal.js");Object.defineProperty(n,"arrayContainsArray",{enumerable:!0,get:function(){return s.arrayContainsArray}}),Object.defineProperty(n,"fromAscii",{enumerable:!0,get:function(){return s.fromAscii}}),Object.defineProperty(n,"fromUtf8",{enumerable:!0,get:function(){return s.fromUtf8}}),Object.defineProperty(n,"getBinarySize",{enumerable:!0,get:function(){return s.getBinarySize}}),Object.defineProperty(n,"getKeys",{enumerable:!0,get:function(){return s.getKeys}}),Object.defineProperty(n,"isHexString",{enumerable:!0,get:function(){return s.isHexString}}),Object.defineProperty(n,"padToEven",{enumerable:!0,get:function(){return s.padToEven}}),Object.defineProperty(n,"stripHexPrefix",{enumerable:!0,get:function(){return s.stripHexPrefix}}),Object.defineProperty(n,"toAscii",{enumerable:!0,get:function(){return s.toAscii}}),i(e("./kzg.js"),n),i(e("./lock.js"),n),i(e("./mapDB.js"),n),i(e("./provider.js"),n),i(e("./requests.js"),n),i(e("./verkle.js"),n)},{"./account.js":8,"./address.js":9,"./asyncEventEmitter.js":10,"./blobs.js":11,"./bytes.js":12,"./constants.js":13,"./db.js":14,"./genesis.js":15,"./internal.js":18,"./kzg.js":19,"./lock.js":20,"./mapDB.js":21,"./provider.js":22,"./requests.js":23,"./signature.js":24,"./types.js":25,"./units.js":26,"./verkle.js":27,"./withdrawal.js":28}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getKeys=n.fromAscii=n.fromUtf8=n.toAscii=n.arrayContainsArray=n.getBinarySize=n.padToEven=n.stripHexPrefix=n.isHexString=void 0;const r=e("./bytes.js");function i(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==t&&t>0&&e.length!==2+2*t)}n.isHexString=i;function s(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}n.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return i(e)?e.slice(2):e},n.padToEven=s,n.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof e);return(0,r.utf8ToBytes)(e).byteLength},n.arrayContainsArray=function(e,t,n){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===n?"some":"every"]((t=>e.indexOf(t)>=0))},n.toAscii=function(e){let t="",n=0;const r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){const r=parseInt(e.substr(n,2),16);t+=String.fromCharCode(r)}return t},n.fromUtf8=function(e){const t=(0,r.utf8ToBytes)(e);return`0x${s((0,r.bytesToUnprefixedHex)(t)).replace(/^0+|0+$/g,"")}`},n.fromAscii=function(e){let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n).toString(16);t+=r.length<2?`0${r}`:r}return`0x${t}`},n.getKeys=function(e,t,n){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const r=[];for(let i=0;i<e.length;i++){let s=e[i][t];if(!0!==n||s){if("string"!=typeof s)throw new Error("invalid abi - expected type 'string', received "+typeof s)}else s="";r.push(s)}return r}},{"./bytes.js":12}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.initKZG=void 0,n.initKZG=function(e,t){e.loadTrustedSetup()}},{}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Lock=void 0;n.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}},{}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MapDB=void 0;const r=e("./bytes.js");class i{constructor(e){this._database=e??new Map}async get(e){const t=e instanceof Uint8Array?(0,r.bytesToUnprefixedHex)(e):e.toString();return this._database.get(t)}async put(e,t){const n=e instanceof Uint8Array?(0,r.bytesToUnprefixedHex)(e):e.toString();this._database.set(n,t)}async del(e){const t=e instanceof Uint8Array?(0,r.bytesToUnprefixedHex)(e):e.toString();this._database.delete(t)}async batch(e){for(const t of e)"del"===t.type&&await this.del(t.key),"put"===t.type&&await this.put(t.key,t.value)}shallowCopy(){return new i(this._database)}open(){return Promise.resolve()}}n.MapDB=i},{"./bytes.js":12}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getProvider=n.fetchFromProvider=void 0;n.fetchFromProvider=async(e,t)=>{const n=JSON.stringify({method:t.method,params:t.params,jsonrpc:"2.0",id:1}),r=await fetch(e,{headers:{"content-type":"application/json"},method:"POST",body:n});if(!r.ok)throw new Error(`JSONRpcError: ${JSON.stringify({method:t.method,status:r.status,message:await r.text().catch((()=>"Could not parse error message likely because of a network error"))},null,2)}`);return(await r.json()).result};n.getProvider=e=>{if("string"==typeof e)return e;if("object"==typeof e&&void 0!==e._getConnection)return e._getConnection().url;throw new Error("Must provide valid provider URL or Web3Provider")}},{}],23:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CLRequestFactory=n.ConsolidationRequest=n.WithdrawalRequest=n.DepositRequest=n.CLRequest=n.CLRequestType=void 0;const r=e("@ethereumjs/rlp"),i=e("ethereum-cryptography/utils"),s=e("./bytes.js"),o=e("./constants.js");var a;!function(e){e[e.Deposit=0]="Deposit",e[e.Withdrawal=1]="Withdrawal",e[e.Consolidation=2]="Consolidation"}(a=n.CLRequestType||(n.CLRequestType={}));class c{constructor(e){this.type=e}}n.CLRequest=c;class u extends c{constructor(e,t,n,r,i){super(a.Deposit),this.pubkey=e,this.withdrawalCredentials=t,this.amount=n,this.signature=r,this.index=i}static fromRequestData(e){const{pubkey:t,withdrawalCredentials:n,amount:r,signature:i,index:s}=e;return new u(t,n,r,i,s)}static fromJSON(e){const{pubkey:t,withdrawalCredentials:n,amount:r,signature:i,index:o}=e;return this.fromRequestData({pubkey:(0,s.hexToBytes)(t),withdrawalCredentials:(0,s.hexToBytes)(n),amount:(0,s.hexToBigInt)(r),signature:(0,s.hexToBytes)(i),index:(0,s.hexToBigInt)(o)})}serialize(){const e=this.index===o.BIGINT_0?new Uint8Array:(0,s.bigIntToBytes)(this.index),t=this.amount===o.BIGINT_0?new Uint8Array:(0,s.bigIntToBytes)(this.amount);return(0,i.concatBytes)(Uint8Array.from([this.type]),r.RLP.encode([this.pubkey,this.withdrawalCredentials,t,this.signature,e]))}toJSON(){return{pubkey:(0,s.bytesToHex)(this.pubkey),withdrawalCredentials:(0,s.bytesToHex)(this.withdrawalCredentials),amount:(0,s.bigIntToHex)(this.amount),signature:(0,s.bytesToHex)(this.signature),index:(0,s.bigIntToHex)(this.index)}}static deserialize(e){const[t,n,i,o,a]=r.RLP.decode(e.slice(1));return this.fromRequestData({pubkey:t,withdrawalCredentials:n,amount:(0,s.bytesToBigInt)(i),signature:o,index:(0,s.bytesToBigInt)(a)})}}n.DepositRequest=u;class l extends c{constructor(e,t,n){super(a.Withdrawal),this.sourceAddress=e,this.validatorPubkey=t,this.amount=n}static fromRequestData(e){const{sourceAddress:t,validatorPubkey:n,amount:r}=e;return new l(t,n,r)}static fromJSON(e){const{sourceAddress:t,validatorPubkey:n,amount:r}=e;return this.fromRequestData({sourceAddress:(0,s.hexToBytes)(t),validatorPubkey:(0,s.hexToBytes)(n),amount:(0,s.hexToBigInt)(r)})}serialize(){const e=this.amount===o.BIGINT_0?new Uint8Array:(0,s.bigIntToBytes)(this.amount);return(0,i.concatBytes)(Uint8Array.from([this.type]),r.RLP.encode([this.sourceAddress,this.validatorPubkey,e]))}toJSON(){return{sourceAddress:(0,s.bytesToHex)(this.sourceAddress),validatorPubkey:(0,s.bytesToHex)(this.validatorPubkey),amount:(0,s.bigIntToHex)(this.amount)}}static deserialize(e){const[t,n,i]=r.RLP.decode(e.slice(1));return this.fromRequestData({sourceAddress:t,validatorPubkey:n,amount:(0,s.bytesToBigInt)(i)})}}n.WithdrawalRequest=l;class d extends c{constructor(e,t,n){super(a.Consolidation),this.sourceAddress=e,this.sourcePubkey=t,this.targetPubkey=n}static fromRequestData(e){const{sourceAddress:t,sourcePubkey:n,targetPubkey:r}=e;return new d(t,n,r)}static fromJSON(e){const{sourceAddress:t,sourcePubkey:n,targetPubkey:r}=e;return this.fromRequestData({sourceAddress:(0,s.hexToBytes)(t),sourcePubkey:(0,s.hexToBytes)(n),targetPubkey:(0,s.hexToBytes)(r)})}serialize(){return(0,i.concatBytes)(Uint8Array.from([this.type]),r.RLP.encode([this.sourceAddress,this.sourcePubkey,this.targetPubkey]))}toJSON(){return{sourceAddress:(0,s.bytesToHex)(this.sourceAddress),sourcePubkey:(0,s.bytesToHex)(this.sourcePubkey),targetPubkey:(0,s.bytesToHex)(this.targetPubkey)}}static deserialize(e){const[t,n,i]=r.RLP.decode(e.slice(1));return this.fromRequestData({sourceAddress:t,sourcePubkey:n,targetPubkey:i})}}n.ConsolidationRequest=d;n.CLRequestFactory=class{static fromSerializedRequest(e){switch(e[0]){case a.Deposit:return u.deserialize(e);case a.Withdrawal:return l.deserialize(e);case a.Consolidation:return d.deserialize(e);default:throw Error(`Invalid request type=${e[0]}`)}}}},{"./bytes.js":12,"./constants.js":13,"@ethereumjs/rlp":29,"ethereum-cryptography/utils":451}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hashPersonalMessage=n.isValidSignature=n.fromRpcSig=n.toCompactSig=n.toRpcSig=n.ecrecover=n.calculateSigRecovery=n.ecsign=void 0;const r=e("ethereum-cryptography/keccak.js"),i=e("ethereum-cryptography/secp256k1.js"),s=e("./bytes.js"),o=e("./constants.js"),a=e("./helpers.js");function c(e,t){return e===o.BIGINT_0||e===o.BIGINT_1?e:void 0===t?e-o.BIGINT_27:e-(t*o.BIGINT_2+BigInt(35))}function u(e){return e===o.BIGINT_0||e===o.BIGINT_1}n.ecsign=function(e,t,n){const r=i.secp256k1.sign(e,t),s=r.toCompactRawBytes();return{r:s.slice(0,32),s:s.slice(32,64),v:void 0===n?BigInt(r.recovery+27):BigInt(r.recovery+35)+BigInt(n)*o.BIGINT_2}},n.calculateSigRecovery=c;n.ecrecover=function(e,t,n,r,o){const a=(0,s.concatBytes)((0,s.setLengthLeft)(n,32),(0,s.setLengthLeft)(r,32)),l=c(t,o);if(!u(l))throw new Error("Invalid signature v value");return i.secp256k1.Signature.fromCompact(a).addRecoveryBit(Number(l)).recoverPublicKey(e).toRawBytes(!1).slice(1)};n.toRpcSig=function(e,t,n,r){if(!u(c(e,r)))throw new Error("Invalid signature v value");return(0,s.bytesToHex)((0,s.concatBytes)((0,s.setLengthLeft)(t,32),(0,s.setLengthLeft)(n,32),(0,s.toBytes)(e)))};n.toCompactSig=function(e,t,n,r){if(!u(c(e,r)))throw new Error("Invalid signature v value");const i=Uint8Array.from([...n]);return(e>BigInt(28)&&e%o.BIGINT_2===o.BIGINT_1||e===o.BIGINT_1||e===BigInt(28))&&(i[0]|=128),(0,s.bytesToHex)((0,s.concatBytes)((0,s.setLengthLeft)(t,32),(0,s.setLengthLeft)(i,32)))};n.fromRpcSig=function(e){const t=(0,s.toBytes)(e);let n,r,i;if(t.length>=65)n=t.subarray(0,32),r=t.subarray(32,64),i=(0,s.bytesToBigInt)(t.subarray(64));else{if(64!==t.length)throw new Error("Invalid signature length");n=t.subarray(0,32),r=t.subarray(32,64),i=BigInt((0,s.bytesToInt)(t.subarray(32,33))>>7),r[0]&=127}return i<27&&(i+=o.BIGINT_27),{v:i,r:n,s:r}};n.isValidSignature=function(e,t,n,r=!0,i){if(32!==t.length||32!==n.length)return!1;if(!u(c(e,i)))return!1;const a=(0,s.bytesToBigInt)(t),l=(0,s.bytesToBigInt)(n);return!(a===o.BIGINT_0||a>=o.SECP256K1_ORDER||l===o.BIGINT_0||l>=o.SECP256K1_ORDER)&&!(r&&l>=o.SECP256K1_ORDER_DIV_2)};n.hashPersonalMessage=function(e){(0,a.assertIsBytes)(e);const t=(0,s.utf8ToBytes)(`Ethereum Signed Message:\n${e.length}`);return(0,r.keccak256)((0,s.concatBytes)(t,e))}},{"./bytes.js":12,"./constants.js":13,"./helpers.js":16,"ethereum-cryptography/keccak.js":432,"ethereum-cryptography/secp256k1.js":449}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toType=n.TypeOutput=n.isNestedUint8Array=void 0;const r=e("./bytes.js"),i=e("./internal.js");var s;n.isNestedUint8Array=function e(t){if(!Array.isArray(t))return!1;for(const n of t)if(Array.isArray(n)){if(!e(n))return!1}else if(!(n instanceof Uint8Array))return!1;return!0},function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Uint8Array=2]="Uint8Array",e[e.PrefixedHexString=3]="PrefixedHexString"}(s=n.TypeOutput||(n.TypeOutput={})),n.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,i.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const n=(0,r.toBytes)(e);switch(t){case s.Uint8Array:return n;case s.BigInt:return(0,r.bytesToBigInt)(n);case s.Number:{const e=(0,r.bytesToBigInt)(n);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case s.PrefixedHexString:return(0,r.bytesToHex)(n);default:throw new Error("unknown outputType")}}},{"./bytes.js":12,"./internal.js":18}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatBigDecimal=n.GWEI_TO_WEI=void 0;const r=e("./constants.js");n.GWEI_TO_WEI=BigInt(1e9),n.formatBigDecimal=function(e,t,n){t===r.BIGINT_0&&(t=r.BIGINT_1);const i=e/t,s=(e-i*t)*n/t,o=String(n).length-1-String(s).length;return`${i}.${"0".repeat(o)}${s}`}},{"./constants.js":13}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getVerkleTreeKeyForStorageSlot=n.chunkifyCode=n.getVerkleTreeKeyForCodeChunk=n.getVerkleTreeIndicesForCodeChunk=n.getVerkleTreeIndexesForStorageSlot=n.getVerkleKey=n.VERKLE_MAIN_STORAGE_OFFSET=n.VERKLE_NODE_WIDTH=n.VERKLE_CODE_OFFSET=n.VERKLE_HEADER_STORAGE_OFFSET=n.VERKLE_CODE_SIZE_LEAF_KEY=n.VERKLE_CODE_HASH_LEAF_KEY=n.VERKLE_NONCE_LEAF_KEY=n.VERKLE_BALANCE_LEAF_KEY=n.VERKLE_VERSION_LEAF_KEY=n.VerkleLeafType=n.verifyVerkleProof=n.getVerkleStem=void 0;const r=e("./bytes.js");function i(e,t,n=0){const i=(0,r.setLengthLeft)(t.toBytes(),32);let s;s="number"==typeof n?(0,r.setLengthRight)((0,r.int32ToBytes)(Number(n),!0),32):(0,r.setLengthRight)((0,r.bigIntToBytes)(BigInt(n),!0).slice(0,32),32);return e.getTreeKey(i,s,0).slice(0,31)}var s;n.getVerkleStem=i,n.verifyVerkleProof=function(e,t,n){return e.verifyExecutionWitnessPreState((0,r.bytesToHex)(t),JSON.stringify(n))},function(e){e[e.Version=0]="Version",e[e.Balance=1]="Balance",e[e.Nonce=2]="Nonce",e[e.CodeHash=3]="CodeHash",e[e.CodeSize=4]="CodeSize"}(s=n.VerkleLeafType||(n.VerkleLeafType={})),n.VERKLE_VERSION_LEAF_KEY=(0,r.intToBytes)(s.Version),n.VERKLE_BALANCE_LEAF_KEY=(0,r.intToBytes)(s.Balance),n.VERKLE_NONCE_LEAF_KEY=(0,r.intToBytes)(s.Nonce),n.VERKLE_CODE_HASH_LEAF_KEY=(0,r.intToBytes)(s.CodeHash),n.VERKLE_CODE_SIZE_LEAF_KEY=(0,r.intToBytes)(s.CodeSize),n.VERKLE_HEADER_STORAGE_OFFSET=64,n.VERKLE_CODE_OFFSET=128,n.VERKLE_NODE_WIDTH=256,n.VERKLE_MAIN_STORAGE_OFFSET=BigInt(256)**BigInt(31);function o(e){let t;t=e<n.VERKLE_CODE_OFFSET-n.VERKLE_HEADER_STORAGE_OFFSET?BigInt(n.VERKLE_HEADER_STORAGE_OFFSET)+e:n.VERKLE_MAIN_STORAGE_OFFSET+e;return{treeIndex:t/BigInt(n.VERKLE_NODE_WIDTH),subIndex:Number(t%BigInt(n.VERKLE_NODE_WIDTH))}}function a(e){return{treeIndex:Math.floor((n.VERKLE_CODE_OFFSET+e)/n.VERKLE_NODE_WIDTH),subIndex:(n.VERKLE_CODE_OFFSET+e)%n.VERKLE_NODE_WIDTH}}n.getVerkleKey=(e,t)=>{switch(t){case s.Version:return(0,r.concatBytes)(e,n.VERKLE_VERSION_LEAF_KEY);case s.Balance:return(0,r.concatBytes)(e,n.VERKLE_BALANCE_LEAF_KEY);case s.Nonce:return(0,r.concatBytes)(e,n.VERKLE_NONCE_LEAF_KEY);case s.CodeHash:return(0,r.concatBytes)(e,n.VERKLE_CODE_HASH_LEAF_KEY);case s.CodeSize:return(0,r.concatBytes)(e,n.VERKLE_CODE_SIZE_LEAF_KEY);default:return(0,r.concatBytes)(e,t)}},n.getVerkleTreeIndexesForStorageSlot=o,n.getVerkleTreeIndicesForCodeChunk=a;n.getVerkleTreeKeyForCodeChunk=async(e,t,n)=>{const{treeIndex:s,subIndex:o}=a(t);return(0,r.concatBytes)(i(n,e,s),(0,r.toBytes)(o))};n.chunkifyCode=e=>{if(e.length%31!=0){const t=31-e.length%31;e=(0,r.setLengthRight)(e,e.length+t)}throw new Error("Not implemented")};n.getVerkleTreeKeyForStorageSlot=async(e,t,n)=>{const{treeIndex:s,subIndex:a}=o(t);return(0,r.concatBytes)(i(n,e,s),(0,r.toBytes)(a))}},{"./bytes.js":12}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Withdrawal=void 0;const r=e("./address.js"),i=e("./bytes.js"),s=e("./constants.js"),o=e("./types.js");class a{constructor(e,t,n,r){this.index=e,this.validatorIndex=t,this.address=n,this.amount=r}static fromWithdrawalData(e){const{index:t,validatorIndex:n,address:s,amount:c}=e,u=(0,o.toType)(t,o.TypeOutput.BigInt),l=(0,o.toType)(n,o.TypeOutput.BigInt),d=s instanceof r.Address?s:new r.Address((0,i.toBytes)(s)),h=(0,o.toType)(c,o.TypeOutput.BigInt);return new a(u,l,d,h)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,n,r,i]=e;return a.fromWithdrawalData({index:t,validatorIndex:n,address:r,amount:i})}static toBytesArray(e){const{index:t,validatorIndex:n,address:i,amount:a}=e;return[(0,o.toType)(t,o.TypeOutput.BigInt)===s.BIGINT_0?new Uint8Array:(0,o.toType)(t,o.TypeOutput.Uint8Array),(0,o.toType)(n,o.TypeOutput.BigInt)===s.BIGINT_0?new Uint8Array:(0,o.toType)(n,o.TypeOutput.Uint8Array),i instanceof r.Address?i.bytes:(0,o.toType)(i,o.TypeOutput.Uint8Array),(0,o.toType)(a,o.TypeOutput.BigInt)===s.BIGINT_0?new Uint8Array:(0,o.toType)(a,o.TypeOutput.Uint8Array)]}raw(){return a.toBytesArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.bytes,amount:this.amount}}toJSON(){return{index:(0,i.bigIntToHex)(this.index),validatorIndex:(0,i.bigIntToHex)(this.validatorIndex),address:(0,i.bytesToHex)(this.address.bytes),amount:(0,i.bigIntToHex)(this.amount)}}}n.Withdrawal=a},{"./address.js":9,"./bytes.js":12,"./constants.js":13,"./types.js":25}],29:[function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){const t=[];let n=0;for(let i=0;i<e.length;i++){const s=r(e[i]);t.push(s),n+=s.length}return p(o(n,192),...t)}const t=g(e);return 1===t.length&&t[0]<128?t:p(o(t.length,128),t)}function i(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function s(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return d(l(e))}function o(e,t){if(e<56)return Uint8Array.from([e+t]);const n=m(e),r=m(t+55+n.length/2);return Uint8Array.from(h(r+n))}function a(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const n=c(g(e));if(t)return{data:n.data,remainder:n.remainder.slice()};if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function c(e){let t,n,r,o,a;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.subarray(1)};if(l<=183){if(t=l-127,r=128===l?Uint8Array.from([]):i(e,1,t),2===t&&r[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:r,remainder:e.subarray(t)}}if(l<=191){if(n=l-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=s(i(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return r=i(e,n,t+n),{data:r,remainder:e.subarray(t+n)}}if(l<=247){for(t=l-191,o=i(e,1,t);o.length;)a=c(o),u.push(a.data),o=a.remainder;return{data:u,remainder:e.subarray(t)}}{if(n=l-246,t=s(i(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const r=n+t;if(r>e.length)throw new Error("invalid RLP: total length is larger than the data");for(o=i(e,n,r);o.length;)a=c(o),u.push(a.data),o=a.remainder;return{data:u,remainder:e.subarray(r)}}}Object.defineProperty(n,"__esModule",{value:!0}),n.RLP=n.utils=n.decode=n.encode=void 0,n.encode=r,n.decode=a;const u=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function l(e){let t="";for(let n=0;n<e.length;n++)t+=u[e[n]];return t}function d(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function h(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 n=0;n<t.length;n++){const r=2*n;t[n]=d(e.slice(r,r+2))}return t}function p(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n}function f(e){return(new TextEncoder).encode(e)}function m(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function y(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function g(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return y(e)?h((t="string"!=typeof(n=e)?n:y(n)?n.slice(2):n).length%2?`0${t}`:t):f(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?h(m(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}n.utils={bytesToHex:l,concatBytes:p,hexToBytes:h,utf8ToBytes:f},n.RLP={encode:r,decode:a}},{}],30:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.getPersistentState=n.getAnonymizedState=n.BaseController=n.isBaseController=void 0;const o=e("immer");(0,o.enablePatches)(),n.isBaseController=function(e){return"object"==typeof e&&null!==e&&"name"in e&&"string"==typeof e.name&&"state"in e&&"object"==typeof e.state&&"metadata"in e&&"object"==typeof e.metadata};function a(e,t,n){return Object.keys(e).reduce(((r,i)=>{try{const s=t[i];if(!s)throw new Error(`No metadata found for '${String(i)}'`);const o=s[n],a=e[i];return"function"==typeof o?r[i]=o(a):o&&(r[i]=a),r}catch(e){return setTimeout((()=>{throw e})),r}}),{})}n.BaseController=class{constructor({messenger:e,metadata:t,name:n,state:s}){r.set(this,void 0),this.messagingSystem=e,this.name=n,i(this,r,(0,o.freeze)(s,!0),"f"),this.metadata=t,this.messagingSystem.registerActionHandler(`${n}:getState`,(()=>this.state)),this.messagingSystem.registerInitialEventPayload({eventType:`${n}:stateChange`,getPayload:()=>[this.state,[]]})}get state(){return s(this,r,"f")}set state(e){throw new Error("Controller state cannot be directly mutated; use 'update' method instead.")}update(e){const[t,n,a]=o.produceWithPatches(s(this,r,"f"),e);return i(this,r,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,n),{nextState:t,patches:n,inversePatches:a}}applyPatches(e){const t=(0,o.applyPatches)(s(this,r,"f"),e);i(this,r,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,e)}destroy(){this.messagingSystem.clearEventSubscriptions(`${this.name}:stateChange`)}},r=new WeakMap,n.getAnonymizedState=function(e,t){return a(e,t,"anonymous")},n.getPersistentState=function(e,t){return a(e,t,"persist")}},{immer:497}],31:[function(e,t,n){"use strict";var r,i,s,o,a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.Messenger=void 0;const c=e("./RestrictedMessenger.cjs");n.Messenger=class{constructor(){r.set(this,new Map),i.set(this,new Map),s.set(this,new Map),o.set(this,new Map)}registerActionHandler(e,t){if(a(this,r,"f").has(e))throw new Error(`A handler for ${e} has already been registered`);a(this,r,"f").set(e,t)}unregisterActionHandler(e){a(this,r,"f").delete(e)}clearActions(){a(this,r,"f").clear()}call(e,...t){const n=a(this,r,"f").get(e);if(!n)throw new Error(`A handler for ${e} has not been registered`);return n(...t)}registerInitialEventPayload({eventType:e,getPayload:t}){a(this,s,"f").set(e,t)}publish(e,...t){const n=a(this,i,"f").get(e);if(n)for(const[e,r]of n.entries())try{if(r){const n=a(this,o,"f").get(e),i=r(...t);i!==n&&(a(this,o,"f").set(e,i),e(i,n))}else e(...t)}catch(e){setTimeout((()=>{throw e}))}}subscribe(e,t,n){let r=a(this,i,"f").get(e);if(r||(r=new Map,a(this,i,"f").set(e,r)),r.set(t,n),n){const r=a(this,s,"f").get(e);if(r){const e=n(...r());a(this,o,"f").set(t,e)}}}unsubscribe(e,t){const n=a(this,i,"f").get(e);if(!n||!n.has(t))throw new Error(`Subscription not found for event: ${e}`);n.get(t)&&a(this,o,"f").delete(t),n.delete(t)}clearEventSubscriptions(e){a(this,i,"f").delete(e)}clearSubscriptions(){a(this,i,"f").clear()}getRestricted({name:e,allowedActions:t,allowedEvents:n}){return new c.RestrictedMessenger({messenger:this,name:e,allowedActions:t,allowedEvents:n})}},r=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap},{"./RestrictedMessenger.cjs":32}],32:[function(e,t,n){"use strict";var r,i,s,o,a,c,u,l,d=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},h=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.RestrictedMessenger=void 0;n.RestrictedMessenger=class{constructor({messenger:e,name:t,allowedActions:n,allowedEvents:c}){if(r.add(this),i.set(this,void 0),s.set(this,void 0),o.set(this,void 0),a.set(this,void 0),!e)throw new Error("Messenger not provided");d(this,i,e,"f"),d(this,s,t,"f"),d(this,o,n,"f"),d(this,a,c,"f")}registerActionHandler(e,t){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed registering action handlers prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").registerActionHandler(e,t)}unregisterActionHandler(e){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed unregistering action handlers prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").unregisterActionHandler(e)}call(e,...t){if(!h(this,r,"m",u).call(this,e))throw new Error(`Action missing from allow list: ${e}`);return h(this,i,"f").call(e,...t)}registerInitialEventPayload({eventType:e,getPayload:t}){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").registerInitialEventPayload({eventType:e,getPayload:t})}publish(e,...t){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").publish(e,...t)}subscribe(e,t,n){if(!h(this,r,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);return n?h(this,i,"f").subscribe(e,t,n):h(this,i,"f").subscribe(e,t)}unsubscribe(e,t){if(!h(this,r,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);h(this,i,"f").unsubscribe(e,t)}clearEventSubscriptions(e){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed clearing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").clearEventSubscriptions(e)}},i=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap,r=new WeakSet,c=function(e){const t=h(this,a,"f");return h(this,r,"m",l).call(this,e)||null!==t&&t.includes(e)},u=function(e){const t=h(this,o,"f");return h(this,r,"m",l).call(this,e)||null!==t&&t.includes(e)},l=function(e){return e.startsWith(`${h(this,s,"f")}:`)}},{}],33:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RestrictedMessenger=n.Messenger=n.isBaseController=n.getPersistentState=n.getAnonymizedState=n.BaseController=void 0;var r=e("./BaseControllerV2.cjs");Object.defineProperty(n,"BaseController",{enumerable:!0,get:function(){return r.BaseController}}),Object.defineProperty(n,"getAnonymizedState",{enumerable:!0,get:function(){return r.getAnonymizedState}}),Object.defineProperty(n,"getPersistentState",{enumerable:!0,get:function(){return r.getPersistentState}}),Object.defineProperty(n,"isBaseController",{enumerable:!0,get:function(){return r.isBaseController}});var i=e("./Messenger.cjs");Object.defineProperty(n,"Messenger",{enumerable:!0,get:function(){return i.Messenger}});var s=e("./RestrictedMessenger.cjs");Object.defineProperty(n,"RestrictedMessenger",{enumerable:!0,get:function(){return s.RestrictedMessenger}})},{"./BaseControllerV2.cjs":30,"./Messenger.cjs":31,"./RestrictedMessenger.cjs":32}],34:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP=n.ApprovalType=n.ORIGIN_METAMASK=n.NFT_API_TIMEOUT=n.NFT_API_VERSION=n.NFT_API_BASE_URL=n.OPENSEA_PROXY_URL=n.BUILT_IN_NETWORKS=n.TESTNET_TICKER_SYMBOLS=n.ASSET_TYPES=n.GWEI=n.ERC1155_TOKEN_RECEIVER_INTERFACE_ID=n.ERC1155_METADATA_URI_INTERFACE_ID=n.ERC1155_INTERFACE_ID=n.ERC721_ENUMERABLE_INTERFACE_ID=n.ERC721_METADATA_INTERFACE_ID=n.ERC721_INTERFACE_ID=n.ERC20=n.ERC1155=n.ERC721=n.MAX_SAFE_CHAIN_ID=n.GANACHE_CHAIN_ID=n.IPFS_DEFAULT_GATEWAY_URL=n.FALL_BACK_VS_CURRENCY=n.RPC=void 0;const r=e("./types.cjs");var i;n.RPC="rpc",n.FALL_BACK_VS_CURRENCY="ETH",n.IPFS_DEFAULT_GATEWAY_URL="https://cloudflare-ipfs.com/ipfs/",n.GANACHE_CHAIN_ID="0x539",n.MAX_SAFE_CHAIN_ID=0xfffffffffffec,n.ERC721="ERC721",n.ERC1155="ERC1155",n.ERC20="ERC20",n.ERC721_INTERFACE_ID="0x80ac58cd",n.ERC721_METADATA_INTERFACE_ID="0x5b5e139f",n.ERC721_ENUMERABLE_INTERFACE_ID="0x780e9d63",n.ERC1155_INTERFACE_ID="0xd9b67a26",n.ERC1155_METADATA_URI_INTERFACE_ID="0x0e89341c",n.ERC1155_TOKEN_RECEIVER_INTERFACE_ID="0x4e2312e0",n.GWEI="gwei",n.ASSET_TYPES={NATIVE:"NATIVE",TOKEN:"TOKEN",NFT:"NFT",UNKNOWN:"UNKNOWN"},n.TESTNET_TICKER_SYMBOLS={GOERLI:"GoerliETH",SEPOLIA:"SepoliaETH",LINEA_GOERLI:"LineaETH",LINEA_SEPOLIA:"LineaETH"},n.BUILT_IN_NETWORKS={[r.NetworkType.goerli]:{chainId:r.ChainId.goerli,ticker:r.NetworksTicker.goerli,rpcPrefs:{blockExplorerUrl:`https://${r.NetworkType.goerli}.etherscan.io`}},[r.NetworkType.sepolia]:{chainId:r.ChainId.sepolia,ticker:r.NetworksTicker.sepolia,rpcPrefs:{blockExplorerUrl:`https://${r.NetworkType.sepolia}.etherscan.io`}},[r.NetworkType.mainnet]:{chainId:r.ChainId.mainnet,ticker:r.NetworksTicker.mainnet,rpcPrefs:{blockExplorerUrl:"https://etherscan.io"}},[r.NetworkType["linea-goerli"]]:{chainId:r.ChainId["linea-goerli"],ticker:r.NetworksTicker["linea-goerli"],rpcPrefs:{blockExplorerUrl:"https://goerli.lineascan.build"}},[r.NetworkType["linea-sepolia"]]:{chainId:r.ChainId["linea-sepolia"],ticker:r.NetworksTicker["linea-sepolia"],rpcPrefs:{blockExplorerUrl:"https://sepolia.lineascan.build"}},[r.NetworkType["linea-mainnet"]]:{chainId:r.ChainId["linea-mainnet"],ticker:r.NetworksTicker["linea-mainnet"],rpcPrefs:{blockExplorerUrl:"https://lineascan.build"}},[r.NetworkType.rpc]:{chainId:void 0,blockExplorerUrl:void 0,ticker:void 0,rpcPrefs:void 0}},n.OPENSEA_PROXY_URL="https://proxy.api.cx.metamask.io/opensea/v1/api/v2",n.NFT_API_BASE_URL="https://nft.api.cx.metamask.io",n.NFT_API_VERSION="1",n.NFT_API_TIMEOUT=15e3,n.ORIGIN_METAMASK="metamask",function(e){e.AddEthereumChain="wallet_addEthereumChain",e.ConnectAccounts="connect_accounts",e.EthDecrypt="eth_decrypt",e.EthGetEncryptionPublicKey="eth_getEncryptionPublicKey",e.EthSignTypedData="eth_signTypedData",e.PersonalSign="personal_sign",e.ResultError="result_error",e.ResultSuccess="result_success",e.SnapDialogAlert="snap_dialog:alert",e.SnapDialogConfirmation="snap_dialog:confirmation",e.SnapDialogPrompt="snap_dialog:prompt",e.SnapDialogDefault="snap_dialog",e.SwitchEthereumChain="wallet_switchEthereumChain",e.Transaction="transaction",e.Unlock="unlock",e.WalletConnect="wallet_connect",e.WalletRequestPermissions="wallet_requestPermissions",e.WatchAsset="wallet_watchAsset"}(i||(n.ApprovalType=i={})),n.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP={[r.ChainId.goerli]:r.BuiltInNetworkName.Goerli,[r.ChainId.sepolia]:r.BuiltInNetworkName.Sepolia,[r.ChainId.mainnet]:r.BuiltInNetworkName.Mainnet,[r.ChainId["linea-goerli"]]:r.BuiltInNetworkName.LineaGoerli,[r.ChainId["linea-sepolia"]]:r.BuiltInNetworkName.LineaSepolia,[r.ChainId["linea-mainnet"]]:r.BuiltInNetworkName.LineaMainnet,[r.ChainId.aurora]:r.BuiltInNetworkName.Aurora}},{"./types.cjs":39}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createServicePolicy=n.DEFAULT_DEGRADED_THRESHOLD=n.DEFAULT_CIRCUIT_BREAK_DURATION=n.DEFAULT_MAX_CONSECUTIVE_FAILURES=n.DEFAULT_MAX_RETRIES=n.handleWhen=n.handleAll=n.BrokenCircuitError=n.CircuitState=void 0;const r=e("cockatiel");Object.defineProperty(n,"BrokenCircuitError",{enumerable:!0,get:function(){return r.BrokenCircuitError}}),Object.defineProperty(n,"CircuitState",{enumerable:!0,get:function(){return r.CircuitState}}),Object.defineProperty(n,"handleAll",{enumerable:!0,get:function(){return r.handleAll}}),Object.defineProperty(n,"handleWhen",{enumerable:!0,get:function(){return r.handleWhen}}),n.DEFAULT_MAX_RETRIES=3,n.DEFAULT_MAX_CONSECUTIVE_FAILURES=3*(1+n.DEFAULT_MAX_RETRIES),n.DEFAULT_CIRCUIT_BREAK_DURATION=18e5,n.DEFAULT_DEGRADED_THRESHOLD=5e3,n.createServicePolicy=function({maxRetries:e=n.DEFAULT_MAX_RETRIES,retryFilterPolicy:t=r.handleAll,maxConsecutiveFailures:i=n.DEFAULT_MAX_CONSECUTIVE_FAILURES,circuitBreakDuration:s=n.DEFAULT_CIRCUIT_BREAK_DURATION,degradedThreshold:o=n.DEFAULT_DEGRADED_THRESHOLD}={}){const a=(0,r.retry)(t,{maxAttempts:e,backoff:new r.ExponentialBackoff}),c=a.onRetry.bind(a),u=(0,r.circuitBreaker)(r.handleAll,{halfOpenAfter:s,breaker:new r.ConsecutiveBreaker(i)}),l=u.onBreak.bind(u),d=new r.EventEmitter;a.onGiveUp((()=>{u.state===r.CircuitState.Closed&&d.emit()})),a.onSuccess((({duration:e})=>{u.state===r.CircuitState.Closed&&e>o&&d.emit()}));const h=d.addListener;return{...(0,r.wrap)(a,u),circuitBreakerPolicy:u,retryPolicy:a,onBreak:l,onDegraded:h,onRetry:c}}},{cockatiel:417}],36:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.isEqualCaseInsensitive=n.weiHexToGweiDec=n.toHex=n.toChecksumHexAddress=n.timeoutFetch=n.successfulFetch=n.safelyExecuteWithTimeout=n.safelyExecute=n.query=n.normalizeEnsName=n.isValidHexAddress=n.isValidJson=n.isSmartContractCode=n.isSafeDynamicKey=n.isSafeChainId=n.isPlainObject=n.isNonEmptyArray=n.hexToText=n.hexToBN=n.handleFetch=n.gweiDecToWEIBN=n.getBuyURL=n.fromHex=n.fractionBN=n.fetchWithErrorHandling=n.convertHexToDecimal=n.BNToHex=n.handleWhen=n.handleAll=n.createServicePolicy=n.DEFAULT_MAX_RETRIES=n.DEFAULT_MAX_CONSECUTIVE_FAILURES=n.DEFAULT_DEGRADED_THRESHOLD=n.DEFAULT_CIRCUIT_BREAK_DURATION=n.CircuitState=n.BrokenCircuitError=void 0;var s=e("./create-service-policy.cjs");Object.defineProperty(n,"BrokenCircuitError",{enumerable:!0,get:function(){return s.BrokenCircuitError}}),Object.defineProperty(n,"CircuitState",{enumerable:!0,get:function(){return s.CircuitState}}),Object.defineProperty(n,"DEFAULT_CIRCUIT_BREAK_DURATION",{enumerable:!0,get:function(){return s.DEFAULT_CIRCUIT_BREAK_DURATION}}),Object.defineProperty(n,"DEFAULT_DEGRADED_THRESHOLD",{enumerable:!0,get:function(){return s.DEFAULT_DEGRADED_THRESHOLD}}),Object.defineProperty(n,"DEFAULT_MAX_CONSECUTIVE_FAILURES",{enumerable:!0,get:function(){return s.DEFAULT_MAX_CONSECUTIVE_FAILURES}}),Object.defineProperty(n,"DEFAULT_MAX_RETRIES",{enumerable:!0,get:function(){return s.DEFAULT_MAX_RETRIES}}),Object.defineProperty(n,"createServicePolicy",{enumerable:!0,get:function(){return s.createServicePolicy}}),Object.defineProperty(n,"handleAll",{enumerable:!0,get:function(){return s.handleAll}}),Object.defineProperty(n,"handleWhen",{enumerable:!0,get:function(){return s.handleWhen}}),i(e("./constants.cjs"),n);var o=e("./util.cjs");Object.defineProperty(n,"BNToHex",{enumerable:!0,get:function(){return o.BNToHex}}),Object.defineProperty(n,"convertHexToDecimal",{enumerable:!0,get:function(){return o.convertHexToDecimal}}),Object.defineProperty(n,"fetchWithErrorHandling",{enumerable:!0,get:function(){return o.fetchWithErrorHandling}}),Object.defineProperty(n,"fractionBN",{enumerable:!0,get:function(){return o.fractionBN}}),Object.defineProperty(n,"fromHex",{enumerable:!0,get:function(){return o.fromHex}}),Object.defineProperty(n,"getBuyURL",{enumerable:!0,get:function(){return o.getBuyURL}}),Object.defineProperty(n,"gweiDecToWEIBN",{enumerable:!0,get:function(){return o.gweiDecToWEIBN}}),Object.defineProperty(n,"handleFetch",{enumerable:!0,get:function(){return o.handleFetch}}),Object.defineProperty(n,"hexToBN",{enumerable:!0,get:function(){return o.hexToBN}}),Object.defineProperty(n,"hexToText",{enumerable:!0,get:function(){return o.hexToText}}),Object.defineProperty(n,"isNonEmptyArray",{enumerable:!0,get:function(){return o.isNonEmptyArray}}),Object.defineProperty(n,"isPlainObject",{enumerable:!0,get:function(){return o.isPlainObject}}),Object.defineProperty(n,"isSafeChainId",{enumerable:!0,get:function(){return o.isSafeChainId}}),Object.defineProperty(n,"isSafeDynamicKey",{enumerable:!0,get:function(){return o.isSafeDynamicKey}}),Object.defineProperty(n,"isSmartContractCode",{enumerable:!0,get:function(){return o.isSmartContractCode}}),Object.defineProperty(n,"isValidJson",{enumerable:!0,get:function(){return o.isValidJson}}),Object.defineProperty(n,"isValidHexAddress",{enumerable:!0,get:function(){return o.isValidHexAddress}}),Object.defineProperty(n,"normalizeEnsName",{enumerable:!0,get:function(){return o.normalizeEnsName}}),Object.defineProperty(n,"query",{enumerable:!0,get:function(){return o.query}}),Object.defineProperty(n,"safelyExecute",{enumerable:!0,get:function(){return o.safelyExecute}}),Object.defineProperty(n,"safelyExecuteWithTimeout",{enumerable:!0,get:function(){return o.safelyExecuteWithTimeout}}),Object.defineProperty(n,"successfulFetch",{enumerable:!0,get:function(){return o.successfulFetch}}),Object.defineProperty(n,"timeoutFetch",{enumerable:!0,get:function(){return o.timeoutFetch}}),Object.defineProperty(n,"toChecksumHexAddress",{enumerable:!0,get:function(){return o.toChecksumHexAddress}}),Object.defineProperty(n,"toHex",{enumerable:!0,get:function(){return o.toHex}}),Object.defineProperty(n,"weiHexToGweiDec",{enumerable:!0,get:function(){return o.weiHexToGweiDec}}),Object.defineProperty(n,"isEqualCaseInsensitive",{enumerable:!0,get:function(){return o.isEqualCaseInsensitive}}),i(e("./types.cjs"),n),i(e("./siwe.cjs"),n)},{"./constants.cjs":34,"./create-service-policy.cjs":35,"./siwe.cjs":38,"./types.cjs":39,"./util.cjs":40}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.projectLogger=void 0;const r=e("@metamask/utils");Object.defineProperty(n,"createModuleLogger",{enumerable:!0,get:function(){return r.createModuleLogger}}),n.projectLogger=(0,r.createProjectLogger)("controller-utils")},{"@metamask/utils":318}],38:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.detectSIWE=n.isValidSIWEOrigin=n.parseDomainParts=void 0;const r=e("@metamask/utils"),i=e("@spruceid/siwe-parser"),s=e("./logger.cjs"),o=(0,s.createModuleLogger)(s.projectLogger,"detect-siwe");function a(e){try{const i="string"!=typeof(n=e)?n:(0,r.remove0x)(n),s=t.from(i,"hex");return 32===s.length?e:s.toString("utf8")}catch(t){return o(t),e}var n}const c={"http:":"80","https:":"443"};n.parseDomainParts=(e,t)=>e.match(/^[^/:]*:\/\//u)?new URL(e):new URL(`${t}//${e}`);n.isValidSIWEOrigin=e=>{try{const{origin:t,siwe:r}=e;if(!t||!r?.parsedMessage?.domain)return!1;const i=new URL(t),s=(0,n.parseDomainParts)(r.parsedMessage.domain,i.protocol);return 0===s.hostname.localeCompare(i.hostname,void 0,{sensitivity:"accent"})&&(""!==s.port&&s.port!==i.port?""===i.port&&s.port===c[i.protocol]:""===s.username||s.username===i.username)}catch(e){return o(e),!1}};n.detectSIWE=e=>{try{const{data:t}=e,n=a(t);return{isSIWEMessage:!0,parsedMessage:new i.ParsedMessage(n)}}catch(e){return{isSIWEMessage:!1,parsedMessage:null}}}}).call(this)}).call(this,e("buffer").Buffer)},{"./logger.cjs":37,"@metamask/utils":318,"@spruceid/siwe-parser":353,buffer:385}],39:[function(e,t,n){"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0}),n.NetworkNickname=n.BlockExplorerUrl=n.NetworksTicker=n.ChainId=n.BuiltInNetworkName=n.isInfuraNetworkType=n.isNetworkType=n.NetworkType=n.InfuraNetworkType=void 0,n.InfuraNetworkType={mainnet:"mainnet",goerli:"goerli",sepolia:"sepolia","linea-goerli":"linea-goerli","linea-sepolia":"linea-sepolia","linea-mainnet":"linea-mainnet"},n.NetworkType={...n.InfuraNetworkType,rpc:"rpc"},n.isNetworkType=function(e){return Object.values(n.NetworkType).includes(e)},n.isInfuraNetworkType=function(e){return Object.keys(n.InfuraNetworkType).includes(e)},function(e){e.Mainnet="mainnet",e.Goerli="goerli",e.Sepolia="sepolia",e.LineaGoerli="linea-goerli",e.LineaSepolia="linea-sepolia",e.LineaMainnet="linea-mainnet",e.Aurora="aurora"}(r||(n.BuiltInNetworkName=r={})),n.ChainId={[r.Mainnet]:"0x1",[r.Goerli]:"0x5",[r.Sepolia]:"0xaa36a7",[r.Aurora]:"0x4e454152",[r.LineaGoerli]:"0xe704",[r.LineaSepolia]:"0xe705",[r.LineaMainnet]:"0xe708"},function(e){e.mainnet="ETH",e.goerli="GoerliETH",e.sepolia="SepoliaETH",e["linea-goerli"]="LineaETH",e["linea-sepolia"]="LineaETH",e["linea-mainnet"]="ETH",e.rpc=""}(i||(n.NetworksTicker=i={})),n.BlockExplorerUrl={[r.Mainnet]:"https://etherscan.io",[r.Goerli]:"https://goerli.etherscan.io",[r.Sepolia]:"https://sepolia.etherscan.io",[r.LineaGoerli]:"https://goerli.lineascan.build",[r.LineaSepolia]:"https://sepolia.lineascan.build",[r.LineaMainnet]:"https://lineascan.build"},n.NetworkNickname={[r.Mainnet]:"Ethereum Mainnet",[r.Goerli]:"Goerli",[r.Sepolia]:"Sepolia",[r.LineaGoerli]:"Linea Goerli",[r.LineaSepolia]:"Linea Sepolia",[r.LineaMainnet]:"Linea"}},{}],40:[function(e,t,n){(function(t){(function(){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.isEqualCaseInsensitive=n.isValidJson=n.isNonEmptyArray=n.isPlainObject=n.convertHexToDecimal=n.query=n.normalizeEnsName=n.timeoutFetch=n.fetchWithErrorHandling=n.handleFetch=n.successfulFetch=n.isSmartContractCode=n.isValidHexAddress=n.toChecksumHexAddress=n.safelyExecuteWithTimeout=n.safelyExecute=n.toHex=n.fromHex=n.hexToText=n.hexToBN=n.getBuyURL=n.weiHexToGweiDec=n.gweiDecToWEIBN=n.fractionBN=n.BNToHex=n.isSafeChainId=n.isSafeDynamicKey=n.PROTOTYPE_POLLUTION_BLOCKLIST=void 0;const i=e("@ethereumjs/util"),s=e("@metamask/ethjs-unit"),o=e("@metamask/utils"),a=r(e("bn.js")),c=r(e("eth-ens-namehash")),u=r(e("fast-deep-equal")),l=e("./constants.cjs"),d=new Error("timeout");function h(e){return e?new a.default((0,o.remove0x)(e),16):new a.default(0)}async function p(e,t){const n=await fetch(e,t);if(!n.ok)throw new Error(`Fetch failed with status '${n.status}' for request '${String(e)}'`);return n}async function f(e,t){const n=await p(e,t);return await n.json()}n.PROTOTYPE_POLLUTION_BLOCKLIST=["__proto__","constructor","prototype"],n.isSafeDynamicKey=function(e){return"string"==typeof e&&!n.PROTOTYPE_POLLUTION_BLOCKLIST.some((t=>e===t))},n.isSafeChainId=function(e){if(!(0,o.isHexString)(e))return!1;const t=Number.parseInt(e,(0,o.isStrictHexString)(e)?16:10);return Number.isSafeInteger(t)&&t>0&&t<=l.MAX_SAFE_CHAIN_ID},n.BNToHex=function(e){return(0,o.add0x)(e.toString(16))},n.fractionBN=function(e,t,n){const r=new a.default(t),i=new a.default(n);return e.mul(r).div(i)},n.gweiDecToWEIBN=function(e){if(Number.isNaN(e))return new a.default(0);const t=e.toString().split("."),n=t[0]||"0";let r=t[1]||"";if(!r)return(0,s.toWei)(n,"gwei");if(r.length<=9)return(0,s.toWei)(`${n}.${r}`,"gwei");const i=r.slice(9)[0];r=r.slice(0,9);let o=(0,s.toWei)(`${n}.${r}`,"gwei");return Number(i)>=5&&(o=o.add(new a.default(1))),o},n.weiHexToGweiDec=function(e){const t=new a.default((0,o.remove0x)(e),16);return(0,s.fromWei)(t,"gwei")},n.getBuyURL=function(e="1",t,n=5){switch(e){case"1":return`https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${n}&address=${t}&crypto_currency=ETH`;case"5":return"https://goerli-faucet.slock.it/";case"11155111":return"https://sepoliafaucet.net/";default:return}},n.hexToBN=h,n.hexToText=function(e){try{const n=(0,o.remove0x)(e);return t.from(n,"hex").toString("utf8")}catch(t){return e}},n.fromHex=function(e){return a.default.isBN(e)?e:new a.default(h(e).toString(10))},n.toHex=function(e){return"string"==typeof e&&(0,o.isStrictHexString)(e)?e:`0x${a.default.isBN(e)||"bigint"==typeof e?e.toString(16):new a.default(e.toString(),10).toString(16)}`},n.safelyExecute=async function(e,t=!1){try{return await e()}catch(e){return void(t&&console.error(e))}},n.safelyExecuteWithTimeout=async function(e,t=!1,n=500){try{return await Promise.race([e(),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))])}catch(e){return void(t&&console.error(e))}},n.toChecksumHexAddress=function(e){if("string"!=typeof e)return e;const t=(0,o.add0x)(e);return(0,o.isHexString)(t)?(0,i.toChecksumAddress)(t):t},n.isValidHexAddress=function(e,{allowNonPrefixed:t=!0}={}){const n=t?(0,o.add0x)(e):e;return!!(0,o.isStrictHexString)(n)&&(0,i.isValidAddress)(n)},n.isSmartContractCode=function(e){return!!e&&("0x"!==e&&"0x0"!==e)},n.successfulFetch=p,n.handleFetch=f,n.fetchWithErrorHandling=async function({url:e,options:t,timeout:n,errorCodesToCatch:r}){let i;try{i=n?Promise.race([await f(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))]):await f(e,t)}catch(e){!function(e,t=[]){if(!e)return;if(!(e instanceof Error))throw e;if(!t.some((t=>e.message.includes(`Fetch failed with status '${t}'`)))&&!e.message.includes("Failed to fetch")&&e!==d)throw e;console.error(e)}(e,r)}return i},n.timeoutFetch=async function(e,t,n=500){return Promise.race([p(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))])},n.normalizeEnsName=function(e){if("."===e)return e;if(e&&"string"==typeof e)try{const t=c.default.normalize(e.trim());if(t.match(/^(([\w\d-]+)\.)*[\w\d-]{7,}\.(eth|test)$/u))return t}catch(e){}return null},n.query=function(e,t,n=[]){return new Promise(((r,i)=>{const s=(e,t)=>{e?i(e):r(t)};t in e&&"function"==typeof e[t]?e[t](...n,s):e.sendAsync({method:t,params:n},s)}))};n.convertHexToDecimal=(e="0x0")=>(0,o.isStrictHexString)(e)?parseInt(e,16):Number(e)?Number(e):0,n.isPlainObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},n.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},n.isValidJson=function(e){try{return(0,u.default)(e,JSON.parse(JSON.stringify(e)))}catch(e){return!1}},n.isEqualCaseInsensitive=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()}}).call(this)}).call(this,e("buffer").Buffer)},{"./constants.cjs":34,"@ethereumjs/util":17,"@metamask/ethjs-unit":41,"@metamask/utils":318,"bn.js":382,buffer:385,"eth-ens-namehash":431,"fast-deep-equal":478}],41:[function(e,t,n){"use strict";var r=e("bn.js"),i=e("@metamask/number-to-bn"),s=new r(0),o=new r(-1),a={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function c(e){var t=e?e.toLowerCase():"ether",n=a[t];if("string"!=typeof n)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(a,null,2));return new r(n,10)}function u(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"==typeof e&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+".")}t.exports={unitMap:a,numberToString:u,getValueOfUnit:c,fromWei:function(e,t,n){var r=i(e),u=r.lt(s),l=c(t),d=a[t].length-1||1,h=n||{};u&&(r=r.mul(o));for(var p=r.mod(l).toString(10);p.length<d;)p="0"+p;h.pad||(p=p.match(/^([0-9]*[1-9]|0)(0*)/)[1]);var f=r.div(l).toString(10);h.commify&&(f=f.replace(/\B(?=(\d{3})+(?!\d))/g,","));var m=f+("0"==p?"":"."+p);return u&&(m="-"+m),m},toWei:function(e,t){var n=u(e),i=c(t),s=a[t].length-1||1,l="-"===n.substring(0,1);if(l&&(n=n.substring(1)),"."===n)throw new Error("[ethjs-unit] while converting number "+e+" to wei, invalid value");var d=n.split(".");if(d.length>2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var h=d[0],p=d[1];if(h||(h="0"),p||(p="0"),p.length>s)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;p.length<s;)p+="0";h=new r(h),p=new r(p);var f=h.mul(i).add(p);return l&&(f=f.mul(o)),new r(f.toString(10),10)}}},{"@metamask/number-to-bn":70,"bn.js":382}],42:[function(e,t,n){"use strict";var r,i,s,o,a,c,u,l,d,h,p,f,m,y=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},g=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},b=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.JsonRpcEngine=void 0;const v=e("@metamask/rpc-errors"),w=b(e("@metamask/safe-event-emitter")),x=e("@metamask/utils");class E extends w.default{constructor({notificationHandler:e}={}){super(),r.add(this),s.set(this,!1),o.set(this,void 0),a.set(this,void 0),y(this,o,[],"f"),y(this,a,e,"f")}destroy(){g(this,o,"f").forEach((e=>{"destroy"in e&&"function"==typeof e.destroy&&e.destroy()})),y(this,o,[],"f"),y(this,s,!0,"f")}push(e){g(this,r,"m",c).call(this),g(this,o,"f").push(e)}handle(e,t){if(g(this,r,"m",c).call(this),t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?g(this,r,"m",u).call(this,e,t):g(this,r,"m",u).call(this,e):t?g(this,r,"m",l).call(this,e,t):this._promiseHandle(e)}asMiddleware(){return g(this,r,"m",c).call(this),async(e,t,n,r)=>{try{const[s,a,c]=await g(i,i,"m",h).call(i,e,t,g(this,o,"f"));return a?(await g(i,i,"m",f).call(i,c),r(s)):n((async e=>{try{await g(i,i,"m",f).call(i,c)}catch(t){return e(t)}return e()}))}catch(e){return r(e)}}}async _promiseHandle(e){return new Promise(((t,n)=>{g(this,r,"m",l).call(this,e,((e,r)=>{e&&void 0===r?n(e):t(r)})).catch(n)}))}}function S(e){return JSON.stringify(e,null,2)}n.JsonRpcEngine=E,i=E,s=new WeakMap,o=new WeakMap,a=new WeakMap,r=new WeakSet,c=function(){if(g(this,s,"f"))throw new Error("This engine is destroyed and can no longer be used.")},u=async function(e,t){try{if(0===e.length){const e=[{id:null,jsonrpc:"2.0",error:new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Request batch must contain plain objects. Received an empty array")}];return t?t(null,e):e}const n=(await Promise.all(e.map(this._promiseHandle.bind(this)))).filter((e=>void 0!==e));return t?t(null,n):n}catch(e){if(t)return t(e);throw e}},l=async function(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const n=new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(n,{id:null,jsonrpc:"2.0",error:n})}if("string"!=typeof e.method){const n=new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return g(this,a,"f")&&!(0,x.isJsonRpcRequest)(e)?t(null):t(n,{id:e.id??null,jsonrpc:"2.0",error:n})}if(g(this,a,"f")&&(0,x.isJsonRpcNotification)(e)&&!(0,x.isJsonRpcRequest)(e)){try{await g(this,a,"f").call(this,e)}catch(n){return t(n)}return t(null)}let n=null;const r={...e},s={id:r.id,jsonrpc:r.jsonrpc};try{await g(i,i,"m",d).call(i,r,s,g(this,o,"f"))}catch(e){n=e}return n&&(delete s.result,s.error||(s.error=(0,v.serializeError)(n))),t(n,s)},d=async function(e,t,n){const[r,s,o]=await g(i,i,"m",h).call(i,e,t,n);if(g(i,i,"m",m).call(i,e,t,s),await g(i,i,"m",f).call(i,o),r)throw r},h=async function(e,t,n){const r=[];let s=null,o=!1;for(const a of n)if([s,o]=await g(i,i,"m",p).call(i,e,t,a,r),o)break;return[s,o,r.reverse()]},p=async function(e,t,n,r){return new Promise((i=>{const s=e=>{const n=e||t.error;n&&(t.error=(0,v.serializeError)(n)),i([n,!0])},o=n=>{t.error?s(t.error):(n&&("function"!=typeof n&&s(new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${S(e)}`,{request:e})),r.push(n)),i([null,!1]))};try{n(e,t,o,s)}catch(e){s(e)}}))},f=async function(e){for(const t of e)await new Promise(((e,n)=>{t((t=>t?n(t):e()))}))},m=function(e,t,n){if(!(0,x.hasProperty)(t,"result")&&!(0,x.hasProperty)(t,"error"))throw new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${S(e)}`,{request:e});if(!n)throw new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${S(e)}`,{request:e})}},{"@metamask/rpc-errors":96,"@metamask/safe-event-emitter":98,"@metamask/utils":318}],43:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createAsyncMiddleware=void 0,n.createAsyncMiddleware=function(e){return async(t,n,r,i)=>{let s;const o=new Promise((e=>{s=e}));let a=null,c=!1;const u=async()=>(c=!0,r((e=>{a=e,s()})),o);try{await e(t,n,u),c?(await o,a(null)):i(null)}catch(e){a?a(e):i(e)}}}},{}],44:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createScaffoldMiddleware=void 0,n.createScaffoldMiddleware=function(e){return(t,n,r,i)=>{const s=e[t.method];return void 0===s?r():"function"==typeof s?s(t,n,r,i):(n.result=s,i())}}},{}],45:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getUniqueId=void 0;const r=4294967295;let i=Math.floor(Math.random()*r);n.getUniqueId=function(){return i=(i+1)%r,i}},{}],46:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createIdRemapMiddleware=void 0;const r=e("./getUniqueId.cjs");n.createIdRemapMiddleware=function(){return(e,t,n,i)=>{const s=e.id,o=(0,r.getUniqueId)();e.id=o,t.id=o,n((n=>{e.id=s,t.id=s,n()}))}}},{"./getUniqueId.cjs":45}],47:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeMiddleware=n.JsonRpcEngine=n.createIdRemapMiddleware=n.getUniqueId=n.createScaffoldMiddleware=n.createAsyncMiddleware=void 0;var r=e("./createAsyncMiddleware.cjs");Object.defineProperty(n,"createAsyncMiddleware",{enumerable:!0,get:function(){return r.createAsyncMiddleware}});var i=e("./createScaffoldMiddleware.cjs");Object.defineProperty(n,"createScaffoldMiddleware",{enumerable:!0,get:function(){return i.createScaffoldMiddleware}});var s=e("./getUniqueId.cjs");Object.defineProperty(n,"getUniqueId",{enumerable:!0,get:function(){return s.getUniqueId}});var o=e("./idRemapMiddleware.cjs");Object.defineProperty(n,"createIdRemapMiddleware",{enumerable:!0,get:function(){return o.createIdRemapMiddleware}});var a=e("./JsonRpcEngine.cjs");Object.defineProperty(n,"JsonRpcEngine",{enumerable:!0,get:function(){return a.JsonRpcEngine}});var c=e("./mergeMiddleware.cjs");Object.defineProperty(n,"mergeMiddleware",{enumerable:!0,get:function(){return c.mergeMiddleware}})},{"./JsonRpcEngine.cjs":42,"./createAsyncMiddleware.cjs":43,"./createScaffoldMiddleware.cjs":44,"./getUniqueId.cjs":45,"./idRemapMiddleware.cjs":46,"./mergeMiddleware.cjs":48}],48:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeMiddleware=void 0;const r=e("./JsonRpcEngine.cjs");n.mergeMiddleware=function(e){const t=new r.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}},{"./JsonRpcEngine.cjs":42}],49:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.getBIP44AddressKeyDeriver=n.deriveBIP44AddressKey=n.BIP44CoinTypeNode=n.BIP_44_COIN_TYPE_DEPTH=void 0;const o=e("./BIP44Node.cjs"),a=e("./constants.cjs"),c=e("./SLIP10Node.cjs"),u=e("./utils.cjs");n.BIP_44_COIN_TYPE_DEPTH=2;class l{static async fromJSON(e,t,n){h(t),d(e.depth);const r=await o.BIP44Node.fromExtendedKey({depth:e.depth,index:e.index,network:e.network,parentFingerprint:e.parentFingerprint,chainCode:(0,u.hexStringToBytes)(e.chainCode),privateKey:(0,u.nullableHexStringToBytes)(e.privateKey),publicKey:(0,u.hexStringToBytes)(e.publicKey)},n);return new l(r,t)}static async fromDerivationPath(e,t,n){d(e.length-1);const r=await o.BIP44Node.fromDerivationPath({derivationPath:e,network:t},n),i=(0,u.getBIP44CoinType)(e);return new l(r,i)}static async fromSeed({derivationPath:e,network:t},n){d(e.length-1);const r=await o.BIP44Node.fromSeed({derivationPath:e,network:t},n),i=(0,u.getBIP44CoinType)(e);return new l(r,i)}static async fromNode(e,t){if(!(e instanceof o.BIP44Node))throw new Error("Invalid node: Expected an instance of BIP44Node.");return h(t),d(e.depth),Promise.resolve(new l(e,t))}constructor(e,t){r.set(this,void 0),i(this,r,e,"f"),this.coin_type=t,this.path=(0,u.getBIP44CoinTypePathString)(t),Object.freeze(this)}get depth(){return s(this,r,"f").depth}get privateKeyBytes(){return s(this,r,"f").privateKeyBytes}get publicKeyBytes(){return s(this,r,"f").publicKeyBytes}get chainCodeBytes(){return s(this,r,"f").chainCodeBytes}get privateKey(){return s(this,r,"f").privateKey}get publicKey(){return s(this,r,"f").publicKey}get compressedPublicKey(){return s(this,r,"f").compressedPublicKey}get compressedPublicKeyBytes(){return s(this,r,"f").compressedPublicKeyBytes}get chainCode(){return s(this,r,"f").chainCode}get address(){return s(this,r,"f").address}get masterFingerprint(){return s(this,r,"f").masterFingerprint}get parentFingerprint(){return s(this,r,"f").parentFingerprint}get fingerprint(){return s(this,r,"f").fingerprint}get index(){return s(this,r,"f").index}get network(){return s(this,r,"f").network}get curve(){return s(this,r,"f").curve}get extendedKey(){return s(this,r,"f").extendedKey}async deriveBIP44AddressKey({account:e=0,change:t=0,address_index:n}){return await s(this,r,"f").derive((0,u.getBIP44CoinTypeToAddressPathTuple)({account:e,change:t,address_index:n}))}toJSON(){return{...s(this,r,"f").toJSON(),coin_type:this.coin_type,path:this.path}}}function d(e){if(e!==n.BIP_44_COIN_TYPE_DEPTH)throw new Error(`Invalid depth: Coin type nodes must be of depth ${n.BIP_44_COIN_TYPE_DEPTH}. Received: "${e}"`)}function h(e){if("number"!=typeof e||!Number.isInteger(e)||e<0)throw new Error("Invalid coin type: The specified coin type must be a non-negative integer number.")}async function p(e,t){if(e instanceof l)return d(e.depth),e;if("string"==typeof e){const n=await o.BIP44Node.fromExtendedKey(e,t),r=await l.fromNode(n,n.index-a.BIP_32_HARDENED_OFFSET);return d(r.depth),r}return l.fromJSON(e,e.coin_type,t)}n.BIP44CoinTypeNode=l,r=new WeakMap,n.deriveBIP44AddressKey=async function(e,{account:t=0,change:n=0,address_index:r},i){const s=(0,u.getBIP44CoinTypeToAddressPathTuple)({account:t,change:n,address_index:r}),a=await p(e,i),l=await(0,c.deriveChildNode)({path:s,node:a},i);return new o.BIP44Node(l)},n.getBIP44AddressKeyDeriver=async function(e,t,n){const{account:r=0,change:i=0}=t??{},s=await p(e,n),a=(0,u.getHardenedBIP32NodeToken)(r),l=(0,u.getBIP32NodeToken)(i),d=async(e,t=!1)=>{const r=await(0,c.deriveChildNode)({path:[a,l,t?(0,u.getHardenedBIP32NodeToken)(e):(0,u.getUnhardenedBIP32NodeToken)(e)],node:s},n);return new o.BIP44Node(r)};return d.coin_type=s.coin_type,d.path=(0,u.getBIP44ChangePathString)(s.path,{account:r,change:i}),Object.freeze(d),d}},{"./BIP44Node.cjs":50,"./SLIP10Node.cjs":51,"./constants.cjs":52,"./utils.cjs":69}],50:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},s=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.validateBIP44Depth=n.BIP44Node=void 0;const o=e("@metamask/utils"),a=e("./constants.cjs"),c=e("./extended-keys.cjs"),u=e("./SLIP10Node.cjs"),l=e("./utils.cjs");class d{static async fromJSON(e,t){return d.fromExtendedKey(e,t)}static async fromExtendedKey(e,t){if("string"==typeof e){const n=(0,c.decodeExtendedKey)(e),{type:r,chainCode:i,depth:s,parentFingerprint:o,index:a,network:u}=n;if("private"===r){const{privateKey:e}=n;return d.fromExtendedKey({depth:s,parentFingerprint:o,index:a,network:u,privateKey:e,chainCode:i},t)}const{publicKey:l}=n;return d.fromExtendedKey({depth:s,parentFingerprint:o,index:a,network:u,publicKey:l,chainCode:i},t)}const{privateKey:n,publicKey:r,chainCode:i,depth:s,parentFingerprint:o,index:a,network:l}=e;h(s);const p=await u.SLIP10Node.fromExtendedKey({privateKey:n,publicKey:r,chainCode:i,depth:s,parentFingerprint:o,index:a,network:l,curve:"secp256k1"},t);return new d(p)}static async fromDerivationPath({derivationPath:e,network:t},n){h(e.length-1),p(e,a.MIN_BIP_44_DEPTH);const r=await u.SLIP10Node.fromDerivationPath({derivationPath:e,network:t,curve:"secp256k1"},n);return new d(r)}static async fromSeed({derivationPath:e,network:t},n){h(e.length-1),p(e,a.MIN_BIP_44_DEPTH);const r=await u.SLIP10Node.fromSeed({derivationPath:e,network:t,curve:"secp256k1"},n);return new d(r)}get depth(){return i(this,r,"f").depth}get privateKeyBytes(){return i(this,r,"f").privateKeyBytes}get publicKeyBytes(){return i(this,r,"f").publicKeyBytes}get chainCodeBytes(){return i(this,r,"f").chainCodeBytes}get privateKey(){return i(this,r,"f").privateKey}get publicKey(){return i(this,r,"f").publicKey}get compressedPublicKey(){return i(this,r,"f").compressedPublicKey}get compressedPublicKeyBytes(){return i(this,r,"f").compressedPublicKeyBytes}get chainCode(){return i(this,r,"f").chainCode}get address(){return i(this,r,"f").address}get masterFingerprint(){return i(this,r,"f").masterFingerprint}get parentFingerprint(){return i(this,r,"f").parentFingerprint}get fingerprint(){return i(this,r,"f").fingerprint}get index(){return i(this,r,"f").index}get network(){return i(this,r,"f").network}get extendedKey(){return i(this,r,"f").extendedKey}get curve(){return i(this,r,"f").curve}constructor(e){r.set(this,void 0),s(this,r,e,"f"),Object.freeze(this)}neuter(){const e=i(this,r,"f").neuter();return new d(e)}async derive(e){if(this.depth===a.MAX_BIP_44_DEPTH)throw new Error("Illegal operation: This HD tree node is already a leaf node.");h(this.depth+e.length),p(e,this.depth+1);const t=await i(this,r,"f").derive(e);return new d(t)}toJSON(){return{depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,network:this.network,privateKey:this.privateKey,publicKey:this.publicKey,chainCode:this.chainCode}}}function h(e){if((0,u.validateBIP32Depth)(e),e<a.MIN_BIP_44_DEPTH||e>a.MAX_BIP_44_DEPTH)throw new Error(`Invalid HD tree path depth: The depth must be a positive integer N such that 0 <= N <= 5. Received: "${e}"`)}function p(e,t){e.forEach(((e,n)=>{const r=t+n;if(r!==a.MIN_BIP_44_DEPTH)switch((0,o.assert)("string"==typeof e),r){case 1:if(e!==a.BIP44PurposeNodeToken)throw new Error(`Invalid derivation path: The "purpose" node (depth 1) must be the string "${a.BIP44PurposeNodeToken}".`);break;case 2:if(!a.BIP_32_PATH_REGEX.test(e)||!(0,l.isHardened)(e))throw new Error('Invalid derivation path: The "coin_type" node (depth 2) must be a hardened BIP-32 node.');break;case 3:if(!a.BIP_32_PATH_REGEX.test(e)||!(0,l.isHardened)(e))throw new Error('Invalid derivation path: The "account" node (depth 3) must be a hardened BIP-32 node.');break;case 4:if(!a.BIP_32_PATH_REGEX.test(e))throw new Error('Invalid derivation path: The "change" node (depth 4) must be a BIP-32 node.');break;case a.MAX_BIP_44_DEPTH:if(!a.BIP_32_PATH_REGEX.test(e))throw new Error('Invalid derivation path: The "address_index" node (depth 5) must be a BIP-32 node.')}else if(!(e instanceof Uint8Array||a.BIP_39_PATH_REGEX.test(e)))throw new Error('Invalid derivation path: The "m" / seed node (depth 0) must be a BIP-39 node.')}))}n.BIP44Node=d,r=new WeakMap,n.validateBIP44Depth=h},{"./SLIP10Node.cjs":51,"./constants.cjs":52,"./extended-keys.cjs":66,"./utils.cjs":69,"@metamask/utils":318}],51:[function(e,t,n){"use strict";var r,i,s,o,a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},c=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildNode=n.validateRootIndex=n.validateMasterParentFingerprint=n.validateParentFingerprint=n.validateBIP32Depth=n.SLIP10Node=void 0;const u=e("@metamask/utils"),l=e("./constants.cjs"),d=e("./curves/index.cjs"),h=e("./derivation.cjs"),p=e("./derivers/bip32.cjs"),f=e("./derivers/bip39.cjs"),m=e("./extended-keys.cjs"),y=e("./guard.cjs"),g=e("./utils.cjs");class b{static async fromJSON(e,t){return r.fromExtendedKey(e,t)}static async fromExtendedKey(e,t){if("string"==typeof e){const n=(0,m.decodeExtendedKey)(e),{chainCode:i,depth:s,parentFingerprint:o,index:a}=n;if("private"===n.type){const{privateKey:e}=n;return r.fromExtendedKey({depth:s,parentFingerprint:o,index:a,privateKey:e,chainCode:i,curve:"secp256k1"},t)}const{publicKey:c}=n;return r.fromExtendedKey({depth:s,parentFingerprint:o,index:a,publicKey:c,chainCode:i,curve:"secp256k1"},t)}const{depth:n,masterFingerprint:s,parentFingerprint:o,index:c,network:h,privateKey:p,publicKey:f,chainCode:b,curve:S,guard:A}=e,_=(0,g.getBytes)(b,l.BYTES_KEY_LENGTH);(0,g.validateCurve)(S),v(n),(0,g.validateBIP32Index)(c),E(c,n),(0,g.validateNetwork)(h),w(o,n),x(s,o,n);const T=(0,d.getCurveByName)(S);if(p){const e=(0,g.getBytesUnsafe)(p,T.privateKeyLength);(0,u.assert)(T.isValidPrivateKey(e),`Invalid private key: Value is not a valid ${S} private key.`);const l=A===y.PUBLIC_KEY_GUARD&&f?(0,g.getBytes)(f,T.publicKeyLength):void 0;return new r({depth:n,masterFingerprint:s,parentFingerprint:o,index:c,network:h,chainCode:_,privateKey:e,publicKey:l,curve:S},t,a(this,r,"f",i))}if(f){const e=(0,g.getBytes)(f,T.publicKeyLength);return new r({depth:n,masterFingerprint:s,parentFingerprint:o,index:c,network:h,chainCode:_,publicKey:e,curve:S},t,a(this,r,"f",i))}throw new Error("Invalid options: Must provide either a private key or a public key.")}static async fromDerivationPath({derivationPath:e,network:t,curve:n},r){if((0,g.validateCurve)(n),!e)throw new Error("Invalid options: Must provide a derivation path.");if(0===e.length)throw new Error("Invalid derivation path: May not specify an empty derivation path.");const i=await(0,f.getDerivationPathWithSeed)({path:e,curve:n},r);return await(0,h.deriveKeyFromPath)({path:i,depth:e.length-1,network:t,curve:n},r)}static async fromSeed({derivationPath:e,network:t,curve:n},r){if((0,g.validateCurve)(n),"ed25519Bip32"===n)throw new Error('Invalid curve: The curve "ed25519Bip32" is not supported by the `fromSeed` function.');if(!e)throw new Error("Invalid options: Must provide a derivation path.");if(0===e.length)throw new Error("Invalid derivation path: May not specify an empty derivation path.");return await(0,h.deriveKeyFromPath)({path:e,depth:e.length-1,network:t,curve:n},r)}constructor({depth:e,masterFingerprint:t,parentFingerprint:n,index:l,network:d="mainnet",chainCode:h,privateKey:p,publicKey:f,curve:m},y={},g){s.set(this,void 0),o.set(this,void 0),(0,u.assert)(g===a(r,r,"f",i),"SLIP10Node can only be constructed using `SLIP10Node.fromJSON`, `SLIP10Node.fromExtendedKey`, `SLIP10Node.fromDerivationPath`, or `SLIP10Node.fromSeed`."),(0,u.assert)(void 0!==p||void 0!==f,"SLIP10Node requires either a private key or a public key to be set."),this.depth=e,this.masterFingerprint=t,this.parentFingerprint=n,this.index=l,this.network=d,this.chainCodeBytes=h,this.privateKeyBytes=p,this.curve=m,c(this,s,f,"f"),c(this,o,y,"f"),Object.freeze(this)}get chainCode(){return(0,u.bytesToHex)(this.chainCodeBytes)}get privateKey(){if(this.privateKeyBytes)return(0,u.bytesToHex)(this.privateKeyBytes)}get publicKey(){return(0,u.bytesToHex)(this.publicKeyBytes)}get publicKeyBytes(){return void 0!==a(this,s,"f")||((0,u.assert)(this.privateKeyBytes,"Either a private key or public key is required."),c(this,s,(0,d.getCurveByName)(this.curve).getPublicKey(this.privateKeyBytes),"f")),a(this,s,"f")}get compressedPublicKeyBytes(){return(0,d.getCurveByName)(this.curve).compressPublicKey(this.publicKeyBytes)}get compressedPublicKey(){return(0,u.bytesToHex)(this.compressedPublicKeyBytes)}get address(){if("secp256k1"!==this.curve)throw new Error("Unable to get address for this node: Only secp256k1 is supported.");return(0,u.bytesToHex)((0,p.publicKeyToEthAddress)(this.publicKeyBytes))}get fingerprint(){return(0,g.getFingerprint)(this.compressedPublicKeyBytes,(0,d.getCurveByName)(this.curve).compressedPublicKeyLength)}get extendedKey(){(0,u.assert)("secp256k1"===this.curve,"Unable to get extended key for this node: Only secp256k1 is supported.");const e={depth:this.depth,parentFingerprint:this.parentFingerprint,index:this.index,network:this.network,chainCode:this.chainCodeBytes};return this.privateKeyBytes?(0,m.encodeExtendedKey)({...e,type:"private",privateKey:this.privateKeyBytes}):(0,m.encodeExtendedKey)({...e,type:"public",publicKey:this.publicKeyBytes})}neuter(){return new r({depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,chainCode:this.chainCodeBytes,publicKey:this.publicKeyBytes,curve:this.curve,network:this.network},a(this,o,"f"),a(r,r,"f",i))}async derive(e){return await S({path:e,node:this},a(this,o,"f"))}toJSON(){return{depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,network:this.network,curve:this.curve,privateKey:this.privateKey,publicKey:this.publicKey,chainCode:this.chainCode}}}function v(e){if(!(0,g.isValidInteger)(e))throw new Error(`Invalid HD tree path depth: The depth must be a positive integer. Received: "${String(e)}".`)}function w(e,t){if(!(0,g.isValidInteger)(e))throw new Error(`Invalid parent fingerprint: The fingerprint must be a positive integer. Received: "${String(e)}".`);if(0===t&&0!==e)throw new Error(`Invalid parent fingerprint: The fingerprint of the root node must be 0. Received: "${String(e)}".`);if(t>0&&0===e)throw new Error(`Invalid parent fingerprint: The fingerprint of a child node must not be 0. Received: "${String(e)}".`)}function x(e,t,n){if(e&&n>=2&&e===t)throw new Error(`Invalid parent fingerprint: The fingerprint of a child node cannot be equal to the master fingerprint. Received: "${String(t)}".`)}function E(e,t){if(0===t&&0!==e)throw new Error(`Invalid index: The index of the root node must be 0. Received: "${String(e)}".`)}async function S({path:e,node:t},n){if(0===e.length)throw new Error("Invalid HD tree derivation path: Deriving a path of length 0 is not defined.");const r=t.depth+e.length;return v(r),await(0,h.deriveKeyFromPath)({path:e,node:t,depth:r},n)}n.SLIP10Node=b,r=b,s=new WeakMap,o=new WeakMap,i={value:Symbol("SLIP10Node.constructor")},n.validateBIP32Depth=v,n.validateParentFingerprint=w,n.validateMasterParentFingerprint=x,n.validateRootIndex=E,n.deriveChildNode=S},{"./constants.cjs":52,"./curves/index.cjs":57,"./derivation.cjs":59,"./derivers/bip32.cjs":60,"./derivers/bip39.cjs":61,"./extended-keys.cjs":66,"./guard.cjs":67,"./utils.cjs":69,"@metamask/utils":318}],52:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BIP_32_HARDENED_OFFSET=n.BIP_39_PATH_REGEX=n.CIP_3_PATH_REGEX=n.SLIP_10_PATH_REGEX=n.BIP_32_PATH_REGEX=n.UNPREFIXED_BIP_32_PATH_REGEX=n.UNPREFIXED_PATH_REGEX=n.BIP44PurposeNodeToken=n.MAX_BIP_32_INDEX=n.MAX_UNHARDENED_BIP_32_INDEX=n.MAX_BIP_44_DEPTH=n.MIN_BIP_44_DEPTH=n.BYTES_KEY_LENGTH=void 0,n.BYTES_KEY_LENGTH=32,n.MIN_BIP_44_DEPTH=0,n.MAX_BIP_44_DEPTH=5,n.MAX_UNHARDENED_BIP_32_INDEX=2147483647,n.MAX_BIP_32_INDEX=4294967295,n.BIP44PurposeNodeToken="bip32:44'",n.UNPREFIXED_PATH_REGEX=/^\d+$/u,n.UNPREFIXED_BIP_32_PATH_REGEX=/^(?<index>\d+)'?$/u,n.BIP_32_PATH_REGEX=/^bip32:\d+'?$/u,n.SLIP_10_PATH_REGEX=/^slip10:\d+'?$/u,n.CIP_3_PATH_REGEX=/^cip3:\d+'?$/u,n.BIP_39_PATH_REGEX=/^bip39:([a-z]+){1}( [a-z]+){11,23}$/u,n.BIP_32_HARDENED_OFFSET=2147483648},{}],53:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha256=n.ripemd160=n.pbkdf2Sha512=n.keccak256=n.hmacSha512=void 0;const r=e("@noble/hashes/hmac"),i=e("@noble/hashes/pbkdf2"),s=e("@noble/hashes/ripemd160"),o=e("@noble/hashes/sha256"),a=e("@noble/hashes/sha3"),c=e("@noble/hashes/sha512"),u=e("./utils.cjs");n.hmacSha512=async function(e,t,n={}){if(n.hmacSha512)return await n.hmacSha512(e,t);if((0,u.isWebCryptoSupported)()){const n=await crypto.subtle.importKey("raw",e,{name:"HMAC",hash:"SHA-512"},!1,["sign"]),r=await crypto.subtle.sign("HMAC",n,t);return new Uint8Array(r)}return(0,r.hmac)(c.sha512,e,t)},n.keccak256=function(e){return(0,a.keccak_256)(e)},n.pbkdf2Sha512=async function(e,t,n,r,s={}){if(s.pbkdf2Sha512)return await s.pbkdf2Sha512(e,t,n,r);if((0,u.isWebCryptoSupported)()){const i=await crypto.subtle.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]),s=await crypto.subtle.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:"SHA-512"}},i,8*r);return new Uint8Array(s)}return await(0,i.pbkdf2Async)(c.sha512,e,t,{c:n,dkLen:r})},n.ripemd160=function(e){return(0,s.ripemd160)(e)},n.sha256=function(e){return(0,o.sha256)(e)}},{"./utils.cjs":69,"@noble/hashes/hmac":344,"@noble/hashes/pbkdf2":345,"@noble/hashes/ripemd160":346,"@noble/hashes/sha256":347,"@noble/hashes/sha3":348,"@noble/hashes/sha512":349}],54:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.mod=n.getCurveByName=n.curves=void 0;const o=s(e("./ed25519.cjs")),a=s(e("./ed25519Bip32.cjs")),c=s(e("./secp256k1.cjs"));n.curves={secp256k1:c,ed25519:o,ed25519Bip32:a},n.getCurveByName=function(e){return n.curves[e]};var u=e("@noble/curves/abstract/modular");Object.defineProperty(n,"mod",{enumerable:!0,get:function(){return u.mod}})},{"./ed25519.cjs":55,"./ed25519Bip32.cjs":56,"./secp256k1.cjs":58,"@noble/curves/abstract/modular":334}],55:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.publicKeyLength=n.deriveUnhardenedKeys=n.isValidPrivateKey=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/ed25519");n.curve=i.ed25519.CURVE,n.name="ed25519",n.secret=(0,r.stringToBytes)("ed25519 seed");n.isValidPrivateKey=e=>!0,n.deriveUnhardenedKeys=!1,n.publicKeyLength=33;n.getPublicKey=(()=>{let e=!1;return(t,n)=>{e||(i.ed25519.ExtendedPoint.BASE._setWindowSize(4),e=!0);const s=i.ed25519.getPublicKey(t);return(0,r.concatBytes)([new Uint8Array([0]),s])}})();n.publicAdd=(e,t)=>{throw new Error("Ed25519 does not support public key derivation.")};n.compressPublicKey=e=>e;n.decompressPublicKey=e=>e,n.privateKeyLength=32,n.masterNodeGenerationSpec="slip10",n.compressedPublicKeyLength=33},{"@metamask/utils":318,"@noble/curves/ed25519":338}],56:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.multiplyWithBase=n.bytesToNumberLE=n.publicKeyLength=n.deriveUnhardenedKeys=n.isValidPrivateKey=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/abstract/modular"),s=e("@noble/curves/ed25519");function o(e,t){const n=e[t];return(0,r.assert)(void 0!==n,"Private key is too short."),n}n.curve=s.ed25519.CURVE,n.name="ed25519Bip32",n.secret=(0,r.stringToBytes)("");n.isValidPrivateKey=e=>!(7&o(e,0))&&(!(128&o(e,31))&&!(64&~o(e,31))),n.deriveUnhardenedKeys=!0,n.publicKeyLength=32;n.bytesToNumberLE=e=>(0,r.hexToBigInt)((0,r.bytesToHex)(Uint8Array.from(e).reverse()));n.multiplyWithBase=e=>{const t=(0,i.mod)((0,n.bytesToNumberLE)(e),n.curve.n);return s.ed25519.ExtendedPoint.BASE.multiply(t).toRawBytes()};n.getPublicKey=(e,t)=>(0,n.multiplyWithBase)(e.slice(0,32));n.publicAdd=(e,t)=>s.ed25519.ExtendedPoint.fromHex((0,r.remove0x)((0,r.bytesToHex)(e))).add(s.ed25519.ExtendedPoint.fromHex((0,r.remove0x)((0,r.bytesToHex)(t)))).toRawBytes();n.compressPublicKey=e=>e;n.decompressPublicKey=e=>e,n.privateKeyLength=64,n.masterNodeGenerationSpec="cip3",n.compressedPublicKeyLength=32},{"@metamask/utils":318,"@noble/curves/abstract/modular":334,"@noble/curves/ed25519":338}],57:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.ed25519Bip32=n.ed25519=n.secp256k1=void 0,s(e("./curve.cjs"),n),n.secp256k1=o(e("./secp256k1.cjs")),n.ed25519=o(e("./ed25519.cjs")),n.ed25519Bip32=o(e("./ed25519Bip32.cjs"))},{"./curve.cjs":54,"./ed25519.cjs":55,"./ed25519Bip32.cjs":56,"./secp256k1.cjs":58}],58:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.isValidPrivateKey=n.publicKeyLength=n.deriveUnhardenedKeys=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/secp256k1"),s=e("../utils.cjs");n.curve=i.secp256k1.CURVE,n.name="secp256k1",n.secret=(0,r.stringToBytes)("Bitcoin seed"),n.deriveUnhardenedKeys=!0,n.publicKeyLength=65;n.isValidPrivateKey=e=>i.secp256k1.utils.isValidPrivateKey(e);n.getPublicKey=(()=>{let e=!1;return(t,n=!1)=>(e||(i.secp256k1.ProjectivePoint.BASE._setWindowSize(4),e=!0),i.secp256k1.getPublicKey(t,n))})();n.publicAdd=(e,t)=>{(0,r.assert)((0,s.isValidBytesKey)(t,32),"Invalid tweak: Tweak must be a non-zero 32-byte Uint8Array.");const n=i.secp256k1.ProjectivePoint.fromHex(e).add(i.secp256k1.ProjectivePoint.fromPrivateKey(t));return n.assertValidity(),n.toRawBytes(!1)};n.compressPublicKey=e=>i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!0);n.decompressPublicKey=e=>i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1),n.privateKeyLength=32,n.masterNodeGenerationSpec="slip10",n.compressedPublicKeyLength=33},{"../utils.cjs":69,"@metamask/utils":318,"@noble/curves/secp256k1":339}],59:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validatePathSegment=n.deriveKeyFromPath=void 0;const r=e("@metamask/utils"),i=e("./BIP44CoinTypeNode.cjs"),s=e("./BIP44Node.cjs"),o=e("./constants.cjs"),a=e("./curves/index.cjs"),c=e("./derivers/index.cjs"),u=e("./SLIP10Node.cjs");function l(e,t,n){if(0===e.length)throw new Error("Invalid HD path segment: The segment must not be empty.");let i=!1;if(e.forEach(((e,t)=>{if(0===t){if(i=e instanceof Uint8Array||o.BIP_39_PATH_REGEX.test(e),!(e instanceof Uint8Array||i||o.BIP_32_PATH_REGEX.test(e)||o.SLIP_10_PATH_REGEX.test(e)||o.CIP_3_PATH_REGEX.test(e)))throw d()}else if(e instanceof Uint8Array||!o.BIP_32_PATH_REGEX.test(e)&&!o.SLIP_10_PATH_REGEX.test(e)&&!o.CIP_3_PATH_REGEX.test(e))throw d()})),n===o.MIN_BIP_44_DEPTH&&(!i||1!==e.length))throw new Error(`Invalid HD path segment: The segment must consist of a single BIP-39 node for depths of ${o.MIN_BIP_44_DEPTH}. Received: "${String(e)}".`);if(!t&&!i)throw new Error("Invalid derivation parameters: Must specify parent key if the first node of the path segment is not a BIP-39 node.");if(t&&i)throw new Error("Invalid derivation parameters: May not specify parent key if the path segment starts with a BIP-39 node.");const s=i?e.slice(1):e;if(s.length>0){const e=s[0]?.split(":")[0];(0,r.assert)(e),(0,r.assert)(s.every((t=>t.startsWith(`${e}:`))),"Invalid HD path segment: Cannot mix 'bip32' and 'slip10' path segments.")}}function d(){return new Error("Invalid HD path segment: The path segment is malformed.")}n.deriveKeyFromPath=async function(e,t){const{path:n,depth:o=n.length}=e,h="node"in e?e.node:void 0,p="network"in e?e.network:h?.network,f="curve"in e?e.curve:h?.curve;if(h&&!(h instanceof u.SLIP10Node)&&!(h instanceof s.BIP44Node)&&!(h instanceof i.BIP44CoinTypeNode))throw new Error("Invalid arguments: Node must be a SLIP-10 node or a BIP-44 node when provided.");if(!f)throw new Error("Invalid arguments: Must specify either a parent node or curve.");return l(n,Boolean(h?.privateKey)||Boolean(h?.publicKey),o),await n.reduce((async(e,n,i)=>{const s=await e;if("string"==typeof n){const[e,i]=n.split(":");(0,r.assert)(e),(0,r.assert)(i),(0,r.assert)(function(e){return e in c.derivers}(e),`Unknown derivation type: "${e}".`);const o=c.derivers[e];return await o.deriveChildKey({path:i,node:s,curve:(0,a.getCurveByName)(f),network:p},t)}return(0,r.assert)(0===i,d()),await c.derivers.bip39.deriveChildKey({path:n,node:s,curve:(0,a.getCurveByName)(f),network:p},t)}),Promise.resolve(h))},n.validatePathSegment=l},{"./BIP44CoinTypeNode.cjs":49,"./BIP44Node.cjs":50,"./SLIP10Node.cjs":51,"./constants.cjs":52,"./curves/index.cjs":57,"./derivers/index.cjs":63,"@metamask/utils":318}],60:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=n.publicKeyToEthAddress=n.privateKeyToEthAddress=void 0;const r=e("@metamask/utils"),i=e("./shared.cjs"),s=e("../constants.cjs"),o=e("../cryptography.cjs"),a=e("../curves/index.cjs"),c=e("../utils.cjs");function u(e){return(0,r.assert)(e instanceof Uint8Array&&(0,c.isValidBytesKey)(e,a.secp256k1.publicKeyLength),"Invalid key: The key must be a 65-byte, non-zero Uint8Array."),(0,o.keccak256)(e.slice(1)).slice(-20)}async function l(e,t,n){const{childIndex:r,privateKey:s,publicKey:o,isHardened:a,chainCode:u,curve:l}=t;if((0,c.validateBIP32Index)(r+1),s){const e=await(0,i.deriveSecretExtension)({privateKey:s,publicKey:l.compressPublicKey(o),childIndex:r+1,isHardened:a,curve:l}),c=await(0,i.generateEntropy)({chainCode:u,extension:e},n);return{...t,childIndex:r+1,entropy:c}}const d=(0,i.derivePublicExtension)({parentPublicKey:o,childIndex:r+1}),h=await(0,i.generateEntropy)({chainCode:u,extension:d});return{...t,childIndex:r+1,entropy:h}}n.privateKeyToEthAddress=function(e){return(0,r.assert)(e instanceof Uint8Array&&(0,c.isValidBytesKey)(e,s.BYTES_KEY_LENGTH),"Invalid key: The key must be a 32-byte, non-zero Uint8Array."),u(a.secp256k1.getPublicKey(e,!1))},n.publicKeyToEthAddress=u,n.deriveChildKey=async function(e,t){return(0,r.assert)("secp256k1"===e.curve.name,"Invalid curve: Only secp256k1 is supported by BIP-32."),(0,i.deriveChildKey)(e,l,t)}},{"../constants.cjs":52,"../cryptography.cjs":53,"../curves/index.cjs":57,"../utils.cjs":69,"./shared.cjs":64,"@metamask/utils":318}],61:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.entropyToCip3MasterNode=n.createBip39KeyFromSeed=n.deriveChildKey=n.getDerivationPathWithSeed=n.multipathToBip39Mnemonic=n.bip39MnemonicToMultipath=n.mnemonicToSeed=void 0;const r=e("@metamask/scure-bip39"),i=e("@metamask/scure-bip39/dist/wordlists/english.js"),s=e("@metamask/utils"),o=e("../constants.cjs"),a=e("../cryptography.cjs"),c=e("../curves/index.cjs"),u=e("../guard.cjs"),l=e("../SLIP10Node.cjs"),d=e("../utils.cjs"),h=[12,15,18,21,24];function p(e){const t=e.split(" ");(0,s.assert)(h.includes(t.length),"Invalid mnemonic phrase: The mnemonic phrase must consist of 12, 15, 18, 21, or 24 words."),(0,s.assert)(t.every((e=>i.wordlist.includes(e))),"Invalid mnemonic phrase: The mnemonic phrase contains an unknown word.")}async function f(e,t="",n){const r=`mnemonic${t}`.normalize("NFKD");return await(0,a.pbkdf2Sha512)(function(e,t){if("string"==typeof e)return p(e),(0,s.stringToBytes)(e.normalize("NFKD"));const n=Array.from(new Uint16Array(e.buffer)).map((e=>t[e])).join(" ");return p(n),(0,s.stringToBytes)(n)}(e,i.wordlist),(0,s.stringToBytes)(r),2048,64,n)}function m(e){return e instanceof Uint8Array?e:((0,s.assert)(e.startsWith("bip39:"),'Invalid HD path segment: The BIP-39 path must start with "bip39:".'),e.slice(6))}async function y(e,t,n,r){(0,s.assert)(e.length>=16&&e.length<=64,"Invalid seed: The seed must be between 16 and 64 bytes long.");const i=await(0,a.hmacSha512)(t.secret,e,r),c=i.slice(0,o.BYTES_KEY_LENGTH),h=i.slice(o.BYTES_KEY_LENGTH);(0,s.assert)(t.isValidPrivateKey(c),"Invalid private key: The private key must greater than 0 and less than the curve order.");const p=t.getPublicKey(c,!1),f=(0,d.getFingerprint)(t.compressPublicKey(p),t.compressedPublicKeyLength);return l.SLIP10Node.fromExtendedKey({privateKey:c,publicKey:p,chainCode:h,masterFingerprint:f,network:n,depth:0,parentFingerprint:0,index:0,curve:t.name,guard:u.PUBLIC_KEY_GUARD},r)}async function g(e,t,n,r){(0,s.assert)(e.length>=16&&e.length<=64,"Invalid entropy: The entropy must be between 16 and 64 bytes long.");const i=await(0,a.pbkdf2Sha512)(t.secret,e,4096,96,r);i[0]&=248,i[31]&=31,i[31]|=64;const o=i.slice(0,t.privateKeyLength),c=i.slice(t.privateKeyLength);(0,s.assert)(t.isValidPrivateKey(o),"Invalid private key.");const h=t.getPublicKey(o,!1),p=(0,d.getFingerprint)(t.compressPublicKey(h),t.compressedPublicKeyLength);return l.SLIP10Node.fromExtendedKey({privateKey:o,publicKey:h,chainCode:c,masterFingerprint:p,network:n,depth:0,parentFingerprint:0,index:0,curve:t.name,guard:u.PUBLIC_KEY_GUARD},r)}n.mnemonicToSeed=f,n.bip39MnemonicToMultipath=function(e){return`bip39:${e.toLowerCase().trim()}`},n.multipathToBip39Mnemonic=m,n.getDerivationPathWithSeed=async function({path:e,curve:t},n){const[o,...a]=e,u=m(o),l=(0,c.getCurveByName)(t);switch(l.masterNodeGenerationSpec){case"slip10":return[await f(u,"",n),...a];case"cip3":return[(0,r.mnemonicToEntropy)(u,i.wordlist),...a];default:return(0,s.assertExhaustive)(l)}},n.deriveChildKey=async function({path:e,curve:t,network:n},r){switch((0,s.assert)(e instanceof Uint8Array,"Invalid path: The path must be a Uint8Array."),t.masterNodeGenerationSpec){case"slip10":return y(e,t,n,r);case"cip3":return g(e,t,n,r);default:throw new Error("Unsupported master node generation spec.")}},n.createBip39KeyFromSeed=y,n.entropyToCip3MasterNode=g},{"../SLIP10Node.cjs":51,"../constants.cjs":52,"../cryptography.cjs":53,"../curves/index.cjs":57,"../guard.cjs":67,"../utils.cjs":69,"@metamask/scure-bip39":99,"@metamask/scure-bip39/dist/wordlists/english.js":100,"@metamask/utils":318}],62:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=n.derivePublicKey=n.deriveChainCode=n.derivePrivateKey=n.getKeyExtension=n.add=n.mod2Pow256=n.trunc28Mul8=n.padEnd32Bytes=n.bigIntToBytes=n.bytesToBigInt=n.toReversed=void 0;const r=e("@metamask/utils"),i=e("./shared.cjs"),s=e("../constants.cjs"),o=e("../curves/index.cjs"),a=e("../SLIP10Node.cjs"),c=e("../utils.cjs");n.toReversed=e=>e.slice().reverse();n.bytesToBigInt=e=>{const t=(0,n.toReversed)(e),i=(0,r.bytesToHex)(t);return BigInt(i)};n.bigIntToBytes=e=>{const t=e.toString(16);return(0,n.toReversed)((0,r.hexToBytes)(t))};n.padEnd32Bytes=e=>(0,r.concatBytes)([e,new Uint8Array(Math.max(32-e.length,0)).fill(0)]);n.trunc28Mul8=e=>{const t=(0,n.bytesToBigInt)(e.slice(0,28))*BigInt(8);return(0,n.padEnd32Bytes)((0,n.bigIntToBytes)(t))};n.mod2Pow256=e=>(0,n.padEnd32Bytes)((0,n.bigIntToBytes)((0,o.mod)((0,n.bytesToBigInt)(e),BigInt(2)**BigInt(256))));n.add=(e,t)=>{const r=(0,n.bytesToBigInt)(e)+(0,n.bytesToBigInt)(t);return(0,n.padEnd32Bytes)((0,n.bigIntToBytes)(r)).slice(0,32)};n.getKeyExtension=(e,t,n)=>(0,r.concatBytes)([new Uint8Array([e]),t,(0,c.numberToUint32)(n,!0)]);const u=2,l=0;n.derivePrivateKey=async({parentNode:e,childIndex:t,isHardened:o},a)=>{const c=o?(0,n.getKeyExtension)(l,e.privateKeyBytes,t+s.BIP_32_HARDENED_OFFSET):(0,n.getKeyExtension)(u,e.publicKeyBytes,t),d=await(0,i.generateEntropy)({chainCode:e.chainCodeBytes,extension:c},a),h=d.subarray(0,32),p=d.subarray(32),f=e.privateKeyBytes.subarray(0,32),m=e.privateKeyBytes.subarray(32),y=(0,n.add)((0,n.trunc28Mul8)(h),f),g=(0,n.add)(p,m);return(0,r.concatBytes)([y,g])};const d=3,h=1;n.deriveChainCode=async({parentNode:e,childIndex:t,isHardened:r},o)=>{const a=r?(0,n.getKeyExtension)(h,e.privateKeyBytes,t+s.BIP_32_HARDENED_OFFSET):(0,n.getKeyExtension)(d,e.publicKeyBytes,t);return(await(0,i.generateEntropy)({chainCode:e.chainCodeBytes,extension:a},o)).subarray(32)};const p=2;n.derivePublicKey=async({parentNode:e,childIndex:t,curve:r},s)=>{const o=(0,n.getKeyExtension)(p,e.publicKeyBytes,t),a=(await(0,i.generateEntropy)({chainCode:e.chainCodeBytes,extension:o},s)).slice(0,32),c=r.getPublicKey((0,n.trunc28Mul8)(a));return r.publicAdd(e.publicKeyBytes,c)},n.deriveChildKey=async function(e,t){const{curve:o,node:c,path:u}=e;(0,i.validateNode)(c);const{childIndex:l,isHardened:d}=(0,i.getValidatedPath)(u,c,o);if("ed25519Bip32"!==o.name||!c)throw new Error("Unsupported curve: Only ed25519Bip32 is supported by CIP3.");const h=l+(d?s.BIP_32_HARDENED_OFFSET:0),{privateKeyBytes:p,chainCodeBytes:f,publicKeyBytes:m,masterFingerprint:y,depth:g,fingerprint:b}=c;if(p){const e={privateKeyBytes:p,chainCodeBytes:f,publicKeyBytes:m},i=await(0,n.derivePrivateKey)({parentNode:e,childIndex:l,isHardened:d},t),s=await(0,n.deriveChainCode)({parentNode:e,childIndex:l,isHardened:d},t);return a.SLIP10Node.fromExtendedKey({privateKey:(0,r.bytesToHex)(i),chainCode:(0,r.bytesToHex)(s),masterFingerprint:y,depth:g+1,parentFingerprint:b,index:h,curve:o.name},t)}(0,r.assert)(!d,"Invalid parameters: Cannot derive hardened child keys without a private key.");const v={chainCodeBytes:f,publicKeyBytes:m},w=await(0,n.derivePublicKey)({parentNode:v,childIndex:l,isHardened:!1,curve:o},t),x=await(0,n.deriveChainCode)({parentNode:v,childIndex:l,isHardened:!1},t);return a.SLIP10Node.fromExtendedKey({publicKey:(0,r.bytesToHex)(w),chainCode:(0,r.bytesToHex)(x),masterFingerprint:y,depth:g+1,parentFingerprint:b,index:h,curve:o.name},t)}},{"../SLIP10Node.cjs":51,"../constants.cjs":52,"../curves/index.cjs":57,"../utils.cjs":69,"./shared.cjs":64,"@metamask/utils":318}],63:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.mnemonicToSeed=n.createBip39KeyFromSeed=n.derivers=void 0;const o=s(e("./bip32.cjs")),a=s(e("./bip39.cjs")),c=s(e("./cip3.cjs")),u=s(e("./slip10.cjs"));n.derivers={bip32:o,bip39:a,slip10:u,cip3:c};var l=e("./bip39.cjs");Object.defineProperty(n,"createBip39KeyFromSeed",{enumerable:!0,get:function(){return l.createBip39KeyFromSeed}}),Object.defineProperty(n,"mnemonicToSeed",{enumerable:!0,get:function(){return l.mnemonicToSeed}})},{"./bip32.cjs":60,"./bip39.cjs":61,"./cip3.cjs":62,"./slip10.cjs":65}],64:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedPath=n.validateNode=n.generateEntropy=n.privateAdd=n.derivePublicChildKey=n.derivePublicExtension=n.deriveSecretExtension=n.deriveChildKey=void 0;const r=e("@metamask/utils"),i=e("../constants.cjs"),s=e("../cryptography.cjs"),o=e("../curves/index.cjs"),a=e("../guard.cjs"),c=e("../SLIP10Node.cjs"),u=e("../utils.cjs");async function l(e,t,n){const{privateKey:r,publicKey:s,entropy:o,childIndex:u,isHardened:d,depth:h,parentFingerprint:m,masterFingerprint:y,curve:g,network:b}=e;try{return r?await async function({entropy:e,privateKey:t,depth:n,masterFingerprint:r,parentFingerprint:s,childIndex:o,isHardened:u,curve:l,network:d},h){const p=o+(u?i.BIP_32_HARDENED_OFFSET:0),{privateKey:m,chainCode:y}=function({privateKey:e,entropy:t,curve:n}){const r=t.slice(0,32),i=t.slice(32);if("ed25519"===n.name)return{privateKey:r,chainCode:i};const s=f(e,r,n);return{privateKey:s,chainCode:i}}({privateKey:t,entropy:e,curve:l});return await c.SLIP10Node.fromExtendedKey({privateKey:m,chainCode:y,depth:n+1,masterFingerprint:r,parentFingerprint:s,index:p,curve:l.name,network:d,guard:a.PUBLIC_KEY_GUARD},h)}({entropy:o,privateKey:r,depth:h,masterFingerprint:y,parentFingerprint:m,childIndex:u,isHardened:d,curve:g,network:b},n):await p({entropy:o,publicKey:s,depth:h,masterFingerprint:y,parentFingerprint:m,childIndex:u,curve:g,network:b},n)}catch(r){return await l(await t(r,e,n),t,n)}}async function d({privateKey:e,publicKey:t,childIndex:n,isHardened:s,curve:o}){return s?(0,r.concatBytes)([new Uint8Array([0]),e,(0,u.numberToUint32)(n+i.BIP_32_HARDENED_OFFSET)]):((0,u.validateBytes)(t,o.compressedPublicKeyLength),h({parentPublicKey:t,childIndex:n}))}function h({parentPublicKey:e,childIndex:t}){return(0,r.concatBytes)([e,(0,u.numberToUint32)(t)])}async function p({entropy:e,publicKey:t,depth:n,masterFingerprint:r,parentFingerprint:i,childIndex:s,curve:o,network:a},u){const{publicKey:l,chainCode:d}=function({publicKey:e,entropy:t,curve:n}){const r=t.slice(0,32),i=t.slice(32);return{publicKey:n.publicAdd(e,r),chainCode:i}}({publicKey:t,entropy:e,curve:o});return await c.SLIP10Node.fromExtendedKey({publicKey:l,chainCode:d,depth:n+1,masterFingerprint:r,parentFingerprint:i,index:s,curve:o.name,network:a},u)}function f(e,t,n){(0,r.assert)((0,u.isValidBytesKey)(t,32),"Invalid tweak: Tweak must be a non-zero 32-byte Uint8Array.");const i=(0,r.bytesToBigInt)(e),s=(0,r.bytesToBigInt)(t);if(s>=n.curve.n)throw new Error("Invalid tweak: Tweak is larger than the curve order.");const a=(0,o.mod)(i+s,n.curve.n),c=(0,r.hexToBytes)(a.toString(16).padStart(64,"0"));if(!n.isValidPrivateKey(c))throw new Error("Invalid private key or tweak: The resulting private key is invalid.");return c}async function m({chainCode:e,extension:t},n){return await(0,s.hmacSha512)(e,t,n)}function y(e){(0,r.assert)(e,"Invalid parameters: Must specify a node to derive from.")}function g(e,t,n){!function(e,t,n){(0,r.assert)("string"==typeof e,"Invalid path: Must be a string.");const i=e.endsWith("'");(0,r.assert)(!i||t.privateKey,"Invalid parameters: Cannot derive hardened child keys without a private key."),(0,r.assert)(i||n.deriveUnhardenedKeys,`Invalid path: Cannot derive unhardened child keys with ${n.name}.`)}(e,t,n);const s=e.split("'")[0];(0,r.assert)(s);const o=parseInt(s,10);if(!i.UNPREFIXED_PATH_REGEX.test(s)||!Number.isInteger(o)||o<0||o>=i.BIP_32_HARDENED_OFFSET)throw new Error(`Invalid path: The index must be a non-negative decimal integer less than ${i.BIP_32_HARDENED_OFFSET}.`);return{childIndex:o,isHardened:e.includes("'")}}n.deriveChildKey=async function({path:e,node:t,curve:n,network:r},i,s){y(t);const{childIndex:o,isHardened:a}=g(e,t,n),c={chainCode:t.chainCodeBytes,childIndex:o,isHardened:a,depth:t.depth,parentFingerprint:t.fingerprint,masterFingerprint:t.masterFingerprint,curve:n,network:r};if(t.privateKeyBytes){const e=await d({privateKey:t.privateKeyBytes,get publicKey(){return t.compressedPublicKeyBytes},childIndex:o,isHardened:a,curve:n}),r=await m({chainCode:t.chainCodeBytes,extension:e},s);return await l({privateKey:t.privateKeyBytes,get publicKey(){return t.publicKeyBytes},entropy:r,...c},i,s)}const u=h({parentPublicKey:t.compressedPublicKeyBytes,childIndex:o}),p=await m({chainCode:t.chainCodeBytes,extension:u},s);return await l({publicKey:t.compressedPublicKeyBytes,entropy:p,...c},i,s)},n.deriveSecretExtension=d,n.derivePublicExtension=h,n.derivePublicChildKey=p,n.privateAdd=f,n.generateEntropy=m,n.validateNode=y,n.getValidatedPath=g},{"../SLIP10Node.cjs":51,"../constants.cjs":52,"../cryptography.cjs":53,"../curves/index.cjs":57,"../guard.cjs":67,"../utils.cjs":69,"@metamask/utils":318}],65:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=void 0;const r=e("@metamask/utils"),i=e("./shared.cjs"),s=e("../constants.cjs"),o=e("../utils.cjs");async function a(e,t,n){const{curve:a,isHardened:c,childIndex:u,entropy:l,chainCode:d}=t;if("ed25519"===a.name)throw e;const h=c?u+s.BIP_32_HARDENED_OFFSET:u,p=await(0,i.generateEntropy)({chainCode:d,extension:(0,r.concatBytes)([1,l.slice(32,64),(0,o.numberToUint32)(h)])},n);return{...t,entropy:p}}n.deriveChildKey=async function(e,t){return await(0,i.deriveChildKey)(e,a,t)}},{"../constants.cjs":52,"../utils.cjs":69,"./shared.cjs":64,"@metamask/utils":318}],66:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.encodeExtendedKey=n.decodeExtendedKey=void 0;const r=e("@metamask/utils"),i=e("./BIP44Node.cjs"),s=e("./curves/secp256k1.cjs"),o=e("./utils.cjs"),a=76067358,c=76066276,u=70617039,l=70615956;n.decodeExtendedKey=e=>{const t=(0,o.decodeBase58check)(e);if(78!==t.length)throw new Error(`Invalid extended key: Expected a length of 78, got ${t.length}.`);const n=(0,r.createDataView)(t),d=n.getUint32(0,!1),{network:h,type:p}=function(e){switch(e){case a:return{type:"public",network:"mainnet"};case u:return{type:"public",network:"testnet"};case c:return{type:"private",network:"mainnet"};case l:return{type:"private",network:"testnet"};default:throw new Error("Invalid extended key: Expected a public (xpub) or private key (xprv) version.")}}(d),f=n.getUint8(4);(0,i.validateBIP44Depth)(f);const m=n.getUint32(5,!1),y=n.getUint32(9,!1),g=t.slice(13,45);if(!(0,o.isValidBytesKey)(g,32))throw new Error("Invalid extended key: Chain code must be a 32-byte non-zero byte array.");const b=t.slice(45,78);if(!(0,o.isValidBytesKey)(b,33))throw new Error("Invalid extended key: Key must be a 33-byte non-zero byte array.");const v=(0,r.createDataView)(b);if("public"===p){if(2!==v.getUint8(0)&&3!==v.getUint8(0))throw new Error("Invalid extended key: Public key must start with 0x02 or 0x03.");return{type:p,depth:f,parentFingerprint:m,index:y,network:h,chainCode:g,publicKey:(0,s.decompressPublicKey)(b)}}if(0!==v.getUint8(0))throw new Error("Invalid extended key: Private key must start with 0x00.");return{type:p,depth:f,parentFingerprint:m,index:y,network:h,chainCode:g,privateKey:b.slice(1)}};n.encodeExtendedKey=e=>{const{type:t,depth:n,parentFingerprint:i,index:d,network:h,chainCode:p}=e,f=new Uint8Array(78),m=(0,r.createDataView)(f),y=function(e,t){switch(e){case"mainnet":return"public"===t?a:c;case"testnet":return"public"===t?u:l;default:return(0,r.assertExhaustive)(e)}}(h,t);if(m.setUint32(0,y,!1),m.setUint8(4,n),m.setUint32(5,i,!1),m.setUint32(9,d,!1),f.set(p,13),"public"===t){const{publicKey:t}=e,n=(0,s.compressPublicKey)(t);f.set(n,45)}if("private"===t){const{privateKey:t}=e;f.set(t,46)}return(0,o.encodeBase58check)(f)}},{"./BIP44Node.cjs":50,"./curves/secp256k1.cjs":58,"./utils.cjs":69,"@metamask/utils":318}],67:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PUBLIC_KEY_GUARD=void 0,n.PUBLIC_KEY_GUARD=Symbol("Public key guard. Do not export this from the module.")},{}],68:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.mnemonicToSeed=n.createBip39KeyFromSeed=n.mnemonicPhraseToBytes=n.isValidBIP32PathSegment=n.getBIP44CoinTypeToAddressPathTuple=n.getBIP44AddressKeyDeriver=n.deriveBIP44AddressKey=n.BIP_44_COIN_TYPE_DEPTH=n.BIP44CoinTypeNode=n.ed25519Bip32=n.ed25519=n.secp256k1=n.SLIP10Node=n.BIP44Node=void 0;var s=e("./BIP44Node.cjs");Object.defineProperty(n,"BIP44Node",{enumerable:!0,get:function(){return s.BIP44Node}});var o=e("./SLIP10Node.cjs");Object.defineProperty(n,"SLIP10Node",{enumerable:!0,get:function(){return o.SLIP10Node}});var a=e("./curves/index.cjs");Object.defineProperty(n,"secp256k1",{enumerable:!0,get:function(){return a.secp256k1}}),Object.defineProperty(n,"ed25519",{enumerable:!0,get:function(){return a.ed25519}}),Object.defineProperty(n,"ed25519Bip32",{enumerable:!0,get:function(){return a.ed25519Bip32}});var c=e("./BIP44CoinTypeNode.cjs");Object.defineProperty(n,"BIP44CoinTypeNode",{enumerable:!0,get:function(){return c.BIP44CoinTypeNode}}),Object.defineProperty(n,"BIP_44_COIN_TYPE_DEPTH",{enumerable:!0,get:function(){return c.BIP_44_COIN_TYPE_DEPTH}}),Object.defineProperty(n,"deriveBIP44AddressKey",{enumerable:!0,get:function(){return c.deriveBIP44AddressKey}}),Object.defineProperty(n,"getBIP44AddressKeyDeriver",{enumerable:!0,get:function(){return c.getBIP44AddressKeyDeriver}}),i(e("./constants.cjs"),n);var u=e("./utils.cjs");Object.defineProperty(n,"getBIP44CoinTypeToAddressPathTuple",{enumerable:!0,get:function(){return u.getBIP44CoinTypeToAddressPathTuple}}),Object.defineProperty(n,"isValidBIP32PathSegment",{enumerable:!0,get:function(){return u.isValidBIP32PathSegment}}),Object.defineProperty(n,"mnemonicPhraseToBytes",{enumerable:!0,get:function(){return u.mnemonicPhraseToBytes}});var l=e("./derivers/index.cjs");Object.defineProperty(n,"createBip39KeyFromSeed",{enumerable:!0,get:function(){return l.createBip39KeyFromSeed}}),Object.defineProperty(n,"mnemonicToSeed",{enumerable:!0,get:function(){return l.mnemonicToSeed}})},{"./BIP44CoinTypeNode.cjs":49,"./BIP44Node.cjs":50,"./SLIP10Node.cjs":51,"./constants.cjs":52,"./curves/index.cjs":57,"./derivers/index.cjs":63,"./utils.cjs":69}],69:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBIP44CoinType=n.validateNetwork=n.isWebCryptoSupported=n.numberToUint32=n.validateCurve=n.mnemonicPhraseToBytes=n.getFingerprint=n.encodeBase58check=n.decodeBase58check=n.validateBytes=n.getBytesUnsafe=n.getBytes=n.isValidInteger=n.isValidBytesKey=n.nullableHexStringToBytes=n.hexStringToBytes=n.isHardened=n.isValidBIP32PathSegment=n.isValidBIP32Index=n.validateBIP32Index=n.getBIP32NodeToken=n.getUnhardenedBIP32NodeToken=n.getHardenedBIP32NodeToken=n.getBIP44CoinTypeToAddressPathTuple=n.getBIP44ChangePathString=n.getBIP44CoinTypePathString=void 0;const r=e("@metamask/scure-bip39/dist/wordlists/english.js"),i=e("@metamask/utils"),s=e("@scure/base"),o=e("./BIP44CoinTypeNode.cjs"),a=e("./constants.cjs"),c=e("./cryptography.cjs"),u=e("./curves/index.cjs");function l(e){return p(e),`${d(e)}'`}function d(e){return p(e),`bip32:${e}`}function h(e){if("number"==typeof e)return d(e);if(!e||!Number.isInteger(e.index)||"boolean"!=typeof e.hardened)throw new Error("Invalid BIP-32 index: Must be an object containing the index and whether it is hardened.");return e.hardened?l(e.index):d(e.index)}function p(e){if(!f(e))throw new Error("Invalid BIP-32 index: Must be a non-negative integer.")}function f(e){return g(e)&&e<=a.MAX_BIP_32_INDEX}function m(e){return e instanceof Uint8Array?e:(0,i.hexToBytes)(e)}function y(e,t){if(e.length!==t)return!1;for(const t of e)if(0!==t)return!0;return!1}function g(e){return"number"==typeof e&&Number.isInteger(e)&&e>=0}function b(e,t){if(!y(e,t))throw new Error(`Invalid value: Must be a non-zero ${t}-byte byte array.`)}n.getBIP44CoinTypePathString=function(e){return`m / ${a.BIP44PurposeNodeToken} / ${l(e)}`},n.getBIP44ChangePathString=function(e,t){return`${e} / ${l(t.account??0)} / ${h(t.change??0)}`},n.getBIP44CoinTypeToAddressPathTuple=function({account:e=0,change:t=0,address_index:n}){return[l(e),h(t),h(n)]},n.getHardenedBIP32NodeToken=l,n.getUnhardenedBIP32NodeToken=d,n.getBIP32NodeToken=h,n.validateBIP32Index=p,n.isValidBIP32Index=f,n.isValidBIP32PathSegment=function(e){if("string"!=typeof e)return!1;const t=e.match(a.UNPREFIXED_BIP_32_PATH_REGEX);if(void 0===t?.groups?.index)return!1;const n=parseInt(t.groups.index,10);return g(n)&&n<=a.MAX_UNHARDENED_BIP_32_INDEX},n.isHardened=function(e){return e.endsWith("'")},n.hexStringToBytes=m,n.nullableHexStringToBytes=function(e){if(void 0!==e)return m(e)},n.isValidBytesKey=y,n.isValidInteger=g,n.getBytes=function(e,t){if(e instanceof Uint8Array)return b(e,t),e;if("string"==typeof e){const n=(0,i.hexToBytes)(e);return b(n,t),n}throw new Error("Invalid value: Expected an instance of Uint8Array or hexadecimal string.")},n.getBytesUnsafe=function e(t,n){if(t instanceof Uint8Array)return(0,i.assert)(t.length===n,`Invalid value: Must be a ${n}-byte byte array.`),t;if("string"==typeof t)return e((0,i.hexToBytes)(t),n);throw new Error("Invalid value: Expected an instance of Uint8Array or hexadecimal string.")},n.validateBytes=b;n.decodeBase58check=e=>{const t=(0,s.base58check)(c.sha256);try{return t.decode(e)}catch{throw new Error("Invalid extended key: Value is not base58-encoded, or the checksum is invalid.")}};n.encodeBase58check=e=>(0,s.base58check)(c.sha256).encode(e);n.getFingerprint=(e,t)=>{if(!y(e,t))throw new Error(`Invalid public key: The key must be a ${t}-byte, non-zero byte array.`);const n=(0,c.ripemd160)((0,c.sha256)(e));return(0,i.createDataView)(n).getUint32(0,!1)},n.mnemonicPhraseToBytes=function(e){const t=e.split(" ").map((e=>{const t=r.wordlist.indexOf(e);return(0,i.assert)(-1!==t,`Invalid mnemonic phrase: Unknown word "${e}".`),t}));return new Uint8Array(new Uint16Array(t).buffer)},n.validateCurve=function(e){if(!e||"string"!=typeof e)throw new Error("Invalid curve: Must specify a curve.");if(!Object.keys(u.curves).includes(e))throw new Error(`Invalid curve: Only the following curves are supported: ${Object.keys(u.curves).join(", ")}.`)},n.numberToUint32=function(e,t=!1){const n=new Uint8Array(4);return(0,i.createDataView)(n).setUint32(0,e,t),n},n.isWebCryptoSupported=function(){return Boolean(globalThis.crypto?.subtle)},n.validateNetwork=function(e){if(void 0!==e){if("string"!=typeof e)throw new Error("Invalid network: Must be a string if specified.");if(!["mainnet","testnet"].includes(e))throw new Error('Invalid network: Must be either "mainnet" or "testnet" if specified.')}},n.getBIP44CoinType=function(e){const t=e[o.BIP_44_COIN_TYPE_DEPTH].split(":")[1]?.replace("'","");(0,i.assert)(t,"Invalid derivation path: Coin type is not specified.");const n=Number.parseInt(t,10);return(0,i.assert)(g(n),"Invalid derivation path: Coin type is not a valid integer."),n}},{"./BIP44CoinTypeNode.cjs":49,"./constants.cjs":52,"./cryptography.cjs":53,"./curves/index.cjs":57,"@metamask/scure-bip39/dist/wordlists/english.js":100,"@metamask/utils":318,"@scure/base":351}],70:[function(e,t,n){var r=e("bn.js"),i=e("strip-hex-prefix");t.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new r(1),n=String(e).toLowerCase().trim(),s="0x"===n.substr(0,2)||"-0x"===n.substr(0,3),o=i(n);if("-"===o.substr(0,1)&&(o=i(o.slice(1)),t=new r(-1,10)),!(o=""===o?"0":o).match(/^-?[0-9]+$/)&&o.match(/^[0-9A-Fa-f]+$/)||o.match(/^[a-fA-F]+$/)||!0===s&&o.match(/^[0-9A-Fa-f]+$/))return new r(o,16).mul(t);if((o.match(/^-?[0-9]+$/)||""===o)&&!1===s)return new r(o,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new r(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},{"bn.js":382,"strip-hex-prefix":574}],71:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.ObjectMultiplex=void 0;const i=e("readable-stream"),s=r(e("once")),o=e("./Substream"),a=Symbol("IGNORE_SUBSTREAM");class c extends i.Duplex{constructor(e={}){super(Object.assign({objectMode:!0},e)),this._substreams={}}createStream(e,t={}){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 n=new o.Substream(Object.assign({name:e,parent:this},t));return this._substreams[e]=n,function(e,t){const n=(0,s.default)(t);(0,i.finished)(e,{readable:!1},n),(0,i.finished)(e,{writable:!1},n)}(this,(e=>n.destroy(e||void 0))),n}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=a}_read(){}_write(e,t,n){const{name:r,data:i}=e;if(!r)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),n();const s=this._substreams[r];return s?(s!==a&&s.push(i),n()):(console.warn(`ObjectMultiplex - orphaned data for stream "${r}"`),n())}}n.ObjectMultiplex=c},{"./Substream":72,once:506,"readable-stream":525}],72:[function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.Substream=void 0;const i=e("readable-stream");class s extends i.Duplex{constructor(e){var{parent:t,name:n}=e,i=r(e,["parent","name"]);super(Object.assign({objectMode:!0},i)),this._parent=t,this._name=n}_read(){}_write(e,t,n){this._parent.push({name:this._name,data:e}),n()}}n.Substream=s},{"readable-stream":525}],73:[function(e,t,n){"use strict";const r=e("./ObjectMultiplex");t.exports=r.ObjectMultiplex},{"./ObjectMultiplex":71}],74:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decorateWithCaveats=n.isRestrictedMethodCaveatSpecification=void 0;const r=e("@metamask/utils"),i=e("./errors.cjs"),s=e("./Permission.cjs");function o(e){return(0,r.hasProperty)(e,"decorator")}n.isRestrictedMethodCaveatSpecification=o,n.decorateWithCaveats=function(e,t,n){const{caveats:r}=t;if(!r)return e;let a=async t=>e(t);for(const e of r){const t=n[e.type];if(!t)throw new i.UnrecognizedCaveatTypeError(e.type);if(!o(t))throw new i.CaveatSpecificationMismatchError(t,s.PermissionType.RestrictedMethod);a=t.decorator(a,e)}return a}},{"./Permission.cjs":75,"./errors.cjs":78,"@metamask/utils":318}],75:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hasSpecificationType=n.PermissionType=n.findCaveat=n.constructPermission=void 0;const r=e("nanoid");var i;n.constructPermission=function(e){const{caveats:t=null,invoker:n,target:i}=e;return{id:(0,r.nanoid)(),parentCapability:i,invoker:n,caveats:t,date:(new Date).getTime()}},n.findCaveat=function(e,t){return e.caveats?.find((e=>e.type===t))},function(e){e.RestrictedMethod="RestrictedMethod",e.Endowment="Endowment"}(i||(n.PermissionType=i={})),n.hasSpecificationType=function(e,t){return e.permissionType===t}},{nanoid:504}],76:[function(e,t,n){"use strict";var r,i,s,o,a,c,u,l=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.PermissionController=n.CaveatMutatorOperation=void 0;const h=e("@metamask/base-controller"),p=e("@metamask/controller-utils"),f=e("@metamask/rpc-errors"),m=e("@metamask/utils"),y=d(e("deep-freeze-strict")),g=e("immer"),b=e("nanoid"),v=e("./Caveat.cjs"),w=e("./errors.cjs"),x=e("./Permission.cjs"),E=e("./permission-middleware.cjs"),S=e("./utils.cjs"),A="PermissionController";var _;!function(e){e[e.Noop=0]="Noop",e[e.UpdateValue=1]="UpdateValue",e[e.DeleteCaveat=2]="DeleteCaveat",e[e.RevokePermission=3]="RevokePermission"}(_||(n.CaveatMutatorOperation=_={}));class T extends h.BaseController{get unrestrictedMethods(){return this._unrestrictedMethods}constructor(e){const{caveatSpecifications:t,permissionSpecifications:n,unrestrictedMethods:i,messenger:s,state:o={}}=e;super({name:A,metadata:{subjects:{anonymous:!0,persist:!0}},messenger:s,state:{subjects:{},...o}}),r.add(this),this._unrestrictedMethods=new Set(i),this._caveatSpecifications=(0,y.default)({...t}),this.validatePermissionSpecifications(n,this._caveatSpecifications),this._permissionSpecifications=(0,y.default)({...n}),this.registerMessageHandlers(),this.createPermissionMiddleware=(0,E.getPermissionMiddlewareFactory)({executeRestrictedMethod:this._executeRestrictedMethod.bind(this),getRestrictedMethod:this.getRestrictedMethod.bind(this),isUnrestrictedMethod:this.unrestrictedMethods.has.bind(this.unrestrictedMethods)})}getPermissionSpecification(e){return this._permissionSpecifications[e]}getCaveatSpecification(e){return this._caveatSpecifications[e]}validatePermissionSpecifications(e,t){Object.entries(e).forEach((([e,{permissionType:n,targetName:r,allowedCaveats:i}])=>{if(!n||!(0,m.hasProperty)(x.PermissionType,n))throw new Error(`Invalid permission type: "${n}"`);if(!e)throw new Error(`Invalid permission target name: "${e}"`);if(e!==r)throw new Error(`Invalid permission specification: target name "${e}" must match specification.targetName value "${r}".`);i&&i.forEach((e=>{if(!(0,m.hasProperty)(t,e))throw new w.UnrecognizedCaveatTypeError(e);const r=t[e],i=(0,v.isRestrictedMethodCaveatSpecification)(r);if(n===x.PermissionType.RestrictedMethod&&!i||n===x.PermissionType.Endowment&&i)throw new w.CaveatSpecificationMismatchError(r,n)}))}))}registerMessageHandlers(){this.messagingSystem.registerActionHandler(`${A}:clearPermissions`,(()=>this.clearState())),this.messagingSystem.registerActionHandler(`${A}:getEndowments`,((e,t,n)=>this.getEndowments(e,t,n))),this.messagingSystem.registerActionHandler(`${A}:getSubjectNames`,(()=>this.getSubjectNames())),this.messagingSystem.registerActionHandler(`${A}:getPermissions`,(e=>this.getPermissions(e))),this.messagingSystem.registerActionHandler(`${A}:hasPermission`,((e,t)=>this.hasPermission(e,t))),this.messagingSystem.registerActionHandler(`${A}:hasPermissions`,(e=>this.hasPermissions(e))),this.messagingSystem.registerActionHandler(`${A}:grantPermissions`,this.grantPermissions.bind(this)),this.messagingSystem.registerActionHandler(`${A}:grantPermissionsIncremental`,this.grantPermissionsIncremental.bind(this)),this.messagingSystem.registerActionHandler(`${A}:requestPermissions`,((e,t)=>this.requestPermissions(e,t))),this.messagingSystem.registerActionHandler(`${A}:requestPermissionsIncremental`,((e,t)=>this.requestPermissionsIncremental(e,t))),this.messagingSystem.registerActionHandler(`${A}:revokeAllPermissions`,(e=>this.revokeAllPermissions(e))),this.messagingSystem.registerActionHandler(`${A}:revokePermissionForAllSubjects`,(e=>this.revokePermissionForAllSubjects(e))),this.messagingSystem.registerActionHandler(`${A}:revokePermissions`,this.revokePermissions.bind(this)),this.messagingSystem.registerActionHandler(`${A}:updateCaveat`,((e,t,n,r)=>{this.updateCaveat(e,t,n,r)}))}clearState(){this.update((e=>({subjects:{}})))}getTypedPermissionSpecification(e,t,n){const r=e===x.PermissionType.RestrictedMethod?(0,w.methodNotFound)(t,n?{origin:n}:void 0):new w.EndowmentPermissionDoesNotExistError(t,n);if(!this.targetExists(t))throw r;const i=this.getPermissionSpecification(t);if(!(0,x.hasSpecificationType)(i,e))throw r;return i}getRestrictedMethod(e,t){return this.getTypedPermissionSpecification(x.PermissionType.RestrictedMethod,e,t).methodImplementation}getSubjectNames(){return Object.keys(this.state.subjects)}getPermission(e,t){return this.state.subjects[e]?.permissions[t]}getPermissions(e){return this.state.subjects[e]?.permissions}hasPermission(e,t){return Boolean(this.getPermission(e,t))}hasPermissions(e){return Boolean(this.state.subjects[e])}revokeAllPermissions(e){this.update((t=>{if(!t.subjects[e])throw new w.UnrecognizedSubjectError(e);delete t.subjects[e]}))}revokePermission(e,t){this.revokePermissions({[e]:[t]})}revokePermissions(e){this.update((t=>{Object.keys(e).forEach((n=>{if(!(0,m.hasProperty)(t.subjects,n))throw new w.UnrecognizedSubjectError(n);e[n].forEach((e=>{const{permissions:r}=t.subjects[n];if(!(0,m.hasProperty)(r,e))throw new w.PermissionDoesNotExistError(n,e);this.deletePermission(t.subjects,n,e)}))}))}))}revokePermissionForAllSubjects(e){0!==this.getSubjectNames().length&&this.update((t=>{Object.entries(t.subjects).forEach((([n,r])=>{const{permissions:i}=r;(0,m.hasProperty)(i,e)&&this.deletePermission(t.subjects,n,e)}))}))}deletePermission(e,t,n){const{permissions:r}=e[t];Object.keys(r).length>1?delete r[n]:delete e[t]}hasCaveat(e,t,n){return Boolean(this.getCaveat(e,t,n))}getCaveat(e,t,n){const r=this.getPermission(e,t);if(!r)throw new w.PermissionDoesNotExistError(e,t);return(0,x.findCaveat)(r,n)}addCaveat(e,t,n,r){if(this.hasCaveat(e,t,n))throw new w.CaveatAlreadyExistsError(e,t,n);this.setCaveat(e,t,n,r)}updateCaveat(e,t,n,r){if(!this.hasCaveat(e,t,n))throw new w.CaveatDoesNotExistError(e,t,n);this.setCaveat(e,t,n,r)}setCaveat(e,t,n,r){this.update((i=>{const s=i.subjects[e];if(!s)throw new w.UnrecognizedSubjectError(e);const o=s.permissions[t];if(!o)throw new w.PermissionDoesNotExistError(e,t);const a={type:n,value:r};this.validateCaveat(a,e,t);let c=!1;if(o.caveats){const e=o.caveats.findIndex((e=>e.type===a.type));-1===e?(o.caveats.push(a),c=!0):o.caveats.splice(e,1,a)}else o.caveats=[a],c=!0;c&&this.validateModifiedPermission(o,e,{invokePermissionValidator:!0,performCaveatValidation:!1})}))}updatePermissionsByCaveat(e,t){0!==Object.keys(this.state.subjects).length&&this.update((n=>{Object.values(n.subjects).forEach((r=>{Object.values(r.permissions).forEach((i=>{const{caveats:s}=i,o=s?.find((({type:t})=>t===e));if(!o)return;const a=t(o.value),{operation:c}=a;switch(c){case _.Noop:break;case _.UpdateValue:o.value=a.value,this.validateCaveat(o,r.origin,i.parentCapability);break;case _.DeleteCaveat:this.deleteCaveat(i,e,r.origin);break;case _.RevokePermission:this.deletePermission(n.subjects,r.origin,i.parentCapability);break;default:throw new Error(`Unrecognized mutation result: "${c}"`)}}))}))}))}removeCaveat(e,t,n){this.update((r=>{const i=r.subjects[e]?.permissions[t];if(!i)throw new w.PermissionDoesNotExistError(e,t);if(!i.caveats)throw new w.CaveatDoesNotExistError(e,t,n);this.deleteCaveat(i,n,e)}))}deleteCaveat(e,t,n){if(!e.caveats)throw new w.CaveatDoesNotExistError(n,e.parentCapability,t);const r=e.caveats.findIndex((e=>e.type===t));if(-1===r)throw new w.CaveatDoesNotExistError(n,e.parentCapability,t);1===e.caveats.length?e.caveats=null:e.caveats.splice(r,1),this.validateModifiedPermission(e,n,{invokePermissionValidator:!0,performCaveatValidation:!1})}validateModifiedPermission(e,t,n){if(!this.targetExists(e.parentCapability))throw new Error(`Fatal: Existing permission target "${e.parentCapability}" has no specification.`);this.validatePermission(this.getPermissionSpecification(e.parentCapability),e,t,n)}targetExists(e){return(0,m.hasProperty)(this._permissionSpecifications,e)}grantPermissions({approvedPermissions:e,requestData:t,preserveExistingPermissions:n=!0,subject:i}){return l(this,r,"m",s).call(this,{approvedPermissions:e,subject:i,mergePermissions:!1,preserveExistingPermissions:n,requestData:t})}grantPermissionsIncremental({approvedPermissions:e,requestData:t,subject:n}){return l(this,r,"m",s).call(this,{approvedPermissions:e,subject:n,mergePermissions:!0,preserveExistingPermissions:!0,requestData:t})}validatePermission(e,t,n,{invokePermissionValidator:r,performCaveatValidation:i}){const{allowedCaveats:s,validator:o,targetName:a}=e;if(e.subjectTypes?.length&&e.subjectTypes.length>0){const t=this.messagingSystem.call("SubjectMetadataController:getSubjectMetadata",n);if(!t||null===t.subjectType||!e.subjectTypes.includes(t.subjectType))throw e.permissionType===x.PermissionType.RestrictedMethod?(0,w.methodNotFound)(a,{origin:n}):new w.EndowmentPermissionDoesNotExistError(a,n)}if((0,m.hasProperty)(t,"caveats")){const{caveats:e}=t;if(null!==e&&!(Array.isArray(e)&&e.length>0))throw new w.InvalidCaveatsPropertyError(n,a,e);const r=new Set;e?.forEach((e=>{if(i&&this.validateCaveat(e,n,a),!s?.includes(e.type))throw new w.ForbiddenCaveatError(e.type,n,a);if(r.has(e.type))throw new w.DuplicateCaveatError(e.type,n,a);r.add(e.type)}))}r&&o&&o(t,n,a)}setValidatedPermissions(e,t){this.update((n=>{n.subjects[e]||(n.subjects[e]={origin:e,permissions:{}}),n.subjects[e].permissions=(0,g.castDraft)(t)}))}constructCaveats(e,t,n){const r=n?.map((n=>{this.validateCaveat(n,e,t);const{type:r,value:i}=n;return{type:r,value:i}}));return r&&(0,p.isNonEmptyArray)(r)?r:void 0}validateCaveat(e,t,n){if(!(0,p.isPlainObject)(e))throw new w.InvalidCaveatError(e,t,n);if(2!==Object.keys(e).length)throw new w.InvalidCaveatFieldsError(e,t,n);if("string"!=typeof e.type)throw new w.InvalidCaveatTypeError(e,t,n);const r=this.getCaveatSpecification(e.type);if(!r)throw new w.UnrecognizedCaveatTypeError(e.type,t,n);if(!(0,m.hasProperty)(e,"value")||void 0===e.value)throw new w.CaveatMissingValueError(e,t,n);if(!(0,p.isValidJson)(e.value))throw new w.CaveatInvalidJsonError(e,t,n);r.validator?.(e,t,n)}async requestPermissions(e,t,n={}){const{origin:i}=e,{id:s=(0,b.nanoid)(),preserveExistingPermissions:o=!0}=n;this.validateRequestedPermissions(i,t);const a={...n.metadata,id:s,origin:i},c={metadata:a,permissions:t},d=await this.requestUserApproval(c);return await l(this,r,"m",u).call(this,{subject:e,metadata:a,preserveExistingPermissions:o,approvedRequest:d})}async requestPermissionsIncremental(e,t,n={}){const{origin:i}=e,{id:s=(0,b.nanoid)()}=n;this.validateRequestedPermissions(i,t);const a=this.getPermissions(i)??{},[c,d]=l(this,r,"m",o).call(this,a,t);if(void 0===c||void 0===d)return[];try{this.validateRequestedPermissions(i,c)}catch(e){if(e instanceof Error)throw new w.InvalidMergedPermissionsError(i,e,d);throw(0,w.internalError)("Unrecognized error type",{error:e})}const h={...n.metadata,id:s,origin:i},p={metadata:h,permissions:c,diff:{currentPermissions:a,permissionDiffMap:d}},f=await this.requestUserApproval(p);return await l(this,r,"m",u).call(this,{subject:e,metadata:h,preserveExistingPermissions:!1,approvedRequest:f})}validateRequestedPermissions(e,t){if(!(0,p.isPlainObject)(t))throw(0,w.invalidParams)({message:`Requested permissions for origin "${e}" is not a plain object.`,data:{origin:e,requestedPermissions:t}});if(0===Object.keys(t).length)throw(0,w.invalidParams)({message:`Permissions request for origin "${e}" contains no permissions.`,data:{requestedPermissions:t}});for(const n of Object.keys(t)){const r=t[n];if(!this.targetExists(n))throw(0,w.methodNotFound)(n,{origin:e,requestedPermissions:t});if(!(0,p.isPlainObject)(r)||void 0!==r.parentCapability&&n!==r.parentCapability)throw(0,w.invalidParams)({message:`Permissions request for origin "${e}" contains invalid requested permission(s).`,data:{origin:e,requestedPermissions:t}});this.validatePermission(this.getPermissionSpecification(n),r,e,{invokePermissionValidator:!1,performCaveatValidation:!0})}}async requestUserApproval(e){const{origin:t,id:n}=e.metadata,r=await this.messagingSystem.call("ApprovalController:addRequest",{id:n,origin:t,requestData:e,type:S.MethodNames.RequestPermissions},!0);return this.validateApprovedPermissions(r,{id:n,origin:t}),r}getSideEffects(e){return Object.keys(e).reduce(((e,t)=>{if(this.targetExists(t)){const n=this.getPermissionSpecification(t);n.sideEffect&&(e.permittedHandlers[t]=n.sideEffect.onPermitted,n.sideEffect.onFailure&&(e.failureHandlers[t]=n.sideEffect.onFailure))}return e}),{permittedHandlers:{},failureHandlers:{}})}async executeSideEffects(e,t){const{permittedHandlers:n,failureHandlers:r}=e,i={requestData:t,messagingSystem:this.messagingSystem},s=await Promise.allSettled(Object.values(n).map((e=>e(i)))),o=s.filter((e=>"rejected"===e.status));if(o.length>0){const e=Object.values(r);if(e.length>0)try{await Promise.all(e.map((e=>e(i))))}catch(e){throw(0,w.internalError)("Unexpected error in side-effects",{error:e})}const t=o.map((e=>e.reason));throw t.forEach((e=>{console.error(e)})),t.length>1?(0,w.internalError)("Multiple errors occurred during side-effects execution",{errors:t}):t[0]}return s.map((({value:e})=>e))}validateApprovedPermissions(e,t){const{id:n,origin:r}=t;if(!(0,p.isPlainObject)(e)||!(0,p.isPlainObject)(e.metadata))throw(0,w.internalError)(`Approved permissions request for subject "${r}" is invalid.`,{data:{approvedRequest:e}});const{metadata:{id:i,origin:s},permissions:o}=e;if(i!==n)throw(0,w.internalError)(`Approved permissions request for subject "${r}" mutated its id.`,{originalId:n,mutatedId:i});if(s!==r)throw(0,w.internalError)(`Approved permissions request for subject "${r}" mutated its origin.`,{originalOrigin:r,mutatedOrigin:s});try{this.validateRequestedPermissions(r,o)}catch(e){if(e instanceof Error)throw(0,w.internalError)(`Invalid approved permissions request: ${e.message}`,e instanceof f.JsonRpcError?e.data:void 0);throw(0,w.internalError)("Unrecognized error type",{error:e})}}async acceptPermissionsRequest(e){const{id:t}=e.metadata;if(!this.hasApprovalRequest({id:t}))throw new w.PermissionsRequestNotFoundError(t);if(0!==Object.keys(e.permissions).length)try{await this.messagingSystem.call("ApprovalController:acceptRequest",t,e)}catch(e){throw this._rejectPermissionsRequest(t,e),e}else this._rejectPermissionsRequest(t,(0,w.invalidParams)({message:"Must request at least one permission."}))}async rejectPermissionsRequest(e){if(!this.hasApprovalRequest({id:e}))throw new w.PermissionsRequestNotFoundError(e);this._rejectPermissionsRequest(e,(0,w.userRejectedRequest)())}hasApprovalRequest(e){return this.messagingSystem.call("ApprovalController:hasRequest",e)}_rejectPermissionsRequest(e,t){return this.messagingSystem.call("ApprovalController:rejectRequest",e,t)}async getEndowments(e,t,n){if(!this.hasPermission(e,t))throw(0,w.unauthorized)({data:{origin:e,targetName:t}});return this.getTypedPermissionSpecification(x.PermissionType.Endowment,t,e).endowmentGetter({origin:e,requestData:n})}async executeRestrictedMethod(e,t,n){const r=this.getRestrictedMethod(t,e),i=await this._executeRestrictedMethod(r,{origin:e},t,n);if(void 0===i)throw new Error(`Internal request for method "${t}" as origin "${e}" returned no result.`);return i}_executeRestrictedMethod(e,t,n,r=[]){const{origin:i}=t,s=this.getPermission(i,n);if(!s)throw(0,w.unauthorized)({data:{origin:i,method:n}});return(0,v.decorateWithCaveats)(e,s,this._caveatSpecifications)({method:n,params:r,context:{origin:i}})}}n.PermissionController=T,r=new WeakSet,i=function(e){const{merger:t}=this.getCaveatSpecification(e);if(void 0===t)throw new w.CaveatMergerDoesNotExistError(e);return t},s=function({approvedPermissions:e,subject:t,mergePermissions:n,preserveExistingPermissions:i,requestData:s}){const{origin:o}=t;if(!o||"string"!=typeof o)throw new w.InvalidSubjectIdentifierError(o);const c=i?{...this.getPermissions(o)}:{};for(const[t,i]of Object.entries(e)){if(!this.targetExists(t))throw(0,w.methodNotFound)(t);if(void 0!==i.parentCapability&&t!==i.parentCapability)throw new w.InvalidApprovedPermissionError(o,t,i);const e=t,u=this.getPermissionSpecification(e),d={caveats:this.constructCaveats(o,e,i.caveats),invoker:o,target:e};let h;h=u.factory?u.factory(d,s):(0,x.constructPermission)(d),n&&(h=l(this,r,"m",a).call(this,c[e],h)[0]),this.validatePermission(u,h,o,{invokePermissionValidator:!0,performCaveatValidation:!0}),c[e]=h}return this.setValidatedPermissions(o,c),c},o=function(e,t){const n={},i=(0,g.produce)(e,(e=>{const i=e;Object.entries(t).forEach((([e,t])=>{const s=i[e],[o,c]=l(this,r,"m",a).call(this,s??{},t);(void 0===s||Object.keys(c).length>0)&&(i[e]=o,n[e]=c)}))}));return 0===Object.keys(n).length?[]:[i,n]},a=function(e,t){const{caveatPairs:n,leftUniqueCaveats:i,rightUniqueCaveats:s}=(0,S.collectUniqueAndPairedCaveats)(e,t),[o,a]=n.reduce((([e,t],[n,i])=>{const[s,o]=l(this,r,"m",c).call(this,n,i);return void 0!==s&&void 0!==o?(e.push(s),t[s.type]=o):e.push(n),[e,t]}),[[],{}]),u=[...o,...i,...s.map((e=>{const[t,n]=l(this,r,"m",c).call(this,void 0,e);return a[t.type]=n,t}))];return[{...e,...t,...u.length>0?{caveats:u}:{}},a]},c=function(e,t){if(void 0!==e&&e.type!==t.type)throw new w.CaveatMergeTypeMismatchError(e.type,t.type);const n=l(this,r,"m",i).call(this,t.type);if(void 0===e)return[{...t},t.value];const[s,o]=n(e.value,t.value);return void 0!==s&&void 0!==o?[{type:t.type,value:s},o]:[]},u=async function({subject:e,metadata:t,preserveExistingPermissions:n,approvedRequest:r}){const{permissions:i,...s}=r,o={...t},a=this.getSideEffects(i);if(Object.values(a.permittedHandlers).length>0){const e=await this.executeSideEffects(a,r);o.data=Object.keys(a.permittedHandlers).reduce(((t,n,r)=>({[n]:e[r],...t})),{})}return[this.grantPermissions({subject:e,approvedPermissions:i,preserveExistingPermissions:n,requestData:s}),o]}},{"./Caveat.cjs":74,"./Permission.cjs":75,"./errors.cjs":78,"./permission-middleware.cjs":80,"./utils.cjs":85,"@metamask/base-controller":33,"@metamask/controller-utils":36,"@metamask/rpc-errors":96,"@metamask/utils":318,"deep-freeze-strict":430,immer:497,nanoid:504}],77:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SubjectMetadataController=n.SubjectType=void 0;const r=e("@metamask/base-controller");var i;!function(e){e.Extension="extension",e.Internal="internal",e.Unknown="unknown",e.Website="website",e.Snap="snap"}(i||(n.SubjectType=i={}));const s={subjectMetadata:{persist:!0,anonymous:!1}},o={subjectMetadata:{}};class a extends r.BaseController{constructor({messenger:e,subjectCacheLimit:t,state:n={}}){if(!Number.isInteger(t)||t<1)throw new Error(`subjectCacheLimit must be a positive integer. Received: "${t}"`);const r=t=>e.call("PermissionController:hasPermissions",t);super({name:"SubjectMetadataController",metadata:s,messenger:e,state:{...a.getTrimmedState(n,r)}}),this.subjectHasPermissions=r,this.subjectCacheLimit=t,this.subjectsWithoutPermissionsEncounteredSinceStartup=new Set,this.messagingSystem.registerActionHandler(`${this.name}:getSubjectMetadata`,this.getSubjectMetadata.bind(this)),this.messagingSystem.registerActionHandler(`${this.name}:addSubjectMetadata`,this.addSubjectMetadata.bind(this))}clearState(){this.subjectsWithoutPermissionsEncounteredSinceStartup.clear(),this.update((e=>({...o})))}addSubjectMetadata(e){const{origin:t}=e,n={...e,extensionId:e.extensionId||null,iconUrl:e.iconUrl||null,name:e.name||null,subjectType:e.subjectType||null};let r=null;if(this.subjectsWithoutPermissionsEncounteredSinceStartup.size>=this.subjectCacheLimit){const e=this.subjectsWithoutPermissionsEncounteredSinceStartup.values().next().value;this.subjectsWithoutPermissionsEncounteredSinceStartup.delete(e),this.subjectHasPermissions(e)||(r=e)}this.subjectsWithoutPermissionsEncounteredSinceStartup.add(t),this.update((e=>{e.subjectMetadata[t]=n,"string"==typeof r&&delete e.subjectMetadata[r]}))}getSubjectMetadata(e){return this.state.subjectMetadata[e]}trimMetadataState(){this.update((e=>a.getTrimmedState(e,this.subjectHasPermissions)))}static getTrimmedState(e,t){const{subjectMetadata:n={}}=e;return{subjectMetadata:Object.keys(n).reduce(((e,r)=>(t(r)&&(e[r]=n[r]),e)),{})}}}n.SubjectMetadataController=a},{"@metamask/base-controller":33}],78:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PermissionsRequestNotFoundError=n.CaveatSpecificationMismatchError=n.CaveatMergeTypeMismatchError=n.DuplicateCaveatError=n.ForbiddenCaveatError=n.InvalidCaveatFieldsError=n.CaveatInvalidJsonError=n.CaveatMissingValueError=n.InvalidCaveatTypeError=n.InvalidCaveatError=n.CaveatAlreadyExistsError=n.CaveatDoesNotExistError=n.InvalidCaveatsPropertyError=n.UnrecognizedCaveatTypeError=n.EndowmentPermissionDoesNotExistError=n.PermissionDoesNotExistError=n.InvalidApprovedPermissionError=n.InvalidMergedPermissionsError=n.CaveatMergerDoesNotExistError=n.UnrecognizedSubjectError=n.InvalidSubjectIdentifierError=n.internalError=n.userRejectedRequest=n.invalidParams=n.methodNotFound=n.unauthorized=void 0;const r=e("@metamask/rpc-errors");n.unauthorized=function(e){return r.providerErrors.unauthorized({message:"Unauthorized to perform action. Try requesting the required permission(s) first. For more information, see: https://docs.metamask.io/guide/rpc-api.html#permissions",data:e.data})},n.methodNotFound=function(e,t){const n={message:`The method "${e}" does not exist / is not available.`};return void 0!==t&&(n.data=t),r.rpcErrors.methodNotFound(n)},n.invalidParams=function(e){return r.rpcErrors.invalidParams({data:e.data,message:e.message})},n.userRejectedRequest=function(e){return r.providerErrors.userRejectedRequest({data:e})},n.internalError=function(e,t){return r.rpcErrors.internal({message:e,data:t})};class i extends Error{constructor(e){super(`Invalid subject identifier: "${"string"==typeof e?e:typeof e}"`)}}n.InvalidSubjectIdentifierError=i;class s extends Error{constructor(e){super(`Unrecognized subject: "${e}" has no permissions.`)}}n.UnrecognizedSubjectError=s;class o extends Error{constructor(e){super(`Caveat value merger does not exist for type: "${e}"`)}}n.CaveatMergerDoesNotExistError=o;class a extends Error{constructor(e,t,n){super(`Invalid merged permissions for subject "${e}":\n${t.message}`),this.cause=t,this.data={diff:n}}}n.InvalidMergedPermissionsError=a;class c extends Error{constructor(e,t,n){super(`Invalid approved permission for origin "${e}" and target "${t}".`),this.data={origin:e,target:t,approvedPermission:n}}}n.InvalidApprovedPermissionError=c;class u extends Error{constructor(e,t){super(`Subject "${e}" has no permission for "${t}".`)}}n.PermissionDoesNotExistError=u;class l extends Error{constructor(e,t){super(`${t?`Subject "${t}"`:"Unknown subject"} has no permission for "${e}".`),t&&(this.data={origin:t})}}n.EndowmentPermissionDoesNotExistError=l;class d extends Error{constructor(e,t,n){super(`Unrecognized caveat type: "${e}"`),this.data={caveatType:e},void 0!==t&&(this.data.origin=t),void 0!==n&&(this.data.target=n)}}n.UnrecognizedCaveatTypeError=d;class h extends Error{constructor(e,t,n){super(`The "caveats" property of permission for "${t}" of subject "${e}" is invalid. It must be a non-empty array if specified.`),this.data={origin:e,target:t,caveatsProperty:n}}}n.InvalidCaveatsPropertyError=h;class p extends Error{constructor(e,t,n){super(`Permission for "${t}" of subject "${e}" has no caveat of type "${n}".`)}}n.CaveatDoesNotExistError=p;class f extends Error{constructor(e,t,n){super(`Permission for "${t}" of subject "${e}" already has a caveat of type "${n}".`)}}n.CaveatAlreadyExistsError=f;class m extends r.JsonRpcError{constructor(e,t,n){super(r.errorCodes.rpc.invalidParams,"Invalid caveat. Caveats must be plain objects.",{receivedCaveat:e}),this.data={origin:t,target:n}}}n.InvalidCaveatError=m;class y extends Error{constructor(e,t,n){super(`Caveat types must be strings. Received: "${typeof e.type}"`),this.data={caveat:e,origin:t,target:n}}}n.InvalidCaveatTypeError=y;class g extends Error{constructor(e,t,n){super('Caveat is missing "value" field.'),this.data={caveat:e,origin:t,target:n}}}n.CaveatMissingValueError=g;class b extends Error{constructor(e,t,n){super('Caveat "value" is invalid JSON.'),this.data={caveat:e,origin:t,target:n}}}n.CaveatInvalidJsonError=b;class v extends Error{constructor(e,t,n){super(`Caveat has unexpected number of fields: "${Object.keys(e).length}"`),this.data={caveat:e,origin:t,target:n}}}n.InvalidCaveatFieldsError=v;class w extends Error{constructor(e,t,n){super(`Permissions for target "${n}" may not have caveats of type "${e}".`),this.data={caveatType:e,origin:t,target:n}}}n.ForbiddenCaveatError=w;class x extends Error{constructor(e,t,n){super(`Permissions for target "${n}" contains multiple caveats of type "${e}".`),this.data={caveatType:e,origin:t,target:n}}}n.DuplicateCaveatError=x;class E extends Error{constructor(e,t){super(`Cannot merge caveats of different types: "${e}" and "${t}".`),this.data={leftCaveatType:e,rightCaveatType:t}}}n.CaveatMergeTypeMismatchError=E;class S extends Error{constructor(e,t){super(`Caveat specification uses a mismatched type. Expected caveats for ${t}`),this.data={caveatSpec:e,permissionType:t}}}n.CaveatSpecificationMismatchError=S;class A extends Error{constructor(e){super(`Permissions request with id "${e}" not found.`)}}n.PermissionsRequestNotFoundError=A},{"@metamask/rpc-errors":96}],79:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.permissionRpcMethods=n.MethodNames=void 0,s(e("./Caveat.cjs"),n),s(e("./errors.cjs"),n),s(e("./Permission.cjs"),n),s(e("./PermissionController.cjs"),n);var a=e("./utils.cjs");Object.defineProperty(n,"MethodNames",{enumerable:!0,get:function(){return a.MethodNames}}),n.permissionRpcMethods=o(e("./rpc-methods/index.cjs")),s(e("./SubjectMetadataController.cjs"),n)},{"./Caveat.cjs":74,"./Permission.cjs":75,"./PermissionController.cjs":76,"./SubjectMetadataController.cjs":77,"./errors.cjs":78,"./rpc-methods/index.cjs":82,"./utils.cjs":85}],80:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getPermissionMiddlewareFactory=void 0;const r=e("@metamask/json-rpc-engine"),i=e("./errors.cjs");n.getPermissionMiddlewareFactory=function({executeRestrictedMethod:e,getRestrictedMethod:t,isUnrestrictedMethod:n}){return function(s){const{origin:o}=s;if("string"!=typeof o||!o)throw new Error('The subject "origin" must be a non-empty string.');return(0,r.createAsyncMiddleware)((async(r,a,c)=>{const{method:u,params:l}=r;if(n(u))return c();const d=t(u,o),h=await e(d,s,u,l);void 0!==h?a.result=h:a.error=(0,i.internalError)(`Request for method "${r.method}" returned undefined result.`,{request:r})}))}}},{"./errors.cjs":78,"@metamask/json-rpc-engine":47}],81:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getPermissionsHandler=void 0;const r=e("../utils.cjs");n.getPermissionsHandler={methodNames:[r.MethodNames.GetPermissions],implementation:async function(e,t,n,r,{getPermissionsForOrigin:i}){return t.result=Object.values(i()||{}),r()},hookNames:{getPermissionsForOrigin:!0}}},{"../utils.cjs":85}],82:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.handlers=void 0;const r=e("./getPermissions.cjs"),i=e("./requestPermissions.cjs"),s=e("./revokePermissions.cjs");n.handlers=[i.requestPermissionsHandler,r.getPermissionsHandler,s.revokePermissionsHandler]},{"./getPermissions.cjs":81,"./requestPermissions.cjs":83,"./revokePermissions.cjs":84}],83:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.requestPermissionsHandler=void 0;const r=e("@metamask/controller-utils"),i=e("../errors.cjs"),s=e("../utils.cjs");n.requestPermissionsHandler={methodNames:[s.MethodNames.RequestPermissions],implementation:async function(e,t,n,s,{requestPermissionsForOrigin:o}){const{params:a}=e;if(!Array.isArray(a)||!(0,r.isPlainObject)(a[0]))return s((0,i.invalidParams)({data:{request:e}}));const[c]=a,[u]=await o(c);return t.result=Object.values(u),s()},hookNames:{requestPermissionsForOrigin:!0}}},{"../errors.cjs":78,"../utils.cjs":85,"@metamask/controller-utils":36}],84:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.revokePermissionsHandler=void 0;const r=e("@metamask/utils"),i=e("../errors.cjs"),s=e("../utils.cjs");n.revokePermissionsHandler={methodNames:[s.MethodNames.RevokePermissions],implementation:async function(e,t,n,s,{revokePermissionsForOrigin:o}){const{params:a}=e,c=a?.[0];if(!c)return s((0,i.invalidParams)({data:{request:e}}));const u=Object.keys(c);if(!(0,r.isNonEmptyArray)(u))return s((0,i.invalidParams)({data:{request:e}}));return o(u),t.result=null,s()},hookNames:{revokePermissionsForOrigin:!0}}},{"../errors.cjs":78,"../utils.cjs":85,"@metamask/utils":318}],85:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.collectUniqueAndPairedCaveats=n.MethodNames=void 0,function(e){e.RequestPermissions="wallet_requestPermissions",e.GetPermissions="wallet_getPermissions",e.RevokePermissions="wallet_revokePermissions"}(r||(n.MethodNames=r={})),n.collectUniqueAndPairedCaveats=function(e,t){const n=e?.caveats?.slice()??[],r=t.caveats?.slice()??[],i=[],s=[];return n.forEach((e=>{const t=r.findIndex((t=>t.type===e.type));-1===t?i.push(e):(s.push([e,r[t]]),r.splice(t,1))})),{caveatPairs:s,leftUniqueCaveats:i,rightUniqueCaveats:[...r]}}},{}],86:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BasePostMessageStream=void 0;const r=e("readable-stream"),i=()=>{},s="SYN",o="ACK";class a extends r.Duplex{constructor(e){super(Object.assign({objectMode:!0},e)),this._init=!1,this._haveSyn=!1,this._log=()=>null}_handshake(){this._write(s,null,i),this.cork()}_onData(e){if(this._init)try{this.push(e),this._log(e,!1)}catch(e){this.emit("error",e)}else e===s?(this._haveSyn=!0,this._write(o,null,i)):e===o&&(this._init=!0,this._haveSyn||this._write(o,null,i),this.uncork())}_read(){}_write(e,t,n){e!==o&&e!==s&&this._log(e,!0),this._postMessage(e),n()}_setLogger(e){this._log=e}}n.BasePostMessageStream=a},{"readable-stream":525}],87:[function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.WebWorkerParentPostMessageStream=void 0;const i=e("../BasePostMessageStream"),s=e("../utils");class o extends i.BasePostMessageStream{constructor(e){var{worker:t}=e;super(r(e,["worker"])),this._target=s.DEDICATED_WORKER_NAME,this._worker=t,this._worker.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){this._worker.postMessage({target:this._target,data:e})}_onMessage(e){const t=e.data;(0,s.isValidStreamMessage)(t)&&this._onData(t.data)}_destroy(){this._worker.onmessage=null,this._worker=null}}n.WebWorkerParentPostMessageStream=o},{"../BasePostMessageStream":86,"../utils":91}],88:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WebWorkerPostMessageStream=void 0;const r=e("../BasePostMessageStream"),i=e("../utils");class s extends r.BasePostMessageStream{constructor(e={}){if("undefined"==typeof self||"undefined"==typeof WorkerGlobalScope)throw new Error("WorkerGlobalScope not found. This class should only be instantiated in a WebWorker.");super(e),this._name=i.DEDICATED_WORKER_NAME,self.addEventListener("message",this._onMessage.bind(this)),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const t=e.data;(0,i.isValidStreamMessage)(t)&&t.target===this._name&&this._onData(t.data)}_destroy(){}}n.WebWorkerPostMessageStream=s},{"../BasePostMessageStream":86,"../utils":91}],89:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./window/WindowPostMessageStream"),n),i(e("./WebWorker/WebWorkerPostMessageStream"),n),i(e("./WebWorker/WebWorkerParentPostMessageStream"),n),i(e("./runtime/BrowserRuntimePostMessageStream"),n),i(e("./BasePostMessageStream"),n)},{"./BasePostMessageStream":86,"./WebWorker/WebWorkerParentPostMessageStream":87,"./WebWorker/WebWorkerPostMessageStream":88,"./runtime/BrowserRuntimePostMessageStream":90,"./window/WindowPostMessageStream":92}],90:[function(e,t,n){"use strict";var r,i,s=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},o=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserRuntimePostMessageStream=void 0;const c=e("../BasePostMessageStream"),u=e("../utils");class l extends c.BasePostMessageStream{constructor(e){var{name:t,target:n}=e;super(a(e,["name","target"])),r.set(this,void 0),i.set(this,void 0),s(this,r,t,"f"),s(this,i,n,"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,r,"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)}}n.BrowserRuntimePostMessageStream=l,r=new WeakMap,i=new WeakMap},{"../BasePostMessageStream":86,"../utils":91}],91:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isValidStreamMessage=n.DEDICATED_WORKER_NAME=void 0;const r=e("@metamask/utils");n.DEDICATED_WORKER_NAME="dedicatedWorker",n.isValidStreamMessage=function(e){return(0,r.isObject)(e)&&Boolean(e.data)&&("number"==typeof e.data||"object"==typeof e.data||"string"==typeof e.data)}},{"@metamask/utils":318}],92:[function(e,t,n){"use strict";var r,i,s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.WindowPostMessageStream=void 0;const o=e("@metamask/utils"),a=e("../BasePostMessageStream"),c=e("../utils"),u=null===(r=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"source"))||void 0===r?void 0:r.get;(0,o.assert)(u,"MessageEvent.prototype.source getter is not defined.");const l=null===(i=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"origin"))||void 0===i?void 0:i.get;(0,o.assert)(l,"MessageEvent.prototype.origin getter is not defined.");class d extends a.BasePostMessageStream{constructor(e){var{name:t,target:n,targetOrigin:r=location.origin,targetWindow:i=window}=e;if(super(s(e,["name","target","targetOrigin","targetWindow"])),"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=t,this._target=n,this._targetOrigin=r,this._targetWindow=i,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&&l.call(e)!==this._targetOrigin||u.call(e)!==this._targetWindow||!(0,c.isValidStreamMessage)(t)||t.target!==this._name||this._onData(t.data)}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}n.WindowPostMessageStream=d},{"../BasePostMessageStream":86,"../utils":91,"@metamask/utils":318}],93:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.EthereumProviderError=n.JsonRpcError=void 0;const i=e("@metamask/utils"),s=r(e("fast-safe-stringify")),o=e("./utils.cjs");class a extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');(0,o.dataHasCause)(n)?(super(t,{cause:n.cause}),(0,i.hasProperty)(this,"cause")||Object.assign(this,{cause:n.cause})):super(t),void 0!==n&&(this.data=n),this.code=e}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,(0,i.isPlainObject)(this.data)&&(e.data.cause=(0,o.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,s.default)(this.serialize(),c,2)}}n.JsonRpcError=a;function c(e,t){if("[Circular]"!==t)return t}n.EthereumProviderError=class extends a{constructor(e,t,n){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,n)}}},{"./utils.cjs":97,"@metamask/utils":318,"fast-safe-stringify":480}],94:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.errorValues=n.errorCodes=void 0,n.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}},n.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."}}},{}],95:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.providerErrors=n.rpcErrors=void 0;const r=e("./classes.cjs"),i=e("./error-constants.cjs"),s=e("./utils.cjs");function o(e,t){const[n,i]=c(t);return new r.JsonRpcError(e,n??(0,s.getMessageFromCode)(e),i)}function a(e,t){const[n,i]=c(t);return new r.EthereumProviderError(e,n??(0,s.getMessageFromCode)(e),i)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,n]}}return[]}n.rpcErrors={parse:e=>o(i.errorCodes.rpc.parse,e),invalidRequest:e=>o(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(i.errorCodes.rpc.methodNotFound,e),internal:e=>o(i.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(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(i.errorCodes.rpc.limitExceeded,e)},n.providerErrors={userRejectedRequest:e=>a(i.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(i.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(i.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(i.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(i.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:n,data:i}=e;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(t,n,i)}}},{"./classes.cjs":93,"./error-constants.cjs":94,"./utils.cjs":97}],96:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.errorCodes=n.providerErrors=n.rpcErrors=n.getMessageFromCode=n.serializeError=n.serializeCause=n.dataHasCause=n.EthereumProviderError=n.JsonRpcError=void 0;var r=e("./classes.cjs");Object.defineProperty(n,"JsonRpcError",{enumerable:!0,get:function(){return r.JsonRpcError}}),Object.defineProperty(n,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});var i=e("./utils.cjs");Object.defineProperty(n,"dataHasCause",{enumerable:!0,get:function(){return i.dataHasCause}}),Object.defineProperty(n,"serializeCause",{enumerable:!0,get:function(){return i.serializeCause}}),Object.defineProperty(n,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(n,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});var s=e("./errors.cjs");Object.defineProperty(n,"rpcErrors",{enumerable:!0,get:function(){return s.rpcErrors}}),Object.defineProperty(n,"providerErrors",{enumerable:!0,get:function(){return s.providerErrors}});var o=e("./error-constants.cjs");Object.defineProperty(n,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},{"./classes.cjs":93,"./error-constants.cjs":94,"./errors.cjs":95,"./utils.cjs":97}],97:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dataHasCause=n.serializeCause=n.serializeError=n.isValidCode=n.getMessageFromCode=n.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=e("@metamask/utils"),i=e("./error-constants.cjs"),s=i.errorCodes.rpc.internal,o={code:s,message:a(s)};function a(e,t="Unspecified error message. This is a bug, please report it."){if(c(e)){const t=e.toString();if((0,r.hasProperty)(i.errorValues,t))return i.errorValues[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return n.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){return Number.isInteger(e)}function u(e){return Array.isArray(e)?e.map((e=>(0,r.isValidJson)(e)?e:(0,r.isObject)(e)?l(e):null)):(0,r.isObject)(e)?l(e):(0,r.isValidJson)(e)?e:null}function l(e){return Object.getOwnPropertyNames(e).reduce(((t,n)=>{const i=e[n];return(0,r.isValidJson)(i)&&(t[n]=i),t}),{})}n.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",n.getMessageFromCode=a,n.isValidCode=c,n.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:n=!0,shouldPreserveMessage:i=!0}={}){if(!(0,r.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const s=function(e,t,n){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,r.isJsonRpcError)(e))return e;const i=function(e){if((0,r.isObject)(e)&&(0,r.hasProperty)(e,"message")&&"string"==typeof e.message&&e.message.length>0)return e.message;return}(e),s=u(e),o={...t,...n&&i&&{message:i},data:{cause:s}};return o}(e,t,i);return n||delete s.stack,s},n.serializeCause=u,n.dataHasCause=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"cause")&&(0,r.isObject)(e.cause)}},{"./error-constants.cjs":94,"@metamask/utils":318}],98:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("events");function i(e,t,n){try{Reflect.apply(e,t,n)}catch(e){setTimeout((()=>{throw e}))}}class s extends r.EventEmitter{emit(e,...t){let n="error"===e;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const n=new Error("Unhandled error."+(e?` (${e.message})`:""));throw n.context=e,n}const s=r[e];if(void 0===s)return!1;if("function"==typeof s)i(s,this,t);else{const e=s.length,n=function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r+=1)n[r]=e[r];return n}(s);for(let r=0;r<e;r+=1)i(n[r],this,t)}return!0}}n.default=s},{events:452}],99:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mnemonicToSeedSync=n.mnemonicToSeed=n.validateMnemonic=n.entropyToMnemonic=n.mnemonicToEntropy=n.generateMnemonic=void 0;
/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */
const r=e("@noble/hashes/_assert"),i=e("@noble/hashes/pbkdf2"),s=e("@noble/hashes/sha256"),o=e("@noble/hashes/sha512"),a=e("@noble/hashes/utils"),c=e("@scure/base");function u(e){if("string"!=typeof e)throw new TypeError("Invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function l(e){const t=u(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}function d(e){r.default.bytes(e,16,20,24,28,32)}n.generateMnemonic=function(e,t=128){if(r.default.number(t),t%32!=0||t>256)throw new TypeError("Invalid entropy");return m((0,a.randomBytes)(t/8),e)};const h=e=>{const t=8-e.length/4;return new Uint8Array([(0,s.sha256)(e)[0]>>t<<t])};function p(e){if(!Array.isArray(e)||2048!==e.length||"string"!=typeof e[0])throw new Error("Worlist: expected array of 2048 strings");return e.forEach((e=>{if("string"!=typeof e)throw new Error(`Wordlist: non-string element: ${e}`)})),c.utils.chain(c.utils.checksum(1,h),c.utils.radix2(11,!0),c.utils.alphabet(e))}function f(e,t){let n;if("string"==typeof e){const{words:r}=l(e);n=p(t).decode(r)}else n=p(t).decode(Array.from(new Uint16Array(e.buffer)).map((e=>t[e])));return d(n),n}function m(e,t){d(e);const n=p(t).encode(e).map((e=>t.indexOf(e)));return new Uint8Array(new Uint16Array(n).buffer)}n.mnemonicToEntropy=f,n.entropyToMnemonic=m,n.validateMnemonic=function(e,t){try{f(e,t)}catch(e){return!1}return!0};const y=e=>u(`mnemonic${e}`);function g(e,t){let n;return n="string"==typeof e?(new TextEncoder).encode(l(e).nfkd):(new TextEncoder).encode(Array.from(new Uint16Array(e.buffer)).map((e=>t[e])).join(" ")),n}n.mnemonicToSeed=function(e,t,n=""){const r=g(e,t);return(0,i.pbkdf2Async)(o.sha512,r,y(n),{c:2048,dkLen:64})},n.mnemonicToSeedSync=function(e,t,n=""){const r=g(e,t);return(0,i.pbkdf2)(o.sha512,r,y(n),{c:2048,dkLen:64})}},{"@noble/hashes/_assert":101,"@noble/hashes/pbkdf2":106,"@noble/hashes/sha256":107,"@noble/hashes/sha512":108,"@noble/hashes/utils":109,"@scure/base":351}],100:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wordlist=void 0,n.wordlist="abandon\nability\nable\nabout\nabove\nabsent\nabsorb\nabstract\nabsurd\nabuse\naccess\naccident\naccount\naccuse\nachieve\nacid\nacoustic\nacquire\nacross\nact\naction\nactor\nactress\nactual\nadapt\nadd\naddict\naddress\nadjust\nadmit\nadult\nadvance\nadvice\naerobic\naffair\nafford\nafraid\nagain\nage\nagent\nagree\nahead\naim\nair\nairport\naisle\nalarm\nalbum\nalcohol\nalert\nalien\nall\nalley\nallow\nalmost\nalone\nalpha\nalready\nalso\nalter\nalways\namateur\namazing\namong\namount\namused\nanalyst\nanchor\nancient\nanger\nangle\nangry\nanimal\nankle\nannounce\nannual\nanother\nanswer\nantenna\nantique\nanxiety\nany\napart\napology\nappear\napple\napprove\napril\narch\narctic\narea\narena\nargue\narm\narmed\narmor\narmy\naround\narrange\narrest\narrive\narrow\nart\nartefact\nartist\nartwork\nask\naspect\nassault\nasset\nassist\nassume\nasthma\nathlete\natom\nattack\nattend\nattitude\nattract\nauction\naudit\naugust\naunt\nauthor\nauto\nautumn\naverage\navocado\navoid\nawake\naware\naway\nawesome\nawful\nawkward\naxis\nbaby\nbachelor\nbacon\nbadge\nbag\nbalance\nbalcony\nball\nbamboo\nbanana\nbanner\nbar\nbarely\nbargain\nbarrel\nbase\nbasic\nbasket\nbattle\nbeach\nbean\nbeauty\nbecause\nbecome\nbeef\nbefore\nbegin\nbehave\nbehind\nbelieve\nbelow\nbelt\nbench\nbenefit\nbest\nbetray\nbetter\nbetween\nbeyond\nbicycle\nbid\nbike\nbind\nbiology\nbird\nbirth\nbitter\nblack\nblade\nblame\nblanket\nblast\nbleak\nbless\nblind\nblood\nblossom\nblouse\nblue\nblur\nblush\nboard\nboat\nbody\nboil\nbomb\nbone\nbonus\nbook\nboost\nborder\nboring\nborrow\nboss\nbottom\nbounce\nbox\nboy\nbracket\nbrain\nbrand\nbrass\nbrave\nbread\nbreeze\nbrick\nbridge\nbrief\nbright\nbring\nbrisk\nbroccoli\nbroken\nbronze\nbroom\nbrother\nbrown\nbrush\nbubble\nbuddy\nbudget\nbuffalo\nbuild\nbulb\nbulk\nbullet\nbundle\nbunker\nburden\nburger\nburst\nbus\nbusiness\nbusy\nbutter\nbuyer\nbuzz\ncabbage\ncabin\ncable\ncactus\ncage\ncake\ncall\ncalm\ncamera\ncamp\ncan\ncanal\ncancel\ncandy\ncannon\ncanoe\ncanvas\ncanyon\ncapable\ncapital\ncaptain\ncar\ncarbon\ncard\ncargo\ncarpet\ncarry\ncart\ncase\ncash\ncasino\ncastle\ncasual\ncat\ncatalog\ncatch\ncategory\ncattle\ncaught\ncause\ncaution\ncave\nceiling\ncelery\ncement\ncensus\ncentury\ncereal\ncertain\nchair\nchalk\nchampion\nchange\nchaos\nchapter\ncharge\nchase\nchat\ncheap\ncheck\ncheese\nchef\ncherry\nchest\nchicken\nchief\nchild\nchimney\nchoice\nchoose\nchronic\nchuckle\nchunk\nchurn\ncigar\ncinnamon\ncircle\ncitizen\ncity\ncivil\nclaim\nclap\nclarify\nclaw\nclay\nclean\nclerk\nclever\nclick\nclient\ncliff\nclimb\nclinic\nclip\nclock\nclog\nclose\ncloth\ncloud\nclown\nclub\nclump\ncluster\nclutch\ncoach\ncoast\ncoconut\ncode\ncoffee\ncoil\ncoin\ncollect\ncolor\ncolumn\ncombine\ncome\ncomfort\ncomic\ncommon\ncompany\nconcert\nconduct\nconfirm\ncongress\nconnect\nconsider\ncontrol\nconvince\ncook\ncool\ncopper\ncopy\ncoral\ncore\ncorn\ncorrect\ncost\ncotton\ncouch\ncountry\ncouple\ncourse\ncousin\ncover\ncoyote\ncrack\ncradle\ncraft\ncram\ncrane\ncrash\ncrater\ncrawl\ncrazy\ncream\ncredit\ncreek\ncrew\ncricket\ncrime\ncrisp\ncritic\ncrop\ncross\ncrouch\ncrowd\ncrucial\ncruel\ncruise\ncrumble\ncrunch\ncrush\ncry\ncrystal\ncube\nculture\ncup\ncupboard\ncurious\ncurrent\ncurtain\ncurve\ncushion\ncustom\ncute\ncycle\ndad\ndamage\ndamp\ndance\ndanger\ndaring\ndash\ndaughter\ndawn\nday\ndeal\ndebate\ndebris\ndecade\ndecember\ndecide\ndecline\ndecorate\ndecrease\ndeer\ndefense\ndefine\ndefy\ndegree\ndelay\ndeliver\ndemand\ndemise\ndenial\ndentist\ndeny\ndepart\ndepend\ndeposit\ndepth\ndeputy\nderive\ndescribe\ndesert\ndesign\ndesk\ndespair\ndestroy\ndetail\ndetect\ndevelop\ndevice\ndevote\ndiagram\ndial\ndiamond\ndiary\ndice\ndiesel\ndiet\ndiffer\ndigital\ndignity\ndilemma\ndinner\ndinosaur\ndirect\ndirt\ndisagree\ndiscover\ndisease\ndish\ndismiss\ndisorder\ndisplay\ndistance\ndivert\ndivide\ndivorce\ndizzy\ndoctor\ndocument\ndog\ndoll\ndolphin\ndomain\ndonate\ndonkey\ndonor\ndoor\ndose\ndouble\ndove\ndraft\ndragon\ndrama\ndrastic\ndraw\ndream\ndress\ndrift\ndrill\ndrink\ndrip\ndrive\ndrop\ndrum\ndry\nduck\ndumb\ndune\nduring\ndust\ndutch\nduty\ndwarf\ndynamic\neager\neagle\nearly\nearn\nearth\neasily\neast\neasy\necho\necology\neconomy\nedge\nedit\neducate\neffort\negg\neight\neither\nelbow\nelder\nelectric\nelegant\nelement\nelephant\nelevator\nelite\nelse\nembark\nembody\nembrace\nemerge\nemotion\nemploy\nempower\nempty\nenable\nenact\nend\nendless\nendorse\nenemy\nenergy\nenforce\nengage\nengine\nenhance\nenjoy\nenlist\nenough\nenrich\nenroll\nensure\nenter\nentire\nentry\nenvelope\nepisode\nequal\nequip\nera\nerase\nerode\nerosion\nerror\nerupt\nescape\nessay\nessence\nestate\neternal\nethics\nevidence\nevil\nevoke\nevolve\nexact\nexample\nexcess\nexchange\nexcite\nexclude\nexcuse\nexecute\nexercise\nexhaust\nexhibit\nexile\nexist\nexit\nexotic\nexpand\nexpect\nexpire\nexplain\nexpose\nexpress\nextend\nextra\neye\neyebrow\nfabric\nface\nfaculty\nfade\nfaint\nfaith\nfall\nfalse\nfame\nfamily\nfamous\nfan\nfancy\nfantasy\nfarm\nfashion\nfat\nfatal\nfather\nfatigue\nfault\nfavorite\nfeature\nfebruary\nfederal\nfee\nfeed\nfeel\nfemale\nfence\nfestival\nfetch\nfever\nfew\nfiber\nfiction\nfield\nfigure\nfile\nfilm\nfilter\nfinal\nfind\nfine\nfinger\nfinish\nfire\nfirm\nfirst\nfiscal\nfish\nfit\nfitness\nfix\nflag\nflame\nflash\nflat\nflavor\nflee\nflight\nflip\nfloat\nflock\nfloor\nflower\nfluid\nflush\nfly\nfoam\nfocus\nfog\nfoil\nfold\nfollow\nfood\nfoot\nforce\nforest\nforget\nfork\nfortune\nforum\nforward\nfossil\nfoster\nfound\nfox\nfragile\nframe\nfrequent\nfresh\nfriend\nfringe\nfrog\nfront\nfrost\nfrown\nfrozen\nfruit\nfuel\nfun\nfunny\nfurnace\nfury\nfuture\ngadget\ngain\ngalaxy\ngallery\ngame\ngap\ngarage\ngarbage\ngarden\ngarlic\ngarment\ngas\ngasp\ngate\ngather\ngauge\ngaze\ngeneral\ngenius\ngenre\ngentle\ngenuine\ngesture\nghost\ngiant\ngift\ngiggle\nginger\ngiraffe\ngirl\ngive\nglad\nglance\nglare\nglass\nglide\nglimpse\nglobe\ngloom\nglory\nglove\nglow\nglue\ngoat\ngoddess\ngold\ngood\ngoose\ngorilla\ngospel\ngossip\ngovern\ngown\ngrab\ngrace\ngrain\ngrant\ngrape\ngrass\ngravity\ngreat\ngreen\ngrid\ngrief\ngrit\ngrocery\ngroup\ngrow\ngrunt\nguard\nguess\nguide\nguilt\nguitar\ngun\ngym\nhabit\nhair\nhalf\nhammer\nhamster\nhand\nhappy\nharbor\nhard\nharsh\nharvest\nhat\nhave\nhawk\nhazard\nhead\nhealth\nheart\nheavy\nhedgehog\nheight\nhello\nhelmet\nhelp\nhen\nhero\nhidden\nhigh\nhill\nhint\nhip\nhire\nhistory\nhobby\nhockey\nhold\nhole\nholiday\nhollow\nhome\nhoney\nhood\nhope\nhorn\nhorror\nhorse\nhospital\nhost\nhotel\nhour\nhover\nhub\nhuge\nhuman\nhumble\nhumor\nhundred\nhungry\nhunt\nhurdle\nhurry\nhurt\nhusband\nhybrid\nice\nicon\nidea\nidentify\nidle\nignore\nill\nillegal\nillness\nimage\nimitate\nimmense\nimmune\nimpact\nimpose\nimprove\nimpulse\ninch\ninclude\nincome\nincrease\nindex\nindicate\nindoor\nindustry\ninfant\ninflict\ninform\ninhale\ninherit\ninitial\ninject\ninjury\ninmate\ninner\ninnocent\ninput\ninquiry\ninsane\ninsect\ninside\ninspire\ninstall\nintact\ninterest\ninto\ninvest\ninvite\ninvolve\niron\nisland\nisolate\nissue\nitem\nivory\njacket\njaguar\njar\njazz\njealous\njeans\njelly\njewel\njob\njoin\njoke\njourney\njoy\njudge\njuice\njump\njungle\njunior\njunk\njust\nkangaroo\nkeen\nkeep\nketchup\nkey\nkick\nkid\nkidney\nkind\nkingdom\nkiss\nkit\nkitchen\nkite\nkitten\nkiwi\nknee\nknife\nknock\nknow\nlab\nlabel\nlabor\nladder\nlady\nlake\nlamp\nlanguage\nlaptop\nlarge\nlater\nlatin\nlaugh\nlaundry\nlava\nlaw\nlawn\nlawsuit\nlayer\nlazy\nleader\nleaf\nlearn\nleave\nlecture\nleft\nleg\nlegal\nlegend\nleisure\nlemon\nlend\nlength\nlens\nleopard\nlesson\nletter\nlevel\nliar\nliberty\nlibrary\nlicense\nlife\nlift\nlight\nlike\nlimb\nlimit\nlink\nlion\nliquid\nlist\nlittle\nlive\nlizard\nload\nloan\nlobster\nlocal\nlock\nlogic\nlonely\nlong\nloop\nlottery\nloud\nlounge\nlove\nloyal\nlucky\nluggage\nlumber\nlunar\nlunch\nluxury\nlyrics\nmachine\nmad\nmagic\nmagnet\nmaid\nmail\nmain\nmajor\nmake\nmammal\nman\nmanage\nmandate\nmango\nmansion\nmanual\nmaple\nmarble\nmarch\nmargin\nmarine\nmarket\nmarriage\nmask\nmass\nmaster\nmatch\nmaterial\nmath\nmatrix\nmatter\nmaximum\nmaze\nmeadow\nmean\nmeasure\nmeat\nmechanic\nmedal\nmedia\nmelody\nmelt\nmember\nmemory\nmention\nmenu\nmercy\nmerge\nmerit\nmerry\nmesh\nmessage\nmetal\nmethod\nmiddle\nmidnight\nmilk\nmillion\nmimic\nmind\nminimum\nminor\nminute\nmiracle\nmirror\nmisery\nmiss\nmistake\nmix\nmixed\nmixture\nmobile\nmodel\nmodify\nmom\nmoment\nmonitor\nmonkey\nmonster\nmonth\nmoon\nmoral\nmore\nmorning\nmosquito\nmother\nmotion\nmotor\nmountain\nmouse\nmove\nmovie\nmuch\nmuffin\nmule\nmultiply\nmuscle\nmuseum\nmushroom\nmusic\nmust\nmutual\nmyself\nmystery\nmyth\nnaive\nname\nnapkin\nnarrow\nnasty\nnation\nnature\nnear\nneck\nneed\nnegative\nneglect\nneither\nnephew\nnerve\nnest\nnet\nnetwork\nneutral\nnever\nnews\nnext\nnice\nnight\nnoble\nnoise\nnominee\nnoodle\nnormal\nnorth\nnose\nnotable\nnote\nnothing\nnotice\nnovel\nnow\nnuclear\nnumber\nnurse\nnut\noak\nobey\nobject\noblige\nobscure\nobserve\nobtain\nobvious\noccur\nocean\noctober\nodor\noff\noffer\noffice\noften\noil\nokay\nold\nolive\nolympic\nomit\nonce\none\nonion\nonline\nonly\nopen\nopera\nopinion\noppose\noption\norange\norbit\norchard\norder\nordinary\norgan\norient\noriginal\norphan\nostrich\nother\noutdoor\nouter\noutput\noutside\noval\noven\nover\nown\nowner\noxygen\noyster\nozone\npact\npaddle\npage\npair\npalace\npalm\npanda\npanel\npanic\npanther\npaper\nparade\nparent\npark\nparrot\nparty\npass\npatch\npath\npatient\npatrol\npattern\npause\npave\npayment\npeace\npeanut\npear\npeasant\npelican\npen\npenalty\npencil\npeople\npepper\nperfect\npermit\nperson\npet\nphone\nphoto\nphrase\nphysical\npiano\npicnic\npicture\npiece\npig\npigeon\npill\npilot\npink\npioneer\npipe\npistol\npitch\npizza\nplace\nplanet\nplastic\nplate\nplay\nplease\npledge\npluck\nplug\nplunge\npoem\npoet\npoint\npolar\npole\npolice\npond\npony\npool\npopular\nportion\nposition\npossible\npost\npotato\npottery\npoverty\npowder\npower\npractice\npraise\npredict\nprefer\nprepare\npresent\npretty\nprevent\nprice\npride\nprimary\nprint\npriority\nprison\nprivate\nprize\nproblem\nprocess\nproduce\nprofit\nprogram\nproject\npromote\nproof\nproperty\nprosper\nprotect\nproud\nprovide\npublic\npudding\npull\npulp\npulse\npumpkin\npunch\npupil\npuppy\npurchase\npurity\npurpose\npurse\npush\nput\npuzzle\npyramid\nquality\nquantum\nquarter\nquestion\nquick\nquit\nquiz\nquote\nrabbit\nraccoon\nrace\nrack\nradar\nradio\nrail\nrain\nraise\nrally\nramp\nranch\nrandom\nrange\nrapid\nrare\nrate\nrather\nraven\nraw\nrazor\nready\nreal\nreason\nrebel\nrebuild\nrecall\nreceive\nrecipe\nrecord\nrecycle\nreduce\nreflect\nreform\nrefuse\nregion\nregret\nregular\nreject\nrelax\nrelease\nrelief\nrely\nremain\nremember\nremind\nremove\nrender\nrenew\nrent\nreopen\nrepair\nrepeat\nreplace\nreport\nrequire\nrescue\nresemble\nresist\nresource\nresponse\nresult\nretire\nretreat\nreturn\nreunion\nreveal\nreview\nreward\nrhythm\nrib\nribbon\nrice\nrich\nride\nridge\nrifle\nright\nrigid\nring\nriot\nripple\nrisk\nritual\nrival\nriver\nroad\nroast\nrobot\nrobust\nrocket\nromance\nroof\nrookie\nroom\nrose\nrotate\nrough\nround\nroute\nroyal\nrubber\nrude\nrug\nrule\nrun\nrunway\nrural\nsad\nsaddle\nsadness\nsafe\nsail\nsalad\nsalmon\nsalon\nsalt\nsalute\nsame\nsample\nsand\nsatisfy\nsatoshi\nsauce\nsausage\nsave\nsay\nscale\nscan\nscare\nscatter\nscene\nscheme\nschool\nscience\nscissors\nscorpion\nscout\nscrap\nscreen\nscript\nscrub\nsea\nsearch\nseason\nseat\nsecond\nsecret\nsection\nsecurity\nseed\nseek\nsegment\nselect\nsell\nseminar\nsenior\nsense\nsentence\nseries\nservice\nsession\nsettle\nsetup\nseven\nshadow\nshaft\nshallow\nshare\nshed\nshell\nsheriff\nshield\nshift\nshine\nship\nshiver\nshock\nshoe\nshoot\nshop\nshort\nshoulder\nshove\nshrimp\nshrug\nshuffle\nshy\nsibling\nsick\nside\nsiege\nsight\nsign\nsilent\nsilk\nsilly\nsilver\nsimilar\nsimple\nsince\nsing\nsiren\nsister\nsituate\nsix\nsize\nskate\nsketch\nski\nskill\nskin\nskirt\nskull\nslab\nslam\nsleep\nslender\nslice\nslide\nslight\nslim\nslogan\nslot\nslow\nslush\nsmall\nsmart\nsmile\nsmoke\nsmooth\nsnack\nsnake\nsnap\nsniff\nsnow\nsoap\nsoccer\nsocial\nsock\nsoda\nsoft\nsolar\nsoldier\nsolid\nsolution\nsolve\nsomeone\nsong\nsoon\nsorry\nsort\nsoul\nsound\nsoup\nsource\nsouth\nspace\nspare\nspatial\nspawn\nspeak\nspecial\nspeed\nspell\nspend\nsphere\nspice\nspider\nspike\nspin\nspirit\nsplit\nspoil\nsponsor\nspoon\nsport\nspot\nspray\nspread\nspring\nspy\nsquare\nsqueeze\nsquirrel\nstable\nstadium\nstaff\nstage\nstairs\nstamp\nstand\nstart\nstate\nstay\nsteak\nsteel\nstem\nstep\nstereo\nstick\nstill\nsting\nstock\nstomach\nstone\nstool\nstory\nstove\nstrategy\nstreet\nstrike\nstrong\nstruggle\nstudent\nstuff\nstumble\nstyle\nsubject\nsubmit\nsubway\nsuccess\nsuch\nsudden\nsuffer\nsugar\nsuggest\nsuit\nsummer\nsun\nsunny\nsunset\nsuper\nsupply\nsupreme\nsure\nsurface\nsurge\nsurprise\nsurround\nsurvey\nsuspect\nsustain\nswallow\nswamp\nswap\nswarm\nswear\nsweet\nswift\nswim\nswing\nswitch\nsword\nsymbol\nsymptom\nsyrup\nsystem\ntable\ntackle\ntag\ntail\ntalent\ntalk\ntank\ntape\ntarget\ntask\ntaste\ntattoo\ntaxi\nteach\nteam\ntell\nten\ntenant\ntennis\ntent\nterm\ntest\ntext\nthank\nthat\ntheme\nthen\ntheory\nthere\nthey\nthing\nthis\nthought\nthree\nthrive\nthrow\nthumb\nthunder\nticket\ntide\ntiger\ntilt\ntimber\ntime\ntiny\ntip\ntired\ntissue\ntitle\ntoast\ntobacco\ntoday\ntoddler\ntoe\ntogether\ntoilet\ntoken\ntomato\ntomorrow\ntone\ntongue\ntonight\ntool\ntooth\ntop\ntopic\ntopple\ntorch\ntornado\ntortoise\ntoss\ntotal\ntourist\ntoward\ntower\ntown\ntoy\ntrack\ntrade\ntraffic\ntragic\ntrain\ntransfer\ntrap\ntrash\ntravel\ntray\ntreat\ntree\ntrend\ntrial\ntribe\ntrick\ntrigger\ntrim\ntrip\ntrophy\ntrouble\ntruck\ntrue\ntruly\ntrumpet\ntrust\ntruth\ntry\ntube\ntuition\ntumble\ntuna\ntunnel\nturkey\nturn\nturtle\ntwelve\ntwenty\ntwice\ntwin\ntwist\ntwo\ntype\ntypical\nugly\numbrella\nunable\nunaware\nuncle\nuncover\nunder\nundo\nunfair\nunfold\nunhappy\nuniform\nunique\nunit\nuniverse\nunknown\nunlock\nuntil\nunusual\nunveil\nupdate\nupgrade\nuphold\nupon\nupper\nupset\nurban\nurge\nusage\nuse\nused\nuseful\nuseless\nusual\nutility\nvacant\nvacuum\nvague\nvalid\nvalley\nvalve\nvan\nvanish\nvapor\nvarious\nvast\nvault\nvehicle\nvelvet\nvendor\nventure\nvenue\nverb\nverify\nversion\nvery\nvessel\nveteran\nviable\nvibrant\nvicious\nvictory\nvideo\nview\nvillage\nvintage\nviolin\nvirtual\nvirus\nvisa\nvisit\nvisual\nvital\nvivid\nvocal\nvoice\nvoid\nvolcano\nvolume\nvote\nvoyage\nwage\nwagon\nwait\nwalk\nwall\nwalnut\nwant\nwarfare\nwarm\nwarrior\nwash\nwasp\nwaste\nwater\nwave\nway\nwealth\nweapon\nwear\nweasel\nweather\nweb\nwedding\nweekend\nweird\nwelcome\nwest\nwet\nwhale\nwhat\nwheat\nwheel\nwhen\nwhere\nwhip\nwhisper\nwide\nwidth\nwife\nwild\nwill\nwin\nwindow\nwine\nwing\nwink\nwinner\nwinter\nwire\nwisdom\nwise\nwish\nwitness\nwolf\nwoman\nwonder\nwood\nwool\nword\nwork\nworld\nworry\nworth\nwrap\nwreck\nwrestle\nwrist\nwrite\nwrong\nyard\nyear\nyellow\nyou\nyoung\nyouth\nzebra\nzero\nzone\nzoo".split("\n")},{}],101:[function(e,t,n){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function i(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function s(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"==typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Expected Uint8Array");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function c(e,t){s(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}Object.defineProperty(n,"__esModule",{value:!0}),n.output=n.exists=n.hash=n.bytes=n.bool=n.number=void 0,n.number=r,n.bool=i,n.bytes=s,n.hash=o,n.exists=a,n.output=c;const u={number:r,bool:i,bytes:s,hash:o,exists:a,output:c};n.default=u},{}],102:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SHA2=void 0;const r=e("./_assert.js"),i=e("./utils.js");class s extends i.Hash{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,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){(0,r.exists)(this);const{view:t,buffer:n,blockLen:s}=this,o=(e=(0,i.toBytes)(e)).length;for(let r=0;r<o;){const a=Math.min(s-this.pos,o-r);if(a!==s)n.set(e.subarray(r,r+a),this.pos),this.pos+=a,r+=a,this.pos===s&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;s<=o-r;r+=s)this.process(t,r)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.exists)(this),(0,r.output)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:s,isLE:o}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>s-a&&(this.process(n,0),a=0);for(let e=a;e<s;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(n>>i&s),a=Number(n&s),c=r?4:0,u=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+u,a,r)}(n,s-8,BigInt(8*this.length),o),this.process(n,0);const c=(0,i.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,d[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:s,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=s,r%t&&e.buffer.set(n),e}}n.SHA2=s},{"./_assert.js":101,"./utils.js":109}],103:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.add5L=n.add5H=n.add4H=n.add4L=n.add3H=n.add3L=n.add=n.rotlBL=n.rotlBH=n.rotlSL=n.rotlSH=n.rotr32L=n.rotr32H=n.rotrBL=n.rotrBH=n.rotrSL=n.rotrSH=n.shrSL=n.shrSH=n.toBig=n.split=n.fromBig=void 0;const r=BigInt(2**32-1),i=BigInt(32);function s(e,t=!1){return t?{h:Number(e&r),l:Number(e>>i&r)}:{h:0|Number(e>>i&r),l:0|Number(e&r)}}function o(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:a}=s(e[i],t);[n[i],r[i]]=[o,a]}return[n,r]}n.fromBig=s,n.split=o;const a=(e,t)=>BigInt(e>>>0)<<i|BigInt(t>>>0);n.toBig=a;const c=(e,t,n)=>e>>>n;n.shrSH=c;const u=(e,t,n)=>e<<32-n|t>>>n;n.shrSL=u;const l=(e,t,n)=>e>>>n|t<<32-n;n.rotrSH=l;const d=(e,t,n)=>e<<32-n|t>>>n;n.rotrSL=d;const h=(e,t,n)=>e<<64-n|t>>>n-32;n.rotrBH=h;const p=(e,t,n)=>e>>>n-32|t<<64-n;n.rotrBL=p;const f=(e,t)=>t;n.rotr32H=f;const m=(e,t)=>e;n.rotr32L=m;const y=(e,t,n)=>e<<n|t>>>32-n;n.rotlSH=y;const g=(e,t,n)=>t<<n|e>>>32-n;n.rotlSL=g;const b=(e,t,n)=>t<<n-32|e>>>64-n;n.rotlBH=b;const v=(e,t,n)=>e<<n-32|t>>>64-n;function w(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}n.rotlBL=v,n.add=w;const x=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);n.add3L=x;const E=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;n.add3H=E;const S=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);n.add4L=S;const A=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;n.add4H=A;const _=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);n.add5L=_;const T=(e,t,n,r,i,s)=>t+n+r+i+s+(e/2**32|0)|0;n.add5H=T;const k={fromBig:s,split:o,toBig:a,shrSH:c,shrSL:u,rotrSH:l,rotrSL:d,rotrBH:h,rotrBL:p,rotr32H:f,rotr32L:m,rotlSH:y,rotlSL:g,rotlBH:b,rotlBL:v,add:w,add3L:x,add3H:E,add4L:S,add4H:A,add5H:T,add5L:_};n.default=k},{}],104:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=void 0,n.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},{}],105:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hmac=n.HMAC=void 0;const r=e("./_assert.js"),i=e("./utils.js");class s extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.hash)(e);const n=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(n.length>s?e.create().update(n).digest():n);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return(0,r.exists)(this),this.iHash.update(e),this}digestInto(e){(0,r.exists)(this),(0,r.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:s,outputLen:o}=this;return e.finished=r,e.destroyed=i,e.blockLen=s,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}n.HMAC=s;n.hmac=(e,t,n)=>new s(e,t).update(n).digest(),n.hmac.create=(e,t)=>new s(e,t)},{"./_assert.js":101,"./utils.js":109}],106:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.pbkdf2Async=n.pbkdf2=void 0;const r=e("./_assert.js"),i=e("./hmac.js"),s=e("./utils.js");function o(e,t,n,o){(0,r.hash)(e);const a=(0,s.checkOpts)({dkLen:32,asyncTick:10},o),{c:c,dkLen:u,asyncTick:l}=a;if((0,r.number)(c),(0,r.number)(u),(0,r.number)(l),c<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const d=(0,s.toBytes)(t),h=(0,s.toBytes)(n),p=new Uint8Array(u),f=i.hmac.create(e,d),m=f._cloneInto().update(h);return{c:c,dkLen:u,asyncTick:l,DK:p,PRF:f,PRFSalt:m}}function a(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}n.pbkdf2=function(e,t,n,r){const{c:i,dkLen:c,DK:u,PRF:l,PRFSalt:d}=o(e,t,n,r);let h;const p=new Uint8Array(4),f=(0,s.createView)(p),m=new Uint8Array(l.outputLen);for(let e=1,t=0;t<c;e++,t+=l.outputLen){const n=u.subarray(t,t+l.outputLen);f.setInt32(0,e,!1),(h=d._cloneInto(h)).update(p).digestInto(m),n.set(m.subarray(0,n.length));for(let e=1;e<i;e++){l._cloneInto(h).update(m).digestInto(m);for(let e=0;e<n.length;e++)n[e]^=m[e]}}return a(l,d,u,h,m)},n.pbkdf2Async=async function(e,t,n,r){const{c:i,dkLen:c,asyncTick:u,DK:l,PRF:d,PRFSalt:h}=o(e,t,n,r);let p;const f=new Uint8Array(4),m=(0,s.createView)(f),y=new Uint8Array(d.outputLen);for(let e=1,t=0;t<c;e++,t+=d.outputLen){const n=l.subarray(t,t+d.outputLen);m.setInt32(0,e,!1),(p=h._cloneInto(p)).update(f).digestInto(y),n.set(y.subarray(0,n.length)),await(0,s.asyncLoop)(i-1,u,(()=>{d._cloneInto(p).update(y).digestInto(y);for(let e=0;e<n.length;e++)n[e]^=y[e]}))}return a(d,h,l,p,y)}},{"./_assert.js":101,"./hmac.js":105,"./utils.js":109}],107:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha224=n.sha256=void 0;const r=e("./_sha2.js"),i=e("./utils.js"),s=(e,t,n)=>e&t^e&n^t&n,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]),c=new Uint32Array(64);class u extends r.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:n,D:r,E:i,F:s,G:o,H:a}=this;return[e,t,n,r,i,s,o,a]}set(e,t,n,r,i,s,o,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=c[e-15],n=c[e-2],r=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,s=(0,i.rotr)(n,17)^(0,i.rotr)(n,19)^n>>>10;c[e]=s+c[e-7]+r+c[e-16]|0}let{A:n,B:r,C:a,D:u,E:l,F:d,G:h,H:p}=this;for(let e=0;e<64;e++){const t=p+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((f=l)&d^~f&h)+o[e]+c[e]|0,m=((0,i.rotr)(n,2)^(0,i.rotr)(n,13)^(0,i.rotr)(n,22))+s(n,r,a)|0;p=h,h=d,d=l,l=u+t|0,u=a,a=r,r=n,n=t+m|0}var f;n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,h=h+this.G|0,p=p+this.H|0,this.set(n,r,a,u,l,d,h,p)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}n.sha256=(0,i.wrapConstructor)((()=>new u)),n.sha224=(0,i.wrapConstructor)((()=>new l))},{"./_sha2.js":102,"./utils.js":109}],108:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha384=n.sha512_256=n.sha512_224=n.sha512=n.SHA512=void 0;const r=e("./_sha2.js"),i=e("./_u64.js"),s=e("./utils.js"),[o,a]=(()=>i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),c=new Uint32Array(80),u=new Uint32Array(80);class l extends r.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:s,Dh:o,Dl:a,Eh:c,El:u,Fh:l,Fl:d,Gh:h,Gl:p,Hh:f,Hl:m}=this;return[e,t,n,r,i,s,o,a,c,u,l,d,h,p,f,m]}set(e,t,n,r,i,s,o,a,c,u,l,d,h,p,f,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|s,this.Dh=0|o,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|m}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t),u[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|c[e-15],n=0|u[e-15],r=i.default.rotrSH(t,n,1)^i.default.rotrSH(t,n,8)^i.default.shrSH(t,n,7),s=i.default.rotrSL(t,n,1)^i.default.rotrSL(t,n,8)^i.default.shrSL(t,n,7),o=0|c[e-2],a=0|u[e-2],l=i.default.rotrSH(o,a,19)^i.default.rotrBH(o,a,61)^i.default.shrSH(o,a,6),d=i.default.rotrSL(o,a,19)^i.default.rotrBL(o,a,61)^i.default.shrSL(o,a,6),h=i.default.add4L(s,d,u[e-7],u[e-16]),p=i.default.add4H(h,r,l,c[e-7],c[e-16]);c[e]=0|p,u[e]=0|h}let{Ah:n,Al:r,Bh:s,Bl:l,Ch:d,Cl:h,Dh:p,Dl:f,Eh:m,El:y,Fh:g,Fl:b,Gh:v,Gl:w,Hh:x,Hl:E}=this;for(let e=0;e<80;e++){const t=i.default.rotrSH(m,y,14)^i.default.rotrSH(m,y,18)^i.default.rotrBH(m,y,41),S=i.default.rotrSL(m,y,14)^i.default.rotrSL(m,y,18)^i.default.rotrBL(m,y,41),A=m&g^~m&v,_=y&b^~y&w,T=i.default.add5L(E,S,_,a[e],u[e]),k=i.default.add5H(T,x,t,A,o[e],c[e]),C=0|T,P=i.default.rotrSH(n,r,28)^i.default.rotrBH(n,r,34)^i.default.rotrBH(n,r,39),O=i.default.rotrSL(n,r,28)^i.default.rotrBL(n,r,34)^i.default.rotrBL(n,r,39),I=n&s^n&d^s&d,M=r&l^r&h^l&h;x=0|v,E=0|w,v=0|g,w=0|b,g=0|m,b=0|y,({h:m,l:y}=i.default.add(0|p,0|f,0|k,0|C)),p=0|d,f=0|h,d=0|s,h=0|l,s=0|n,l=0|r;const j=i.default.add3L(C,O,M);n=i.default.add3H(j,k,P,I),r=0|j}({h:n,l:r}=i.default.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:s,l:l}=i.default.add(0|this.Bh,0|this.Bl,0|s,0|l)),({h:d,l:h}=i.default.add(0|this.Ch,0|this.Cl,0|d,0|h)),({h:p,l:f}=i.default.add(0|this.Dh,0|this.Dl,0|p,0|f)),({h:m,l:y}=i.default.add(0|this.Eh,0|this.El,0|m,0|y)),({h:g,l:b}=i.default.add(0|this.Fh,0|this.Fl,0|g,0|b)),({h:v,l:w}=i.default.add(0|this.Gh,0|this.Gl,0|v,0|w)),({h:x,l:E}=i.default.add(0|this.Hh,0|this.Hl,0|x,0|E)),this.set(n,r,s,l,d,h,p,f,m,y,g,b,v,w,x,E)}roundClean(){c.fill(0),u.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}n.SHA512=l;class d extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class h extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class p extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}n.sha512=(0,s.wrapConstructor)((()=>new l)),n.sha512_224=(0,s.wrapConstructor)((()=>new d)),n.sha512_256=(0,s.wrapConstructor)((()=>new h)),n.sha384=(0,s.wrapConstructor)((()=>new p))},{"./_sha2.js":102,"./_u64.js":103,"./utils.js":109}],109:[function(e,t,n){"use strict";
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(n,"__esModule",{value:!0}),n.randomBytes=n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.checkOpts=n.Hash=n.concatBytes=n.toBytes=n.utf8ToBytes=n.asyncLoop=n.nextTick=n.hexToBytes=n.bytesToHex=n.isLE=n.rotr=n.createView=n.u32=n.u8=void 0;const r=e("@noble/hashes/crypto");n.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}n.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));n.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(n.rotr=(e,t)=>e<<32-t|e>>>t,n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!n.isLE)throw new Error("Non little-endian hardware is not supported");const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));n.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=s[e[n]];return t};const o={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(e){return e>=o._0&&e<=o._9?e-o._0:e>=o._A&&e<=o._F?e-(o._A-10):e>=o._a&&e<=o._f?e-(o._a-10):void 0}n.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=a(e.charCodeAt(i)),s=a(e.charCodeAt(i+1));if(void 0===n||void 0===s){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+s}return r};function c(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function u(e){if("string"==typeof e&&(e=c(e)),!i(e))throw new Error("expected Uint8Array, got "+typeof e);return e}n.nextTick=async()=>{},n.asyncLoop=async function(e,t,r){let i=Date.now();for(let s=0;s<e;s++){r(s);const e=Date.now()-i;e>=0&&e<t||(await(0,n.nextTick)(),i+=e)}},n.utf8ToBytes=c,n.toBytes=u,n.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];if(!i(r))throw new Error("Uint8Array expected");t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n};n.Hash=class{clone(){return this._cloneInto()}};const l={}.toString;n.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==l.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},n.wrapConstructor=function(e){const t=t=>e().update(u(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},n.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},{"@noble/hashes/crypto":104}],110:[function(e,t,n){t.exports={0:{index:"0",hex:"0x80000000",symbol:"BTC",name:"Bitcoin"},1:{index:"1",hex:"0x80000001",symbol:"",name:"Testnet (all coins)"},2:{index:"2",hex:"0x80000002",symbol:"LTC",name:"Litecoin"},3:{index:"3",hex:"0x80000003",symbol:"DOGE",name:"Dogecoin"},4:{index:"4",hex:"0x80000004",symbol:"RDD",name:"Reddcoin"},5:{index:"5",hex:"0x80000005",symbol:"DASH",name:"Dash"},6:{index:"6",hex:"0x80000006",symbol:"PPC",name:"Peercoin"},7:{index:"7",hex:"0x80000007",symbol:"NMC",name:"Namecoin"},8:{index:"8",hex:"0x80000008",symbol:"FTC",name:"Feathercoin"},9:{index:"9",hex:"0x80000009",symbol:"XCP",name:"Counterparty"},10:{index:"10",hex:"0x8000000a",symbol:"BLK",name:"Blackcoin"},11:{index:"11",hex:"0x8000000b",symbol:"NSR",name:"NuShares"},12:{index:"12",hex:"0x8000000c",symbol:"NBT",name:"NuBits"},13:{index:"13",hex:"0x8000000d",symbol:"MZC",name:"Mazacoin"},14:{index:"14",hex:"0x8000000e",symbol:"VIA",name:"Viacoin"},15:{index:"15",hex:"0x8000000f",symbol:"XCH",name:"ClearingHouse"},16:{index:"16",hex:"0x80000010",symbol:"RBY",name:"Rubycoin"},17:{index:"17",hex:"0x80000011",symbol:"GRS",name:"Groestlcoin"},18:{index:"18",hex:"0x80000012",symbol:"DGC",name:"Digitalcoin"},19:{index:"19",hex:"0x80000013",symbol:"CCN",name:"Cannacoin"},20:{index:"20",hex:"0x80000014",symbol:"DGB",name:"DigiByte"},21:{index:"21",hex:"0x80000015",symbol:"",name:"Open Assets"},22:{index:"22",hex:"0x80000016",symbol:"MONA",name:"Monacoin"},23:{index:"23",hex:"0x80000017",symbol:"CLAM",name:"Clams"},24:{index:"24",hex:"0x80000018",symbol:"XPM",name:"Primecoin"},25:{index:"25",hex:"0x80000019",symbol:"NEOS",name:"Neoscoin"},26:{index:"26",hex:"0x8000001a",symbol:"JBS",name:"Jumbucks"},27:{index:"27",hex:"0x8000001b",symbol:"ZRC",name:"ziftrCOIN"},28:{index:"28",hex:"0x8000001c",symbol:"VTC",name:"Vertcoin"},29:{index:"29",hex:"0x8000001d",symbol:"NXT",name:"NXT"},30:{index:"30",hex:"0x8000001e",symbol:"BURST",name:"Burst"},31:{index:"31",hex:"0x8000001f",symbol:"MUE",name:"MonetaryUnit"},32:{index:"32",hex:"0x80000020",symbol:"ZOOM",name:"Zoom"},33:{index:"33",hex:"0x80000021",symbol:"VASH",name:"Virtual Cash"},34:{index:"34",hex:"0x80000022",symbol:"CDN",name:"Canada eCoin"},35:{index:"35",hex:"0x80000023",symbol:"SDC",name:"ShadowCash"},36:{index:"36",hex:"0x80000024",symbol:"PKB",name:"ParkByte"},37:{index:"37",hex:"0x80000025",symbol:"PND",name:"Pandacoin"},38:{index:"38",hex:"0x80000026",symbol:"START",name:"StartCOIN"},39:{index:"39",hex:"0x80000027",symbol:"MOIN",name:"MOIN"},40:{index:"40",hex:"0x80000028",symbol:"EXP",name:"Expanse"},41:{index:"41",hex:"0x80000029",symbol:"EMC2",name:"Einsteinium"},42:{index:"42",hex:"0x8000002a",symbol:"DCR",name:"Decred"},43:{index:"43",hex:"0x8000002b",symbol:"XEM",name:"NEM"},44:{index:"44",hex:"0x8000002c",symbol:"PART",name:"Particl"},45:{index:"45",hex:"0x8000002d",symbol:"ARG",name:"Argentum (dead)"},46:{index:"46",hex:"0x8000002e",symbol:"",name:"Libertas"},47:{index:"47",hex:"0x8000002f",symbol:"",name:"Posw coin"},48:{index:"48",hex:"0x80000030",symbol:"SHR",name:"Shreeji"},49:{index:"49",hex:"0x80000031",symbol:"GCR",name:"Global Currency Reserve (GCRcoin)"},50:{index:"50",hex:"0x80000032",symbol:"NVC",name:"Novacoin"},51:{index:"51",hex:"0x80000033",symbol:"AC",name:"Asiacoin"},52:{index:"52",hex:"0x80000034",symbol:"BTCD",name:"BitcoinDark"},53:{index:"53",hex:"0x80000035",symbol:"DOPE",name:"Dopecoin"},54:{index:"54",hex:"0x80000036",symbol:"TPC",name:"Templecoin"},55:{index:"55",hex:"0x80000037",symbol:"AIB",name:"AIB"},56:{index:"56",hex:"0x80000038",symbol:"EDRC",name:"EDRCoin"},57:{index:"57",hex:"0x80000039",symbol:"SYS",name:"Syscoin"},58:{index:"58",hex:"0x8000003a",symbol:"SLR",name:"Solarcoin"},59:{index:"59",hex:"0x8000003b",symbol:"SMLY",name:"Smileycoin"},60:{index:"60",hex:"0x8000003c",symbol:"ETH",name:"Ethereum"},61:{index:"61",hex:"0x8000003d",symbol:"ETC",name:"Ether Classic"},62:{index:"62",hex:"0x8000003e",symbol:"PSB",name:"Pesobit"},63:{index:"63",hex:"0x8000003f",symbol:"LDCN",name:"Landcoin (dead)"},64:{index:"64",hex:"0x80000040",symbol:"",name:"Open Chain"},65:{index:"65",hex:"0x80000041",symbol:"XBC",name:"Bitcoinplus"},66:{index:"66",hex:"0x80000042",symbol:"IOP",name:"Internet of People"},67:{index:"67",hex:"0x80000043",symbol:"NXS",name:"Nexus"},68:{index:"68",hex:"0x80000044",symbol:"INSN",name:"InsaneCoin"},69:{index:"69",hex:"0x80000045",symbol:"OK",name:"OKCash"},70:{index:"70",hex:"0x80000046",symbol:"BRIT",name:"BritCoin"},71:{index:"71",hex:"0x80000047",symbol:"CMP",name:"Compcoin"},72:{index:"72",hex:"0x80000048",symbol:"CRW",name:"Crown"},73:{index:"73",hex:"0x80000049",symbol:"BELA",name:"BelaCoin"},74:{index:"74",hex:"0x8000004a",symbol:"ICX",name:"ICON"},75:{index:"75",hex:"0x8000004b",symbol:"FJC",name:"FujiCoin"},76:{index:"76",hex:"0x8000004c",symbol:"MIX",name:"MIX"},77:{index:"77",hex:"0x8000004d",symbol:"XVG",name:"Verge Currency"},78:{index:"78",hex:"0x8000004e",symbol:"EFL",name:"Electronic Gulden"},79:{index:"79",hex:"0x8000004f",symbol:"CLUB",name:"ClubCoin"},80:{index:"80",hex:"0x80000050",symbol:"RICHX",name:"RichCoin"},81:{index:"81",hex:"0x80000051",symbol:"POT",name:"Potcoin"},82:{index:"82",hex:"0x80000052",symbol:"QRK",name:"Quarkcoin"},83:{index:"83",hex:"0x80000053",symbol:"TRC",name:"Terracoin"},84:{index:"84",hex:"0x80000054",symbol:"GRC",name:"Gridcoin"},85:{index:"85",hex:"0x80000055",symbol:"AUR",name:"Auroracoin"},86:{index:"86",hex:"0x80000056",symbol:"IXC",name:"IXCoin"},87:{index:"87",hex:"0x80000057",symbol:"NLG",name:"Gulden"},88:{index:"88",hex:"0x80000058",symbol:"BITB",name:"BitBean"},89:{index:"89",hex:"0x80000059",symbol:"BTA",name:"Bata"},90:{index:"90",hex:"0x8000005a",symbol:"XMY",name:"Myriadcoin"},91:{index:"91",hex:"0x8000005b",symbol:"BSD",name:"BitSend"},92:{index:"92",hex:"0x8000005c",symbol:"UNO",name:"Unobtanium"},93:{index:"93",hex:"0x8000005d",symbol:"MTR",name:"MasterTrader"},94:{index:"94",hex:"0x8000005e",symbol:"GB",name:"GoldBlocks"},95:{index:"95",hex:"0x8000005f",symbol:"SHM",name:"Saham"},96:{index:"96",hex:"0x80000060",symbol:"CRX",name:"Chronos"},97:{index:"97",hex:"0x80000061",symbol:"BIQ",name:"Ubiquoin"},98:{index:"98",hex:"0x80000062",symbol:"EVO",name:"Evotion"},99:{index:"99",hex:"0x80000063",symbol:"STO",name:"SaveTheOcean"},100:{index:"100",hex:"0x80000064",symbol:"BIGUP",name:"BigUp"},101:{index:"101",hex:"0x80000065",symbol:"GAME",name:"GameCredits"},102:{index:"102",hex:"0x80000066",symbol:"DLC",name:"Dollarcoins"},103:{index:"103",hex:"0x80000067",symbol:"ZYD",name:"Zayedcoin"},104:{index:"104",hex:"0x80000068",symbol:"DBIC",name:"Dubaicoin"},105:{index:"105",hex:"0x80000069",symbol:"STRAT",name:"Stratis"},106:{index:"106",hex:"0x8000006a",symbol:"SH",name:"Shilling"},107:{index:"107",hex:"0x8000006b",symbol:"MARS",name:"MarsCoin"},108:{index:"108",hex:"0x8000006c",symbol:"UBQ",name:"Ubiq"},109:{index:"109",hex:"0x8000006d",symbol:"PTC",name:"Pesetacoin"},110:{index:"110",hex:"0x8000006e",symbol:"NRO",name:"Neurocoin"},111:{index:"111",hex:"0x8000006f",symbol:"ARK",name:"ARK"},112:{index:"112",hex:"0x80000070",symbol:"USC",name:"UltimateSecureCashMain"},113:{index:"113",hex:"0x80000071",symbol:"THC",name:"Hempcoin"},114:{index:"114",hex:"0x80000072",symbol:"LINX",name:"Linx"},115:{index:"115",hex:"0x80000073",symbol:"ECN",name:"Ecoin"},116:{index:"116",hex:"0x80000074",symbol:"DNR",name:"Denarius"},117:{index:"117",hex:"0x80000075",symbol:"PINK",name:"Pinkcoin"},118:{index:"118",hex:"0x80000076",symbol:"ATOM",name:"Atom"},119:{index:"119",hex:"0x80000077",symbol:"PIVX",name:"Pivx"},120:{index:"120",hex:"0x80000078",symbol:"FLASH",name:"Flashcoin"},121:{index:"121",hex:"0x80000079",symbol:"ZEN",name:"Zencash"},122:{index:"122",hex:"0x8000007a",symbol:"PUT",name:"Putincoin"},123:{index:"123",hex:"0x8000007b",symbol:"ZNY",name:"BitZeny"},124:{index:"124",hex:"0x8000007c",symbol:"UNIFY",name:"Unify"},125:{index:"125",hex:"0x8000007d",symbol:"XST",name:"StealthCoin"},126:{index:"126",hex:"0x8000007e",symbol:"BRK",name:"Breakout Coin"},127:{index:"127",hex:"0x8000007f",symbol:"VC",name:"Vcash"},128:{index:"128",hex:"0x80000080",symbol:"XMR",name:"Monero"},129:{index:"129",hex:"0x80000081",symbol:"VOX",name:"Voxels"},130:{index:"130",hex:"0x80000082",symbol:"NAV",name:"NavCoin"},131:{index:"131",hex:"0x80000083",symbol:"FCT",name:"Factom Factoids"},132:{index:"132",hex:"0x80000084",symbol:"EC",name:"Factom Entry Credits"},133:{index:"133",hex:"0x80000085",symbol:"ZEC",name:"Zcash"},134:{index:"134",hex:"0x80000086",symbol:"LSK",name:"Lisk"},135:{index:"135",hex:"0x80000087",symbol:"STEEM",name:"Steem"},136:{index:"136",hex:"0x80000088",symbol:"XZC",name:"ZCoin"},137:{index:"137",hex:"0x80000089",symbol:"RBTC",name:"Rootstock"},138:{index:"138",hex:"0x8000008a",symbol:"",name:"Giftblock"},139:{index:"139",hex:"0x8000008b",symbol:"RPT",name:"RealPointCoin"},140:{index:"140",hex:"0x8000008c",symbol:"LBC",name:"LBRY Credits"},141:{index:"141",hex:"0x8000008d",symbol:"KMD",name:"Komodo"},142:{index:"142",hex:"0x8000008e",symbol:"BSQ",name:"bisq Token"},143:{index:"143",hex:"0x8000008f",symbol:"RIC",name:"Riecoin"},144:{index:"144",hex:"0x80000090",symbol:"XRP",name:"XRP"},145:{index:"145",hex:"0x80000091",symbol:"BCH",name:"Bitcoin Cash"},146:{index:"146",hex:"0x80000092",symbol:"NEBL",name:"Neblio"},147:{index:"147",hex:"0x80000093",symbol:"ZCL",name:"ZClassic"},148:{index:"148",hex:"0x80000094",symbol:"XLM",name:"Stellar Lumens"},149:{index:"149",hex:"0x80000095",symbol:"NLC2",name:"NoLimitCoin2"},150:{index:"150",hex:"0x80000096",symbol:"WHL",name:"WhaleCoin"},151:{index:"151",hex:"0x80000097",symbol:"ERC",name:"EuropeCoin"},152:{index:"152",hex:"0x80000098",symbol:"DMD",name:"Diamond"},153:{index:"153",hex:"0x80000099",symbol:"BTM",name:"Bytom"},154:{index:"154",hex:"0x8000009a",symbol:"BIO",name:"Biocoin"},155:{index:"155",hex:"0x8000009b",symbol:"XWCC",name:"Whitecoin Classic"},156:{index:"156",hex:"0x8000009c",symbol:"BTG",name:"Bitcoin Gold"},157:{index:"157",hex:"0x8000009d",symbol:"BTC2X",name:"Bitcoin 2x"},158:{index:"158",hex:"0x8000009e",symbol:"SSN",name:"SuperSkynet"},159:{index:"159",hex:"0x8000009f",symbol:"TOA",name:"TOACoin"},160:{index:"160",hex:"0x800000a0",symbol:"BTX",name:"Bitcore"},161:{index:"161",hex:"0x800000a1",symbol:"ACC",name:"Adcoin"},162:{index:"162",hex:"0x800000a2",symbol:"BCO",name:"Bridgecoin"},163:{index:"163",hex:"0x800000a3",symbol:"ELLA",name:"Ellaism"},164:{index:"164",hex:"0x800000a4",symbol:"PIRL",name:"Pirl"},165:{index:"165",hex:"0x800000a5",symbol:"XNO",name:"Nano"},166:{index:"166",hex:"0x800000a6",symbol:"VIVO",name:"Vivo"},167:{index:"167",hex:"0x800000a7",symbol:"FRST",name:"Firstcoin"},168:{index:"168",hex:"0x800000a8",symbol:"HNC",name:"Helleniccoin"},169:{index:"169",hex:"0x800000a9",symbol:"BUZZ",name:"BUZZ"},170:{index:"170",hex:"0x800000aa",symbol:"MBRS",name:"Ember"},171:{index:"171",hex:"0x800000ab",symbol:"HC",name:"Hcash"},172:{index:"172",hex:"0x800000ac",symbol:"HTML",name:"HTMLCOIN"},173:{index:"173",hex:"0x800000ad",symbol:"ODN",name:"Obsidian"},174:{index:"174",hex:"0x800000ae",symbol:"ONX",name:"OnixCoin"},175:{index:"175",hex:"0x800000af",symbol:"RVN",name:"Ravencoin"},176:{index:"176",hex:"0x800000b0",symbol:"GBX",name:"GoByte"},177:{index:"177",hex:"0x800000b1",symbol:"BTCZ",name:"BitcoinZ"},178:{index:"178",hex:"0x800000b2",symbol:"POA",name:"Poa"},179:{index:"179",hex:"0x800000b3",symbol:"NYC",name:"NewYorkCoin"},180:{index:"180",hex:"0x800000b4",symbol:"MXT",name:"MarteXcoin"},181:{index:"181",hex:"0x800000b5",symbol:"WC",name:"Wincoin"},182:{index:"182",hex:"0x800000b6",symbol:"MNX",name:"Minexcoin"},183:{index:"183",hex:"0x800000b7",symbol:"BTCP",name:"Bitcoin Private"},184:{index:"184",hex:"0x800000b8",symbol:"MUSIC",name:"Musicoin"},185:{index:"185",hex:"0x800000b9",symbol:"BCA",name:"Bitcoin Atom"},186:{index:"186",hex:"0x800000ba",symbol:"CRAVE",name:"Crave"},187:{index:"187",hex:"0x800000bb",symbol:"STAK",name:"STRAKS"},188:{index:"188",hex:"0x800000bc",symbol:"WBTC",name:"World Bitcoin"},189:{index:"189",hex:"0x800000bd",symbol:"LCH",name:"LiteCash"},190:{index:"190",hex:"0x800000be",symbol:"EXCL",name:"ExclusiveCoin"},191:{index:"191",hex:"0x800000bf",symbol:"",name:"Lynx"},192:{index:"192",hex:"0x800000c0",symbol:"LCC",name:"LitecoinCash"},193:{index:"193",hex:"0x800000c1",symbol:"XFE",name:"Feirm"},194:{index:"194",hex:"0x800000c2",symbol:"EOS",name:"EOS"},195:{index:"195",hex:"0x800000c3",symbol:"TRX",name:"Tron"},196:{index:"196",hex:"0x800000c4",symbol:"KOBO",name:"Kobocoin"},197:{index:"197",hex:"0x800000c5",symbol:"HUSH",name:"HUSH"},198:{index:"198",hex:"0x800000c6",symbol:"BAN",name:"Banano"},199:{index:"199",hex:"0x800000c7",symbol:"ETF",name:"ETF"},200:{index:"200",hex:"0x800000c8",symbol:"OMNI",name:"Omni"},201:{index:"201",hex:"0x800000c9",symbol:"BIFI",name:"BitcoinFile"},202:{index:"202",hex:"0x800000ca",symbol:"UFO",name:"Uniform Fiscal Object"},203:{index:"203",hex:"0x800000cb",symbol:"CNMC",name:"Cryptonodes"},204:{index:"204",hex:"0x800000cc",symbol:"BCN",name:"Bytecoin"},205:{index:"205",hex:"0x800000cd",symbol:"RIN",name:"Ringo"},206:{index:"206",hex:"0x800000ce",symbol:"ATP",name:"Alaya"},207:{index:"207",hex:"0x800000cf",symbol:"EVT",name:"everiToken"},208:{index:"208",hex:"0x800000d0",symbol:"ATN",name:"ATN"},209:{index:"209",hex:"0x800000d1",symbol:"BIS",name:"Bismuth"},210:{index:"210",hex:"0x800000d2",symbol:"NEET",name:"NEETCOIN"},211:{index:"211",hex:"0x800000d3",symbol:"BOPO",name:"BopoChain"},212:{index:"212",hex:"0x800000d4",symbol:"OOT",name:"Utrum"},213:{index:"213",hex:"0x800000d5",symbol:"ALIAS",name:"Alias"},214:{index:"214",hex:"0x800000d6",symbol:"MONK",name:"Monkey Project"},215:{index:"215",hex:"0x800000d7",symbol:"BOXY",name:"BoxyCoin"},216:{index:"216",hex:"0x800000d8",symbol:"FLO",name:"Flo"},217:{index:"217",hex:"0x800000d9",symbol:"MEC",name:"Megacoin"},218:{index:"218",hex:"0x800000da",symbol:"BTDX",name:"BitCloud"},219:{index:"219",hex:"0x800000db",symbol:"XAX",name:"Artax"},220:{index:"220",hex:"0x800000dc",symbol:"ANON",name:"ANON"},221:{index:"221",hex:"0x800000dd",symbol:"LTZ",name:"LitecoinZ"},222:{index:"222",hex:"0x800000de",symbol:"BITG",name:"Bitcoin Green"},223:{index:"223",hex:"0x800000df",symbol:"ICP",name:"Internet Computer (DFINITY)"},224:{index:"224",hex:"0x800000e0",symbol:"SMART",name:"Smartcash"},225:{index:"225",hex:"0x800000e1",symbol:"XUEZ",name:"XUEZ"},226:{index:"226",hex:"0x800000e2",symbol:"HLM",name:"Helium"},227:{index:"227",hex:"0x800000e3",symbol:"WEB",name:"Webchain"},228:{index:"228",hex:"0x800000e4",symbol:"ACM",name:"Actinium"},229:{index:"229",hex:"0x800000e5",symbol:"NOS",name:"NOS Stable Coins"},230:{index:"230",hex:"0x800000e6",symbol:"BITC",name:"BitCash"},231:{index:"231",hex:"0x800000e7",symbol:"HTH",name:"Help The Homeless Coin"},232:{index:"232",hex:"0x800000e8",symbol:"TZC",name:"Trezarcoin"},233:{index:"233",hex:"0x800000e9",symbol:"VAR",name:"Varda"},234:{index:"234",hex:"0x800000ea",symbol:"IOV",name:"IOV"},235:{index:"235",hex:"0x800000eb",symbol:"FIO",name:"FIO"},236:{index:"236",hex:"0x800000ec",symbol:"BSV",name:"BitcoinSV"},237:{index:"237",hex:"0x800000ed",symbol:"DXN",name:"DEXON"},238:{index:"238",hex:"0x800000ee",symbol:"QRL",name:"Quantum Resistant Ledger"},239:{index:"239",hex:"0x800000ef",symbol:"PCX",name:"ChainX"},240:{index:"240",hex:"0x800000f0",symbol:"LOKI",name:"Loki"},241:{index:"241",hex:"0x800000f1",symbol:"",name:"Imagewallet"},242:{index:"242",hex:"0x800000f2",symbol:"NIM",name:"Nimiq"},243:{index:"243",hex:"0x800000f3",symbol:"SOV",name:"Sovereign Coin"},244:{index:"244",hex:"0x800000f4",symbol:"JCT",name:"Jibital Coin"},245:{index:"245",hex:"0x800000f5",symbol:"SLP",name:"Simple Ledger Protocol"},246:{index:"246",hex:"0x800000f6",symbol:"EWT",name:"Energy Web"},247:{index:"247",hex:"0x800000f7",symbol:"UC",name:"Ulord"},248:{index:"248",hex:"0x800000f8",symbol:"EXOS",name:"EXOS"},249:{index:"249",hex:"0x800000f9",symbol:"ECA",name:"Electra"},250:{index:"250",hex:"0x800000fa",symbol:"SOOM",name:"Soom"},251:{index:"251",hex:"0x800000fb",symbol:"XRD",name:"Redstone"},252:{index:"252",hex:"0x800000fc",symbol:"FREE",name:"FreeCoin"},253:{index:"253",hex:"0x800000fd",symbol:"NPW",name:"NewPowerCoin"},254:{index:"254",hex:"0x800000fe",symbol:"BST",name:"BlockStamp"},255:{index:"255",hex:"0x800000ff",symbol:"",name:"SmartHoldem"},256:{index:"256",hex:"0x80000100",symbol:"NANO",name:"Bitcoin Nano"},257:{index:"257",hex:"0x80000101",symbol:"BTCC",name:"Bitcoin Core"},258:{index:"258",hex:"0x80000102",symbol:"",name:"Zen Protocol"},259:{index:"259",hex:"0x80000103",symbol:"ZEST",name:"Zest"},260:{index:"260",hex:"0x80000104",symbol:"ABT",name:"ArcBlock"},261:{index:"261",hex:"0x80000105",symbol:"PION",name:"Pion"},262:{index:"262",hex:"0x80000106",symbol:"DT3",name:"DreamTeam3"},263:{index:"263",hex:"0x80000107",symbol:"ZBUX",name:"Zbux"},264:{index:"264",hex:"0x80000108",symbol:"KPL",name:"Kepler"},265:{index:"265",hex:"0x80000109",symbol:"TPAY",name:"TokenPay"},266:{index:"266",hex:"0x8000010a",symbol:"ZILLA",name:"ChainZilla"},267:{index:"267",hex:"0x8000010b",symbol:"ANK",name:"Anker"},268:{index:"268",hex:"0x8000010c",symbol:"BCC",name:"BCChain"},269:{index:"269",hex:"0x8000010d",symbol:"HPB",name:"HPB"},270:{index:"270",hex:"0x8000010e",symbol:"ONE",name:"ONE"},271:{index:"271",hex:"0x8000010f",symbol:"SBC",name:"SBC"},272:{index:"272",hex:"0x80000110",symbol:"IPC",name:"IPChain"},273:{index:"273",hex:"0x80000111",symbol:"DMTC",name:"Dominantchain"},274:{index:"274",hex:"0x80000112",symbol:"OGC",name:"Onegram"},275:{index:"275",hex:"0x80000113",symbol:"SHIT",name:"Shitcoin"},276:{index:"276",hex:"0x80000114",symbol:"ANDES",name:"Andescoin"},277:{index:"277",hex:"0x80000115",symbol:"AREPA",name:"Arepacoin"},278:{index:"278",hex:"0x80000116",symbol:"BOLI",name:"Bolivarcoin"},279:{index:"279",hex:"0x80000117",symbol:"RIL",name:"Rilcoin"},280:{index:"280",hex:"0x80000118",symbol:"HTR",name:"Hathor Network"},281:{index:"281",hex:"0x80000119",symbol:"ACME",name:"Accumulate"},282:{index:"282",hex:"0x8000011a",symbol:"BRAVO",name:"BRAVO"},283:{index:"283",hex:"0x8000011b",symbol:"ALGO",name:"Algorand"},284:{index:"284",hex:"0x8000011c",symbol:"BZX",name:"Bitcoinzero"},285:{index:"285",hex:"0x8000011d",symbol:"GXX",name:"GravityCoin"},286:{index:"286",hex:"0x8000011e",symbol:"HEAT",name:"HEAT"},287:{index:"287",hex:"0x8000011f",symbol:"XDN",name:"DigitalNote"},288:{index:"288",hex:"0x80000120",symbol:"FSN",name:"FUSION"},289:{index:"289",hex:"0x80000121",symbol:"CPC",name:"Capricoin"},290:{index:"290",hex:"0x80000122",symbol:"BOLD",name:"Bold"},291:{index:"291",hex:"0x80000123",symbol:"IOST",name:"IOST"},292:{index:"292",hex:"0x80000124",symbol:"TKEY",name:"Tkeycoin"},293:{index:"293",hex:"0x80000125",symbol:"USE",name:"Usechain"},294:{index:"294",hex:"0x80000126",symbol:"BCZ",name:"BitcoinCZ"},295:{index:"295",hex:"0x80000127",symbol:"IOC",name:"Iocoin"},296:{index:"296",hex:"0x80000128",symbol:"ASF",name:"Asofe"},297:{index:"297",hex:"0x80000129",symbol:"MASS",name:"MASS"},298:{index:"298",hex:"0x8000012a",symbol:"FAIR",name:"FairCoin"},299:{index:"299",hex:"0x8000012b",symbol:"NUKO",name:"Nekonium"},300:{index:"300",hex:"0x8000012c",symbol:"GNX",name:"Genaro Network"},301:{index:"301",hex:"0x8000012d",symbol:"DIVI",name:"Divi Project"},302:{index:"302",hex:"0x8000012e",symbol:"CMT",name:"Community"},303:{index:"303",hex:"0x8000012f",symbol:"EUNO",name:"EUNO"},304:{index:"304",hex:"0x80000130",symbol:"IOTX",name:"IoTeX"},305:{index:"305",hex:"0x80000131",symbol:"ONION",name:"DeepOnion"},306:{index:"306",hex:"0x80000132",symbol:"8BIT",name:"8Bit"},307:{index:"307",hex:"0x80000133",symbol:"ATC",name:"AToken Coin"},308:{index:"308",hex:"0x80000134",symbol:"BTS",name:"Bitshares"},309:{index:"309",hex:"0x80000135",symbol:"CKB",name:"Nervos CKB"},310:{index:"310",hex:"0x80000136",symbol:"UGAS",name:"Ultrain"},311:{index:"311",hex:"0x80000137",symbol:"ADS",name:"Adshares"},312:{index:"312",hex:"0x80000138",symbol:"ARA",name:"Aura"},313:{index:"313",hex:"0x80000139",symbol:"ZIL",name:"Zilliqa"},314:{index:"314",hex:"0x8000013a",symbol:"MOAC",name:"MOAC"},315:{index:"315",hex:"0x8000013b",symbol:"SWTC",name:"SWTC"},316:{index:"316",hex:"0x8000013c",symbol:"VNSC",name:"vnscoin"},317:{index:"317",hex:"0x8000013d",symbol:"PLUG",name:"Pl^g"},318:{index:"318",hex:"0x8000013e",symbol:"MAN",name:"Matrix AI Network"},319:{index:"319",hex:"0x8000013f",symbol:"ECC",name:"ECCoin"},320:{index:"320",hex:"0x80000140",symbol:"RPD",name:"Rapids"},321:{index:"321",hex:"0x80000141",symbol:"RAP",name:"Rapture"},322:{index:"322",hex:"0x80000142",symbol:"GARD",name:"Hashgard"},323:{index:"323",hex:"0x80000143",symbol:"ZER",name:"Zero"},324:{index:"324",hex:"0x80000144",symbol:"EBST",name:"eBoost"},325:{index:"325",hex:"0x80000145",symbol:"SHARD",name:"Shard"},326:{index:"326",hex:"0x80000146",symbol:"MRX",name:"Metrix Coin"},327:{index:"327",hex:"0x80000147",symbol:"CMM",name:"Commercium"},328:{index:"328",hex:"0x80000148",symbol:"BLOCK",name:"Blocknet"},329:{index:"329",hex:"0x80000149",symbol:"AUDAX",name:"AUDAX"},330:{index:"330",hex:"0x8000014a",symbol:"LUNA",name:"Terra"},331:{index:"331",hex:"0x8000014b",symbol:"ZPM",name:"zPrime"},332:{index:"332",hex:"0x8000014c",symbol:"KUVA",name:"Kuva Utility Note"},333:{index:"333",hex:"0x8000014d",symbol:"MEM",name:"MemCoin"},334:{index:"334",hex:"0x8000014e",symbol:"CS",name:"Credits"},335:{index:"335",hex:"0x8000014f",symbol:"SWIFT",name:"SwiftCash"},336:{index:"336",hex:"0x80000150",symbol:"FIX",name:"FIX"},337:{index:"337",hex:"0x80000151",symbol:"CPC",name:"CPChain"},338:{index:"338",hex:"0x80000152",symbol:"VGO",name:"VirtualGoodsToken"},339:{index:"339",hex:"0x80000153",symbol:"DVT",name:"DeVault"},340:{index:"340",hex:"0x80000154",symbol:"N8V",name:"N8VCoin"},341:{index:"341",hex:"0x80000155",symbol:"MTNS",name:"OmotenashiCoin"},342:{index:"342",hex:"0x80000156",symbol:"BLAST",name:"BLAST"},343:{index:"343",hex:"0x80000157",symbol:"DCT",name:"DECENT"},344:{index:"344",hex:"0x80000158",symbol:"AUX",name:"Auxilium"},345:{index:"345",hex:"0x80000159",symbol:"USDP",name:"USDP"},346:{index:"346",hex:"0x8000015a",symbol:"HTDF",name:"HTDF"},347:{index:"347",hex:"0x8000015b",symbol:"YEC",name:"Ycash"},348:{index:"348",hex:"0x8000015c",symbol:"QLC",name:"QLC Chain"},349:{index:"349",hex:"0x8000015d",symbol:"TEA",name:"Icetea Blockchain"},350:{index:"350",hex:"0x8000015e",symbol:"ARW",name:"ArrowChain"},351:{index:"351",hex:"0x8000015f",symbol:"MDM",name:"Medium"},352:{index:"352",hex:"0x80000160",symbol:"CYB",name:"Cybex"},353:{index:"353",hex:"0x80000161",symbol:"LTO",name:"LTO Network"},354:{index:"354",hex:"0x80000162",symbol:"DOT",name:"Polkadot"},355:{index:"355",hex:"0x80000163",symbol:"AEON",name:"Aeon"},356:{index:"356",hex:"0x80000164",symbol:"RES",name:"Resistance"},357:{index:"357",hex:"0x80000165",symbol:"AYA",name:"Aryacoin"},358:{index:"358",hex:"0x80000166",symbol:"DAPS",name:"Dapscoin"},359:{index:"359",hex:"0x80000167",symbol:"CSC",name:"CasinoCoin"},360:{index:"360",hex:"0x80000168",symbol:"VSYS",name:"V Systems"},361:{index:"361",hex:"0x80000169",symbol:"NOLLAR",name:"Nollar"},362:{index:"362",hex:"0x8000016a",symbol:"XNOS",name:"NOS"},363:{index:"363",hex:"0x8000016b",symbol:"CPU",name:"CPUchain"},364:{index:"364",hex:"0x8000016c",symbol:"LAMB",name:"Lambda Storage Chain"},365:{index:"365",hex:"0x8000016d",symbol:"VCT",name:"ValueCyber"},366:{index:"366",hex:"0x8000016e",symbol:"CZR",name:"Canonchain"},367:{index:"367",hex:"0x8000016f",symbol:"ABBC",name:"ABBC"},368:{index:"368",hex:"0x80000170",symbol:"HET",name:"HET"},369:{index:"369",hex:"0x80000171",symbol:"XAS",name:"Asch"},370:{index:"370",hex:"0x80000172",symbol:"VDL",name:"Vidulum"},371:{index:"371",hex:"0x80000173",symbol:"MED",name:"MediBloc"},372:{index:"372",hex:"0x80000174",symbol:"ZVC",name:"ZVChain"},373:{index:"373",hex:"0x80000175",symbol:"VESTX",name:"Vestx"},374:{index:"374",hex:"0x80000176",symbol:"DBT",name:"DarkBit"},375:{index:"375",hex:"0x80000177",symbol:"SEOS",name:"SuperEOS"},376:{index:"376",hex:"0x80000178",symbol:"MXW",name:"Maxonrow"},377:{index:"377",hex:"0x80000179",symbol:"ZNZ",name:"ZENZO"},378:{index:"378",hex:"0x8000017a",symbol:"XCX",name:"XChain"},379:{index:"379",hex:"0x8000017b",symbol:"SOX",name:"SonicX"},380:{index:"380",hex:"0x8000017c",symbol:"NYZO",name:"Nyzo"},381:{index:"381",hex:"0x8000017d",symbol:"ULC",name:"ULCoin"},382:{index:"382",hex:"0x8000017e",symbol:"RYO",name:"Ryo Currency"},383:{index:"383",hex:"0x8000017f",symbol:"KAL",name:"Kaleidochain"},384:{index:"384",hex:"0x80000180",symbol:"XSN",name:"Stakenet"},385:{index:"385",hex:"0x80000181",symbol:"DOGEC",name:"DogeCash"},386:{index:"386",hex:"0x80000182",symbol:"BMV",name:"Bitcoin Matteo's Vision"},387:{index:"387",hex:"0x80000183",symbol:"QBC",name:"Quebecoin"},388:{index:"388",hex:"0x80000184",symbol:"IMG",name:"ImageCoin"},389:{index:"389",hex:"0x80000185",symbol:"QOS",name:"QOS"},390:{index:"390",hex:"0x80000186",symbol:"PKT",name:"PKT"},391:{index:"391",hex:"0x80000187",symbol:"LHD",name:"LitecoinHD"},392:{index:"392",hex:"0x80000188",symbol:"CENNZ",name:"CENNZnet"},393:{index:"393",hex:"0x80000189",symbol:"HSN",name:"Hyper Speed Network"},394:{index:"394",hex:"0x8000018a",symbol:"CRO",name:"Crypto Chain"},395:{index:"395",hex:"0x8000018b",symbol:"UMBRU",name:"Umbru"},396:{index:"396",hex:"0x8000018c",symbol:"EVER",name:"Everscale"},397:{index:"397",hex:"0x8000018d",symbol:"NEAR",name:"NEAR Protocol"},398:{index:"398",hex:"0x8000018e",symbol:"XPC",name:"XPChain"},399:{index:"399",hex:"0x8000018f",symbol:"ZOC",name:"01coin"},400:{index:"400",hex:"0x80000190",symbol:"NIX",name:"NIX"},401:{index:"401",hex:"0x80000191",symbol:"UC",name:"Utopiacoin"},402:{index:"402",hex:"0x80000192",symbol:"GALI",name:"Galilel"},403:{index:"403",hex:"0x80000193",symbol:"OLT",name:"Oneledger"},404:{index:"404",hex:"0x80000194",symbol:"XBI",name:"XBI"},405:{index:"405",hex:"0x80000195",symbol:"DONU",name:"DONU"},406:{index:"406",hex:"0x80000196",symbol:"EARTHS",name:"Earths"},407:{index:"407",hex:"0x80000197",symbol:"HDD",name:"HDDCash"},408:{index:"408",hex:"0x80000198",symbol:"SUGAR",name:"Sugarchain"},409:{index:"409",hex:"0x80000199",symbol:"AILE",name:"AileCoin"},410:{index:"410",hex:"0x8000019a",symbol:"TENT",name:"TENT"},411:{index:"411",hex:"0x8000019b",symbol:"TAN",name:"Tangerine Network"},412:{index:"412",hex:"0x8000019c",symbol:"AIN",name:"AIN"},413:{index:"413",hex:"0x8000019d",symbol:"MSR",name:"Masari"},414:{index:"414",hex:"0x8000019e",symbol:"SUMO",name:"Sumokoin"},415:{index:"415",hex:"0x8000019f",symbol:"ETN",name:"Electroneum"},416:{index:"416",hex:"0x800001a0",symbol:"BYTZ",name:"BYTZ"},417:{index:"417",hex:"0x800001a1",symbol:"WOW",name:"Wownero"},418:{index:"418",hex:"0x800001a2",symbol:"XTNC",name:"XtendCash"},419:{index:"419",hex:"0x800001a3",symbol:"LTHN",name:"Lethean"},420:{index:"420",hex:"0x800001a4",symbol:"NODE",name:"NodeHost"},421:{index:"421",hex:"0x800001a5",symbol:"AGM",name:"Argoneum"},422:{index:"422",hex:"0x800001a6",symbol:"CCX",name:"Conceal Network"},423:{index:"423",hex:"0x800001a7",symbol:"TNET",name:"Title Network"},424:{index:"424",hex:"0x800001a8",symbol:"TELOS",name:"TelosCoin"},425:{index:"425",hex:"0x800001a9",symbol:"AION",name:"Aion"},426:{index:"426",hex:"0x800001aa",symbol:"BC",name:"Bitcoin Confidential"},427:{index:"427",hex:"0x800001ab",symbol:"KTV",name:"KmushiCoin"},428:{index:"428",hex:"0x800001ac",symbol:"ZCR",name:"ZCore"},429:{index:"429",hex:"0x800001ad",symbol:"ERG",name:"Ergo"},430:{index:"430",hex:"0x800001ae",symbol:"PESO",name:"Criptopeso"},431:{index:"431",hex:"0x800001af",symbol:"BTC2",name:"Bitcoin 2"},432:{index:"432",hex:"0x800001b0",symbol:"XRPHD",name:"XRPHD"},433:{index:"433",hex:"0x800001b1",symbol:"WE",name:"WE Coin"},434:{index:"434",hex:"0x800001b2",symbol:"KSM",name:"Kusama"},435:{index:"435",hex:"0x800001b3",symbol:"PCN",name:"Peepcoin"},436:{index:"436",hex:"0x800001b4",symbol:"NCH",name:"NetCloth"},437:{index:"437",hex:"0x800001b5",symbol:"ICU",name:"CHIPO"},438:{index:"438",hex:"0x800001b6",symbol:"FNSA",name:"FINSCHIA"},439:{index:"439",hex:"0x800001b7",symbol:"DTP",name:"DeVault Token Protocol"},440:{index:"440",hex:"0x800001b8",symbol:"BTCR",name:"Bitcoin Royale"},441:{index:"441",hex:"0x800001b9",symbol:"AERGO",name:"AERGO"},442:{index:"442",hex:"0x800001ba",symbol:"XTH",name:"Dothereum"},443:{index:"443",hex:"0x800001bb",symbol:"LV",name:"Lava"},444:{index:"444",hex:"0x800001bc",symbol:"PHR",name:"Phore"},445:{index:"445",hex:"0x800001bd",symbol:"VITAE",name:"Vitae"},446:{index:"446",hex:"0x800001be",symbol:"COCOS",name:"Cocos-BCX"},447:{index:"447",hex:"0x800001bf",symbol:"DIN",name:"Dinero"},448:{index:"448",hex:"0x800001c0",symbol:"SPL",name:"Simplicity"},449:{index:"449",hex:"0x800001c1",symbol:"YCE",name:"MYCE"},450:{index:"450",hex:"0x800001c2",symbol:"XLR",name:"Solaris"},451:{index:"451",hex:"0x800001c3",symbol:"KTS",name:"Klimatas"},452:{index:"452",hex:"0x800001c4",symbol:"DGLD",name:"DGLD"},453:{index:"453",hex:"0x800001c5",symbol:"XNS",name:"Insolar"},454:{index:"454",hex:"0x800001c6",symbol:"EM",name:"EMPOW"},455:{index:"455",hex:"0x800001c7",symbol:"SHN",name:"ShineBlocks"},456:{index:"456",hex:"0x800001c8",symbol:"SEELE",name:"Seele"},457:{index:"457",hex:"0x800001c9",symbol:"AE",name:"æternity"},458:{index:"458",hex:"0x800001ca",symbol:"ODX",name:"ObsidianX"},459:{index:"459",hex:"0x800001cb",symbol:"KAVA",name:"Kava"},460:{index:"460",hex:"0x800001cc",symbol:"GLEEC",name:"GLEEC"},461:{index:"461",hex:"0x800001cd",symbol:"FIL",name:"Filecoin"},462:{index:"462",hex:"0x800001ce",symbol:"RUTA",name:"Rutanio"},463:{index:"463",hex:"0x800001cf",symbol:"CSDT",name:"CSDT"},464:{index:"464",hex:"0x800001d0",symbol:"ETI",name:"EtherInc"},465:{index:"465",hex:"0x800001d1",symbol:"ZSLP",name:"Zclassic Simple Ledger Protocol"},466:{index:"466",hex:"0x800001d2",symbol:"ERE",name:"EtherCore"},467:{index:"467",hex:"0x800001d3",symbol:"DX",name:"DxChain Token"},468:{index:"468",hex:"0x800001d4",symbol:"CPS",name:"Capricoin+"},469:{index:"469",hex:"0x800001d5",symbol:"BTH",name:"Bithereum"},470:{index:"470",hex:"0x800001d6",symbol:"MESG",name:"MESG"},471:{index:"471",hex:"0x800001d7",symbol:"FIMK",name:"FIMK"},472:{index:"472",hex:"0x800001d8",symbol:"AR",name:"Arweave"},473:{index:"473",hex:"0x800001d9",symbol:"OGO",name:"Origo"},474:{index:"474",hex:"0x800001da",symbol:"ROSE",name:"Oasis Network"},475:{index:"475",hex:"0x800001db",symbol:"BARE",name:"BARE Network"},476:{index:"476",hex:"0x800001dc",symbol:"GLEEC",name:"GleecBTC"},477:{index:"477",hex:"0x800001dd",symbol:"CLR",name:"Color Coin"},478:{index:"478",hex:"0x800001de",symbol:"RNG",name:"Ring"},479:{index:"479",hex:"0x800001df",symbol:"OLO",name:"Tool Global"},480:{index:"480",hex:"0x800001e0",symbol:"PEXA",name:"Pexa"},481:{index:"481",hex:"0x800001e1",symbol:"MOON",name:"Mooncoin"},482:{index:"482",hex:"0x800001e2",symbol:"OCEAN",name:"Ocean Protocol"},483:{index:"483",hex:"0x800001e3",symbol:"BNT",name:"Bluzelle Native"},484:{index:"484",hex:"0x800001e4",symbol:"AMO",name:"AMO Blockchain"},485:{index:"485",hex:"0x800001e5",symbol:"FCH",name:"FreeCash"},486:{index:"486",hex:"0x800001e6",symbol:"LAT",name:"PlatON"},487:{index:"487",hex:"0x800001e7",symbol:"COIN",name:"Bitcoin Bank"},488:{index:"488",hex:"0x800001e8",symbol:"VEO",name:"Amoveo"},489:{index:"489",hex:"0x800001e9",symbol:"CCA",name:"Counos Coin"},490:{index:"490",hex:"0x800001ea",symbol:"GFN",name:"Graphene"},491:{index:"491",hex:"0x800001eb",symbol:"BIP",name:"Minter Network"},492:{index:"492",hex:"0x800001ec",symbol:"KPG",name:"Kunpeng Network"},493:{index:"493",hex:"0x800001ed",symbol:"FIN",name:"FINL Chain"},494:{index:"494",hex:"0x800001ee",symbol:"BAND",name:"Band"},495:{index:"495",hex:"0x800001ef",symbol:"DROP",name:"Dropil"},496:{index:"496",hex:"0x800001f0",symbol:"BHT",name:"Bluehelix Chain"},497:{index:"497",hex:"0x800001f1",symbol:"LYRA",name:"Scrypta"},498:{index:"498",hex:"0x800001f2",symbol:"CS",name:"Credits"},499:{index:"499",hex:"0x800001f3",symbol:"RUPX",name:"Rupaya"},500:{index:"500",hex:"0x800001f4",symbol:"THETA",name:"Theta"},501:{index:"501",hex:"0x800001f5",symbol:"SOL",name:"Solana"},502:{index:"502",hex:"0x800001f6",symbol:"THT",name:"ThoughtAI"},503:{index:"503",hex:"0x800001f7",symbol:"CFX",name:"Conflux"},504:{index:"504",hex:"0x800001f8",symbol:"KUMA",name:"Kumacoin"},505:{index:"505",hex:"0x800001f9",symbol:"HASH",name:"Provenance"},506:{index:"506",hex:"0x800001fa",symbol:"CSPR",name:"Casper"},507:{index:"507",hex:"0x800001fb",symbol:"EARTH",name:"EARTH"},508:{index:"508",hex:"0x800001fc",symbol:"EGLD",name:"MultiversX"},509:{index:"509",hex:"0x800001fd",symbol:"CHI",name:"Xaya"},510:{index:"510",hex:"0x800001fe",symbol:"KOTO",name:"Koto"},511:{index:"511",hex:"0x800001ff",symbol:"OTC",name:"θ"},512:{index:"512",hex:"0x80000200",symbol:"RXD",name:"Radiant"},513:{index:"513",hex:"0x80000201",symbol:"SEELEN",name:"Seele-N"},514:{index:"514",hex:"0x80000202",symbol:"AETH",name:"AETH"},515:{index:"515",hex:"0x80000203",symbol:"DNA",name:"Idena"},516:{index:"516",hex:"0x80000204",symbol:"VEE",name:"Virtual Economy Era"},517:{index:"517",hex:"0x80000205",symbol:"SIERRA",name:"SierraCoin"},518:{index:"518",hex:"0x80000206",symbol:"LET",name:"Linkeye"},519:{index:"519",hex:"0x80000207",symbol:"BSC",name:"Bitcoin Smart Contract"},520:{index:"520",hex:"0x80000208",symbol:"BTCV",name:"BitcoinVIP"},521:{index:"521",hex:"0x80000209",symbol:"ABA",name:"Dabacus"},522:{index:"522",hex:"0x8000020a",symbol:"SCC",name:"StakeCubeCoin"},523:{index:"523",hex:"0x8000020b",symbol:"EDG",name:"Edgeware"},524:{index:"524",hex:"0x8000020c",symbol:"AMS",name:"AmsterdamCoin"},525:{index:"525",hex:"0x8000020d",symbol:"GOSS",name:"GOSSIP Coin"},526:{index:"526",hex:"0x8000020e",symbol:"BU",name:"BUMO"},527:{index:"527",hex:"0x8000020f",symbol:"GRAM",name:"GRAM"},528:{index:"528",hex:"0x80000210",symbol:"YAP",name:"Yapstone"},529:{index:"529",hex:"0x80000211",symbol:"SCRT",name:"Secret Network"},530:{index:"530",hex:"0x80000212",symbol:"NOVO",name:"Novo"},531:{index:"531",hex:"0x80000213",symbol:"GHOST",name:"Ghost"},532:{index:"532",hex:"0x80000214",symbol:"HST",name:"HST"},533:{index:"533",hex:"0x80000215",symbol:"PRJ",name:"ProjectCoin"},534:{index:"534",hex:"0x80000216",symbol:"YOU",name:"YOUChain"},535:{index:"535",hex:"0x80000217",symbol:"XHV",name:"Haven Protocol"},536:{index:"536",hex:"0x80000218",symbol:"BYND",name:"Beyondcoin"},537:{index:"537",hex:"0x80000219",symbol:"JOYS",name:"Joys Digital"},538:{index:"538",hex:"0x8000021a",symbol:"VAL",name:"Valorbit"},539:{index:"539",hex:"0x8000021b",symbol:"FLOW",name:"Flow"},540:{index:"540",hex:"0x8000021c",symbol:"SMESH",name:"Spacemesh Coin"},541:{index:"541",hex:"0x8000021d",symbol:"SCDO",name:"SCDO"},542:{index:"542",hex:"0x8000021e",symbol:"IQS",name:"IQ-Cash"},543:{index:"543",hex:"0x8000021f",symbol:"BIND",name:"Compendia"},544:{index:"544",hex:"0x80000220",symbol:"COINEVO",name:"Coinevo"},545:{index:"545",hex:"0x80000221",symbol:"SCRIBE",name:"Scribe"},546:{index:"546",hex:"0x80000222",symbol:"HYN",name:"Hyperion"},547:{index:"547",hex:"0x80000223",symbol:"BHP",name:"BHP"},548:{index:"548",hex:"0x80000224",symbol:"BBC",name:"BigBang Core"},549:{index:"549",hex:"0x80000225",symbol:"MKF",name:"MarketFinance"},550:{index:"550",hex:"0x80000226",symbol:"XDC",name:"XinFin"},551:{index:"551",hex:"0x80000227",symbol:"STR",name:"Straightedge"},552:{index:"552",hex:"0x80000228",symbol:"SUM",name:"Sumcoin"},553:{index:"553",hex:"0x80000229",symbol:"HBC",name:"HuobiChain"},555:{index:"555",hex:"0x8000022b",symbol:"BCS",name:"Bitcoin Smart"},556:{index:"556",hex:"0x8000022c",symbol:"KTS",name:"Kratos"},557:{index:"557",hex:"0x8000022d",symbol:"LKR",name:"Lkrcoin"},558:{index:"558",hex:"0x8000022e",symbol:"TAO",name:"Tao"},559:{index:"559",hex:"0x8000022f",symbol:"XWC",name:"Whitecoin"},560:{index:"560",hex:"0x80000230",symbol:"DEAL",name:"DEAL"},561:{index:"561",hex:"0x80000231",symbol:"NTY",name:"Nexty"},562:{index:"562",hex:"0x80000232",symbol:"TOP",name:"TOP NetWork"},564:{index:"564",hex:"0x80000234",symbol:"AG",name:"Agoric"},565:{index:"565",hex:"0x80000235",symbol:"CICO",name:"Coinicles"},566:{index:"566",hex:"0x80000236",symbol:"IRIS",name:"Irisnet"},567:{index:"567",hex:"0x80000237",symbol:"NCG",name:"Nine Chronicles"},568:{index:"568",hex:"0x80000238",symbol:"LRG",name:"Large Coin"},569:{index:"569",hex:"0x80000239",symbol:"SERO",name:"Super Zero Protocol"},570:{index:"570",hex:"0x8000023a",symbol:"BDX",name:"Beldex"},571:{index:"571",hex:"0x8000023b",symbol:"CCXX",name:"Counos X"},572:{index:"572",hex:"0x8000023c",symbol:"SLS",name:"Saluscoin"},573:{index:"573",hex:"0x8000023d",symbol:"SRM",name:"Serum"},575:{index:"575",hex:"0x8000023f",symbol:"VIVT",name:"VIDT Datalink"},576:{index:"576",hex:"0x80000240",symbol:"BPS",name:"BitcoinPoS"},577:{index:"577",hex:"0x80000241",symbol:"NKN",name:"NKN"},578:{index:"578",hex:"0x80000242",symbol:"ICL",name:"ILCOIN"},579:{index:"579",hex:"0x80000243",symbol:"BONO",name:"Bonorum"},580:{index:"580",hex:"0x80000244",symbol:"PLC",name:"PLATINCOIN"},581:{index:"581",hex:"0x80000245",symbol:"DUN",name:"Dune"},582:{index:"582",hex:"0x80000246",symbol:"DMCH",name:"Darmacash"},583:{index:"583",hex:"0x80000247",symbol:"CTC",name:"Creditcoin"},584:{index:"584",hex:"0x80000248",symbol:"KELP",name:"Haidai Network"},585:{index:"585",hex:"0x80000249",symbol:"GBCR",name:"GoldBCR"},586:{index:"586",hex:"0x8000024a",symbol:"XDAG",name:"XDAG"},587:{index:"587",hex:"0x8000024b",symbol:"PRV",name:"Incognito Privacy"},588:{index:"588",hex:"0x8000024c",symbol:"SCAP",name:"SafeCapital"},589:{index:"589",hex:"0x8000024d",symbol:"TFUEL",name:"Theta Fuel"},590:{index:"590",hex:"0x8000024e",symbol:"GTM",name:"Gentarium"},591:{index:"591",hex:"0x8000024f",symbol:"RNL",name:"RentalChain"},592:{index:"592",hex:"0x80000250",symbol:"GRIN",name:"Grin"},593:{index:"593",hex:"0x80000251",symbol:"MWC",name:"MimbleWimbleCoin"},594:{index:"594",hex:"0x80000252",symbol:"DOCK",name:"Dock"},595:{index:"595",hex:"0x80000253",symbol:"POLYX",name:"Polymesh"},596:{index:"596",hex:"0x80000254",symbol:"DIVER",name:"Divergenti"},597:{index:"597",hex:"0x80000255",symbol:"XEP",name:"Electra Protocol"},598:{index:"598",hex:"0x80000256",symbol:"APN",name:"Apron"},599:{index:"599",hex:"0x80000257",symbol:"TFC",name:"Turbo File Coin"},600:{index:"600",hex:"0x80000258",symbol:"UTE",name:"Unit-e"},601:{index:"601",hex:"0x80000259",symbol:"MTC",name:"Metacoin"},602:{index:"602",hex:"0x8000025a",symbol:"NC",name:"NobodyCash"},603:{index:"603",hex:"0x8000025b",symbol:"XINY",name:"Xinyuehu"},604:{index:"604",hex:"0x8000025c",symbol:"DYN",name:"Dynamo"},605:{index:"605",hex:"0x8000025d",symbol:"BUFS",name:"Buffer"},606:{index:"606",hex:"0x8000025e",symbol:"STOS",name:"Stratos"},607:{index:"607",hex:"0x8000025f",symbol:"TON",name:"TON"},608:{index:"608",hex:"0x80000260",symbol:"TAFT",name:"TAFT"},609:{index:"609",hex:"0x80000261",symbol:"HYDRA",name:"HYDRA"},610:{index:"610",hex:"0x80000262",symbol:"NOR",name:"Noir"},611:{index:"611",hex:"0x80000263",symbol:"",name:"Manta Network Private Asset"},612:{index:"612",hex:"0x80000264",symbol:"",name:"Calamari Network Private Asset"},613:{index:"613",hex:"0x80000265",symbol:"WCN",name:"Widecoin"},614:{index:"614",hex:"0x80000266",symbol:"OPT",name:"Optimistic Ethereum"},615:{index:"615",hex:"0x80000267",symbol:"PSWAP",name:"PolkaSwap"},616:{index:"616",hex:"0x80000268",symbol:"VAL",name:"Validator"},617:{index:"617",hex:"0x80000269",symbol:"XOR",name:"Sora"},618:{index:"618",hex:"0x8000026a",symbol:"SSP",name:"SmartShare"},619:{index:"619",hex:"0x8000026b",symbol:"DEI",name:"DeimosX"},621:{index:"621",hex:"0x8000026d",symbol:"ZERO",name:"Singularity"},622:{index:"622",hex:"0x8000026e",symbol:"ALPHA",name:"AlphaDAO"},623:{index:"623",hex:"0x8000026f",symbol:"BDECO",name:"BDCashProtocol Ecosystem"},624:{index:"624",hex:"0x80000270",symbol:"NOBL",name:"Nobility"},625:{index:"625",hex:"0x80000271",symbol:"EAST",name:"Eastcoin"},626:{index:"626",hex:"0x80000272",symbol:"KDA",name:"Kadena"},627:{index:"627",hex:"0x80000273",symbol:"SOUL",name:"Phantasma"},628:{index:"628",hex:"0x80000274",symbol:"LORE",name:"Gitopia"},629:{index:"629",hex:"0x80000275",symbol:"FNR",name:"Fincor"},630:{index:"630",hex:"0x80000276",symbol:"NEXUS",name:"Nexus"},631:{index:"631",hex:"0x80000277",symbol:"QTZ",name:"Quartz"},632:{index:"632",hex:"0x80000278",symbol:"MAS",name:"Massa"},633:{index:"633",hex:"0x80000279",symbol:"CALL",name:"Callchain"},634:{index:"634",hex:"0x8000027a",symbol:"VAL",name:"Validity"},635:{index:"635",hex:"0x8000027b",symbol:"POKT",name:"Pocket Network"},636:{index:"636",hex:"0x8000027c",symbol:"EMIT",name:"EMIT"},637:{index:"637",hex:"0x8000027d",symbol:"APTOS",name:"Aptos"},638:{index:"638",hex:"0x8000027e",symbol:"ADON",name:"ADON"},639:{index:"639",hex:"0x8000027f",symbol:"BTSG",name:"BitSong"},640:{index:"640",hex:"0x80000280",symbol:"LFC",name:"Leofcoin"},641:{index:"641",hex:"0x80000281",symbol:"KCS",name:"KuCoin Shares"},642:{index:"642",hex:"0x80000282",symbol:"KCC",name:"KuCoin Community Chain"},643:{index:"643",hex:"0x80000283",symbol:"AZERO",name:"Aleph Zero"},644:{index:"644",hex:"0x80000284",symbol:"TREE",name:"Tree"},645:{index:"645",hex:"0x80000285",symbol:"LX",name:"Lynx"},646:{index:"646",hex:"0x80000286",symbol:"XLN",name:"Lunarium"},647:{index:"647",hex:"0x80000287",symbol:"CIC",name:"CIC Chain"},648:{index:"648",hex:"0x80000288",symbol:"ZRB",name:"Zarb"},650:{index:"650",hex:"0x8000028a",symbol:"UCO",name:"Archethic"},651:{index:"651",hex:"0x8000028b",symbol:"SFX",name:"Safex Cash"},652:{index:"652",hex:"0x8000028c",symbol:"SFT",name:"Safex Token"},653:{index:"653",hex:"0x8000028d",symbol:"WSFX",name:"Wrapped Safex Cash"},654:{index:"654",hex:"0x8000028e",symbol:"USDG",name:"US Digital Gold"},655:{index:"655",hex:"0x8000028f",symbol:"WMP",name:"WAMP"},656:{index:"656",hex:"0x80000290",symbol:"EKTA",name:"Ekta"},657:{index:"657",hex:"0x80000291",symbol:"YDA",name:"YadaCoin"},658:{index:"658",hex:"0x80000292",symbol:"WHIVE",name:"Whive"},659:{index:"659",hex:"0x80000293",symbol:"KOIN",name:"Koinos"},660:{index:"660",hex:"0x80000294",symbol:"PIRATE",name:"PirateCash"},661:{index:"661",hex:"0x80000295",symbol:"UNQ",name:"Unique"},662:{index:"662",hex:"0x80000296",symbol:"ULM",name:"UltonSmartchain"},663:{index:"663",hex:"0x80000297",symbol:"SFRX",name:"EtherGem Sapphire"},664:{index:"664",hex:"0x80000298",symbol:"BSTY",name:"GlobalBoost-Y"},665:{index:"665",hex:"0x80000299",symbol:"IMP",name:"Impact Protocol"},666:{index:"666",hex:"0x8000029a",symbol:"ACT",name:"Achain"},667:{index:"667",hex:"0x8000029b",symbol:"PRKL",name:"Perkle"},668:{index:"668",hex:"0x8000029c",symbol:"SSC",name:"SelfSell"},669:{index:"669",hex:"0x8000029d",symbol:"GC",name:"GateChain"},670:{index:"670",hex:"0x8000029e",symbol:"PLGR",name:"Pledger"},671:{index:"671",hex:"0x8000029f",symbol:"MPLGR",name:"Pledger"},672:{index:"672",hex:"0x800002a0",symbol:"KNOX",name:"Knox"},673:{index:"673",hex:"0x800002a1",symbol:"ZED",name:"ZED"},674:{index:"674",hex:"0x800002a2",symbol:"CNDL",name:"Candle"},675:{index:"675",hex:"0x800002a3",symbol:"WLKR",name:"Walker Crypto Innovation Index"},676:{index:"676",hex:"0x800002a4",symbol:"WLKRR",name:"Walker"},677:{index:"677",hex:"0x800002a5",symbol:"YUNGE",name:"Yunge"},678:{index:"678",hex:"0x800002a6",symbol:"Voken",name:"Voken"},679:{index:"679",hex:"0x800002a7",symbol:"APL",name:"Apollo"},680:{index:"680",hex:"0x800002a8",symbol:"Evrynet",name:"Evrynet"},681:{index:"681",hex:"0x800002a9",symbol:"NENG",name:"Nengcoin"},682:{index:"682",hex:"0x800002aa",symbol:"CHTA",name:"Cheetahcoin"},683:{index:"683",hex:"0x800002ab",symbol:"ALEO",name:"Aleo Network"},684:{index:"684",hex:"0x800002ac",symbol:"HMS",name:"Hemis"},685:{index:"685",hex:"0x800002ad",symbol:"OAS",name:"Oasys"},686:{index:"686",hex:"0x800002ae",symbol:"KAR",name:"Karura Network"},687:{index:"687",hex:"0x800002af",symbol:"FLON",name:"FullOn Network"},688:{index:"688",hex:"0x800002b0",symbol:"CET",name:"CoinEx Chain"},689:{index:"689",hex:"0x800002b1",symbol:"XLINK",name:"XLink Chain"},690:{index:"690",hex:"0x800002b2",symbol:"KLV",name:"KleverChain"},694:{index:"694",hex:"0x800002b6",symbol:"VTBC",name:"VTB Community"},696:{index:"696",hex:"0x800002b8",symbol:"LUM",name:"Lumos"},698:{index:"698",hex:"0x800002ba",symbol:"VEIL",name:"Veil"},699:{index:"699",hex:"0x800002bb",symbol:"GTB",name:"GotaBit"},700:{index:"700",hex:"0x800002bc",symbol:"XDAI",name:"xDai"},701:{index:"701",hex:"0x800002bd",symbol:"COM",name:"Commercio"},702:{index:"702",hex:"0x800002be",symbol:"CCC",name:"Commercio Cash Credit"},703:{index:"703",hex:"0x800002bf",symbol:"SNR",name:"Sonr"},704:{index:"704",hex:"0x800002c0",symbol:"RAQ",name:"Ra Quantum"},705:{index:"705",hex:"0x800002c1",symbol:"PEG",name:"Pegasus Token"},706:{index:"706",hex:"0x800002c2",symbol:"LKG",name:"Lionking"},707:{index:"707",hex:"0x800002c3",symbol:"MCOIN",name:"Moneta Coin"},709:{index:"709",hex:"0x800002c5",symbol:"AVAIL",name:"Avail"},710:{index:"710",hex:"0x800002c6",symbol:"FURY",name:"Highbury"},711:{index:"711",hex:"0x800002c7",symbol:"CHC",name:"Chaincoin"},712:{index:"712",hex:"0x800002c8",symbol:"SERF",name:"Serfnet"},713:{index:"713",hex:"0x800002c9",symbol:"XTL",name:"Katal Chain"},714:{index:"714",hex:"0x800002ca",symbol:"BNB",name:"Binance"},715:{index:"715",hex:"0x800002cb",symbol:"SIN",name:"Sinovate"},716:{index:"716",hex:"0x800002cc",symbol:"DLN",name:"Delion"},717:{index:"717",hex:"0x800002cd",symbol:"BONTE",name:"Bontecoin"},718:{index:"718",hex:"0x800002ce",symbol:"PEER",name:"Peer"},719:{index:"719",hex:"0x800002cf",symbol:"ZET",name:"Zetacoin"},720:{index:"720",hex:"0x800002d0",symbol:"ABY",name:"Artbyte"},721:{index:"721",hex:"0x800002d1",symbol:"PGX",name:"Mirai Chain"},722:{index:"722",hex:"0x800002d2",symbol:"IL8P",name:"InfiniLooP"},723:{index:"723",hex:"0x800002d3",symbol:"VOI",name:"Voi"},724:{index:"724",hex:"0x800002d4",symbol:"XVC",name:"Vanillacash"},725:{index:"725",hex:"0x800002d5",symbol:"MCX",name:"MultiCash"},727:{index:"727",hex:"0x800002d7",symbol:"BLU",name:"BluCrates"},728:{index:"728",hex:"0x800002d8",symbol:"BFC",name:"BFC"},730:{index:"730",hex:"0x800002da",symbol:"HEALIOS",name:"Tenacity"},731:{index:"731",hex:"0x800002db",symbol:"BMK",name:"Bitmark"},734:{index:"734",hex:"0x800002de",symbol:"DENTX",name:"DENTNet"},737:{index:"737",hex:"0x800002e1",symbol:"ATOP",name:"Financial Blockchain"},738:{index:"738",hex:"0x800002e2",symbol:"BTE",name:"Bitweb"},739:{index:"739",hex:"0x800002e3",symbol:"DPC",name:"Dpowcoin (DualPowCoin)"},747:{index:"747",hex:"0x800002eb",symbol:"CFG",name:"Centrifuge"},750:{index:"750",hex:"0x800002ee",symbol:"XPRT",name:"Persistence"},753:{index:"753",hex:"0x800002f1",symbol:"",name:"Age X25519 Encryption"},754:{index:"754",hex:"0x800002f2",symbol:"",name:"Age NIST Encryption"},757:{index:"757",hex:"0x800002f5",symbol:"HONEY",name:"HoneyWood"},765:{index:"765",hex:"0x800002fd",symbol:"TGN",name:"Tagion"},768:{index:"768",hex:"0x80000300",symbol:"BALLZ",name:"Ballzcoin"},770:{index:"770",hex:"0x80000302",symbol:"COSA",name:"Cosanta"},771:{index:"771",hex:"0x80000303",symbol:"BR",name:"BR"},773:{index:"773",hex:"0x80000305",symbol:"CSB",name:"CosmoBliss"},775:{index:"775",hex:"0x80000307",symbol:"PLSR",name:"Pulsar Coin"},776:{index:"776",hex:"0x80000308",symbol:"KEY",name:"Keymaker Coin"},777:{index:"777",hex:"0x80000309",symbol:"BTW",name:"Bitcoin World"},780:{index:"780",hex:"0x8000030c",symbol:"PLCUC",name:"PLC Ultima Classic"},781:{index:"781",hex:"0x8000030d",symbol:"PLCUX",name:"PLC Ultima X"},782:{index:"782",hex:"0x8000030e",symbol:"PLCU",name:"PLC Ultima"},783:{index:"783",hex:"0x8000030f",symbol:"SMARTBC",name:"SMART Blockchain"},784:{index:"784",hex:"0x80000310",symbol:"SUI",name:"Sui"},786:{index:"786",hex:"0x80000312",symbol:"UIDD",name:"UIDD"},787:{index:"787",hex:"0x80000313",symbol:"ACA",name:"Acala"},788:{index:"788",hex:"0x80000314",symbol:"BNC",name:"Bifrost"},789:{index:"789",hex:"0x80000315",symbol:"TAU",name:"Lamden"},794:{index:"794",hex:"0x8000031a",symbol:"INTR",name:"Interlay"},795:{index:"795",hex:"0x8000031b",symbol:"KINT",name:"Kintsugi"},799:{index:"799",hex:"0x8000031f",symbol:"PDEX",name:"Polkadex"},800:{index:"800",hex:"0x80000320",symbol:"BEET",name:"Beetle Coin"},801:{index:"801",hex:"0x80000321",symbol:"DST",name:"DSTRA"},802:{index:"802",hex:"0x80000322",symbol:"CY",name:"Cyberyen"},803:{index:"803",hex:"0x80000323",symbol:"RYME",name:"Ryme Network"},804:{index:"804",hex:"0x80000324",symbol:"ZKS",name:"zkSync"},805:{index:"805",hex:"0x80000325",symbol:"SCASH",name:"Scash"},808:{index:"808",hex:"0x80000328",symbol:"QVT",name:"Qvolta"},809:{index:"809",hex:"0x80000329",symbol:"SDN",name:"Shiden Network"},810:{index:"810",hex:"0x8000032a",symbol:"ASTR",name:"Astar Network"},813:{index:"813",hex:"0x8000032d",symbol:"MEER",name:"Qitmeer"},815:{index:"815",hex:"0x8000032f",symbol:"FACT",name:"ImFACT"},816:{index:"816",hex:"0x80000330",symbol:"FSC",name:"FSC"},818:{index:"818",hex:"0x80000332",symbol:"VET",name:"VeChain Token"},819:{index:"819",hex:"0x80000333",symbol:"REEF",name:"Reef"},820:{index:"820",hex:"0x80000334",symbol:"CLO",name:"Callisto"},822:{index:"822",hex:"0x80000336",symbol:"BDB",name:"BigchainDB"},824:{index:"824",hex:"0x80000338",symbol:"RBNT",name:"Redbelly Network"},827:{index:"827",hex:"0x8000033b",symbol:"ACE",name:"Endurance"},828:{index:"828",hex:"0x8000033c",symbol:"CCN",name:"ComputeCoin"},829:{index:"829",hex:"0x8000033d",symbol:"BBA",name:"BBACHAIN"},831:{index:"831",hex:"0x8000033f",symbol:"CRUZ",name:"cruzbit"},832:{index:"832",hex:"0x80000340",symbol:"SAPP",name:"Sapphire"},833:{index:"833",hex:"0x80000341",symbol:"777",name:"Jackpot"},834:{index:"834",hex:"0x80000342",symbol:"KYAN",name:"Kyanite"},835:{index:"835",hex:"0x80000343",symbol:"AZR",name:"Azzure"},836:{index:"836",hex:"0x80000344",symbol:"CFL",name:"CryptoFlow"},837:{index:"837",hex:"0x80000345",symbol:"DASHD",name:"Dash Diamond"},838:{index:"838",hex:"0x80000346",symbol:"TRTT",name:"Trittium"},839:{index:"839",hex:"0x80000347",symbol:"UCR",name:"Ultra Clear"},840:{index:"840",hex:"0x80000348",symbol:"PNY",name:"Peony"},841:{index:"841",hex:"0x80000349",symbol:"BECN",name:"Beacon"},842:{index:"842",hex:"0x8000034a",symbol:"MONK",name:"Monk"},843:{index:"843",hex:"0x8000034b",symbol:"SAGA",name:"CryptoSaga"},844:{index:"844",hex:"0x8000034c",symbol:"SUV",name:"Suvereno"},845:{index:"845",hex:"0x8000034d",symbol:"ESK",name:"EskaCoin"},846:{index:"846",hex:"0x8000034e",symbol:"OWO",name:"OneWorld Coin"},847:{index:"847",hex:"0x8000034f",symbol:"PEPS",name:"PEPS Coin"},848:{index:"848",hex:"0x80000350",symbol:"BIR",name:"Birake"},849:{index:"849",hex:"0x80000351",symbol:"MOBIC",name:"MobilityCoin"},850:{index:"850",hex:"0x80000352",symbol:"FLS",name:"Flits"},851:{index:"851",hex:"0x80000353",symbol:"FRECO",name:"Freco"},852:{index:"852",hex:"0x80000354",symbol:"DSM",name:"Desmos"},853:{index:"853",hex:"0x80000355",symbol:"PRCY",name:"PRCY Coin"},858:{index:"858",hex:"0x8000035a",symbol:"HVH",name:"HAVAH"},866:{index:"866",hex:"0x80000362",symbol:"MOB",name:"MobileCoin"},868:{index:"868",hex:"0x80000364",symbol:"IF",name:"Infinitefuture"},877:{index:"877",hex:"0x8000036d",symbol:"NAM",name:"Namada"},878:{index:"878",hex:"0x8000036e",symbol:"SCR",name:"Scorum Network"},880:{index:"880",hex:"0x80000370",symbol:"LUM",name:"Lum Network"},883:{index:"883",hex:"0x80000373",symbol:"ZBC",name:"ZooBC"},886:{index:"886",hex:"0x80000376",symbol:"ADF",name:"AD Token"},888:{index:"888",hex:"0x80000378",symbol:"NEO",name:"NEO"},889:{index:"889",hex:"0x80000379",symbol:"TOMO",name:"TOMO"},890:{index:"890",hex:"0x8000037a",symbol:"XSEL",name:"Seln"},896:{index:"896",hex:"0x80000380",symbol:"LKSC",name:"LKSCoin"},898:{index:"898",hex:"0x80000382",symbol:"AS",name:"Assetchain"},899:{index:"899",hex:"0x80000383",symbol:"XEC",name:"eCash"},900:{index:"900",hex:"0x80000384",symbol:"LMO",name:"Lumeneo"},901:{index:"901",hex:"0x80000385",symbol:"NXT",name:"NxtMeta"},904:{index:"904",hex:"0x80000388",symbol:"HNT",name:"Helium"},907:{index:"907",hex:"0x8000038b",symbol:"FIS",name:"StaFi"},909:{index:"909",hex:"0x8000038d",symbol:"SGE",name:"Saage"},911:{index:"911",hex:"0x8000038f",symbol:"GERT",name:"Gert"},913:{index:"913",hex:"0x80000391",symbol:"VARA",name:"Vara Network"},916:{index:"916",hex:"0x80000394",symbol:"META",name:"Metadium"},917:{index:"917",hex:"0x80000395",symbol:"FRA",name:"Findora"},919:{index:"919",hex:"0x80000397",symbol:"CCD",name:"Concordium"},921:{index:"921",hex:"0x80000399",symbol:"AVN",name:"Avian Network"},925:{index:"925",hex:"0x8000039d",symbol:"DIP",name:"Dipper Network"},928:{index:"928",hex:"0x800003a0",symbol:"GHM",name:"HermitMatrixNetwork"},931:{index:"931",hex:"0x800003a3",symbol:"RUNE",name:"THORChain (RUNE)"},938:{index:"938",hex:"0x800003aa",symbol:"MGO",name:"Mango Network"},939:{index:"939",hex:"0x800003ab",symbol:"AB",name:"Argot Protocol"},942:{index:"942",hex:"0x800003ae",symbol:"KCN",name:"Kylacoin"},943:{index:"943",hex:"0x800003af",symbol:"LCN",name:"Lyncoin"},945:{index:"945",hex:"0x800003b1",symbol:"UNLOCK",name:"Jasiri protocol"},955:{index:"955",hex:"0x800003bb",symbol:"LTP",name:"LifetionCoin"},958:{index:"958",hex:"0x800003be",symbol:"",name:"KickSoccer"},960:{index:"960",hex:"0x800003c0",symbol:"VKAX",name:"Vkax"},966:{index:"966",hex:"0x800003c6",symbol:"MATIC",name:"Matic"},968:{index:"968",hex:"0x800003c8",symbol:"UNW",name:"UNW"},969:{index:"969",hex:"0x800003c9",symbol:"QI",name:"Quai Network"},970:{index:"970",hex:"0x800003ca",symbol:"TWINS",name:"TWINS"},977:{index:"977",hex:"0x800003d1",symbol:"TLOS",name:"Telos"},981:{index:"981",hex:"0x800003d5",symbol:"TAFECO",name:"Taf ECO Chain"},985:{index:"985",hex:"0x800003d9",symbol:"AU",name:"Autonomy"},987:{index:"987",hex:"0x800003db",symbol:"VCG",name:"VipCoin"},988:{index:"988",hex:"0x800003dc",symbol:"XAZAB",name:"Xazab core"},989:{index:"989",hex:"0x800003dd",symbol:"AIOZ",name:"AIOZ"},990:{index:"990",hex:"0x800003de",symbol:"CORE",name:"Coreum"},991:{index:"991",hex:"0x800003df",symbol:"PEC",name:"Phoenix"},992:{index:"992",hex:"0x800003e0",symbol:"UNT",name:"Unit"},993:{index:"993",hex:"0x800003e1",symbol:"XRB",name:"X Currency"},994:{index:"994",hex:"0x800003e2",symbol:"QUAI",name:"Quai Network"},995:{index:"995",hex:"0x800003e3",symbol:"CAPS",name:"Ternoa"},996:{index:"996",hex:"0x800003e4",symbol:"OKT",name:"OKChain Token"},997:{index:"997",hex:"0x800003e5",symbol:"SUM",name:"Solidum"},998:{index:"998",hex:"0x800003e6",symbol:"LBTC",name:"Lightning Bitcoin"},999:{index:"999",hex:"0x800003e7",symbol:"BCD",name:"Bitcoin Diamond"},1e3:{index:"1000",hex:"0x800003e8",symbol:"BTN",name:"Bitcoin New"},1001:{index:"1001",hex:"0x800003e9",symbol:"TT",name:"ThunderCore"},1002:{index:"1002",hex:"0x800003ea",symbol:"BKT",name:"BanKitt"},1003:{index:"1003",hex:"0x800003eb",symbol:"NODL",name:"Nodle"},1004:{index:"1004",hex:"0x800003ec",symbol:"PCOIN",name:"PCOIN"},1005:{index:"1005",hex:"0x800003ed",symbol:"TAO",name:"Bittensor"},1006:{index:"1006",hex:"0x800003ee",symbol:"HSK",name:"HashKey Chain"},1007:{index:"1007",hex:"0x800003ef",symbol:"FTM",name:"Fantom"},1008:{index:"1008",hex:"0x800003f0",symbol:"RPG",name:"RPG"},1009:{index:"1009",hex:"0x800003f1",symbol:"LAKE",name:"iconLake"},1010:{index:"1010",hex:"0x800003f2",symbol:"HT",name:"Huobi ECO Chain"},1011:{index:"1011",hex:"0x800003f3",symbol:"ELV",name:"Eluvio"},1012:{index:"1012",hex:"0x800003f4",symbol:"JOC",name:"Japan Open Chain"},1013:{index:"1013",hex:"0x800003f5",symbol:"BIC",name:"Beincrypto"},1014:{index:"1014",hex:"0x800003f6",symbol:"JOY",name:"Joystream"},1015:{index:"1015",hex:"0x800003f7",symbol:"ZCX",name:"ZEN Exchange Token"},1020:{index:"1020",hex:"0x800003fc",symbol:"EVC",name:"Evrice"},1022:{index:"1022",hex:"0x800003fe",symbol:"XRD",name:"Radix DLT"},1023:{index:"1023",hex:"0x800003ff",symbol:"ONE",name:"HARMONY-ONE (Legacy)"},1024:{index:"1024",hex:"0x80000400",symbol:"ONT",name:"Ontology"},1025:{index:"1025",hex:"0x80000401",symbol:"CZZ",name:"Classzz"},1026:{index:"1026",hex:"0x80000402",symbol:"KEX",name:"Kira Exchange Token"},1027:{index:"1027",hex:"0x80000403",symbol:"MCM",name:"Mochimo"},1028:{index:"1028",hex:"0x80000404",symbol:"PLS",name:"Pulse Coin"},1032:{index:"1032",hex:"0x80000408",symbol:"BTCR",name:"BTCR"},1042:{index:"1042",hex:"0x80000412",symbol:"MFID",name:"Moonfish ID"},1111:{index:"1111",hex:"0x80000457",symbol:"BBC",name:"Big Bitcoin"},1116:{index:"1116",hex:"0x8000045c",symbol:"CORE",name:"Core"},1120:{index:"1120",hex:"0x80000460",symbol:"RISE",name:"RISE"},1122:{index:"1122",hex:"0x80000462",symbol:"CMT",name:"CyberMiles Token"},1128:{index:"1128",hex:"0x80000468",symbol:"ETSC",name:"Ethereum Social"},1129:{index:"1129",hex:"0x80000469",symbol:"DFI",name:"DeFiChain"},1130:{index:"1130",hex:"0x8000046a",symbol:"DFI",name:"DeFiChain EVM Network"},1137:{index:"1137",hex:"0x80000471",symbol:"$DAG",name:"Constellation Labs"},1145:{index:"1145",hex:"0x80000479",symbol:"CDY",name:"Bitcoin Candy"},1155:{index:"1155",hex:"0x80000483",symbol:"ENJ",name:"Enjin Coin"},1170:{index:"1170",hex:"0x80000492",symbol:"HOO",name:"Hoo Smart Chain"},1234:{index:"1234",hex:"0x800004d2",symbol:"ALPH",name:"Alephium"},1236:{index:"1236",hex:"0x800004d4",symbol:"",name:"Masca"},1237:{index:"1237",hex:"0x800004d5",symbol:"",name:"Nostr"},1280:{index:"1280",hex:"0x80000500",symbol:"",name:"Kudos Setler"},1284:{index:"1284",hex:"0x80000504",symbol:"GLMR",name:"Moonbeam"},1285:{index:"1285",hex:"0x80000505",symbol:"MOVR",name:"Moonriver"},1286:{index:"1286",hex:"0x80000506",symbol:"DSG",name:"Dessage Social Protocol"},1298:{index:"1298",hex:"0x80000512",symbol:"WPC",name:"Wpc"},1308:{index:"1308",hex:"0x8000051c",symbol:"WEI",name:"WEI"},1312:{index:"1312",hex:"0x80000520",symbol:"BITS",name:"Entropy"},1337:{index:"1337",hex:"0x80000539",symbol:"DFC",name:"Defcoin"},1338:{index:"1338",hex:"0x8000053a",symbol:"IRON",name:"Iron Fish"},1348:{index:"1348",hex:"0x80000544",symbol:"ISLM",name:"IslamicCoin"},1397:{index:"1397",hex:"0x80000575",symbol:"HYC",name:"Hycon"},1410:{index:"1410",hex:"0x80000582",symbol:"TENTSLP",name:"TENT Simple Ledger Protocol"},1510:{index:"1510",hex:"0x800005e6",symbol:"XSC",name:"XT Smart Chain"},1512:{index:"1512",hex:"0x800005e8",symbol:"AAC",name:"Double-A Chain"},1524:{index:"1524",hex:"0x800005f4",symbol:"",name:"Taler"},1533:{index:"1533",hex:"0x800005fd",symbol:"BEAM",name:"Beam"},1536:{index:"1536",hex:"0x80000600",symbol:"GAS",name:"BubiChain"},1540:{index:"1540",hex:"0x80000604",symbol:"ATHENA",name:"Athena"},1551:{index:"1551",hex:"0x8000060f",symbol:"SDK",name:"Sovereign SDK"},1555:{index:"1555",hex:"0x80000613",symbol:"APC",name:"Apc Chain"},1616:{index:"1616",hex:"0x80000650",symbol:"ELF",name:"AELF"},1618:{index:"1618",hex:"0x80000652",symbol:"AUDL",name:"AUDL"},1620:{index:"1620",hex:"0x80000654",symbol:"ATH",name:"Atheios"},1627:{index:"1627",hex:"0x8000065b",symbol:"LUME",name:"Lume Web"},1642:{index:"1642",hex:"0x8000066a",symbol:"NEW",name:"Newton"},1657:{index:"1657",hex:"0x80000679",symbol:"BTA",name:"Btachain"},1668:{index:"1668",hex:"0x80000684",symbol:"NEOX",name:"Neoxa"},1669:{index:"1669",hex:"0x80000685",symbol:"MEWC",name:"Meowcoin"},1688:{index:"1688",hex:"0x80000698",symbol:"BCX",name:"BitcoinX"},1729:{index:"1729",hex:"0x800006c1",symbol:"XTZ",name:"Tezos"},1776:{index:"1776",hex:"0x800006f0",symbol:"LBTC",name:"Liquid BTC"},1777:{index:"1777",hex:"0x800006f1",symbol:"BBP",name:"Biblepay"},1784:{index:"1784",hex:"0x800006f8",symbol:"JPYS",name:"JPY Stablecoin"},1789:{index:"1789",hex:"0x800006fd",symbol:"VEGA",name:"Vega Protocol"},1815:{index:"1815",hex:"0x80000717",symbol:"ADA",name:"Cardano"},1818:{index:"1818",hex:"0x8000071a",symbol:"CUBE",name:"Cube Chain Native Token"},1856:{index:"1856",hex:"0x80000743",symbol:"TES",name:"Teslacoin"},1888:{index:"1888",hex:"0x80000760",symbol:"ZTX",name:"Zetrix"},1899:{index:"1899",hex:"0x8000076b",symbol:"XEC",name:"eCash token"},1900:{index:"1900",hex:"0x8000076c",symbol:"XNA",name:"Neurai"},1901:{index:"1901",hex:"0x8000076d",symbol:"CLC",name:"Classica"},1907:{index:"1907",hex:"0x80000773",symbol:"BITCI",name:"Bitcicoin"},1919:{index:"1919",hex:"0x8000077f",symbol:"VIPS",name:"VIPSTARCOIN"},1926:{index:"1926",hex:"0x80000786",symbol:"CITY",name:"City Coin"},1951:{index:"1951",hex:"0x8000079f",symbol:"ESA",name:"Esa"},1952:{index:"1952",hex:"0x800007a0",symbol:"ESC",name:"EsaCoin"},1955:{index:"1955",hex:"0x800007a3",symbol:"XX",name:"xx coin"},1977:{index:"1977",hex:"0x800007b9",symbol:"XMX",name:"Xuma"},1984:{index:"1984",hex:"0x800007c0",symbol:"TRTL",name:"TurtleCoin"},1985:{index:"1985",hex:"0x800007c1",symbol:"SLRT",name:"Solarti Chain"},1986:{index:"1986",hex:"0x800007c2",symbol:"QTH",name:"Qing Tong Horizon"},1987:{index:"1987",hex:"0x800007c3",symbol:"EGEM",name:"EtherGem"},1988:{index:"1988",hex:"0x800007c4",symbol:"MIRA",name:"Mira Chain"},1989:{index:"1989",hex:"0x800007c5",symbol:"HODL",name:"HOdlcoin"},1990:{index:"1990",hex:"0x800007c6",symbol:"PHL",name:"Placeholders"},1991:{index:"1991",hex:"0x800007c7",symbol:"SC",name:"Sia"},1996:{index:"1996",hex:"0x800007cc",symbol:"MYT",name:"Mineyourtime"},1997:{index:"1997",hex:"0x800007cd",symbol:"POLIS",name:"Polis"},1998:{index:"1998",hex:"0x800007ce",symbol:"XMCC",name:"Monoeci"},1999:{index:"1999",hex:"0x800007cf",symbol:"COLX",name:"ColossusXT"},2e3:{index:"2000",hex:"0x800007d0",symbol:"GIN",name:"GinCoin"},2001:{index:"2001",hex:"0x800007d1",symbol:"MNP",name:"MNPCoin"},2002:{index:"2002",hex:"0x800007d2",symbol:"MLN",name:"Miraland"},2015:{index:"2015",hex:"0x800007df",symbol:"TEER",name:"Integritee"},2017:{index:"2017",hex:"0x800007e1",symbol:"KIN",name:"Kin"},2018:{index:"2018",hex:"0x800007e2",symbol:"EOSC",name:"EOSClassic"},2019:{index:"2019",hex:"0x800007e3",symbol:"GBT",name:"GoldBean Token"},2020:{index:"2020",hex:"0x800007e4",symbol:"PKC",name:"PKC"},2021:{index:"2021",hex:"0x800007e5",symbol:"SKT",name:"Sukhavati"},2022:{index:"2022",hex:"0x800007e6",symbol:"XHT",name:"Xinghuo Token"},2023:{index:"2023",hex:"0x800007e7",symbol:"COC",name:"Chat On Chain"},2024:{index:"2024",hex:"0x800007e8",symbol:"USBC",name:"Universal Ledger USBC"},2025:{index:"2025",hex:"0x800007e9",symbol:"ROCK",name:"Zenrock Labs"},2026:{index:"2026",hex:"0x800007ea",symbol:"ASTRON",name:"ASTRON Token"},2046:{index:"2046",hex:"0x800007fe",symbol:"ANY",name:"Any"},2048:{index:"2048",hex:"0x80000800",symbol:"MCASH",name:"MCashChain"},2049:{index:"2049",hex:"0x80000801",symbol:"TRUE",name:"TrueChain"},2050:{index:"2050",hex:"0x80000802",symbol:"MOVO",name:"Movo Smart Chain"},2086:{index:"2086",hex:"0x80000826",symbol:"KILT",name:"KILT Spiritnet"},2091:{index:"2091",hex:"0x8000082b",symbol:"FRQCY",name:"Frequency"},2109:{index:"2109",hex:"0x8000083d",symbol:"SAMA",name:"Exosama Network"},2112:{index:"2112",hex:"0x80000840",symbol:"IoTE",name:"IoTE"},2125:{index:"2125",hex:"0x8000084d",symbol:"BAY",name:"BitBay"},2137:{index:"2137",hex:"0x80000859",symbol:"XRG",name:"Ergon"},2199:{index:"2199",hex:"0x80000897",symbol:"SAMA",name:"Moonsama Network"},2221:{index:"2221",hex:"0x800008ad",symbol:"ASK",name:"ASK"},2222:{index:"2222",hex:"0x800008ae",symbol:"CWEB",name:"Coinweb"},2285:{index:"2285",hex:"0x800008ed",symbol:"",name:"Qiyi Chain"},2301:{index:"2301",hex:"0x800008fd",symbol:"QTUM",name:"QTUM"},2302:{index:"2302",hex:"0x800008fe",symbol:"ETP",name:"Metaverse"},2303:{index:"2303",hex:"0x800008ff",symbol:"GXC",name:"GXChain"},2304:{index:"2304",hex:"0x80000900",symbol:"CRP",name:"CranePay"},2305:{index:"2305",hex:"0x80000901",symbol:"ELA",name:"Elastos"},2338:{index:"2338",hex:"0x80000922",symbol:"SNOW",name:"Snowblossom"},2365:{index:"2365",hex:"0x8000093d",symbol:"XIN",name:"Mixin"},2500:{index:"2500",hex:"0x800009c4",symbol:"NEXI",name:"Nexi"},2570:{index:"2570",hex:"0x80000a0a",symbol:"AOA",name:"Aurora"},2686:{index:"2686",hex:"0x80000a7e",symbol:"AIPG",name:"AIPowerGrid"},2718:{index:"2718",hex:"0x80000a9e",symbol:"NAS",name:"Nebulas"},2809:{index:"2809",hex:"0x80000af9",symbol:"LAN",name:"Lanify"},2894:{index:"2894",hex:"0x80000b4e",symbol:"REOSC",name:"REOSC Ecosystem"},2941:{index:"2941",hex:"0x80000b7d",symbol:"BND",name:"Blocknode"},3e3:{index:"3000",hex:"0x80000bb8",symbol:"SM",name:"Stealth Message"},3003:{index:"3003",hex:"0x80000bbb",symbol:"LUX",name:"LUX"},3030:{index:"3030",hex:"0x80000bd6",symbol:"HBAR",name:"Hedera HBAR"},3077:{index:"3077",hex:"0x80000c05",symbol:"COS",name:"Contentos"},3276:{index:"3276",hex:"0x80000ccc",symbol:"CCC",name:"CodeChain"},3333:{index:"3333",hex:"0x80000d05",symbol:"SXP",name:"Solar"},3338:{index:"3338",hex:"0x80000d0a",symbol:"PEAQ",name:"peaq"},3344:{index:"3344",hex:"0x80000d10",symbol:"PLMC",name:"Polimec"},3377:{index:"3377",hex:"0x80000d31",symbol:"ROI",name:"ROIcoin"},3381:{index:"3381",hex:"0x80000d35",symbol:"DYN",name:"Dynamic"},3383:{index:"3383",hex:"0x80000d37",symbol:"SEQ",name:"Sequence"},3434:{index:"3434",hex:"0x80000d6a",symbol:"PEPE",name:"Pepecoin Core"},3501:{index:"3501",hex:"0x80000dad",symbol:"JFIN",name:"JFIN Coin"},3552:{index:"3552",hex:"0x80000de0",symbol:"DEO",name:"Destocoin"},3564:{index:"3564",hex:"0x80000dec",symbol:"DST",name:"DeStream"},3601:{index:"3601",hex:"0x80000e11",symbol:"CY",name:"Cybits"},3757:{index:"3757",hex:"0x80000ead",symbol:"MPC",name:"Partisia Blockchain"},3840:{index:"3840",hex:"0x80000f00",symbol:"RED",name:"ReDeFi RED"},4040:{index:"4040",hex:"0x80000fc8",symbol:"FC8",name:"FCH Network"},4096:{index:"4096",hex:"0x80001000",symbol:"YEE",name:"YeeCo"},4218:{index:"4218",hex:"0x8000107a",symbol:"IOTA",name:"IOTA"},4219:{index:"4219",hex:"0x8000107b",symbol:"SMR",name:"Shimmer"},4242:{index:"4242",hex:"0x80001092",symbol:"AXE",name:"Axe"},4343:{index:"4343",hex:"0x800010f7",symbol:"XYM",name:"Symbol"},4444:{index:"4444",hex:"0x8000115c",symbol:"C4E",name:"Chain4Energy"},4919:{index:"4919",hex:"0x80001337",symbol:"XVM",name:"Venidium"},4999:{index:"4999",hex:"0x80001387",symbol:"BXN",name:"BlackFort Exchange Network"},5e3:{index:"5000",hex:"0x80001388",symbol:"V12",name:"Vet The Vote"},5006:{index:"5006",hex:"0x8000138e",symbol:"SBC",name:"Senior Blockchain"},5248:{index:"5248",hex:"0x80001480",symbol:"FIC",name:"FIC"},5353:{index:"5353",hex:"0x800014e9",symbol:"HNS",name:"Handshake"},5404:{index:"5404",hex:"0x8000151c",symbol:"ISK",name:"ISKRA"},5467:{index:"5467",hex:"0x8000155b",symbol:"ALTME",name:"ALTME"},5555:{index:"5555",hex:"0x800015b3",symbol:"FUND",name:"Unification"},5757:{index:"5757",hex:"0x8000167d",symbol:"STX",name:"Stacks"},5895:{index:"5895",hex:"0x80001707",symbol:"VOW",name:"VowChain VOW"},5920:{index:"5920",hex:"0x80001720",symbol:"SLU",name:"SILUBIUM"},5995:{index:"5995",hex:"0x8000176B",symbol:"DUSK",name:"Dusk Network"},6060:{index:"6060",hex:"0x800017ac",symbol:"GO",name:"GoChain GO"},6144:{index:"6144",hex:"0x80001800",symbol:"DTS",name:"Datos"},6174:{index:"6174",hex:"0x8000181e",symbol:"MOI",name:"My Own Internet"},6278:{index:"6278",hex:"0x80001886",symbol:"STEAMX",name:"Rails Network Mainnet"},6532:{index:"6532",hex:"0x80001984",symbol:"UM",name:"Penumbra"},6599:{index:"6599",hex:"0x800019c7",symbol:"RSC",name:"Royal Sports City"},6666:{index:"6666",hex:"0x80001a0a",symbol:"BPA",name:"Bitcoin Pizza"},6688:{index:"6688",hex:"0x80001a20",symbol:"SAFE",name:"SAFE"},6779:{index:"6779",hex:"0x80001a7b",symbol:"COTI",name:"COTI"},6969:{index:"6969",hex:"0x80001b39",symbol:"ROGER",name:"TheHolyrogerCoin"},7e3:{index:"7000",hex:"0x80001b58",symbol:"ZETA",name:"ZetaChain"},7027:{index:"7027",hex:"0x80001b73",symbol:"ELLA",name:"Ella the heart"},7028:{index:"7028",hex:"0x80001b74",symbol:"AA",name:"Arthera"},7091:{index:"7091",hex:"0x80001bb3",symbol:"TOPL",name:"Topl"},7331:{index:"7331",hex:"0x80001ca3",symbol:"KLY",name:"KLYNTAR"},7341:{index:"7341",hex:"0x80001cad",symbol:"SHFT",name:"Shyft"},7518:{index:"7518",hex:"0x80001d5e",symbol:"MEV",name:"MEVerse"},7576:{index:"7576",hex:"0x80001d98",symbol:"ADIL",name:"ADIL Chain"},7777:{index:"7777",hex:"0x80001e61",symbol:"BTV",name:"Bitvote"},7779:{index:"7779",hex:"0x80001e63",symbol:"CPV",name:"Compverse"},8e3:{index:"8000",hex:"0x80001f40",symbol:"SKY",name:"Skycoin"},8017:{index:"8017",hex:"0x80001f51",symbol:"ISC",name:"iSunCoin"},8080:{index:"8080",hex:"0x80001f90",symbol:"",name:"DSRV"},8181:{index:"8181",hex:"0x80001ff5",symbol:"BOC",name:"BeOne Chain"},8192:{index:"8192",hex:"0x80002000",symbol:"PAC",name:"pacprotocol"},8217:{index:"8217",hex:"0x80002019",symbol:"KLAY",name:"KLAY"},8339:{index:"8339",hex:"0x80002093",symbol:"BTQ",name:"BitcoinQuark"},8444:{index:"8444",hex:"0x800020fc",symbol:"XCH",name:"Chia"},8453:{index:"8453",hex:"0x80002105",symbol:"",name:"Base"},8680:{index:"8680",hex:"0x800021e8",symbol:"PLMNT",name:"Planetmint"},8732:{index:"8732",hex:"0x8000221c",symbol:"BLN",name:"Bullions"},8866:{index:"8866",hex:"0x800022a2",symbol:"GGX",name:"Golden Gate"},8886:{index:"8886",hex:"0x800022b6",symbol:"GGXT",name:"Golden Gate Sydney"},8888:{index:"8888",hex:"0x800022b8",symbol:"SBTC",name:"Super Bitcoin"},8964:{index:"8964",hex:"0x80002304",symbol:"NULS",name:"NULS"},8997:{index:"8997",hex:"0x80002325",symbol:"BBC",name:"Babacoin"},8998:{index:"8998",hex:"0x80002326",symbol:"JGC",name:"JagoanCoin"},8999:{index:"8999",hex:"0x80002327",symbol:"BTP",name:"Bitcoin Pay"},9e3:{index:"9000",hex:"0x80002328",symbol:"AVAX",name:"Avalanche"},9001:{index:"9001",hex:"0x80002329",symbol:"ARB1",name:"Arbitrum"},9002:{index:"9002",hex:"0x8000232a",symbol:"BOBA",name:"Boba"},9003:{index:"9003",hex:"0x8000232b",symbol:"LOOP",name:"Loopring"},9004:{index:"9004",hex:"0x8000232c",symbol:"STRK",name:"StarkNet"},9005:{index:"9005",hex:"0x8000232d",symbol:"AVAXC",name:"Avalanche C-Chain"},9006:{index:"9006",hex:"0x8000232e",symbol:"BSC",name:"Binance Smart Chain"},9797:{index:"9797",hex:"0x80002645",symbol:"NRG",name:"Energi"},9888:{index:"9888",hex:"0x800026a0",symbol:"BTF",name:"Bitcoin Faith"},9999:{index:"9999",hex:"0x8000270f",symbol:"GOD",name:"Bitcoin God"},1e4:{index:"10000",hex:"0x80002710",symbol:"FO",name:"FIBOS"},10001:{index:"10001",hex:"0x80002711",symbol:"SPACE",name:"Space"},10111:{index:"10111",hex:"0x8000277f",symbol:"DHP",name:"dHealth"},10226:{index:"10226",hex:"0x800027f2",symbol:"RTM",name:"Raptoreum"},10242:{index:"10242",hex:"0x80002802",symbol:"AA",name:"Arthera"},10291:{index:"10291",hex:"0x80002833",symbol:"XRC",name:"XRhodium"},10507:{index:"10507",hex:"0x8000290b",symbol:"NUM",name:"Numbers Protocol"},10605:{index:"10605",hex:"0x8000296d",symbol:"XPI",name:"Lotus"},11111:{index:"11111",hex:"0x80002b67",symbol:"ESS",name:"Essentia One"},11742:{index:"11742",hex:"0x80002dde",symbol:"VARCH",name:"InvArch"},11743:{index:"11743",hex:"0x80002ddf",symbol:"TNKR",name:"Tinkernet"},12345:{index:"12345",hex:"0x80003039",symbol:"IPOS",name:"IPOS"},12586:{index:"12586",hex:"0x8000312a",symbol:"MINA",name:"Mina"},13107:{index:"13107",hex:"0x80003333",symbol:"BTY",name:"BitYuan"},13108:{index:"13108",hex:"0x80003334",symbol:"YCC",name:"Yuan Chain Coin"},13381:{index:"13381",hex:"0x80003445",symbol:"PHX",name:"Phoenix"},14001:{index:"14001",hex:"0x800036b1",symbol:"WAX",name:"Worldwide Asset Exchange"},15845:{index:"15845",hex:"0x80003de5",symbol:"SDGO",name:"SanDeGo"},16181:{index:"16181",hex:"0x80003f35",symbol:"XTX",name:"Totem Live Network"},16754:{index:"16754",hex:"0x80004172",symbol:"ARDR",name:"Ardor"},18e3:{index:"18000",hex:"0x80004650",symbol:"MTR",name:"Meter"},19165:{index:"19165",hex:"0x80004add",symbol:"SAFE",name:"Safecoin"},19167:{index:"19167",hex:"0x80004adf",symbol:"FLUX",name:"Flux"},19169:{index:"19169",hex:"0x80004ae1",symbol:"RITO",name:"Ritocoin"},19788:{index:"19788",hex:"0x80004d4c",symbol:"ML",name:"Mintlayer"},20036:{index:"20036",hex:"0x80004e44",symbol:"XND",name:"ndau"},21004:{index:"21004",hex:"0x8000520c",symbol:"C4EI",name:"c4ei"},21337:{index:"21337",hex:"0x80005359",symbol:"XAH",name:"Xahau"},21888:{index:"21888",hex:"0x80005580",symbol:"PAC",name:"Pactus"},22504:{index:"22504",hex:"0x800057e8",symbol:"PWR",name:"PWRcoin"},23e3:{index:"23000",hex:"0x800059d8",symbol:"EPIC",name:"Epic Cash"},25252:{index:"25252",hex:"0x800062a4",symbol:"BELL",name:"Bellcoin"},25718:{index:"25718",hex:"0x80006476",symbol:"CHX",name:"Own"},26417:{index:"26417",hex:"0x80006731",symbol:"G1",name:"Ğ1"},29223:{index:"29223",hex:"0x80007227",symbol:"NEXA",name:"Nexa"},31102:{index:"31102",hex:"0x8000797e",symbol:"ESN",name:"EtherSocial Network"},31337:{index:"31337",hex:"0x80007a69",symbol:"",name:"ThePower"},33416:{index:"33416",hex:"0x80008288",symbol:"TEO",name:"Trust Eth reOrigin"},33878:{index:"33878",hex:"0x80008456",symbol:"BTCS",name:"Bitcoin Stake"},34952:{index:"34952",hex:"0x80008888",symbol:"BTT",name:"ByteTrade"},37992:{index:"37992",hex:"0x80009468",symbol:"FXTC",name:"FixedTradeCoin"},39321:{index:"39321",hex:"0x80009999",symbol:"AMA",name:"Amabig"},42069:{index:"42069",hex:"0x8000a455",symbol:"FACT",name:"FACT0RN"},43028:{index:"43028",hex:"0x8000a814",symbol:"AXIV",name:"AXIV"},47803:{index:"47803",hex:"0x8000babb",symbol:"BAX",name:"BAX"},49262:{index:"49262",hex:"0x8000c06e",symbol:"EVE",name:"evan"},49344:{index:"49344",hex:"0x8000c0c0",symbol:"STASH",name:"STASH"},52752:{index:"52752",hex:"0x8000ce10",symbol:"CELO",name:"Celo"},54176:{index:"54176",hex:"0x8000d3a0",symbol:"OVER",name:"OverProtocol"},61616:{index:"61616",hex:"0x8000f0b0",symbol:"TH",name:"TianHe"},65536:{index:"65536",hex:"0x80010000",symbol:"KETH",name:"Krypton World"},69420:{index:"69420",hex:"0x80010f2c",symbol:"GRLC",name:"Garlicoin"},70007:{index:"70007",hex:"0x80011177",symbol:"GWL",name:"Gewel"},77777:{index:"77777",hex:"0x80012fd1",symbol:"ZYN",name:"Wethio"},83293:{index:"83293",hex:"0x8001455d",symbol:"QUBIC",name:"Qubic"},88888:{index:"88888",hex:"0x80015b38",symbol:"RYO",name:"c0ban"},99999:{index:"99999",hex:"0x8001869f",symbol:"WICC",name:"Waykichain"},100500:{index:"100500",hex:"0x80018894",symbol:"HOME",name:"HomeCoin"},101010:{index:"101010",hex:"0x80018a92",symbol:"STC",name:"Starcoin"},104109:{index:"104109",hex:"0x800196ad",symbol:"",name:"Seed Hypermedia"},105105:{index:"105105",hex:"0x80019a91",symbol:"STRAX",name:"Strax"},111111:{index:"111111",hex:"0x8001b207",symbol:"KAS",name:"Kaspa"},121337:{index:"121337",hex:"0x8001d9f9",symbol:"KLS",name:"Karlsen"},123456:{index:"123456",hex:"0x8001e240",symbol:"SPR",name:"Spectre"},130822:{index:"130822",hex:"0x8001ff06",symbol:"WBT",name:"WhiteBIT Coin"},161803:{index:"161803",hex:"0x8002780b",symbol:"APTA",name:"Bloqs4Good"},200625:{index:"200625",hex:"0x80030fb1",symbol:"AKA",name:"Akroma"},200901:{index:"200901",hex:"0x800310c5",symbol:"BTR",name:"Bitlayer"},224433:{index:"224433",hex:"0x80036cb1",symbol:"CONET",name:"CONET Holesky Network"},246529:{index:"246529",hex:"0x8003c301",symbol:"ATS",name:"ARTIS sigma1"},261131:{index:"261131",hex:"0x8003fc0b",symbol:"ZAMA",name:"Zama"},314159:{index:"314159",hex:"0x8004cb2f",symbol:"PI",name:"Pi Network"},333332:{index:"333332",hex:"0x80051614",symbol:"VALUE",name:"Value Chain"},333333:{index:"333333",hex:"0x80051615",symbol:"3333",name:"Pi Value Consensus"},424242:{index:"424242",hex:"0x80067932",symbol:"X42",name:"x42"},534352:{index:"534352",hex:"0x80082750",symbol:"SCR",name:"Scroll"},666666:{index:"666666",hex:"0x800a2c2a",symbol:"VITE",name:"Vite"},696365:{index:"696365",hex:"0x800b3206",symbol:"ICE",name:"Ice Network"},888888:{index:"888888",hex:"0x800d9038",symbol:"SEA",name:"Second Exchange Alliance"},999999:{index:"999999",hex:"0x800c9061",symbol:"WTC",name:"WaltonChain"},1048576:{index:"1048576",hex:"0x80100000",symbol:"AMAX",name:"Armonia Meta Chain"},1171337:{index:"1171337",hex:"0x8011df89",symbol:"ILT",name:"iOlite"},1313114:{index:"1313114",hex:"0x8014095a",symbol:"ETHO",name:"Etho Protocol"},1313500:{index:"1313500",hex:"0x80140adc",symbol:"XERO",name:"Xerom"},1712144:{index:"1712144",hex:"0x801a2010",symbol:"LAX",name:"LAPO"},3924011:{index:"3924011",hex:"0x803be02b",symbol:"EPK",name:"EPIK Protocol"},4741444:{index:"4741444",hex:"0x80485944",symbol:"HYD",name:"Hydra Token"},5249353:{index:"5249353",hex:"0x80501949",symbol:"BCO",name:"BitcoinOre"},5249354:{index:"5249354",hex:"0x8050194a",symbol:"BHD",name:"BitcoinHD"},5264462:{index:"5264462",hex:"0x8050544e",symbol:"PTN",name:"PalletOne"},5655640:{index:"5655640",hex:"0x80564c58",symbol:"VLX",name:"Velas"},5718350:{index:"5718350",hex:"0x8057414e",symbol:"WAN",name:"Wanchain"},5741564:{index:"5741564",hex:"0x80579bfc",symbol:"WAVES",name:"Waves"},5741565:{index:"5741565",hex:"0x80579bfd",symbol:"WEST",name:"Waves Enterprise"},6382179:{index:"6382179",hex:"0x80616263",symbol:"ABC",name:"Abcmint"},6517357:{index:"6517357",hex:"0x8063726d",symbol:"CRM",name:"Creamcoin"},7171666:{index:"7171666",hex:"0x806d6e52",symbol:"BROCK",name:"Bitrock"},7562605:{index:"7562605",hex:"0x8073656d",symbol:"SEM",name:"Semux"},7567736:{index:"7567736",hex:"0x80737978",symbol:"ION",name:"ION"},7777777:{index:"7777777",hex:"0x8076adf1",symbol:"FCT",name:"FirmaChain"},7825266:{index:"7825266",hex:"0x80776772",symbol:"WGR",name:"WGR"},7825267:{index:"7825267",hex:"0x80776773",symbol:"OBSR",name:"OBServer"},8163271:{index:"8163271",hex:"0x807c8fc7",symbol:"AFS",name:"ANFS"},11259375:{index:"11259375",hex:"0x80abcdef",symbol:"LBR",name:"0L"},15118976:{index:"15118976",hex:"0x80e6b280",symbol:"XDS",name:"XDS"},20230101:{index:"20230101",hex:"0x8134afd5",symbol:"ROH",name:"Rooch"},20240430:{index:"20240430",hex:"0x8134d82e",symbol:"NLK",name:"NuLinkCoin"},61717561:{index:"61717561",hex:"0x83adbc39",symbol:"AQUA",name:"Aquachain"},77777777:{index:"77777777",hex:"0x84a2cb71",symbol:"AZT",name:"Aztecoin"},88888888:{index:"88888888",hex:"0x854c5638",symbol:"HATCH",name:"Hatch"},91927009:{index:"91927009",hex:"0x857ab1e1",symbol:"kUSD",name:"kUSD"},99999996:{index:"99999996",hex:"0x85f5e0fc",symbol:"GENS",name:"GENS"},99999997:{index:"99999997",hex:"0x85f5e0fd",symbol:"EQ",name:"EQ"},99999998:{index:"99999998",hex:"0x85f5e0fe",symbol:"FLUID",name:"Fluid Chains"},99999999:{index:"99999999",hex:"0x85f5e0ff",symbol:"QKC",name:"QuarkChain"},608589380:{index:"608589380",hex:"0xa4465644",symbol:"FVDC",name:"ForumCoin"},1179993420:{index:"1179993420",hex:"0xc655454c",symbol:"",name:"Fuel"},1179993421:{index:"1179993421",hex:"0xc655454d",symbol:"TTNC",name:"TakeTitan"},1179993431:{index:"1179993431",hex:"0xc6554557",symbol:"MTGBP",name:"MTGBP"},1179993441:{index:"1179993441",hex:"0xc6554561",symbol:"QFS",name:"Qfs"},1179993451:{index:"1179993451",hex:"0xc655456b",symbol:"RWA",name:"Asset Chain"}}},{}],111:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAssetsCaveatMapper=n.assetsEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils"),o=e("./caveats/index.cjs"),a=e("./enum.cjs").SnapEndowments.Assets;n.assetsEndowmentBuilder=Object.freeze({targetName:a,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:a,allowedCaveats:[i.SnapCaveatType.ChainIds],endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap],validator:(0,o.createGenericPermissionValidator)([{type:i.SnapCaveatType.ChainIds},{type:i.SnapCaveatType.MaxRequestTime,optional:!0}])})}),n.getAssetsCaveatMapper=function(e){return(0,s.assert)((0,s.isObject)(e)&&e.scopes),{caveats:[{type:i.SnapCaveatType.ChainIds,value:e.scopes}]}}},{"./caveats/index.cjs":113,"./enum.cjs":116,"@metamask/permission-controller":79,"@metamask/snaps-utils":280,"@metamask/utils":318}],112:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createGenericPermissionValidator=void 0;const r=e("@metamask/rpc-errors");n.createGenericPermissionValidator=function(e){const t=new Set(e.map((e=>e.type))),n=e.filter((e=>!e.optional));return function({caveats:i}){const s=i??[],o=s.map((e=>e.type)),a=new Set(o);if(a.size!==o.length)throw r.rpcErrors.invalidParams({message:"Duplicate caveats are not allowed."});if(!s.every((e=>t.has(e.type))))throw r.rpcErrors.invalidParams({message:`Expected the following caveats: ${e.map((e=>`"${e.type}"`)).join(", ")}, received ${s.map((e=>`"${e.type}"`)).join(", ")}.`});if(!n.every((e=>a.has(e.type))))throw r.rpcErrors.invalidParams({message:`Expected the following caveats: ${n.map((e=>`"${e.type}"`)).join(", ")}.`})}}},{"@metamask/rpc-errors":96}],113:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./generic.cjs"),n),i(e("./requestTime.cjs"),n)},{"./generic.cjs":112,"./requestTime.cjs":114}],114:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.maxRequestTimeCaveatSpecifications=n.getMaxRequestTimeCaveat=n.createMaxRequestTimeMapper=n.getMaxRequestTimeCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils");function o(e){if(!(0,s.hasProperty)(e,"value"))throw r.rpcErrors.invalidParams({message:"Invalid maxRequestTime caveat."});const{value:t}=e;!function(e,t){(0,s.assertStruct)(e,i.MaxRequestTimeStruct,"Invalid maxRequestTime",t)}(t,r.rpcErrors.invalidParams)}n.getMaxRequestTimeCaveatMapper=function(e){return!e||!(0,s.isObject)(e)||(0,s.isObject)(e)&&!(0,s.hasProperty)(e,"maxRequestTime")?{caveats:null}:{caveats:[{type:i.SnapCaveatType.MaxRequestTime,value:e.maxRequestTime}]}},n.createMaxRequestTimeMapper=function(e){return function(t){const{maxRequestTime:n,...r}=t,s=e(r);return n?{...s,caveats:[...s.caveats??[],{type:i.SnapCaveatType.MaxRequestTime,value:n}]}:s}},n.getMaxRequestTimeCaveat=function(e){const t=e?.caveats?.find((e=>e.type===i.SnapCaveatType.MaxRequestTime));return t?.value??null},n.maxRequestTimeCaveatSpecifications={[i.SnapCaveatType.MaxRequestTime]:Object.freeze({type:i.SnapCaveatType.MaxRequestTime,validator:e=>o(e)})}},{"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],115:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.cronjobCaveatSpecifications=n.validateCronjobCaveat=n.getCronjobCaveatJobs=n.getCronjobCaveatMapper=n.cronjobEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Cronjob;function u(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e.value))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;if(!(0,o.hasProperty)(t,"jobs")||!(0,o.isPlainObject)(t))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});if(!(0,s.isCronjobSpecificationArray)(t.jobs))throw i.rpcErrors.invalidParams({message:"Expected a valid cronjob specification array."})}n.cronjobEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.SnapCronjob],endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap],validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.SnapCronjob,optional:!0},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}])})}),n.getCronjobCaveatMapper=function(e){return e&&(0,o.isObject)(e)&&0!==Object.keys(e).length?{caveats:[{type:s.SnapCaveatType.SnapCronjob,value:e}]}:{caveats:null}},n.getCronjobCaveatJobs=function(e){if(!e?.caveats)return null;(0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.SnapCronjob);const t=e.caveats[0];return t.value?.jobs??null},n.validateCronjobCaveat=u,n.cronjobCaveatSpecifications={[s.SnapCaveatType.SnapCronjob]:Object.freeze({type:s.SnapCaveatType.SnapCronjob,validator:e=>u(e)})}},{"./caveats/index.cjs":113,"./enum.cjs":116,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],116:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.SnapEndowments=void 0,function(e){e.NetworkAccess="endowment:network-access",e.SignatureInsight="endowment:signature-insight",e.TransactionInsight="endowment:transaction-insight",e.Cronjob="endowment:cronjob",e.EthereumProvider="endowment:ethereum-provider",e.Rpc="endowment:rpc",e.WebAssemblyAccess="endowment:webassembly",e.NameLookup="endowment:name-lookup",e.LifecycleHooks="endowment:lifecycle-hooks",e.Keyring="endowment:keyring",e.HomePage="endowment:page-home",e.SettingsPage="endowment:page-settings",e.Assets="endowment:assets",e.Protocol="endowment:protocol"}(r||(n.SnapEndowments=r={}))},{}],117:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ethereumProviderEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.EthereumProvider;n.ethereumProviderEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>["ethereum"],subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":116,"@metamask/permission-controller":79}],118:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.homePageEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.HomePage;n.homePageEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":116,"@metamask/permission-controller":79}],119:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.getProtocolCaveatScopes=n.getCronjobCaveatJobs=n.getMaxRequestTimeCaveat=n.getKeyringCaveatOrigins=n.getLookupMatchersCaveat=n.getChainIdsCaveat=n.getTransactionOriginCaveat=n.getSignatureOriginCaveat=n.getRpcCaveatOrigins=n.handlerEndowments=n.endowmentCaveatMappers=n.endowmentCaveatSpecifications=n.endowmentPermissionBuilders=void 0;const s=e("@metamask/snaps-utils"),o=e("./assets.cjs"),a=e("./caveats/index.cjs"),c=e("./cronjob.cjs"),u=e("./ethereum-provider.cjs"),l=e("./home-page.cjs"),d=e("./keyring.cjs"),h=e("./lifecycle-hooks.cjs"),p=e("./name-lookup.cjs"),f=e("./network-access.cjs"),m=e("./protocol.cjs"),y=e("./rpc.cjs"),g=e("./settings-page.cjs"),b=e("./signature-insight.cjs"),v=e("./transaction-insight.cjs"),w=e("./web-assembly.cjs");n.endowmentPermissionBuilders={[f.networkAccessEndowmentBuilder.targetName]:f.networkAccessEndowmentBuilder,[v.transactionInsightEndowmentBuilder.targetName]:v.transactionInsightEndowmentBuilder,[c.cronjobEndowmentBuilder.targetName]:c.cronjobEndowmentBuilder,[u.ethereumProviderEndowmentBuilder.targetName]:u.ethereumProviderEndowmentBuilder,[y.rpcEndowmentBuilder.targetName]:y.rpcEndowmentBuilder,[w.webAssemblyEndowmentBuilder.targetName]:w.webAssemblyEndowmentBuilder,[p.nameLookupEndowmentBuilder.targetName]:p.nameLookupEndowmentBuilder,[h.lifecycleHooksEndowmentBuilder.targetName]:h.lifecycleHooksEndowmentBuilder,[d.keyringEndowmentBuilder.targetName]:d.keyringEndowmentBuilder,[g.settingsPageEndowmentBuilder.targetName]:g.settingsPageEndowmentBuilder,[m.protocolEndowmentBuilder.targetName]:m.protocolEndowmentBuilder,[l.homePageEndowmentBuilder.targetName]:l.homePageEndowmentBuilder,[b.signatureInsightEndowmentBuilder.targetName]:b.signatureInsightEndowmentBuilder,[o.assetsEndowmentBuilder.targetName]:o.assetsEndowmentBuilder},n.endowmentCaveatSpecifications={...c.cronjobCaveatSpecifications,...v.transactionInsightCaveatSpecifications,...y.rpcCaveatSpecifications,...p.nameLookupCaveatSpecifications,...d.keyringCaveatSpecifications,...b.signatureInsightCaveatSpecifications,...a.maxRequestTimeCaveatSpecifications,...m.protocolCaveatSpecifications},n.endowmentCaveatMappers={[c.cronjobEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(c.getCronjobCaveatMapper),[v.transactionInsightEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(v.getTransactionInsightCaveatMapper),[y.rpcEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(y.getRpcCaveatMapper),[p.nameLookupEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(p.getNameLookupCaveatMapper),[d.keyringEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(d.getKeyringCaveatMapper),[m.protocolEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(m.getProtocolCaveatMapper),[b.signatureInsightEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(b.getSignatureInsightCaveatMapper),[h.lifecycleHooksEndowmentBuilder.targetName]:a.getMaxRequestTimeCaveatMapper,[l.homePageEndowmentBuilder.targetName]:a.getMaxRequestTimeCaveatMapper,[g.settingsPageEndowmentBuilder.targetName]:a.getMaxRequestTimeCaveatMapper,[o.assetsEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(o.getAssetsCaveatMapper)},n.handlerEndowments={[s.HandlerType.OnRpcRequest]:y.rpcEndowmentBuilder.targetName,[s.HandlerType.OnTransaction]:v.transactionInsightEndowmentBuilder.targetName,[s.HandlerType.OnCronjob]:c.cronjobEndowmentBuilder.targetName,[s.HandlerType.OnNameLookup]:p.nameLookupEndowmentBuilder.targetName,[s.HandlerType.OnInstall]:h.lifecycleHooksEndowmentBuilder.targetName,[s.HandlerType.OnUpdate]:h.lifecycleHooksEndowmentBuilder.targetName,[s.HandlerType.OnKeyringRequest]:d.keyringEndowmentBuilder.targetName,[s.HandlerType.OnHomePage]:l.homePageEndowmentBuilder.targetName,[s.HandlerType.OnSettingsPage]:g.settingsPageEndowmentBuilder.targetName,[s.HandlerType.OnSignature]:b.signatureInsightEndowmentBuilder.targetName,[s.HandlerType.OnUserInput]:null,[s.HandlerType.OnAssetsLookup]:o.assetsEndowmentBuilder.targetName,[s.HandlerType.OnAssetsConversion]:o.assetsEndowmentBuilder.targetName,[s.HandlerType.OnProtocolRequest]:m.protocolEndowmentBuilder.targetName},i(e("./enum.cjs"),n);var x=e("./rpc.cjs");Object.defineProperty(n,"getRpcCaveatOrigins",{enumerable:!0,get:function(){return x.getRpcCaveatOrigins}});var E=e("./signature-insight.cjs");Object.defineProperty(n,"getSignatureOriginCaveat",{enumerable:!0,get:function(){return E.getSignatureOriginCaveat}});var S=e("./transaction-insight.cjs");Object.defineProperty(n,"getTransactionOriginCaveat",{enumerable:!0,get:function(){return S.getTransactionOriginCaveat}});var A=e("./name-lookup.cjs");Object.defineProperty(n,"getChainIdsCaveat",{enumerable:!0,get:function(){return A.getChainIdsCaveat}}),Object.defineProperty(n,"getLookupMatchersCaveat",{enumerable:!0,get:function(){return A.getLookupMatchersCaveat}});var _=e("./keyring.cjs");Object.defineProperty(n,"getKeyringCaveatOrigins",{enumerable:!0,get:function(){return _.getKeyringCaveatOrigins}});var T=e("./caveats/index.cjs");Object.defineProperty(n,"getMaxRequestTimeCaveat",{enumerable:!0,get:function(){return T.getMaxRequestTimeCaveat}});var k=e("./cronjob.cjs");Object.defineProperty(n,"getCronjobCaveatJobs",{enumerable:!0,get:function(){return k.getCronjobCaveatJobs}});var C=e("./protocol.cjs");Object.defineProperty(n,"getProtocolCaveatScopes",{enumerable:!0,get:function(){return C.getProtocolCaveatScopes}})},{"./assets.cjs":111,"./caveats/index.cjs":113,"./cronjob.cjs":115,"./enum.cjs":116,"./ethereum-provider.cjs":117,"./home-page.cjs":118,"./keyring.cjs":120,"./lifecycle-hooks.cjs":121,"./name-lookup.cjs":122,"./network-access.cjs":123,"./protocol.cjs":124,"./rpc.cjs":125,"./settings-page.cjs":126,"./signature-insight.cjs":127,"./transaction-insight.cjs":128,"./web-assembly.cjs":129,"@metamask/snaps-utils":280}],120:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.keyringCaveatSpecifications=n.getKeyringCaveatOrigins=n.getKeyringCaveatMapper=n.keyringEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Keyring;n.keyringEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.KeyringOrigin,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.KeyringOrigin},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getKeyringCaveatMapper=function(e){return{caveats:[{type:s.SnapCaveatType.KeyringOrigin,value:e}]}},n.getKeyringCaveatOrigins=function(e){return(0,o.assert)(e?.caveats),(0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.KeyringOrigin),e.caveats[0].value},n.keyringCaveatSpecifications={[s.SnapCaveatType.KeyringOrigin]:Object.freeze({type:s.SnapCaveatType.KeyringOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e.value))throw i.rpcErrors.invalidParams({message:"Invalid keyring origins: Expected a plain object."});const{value:t}=e;(0,s.assertIsKeyringOrigins)(t,i.rpcErrors.invalidParams)}(e)})}},{"./caveats/index.cjs":113,"./enum.cjs":116,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],121:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.lifecycleHooksEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.LifecycleHooks;n.lifecycleHooksEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":116,"@metamask/permission-controller":79}],122:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.nameLookupCaveatSpecifications=n.getLookupMatchersCaveat=n.getChainIdsCaveat=n.getNameLookupCaveatMapper=n.nameLookupEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.NameLookup;function u(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;switch(e.type){case s.SnapCaveatType.ChainIds:(0,o.assertStruct)(t,s.ChainIdsStruct);break;case s.SnapCaveatType.LookupMatchers:(0,o.assertStruct)(t,s.LookupMatchersStruct);break;default:throw i.rpcErrors.invalidParams({message:'Invalid caveat type, must be one of the following: "chainIds", "matchers".'})}}n.nameLookupEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.ChainIds,s.SnapCaveatType.LookupMatchers,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.ChainIds,optional:!0},{type:s.SnapCaveatType.LookupMatchers,optional:!0},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getNameLookupCaveatMapper=function(e){if(!e||!(0,o.isObject)(e)||0===Object.keys(e).length)return{caveats:null};const t=[];return e.chains&&t.push({type:s.SnapCaveatType.ChainIds,value:e.chains}),e.matchers&&t.push({type:s.SnapCaveatType.LookupMatchers,value:e.matchers}),(0,o.assert)(t.length>0),{caveats:t}},n.getChainIdsCaveat=function(e){if(!e?.caveats)return null;const t=e.caveats.find((e=>e.type===s.SnapCaveatType.ChainIds));return t?t.value:null},n.getLookupMatchersCaveat=function(e){if(!e?.caveats)return null;const t=e.caveats.find((e=>e.type===s.SnapCaveatType.LookupMatchers));return t?t.value:null},n.nameLookupCaveatSpecifications={[s.SnapCaveatType.ChainIds]:Object.freeze({type:s.SnapCaveatType.ChainIds,validator:e=>u(e)}),[s.SnapCaveatType.LookupMatchers]:Object.freeze({type:s.SnapCaveatType.LookupMatchers,validator:e=>u(e)})}},{"./caveats/index.cjs":113,"./enum.cjs":116,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],123:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.networkAccessEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.NetworkAccess;n.networkAccessEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>["fetch","Request","Headers","Response"],subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":116,"@metamask/permission-controller":79}],124:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.protocolCaveatSpecifications=n.getProtocolCaveatScopes=n.getProtocolCaveatMapper=n.protocolEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Protocol;n.protocolEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.ProtocolSnapScopes,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.ProtocolSnapScopes},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getProtocolCaveatMapper=function(e){if(!e||!(0,o.isObject)(e)||0===Object.keys(e).length)return{caveats:null};const t=[];return e.scopes&&t.push({type:s.SnapCaveatType.ProtocolSnapScopes,value:e.scopes}),{caveats:t}},n.getProtocolCaveatScopes=function(e){const t=e?.caveats?.find((e=>e.type===s.SnapCaveatType.ProtocolSnapScopes));return t?t.value:null},n.protocolCaveatSpecifications={[s.SnapCaveatType.ProtocolSnapScopes]:Object.freeze({type:s.SnapCaveatType.ProtocolSnapScopes,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;(0,o.assertStruct)(t,s.ProtocolScopesStruct,"Invalid scopes specified",i.rpcErrors.invalidParams)}(e)})}},{"./caveats/index.cjs":113,"./enum.cjs":116,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],125:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.rpcCaveatSpecifications=n.getRpcCaveatOrigins=n.getRpcCaveatMapper=n.rpcEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Rpc;n.rpcEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.RpcOrigin,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.RpcOrigin},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getRpcCaveatMapper=function(e){return{caveats:[{type:s.SnapCaveatType.RpcOrigin,value:e}]}},n.getRpcCaveatOrigins=function(e){const t=e?.caveats?.filter((e=>e.type===s.SnapCaveatType.RpcOrigin));return(0,o.assert)(t),(0,o.assert)(1===t.length),t[0].value},n.rpcCaveatSpecifications={[s.SnapCaveatType.RpcOrigin]:Object.freeze({type:s.SnapCaveatType.RpcOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e.value))throw i.rpcErrors.invalidParams({message:"Invalid JSON-RPC origins: Expected a plain object."});const{value:t}=e;(0,s.assertIsRpcOrigins)(t,i.rpcErrors.invalidParams)}(e)})}},{"./caveats/index.cjs":113,"./enum.cjs":116,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],126:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.settingsPageEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.SettingsPage;n.settingsPageEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":116,"@metamask/permission-controller":79}],127:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.signatureInsightCaveatSpecifications=n.getSignatureOriginCaveat=n.getSignatureInsightCaveatMapper=n.signatureInsightEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.SignatureInsight;n.signatureInsightEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.SignatureOrigin],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.SignatureOrigin,optional:!0},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getSignatureInsightCaveatMapper=function(e){return!e||!(0,o.isObject)(e)||(0,o.isObject)(e)&&0===Object.keys(e).length?{caveats:null}:{caveats:[{type:s.SnapCaveatType.SignatureOrigin,value:(0,o.hasProperty)(e,"allowSignatureOrigin")&&e.allowSignatureOrigin}]}},n.getSignatureOriginCaveat=function(e){return e?.caveats?((0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.SignatureOrigin),e.caveats[0].value??null):null},n.signatureInsightCaveatSpecifications={[s.SnapCaveatType.SignatureOrigin]:Object.freeze({type:s.SnapCaveatType.SignatureOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;(0,o.assert)("boolean"==typeof t,'Expected caveat value to have type "boolean"')}(e)})}},{"./caveats/index.cjs":113,"./enum.cjs":116,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],128:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.transactionInsightCaveatSpecifications=n.getTransactionOriginCaveat=n.getTransactionInsightCaveatMapper=n.transactionInsightEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.TransactionInsight;n.transactionInsightEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.TransactionOrigin,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.TransactionOrigin,optional:!0},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getTransactionInsightCaveatMapper=function(e){return!e||!(0,o.isObject)(e)||(0,o.isObject)(e)&&0===Object.keys(e).length?{caveats:null}:{caveats:[{type:s.SnapCaveatType.TransactionOrigin,value:(0,o.hasProperty)(e,"allowTransactionOrigin")&&e.allowTransactionOrigin}]}},n.getTransactionOriginCaveat=function(e){return e?.caveats?((0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.TransactionOrigin),e.caveats[0].value??null):null},n.transactionInsightCaveatSpecifications={[s.SnapCaveatType.TransactionOrigin]:Object.freeze({type:s.SnapCaveatType.TransactionOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;(0,o.assert)("boolean"==typeof t,'Expected caveat value to have type "boolean"')}(e)})}},{"./caveats/index.cjs":113,"./enum.cjs":116,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],129:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.webAssemblyEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.WebAssemblyAccess;n.webAssemblyEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>["WebAssembly"],subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":116,"@metamask/permission-controller":79}],130:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.selectHooks=n.SnapCaveatType=n.createSnapsMethodMiddleware=n.permittedMethods=void 0;var s=e("./permitted/index.cjs");Object.defineProperty(n,"permittedMethods",{enumerable:!0,get:function(){return s.handlers}}),Object.defineProperty(n,"createSnapsMethodMiddleware",{enumerable:!0,get:function(){return s.createSnapsMethodMiddleware}});var o=e("@metamask/snaps-utils");Object.defineProperty(n,"SnapCaveatType",{enumerable:!0,get:function(){return o.SnapCaveatType}});var a=e("./utils.cjs");Object.defineProperty(n,"selectHooks",{enumerable:!0,get:function(){return a.selectHooks}}),i(e("./endowments/index.cjs"),n),i(e("./permissions.cjs"),n),i(e("./restricted/index.cjs"),n)},{"./endowments/index.cjs":119,"./permissions.cjs":131,"./permitted/index.cjs":146,"./restricted/index.cjs":167,"./utils.cjs":172,"@metamask/snaps-utils":280}],131:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.buildSnapRestrictedMethodSpecifications=n.buildSnapEndowmentSpecifications=n.processSnapPermissions=void 0;const r=e("@metamask/utils"),i=e("./endowments/index.cjs"),s=e("./restricted/index.cjs"),o=e("./utils.cjs");n.processSnapPermissions=function(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>(0,r.hasProperty)(s.caveatMappers,e)?[e,s.caveatMappers[e](t)]:(0,r.hasProperty)(i.endowmentCaveatMappers,e)?[e,i.endowmentCaveatMappers[e](t)]:[e,t])))};n.buildSnapEndowmentSpecifications=e=>Object.values(i.endowmentPermissionBuilders).reduce(((t,{targetName:n,specificationBuilder:r})=>(e.includes(n)||(t[n]=r({})),t)),{});n.buildSnapRestrictedMethodSpecifications=(e,t)=>Object.values(s.restrictedMethodPermissionBuilders).reduce(((n,{targetName:r,specificationBuilder:i,methodHooks:s})=>(e.includes(r)||(n[r]=i({methodHooks:(0,o.selectHooks)(t,s)})),n)),{})},{"./endowments/index.cjs":119,"./restricted/index.cjs":167,"./utils.cjs":172,"@metamask/utils":318}],132:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.cancelBackgroundEventHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("../endowments/index.cjs");n.cancelBackgroundEventHandler={methodNames:["snap_cancelBackgroundEvent"],implementation:async function(e,t,n,a,{cancelBackgroundEvent:c,hasPermission:u}){const{params:l}=e;if(!u(s.SnapEndowments.Cronjob))return a(r.providerErrors.unauthorized());try{const e=function(e){try{return(0,i.create)(e,o)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(l),{id:n}=e;c(n),t.result=null}catch(e){return a(e)}return a()},hookNames:{cancelBackgroundEvent:!0,hasPermission:!0}};const o=(0,i.object)({id:(0,i.string)()})},{"../endowments/index.cjs":119,"@metamask/rpc-errors":96,"@metamask/superstruct":301}],133:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.clearStateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("../restricted/manageState.cjs");n.clearStateHandler={methodNames:["snap_clearState"],implementation:async function(e,t,n,a,{clearSnapState:c,hasPermission:u}){const{params:l}=e;if(!u(s.manageStateBuilder.targetName))return a(r.providerErrors.unauthorized());try{const e=function(e){try{return(0,i.create)(e,o)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(l),{encrypted:n=!0}=e;c(n),t.result=null}catch(e){return a(e)}return a()},hookNames:{clearSnapState:!0,hasPermission:!0}};const o=(0,i.object)({encrypted:(0,i.optional)((0,i.boolean)())})},{"../restricted/manageState.cjs":170,"@metamask/rpc-errors":96,"@metamask/superstruct":301}],134:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createInterfaceHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),s=e("@metamask/superstruct");n.createInterfaceHandler={methodNames:["snap_createInterface"],implementation:async function(e,t,n,i,{createInterface:a}){const{params:c}=e;try{const e=function(e){try{return(0,s.create)(e,o)}catch(e){if(e instanceof s.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{ui:n,context:i}=e;t.result=await a(n,i)}catch(e){return i(e)}return i()},hookNames:{createInterface:!0}};const o=(0,s.object)({ui:i.ComponentOrElementStruct,context:(0,s.optional)(i.InterfaceContextStruct)})},{"@metamask/rpc-errors":96,"@metamask/snaps-sdk":176,"@metamask/superstruct":301}],135:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.providerRequestHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("../endowments/index.cjs"),a=Object.freeze(["eth_blockNumber","eth_call","eth_chainId","eth_coinbase","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getWork","eth_hashrate","eth_mining","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_protocolVersion","eth_sendRawTransaction","eth_submitHashrate","eth_submitWork","eth_syncing","eth_uninstallFilter","net_listening","net_peerCount","net_version","web3_clientVersion","web3_sha3"]);n.providerRequestHandler={methodNames:["snap_experimentalProviderRequest"],implementation:async function(e,t,n,u,{hasPermission:l,getNetworkConfigurationByChainId:d,getNetworkClientById:h}){if(!l(o.SnapEndowments.EthereumProvider))return u(r.rpcErrors.methodNotFound());const{params:p}=e;try{const{chainId:e,request:n}=function(e){try{return(0,i.create)(e,c)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(p);if(!a.includes(n.method))return u(r.rpcErrors.methodNotFound());const o=(0,s.parseCaipChainId)(e);if("eip155"!==o.namespace)return u(r.rpcErrors.invalidParams({message:"Only EVM networks are currently supported."}));const l=BigInt(o.reference),f=d((0,s.bigIntToHex)(l));if(!f)return u(r.rpcErrors.invalidParams({message:"The requested network is not available."}));const m=h(f.rpcEndpoints[f.defaultRpcEndpointIndex].networkClientId),{provider:y}=m;t.result=await y.request(n)}catch(e){return u(e)}return u()},hookNames:{hasPermission:!0,getNetworkConfigurationByChainId:!0,getNetworkClientById:!0}};const c=(0,i.object)({chainId:s.CaipChainIdStruct,request:(0,i.type)({method:(0,i.string)(),params:(0,i.optional)(s.JsonRpcParamsStruct)})})},{"../endowments/index.cjs":119,"@metamask/rpc-errors":96,"@metamask/superstruct":301,"@metamask/utils":318}],136:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAllSnapsHandler=void 0;const r=e("@metamask/rpc-errors");n.getAllSnapsHandler={methodNames:["wallet_getAllSnaps"],implementation:async function(e,t,n,i,{getAllSnaps:s}){const{origin:o}=e;if("https://snaps.metamask.io"!==o)return i(r.rpcErrors.methodNotFound());return t.result=await s(),i()},hookNames:{getAllSnaps:!0}}},{"@metamask/rpc-errors":96}],137:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBackgroundEventsHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("../endowments/index.cjs");n.getBackgroundEventsHandler={methodNames:["snap_getBackgroundEvents"],implementation:async function(e,t,n,s,{getBackgroundEvents:o,hasPermission:a}){if(!a(i.SnapEndowments.Cronjob))return s(r.providerErrors.unauthorized());try{const e=o();t.result=e}catch(e){return s(e)}return s()},hookNames:{getBackgroundEvents:!0,hasPermission:!0}}},{"../endowments/index.cjs":119,"@metamask/rpc-errors":96}],138:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getClientStatusHandler=void 0;n.getClientStatusHandler={methodNames:["snap_getClientStatus"],implementation:async function(e,t,n,r,{getIsLocked:i}){return t.result={locked:i()},r()},hookNames:{getIsLocked:!0}}},{}],139:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCurrencyRateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/superstruct");n.getCurrencyRateHandler={methodNames:["snap_getCurrencyRate"],implementation:function(e,t,n,i,{getCurrencyRate:a}){const{params:c}=e;try{const e=function(e){try{return(0,s.create)(e,o)}catch(e){if(e instanceof s.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{currency:n}=e;t.result=a(n)??null}catch(e){return i(e)}return i()},hookNames:{getCurrencyRate:!0}};const o=(0,s.object)({currency:(0,s.union)([(0,i.currency)("btc")])})},{"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/superstruct":301}],140:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getFileHandler=n.GetFileArgsStruct=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),s=e("@metamask/superstruct"),o=e("@metamask/utils");n.GetFileArgsStruct=(0,s.object)({path:(0,s.string)(),encoding:(0,s.optional)((0,s.union)([(0,i.enumValue)(i.AuxiliaryFileEncoding.Base64),(0,i.enumValue)(i.AuxiliaryFileEncoding.Hex),(0,i.enumValue)(i.AuxiliaryFileEncoding.Utf8)]))});n.getFileHandler={methodNames:["snap_getFile"],implementation:async function(e,t,s,a,{getSnapFile:c}){const{params:u}=e;(0,o.assertStruct)(u,n.GetFileArgsStruct,'Invalid "snap_getFile" parameters',r.rpcErrors.invalidParams);try{t.result=await c(u.path,u.encoding??i.AuxiliaryFileEncoding.Base64)}catch(e){return a(e)}return a()},hookNames:{getSnapFile:!0}}},{"@metamask/rpc-errors":96,"@metamask/snaps-sdk":176,"@metamask/superstruct":301,"@metamask/utils":318}],141:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getInterfaceContextHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct");n.getInterfaceContextHandler={methodNames:["snap_getInterfaceContext"],implementation:function(e,t,n,o,{getInterfaceContext:a}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,s)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n}=e;t.result=a(n)}catch(e){return o(e)}return o()},hookNames:{getInterfaceContext:!0}};const s=(0,i.object)({id:(0,i.string)()})},{"@metamask/rpc-errors":96,"@metamask/superstruct":301}],142:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getInterfaceStateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct");n.getInterfaceStateHandler={methodNames:["snap_getInterfaceState"],implementation:function(e,t,n,o,{getInterfaceState:a}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,s)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n}=e;t.result=a(n)}catch(e){return o(e)}return o()},hookNames:{getInterfaceState:!0}};const s=(0,i.object)({id:(0,i.string)()})},{"@metamask/rpc-errors":96,"@metamask/superstruct":301}],143:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSnapsHandler=void 0;n.getSnapsHandler={methodNames:["wallet_getSnaps"],implementation:async function(e,t,n,r,{getSnaps:i}){return t.result=await i(),r()},hookNames:{getSnaps:!0}}},{}],144:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.get=n.getStateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("../restricted/manageState.cjs"),a=e("../utils.cjs");n.getStateHandler={methodNames:["snap_getState"],implementation:async function(e,t,n,s,{hasPermission:a,getSnapState:l,getUnlockPromise:d}){const{params:h}=e;if(!a(o.manageStateBuilder.targetName))return s(r.providerErrors.unauthorized());try{const e=function(e){try{return(0,i.create)(e,c)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(h),{key:n,encrypted:s=!0}=e;s&&await d(!0);const o=await l(s);t.result=u(o,n)}catch(e){return s(e)}return s()},hookNames:{hasPermission:!0,getSnapState:!0,getUnlockPromise:!0}};const c=(0,i.object)({key:(0,i.optional)(a.StateKeyStruct),encrypted:(0,i.optional)((0,i.boolean)())});function u(e,t){if(void 0===t)return e;const n=t.split(".");let i=e;for(let e=0;e<n.length;e++){const t=n[e];if(a.FORBIDDEN_KEYS.includes(t))throw r.rpcErrors.invalidParams("Invalid params: Key contains forbidden characters.");if(!(0,s.isObject)(i))return null;if(!(0,s.hasProperty)(i,t))return null;i=i[t]}return i}n.get=u},{"../restricted/manageState.cjs":170,"../utils.cjs":172,"@metamask/rpc-errors":96,"@metamask/superstruct":301,"@metamask/utils":318}],145:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.handlers=n.methodHandlers=void 0;const r=e("./cancelBackgroundEvent.cjs"),i=e("./clearState.cjs"),s=e("./createInterface.cjs"),o=e("./experimentalProviderRequest.cjs"),a=e("./getAllSnaps.cjs"),c=e("./getBackgroundEvents.cjs"),u=e("./getClientStatus.cjs"),l=e("./getCurrencyRate.cjs"),d=e("./getFile.cjs"),h=e("./getInterfaceContext.cjs"),p=e("./getInterfaceState.cjs"),f=e("./getSnaps.cjs"),m=e("./getState.cjs"),y=e("./invokeKeyring.cjs"),g=e("./invokeSnapSugar.cjs"),b=e("./listEntropySources.cjs"),v=e("./requestSnaps.cjs"),w=e("./resolveInterface.cjs"),x=e("./scheduleBackgroundEvent.cjs"),E=e("./setState.cjs"),S=e("./updateInterface.cjs");n.methodHandlers={wallet_getAllSnaps:a.getAllSnapsHandler,wallet_getSnaps:f.getSnapsHandler,wallet_requestSnaps:v.requestSnapsHandler,wallet_invokeSnap:g.invokeSnapSugarHandler,wallet_invokeKeyring:y.invokeKeyringHandler,snap_clearState:i.clearStateHandler,snap_getClientStatus:u.getClientStatusHandler,snap_getFile:d.getFileHandler,snap_getState:m.getStateHandler,snap_createInterface:s.createInterfaceHandler,snap_updateInterface:S.updateInterfaceHandler,snap_getInterfaceState:p.getInterfaceStateHandler,snap_getInterfaceContext:h.getInterfaceContextHandler,snap_listEntropySources:b.listEntropySourcesHandler,snap_resolveInterface:w.resolveInterfaceHandler,snap_getCurrencyRate:l.getCurrencyRateHandler,snap_experimentalProviderRequest:o.providerRequestHandler,snap_scheduleBackgroundEvent:x.scheduleBackgroundEventHandler,snap_cancelBackgroundEvent:r.cancelBackgroundEventHandler,snap_getBackgroundEvents:c.getBackgroundEventsHandler,snap_setState:E.setStateHandler},n.handlers=Object.values(n.methodHandlers)},{"./cancelBackgroundEvent.cjs":132,"./clearState.cjs":133,"./createInterface.cjs":134,"./experimentalProviderRequest.cjs":135,"./getAllSnaps.cjs":136,"./getBackgroundEvents.cjs":137,"./getClientStatus.cjs":138,"./getCurrencyRate.cjs":139,"./getFile.cjs":140,"./getInterfaceContext.cjs":141,"./getInterfaceState.cjs":142,"./getSnaps.cjs":143,"./getState.cjs":144,"./invokeKeyring.cjs":147,"./invokeSnapSugar.cjs":148,"./listEntropySources.cjs":149,"./requestSnaps.cjs":151,"./resolveInterface.cjs":152,"./scheduleBackgroundEvent.cjs":153,"./setState.cjs":154,"./updateInterface.cjs":155}],146:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./handlers.cjs"),n),i(e("./middleware.cjs"),n)},{"./handlers.cjs":145,"./middleware.cjs":150}],147:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.invokeKeyringHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils"),o=e("./invokeSnapSugar.cjs");n.invokeKeyringHandler={methodNames:["wallet_invokeKeyring"],implementation:async function(e,t,n,a,{handleSnapRpcRequest:c,hasPermission:u,getSnap:l,getAllowedKeyringMethods:d}){let h;try{h=(0,o.getValidatedParams)(e.params)}catch(e){return a(e)}const{origin:p}=e,{snapId:f,request:m}=h;if(!p||!u(i.WALLET_SNAP_PERMISSION_KEY))return a(r.rpcErrors.invalidRequest({message:`The snap "${f}" is not connected to "${p}". Please connect before invoking the snap.`}));if(!l(f))return a(r.rpcErrors.invalidRequest({message:`The snap "${f}" is not installed. Please install it first, before invoking the snap.`}));if(!(0,s.hasProperty)(m,"method")||"string"!=typeof m.method)return a(r.rpcErrors.invalidRequest({message:"The request must have a method."}));if(!d().includes(m.method))return a(r.rpcErrors.invalidRequest({message:`The origin "${p}" is not allowed to invoke the method "${m.method}".`}));try{t.result=await c({snapId:f,request:m,handler:i.HandlerType.OnKeyringRequest})}catch(e){return a(e)}return a()},hookNames:{hasPermission:!0,handleSnapRpcRequest:!0,getSnap:!0,getAllowedKeyringMethods:!0}}},{"./invokeSnapSugar.cjs":148,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],148:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.invokeSnapSugar=n.invokeSnapSugarHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/utils");async function s(e,t,n,r,{invokeSnap:i}){try{const n=o(e.params);t.result=await i(n)}catch(e){return r(e)}return r()}function o(e){if(!(0,i.isObject)(e))throw r.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{snapId:t,request:n}=e;if(!t||"string"!=typeof t||""===t)throw r.rpcErrors.invalidParams({message:"Must specify a valid snap ID."});if(!(0,i.isObject)(n))throw r.rpcErrors.invalidParams({message:"Expected request to be a single object."});return e}n.invokeSnapSugarHandler={methodNames:["wallet_invokeSnap"],implementation:s,hookNames:{invokeSnap:!0}},n.invokeSnapSugar=s,n.getValidatedParams=o},{"@metamask/rpc-errors":96,"@metamask/utils":318}],149:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.listEntropySourcesHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("../restricted/getBip32Entropy.cjs"),s=e("../restricted/getBip32PublicKey.cjs"),o=e("../restricted/getBip44Entropy.cjs"),a=e("../restricted/getEntropy.cjs"),c=[i.getBip32EntropyBuilder.targetName,s.getBip32PublicKeyBuilder.targetName,o.getBip44EntropyBuilder.targetName,a.getEntropyBuilder.targetName];n.listEntropySourcesHandler={methodNames:["snap_listEntropySources"],implementation:async function(e,t,n,i,{hasPermission:s,getEntropySources:o,getUnlockPromise:a}){if(!c.some(s))return i(r.providerErrors.unauthorized());return await a(!0),t.result=o(),i()},hookNames:{hasPermission:!0,getEntropySources:!0,getUnlockPromise:!0}}},{"../restricted/getBip32Entropy.cjs":161,"../restricted/getBip32PublicKey.cjs":162,"../restricted/getBip44Entropy.cjs":163,"../restricted/getEntropy.cjs":164,"@metamask/rpc-errors":96}],150:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapsMethodMiddleware=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("./handlers.cjs"),o=e("../utils.cjs");n.createSnapsMethodMiddleware=function(e,t){return async function(n,a,c,u){const l=s.methodHandlers[n.method];if(l){if(String.prototype.startsWith.call(n.method,"snap_")&&!e)return u(r.rpcErrors.methodNotFound());const{implementation:s,hookNames:d}=l;try{return await s(n,a,c,u,(0,o.selectHooks)(t,d))}catch(e){return(0,i.logError)(e),u(e)}}return c()}}},{"../utils.cjs":172,"./handlers.cjs":145,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280}],151:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSnapPermissionsRequest=n.hasRequestedSnaps=n.requestSnapsHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils"),o=e("../restricted/invokeSnap.cjs");function a(e,t){const n=e[o.WALLET_SNAP_PERMISSION_KEY]?.caveats?.find((e=>e.type===i.SnapCaveatType.SnapIds)),r=n?.value;return!!(0,s.isObject)(r)&&Object.keys(t).every((e=>(0,s.hasProperty)(r,e)))}function c(e,t){if((0,i.verifyRequestedSnapPermissions)(t),!e[o.WALLET_SNAP_PERMISSION_KEY])return t;const n=e[o.WALLET_SNAP_PERMISSION_KEY].caveats?.find((e=>e.type===i.SnapCaveatType.SnapIds)),r=n?.value??{},s=t[o.WALLET_SNAP_PERMISSION_KEY].caveats[0].value,a=[...new Set([...Object.keys(r),...Object.keys(s)])].reduce(((e,t)=>(e[t]=s[t]??r[t],e)),{});return t[o.WALLET_SNAP_PERMISSION_KEY].caveats[0].value=a,t}n.requestSnapsHandler={methodNames:["wallet_requestSnaps"],implementation:async function(e,t,n,u,{installSnaps:l,requestPermissions:d,getPermissions:h}){const p=e.params;if(!(0,s.isObject)(p))return u(r.rpcErrors.invalidParams({message:'"params" must be an object.'}));try{if(0===Object.keys(p).length)return u(r.rpcErrors.invalidParams({message:"Request must have at least one requested snap."}));const e={[o.WALLET_SNAP_PERMISSION_KEY]:{caveats:[{type:i.SnapCaveatType.SnapIds,value:p}]}},n=await h();if(n)if(a(n,p))t.result=await l(p);else{const r=c(n,e),[,i]=await d(r);t.result=i.data[o.WALLET_SNAP_PERMISSION_KEY]}else{const[,n]=await d(e);t.result=n.data[o.WALLET_SNAP_PERMISSION_KEY]}}catch(e){t.error=e}return u()},hookNames:{installSnaps:!0,requestPermissions:!0,getPermissions:!0}},n.hasRequestedSnaps=a,n.getSnapPermissionsRequest=c},{"../restricted/invokeSnap.cjs":168,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],152:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.resolveInterfaceHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("@metamask/utils");n.resolveInterfaceHandler={methodNames:["snap_resolveInterface"],implementation:async function(e,t,n,s,{resolveInterface:a}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,o)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n,value:s}=e;await a(n,s),t.result=null}catch(e){return s(e)}return s()},hookNames:{resolveInterface:!0}};const o=(0,i.object)({id:(0,i.string)(),value:s.JsonStruct})},{"@metamask/rpc-errors":96,"@metamask/superstruct":301,"@metamask/utils":318}],153:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.scheduleBackgroundEventHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),s=e("@metamask/snaps-utils"),o=e("@metamask/superstruct"),a=e("@metamask/utils"),c=e("luxon"),u=e("../endowments/index.cjs");n.scheduleBackgroundEventHandler={methodNames:["snap_scheduleBackgroundEvent"],implementation:async function(e,t,n,i,{scheduleBackgroundEvent:s,hasPermission:l}){const{params:d}=e;if(!l(u.SnapEndowments.Cronjob))return i(r.providerErrors.unauthorized());try{const e=function(e){try{return(0,o.create)(e,p)}catch(e){if(e instanceof o.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(d),{request:n}=e,i=function(e){if("duration"in e)return c.DateTime.fromJSDate(new Date).toUTC().plus(c.Duration.fromISO(e.duration));return c.DateTime.fromISO(e.date,{setZone:!0})}(e),u=i.startOf("second").toISO({suppressMilliseconds:!0});(0,a.assert)(u);const l=s({date:u,request:n});t.result=l}catch(e){return i(e)}return i()},hookNames:{scheduleBackgroundEvent:!0,hasPermission:!0}};const l=/Z|([+-]\d{2}:?\d{2})$/u,d=(0,o.object)({date:(0,o.refine)((0,o.string)(),"date",(e=>c.DateTime.fromISO(e).isValid?!!l.test(e)||"ISO 8601 date must have timezone information":"Not a valid ISO 8601 date")),request:s.CronjobRpcRequestStruct}),h=(0,o.object)({duration:(0,o.refine)((0,o.string)(),"duration",(e=>!!c.Duration.fromISO(e).isValid||"Not a valid ISO 8601 duration")),request:s.CronjobRpcRequestStruct}),p=(0,i.selectiveUnion)((e=>(0,a.hasProperty)(e,"date")?d:h))},{"../endowments/index.cjs":119,"@metamask/rpc-errors":96,"@metamask/snaps-sdk":176,"@metamask/snaps-utils":280,"@metamask/superstruct":301,"@metamask/utils":318,luxon:502}],154:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.set=n.setStateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("../restricted/manageState.cjs"),a=e("../utils.cjs");n.setStateHandler={methodNames:["snap_setState"],implementation:async function(e,t,n,a,{hasPermission:l,getSnapState:d,getUnlockPromise:h,updateSnapState:p}){const{params:f}=e;if(!l(o.manageStateBuilder.targetName))return a(r.providerErrors.unauthorized());try{const e=function(e){try{return(0,i.create)(e,c)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(f),{key:n,value:l,encrypted:m=!0}=e;if(void 0===n&&!(0,s.isObject)(l))return a(r.rpcErrors.invalidParams("Invalid params: Value must be an object if key is not provided."));m&&await h(!0);const y=await async function(e,t,n,r){if(void 0===e)return(0,s.assert)((0,s.isObject)(t)),t;const i=await r(n);return u(i,e,t)}(n,l,m,d);if((0,s.getJsonSize)(y)>o.STORAGE_SIZE_LIMIT)throw r.rpcErrors.invalidParams({message:`Invalid params: The new state must not exceed ${o.STORAGE_SIZE_LIMIT/1e6} MB in size.`});await p(y,m),t.result=null}catch(e){return a(e)}return a()},hookNames:{hasPermission:!0,getSnapState:!0,getUnlockPromise:!0,updateSnapState:!0}};const c=(0,i.object)({key:(0,i.optional)(a.StateKeyStruct),value:s.JsonStruct,encrypted:(0,i.optional)((0,i.boolean)())});function u(e,t,n){const i=t.split("."),o=e??{};let c=o;for(let e=0;e<i.length;e++){const t=i[e];if(a.FORBIDDEN_KEYS.includes(t))throw r.rpcErrors.invalidParams("Invalid params: Key contains forbidden characters.");if(e===i.length-1)return c[t]=n,o;if((0,s.hasProperty)(c,t)&&null!==c[t]){if(!(0,s.isObject)(c[t]))throw r.rpcErrors.invalidParams("Invalid params: Cannot overwrite non-object value.")}else c[t]={};c=c[t]}throw new Error("Unexpected error while setting the state.")}n.set=u},{"../restricted/manageState.cjs":170,"../utils.cjs":172,"@metamask/rpc-errors":96,"@metamask/superstruct":301,"@metamask/utils":318}],155:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.updateInterfaceHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),s=e("@metamask/superstruct");n.updateInterfaceHandler={methodNames:["snap_updateInterface"],implementation:async function(e,t,n,i,{updateInterface:a}){const{params:c}=e;try{const e=function(e){try{return(0,s.create)(e,o)}catch(e){if(e instanceof s.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n,ui:i,context:u}=e;await a(n,i,u),t.result=null}catch(e){return i(e)}return i()},hookNames:{updateInterface:!0}};const o=(0,s.object)({id:(0,s.string)(),ui:i.ComponentOrElementStruct,context:(0,s.optional)(i.InterfaceContextStruct)})},{"@metamask/rpc-errors":96,"@metamask/snaps-sdk":176,"@metamask/superstruct":301}],156:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.caveatMappers=n.caveatSpecifications=void 0;const r=e("./permittedCoinTypes.cjs"),i=e("./permittedDerivationPaths.cjs"),s=e("./snapIds.cjs"),o=e("../getBip32Entropy.cjs"),a=e("../getBip32PublicKey.cjs"),c=e("../getBip44Entropy.cjs"),u=e("../invokeSnap.cjs");n.caveatSpecifications={...i.PermittedDerivationPathsCaveatSpecification,...r.PermittedCoinTypesCaveatSpecification,...s.SnapIdsCaveatSpecification},n.caveatMappers={[o.getBip32EntropyBuilder.targetName]:i.permittedDerivationPathsCaveatMapper,[a.getBip32PublicKeyBuilder.targetName]:i.permittedDerivationPathsCaveatMapper,[c.getBip44EntropyBuilder.targetName]:r.permittedCoinTypesCaveatMapper,[u.invokeSnapBuilder.targetName]:s.snapIdsCaveatMapper}},{"../getBip32Entropy.cjs":161,"../getBip32PublicKey.cjs":162,"../getBip44Entropy.cjs":163,"../invokeSnap.cjs":168,"./permittedCoinTypes.cjs":157,"./permittedDerivationPaths.cjs":158,"./snapIds.cjs":159}],157:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PermittedCoinTypesCaveatSpecification=n.validateBIP44Caveat=n.validateBIP44Params=n.permittedCoinTypesCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils");function o(e){if(!(0,s.isPlainObject)(e)||!(0,s.hasProperty)(e,"coinType"))throw r.rpcErrors.invalidParams({message:"Expected a plain object containing a coin type."});if("number"!=typeof e.coinType||!Number.isInteger(e.coinType)||e.coinType<0||e.coinType>2147483647)throw r.rpcErrors.invalidParams({message:'Invalid "coinType" parameter. Coin type must be a non-negative integer.'});if((0,s.hasProperty)(e,"source")&&void 0!==e.source&&"string"!=typeof e.source)throw r.rpcErrors.invalidParams({message:'Invalid "source" parameter. Source must be a string if provided.'});if(i.FORBIDDEN_COIN_TYPES.includes(e.coinType))throw r.rpcErrors.invalidParams({message:`Coin type ${e.coinType} is forbidden.`})}function a(e){if(!(0,s.hasProperty)(e,"value")||!Array.isArray(e.value)||0===e.value.length)throw r.rpcErrors.invalidParams({message:"Expected non-empty array of coin types."});e.value.forEach(o)}n.permittedCoinTypesCaveatMapper=function(e){return{caveats:[{type:i.SnapCaveatType.PermittedCoinTypes,value:e}]}},n.validateBIP44Params=o,n.validateBIP44Caveat=a,n.PermittedCoinTypesCaveatSpecification={[i.SnapCaveatType.PermittedCoinTypes]:Object.freeze({type:i.SnapCaveatType.PermittedCoinTypes,decorator:(e,t)=>async n=>{const{params:i}=n;o(i);if(!t.value.find((e=>e.coinType===i.coinType)))throw r.providerErrors.unauthorized({message:"The requested coin type is not permitted. Allowed coin types must be specified in the snap manifest."});return await e(n)},validator:e=>a(e)})}},{"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],158:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PermittedDerivationPathsCaveatSpecification=n.validateBIP32CaveatPaths=n.validateBIP32Path=n.permittedDerivationPathsCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/superstruct"),o=e("@metamask/utils");function a(e){(0,o.assertStruct)(e,i.Bip32EntropyStruct,"Invalid BIP-32 entropy path definition",r.rpcErrors.invalidParams)}function c(e){(0,o.assertStruct)(e,(0,s.type)({value:(0,s.size)((0,s.array)(i.Bip32EntropyStruct),1,1/0)}),"Invalid BIP-32 entropy caveat",r.rpcErrors.internal)}n.permittedDerivationPathsCaveatMapper=function(e){return{caveats:[{type:i.SnapCaveatType.PermittedDerivationPaths,value:e}]}},n.validateBIP32Path=a,n.validateBIP32CaveatPaths=c,n.PermittedDerivationPathsCaveatSpecification={[i.SnapCaveatType.PermittedDerivationPaths]:Object.freeze({type:i.SnapCaveatType.PermittedDerivationPaths,decorator:(e,t)=>async n=>{const{params:s}=n;a(s);if(!t.value.find((e=>(0,i.isEqual)(s.path.slice(0,e.path.length),e.path)&&e.curve===s.curve)))throw r.providerErrors.unauthorized({message:"The requested path is not permitted. Allowed paths must be specified in the snap manifest."});return await e(n)},validator:e=>c(e)})}},{"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/superstruct":301,"@metamask/utils":318}],159:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SnapIdsCaveatSpecification=n.validateSnapIdsCaveat=n.snapIdsCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/superstruct"),o=e("@metamask/utils");function a(e){(0,o.assertStruct)(e,(0,s.type)({value:i.SnapIdsStruct}),"Expected caveat to have a value property of a non-empty object of snap IDs.",r.rpcErrors.invalidParams)}n.snapIdsCaveatMapper=function(e){return{caveats:[{type:i.SnapCaveatType.SnapIds,value:e}]}},n.validateSnapIdsCaveat=a,n.SnapIdsCaveatSpecification={[i.SnapCaveatType.SnapIds]:Object.freeze({type:i.SnapCaveatType.SnapIds,validator:e=>a(e),decorator:(e,t)=>async n=>{const{params:r,context:{origin:i}}=n,s=t.value,{snapId:a}=r;if(!(0,o.hasProperty)(s,a))throw new Error(`${i} does not have permission to invoke ${a} snap.`);return await e(n)}})}},{"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/superstruct":301,"@metamask/utils":318}],160:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getDialogImplementation=n.dialogBuilder=n.DIALOG_APPROVAL_TYPES=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-sdk"),o=e("@metamask/superstruct"),a=e("@metamask/utils"),c="snap_dialog";n.DIALOG_APPROVAL_TYPES={[s.DialogType.Alert]:`${c}:alert`,[s.DialogType.Confirmation]:`${c}:confirmation`,[s.DialogType.Prompt]:`${c}:prompt`,default:c};const u=(0,o.optional)((0,o.size)((0,o.string)(),1,40));n.dialogBuilder=Object.freeze({targetName:c,specificationBuilder:({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:e,methodImplementation:S(t),subjectTypes:[r.SubjectType.Snap]}),methodHooks:{requestUserApproval:!0,createInterface:!0,getInterface:!0}});const l=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Alert),content:s.ComponentOrElementStruct}),d=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Alert),id:(0,o.string)()}),h=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?d:l)),p=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Confirmation),content:s.ComponentOrElementStruct}),f=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Confirmation),id:(0,o.string)()}),m=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?f:p)),y=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Prompt),content:s.ComponentOrElementStruct,placeholder:u}),g=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Prompt),id:(0,o.string)(),placeholder:u}),b=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?g:y)),v=(0,o.object)({content:s.ComponentOrElementStruct}),w=(0,o.object)({id:(0,o.string)()}),x=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?w:v)),E=(0,s.selectiveUnion)((e=>{if((0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"type"))switch(e.type){case s.DialogType.Alert:return h;case s.DialogType.Confirmation:return m;case s.DialogType.Prompt:return b;default:throw new Error(`The "type" property must be one of: ${Object.values(s.DialogType).join(", ")}.`)}return x}));function S({requestUserApproval:e,createInterface:t,getInterface:r}){return async function(c){const{params:u,context:{origin:l}}=c;if(!(0,a.isObject)(u))throw i.rpcErrors.invalidParams({message:"Invalid params: Expected params to be a single object."});const d=function(e){try{return(0,o.create)(e,E)}catch(e){throw i.rpcErrors.invalidParams({message:`Invalid params: ${e.message}`})}}(u),h=function(e){return function(e){return(0,a.hasProperty)(e,"type")?e.type:void 0}(e)===s.DialogType.Prompt}(d)?d.placeholder:void 0,p=(0,a.hasProperty)(d,"type")?d.type:"default",f=n.DIALOG_APPROVAL_TYPES[p];if((0,a.hasProperty)(d,"content")){const r=await t(l,d.content);return e({id:f===n.DIALOG_APPROVAL_TYPES.default?r:void 0,origin:l,type:f,requestData:{id:r,placeholder:h}})}return function(e,t,n){try{n(e,t)}catch(e){throw i.rpcErrors.invalidParams({message:`Invalid params: ${e.message}`})}}(l,d.id,r),e({id:f===n.DIALOG_APPROVAL_TYPES.default?d.id:void 0,origin:l,type:f,requestData:{id:d.id,placeholder:h}})}}n.getDialogImplementation=S},{"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-sdk":176,"@metamask/superstruct":301,"@metamask/utils":318}],161:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBip32EntropyImplementation=n.getBip32EntropyBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("../utils.cjs"),c="snap_getBip32Entropy";function u({getMnemonic:e,getMnemonicSeed:t,getUnlockPromise:n,getClientCryptography:r}){return async function(i){await n(!0);const{params:s}=i;if((0,o.assert)(s),"secp256k1"===s.curve||"ed25519"===s.curve){const e=await(0,a.getValueFromEntropySource)(t,s.source);return(await(0,a.getNodeFromSeed)({curve:s.curve,path:s.path,seed:e,cryptographicFunctions:r()})).toJSON()}const c=await(0,a.getValueFromEntropySource)(e,s.source);return(await(0,a.getNodeFromMnemonic)({curve:s.curve,path:s.path,secretRecoveryPhrase:c,cryptographicFunctions:r()})).toJSON()}}n.getBip32EntropyBuilder=Object.freeze({targetName:c,specificationBuilder:({methodHooks:e})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:[s.SnapCaveatType.PermittedDerivationPaths],methodImplementation:u(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==s.SnapCaveatType.PermittedDerivationPaths)throw i.rpcErrors.invalidParams({message:`Expected a single "${s.SnapCaveatType.PermittedDerivationPaths}" caveat.`})},subjectTypes:[r.SubjectType.Snap]}),methodHooks:{getMnemonic:!0,getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}}),n.getBip32EntropyImplementation=u},{"../utils.cjs":172,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/utils":318}],162:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBip32PublicKeyImplementation=n.getBip32PublicKeyBuilder=n.Bip32PublicKeyArgsStruct=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/superstruct"),a=e("@metamask/utils"),c=e("../utils.cjs"),u="snap_getBip32PublicKey";n.Bip32PublicKeyArgsStruct=(0,s.bip32entropy)((0,o.object)({path:s.Bip32PathStruct,curve:s.CurveStruct,compressed:(0,o.optional)((0,o.boolean)()),source:(0,o.optional)((0,o.string)())}));function l({getMnemonic:e,getMnemonicSeed:t,getUnlockPromise:r,getClientCryptography:s}){return async function(o){await r(!0),(0,a.assertStruct)(o.params,n.Bip32PublicKeyArgsStruct,"Invalid BIP-32 public key params",i.rpcErrors.invalidParams);const{params:u}=o;if("secp256k1"===u.curve||"ed25519"===u.curve){const e=await(0,c.getValueFromEntropySource)(t,u.source),n=await(0,c.getNodeFromSeed)({curve:u.curve,path:u.path,seed:e,cryptographicFunctions:s()});return u.compressed?n.compressedPublicKey:n.publicKey}const l=await(0,c.getValueFromEntropySource)(e,u.source),d=await(0,c.getNodeFromMnemonic)({curve:u.curve,path:u.path,secretRecoveryPhrase:l,cryptographicFunctions:s()});return u.compressed?d.compressedPublicKey:d.publicKey}}n.getBip32PublicKeyBuilder=Object.freeze({targetName:u,specificationBuilder:({methodHooks:e})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:[s.SnapCaveatType.PermittedDerivationPaths],methodImplementation:l(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==s.SnapCaveatType.PermittedDerivationPaths)throw i.rpcErrors.invalidParams({message:`Expected a single "${s.SnapCaveatType.PermittedDerivationPaths}" caveat.`})},subjectTypes:[r.SubjectType.Snap]}),methodHooks:{getMnemonic:!0,getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}}),n.getBip32PublicKeyImplementation=l},{"../utils.cjs":172,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/superstruct":301,"@metamask/utils":318}],163:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBip44EntropyImplementation=n.getBip44EntropyBuilder=void 0;const r=e("@metamask/key-tree"),i=e("@metamask/permission-controller"),s=e("@metamask/rpc-errors"),o=e("@metamask/snaps-utils"),a=e("../utils.cjs"),c="snap_getBip44Entropy";function u({getMnemonicSeed:e,getUnlockPromise:t,getClientCryptography:n}){return async function(i){await t(!0);const s=i.params,o=await(0,a.getValueFromEntropySource)(e,s.source);return(await r.BIP44CoinTypeNode.fromSeed({derivationPath:[o,"bip32:44'",`bip32:${s.coinType}'`],network:"mainnet"},n())).toJSON()}}n.getBip44EntropyBuilder=Object.freeze({targetName:c,specificationBuilder:({methodHooks:e})=>({permissionType:i.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:[o.SnapCaveatType.PermittedCoinTypes],methodImplementation:u(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==o.SnapCaveatType.PermittedCoinTypes)throw s.rpcErrors.invalidParams({message:`Expected a single "${o.SnapCaveatType.PermittedCoinTypes}" caveat.`})},subjectTypes:[i.SubjectType.Snap]}),methodHooks:{getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}}),n.getBip44EntropyImplementation=u},{"../utils.cjs":172,"@metamask/key-tree":68,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280}],164:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getEntropyBuilder=n.GetEntropyArgsStruct=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/superstruct"),a=e("@metamask/utils"),c=e("../utils.cjs"),u="snap_getEntropy";n.GetEntropyArgsStruct=(0,o.object)({version:(0,o.literal)(1),salt:(0,o.optional)((0,o.string)()),source:(0,o.optional)((0,o.string)())});function l({getMnemonicSeed:e,getUnlockPromise:t,getClientCryptography:r}){return async function(o){const{params:u,context:{origin:l}}=o;(0,a.assertStruct)(u,n.GetEntropyArgsStruct,'Invalid "snap_getEntropy" parameters',i.rpcErrors.invalidParams),await t(!0);const d=await(0,c.getValueFromEntropySource)(e,u.source);return(0,c.deriveEntropyFromSeed)({input:l,salt:u.salt,seed:d,magic:s.SIP_6_MAGIC_VALUE,cryptographicFunctions:r()})}}n.getEntropyBuilder=Object.freeze({targetName:u,specificationBuilder:({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:e,methodImplementation:l(t),subjectTypes:[r.SubjectType.Snap]}),methodHooks:{getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}})},{"../utils.cjs":172,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280,"@metamask/superstruct":301,"@metamask/utils":318}],165:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getImplementation=n.getLocaleBuilder=n.specificationBuilder=void 0;const r=e("@metamask/permission-controller"),i="snap_getLocale";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:i,allowedCaveats:e,methodImplementation:s(t),subjectTypes:[r.SubjectType.Snap]});function s({getPreferences:e}){return async function(t){return e().locale}}n.getLocaleBuilder=Object.freeze({targetName:i,specificationBuilder:n.specificationBuilder,methodHooks:{getPreferences:!0}}),n.getImplementation=s},{"@metamask/permission-controller":79}],166:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getImplementation=n.getPreferencesBuilder=n.specificationBuilder=void 0;const r=e("@metamask/permission-controller"),i="snap_getPreferences";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:i,allowedCaveats:e,methodImplementation:s(t),subjectTypes:[r.SubjectType.Snap]});function s({getPreferences:e}){return async function(t){return e()}}n.getPreferencesBuilder=Object.freeze({targetName:i,specificationBuilder:n.specificationBuilder,methodHooks:{getPreferences:!0}}),n.getImplementation=s},{"@metamask/permission-controller":79}],167:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.DIALOG_APPROVAL_TYPES=n.restrictedMethodPermissionBuilders=n.getEncryptionEntropy=n.WALLET_SNAP_PERMISSION_KEY=void 0;const s=e("./dialog.cjs"),o=e("./getBip32Entropy.cjs"),a=e("./getBip32PublicKey.cjs"),c=e("./getBip44Entropy.cjs"),u=e("./getEntropy.cjs"),l=e("./getLocale.cjs"),d=e("./getPreferences.cjs"),h=e("./invokeSnap.cjs"),p=e("./manageAccounts.cjs"),f=e("./manageState.cjs"),m=e("./notify.cjs");var y=e("./invokeSnap.cjs");Object.defineProperty(n,"WALLET_SNAP_PERMISSION_KEY",{enumerable:!0,get:function(){return y.WALLET_SNAP_PERMISSION_KEY}});var g=e("./manageState.cjs");Object.defineProperty(n,"getEncryptionEntropy",{enumerable:!0,get:function(){return g.getEncryptionEntropy}}),n.restrictedMethodPermissionBuilders={[s.dialogBuilder.targetName]:s.dialogBuilder,[o.getBip32EntropyBuilder.targetName]:o.getBip32EntropyBuilder,[a.getBip32PublicKeyBuilder.targetName]:a.getBip32PublicKeyBuilder,[c.getBip44EntropyBuilder.targetName]:c.getBip44EntropyBuilder,[u.getEntropyBuilder.targetName]:u.getEntropyBuilder,[h.invokeSnapBuilder.targetName]:h.invokeSnapBuilder,[f.manageStateBuilder.targetName]:f.manageStateBuilder,[m.notifyBuilder.targetName]:m.notifyBuilder,[p.manageAccountsBuilder.targetName]:p.manageAccountsBuilder,[l.getLocaleBuilder.targetName]:l.getLocaleBuilder,[d.getPreferencesBuilder.targetName]:d.getPreferencesBuilder},i(e("./caveats/index.cjs"),n);var b=e("./dialog.cjs");Object.defineProperty(n,"DIALOG_APPROVAL_TYPES",{enumerable:!0,get:function(){return b.DIALOG_APPROVAL_TYPES}})},{"./caveats/index.cjs":156,"./dialog.cjs":160,"./getBip32Entropy.cjs":161,"./getBip32PublicKey.cjs":162,"./getBip44Entropy.cjs":163,"./getEntropy.cjs":164,"./getLocale.cjs":165,"./getPreferences.cjs":166,"./invokeSnap.cjs":168,"./manageAccounts.cjs":169,"./manageState.cjs":170,"./notify.cjs":171}],168:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getInvokeSnapImplementation=n.invokeSnapBuilder=n.handleSnapInstall=n.WALLET_SNAP_PERMISSION_KEY=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils");n.WALLET_SNAP_PERMISSION_KEY="wallet_snap";n.handleSnapInstall=async({requestData:e,messagingSystem:t})=>{const r=e.permissions[n.WALLET_SNAP_PERMISSION_KEY].caveats?.[0].value,i=t.call("SnapController:getPermitted",e.metadata.origin),s=Object.keys(r).reduce(((e,t)=>(i[t]||(e[t]=r[t]),e)),{});return t.call("SnapController:install",e.metadata.origin,s)};function o({getSnap:e,handleSnapRpcRequest:t}){return async function(n){const{params:r={},context:o}=n,{snapId:a,request:c}=r;if(!e(a))throw i.rpcErrors.invalidRequest({message:`The snap "${a}" is not installed. Please install it first, before invoking the snap.`});const{origin:u}=o;return await t({snapId:a,origin:u,request:c,handler:s.HandlerType.OnRpcRequest})}}n.invokeSnapBuilder=Object.freeze({targetName:n.WALLET_SNAP_PERMISSION_KEY,specificationBuilder:({methodHooks:e})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:n.WALLET_SNAP_PERMISSION_KEY,allowedCaveats:[s.SnapCaveatType.SnapIds],methodImplementation:o(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==s.SnapCaveatType.SnapIds)throw i.rpcErrors.invalidParams({message:`Expected a single "${s.SnapCaveatType.SnapIds}" caveat.`})},sideEffect:{onPermitted:n.handleSnapInstall}}),methodHooks:{getSnap:!0,handleSnapRpcRequest:!0}}),n.getInvokeSnapImplementation=o},{"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":280}],169:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.manageAccountsBuilder=n.manageAccountsImplementation=n.specificationBuilder=n.methodName=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=(0,i.union)([(0,i.object)({method:(0,i.string)()}),(0,i.object)({method:(0,i.string)(),params:(0,i.union)([(0,i.array)(s.JsonStruct),(0,i.record)((0,i.string)(),s.JsonStruct)])})]);n.methodName="snap_manageAccounts";function a({getSnapKeyring:e}){return async function(t){const{context:{origin:n},params:r}=t;(0,i.assert)(r,o);const s=await e(n);return await s.handleKeyringSnapMessage(n,r)}}n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:n.methodName,allowedCaveats:e,methodImplementation:a(t),subjectTypes:[r.SubjectType.Snap]}),n.manageAccountsImplementation=a,n.manageAccountsBuilder=Object.freeze({targetName:n.methodName,specificationBuilder:n.specificationBuilder,methodHooks:{getSnapKeyring:!0}})},{"@metamask/permission-controller":79,"@metamask/superstruct":301,"@metamask/utils":318}],170:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.getManageStateImplementation=n.getEncryptionEntropy=n.STORAGE_SIZE_LIMIT=n.manageStateBuilder=n.specificationBuilder=n.STATE_ENCRYPTION_SALT=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-sdk"),o=e("@metamask/snaps-utils"),a=e("@metamask/utils"),c=e("../utils.cjs");n.STATE_ENCRYPTION_SALT="snap_manageState encryption";const u="snap_manageState";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:e,methodImplementation:l(t),subjectTypes:[r.SubjectType.Snap]});function l({getUnlockPromise:e,clearSnapState:t,getSnapState:n,updateSnapState:r}){return async function(o){const{params:a={},method:c,context:{origin:u}}=o,l=d(a,c),h=l.encrypted??!0;switch(h&&l.operation!==s.ManageStateOperation.ClearState&&await e(!0),l.operation){case s.ManageStateOperation.ClearState:return t(u,h),null;case s.ManageStateOperation.GetState:return await n(u,h);case s.ManageStateOperation.UpdateState:return await r(u,l.newState,h),null;default:throw i.rpcErrors.invalidParams(`Invalid ${c} operation: "${l.operation}"`)}}}function d(e,t,r=n.STORAGE_SIZE_LIMIT){if(!(0,a.isObject)(e))throw i.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{operation:o,newState:c,encrypted:u}=e;if(!o||"string"!=typeof o||!Object.values(s.ManageStateOperation).includes(o))throw i.rpcErrors.invalidParams({message:'Must specify a valid manage state "operation".'});if(void 0!==u&&"boolean"!=typeof u)throw i.rpcErrors.invalidParams({message:'"encrypted" parameter must be a boolean if specified.'});if(o===s.ManageStateOperation.UpdateState){if(!(0,a.isObject)(c))throw i.rpcErrors.invalidParams({message:`Invalid ${t} "newState" parameter: The new state must be a plain object.`});let e;try{e=(0,a.getJsonSize)(c)}catch{throw i.rpcErrors.invalidParams({message:`Invalid ${t} "newState" parameter: The new state must be JSON serializable.`})}if(e>r)throw i.rpcErrors.invalidParams({message:`Invalid ${t} "newState" parameter: The new state must not exceed ${r/1e6} MB in size.`})}return e}n.manageStateBuilder=Object.freeze({targetName:u,specificationBuilder:n.specificationBuilder,methodHooks:{getUnlockPromise:!0,clearSnapState:!0,getSnapState:!0,updateSnapState:!0}}),n.STORAGE_SIZE_LIMIT=64e6,n.getEncryptionEntropy=async function({seed:e,snapId:t,cryptographicFunctions:r}){return await(0,c.deriveEntropyFromSeed)({seed:e,input:t,salt:n.STATE_ENCRYPTION_SALT,magic:o.STATE_ENCRYPTION_MAGIC_VALUE,cryptographicFunctions:r})},n.getManageStateImplementation=l,n.getValidatedParams=d},{"../utils.cjs":172,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-sdk":176,"@metamask/snaps-utils":280,"@metamask/utils":318}],171:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.getImplementation=n.notifyBuilder=n.specificationBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-sdk"),o=e("@metamask/snaps-utils"),a=e("@metamask/superstruct"),c=e("@metamask/utils"),u="snap_notify",l=(0,a.object)({type:(0,s.enumValue)(s.NotificationType.Native),message:(0,a.string)()}),d=(0,a.object)({type:(0,s.enumValue)(s.NotificationType.InApp),message:(0,a.string)()}),h=(0,a.object)({type:(0,s.enumValue)(s.NotificationType.InApp),message:(0,a.string)(),content:s.ComponentOrElementStruct,title:(0,a.string)(),footerLink:(0,a.optional)((0,a.object)({href:(0,a.string)(),text:(0,a.string)()}))}),p=(0,s.union)([d,h,l]);n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:e,methodImplementation:f(t),subjectTypes:[r.SubjectType.Snap]});function f({showNativeNotification:e,showInAppNotification:t,isOnPhishingList:n,maybeUpdatePhishingList:r,createInterface:o,getSnap:a}){return async function(u){const{params:l,context:{origin:d}}=u;await r();const h=m(l,n,a);if((0,c.hasProperty)(h,"content")){const e=await o(d,h.content,void 0,s.ContentType.Notification);h.content=e}switch(h.type){case s.NotificationType.Native:return await e(d,h);case s.NotificationType.InApp:return await t(d,h);default:throw i.rpcErrors.invalidParams({message:'Must specify a valid notification "type".'})}}}function m(e,t,n){if(!(0,c.isObject)(e))throw i.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{type:r,message:a}=e;if(!r||"string"!=typeof r||!Object.values(s.NotificationType).includes(r))throw i.rpcErrors.invalidParams({message:'Must specify a valid notification "type".'});const u=!a||"string"!=typeof a;if(r===s.NotificationType.Native&&(u||a.length>=50))throw i.rpcErrors.invalidParams({message:'Must specify a non-empty string "message" less than 50 characters long.'});if(r===s.NotificationType.InApp&&(u||a.length>=500))throw i.rpcErrors.invalidParams({message:'Must specify a non-empty string "message" less than 500 characters long.'});try{const r=(0,o.createUnion)(e,p,"type");return(0,o.validateTextLinks)(r.message,t,n),(0,c.hasProperty)(r,"footerLink")&&(0,o.validateLink)(r.footerLink.href,t,n),r}catch(e){throw i.rpcErrors.invalidParams({message:`Invalid params: ${(0,s.getErrorMessage)(e)}`})}}n.notifyBuilder=Object.freeze({targetName:u,specificationBuilder:n.specificationBuilder,methodHooks:{showNativeNotification:!0,showInAppNotification:!0,isOnPhishingList:!0,maybeUpdatePhishingList:!0,createInterface:!0,getSnap:!0}}),n.getImplementation=f,n.getValidatedParams=m},{"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-sdk":176,"@metamask/snaps-utils":280,"@metamask/superstruct":301,"@metamask/utils":318}],172:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValueFromEntropySource=n.StateKeyStruct=n.isValidStateKey=n.getNodeFromSeed=n.getNodeFromMnemonic=n.getPathPrefix=n.deriveEntropyFromSeed=n.selectHooks=n.FORBIDDEN_KEYS=void 0;const r=e("@metamask/key-tree"),i=e("@metamask/rpc-errors"),s=e("@metamask/superstruct"),o=e("@metamask/utils"),a=e("@noble/hashes/sha3"),c=2147483648;function u({input:e,salt:t,magic:n}){const r=(0,o.stringToBytes)(e),i=(0,o.stringToBytes)(t),s=function(e){const t=[],n=(0,o.createDataView)(e);for(let e=0;e<8;e++){const r=(n.getUint32(4*e)|c)>>>0;t.push(`bip32:${r-c}'`)}return t}((0,a.keccak_256)((0,o.concatBytes)([r,(0,a.keccak_256)(i)])));return[`bip32:${n}`,...s]}function l(e){switch(e){case"secp256k1":return"bip32";case"ed25519":return"slip10";case"ed25519Bip32":return"cip3";default:return(0,o.assertExhaustive)(e)}}function d(e){return void 0===e||e.split(".").every((e=>e.length>0))}n.FORBIDDEN_KEYS=["constructor","__proto__","prototype"],n.selectHooks=function(e,t){if(t)return Object.keys(t).reduce(((t,n)=>{const r=n;return t[r]=e[r],t}),{})},n.deriveEntropyFromSeed=async function({input:e,salt:t="",seed:n,magic:i,cryptographicFunctions:s}){const a=u({input:e,salt:t,magic:i}),{privateKey:c}=await r.SLIP10Node.fromSeed({derivationPath:[n,...a],curve:"secp256k1"},s);return(0,o.assert)(c,"Failed to derive the entropy."),(0,o.add0x)(c)},n.getPathPrefix=l,n.getNodeFromMnemonic=async function({curve:e,secretRecoveryPhrase:t,path:n,cryptographicFunctions:i}){const s=l(e);return await r.SLIP10Node.fromDerivationPath({curve:e,derivationPath:[t,...n.slice(1).map((e=>`${s}:${e}`))]},i)},n.getNodeFromSeed=async function({curve:e,seed:t,path:n,cryptographicFunctions:i}){const s=l(e);return await r.SLIP10Node.fromSeed({curve:e,derivationPath:[t,...n.slice(1).map((e=>`${s}:${e}`))]},i)},n.isValidStateKey=d,n.StateKeyStruct=(0,s.refine)((0,s.string)(),"state key",(e=>!!d(e)||"Invalid state key. Each part of the key must be non-empty.")),n.getValueFromEntropySource=async function(e,t){try{return await e(t)}catch(e){if(e instanceof Error)throw i.rpcErrors.invalidParams({message:e.message});throw i.rpcErrors.internal({message:"An unknown error occurred.",data:{error:e.toString()}})}}},{"@metamask/key-tree":68,"@metamask/rpc-errors":96,"@metamask/superstruct":301,"@metamask/utils":318,"@noble/hashes/sha3":348}],173:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UserRejectedRequestError=n.UnsupportedMethodError=n.UnauthorizedError=n.DisconnectedError=n.ChainDisconnectedError=n.TransactionRejected=n.ResourceUnavailableError=n.ResourceNotFoundError=n.ParseError=n.MethodNotSupportedError=n.MethodNotFoundError=n.LimitExceededError=n.InvalidRequestError=n.InvalidParamsError=n.InvalidInputError=n.InternalError=void 0;const r=e("@metamask/rpc-errors"),i=e("./internals/index.cjs");n.InternalError=(0,i.createSnapError)(r.rpcErrors.internal),n.InvalidInputError=(0,i.createSnapError)(r.rpcErrors.invalidInput),n.InvalidParamsError=(0,i.createSnapError)(r.rpcErrors.invalidParams),n.InvalidRequestError=(0,i.createSnapError)(r.rpcErrors.invalidRequest),n.LimitExceededError=(0,i.createSnapError)(r.rpcErrors.limitExceeded),n.MethodNotFoundError=(0,i.createSnapError)(r.rpcErrors.methodNotFound),n.MethodNotSupportedError=(0,i.createSnapError)(r.rpcErrors.methodNotSupported),n.ParseError=(0,i.createSnapError)(r.rpcErrors.parse),n.ResourceNotFoundError=(0,i.createSnapError)(r.rpcErrors.resourceNotFound),n.ResourceUnavailableError=(0,i.createSnapError)(r.rpcErrors.resourceUnavailable),n.TransactionRejected=(0,i.createSnapError)(r.rpcErrors.transactionRejected),n.ChainDisconnectedError=(0,i.createSnapError)(r.providerErrors.chainDisconnected),n.DisconnectedError=(0,i.createSnapError)(r.providerErrors.disconnected),n.UnauthorizedError=(0,i.createSnapError)(r.providerErrors.unauthorized),n.UnsupportedMethodError=(0,i.createSnapError)(r.providerErrors.unsupportedMethod),n.UserRejectedRequestError=(0,i.createSnapError)(r.providerErrors.userRejectedRequest)},{"./internals/index.cjs":179,"@metamask/rpc-errors":96}],174:[function(e,t,n){"use strict";var r,i,s,o,a=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},c=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.SnapError=void 0;const u=e("./internals/index.cjs");class l extends Error{constructor(e,t={}){const n=(0,u.getErrorMessage)(e);super(n),r.set(this,void 0),i.set(this,void 0),s.set(this,void 0),o.set(this,void 0),a(this,i,n,"f"),a(this,r,(0,u.getErrorCode)(e),"f");const c={...(0,u.getErrorData)(e),...t};Object.keys(c).length>0&&a(this,s,c,"f"),a(this,o,super.stack,"f")}get name(){return"SnapError"}get code(){return c(this,r,"f")}get message(){return c(this,i,"f")}get data(){return c(this,s,"f")}get stack(){return c(this,o,"f")}toJSON(){return{code:u.SNAP_ERROR_CODE,message:u.SNAP_ERROR_MESSAGE,data:{cause:{code:this.code,message:this.message,stack:this.stack,...this.data?{data:this.data}:{}}}}}serialize(){return this.toJSON()}}n.SnapError=l,r=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap},{"./internals/index.cjs":179}],175:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getImageComponent=n.getImageData=void 0;const r=e("@metamask/utils"),i=e("./ui/index.cjs");async function s(e,t){const n=await async function(e,t){if("function"!=typeof fetch)throw new Error(`Failed to fetch image data from "${e}": Using this function requires the "endowment:network-access" permission.`);return fetch(e,t).then((async t=>{if(!t.ok)throw new Error(`Failed to fetch image data from "${e}": ${t.status} ${t.statusText}`);const n=await t.blob();return(0,r.assert)("image/jpeg"===n.type||"image/png"===n.type,"Expected image data to be a JPEG or PNG image."),n}))}(e,t),i=new Uint8Array(await n.arrayBuffer());return`data:${n.type};base64,${(0,r.bytesToBase64)(i)}`}n.getImageData=s,n.getImageComponent=async function(e,{width:t,height:n=t,request:o}){(0,r.assert)("number"==typeof t&&t>0,"Expected width to be a number greater than 0."),(0,r.assert)("number"==typeof n&&n>0,"Expected height to be a number greater than 0.");const a=await s(e,o),c=`width="${t}" height="${n}"`;return(0,i.image)(`<svg ${c.trim()} xmlns="http://www.w3.org/2000/svg"><image ${c.trim()} href="${a}" /></svg>`)}},{"./ui/index.cjs":257,"@metamask/utils":318}],176:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.assert=n.selectiveUnion=n.typedUnion=n.enumValue=n.union=n.literal=n.SNAP_ERROR_MESSAGE=n.SNAP_ERROR_CODE=n.getErrorStack=n.getErrorMessage=n.getErrorData=void 0;var s=e("./internals/index.cjs");Object.defineProperty(n,"getErrorData",{enumerable:!0,get:function(){return s.getErrorData}}),Object.defineProperty(n,"getErrorMessage",{enumerable:!0,get:function(){return s.getErrorMessage}}),Object.defineProperty(n,"getErrorStack",{enumerable:!0,get:function(){return s.getErrorStack}}),Object.defineProperty(n,"SNAP_ERROR_CODE",{enumerable:!0,get:function(){return s.SNAP_ERROR_CODE}}),Object.defineProperty(n,"SNAP_ERROR_MESSAGE",{enumerable:!0,get:function(){return s.SNAP_ERROR_MESSAGE}}),Object.defineProperty(n,"literal",{enumerable:!0,get:function(){return s.literal}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return s.union}}),Object.defineProperty(n,"enumValue",{enumerable:!0,get:function(){return s.enumValue}}),Object.defineProperty(n,"typedUnion",{enumerable:!0,get:function(){return s.typedUnion}}),Object.defineProperty(n,"selectiveUnion",{enumerable:!0,get:function(){return s.selectiveUnion}});var o=e("@metamask/utils");Object.defineProperty(n,"assert",{enumerable:!0,get:function(){return o.assert}}),i(e("./errors.cjs"),n),i(e("./error-wrappers.cjs"),n),i(e("./images.cjs"),n),i(e("./types/index.cjs"),n),i(e("./ui/index.cjs"),n)},{"./error-wrappers.cjs":173,"./errors.cjs":174,"./images.cjs":175,"./internals/index.cjs":179,"./types/index.cjs":235,"./ui/index.cjs":257,"@metamask/utils":318}],177:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapError=void 0;const r=e("../errors.cjs");n.createSnapError=function(e){return class extends r.SnapError{constructor(t,n){if("object"==typeof t){const n=e();return void super({code:n.code,message:n.message,data:t})}const r=e(t);super({code:r.code,message:r.message,data:n})}}}},{"../errors.cjs":174}],178:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorData=n.getErrorCode=n.getErrorStack=n.getErrorMessage=n.SNAP_ERROR_MESSAGE=n.SNAP_ERROR_CODE=void 0;const r=e("@metamask/utils");n.SNAP_ERROR_CODE=-31002,n.SNAP_ERROR_MESSAGE="Snap Error",n.getErrorMessage=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:String(e)},n.getErrorStack=function(e){if((0,r.isObject)(e)&&(0,r.hasProperty)(e,"stack")&&"string"==typeof e.stack)return e.stack},n.getErrorCode=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"code")&&"number"==typeof e.code&&Number.isInteger(e.code)?e.code:-32603},n.getErrorData=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"data")&&"object"==typeof e.data&&null!==e.data&&(0,r.isValidJson)(e.data)&&!Array.isArray(e.data)?e.data:{}}},{"@metamask/utils":318}],179:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./error-wrappers.cjs"),n),i(e("./errors.cjs"),n),i(e("./structs.cjs"),n),i(e("./jsx.cjs"),n),i(e("./svg.cjs"),n)},{"./error-wrappers.cjs":177,"./errors.cjs":178,"./jsx.cjs":180,"./structs.cjs":181,"./svg.cjs":182}],180:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.nullUnion=void 0;const r=e("./structs.cjs");n.nullUnion=function(e){return(0,r.union)(e)}},{"./structs.cjs":181}],181:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.selectiveUnion=n.typedUnion=n.enumValue=n.union=n.literal=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");function s(e){return(0,r.define)(JSON.stringify(e),(0,r.literal)(e).validator)}n.literal=s,n.union=function([e,...t]){const n=(0,r.union)([e,...t]);return new r.Struct({...n,schema:[e,...t]})},n.enumValue=function(e){return s(e)},n.typedUnion=function(e){const t=e.map((e=>"union"===e.type&&Array.isArray(e.schema)?e.schema:e)).flat(1/0),n=t.map((({schema:e})=>e.type.type));return new r.Struct({type:"union",schema:t,*entries(e,n){if(!(0,i.isPlainObject)(e)||!(0,i.hasProperty)(e,"type"))return;const{type:s}=e,o=t.find((({schema:e})=>(0,r.is)(s,e.type)));if(o)for(const t of o.entries(e,n))yield t},coercer(e,n){if(!(0,i.isPlainObject)(e)||!(0,i.hasProperty)(e,"type"))return e;const{type:s}=e,o=t.find((({schema:e})=>(0,r.is)(s,e.type)));return o?o.coercer(e,n):e},*refiner(e,n){const i=t.find((({schema:t})=>(0,r.is)(e.type,t.type)));yield*i.refiner(e,n)},validator(e,s){if(!(0,i.isPlainObject)(e)||!(0,i.hasProperty)(e,"type")||"string"!=typeof e.type)return`Expected type to be one of: ${n.join(", ")}, but received: undefined`;const{type:o}=e,a=t.find((({schema:e})=>(0,r.is)(o,e.type)));return a?a.validator(e,s):`Expected type to be one of: ${n.join(", ")}, but received: "${o}"`}})},n.selectiveUnion=function(e){return new r.Struct({type:"union",schema:null,*entries(t,n){const r=e(t);for(const e of r.entries(t,n))yield e},*refiner(t,n){const r=e(t);yield*r.refiner(t,n)},coercer:(t,n)=>e(t).coercer(t,n),validator:(t,n)=>e(t).validator(t,n)})}},{"@metamask/superstruct":301,"@metamask/utils":318}],182:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.svg=void 0;const r=e("@metamask/superstruct");n.svg=function(){return(0,r.refine)((0,r.string)(),"SVG",(e=>!!e.includes("<svg")||"Value is not a valid SVG."))}},{"@metamask/superstruct":301}],183:[function(e,t,n){"use strict";function r(e){return Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e)))}Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapComponent=void 0,n.createSnapComponent=function(e){return t=>{const{key:n=null,...i}=t;return{type:e,props:r(i),key:n}}}},{}],184:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Address=void 0;const r=e("../component.cjs");n.Address=(0,r.createSnapComponent)("Address")},{"../component.cjs":183}],185:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Avatar=void 0;const r=e("../component.cjs");n.Avatar=(0,r.createSnapComponent)("Avatar")},{"../component.cjs":183}],186:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Banner=void 0;const r=e("../component.cjs");n.Banner=(0,r.createSnapComponent)("Banner")},{"../component.cjs":183}],187:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Box=void 0;const r=e("../component.cjs");n.Box=(0,r.createSnapComponent)("Box")},{"../component.cjs":183}],188:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Card=void 0;const r=e("../component.cjs");n.Card=(0,r.createSnapComponent)("Card")},{"../component.cjs":183}],189:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Container=void 0;const r=e("../component.cjs");n.Container=(0,r.createSnapComponent)("Container")},{"../component.cjs":183}],190:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Copyable=void 0;const r=e("../component.cjs");n.Copyable=(0,r.createSnapComponent)("Copyable")},{"../component.cjs":183}],191:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Divider=void 0;const r=e("../component.cjs");n.Divider=(0,r.createSnapComponent)("Divider")},{"../component.cjs":183}],192:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Footer=void 0;const r=e("../component.cjs");n.Footer=(0,r.createSnapComponent)("Footer")},{"../component.cjs":183}],193:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Heading=void 0;const r=e("../component.cjs");n.Heading=(0,r.createSnapComponent)("Heading")},{"../component.cjs":183}],194:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Icon=n.IconName=void 0;const r=e("../component.cjs");var i;!function(e){e.AddSquare="add-square",e.Add="add",e.Arrow2Down="arrow-2-down",e.Arrow2Left="arrow-2-left",e.Arrow2Right="arrow-2-right",e.Arrow2Up="arrow-2-up",e.Arrow2UpRight="arrow-2-up-right",e.ArrowDoubleLeft="arrow-double-left",e.ArrowDoubleRight="arrow-double-right",e.ArrowDown="arrow-down",e.ArrowLeft="arrow-left",e.ArrowRight="arrow-right",e.ArrowUp="arrow-up",e.BankToken="bank-token",e.Bank="bank",e.Book="book",e.Bookmark="bookmark",e.Bridge="bridge",e.Calculator="calculator",e.CardPos="card-pos",e.CardToken="card-token",e.Card="card",e.Category="category",e.Chart="chart",e.CheckBold="check-bold",e.Check="check",e.Clock="clock",e.Close="close",e.CodeCircle="code-circle",e.Coin="coin",e.Confirmation="confirmation",e.Connect="connect",e.CopySuccess="copy-success",e.Copy="copy",e.Customize="customize",e.Danger="danger",e.Dark="dark",e.Data="data",e.Diagram="diagram",e.DocumentCode="document-code",e.DragDrop="drag-drop",e.DraggingAnimation="dragging-animation",e.PinningAnimation="pinning-animation",e.Edit="edit",e.Eraser="eraser",e.Ethereum="ethereum",e.Expand="expand",e.Explore="explore",e.Export="export",e.EyeSlash="eye-slash",e.Eye="eye",e.Filter="filter",e.Flag="flag",e.FlashSlash="flash-slash",e.Flash="flash",e.FullCircle="full-circle",e.Gas="gas",e.GlobalSearch="global-search",e.Global="global",e.Graph="graph",e.Hardware="hardware",e.Heart="heart",e.Hierarchy="hierarchy",e.Home="home",e.Import="import",e.Info="info",e.Key="key",e.Light="light",e.Link="link",e.Loading="loading",e.LockCircle="lock-circle",e.LockSlash="lock-slash",e.Lock="lock",e.Login="login",e.Logout="logout",e.Menu="menu",e.MessageQuestion="message-question",e.Messages="messages",e.MinusBold="minus-bold",e.MinusSquare="minus-square",e.Minus="minus",e.Mobile="mobile",e.Money="money",e.Monitor="monitor",e.MoreHorizontal="more-horizontal",e.MoreVertical="more-vertical",e.NotificationCircle="notification-circle",e.Notification="notification",e.PasswordCheck="password-check",e.People="people",e.Pin="pin",e.ProgrammingArrows="programming-arrows",e.Custody="custody",e.Question="question",e.Received="received",e.Refresh="refresh",e.Save="save",e.ScanBarcode="scan-barcode",e.ScanFocus="scan-focus",e.Scan="scan",e.Scroll="scroll",e.Search="search",e.SecurityCard="security-card",e.SecurityCross="security-cross",e.SecurityKey="security-key",e.SecuritySearch="security-search",e.SecuritySlash="security-slash",e.SecurityTick="security-tick",e.SecurityTime="security-time",e.SecurityUser="security-user",e.Security="security",e.Send1="send-1",e.Send2="send-2",e.Setting="setting",e.Slash="slash",e.SnapsMobile="snaps-mobile",e.SnapsPlus="snaps-plus",e.Snaps="snaps",e.Speedometer="speedometer",e.Star="star",e.Stake="stake",e.Student="student",e.SwapHorizontal="swap-horizontal",e.SwapVertical="swap-vertical",e.Tag="tag",e.Tilde="tilde",e.Timer="timer",e.Trash="trash",e.TrendDown="trend-down",e.TrendUp="trend-up",e.UserCircleAdd="user-circle-add",e.UserCircleLink="user-circle-link",e.UserCircleRemove="user-circle-remove",e.UserCircle="user-circle",e.User="user",e.WalletCard="wallet-card",e.WalletMoney="wallet-money",e.Wallet="wallet",e.Warning="warning",e.Twitter="twitter",e.QrCode="qr-code",e.UserCheck="user-check",e.Unpin="unpin",e.Ban="ban",e.Bold="bold",e.CircleX="circle-x",e.Download="download",e.FileIcon="file",e.Flask="flask",e.Plug="plug",e.Share="share",e.Square="square",e.Tint="tint",e.Upload="upload",e.Usb="usb",e.Wifi="wifi",e.PlusMinus="plus-minus"}(i||(n.IconName=i={}));n.Icon=(0,r.createSnapComponent)("Icon")},{"../component.cjs":183}],195:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Image=void 0;const r=e("../component.cjs");n.Image=(0,r.createSnapComponent)("Image")},{"../component.cjs":183}],196:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Link=void 0;const r=e("../component.cjs");n.Link=(0,r.createSnapComponent)("Link")},{"../component.cjs":183}],197:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Row=void 0;const r=e("../component.cjs");n.Row=(0,r.createSnapComponent)("Row")},{"../component.cjs":183}],198:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Section=void 0;const r=e("../component.cjs");n.Section=(0,r.createSnapComponent)("Section")},{"../component.cjs":183}],199:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Skeleton=void 0;const r=e("../component.cjs");n.Skeleton=(0,r.createSnapComponent)("Skeleton")},{"../component.cjs":183}],200:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Spinner=void 0;const r=e("../component.cjs");n.Spinner=(0,r.createSnapComponent)("Spinner")},{"../component.cjs":183}],201:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Text=void 0;const r=e("../component.cjs");n.Text=(0,r.createSnapComponent)("Text")},{"../component.cjs":183}],202:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Tooltip=void 0;const r=e("../component.cjs");n.Tooltip=(0,r.createSnapComponent)("Tooltip")},{"../component.cjs":183}],203:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Value=void 0;const r=e("../component.cjs");n.Value=(0,r.createSnapComponent)("Value")},{"../component.cjs":183}],204:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AddressInput=void 0;const r=e("../../component.cjs");n.AddressInput=(0,r.createSnapComponent)("AddressInput")},{"../../component.cjs":183}],205:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AssetSelector=void 0;const r=e("../../component.cjs");n.AssetSelector=(0,r.createSnapComponent)("AssetSelector")},{"../../component.cjs":183}],206:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Button=void 0;const r=e("../../component.cjs");n.Button=(0,r.createSnapComponent)("Button")},{"../../component.cjs":183}],207:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Checkbox=void 0;const r=e("../../component.cjs");n.Checkbox=(0,r.createSnapComponent)("Checkbox")},{"../../component.cjs":183}],208:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Dropdown=void 0;const r=e("../../component.cjs");n.Dropdown=(0,r.createSnapComponent)("Dropdown")},{"../../component.cjs":183}],209:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Field=void 0;const r=e("../../component.cjs");n.Field=(0,r.createSnapComponent)("Field")},{"../../component.cjs":183}],210:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FileInput=void 0;const r=e("../../component.cjs");n.FileInput=(0,r.createSnapComponent)("FileInput")},{"../../component.cjs":183}],211:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Form=void 0;const r=e("../../component.cjs");n.Form=(0,r.createSnapComponent)("Form")},{"../../component.cjs":183}],212:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Input=void 0;const r=e("../../component.cjs");n.Input=(0,r.createSnapComponent)("Input")},{"../../component.cjs":183}],213:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Option=void 0;const r=e("../../component.cjs");n.Option=(0,r.createSnapComponent)("Option")},{"../../component.cjs":183}],214:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Radio=void 0;const r=e("../../component.cjs");n.Radio=(0,r.createSnapComponent)("Radio")},{"../../component.cjs":183}],215:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RadioGroup=void 0;const r=e("../../component.cjs");n.RadioGroup=(0,r.createSnapComponent)("RadioGroup")},{"../../component.cjs":183}],216:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Selector=void 0;const r=e("../../component.cjs");n.Selector=(0,r.createSnapComponent)("Selector")},{"../../component.cjs":183}],217:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SelectorOption=void 0;const r=e("../../component.cjs");n.SelectorOption=(0,r.createSnapComponent)("SelectorOption")},{"../../component.cjs":183}],218:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./AssetSelector.cjs"),n),i(e("./Button.cjs"),n),i(e("./Checkbox.cjs"),n),i(e("./Dropdown.cjs"),n),i(e("./Option.cjs"),n),i(e("./Radio.cjs"),n),i(e("./RadioGroup.cjs"),n),i(e("./Field.cjs"),n),i(e("./FileInput.cjs"),n),i(e("./Form.cjs"),n),i(e("./Input.cjs"),n),i(e("./Selector.cjs"),n),i(e("./SelectorOption.cjs"),n),i(e("./AddressInput.cjs"),n)},{"./AddressInput.cjs":204,"./AssetSelector.cjs":205,"./Button.cjs":206,"./Checkbox.cjs":207,"./Dropdown.cjs":208,"./Field.cjs":209,"./FileInput.cjs":210,"./Form.cjs":211,"./Input.cjs":212,"./Option.cjs":213,"./Radio.cjs":214,"./RadioGroup.cjs":215,"./Selector.cjs":216,"./SelectorOption.cjs":217}],219:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Bold=void 0;const r=e("../../component.cjs");e("../Text.cjs");n.Bold=(0,r.createSnapComponent)("Bold")},{"../../component.cjs":183,"../Text.cjs":201}],220:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Italic=void 0;const r=e("../../component.cjs");n.Italic=(0,r.createSnapComponent)("Italic")},{"../../component.cjs":183}],221:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./Bold.cjs"),n),i(e("./Italic.cjs"),n)},{"./Bold.cjs":219,"./Italic.cjs":220}],222:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./form/index.cjs"),n),i(e("./formatting/index.cjs"),n),i(e("./Address.cjs"),n),i(e("./Avatar.cjs"),n),i(e("./Box.cjs"),n),i(e("./Card.cjs"),n),i(e("./Copyable.cjs"),n),i(e("./Divider.cjs"),n),i(e("./Value.cjs"),n),i(e("./Heading.cjs"),n),i(e("./Icon.cjs"),n),i(e("./Image.cjs"),n),i(e("./Link.cjs"),n),i(e("./Row.cjs"),n),i(e("./Spinner.cjs"),n),i(e("./Text.cjs"),n),i(e("./Tooltip.cjs"),n),i(e("./Footer.cjs"),n),i(e("./Container.cjs"),n),i(e("./Section.cjs"),n),i(e("./Banner.cjs"),n),i(e("./Skeleton.cjs"),n)},{"./Address.cjs":184,"./Avatar.cjs":185,"./Banner.cjs":186,"./Box.cjs":187,"./Card.cjs":188,"./Container.cjs":189,"./Copyable.cjs":190,"./Divider.cjs":191,"./Footer.cjs":192,"./Heading.cjs":193,"./Icon.cjs":194,"./Image.cjs":195,"./Link.cjs":196,"./Row.cjs":197,"./Section.cjs":198,"./Skeleton.cjs":199,"./Spinner.cjs":200,"./Text.cjs":201,"./Tooltip.cjs":202,"./Value.cjs":203,"./form/index.cjs":218,"./formatting/index.cjs":221}],223:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.FieldChildUnionStruct=n.FormChildStruct=n.BoxChildStruct=n.assertJSXElement=n.isJSXElementUnsafe=n.isJSXElement=n.RootJSXElementStruct=n.JSXElementStruct=void 0,i(e("./component.cjs"),n),i(e("./components/index.cjs"),n),i(e("./jsx-runtime.cjs"),n),i(e("./jsx-dev-runtime.cjs"),n);var s=e("./validation.cjs");Object.defineProperty(n,"JSXElementStruct",{enumerable:!0,get:function(){return s.JSXElementStruct}}),Object.defineProperty(n,"RootJSXElementStruct",{enumerable:!0,get:function(){return s.RootJSXElementStruct}}),Object.defineProperty(n,"isJSXElement",{enumerable:!0,get:function(){return s.isJSXElement}}),Object.defineProperty(n,"isJSXElementUnsafe",{enumerable:!0,get:function(){return s.isJSXElementUnsafe}}),Object.defineProperty(n,"assertJSXElement",{enumerable:!0,get:function(){return s.assertJSXElement}}),Object.defineProperty(n,"BoxChildStruct",{enumerable:!0,get:function(){return s.BoxChildStruct}}),Object.defineProperty(n,"FormChildStruct",{enumerable:!0,get:function(){return s.FormChildStruct}}),Object.defineProperty(n,"FieldChildUnionStruct",{enumerable:!0,get:function(){return s.FieldChildUnionStruct}})},{"./component.cjs":183,"./components/index.cjs":222,"./jsx-dev-runtime.cjs":224,"./jsx-runtime.cjs":225,"./validation.cjs":226}],224:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jsxDEV=void 0;const r=e("./jsx-runtime.cjs"),i=e("./validation.cjs");n.jsxDEV=function(e,t,n){const s=(0,r.jsx)(e,t,n);return(0,i.assertJSXElement)(s),s}},{"./jsx-runtime.cjs":225,"./validation.cjs":226}],225:[function(e,t,n){"use strict";function r(e,t,n){if("string"==typeof e)throw new Error(`An HTML element ("${String(e)}") was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.`);if(!e)throw new Error("A JSX fragment was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.");return e({...t,key:n})}Object.defineProperty(n,"__esModule",{value:!0}),n.jsxs=n.jsx=void 0,n.jsx=r,n.jsxs=function(e,t,n){return r(e,t,n)}},{}],226:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SpinnerStruct=n.RowStruct=n.BannerStruct=n.TooltipStruct=n.TooltipContentStruct=n.TooltipChildStruct=n.ValueStruct=n.TextStruct=n.SkeletonStruct=n.LinkStruct=n.HeadingStruct=n.DividerStruct=n.CopyableStruct=n.FooterStruct=n.FooterChildStruct=n.SectionStruct=n.FormStruct=n.FormChildStruct=n.BoxStruct=n.BoxChildrenStruct=n.AvatarStruct=n.FormattingStruct=n.ItalicStruct=n.BoldStruct=n.FieldStruct=n.FieldChildUnionStruct=n.FileInputStruct=n.RadioGroupStruct=n.RadioStruct=n.AssetSelectorStruct=n.SelectorStruct=n.SelectorOptionStruct=n.CardStruct=n.AddressStruct=n.DropdownStruct=n.OptionStruct=n.AddressInputStruct=n.InputStruct=n.NumberInputPropsStruct=n.PasswordInputPropsStruct=n.TextInputPropsStruct=n.GenericInputPropsStruct=n.CheckboxStruct=n.ButtonStruct=n.IconStruct=n.ImageStruct=n.BorderRadiusStruct=n.ElementStruct=n.StringElementStruct=n.KeyStruct=void 0,n.assertJSXElement=n.isJSXElementUnsafe=n.isJSXElement=n.JSXElementStruct=n.RootJSXElementStruct=n.ContainerStruct=n.BoxChildStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("./components/index.cjs"),o=e("../internals/index.cjs"),a=e("../types/index.cjs");function c(e){return function(e){const t=(0,o.selectiveUnion)((n=>Array.isArray(n)?(0,r.array)((0,r.lazy)((()=>t))):e));return t}((0,r.nullable)((0,o.selectiveUnion)((t=>"boolean"==typeof t?(0,r.boolean)():1===e.length?e[0]:(0,o.nullUnion)(e)))))}function u(e){return(0,r.nullable)((0,o.selectiveUnion)((t=>"boolean"==typeof t?(0,r.boolean)():e)))}function l(e,t={}){return(0,r.object)({type:(0,o.literal)(e),props:(0,r.object)(t),key:(0,r.nullable)(n.KeyStruct)})}n.KeyStruct=(0,o.nullUnion)([(0,r.string)(),(0,r.number)()]),n.StringElementStruct=c([(0,r.string)()]),n.ElementStruct=(0,r.object)({type:(0,r.string)(),props:(0,r.record)((0,r.string)(),i.JsonStruct),key:(0,r.nullable)(n.KeyStruct)}),n.BorderRadiusStruct=(0,o.nullUnion)([(0,o.literal)("none"),(0,o.literal)("medium"),(0,o.literal)("full")]),n.ImageStruct=l("Image",{src:(0,o.svg)(),alt:(0,r.optional)((0,r.string)()),borderRadius:(0,r.optional)(n.BorderRadiusStruct)});const d=(0,o.nullUnion)(Object.values(s.IconName).map((e=>(0,o.literal)(e))));n.IconStruct=l("Icon",{name:d,color:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("default"),(0,o.literal)("primary"),(0,o.literal)("muted")])),size:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("md"),(0,o.literal)("inherit")]))}),n.ButtonStruct=l("Button",{children:c([n.StringElementStruct,n.ImageStruct,n.IconStruct]),name:(0,r.optional)((0,r.string)()),type:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("button"),(0,o.literal)("submit")])),variant:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("primary"),(0,o.literal)("destructive")])),size:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("sm"),(0,o.literal)("md")])),disabled:(0,r.optional)((0,r.boolean)()),loading:(0,r.optional)((0,r.boolean)()),form:(0,r.optional)((0,r.string)())}),n.CheckboxStruct=l("Checkbox",{name:(0,r.string)(),checked:(0,r.optional)((0,r.boolean)()),label:(0,r.optional)((0,r.string)()),variant:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("default"),(0,o.literal)("toggle")])),disabled:(0,r.optional)((0,r.boolean)())}),n.GenericInputPropsStruct=(0,r.object)({name:(0,r.string)(),value:(0,r.optional)((0,r.string)()),placeholder:(0,r.optional)((0,r.string)()),disabled:(0,r.optional)((0,r.boolean)())}),n.TextInputPropsStruct=(0,r.assign)(n.GenericInputPropsStruct,(0,r.object)({type:(0,o.literal)("text")})),n.PasswordInputPropsStruct=(0,r.assign)(n.GenericInputPropsStruct,(0,r.object)({type:(0,o.literal)("password")})),n.NumberInputPropsStruct=(0,r.assign)(n.GenericInputPropsStruct,(0,r.object)({type:(0,o.literal)("number"),min:(0,r.optional)((0,r.number)()),max:(0,r.optional)((0,r.number)()),step:(0,r.optional)((0,r.number)())})),n.InputStruct=function(e,t){return(0,r.object)({type:(0,o.literal)(e),props:(0,o.selectiveUnion)(t),key:(0,r.nullable)(n.KeyStruct)})}("Input",(e=>{if((0,i.isPlainObject)(e)&&(0,i.hasProperty)(e,"type"))switch(e.type){case"text":return n.TextInputPropsStruct;case"password":return n.PasswordInputPropsStruct;case"number":return n.NumberInputPropsStruct;default:return n.GenericInputPropsStruct}return n.GenericInputPropsStruct})),n.AddressInputStruct=l("AddressInput",{name:(0,r.string)(),chainId:i.CaipChainIdStruct,value:(0,r.optional)((0,r.string)()),placeholder:(0,r.optional)((0,r.string)()),disabled:(0,r.optional)((0,r.boolean)()),displayAvatar:(0,r.optional)((0,r.boolean)())}),n.OptionStruct=l("Option",{value:(0,r.string)(),children:(0,r.string)(),disabled:(0,r.optional)((0,r.boolean)())}),n.DropdownStruct=l("Dropdown",{name:(0,r.string)(),value:(0,r.optional)((0,r.string)()),children:c([n.OptionStruct]),disabled:(0,r.optional)((0,r.boolean)())}),n.AddressStruct=l("Address",{address:(0,o.nullUnion)([i.HexChecksumAddressStruct,i.CaipAccountIdStruct]),truncate:(0,r.optional)((0,r.boolean)()),displayName:(0,r.optional)((0,r.boolean)()),avatar:(0,r.optional)((0,r.boolean)())}),n.CardStruct=l("Card",{image:(0,r.optional)((0,r.string)()),title:(0,o.selectiveUnion)((e=>"object"==typeof e?n.AddressStruct:(0,r.string)())),description:(0,r.optional)((0,r.string)()),value:(0,r.string)(),extra:(0,r.optional)((0,r.string)())}),n.SelectorOptionStruct=l("SelectorOption",{value:(0,r.string)(),children:n.CardStruct,disabled:(0,r.optional)((0,r.boolean)())}),n.SelectorStruct=l("Selector",{name:(0,r.string)(),title:(0,r.string)(),value:(0,r.optional)((0,r.string)()),children:c([n.SelectorOptionStruct]),disabled:(0,r.optional)((0,r.boolean)())}),n.AssetSelectorStruct=l("AssetSelector",{name:(0,r.string)(),addresses:a.NonEip155CaipAccountIdsMatchedByAddressAndNamespaceStruct,chainIds:(0,r.optional)((0,r.array)(a.NonEip155ChainIdStruct)),value:(0,r.optional)(a.NonEip155AssetTypeStruct),disabled:(0,r.optional)((0,r.boolean)())}),n.RadioStruct=l("Radio",{value:(0,r.string)(),children:(0,r.string)(),disabled:(0,r.optional)((0,r.boolean)())}),n.RadioGroupStruct=l("RadioGroup",{name:(0,r.string)(),value:(0,r.optional)((0,r.string)()),children:c([n.RadioStruct]),disabled:(0,r.optional)((0,r.boolean)())}),n.FileInputStruct=l("FileInput",{name:(0,r.string)(),accept:(0,o.nullUnion)([(0,r.optional)((0,r.array)((0,r.string)()))]),compact:(0,r.optional)((0,r.boolean)()),disabled:(0,r.optional)((0,r.boolean)())});const h=[u((0,r.lazy)((()=>n.BoxChildStruct))),n.InputStruct],p=[n.InputStruct,u((0,r.lazy)((()=>n.BoxChildStruct)))],f=[u((0,r.lazy)((()=>n.BoxChildStruct))),n.InputStruct,u((0,r.lazy)((()=>n.BoxChildStruct)))],m=[n.AssetSelectorStruct,n.AddressInputStruct,n.InputStruct,n.DropdownStruct,n.RadioGroupStruct,n.FileInputStruct,n.CheckboxStruct,n.SelectorStruct];n.FieldChildUnionStruct=(0,o.nullUnion)([...m,...h,...p,...f]);const y=(0,o.selectiveUnion)((e=>{const t=Array.isArray(e);return t&&3===e.length?(0,r.tuple)(f):t&&2===e.length?"Box"===e[0]?.type?(0,r.tuple)(h):(0,r.tuple)(p):(0,o.typedUnion)(m)}));n.FieldStruct=l("Field",{label:(0,r.optional)((0,r.string)()),error:(0,r.optional)((0,r.string)()),children:y}),n.BoldStruct=l("Bold",{children:c([(0,r.string)(),(0,r.lazy)((()=>n.ItalicStruct))])}),n.ItalicStruct=l("Italic",{children:c([(0,r.string)(),(0,r.lazy)((()=>n.BoldStruct))])}),n.FormattingStruct=(0,o.typedUnion)([n.BoldStruct,n.ItalicStruct]),n.AvatarStruct=l("Avatar",{address:i.CaipAccountIdStruct,size:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("sm"),(0,o.literal)("md"),(0,o.literal)("lg")]))}),n.BoxChildrenStruct=c([(0,r.lazy)((()=>n.BoxChildStruct))]),n.BoxStruct=l("Box",{children:n.BoxChildrenStruct,direction:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("horizontal"),(0,o.literal)("vertical")])),alignment:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("start"),(0,o.literal)("center"),(0,o.literal)("end"),(0,o.literal)("space-between"),(0,o.literal)("space-around")])),crossAlignment:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("start"),(0,o.literal)("center"),(0,o.literal)("end")])),center:(0,r.optional)((0,r.boolean)())}),n.FormChildStruct=n.BoxChildrenStruct,n.FormStruct=l("Form",{children:n.FormChildStruct,name:(0,r.string)()});const g=(0,r.refine)(n.ButtonStruct,"FooterButton",(e=>{if("string"==typeof e.props.children||"boolean"==typeof e.props.children||null===e.props.children)return!0;if(Array.isArray(e.props.children)){if(!e.props.children.some((e=>"string"!=typeof e&&"boolean"!=typeof e&&null!==e)))return!0}return"Footer buttons may only contain text."}));function b(e){return(0,r.is)(e,n.JSXElementStruct)}n.SectionStruct=l("Section",{children:n.BoxChildrenStruct,direction:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("horizontal"),(0,o.literal)("vertical")])),alignment:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("start"),(0,o.literal)("center"),(0,o.literal)("end"),(0,o.literal)("space-between"),(0,o.literal)("space-around")]))}),n.FooterChildStruct=(0,o.selectiveUnion)((e=>Array.isArray(e)?(0,r.tuple)([g,g]):g)),n.FooterStruct=l("Footer",{children:n.FooterChildStruct}),n.CopyableStruct=l("Copyable",{value:(0,r.string)(),sensitive:(0,r.optional)((0,r.boolean)())}),n.DividerStruct=l("Divider"),n.HeadingStruct=l("Heading",{children:n.StringElementStruct,size:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("sm"),(0,o.literal)("md"),(0,o.literal)("lg")]))}),n.LinkStruct=l("Link",{href:(0,r.string)(),children:c([n.FormattingStruct,(0,r.string)(),n.IconStruct,n.ImageStruct,n.AddressStruct])}),n.SkeletonStruct=l("Skeleton",{width:(0,r.optional)((0,r.union)([(0,r.number)(),(0,r.string)()])),height:(0,r.optional)((0,r.union)([(0,r.number)(),(0,r.string)()])),borderRadius:(0,r.optional)(n.BorderRadiusStruct)}),n.TextStruct=l("Text",{children:c([(0,o.selectiveUnion)((e=>"string"==typeof e?(0,r.string)():(0,o.typedUnion)([n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.IconStruct,n.SkeletonStruct])))]),alignment:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("start"),(0,o.literal)("center"),(0,o.literal)("end")])),color:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("default"),(0,o.literal)("alternative"),(0,o.literal)("muted"),(0,o.literal)("error"),(0,o.literal)("success"),(0,o.literal)("warning")])),size:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("sm"),(0,o.literal)("md")])),fontWeight:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("regular"),(0,o.literal)("medium"),(0,o.literal)("bold")]))}),n.ValueStruct=l("Value",{value:(0,o.selectiveUnion)((e=>"string"==typeof e?(0,r.string)():n.TextStruct)),extra:(0,o.selectiveUnion)((e=>"string"==typeof e?(0,r.string)():n.TextStruct))}),n.TooltipChildStruct=(0,o.selectiveUnion)((e=>"boolean"==typeof e?(0,r.boolean)():(0,o.typedUnion)([n.TextStruct,n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.ImageStruct,n.IconStruct]))),n.TooltipContentStruct=(0,o.selectiveUnion)((e=>"string"==typeof e?(0,r.string)():(0,o.typedUnion)([n.TextStruct,n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.IconStruct]))),n.TooltipStruct=l("Tooltip",{children:(0,r.nullable)(n.TooltipChildStruct),content:n.TooltipContentStruct}),n.BannerStruct=l("Banner",{children:c([n.TextStruct,n.LinkStruct,n.IconStruct,n.ButtonStruct,n.BoldStruct,n.ItalicStruct,n.SkeletonStruct]),title:(0,r.string)(),severity:(0,r.union)([(0,o.literal)("danger"),(0,o.literal)("info"),(0,o.literal)("success"),(0,o.literal)("warning")])}),n.RowStruct=l("Row",{label:(0,r.string)(),children:(0,o.typedUnion)([n.AddressStruct,n.ImageStruct,n.TextStruct,n.ValueStruct,n.LinkStruct,n.SkeletonStruct]),variant:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("default"),(0,o.literal)("warning"),(0,o.literal)("critical")])),tooltip:(0,r.optional)((0,r.string)())}),n.SpinnerStruct=l("Spinner"),n.BoxChildStruct=(0,o.typedUnion)([n.AddressStruct,n.AssetSelectorStruct,n.AddressInputStruct,n.BoldStruct,n.BoxStruct,n.ButtonStruct,n.CopyableStruct,n.DividerStruct,n.DropdownStruct,n.RadioGroupStruct,n.FieldStruct,n.FileInputStruct,n.FormStruct,n.HeadingStruct,n.InputStruct,n.ImageStruct,n.ItalicStruct,n.LinkStruct,n.RowStruct,n.SpinnerStruct,n.TextStruct,n.TooltipStruct,n.CheckboxStruct,n.CardStruct,n.IconStruct,n.SelectorStruct,n.SectionStruct,n.AvatarStruct,n.BannerStruct,n.SkeletonStruct]),n.ContainerStruct=l("Container",{children:(0,o.selectiveUnion)((e=>Array.isArray(e)?(0,r.tuple)([n.BoxChildStruct,n.FooterStruct]):n.BoxChildStruct)),backgroundColor:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("default"),(0,o.literal)("alternative")]))}),n.RootJSXElementStruct=(0,o.typedUnion)([n.BoxChildStruct,n.ContainerStruct]),n.JSXElementStruct=(0,o.typedUnion)([n.AssetSelectorStruct,n.AddressInputStruct,n.ButtonStruct,n.InputStruct,n.FileInputStruct,n.FieldStruct,n.FormStruct,n.BoldStruct,n.ItalicStruct,n.AddressStruct,n.BoxStruct,n.CopyableStruct,n.DividerStruct,n.HeadingStruct,n.ImageStruct,n.LinkStruct,n.RowStruct,n.SpinnerStruct,n.TextStruct,n.DropdownStruct,n.OptionStruct,n.RadioGroupStruct,n.RadioStruct,n.ValueStruct,n.TooltipStruct,n.CheckboxStruct,n.FooterStruct,n.ContainerStruct,n.CardStruct,n.IconStruct,n.SelectorStruct,n.SelectorOptionStruct,n.SectionStruct,n.AvatarStruct,n.BannerStruct,n.SkeletonStruct]),n.isJSXElement=b,n.isJSXElementUnsafe=function(e){return(0,i.isPlainObject)(e)&&(0,i.hasProperty)(e,"type")&&(0,i.hasProperty)(e,"props")&&(0,i.hasProperty)(e,"key")},n.assertJSXElement=function(e){if(!b(e))throw new Error(`Expected a JSX element, but received ${JSON.stringify(e)}. Please refer to the documentation for the supported JSX elements and their props.`)}},{"../internals/index.cjs":179,"../types/index.cjs":235,"./components/index.cjs":222,"@metamask/superstruct":301,"@metamask/utils":318}],227:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NonEip155AssetTypeStruct=n.NonEip155ChainIdStruct=n.NonEip155CaipAccountIdsMatchedByAddressAndNamespaceStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");n.NonEip155CaipAccountIdsMatchedByAddressAndNamespaceStruct=(0,r.refine)((0,r.array)(i.CaipAccountIdStruct),"Non-EIP-155 Matching Addresses Account ID List",(e=>{const t=e.map((e=>(0,i.parseCaipAccountId)(e)));if(!t.every((({address:e,chain:{namespace:n}})=>e===t[0].address&&n===t[0].chain.namespace)))return"All account IDs must have the same address and namespace.";return!t.some((({chain:{namespace:e}})=>e===i.KnownCaipNamespace.Eip155))||"All account IDs must have non-EIP-155 namespaces."})),n.NonEip155ChainIdStruct=(0,r.refine)(i.CaipChainIdStruct,"Non-EIP-155 Chain ID",(e=>{const{namespace:t}=(0,i.parseCaipChainId)(e);return t!==i.KnownCaipNamespace.Eip155||"Chain ID must not be an EIP-155 chain ID."})),n.NonEip155AssetTypeStruct=(0,r.refine)(i.CaipAssetTypeStruct,"Non-EIP-155 Asset Type",(e=>{const{chain:{namespace:t}}=(0,i.parseCaipAssetType)(e);return t!==i.KnownCaipNamespace.Eip155||"Asset type must not be an EIP-155 asset type."}))},{"@metamask/superstruct":301,"@metamask/utils":318}],228:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],229:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnAssetsConversionResponseStruct=n.AssetConversionStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");n.AssetConversionStruct=(0,r.object)({rate:(0,r.string)(),conversionTime:(0,r.number)(),expirationTime:(0,r.optional)((0,r.number)())}),n.OnAssetsConversionResponseStruct=(0,r.object)({conversionRates:(0,r.record)(i.CaipAssetTypeStruct,(0,r.record)(i.CaipAssetTypeStruct,(0,r.nullable)(n.AssetConversionStruct)))})},{"@metamask/superstruct":301,"@metamask/utils":318}],230:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnAssetsLookupResponseStruct=n.FungibleAssetMetadataStruct=n.AssetIconUrlStruct=n.FungibleAssetUnitStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");n.FungibleAssetUnitStruct=(0,r.object)({name:(0,r.string)(),symbol:(0,r.string)(),decimals:(0,r.number)()}),n.AssetIconUrlStruct=(0,r.refine)((0,r.string)(),"Asset URL",(e=>{try{const t=new URL(e);return(0,i.assert)("https:"===t.protocol||e.startsWith("data:image/svg+xml;base64,")),!0}catch{return"Invalid URL"}})),n.FungibleAssetMetadataStruct=(0,r.object)({name:(0,r.string)(),symbol:(0,r.string)(),fungible:(0,r.literal)(!0),iconUrl:n.AssetIconUrlStruct,units:(0,r.size)((0,r.array)(n.FungibleAssetUnitStruct),1,1/0)}),n.OnAssetsLookupResponseStruct=(0,r.object)({assets:(0,r.record)(i.CaipAssetTypeStruct,(0,r.nullable)(n.FungibleAssetMetadataStruct))})},{"@metamask/superstruct":301,"@metamask/utils":318}],231:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./assets-conversion.cjs"),n),i(e("./assets-lookup.cjs"),n),i(e("./transaction.cjs"),n),i(e("./user-input.cjs"),n)},{"./assets-conversion.cjs":229,"./assets-lookup.cjs":230,"./transaction.cjs":232,"./user-input.cjs":233}],232:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.SeverityLevel=void 0,function(e){e.Critical="critical"}(r||(n.SeverityLevel=r={}))},{}],233:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UserInputEventStruct=n.FileUploadEventStruct=n.InputChangeEventStruct=n.FormSubmitEventStruct=n.AssetSelectorStateStruct=n.FileStruct=n.ButtonClickEventStruct=n.GenericEventStruct=n.UserInputEventType=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");var s;!function(e){e.ButtonClickEvent="ButtonClickEvent",e.FormSubmitEvent="FormSubmitEvent",e.InputChangeEvent="InputChangeEvent",e.FileUploadEvent="FileUploadEvent"}(s||(n.UserInputEventType=s={})),n.GenericEventStruct=(0,r.object)({type:(0,r.string)(),name:(0,r.optional)((0,r.string)())}),n.ButtonClickEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(s.ButtonClickEvent),name:(0,r.optional)((0,r.string)())})),n.FileStruct=(0,r.object)({name:(0,r.string)(),size:(0,r.number)(),contentType:(0,r.string)(),contents:(0,r.string)()}),n.AssetSelectorStateStruct=(0,r.object)({asset:i.CaipAssetTypeStruct,name:(0,r.string)(),symbol:(0,r.string)()}),n.FormSubmitEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(s.FormSubmitEvent),value:(0,r.record)((0,r.string)(),(0,r.nullable)((0,r.union)([(0,r.string)(),n.FileStruct,(0,r.boolean)(),n.AssetSelectorStateStruct]))),name:(0,r.string)()})),n.InputChangeEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(s.InputChangeEvent),name:(0,r.string)(),value:(0,r.union)([(0,r.string)(),(0,r.boolean)(),n.AssetSelectorStateStruct])})),n.FileUploadEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(s.FileUploadEvent),name:(0,r.string)(),file:(0,r.nullable)(n.FileStruct)})),n.UserInputEventStruct=(0,r.union)([n.ButtonClickEventStruct,n.FormSubmitEventStruct,n.InputChangeEventStruct,n.FileUploadEventStruct])},{"@metamask/superstruct":301,"@metamask/utils":318}],234:[function(e,t,n){},{}],235:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),e("./global.cjs"),e("./images.cjs"),i(e("./caip.cjs"),n),i(e("./handlers/index.cjs"),n),i(e("./methods/index.cjs"),n),i(e("./interface.cjs"),n)},{"./caip.cjs":227,"./global.cjs":228,"./handlers/index.cjs":231,"./images.cjs":234,"./interface.cjs":236,"./methods/index.cjs":239}],236:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContentType=n.InterfaceContextStruct=n.ComponentOrElementStruct=n.InterfaceStateStruct=n.FormStateStruct=n.StateStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("./handlers/index.cjs"),o=e("../internals/index.cjs"),a=e("../jsx/index.cjs"),c=e("../ui/index.cjs");var u;n.StateStruct=(0,r.union)([s.AssetSelectorStateStruct,s.FileStruct,(0,r.string)(),(0,r.boolean)(),i.CaipAccountIdStruct]),n.FormStateStruct=(0,r.record)((0,r.string)(),(0,r.nullable)(n.StateStruct)),n.InterfaceStateStruct=(0,r.record)((0,r.string)(),(0,r.union)([n.FormStateStruct,(0,r.nullable)(n.StateStruct)])),n.ComponentOrElementStruct=(0,o.selectiveUnion)((e=>(0,i.isObject)(e)&&!(0,i.hasProperty)(e,"props")?c.ComponentStruct:a.RootJSXElementStruct)),n.InterfaceContextStruct=(0,r.record)((0,r.string)(),i.JsonStruct),function(e){e.Insight="Insight",e.Dialog="Dialog",e.Notification="Notification",e.HomePage="HomePage"}(u||(n.ContentType=u={}))},{"../internals/index.cjs":179,"../jsx/index.cjs":223,"../ui/index.cjs":257,"./handlers/index.cjs":231,"@metamask/superstruct":301,"@metamask/utils":318}],237:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.DialogType=void 0,function(e){e.Alert="alert",e.Confirmation="confirmation",e.Prompt="prompt"}(r||(n.DialogType=r={}))},{}],238:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.AuxiliaryFileEncoding=void 0,function(e){e.Base64="base64",e.Hex="hex",e.Utf8="utf8"}(r||(n.AuxiliaryFileEncoding=r={}))},{}],239:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./dialog.cjs"),n),i(e("./get-file.cjs"),n),i(e("./manage-state.cjs"),n),i(e("./notify.cjs"),n)},{"./dialog.cjs":237,"./get-file.cjs":238,"./manage-state.cjs":240,"./notify.cjs":241}],240:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.ManageStateOperation=void 0,function(e){e.ClearState="clear",e.GetState="get",e.UpdateState="update"}(r||(n.ManageStateOperation=r={}))},{}],241:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.NotificationType=void 0,function(e){e.InApp="inApp",e.Native="native"}(r||(n.NotificationType=r={}))},{}],242:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createBuilder=void 0;const r=e("@metamask/utils");n.createBuilder=function(e,t,n=[]){return(...i)=>{if(1===i.length&&(0,r.isPlainObject)(i[0])){const n={...i[0],type:e};return(0,r.assertStruct)(n,t,`Invalid ${e} component`),n}const s=n.reduce(((e,t,n)=>void 0!==i[n]?{...e,[t]:i[n]}:e),{type:e});return(0,r.assertStruct)(s,t,`Invalid ${e} component`),s}}},{"@metamask/utils":318}],243:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsComponent=n.isComponent=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("./components/index.cjs");n.isComponent=function(e){return(0,r.is)(e,s.ComponentStruct)},n.assertIsComponent=function(e){(0,i.assertStruct)(e,s.ComponentStruct,"Invalid component")}},{"./components/index.cjs":251,"@metamask/superstruct":301,"@metamask/utils":318}],244:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.address=n.AddressStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("../builder.cjs"),o=e("../nodes.cjs");n.AddressStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,r.literal)(o.NodeType.Address),value:i.HexChecksumAddressStruct})),n.address=(0,s.createBuilder)(o.NodeType.Address,n.AddressStruct,["value"])},{"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":301,"@metamask/utils":318}],245:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.button=n.ButtonStruct=n.ButtonType=n.ButtonVariant=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");var a,c;!function(e){e.Primary="primary",e.Secondary="secondary"}(a||(n.ButtonVariant=a={})),function(e){e.Button="button",e.Submit="submit"}(c||(n.ButtonType=c={})),n.ButtonStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,r.literal)(o.NodeType.Button),value:(0,r.string)(),variant:(0,r.optional)((0,r.union)([(0,i.enumValue)(a.Primary),(0,i.enumValue)(a.Secondary)])),buttonType:(0,r.optional)((0,r.union)([(0,i.enumValue)(c.Button),(0,i.enumValue)(c.Submit)])),name:(0,r.optional)((0,r.string)())})),n.button=(0,s.createBuilder)(o.NodeType.Button,n.ButtonStruct,["value","buttonType","name","variant"])},{"../../internals/index.cjs":179,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":301}],246:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.copyable=n.CopyableStruct=void 0;const r=e("@metamask/superstruct"),i=e("../builder.cjs"),s=e("../nodes.cjs");n.CopyableStruct=(0,r.assign)(s.LiteralStruct,(0,r.object)({type:(0,r.literal)(s.NodeType.Copyable),value:(0,r.string)(),sensitive:(0,r.optional)((0,r.boolean)())})),n.copyable=(0,i.createBuilder)(s.NodeType.Copyable,n.CopyableStruct,["value","sensitive"])},{"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":301}],247:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.divider=n.DividerStruct=void 0;const r=e("@metamask/superstruct"),i=e("../builder.cjs"),s=e("../nodes.cjs");n.DividerStruct=(0,r.assign)(s.NodeStruct,(0,r.object)({type:(0,r.literal)(s.NodeType.Divider)})),n.divider=(0,i.createBuilder)(s.NodeType.Divider,n.DividerStruct)},{"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":301}],248:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.form=n.FormStruct=n.FormComponentStruct=void 0;const r=e("@metamask/superstruct"),i=e("./button.cjs"),s=e("./input.cjs"),o=e("../builder.cjs"),a=e("../nodes.cjs");n.FormComponentStruct=(0,r.union)([s.InputStruct,i.ButtonStruct]),n.FormStruct=(0,r.assign)(a.NodeStruct,(0,r.object)({type:(0,r.literal)(a.NodeType.Form),children:(0,r.array)(n.FormComponentStruct),name:(0,r.string)()})),n.form=(0,o.createBuilder)(a.NodeType.Form,n.FormStruct,["name","children"])},{"../builder.cjs":242,"../nodes.cjs":258,"./button.cjs":245,"./input.cjs":252,"@metamask/superstruct":301}],249:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.heading=n.HeadingStruct=void 0;const r=e("@metamask/superstruct"),i=e("../builder.cjs"),s=e("../nodes.cjs");n.HeadingStruct=(0,r.assign)(s.LiteralStruct,(0,r.object)({type:(0,r.literal)(s.NodeType.Heading),value:(0,r.string)()})),n.heading=(0,i.createBuilder)(s.NodeType.Heading,n.HeadingStruct,["value"])},{"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":301}],250:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.image=n.ImageStruct=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");n.ImageStruct=(0,r.assign)(o.NodeStruct,(0,r.object)({type:(0,r.literal)(o.NodeType.Image),value:(0,i.svg)()})),n.image=(0,s.createBuilder)(o.NodeType.Image,n.ImageStruct,["value"])},{"../../internals/index.cjs":179,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":301}],251:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.PanelStruct=n.panel=n.ComponentStruct=n.ImageStruct=n.image=void 0,i(e("./address.cjs"),n),i(e("./copyable.cjs"),n),i(e("./divider.cjs"),n),i(e("./heading.cjs"),n);var s=e("./image.cjs");Object.defineProperty(n,"image",{enumerable:!0,get:function(){return s.image}}),Object.defineProperty(n,"ImageStruct",{enumerable:!0,get:function(){return s.ImageStruct}});var o=e("./panel.cjs");Object.defineProperty(n,"ComponentStruct",{enumerable:!0,get:function(){return o.ComponentStruct}}),Object.defineProperty(n,"panel",{enumerable:!0,get:function(){return o.panel}}),Object.defineProperty(n,"PanelStruct",{enumerable:!0,get:function(){return o.PanelStruct}}),i(e("./spinner.cjs"),n),i(e("./text.cjs"),n),i(e("./row.cjs"),n),i(e("./button.cjs"),n),i(e("./input.cjs"),n),i(e("./form.cjs"),n)},{"./address.cjs":244,"./button.cjs":245,"./copyable.cjs":246,"./divider.cjs":247,"./form.cjs":248,"./heading.cjs":249,"./image.cjs":250,"./input.cjs":252,"./panel.cjs":253,"./row.cjs":254,"./spinner.cjs":255,"./text.cjs":256}],252:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.input=n.InputStruct=n.InputType=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");var a;!function(e){e.Text="text",e.Number="number",e.Password="password"}(a||(n.InputType=a={})),n.InputStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,r.literal)(o.NodeType.Input),value:(0,r.optional)((0,r.string)()),name:(0,r.string)(),inputType:(0,r.optional)((0,r.union)([(0,i.enumValue)(a.Text),(0,i.enumValue)(a.Password),(0,i.enumValue)(a.Number)])),placeholder:(0,r.optional)((0,r.string)()),label:(0,r.optional)((0,r.string)()),error:(0,r.optional)((0,r.string)())})),n.input=(0,s.createBuilder)(o.NodeType.Input,n.InputStruct,["name","inputType","placeholder","value","label"])},{"../../internals/index.cjs":179,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":301}],253:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ComponentStruct=n.panel=n.PanelStruct=n.ParentStruct=void 0;const r=e("@metamask/superstruct"),i=e("./address.cjs"),s=e("./button.cjs"),o=e("./copyable.cjs"),a=e("./divider.cjs"),c=e("./form.cjs"),u=e("./heading.cjs"),l=e("./image.cjs"),d=e("./input.cjs"),h=e("./row.cjs"),p=e("./spinner.cjs"),f=e("./text.cjs"),m=e("../../internals/index.cjs"),y=e("../builder.cjs"),g=e("../nodes.cjs");n.ParentStruct=(0,r.assign)(g.NodeStruct,(0,r.object)({children:(0,r.array)((0,r.lazy)((()=>n.ComponentStruct)))})),n.PanelStruct=(0,r.assign)(n.ParentStruct,(0,r.object)({type:(0,r.literal)(g.NodeType.Panel)})),n.panel=(0,y.createBuilder)(g.NodeType.Panel,n.PanelStruct,["children"]),n.ComponentStruct=(0,m.typedUnion)([o.CopyableStruct,a.DividerStruct,u.HeadingStruct,l.ImageStruct,n.PanelStruct,p.SpinnerStruct,f.TextStruct,h.RowStruct,i.AddressStruct,d.InputStruct,c.FormStruct,s.ButtonStruct])},{"../../internals/index.cjs":179,"../builder.cjs":242,"../nodes.cjs":258,"./address.cjs":244,"./button.cjs":245,"./copyable.cjs":246,"./divider.cjs":247,"./form.cjs":248,"./heading.cjs":249,"./image.cjs":250,"./input.cjs":252,"./row.cjs":254,"./spinner.cjs":255,"./text.cjs":256,"@metamask/superstruct":301}],254:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.row=n.RowStruct=n.RowVariant=void 0;const r=e("@metamask/superstruct"),i=e("./address.cjs"),s=e("./image.cjs"),o=e("./text.cjs"),a=e("../../internals/index.cjs"),c=e("../builder.cjs"),u=e("../nodes.cjs");var l;!function(e){e.Default="default",e.Critical="critical",e.Warning="warning"}(l||(n.RowVariant=l={}));const d=(0,r.union)([s.ImageStruct,o.TextStruct,i.AddressStruct]);n.RowStruct=(0,r.assign)(u.LiteralStruct,(0,r.object)({type:(0,r.literal)(u.NodeType.Row),variant:(0,r.optional)((0,r.union)([(0,a.enumValue)(l.Default),(0,a.enumValue)(l.Critical),(0,a.enumValue)(l.Warning)])),label:(0,r.string)(),value:d})),n.row=(0,c.createBuilder)(u.NodeType.Row,n.RowStruct,["label","value","variant"])},{"../../internals/index.cjs":179,"../builder.cjs":242,"../nodes.cjs":258,"./address.cjs":244,"./image.cjs":250,"./text.cjs":256,"@metamask/superstruct":301}],255:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.spinner=n.SpinnerStruct=void 0;const r=e("@metamask/superstruct"),i=e("../builder.cjs"),s=e("../nodes.cjs");n.SpinnerStruct=(0,r.assign)(s.NodeStruct,(0,r.object)({type:(0,r.literal)(s.NodeType.Spinner)})),n.spinner=(0,i.createBuilder)(s.NodeType.Spinner,n.SpinnerStruct)},{"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":301}],256:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.text=n.TextStruct=void 0;const r=e("@metamask/superstruct"),i=e("../builder.cjs"),s=e("../nodes.cjs");n.TextStruct=(0,r.assign)(s.LiteralStruct,(0,r.object)({type:(0,r.literal)(s.NodeType.Text),value:(0,r.string)(),markdown:(0,r.optional)((0,r.boolean)())})),n.text=(0,i.createBuilder)(s.NodeType.Text,n.TextStruct,["value","markdown"])},{"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":301}],257:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.NodeType=void 0,i(e("./components/index.cjs"),n),i(e("./component.cjs"),n);var s=e("./nodes.cjs");Object.defineProperty(n,"NodeType",{enumerable:!0,get:function(){return s.NodeType}})},{"./component.cjs":243,"./components/index.cjs":251,"./nodes.cjs":258}],258:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LiteralStruct=n.NodeStruct=n.NodeType=void 0;const r=e("@metamask/superstruct");var i;!function(e){e.Copyable="copyable",e.Divider="divider",e.Heading="heading",e.Panel="panel",e.Spinner="spinner",e.Text="text",e.Image="image",e.Row="row",e.Address="address",e.Button="button",e.Input="input",e.Form="form"}(i||(n.NodeType=i={})),n.NodeStruct=(0,r.object)({type:(0,r.string)()}),n.LiteralStruct=(0,r.assign)(n.NodeStruct,(0,r.object)({value:(0,r.unknown)()}))},{"@metamask/superstruct":301}],259:[function(e,t,n){t.exports=e("./dist/jsx/jsx-runtime.cjs")},{"./dist/jsx/jsx-runtime.cjs":225}],260:[function(e,t,n){t.exports=e("./dist/jsx/index.cjs")},{"./dist/jsx/index.cjs":223}],261:[function(e,t,n){t.exports={name:"@metamask/snaps-sdk",version:"6.21.0",description:"A library containing the core functionality for building MetaMask Snaps",keywords:["MetaMask","Snaps","Ethereum"],homepage:"https://github.com/MetaMask/snaps/tree/main/packages/snaps-sdk#readme",bugs:{url:"https://github.com/MetaMask/snaps/issues"},repository:{type:"git",url:"https://github.com/MetaMask/snaps.git"},license:"ISC",sideEffects:!1,exports:{".":{import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"},require:{types:"./dist/index.d.cts",default:"./dist/index.cjs"}},"./jsx":{import:{types:"./dist/jsx/index.d.mts",default:"./dist/jsx/index.mjs"},require:{types:"./dist/jsx/index.d.cts",default:"./dist/jsx/index.cjs"}},"./jsx-runtime":{import:{types:"./dist/jsx/jsx-runtime.d.mts",default:"./dist/jsx/jsx-runtime.mjs"},require:{types:"./dist/jsx/jsx-runtime.d.cts",default:"./dist/jsx/jsx-runtime.cjs"}},"./jsx-dev-runtime":{import:{types:"./dist/jsx/jsx-dev-runtime.d.mts",default:"./dist/jsx/jsx-dev-runtime.mjs"},require:{types:"./dist/jsx/jsx-dev-runtime.d.cts",default:"./dist/jsx/jsx-dev-runtime.cjs"}},"./package.json":"./package.json"},main:"./dist/index.cjs",module:"./dist/index.mjs",types:"./dist/index.d.cts",files:["dist","jsx.js","jsx-dev-runtime.js","jsx-runtime.js","jsx.d.ts","jsx-dev-runtime.d.ts","jsx-runtime.d.ts"],scripts:{build:"ts-bridge --project tsconfig.build.json --verbose --clean --no-references","changelog:update":"../../scripts/update-changelog.sh @metamask/snaps-sdk","changelog:validate":"../../scripts/validate-changelog.sh @metamask/snaps-sdk",lint:"yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies","lint:ci":"yarn lint","lint:dependencies":"depcheck","lint:eslint":"eslint . --cache","lint:fix":"yarn lint:eslint --fix && yarn lint:misc --write","lint:misc":'prettier --no-error-on-unmatched-pattern --log-level warn "**/*.json" "**/*.md" "**/*.html" "!CHANGELOG.md" --ignore-path ../../.gitignore',"publish:preview":"yarn npm publish --tag preview","since-latest-release":"../../scripts/since-latest-release.sh",test:"jest --reporters=jest-silent-reporter","test:clean":"jest --clearCache","test:post":"jest-it-up","test:verbose":"jest --verbose","test:watch":"jest --watch"},dependencies:{"@metamask/key-tree":"^10.1.1","@metamask/providers":"^21.0.0","@metamask/rpc-errors":"^7.0.2","@metamask/superstruct":"^3.1.0","@metamask/utils":"^11.2.0"},devDependencies:{"@lavamoat/allow-scripts":"^3.0.4","@metamask/auto-changelog":"^4.1.0","@ts-bridge/cli":"^0.6.1","@types/jest":"^27.5.1",deepmerge:"^4.2.2",depcheck:"^1.4.7",eslint:"^9.11.0","expect-type":"^0.17.3",jest:"^29.0.2","jest-fetch-mock":"^3.0.3","jest-it-up":"^2.0.0","jest-silent-reporter":"^0.6.0",prettier:"^3.3.3","ts-jest":"^29.1.1",typescript:"~5.3.3"},engines:{node:"^18.16 || >=20"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"}}},{}],262:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isEqual=void 0,n.isEqual=function(e,t){return e.length===t.length&&e.every(((e,n)=>e===t[n]))}},{}],263:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateAuxiliaryFiles=n.encodeAuxiliaryFile=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/utils"),s=e("./base64.cjs"),o=e("./constants.cjs");n.encodeAuxiliaryFile=async function(e,t){if(t===r.AuxiliaryFileEncoding.Base64)return e;const n=await(0,s.decodeBase64)(e);return t===r.AuxiliaryFileEncoding.Utf8?(0,i.bytesToString)(n):(0,i.bytesToHex)(n)},n.validateAuxiliaryFiles=function(e){for(const t of e)(0,i.assert)(t.size<o.MAX_FILE_SIZE,"Static files required by the Snap must be smaller than 64 MB.")}},{"./base64.cjs":264,"./constants.cjs":268,"@metamask/snaps-sdk":176,"@metamask/utils":318}],264:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decodeBase64=n.encodeBase64=void 0;const r=e("@metamask/utils"),i=e("./bytes.cjs");n.encodeBase64=async function(e){const t=(0,i.getBytes)(e);return"FileReader"in globalThis?await new Promise(((e,n)=>{const r=Object.assign(new FileReader,{onload:()=>e(r.result.replace("data:application/octet-stream;base64,","")),onerror:()=>n(r.error)});r.readAsDataURL(new File([t],"",{type:"application/octet-stream"}))})):(0,r.bytesToBase64)(t)},n.decodeBase64=async function(e){const t=await fetch(`data:application/octet-stream;base64,${e}`);return new Uint8Array(await t.arrayBuffer())}},{"./bytes.cjs":265,"@metamask/utils":318}],265:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBytes=void 0;const r=e("@metamask/utils"),i=e("./virtual-file/VirtualFile.cjs");n.getBytes=function(e){const t=e instanceof i.VirtualFile?e.value:e;return"string"==typeof t?(0,r.stringToBytes)(t):t}},{"./virtual-file/VirtualFile.cjs":298,"@metamask/utils":318}],266:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.SnapCaveatType=void 0,function(e){e.PermittedDerivationPaths="permittedDerivationPaths",e.PermittedCoinTypes="permittedCoinTypes",e.SnapCronjob="snapCronjob",e.TransactionOrigin="transactionOrigin",e.SignatureOrigin="signatureOrigin",e.RpcOrigin="rpcOrigin",e.KeyringOrigin="keyringOrigin",e.SnapIds="snapIds",e.ChainIds="chainIds",e.LookupMatchers="lookupMatchers",e.MaxRequestTime="maxRequestTime",e.ProtocolSnapScopes="protocolSnapScopes"}(r||(n.SnapCaveatType=r={}))},{}],267:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checksumFiles=n.checksum=void 0;const r=e("@metamask/utils"),i=e("@noble/hashes/sha256"),s=e("./bytes.cjs");async function o(e){const t=(0,s.getBytes)(e);return"crypto"in globalThis&&"object"==typeof globalThis.crypto&&crypto.subtle?.digest?new Uint8Array(await crypto.subtle.digest("SHA-256",t)):(0,i.sha256)(t)}n.checksum=o,n.checksumFiles=async function(e){const t=await Promise.all([...e].sort(((e,t)=>((0,r.assert)(e.path!==t.path,"Tried to sort files with non-unique paths."),e.path<t.path?-1:1))).map((async e=>o(e))));return o((0,r.concatBytes)(t))}},{"./bytes.cjs":265,"@metamask/utils":318,"@noble/hashes/sha256":347}],268:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MAX_FILE_SIZE=void 0,n.MAX_FILE_SIZE=64e6},{}],269:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isCronjobSpecificationArray=n.CronjobSpecificationArrayStruct=n.isCronjobSpecification=n.CronjobSpecificationStruct=n.parseCronExpression=n.CronExpressionStruct=n.CronjobRpcRequestStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("cron-parser");n.CronjobRpcRequestStruct=(0,r.object)({jsonrpc:(0,r.optional)(i.JsonRpcVersionStruct),id:(0,r.optional)(i.JsonRpcIdStruct),method:(0,r.string)(),params:(0,r.optional)(i.JsonRpcParamsStruct)}),n.CronExpressionStruct=(0,r.refine)((0,r.string)(),"CronExpression",(e=>{try{return(0,s.parseExpression)(e),!0}catch{return!1}})),n.parseCronExpression=function(e){const t=(0,r.create)(e,n.CronExpressionStruct);return(0,s.parseExpression)(t)},n.CronjobSpecificationStruct=(0,r.object)({expression:n.CronExpressionStruct,request:n.CronjobRpcRequestStruct}),n.isCronjobSpecification=function(e){try{return(0,r.create)(e,n.CronjobSpecificationStruct),!0}catch{return!1}},n.CronjobSpecificationArrayStruct=(0,r.array)(n.CronjobSpecificationStruct),n.isCronjobSpecificationArray=function(e){try{return(0,r.create)(e,n.CronjobSpecificationArrayStruct),!0}catch{return!1}}},{"@metamask/superstruct":301,"@metamask/utils":318,"cron-parser":426}],270:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.currency=void 0;const r=e("@metamask/superstruct");n.currency=function(e){const t=e.toLowerCase();return(0,r.coerce)((0,r.literal)(t),(0,r.literal)(e.toUpperCase()),(e=>(0,r.create)(e.toLowerCase(),(0,r.literal)(t))))}},{"@metamask/superstruct":301}],271:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.deepClone=void 0;const i=r(e("rfdc"));n.deepClone=(0,i.default)({proto:!1,circles:!1})},{rfdc:526}],272:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_ENDOWMENTS=void 0,n.DEFAULT_ENDOWMENTS=Object.freeze(["atob","btoa","BigInt","console","crypto","Date","Math","setTimeout","clearTimeout","SubtleCrypto","TextDecoder","TextEncoder","URL","URLSearchParams","setInterval","clearInterval","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","isSecureContext","Intl","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","DataView","ArrayBuffer","AbortController","AbortSignal"])},{}],273:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.getSlip44ProtocolName=n.getSnapDerivationPathName=n.SNAPS_DERIVATION_PATHS=void 0;const i=r(e("@metamask/slip44")),s=e("./array.cjs");function o(e){return"1"===String(e)?"Test Networks":i.default[e]?.name??null}n.SNAPS_DERIVATION_PATHS=[{path:["m","44'","0'"],curve:"ed25519",name:"Test BIP-32 Path (ed25519)"},{path:["m","44'","1'"],curve:"secp256k1",name:"Testnet"},{path:["m","44'","0'"],curve:"secp256k1",name:"Bitcoin Legacy"},{path:["m","49'","0'"],curve:"secp256k1",name:"Bitcoin Nested SegWit"},{path:["m","49'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Nested SegWit"},{path:["m","84'","0'"],curve:"secp256k1",name:"Bitcoin Native SegWit"},{path:["m","84'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Native SegWit"},{path:["m","86'","0'"],curve:"secp256k1",name:"Bitcoin Taproot"},{path:["m","86'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Taproot"},{path:["m","44'","501'"],curve:"ed25519",name:"Solana"},{path:["m","44'","501'","0'","0'"],curve:"ed25519",name:"Solana"},{path:["m","44'","2'"],curve:"secp256k1",name:"Litecoin"},{path:["m","44'","3'"],curve:"secp256k1",name:"Dogecoin"},{path:["m","44'","60'"],curve:"secp256k1",name:"Ethereum"},{path:["m","44'","118'"],curve:"secp256k1",name:"Atom"},{path:["m","44'","145'"],curve:"secp256k1",name:"Bitcoin Cash"},{path:["m","44'","637'"],curve:"ed25519",name:"Aptos"},{path:["m","44'","714'"],curve:"secp256k1",name:"Binance (BNB)"},{path:["m","44'","784'"],curve:"ed25519",name:"Sui"},{path:["m","44'","931'"],curve:"secp256k1",name:"THORChain (RUNE)"},{path:["m","44'","330'"],curve:"secp256k1",name:"Terra (LUNA)"},{path:["m","44'","459'"],curve:"secp256k1",name:"Kava"},{path:["m","44'","529'"],curve:"secp256k1",name:"Secret Network"},{path:["m","44'","397'","0'"],curve:"ed25519",name:"NEAR Protocol"},{path:["m","44'","1'","0'"],curve:"ed25519",name:"Testnet"},{path:["m","44'","472'"],curve:"ed25519",name:"Arweave"},{path:["m","44'","12586'"],curve:"secp256k1",name:"Mina"},{path:["m","44'","242'"],curve:"ed25519",name:"Nimiq"},{path:["m","44'","1729'","0'","0'"],curve:"ed25519",name:"Tezos"},{path:["m","1789'","0'"],curve:"ed25519",name:"Vega"},{path:["m","1852'","1815'"],curve:"ed25519Bip32",name:"Cardano"},{path:["m","44'","508'","0'","0'","0'"],curve:"ed25519",name:"MultiversX"},{path:["m","44'","709'"],curve:"secp256k1",name:"Avail"},{path:["m","44'","626'"],curve:"ed25519",name:"Kadena"},{path:["m","44'","632'"],curve:"ed25519",name:"Massa"}],n.getSnapDerivationPathName=function(e,t){const r=n.SNAPS_DERIVATION_PATHS.find((n=>n.curve===t&&(0,s.isEqual)(n.path,e)));if(r)return r.name;if("secp256k1"===t&&"m"===e[0]&&"44'"===e[1]&&e[2].endsWith("'")){return o(e[2].slice(0,-1))??null}return null},n.getSlip44ProtocolName=o},{"./array.cjs":262,"@metamask/slip44":110}],274:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.STATE_ENCRYPTION_MAGIC_VALUE=n.SIP_6_MAGIC_VALUE=void 0,n.SIP_6_MAGIC_VALUE="1399742832'",n.STATE_ENCRYPTION_MAGIC_VALUE="572232532'"},{}],275:[function(e,t,n){"use strict";var r,i,s,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.unwrapError=n.isWrappedSnapError=n.isSerializedSnapError=n.isSnapError=n.WrappedSnapError=n.SNAP_ERROR_WRAPPER_MESSAGE=n.SNAP_ERROR_WRAPPER_CODE=void 0;const c=e("@metamask/rpc-errors"),u=e("@metamask/snaps-sdk"),l=e("@metamask/utils");n.SNAP_ERROR_WRAPPER_CODE=-31001,n.SNAP_ERROR_WRAPPER_MESSAGE="Wrapped Snap Error";class d extends Error{constructor(e){const t=(0,u.getErrorMessage)(e);super(t),r.set(this,void 0),i.set(this,void 0),s.set(this,void 0),o(this,r,e,"f"),o(this,i,t,"f"),o(this,s,(0,u.getErrorStack)(e),"f")}get name(){return"WrappedSnapError"}get message(){return a(this,i,"f")}get stack(){return a(this,s,"f")}toJSON(){const e=h(a(this,r,"f"))?a(this,r,"f").serialize():(0,c.serializeCause)(a(this,r,"f"));return{code:n.SNAP_ERROR_WRAPPER_CODE,message:n.SNAP_ERROR_WRAPPER_MESSAGE,data:{cause:e}}}serialize(){return this.toJSON()}}function h(e){if((0,l.isObject)(e)&&"serialize"in e&&"function"==typeof e.serialize){const t=e.serialize();return(0,l.isJsonRpcError)(t)&&p(t)}return!1}function p(e){return e.code===u.SNAP_ERROR_CODE&&e.message===u.SNAP_ERROR_MESSAGE}function f(e){return(0,l.isJsonRpcError)(e)&&e.code===n.SNAP_ERROR_WRAPPER_CODE&&e.message===n.SNAP_ERROR_WRAPPER_MESSAGE}function m(e,t,n,r){const i=new c.JsonRpcError(e,t,r);return i.stack=n,i}n.WrappedSnapError=d,r=new WeakMap,i=new WeakMap,s=new WeakMap,n.isSnapError=h,n.isSerializedSnapError=p,n.isWrappedSnapError=f,n.unwrapError=function(e){if(f(e)){if((0,l.isJsonRpcError)(e.data.cause)){if(p(e.data.cause)){const{code:t,message:n,stack:r,data:i}=e.data.cause.data.cause;return[m(t,n,r,i),!0]}const{code:t,message:n,stack:r,data:i}=e.data.cause;return[m(t,n,r,i),!1]}return[m(c.errorCodes.rpc.internal,(0,u.getErrorMessage)(e.data.cause),(0,u.getErrorStack)(e.data.cause)),!1]}if((0,l.isJsonRpcError)(e)){const{code:t,message:n,stack:r,data:i}=e;return[m(t,n,r,i),!1]}return[m(c.errorCodes.rpc.internal,(0,u.getErrorMessage)(e),(0,u.getErrorStack)(e)),!1]}},{"@metamask/rpc-errors":96,"@metamask/snaps-sdk":176,"@metamask/utils":318}],276:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.SNAP_EXPORT_NAMES=n.HandlerType=void 0,function(e){e.OnRpcRequest="onRpcRequest",e.OnSignature="onSignature",e.OnTransaction="onTransaction",e.OnCronjob="onCronjob",e.OnInstall="onInstall",e.OnUpdate="onUpdate",e.OnNameLookup="onNameLookup",e.OnKeyringRequest="onKeyringRequest",e.OnHomePage="onHomePage",e.OnSettingsPage="onSettingsPage",e.OnUserInput="onUserInput",e.OnAssetsLookup="onAssetsLookup",e.OnAssetsConversion="onAssetsConversion",e.OnProtocolRequest="onProtocolRequest"}(r||(n.HandlerType=r={})),n.SNAP_EXPORT_NAMES=Object.values(r)},{}],277:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnNameLookupResponseStruct=n.DomainResolutionResponseStruct=n.AddressResolutionResponseStruct=n.DomainResolutionStruct=n.AddressResolutionStruct=n.OnSettingsPageResponseStruct=n.OnHomePageResponseStruct=n.OnHomePageResponseWithIdStruct=n.OnHomePageResponseWithContentStruct=n.OnSignatureResponseStruct=n.OnTransactionResponseStruct=n.OnTransactionResponseWithContentStruct=n.OnTransactionResponseWithIdStruct=n.OnTransactionSeverityResponseStruct=n.SNAP_EXPORTS=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),s=e("./handler-types.cjs");n.SNAP_EXPORTS={[s.HandlerType.OnRpcRequest]:{type:s.HandlerType.OnRpcRequest,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnTransaction]:{type:s.HandlerType.OnTransaction,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnCronjob]:{type:s.HandlerType.OnCronjob,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnNameLookup]:{type:s.HandlerType.OnNameLookup,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnInstall]:{type:s.HandlerType.OnInstall,required:!1,validator:e=>"function"==typeof e},[s.HandlerType.OnUpdate]:{type:s.HandlerType.OnUpdate,required:!1,validator:e=>"function"==typeof e},[s.HandlerType.OnKeyringRequest]:{type:s.HandlerType.OnKeyringRequest,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnHomePage]:{type:s.HandlerType.OnHomePage,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnSettingsPage]:{type:s.HandlerType.OnSettingsPage,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnSignature]:{type:s.HandlerType.OnSignature,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnUserInput]:{type:s.HandlerType.OnUserInput,required:!1,validator:e=>"function"==typeof e},[s.HandlerType.OnAssetsLookup]:{type:s.HandlerType.OnAssetsLookup,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnAssetsConversion]:{type:s.HandlerType.OnAssetsConversion,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnProtocolRequest]:{type:s.HandlerType.OnProtocolRequest,required:!0,validator:e=>"function"==typeof e}},n.OnTransactionSeverityResponseStruct=(0,i.object)({severity:(0,i.optional)((0,i.literal)(r.SeverityLevel.Critical))}),n.OnTransactionResponseWithIdStruct=(0,i.assign)(n.OnTransactionSeverityResponseStruct,(0,i.object)({id:(0,i.string)()})),n.OnTransactionResponseWithContentStruct=(0,i.assign)(n.OnTransactionSeverityResponseStruct,(0,i.object)({content:r.ComponentOrElementStruct})),n.OnTransactionResponseStruct=(0,i.nullable)((0,i.union)([n.OnTransactionResponseWithContentStruct,n.OnTransactionResponseWithIdStruct])),n.OnSignatureResponseStruct=n.OnTransactionResponseStruct,n.OnHomePageResponseWithContentStruct=(0,i.object)({content:r.ComponentOrElementStruct}),n.OnHomePageResponseWithIdStruct=(0,i.object)({id:(0,i.string)()}),n.OnHomePageResponseStruct=(0,i.union)([n.OnHomePageResponseWithContentStruct,n.OnHomePageResponseWithIdStruct]),n.OnSettingsPageResponseStruct=n.OnHomePageResponseStruct,n.AddressResolutionStruct=(0,i.object)({protocol:(0,i.string)(),resolvedDomain:(0,i.string)()}),n.DomainResolutionStruct=(0,i.object)({protocol:(0,i.string)(),resolvedAddress:(0,i.string)(),domainName:(0,i.string)()}),n.AddressResolutionResponseStruct=(0,i.object)({resolvedDomains:(0,i.size)((0,i.array)(n.AddressResolutionStruct),1,1/0)}),n.DomainResolutionResponseStruct=(0,i.object)({resolvedAddresses:(0,i.size)((0,i.array)(n.DomainResolutionStruct),1,1/0)}),n.OnNameLookupResponseStruct=(0,i.nullable)((0,i.union)([n.AddressResolutionResponseStruct,n.DomainResolutionResponseStruct]))},{"./handler-types.cjs":276,"@metamask/snaps-sdk":176,"@metamask/superstruct":301}],278:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSvgDimensions=n.assertIsSnapIcon=n.SVG_MAX_BYTE_SIZE_TEXT=n.SVG_MAX_BYTE_SIZE=void 0;const r=e("@metamask/utils"),i=e("./svg.cjs");n.SVG_MAX_BYTE_SIZE=1e5,n.SVG_MAX_BYTE_SIZE_TEXT=`${Math.floor(n.SVG_MAX_BYTE_SIZE/1e3)}kb`,n.assertIsSnapIcon=function(e){(0,r.assert)(e.path.endsWith(".svg"),'Expected snap icon to end in ".svg".');const t="string"==typeof e.value?(0,r.stringToBytes)(e.value).byteLength:e.value.byteLength;(0,r.assert)(t<=n.SVG_MAX_BYTE_SIZE,`The specified SVG icon exceeds the maximum size of ${n.SVG_MAX_BYTE_SIZE_TEXT}.`),(0,r.assert)((0,i.isSvg)(e.toString()),"Snap icon must be a valid SVG.")},n.getSvgDimensions=function(e){try{const t=(0,i.parseSvg)(e),n=t["@_height"],s=t["@_width"];if(n&&s)return{height:n,width:s};const o=t["@_viewBox"];if(o){const[e,t,n,i]=o.split(" ");if(n&&i){const e=parseInt(n,10),t=parseInt(i,10);return(0,r.assert)(Number.isInteger(e)&&e>0),(0,r.assert)(Number.isInteger(t)&&t>0),{width:e,height:t}}}}catch{throw new Error("Snap icon must be a valid SVG.")}return null}},{"./svg.cjs":292,"@metamask/utils":318}],279:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createWindow=void 0,n.createWindow=async function({uri:e,id:t,sandbox:n=!0,testId:r="snaps-iframe"}){return await new Promise(((i,s)=>{const o=document.createElement("iframe");o.setAttribute("id",t),o.setAttribute("data-testid",r),n&&o.setAttribute("sandbox","allow-scripts"),o.setAttribute("src",e),document.body.appendChild(o),o.addEventListener("load",(()=>{o.contentWindow?i(o.contentWindow):s(new Error(`iframe.contentWindow not present on load for job "${t}".`))}))}))}},{}],280:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./array.cjs"),n),i(e("./auxiliary-files.cjs"),n),i(e("./base64.cjs"),n),i(e("./bytes.cjs"),n),i(e("./caveats.cjs"),n),i(e("./checksum.cjs"),n),i(e("./constants.cjs"),n),i(e("./cronjob.cjs"),n),i(e("./currency.cjs"),n),i(e("./deep-clone.cjs"),n),i(e("./default-endowments.cjs"),n),i(e("./derivation-paths.cjs"),n),i(e("./entropy.cjs"),n),i(e("./errors.cjs"),n),i(e("./handlers.cjs"),n),i(e("./handler-types.cjs"),n),i(e("./iframe.cjs"),n),i(e("./json.cjs"),n),i(e("./json-rpc.cjs"),n),i(e("./localization.cjs"),n),i(e("./logging.cjs"),n),i(e("./manifest/index.cjs"),n),i(e("./path.cjs"),n),i(e("./platform-version.cjs"),n),i(e("./snaps.cjs"),n),i(e("./strings.cjs"),n),i(e("./structs.cjs"),n),i(e("./types.cjs"),n),i(e("./ui.cjs"),n),i(e("./url.cjs"),n),i(e("./validation.cjs"),n),i(e("./versions.cjs"),n),i(e("./virtual-file/index.cjs"),n)},{"./array.cjs":262,"./auxiliary-files.cjs":263,"./base64.cjs":264,"./bytes.cjs":265,"./caveats.cjs":266,"./checksum.cjs":267,"./constants.cjs":268,"./cronjob.cjs":269,"./currency.cjs":270,"./deep-clone.cjs":271,"./default-endowments.cjs":272,"./derivation-paths.cjs":273,"./entropy.cjs":274,"./errors.cjs":275,"./handler-types.cjs":276,"./handlers.cjs":277,"./iframe.cjs":279,"./json-rpc.cjs":281,"./json.cjs":282,"./localization.cjs":283,"./logging.cjs":284,"./manifest/index.cjs":285,"./path.cjs":287,"./platform-version.cjs":288,"./snaps.cjs":289,"./strings.cjs":290,"./structs.cjs":291,"./types.cjs":293,"./ui.cjs":294,"./url.cjs":295,"./validation.cjs":296,"./versions.cjs":297,"./virtual-file/index.cjs":299}],281:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsJsonRpcSuccess=n.isOriginAllowed=n.assertIsKeyringOrigins=n.KeyringOriginsStruct=n.assertIsRpcOrigins=n.RpcOriginsStruct=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=(0,i.array)((0,i.refine)((0,i.string)(),"Allowed origin",(e=>!(e.split("*").length-1>2)||'No more than two wildcards ("*") are allowed in an origin specifier.')));function a(e,t){if("*"===e||e===t)return!0;const n=function(e){const t=e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&").replace(/\\\*/gu,".*");return RegExp(`^${t}$`,"u")}(e);return n.test(t)}n.RpcOriginsStruct=(0,i.refine)((0,i.object)({dapps:(0,i.optional)((0,i.boolean)()),snaps:(0,i.optional)((0,i.boolean)()),allowedOrigins:(0,i.optional)(o)}),"RPC origins",(e=>!!Boolean(!0===e.snaps||!0===e.dapps||e.allowedOrigins&&e.allowedOrigins.length>0)||"Must specify at least one JSON-RPC origin.")),n.assertIsRpcOrigins=function(e,t){(0,s.assertStruct)(e,n.RpcOriginsStruct,"Invalid JSON-RPC origins",t)},n.KeyringOriginsStruct=(0,i.object)({allowedOrigins:(0,i.optional)(o)}),n.assertIsKeyringOrigins=function(e,t){(0,s.assertStruct)(e,n.KeyringOriginsStruct,"Invalid keyring origins",t)},n.isOriginAllowed=function(e,t,n){return"metamask"===n||(!!e.allowedOrigins?.some((e=>a(e,n)))||(!(t!==r.SubjectType.Website||!e.dapps)||Boolean(t===r.SubjectType.Snap&&e.snaps)))},n.assertIsJsonRpcSuccess=function(e){if(!(0,s.isJsonRpcSuccess)(e)){if((0,s.isJsonRpcFailure)(e))throw new Error(`JSON-RPC request failed: ${e.error.message}`);throw new Error("Invalid JSON-RPC response.")}}},{"@metamask/permission-controller":79,"@metamask/superstruct":301,"@metamask/utils":318}],282:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonSizeUnsafe=n.parseJson=void 0;const r=e("@metamask/utils");n.parseJson=function(e){return(0,r.getSafeJson)(JSON.parse(e))},n.getJsonSizeUnsafe=function(e){const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength}},{"@metamask/utils":318}],283:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateSnapManifestLocalizations=n.getLocalizedSnapManifest=n.translate=n.TRANSLATION_REGEX=n.getLocalizationFile=n.getValidatedLocalizationFiles=n.LocalizationFileStruct=n.LOCALIZABLE_FIELDS=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),s=e("./json.cjs");function o(e,t){const n=t.find((t=>t.locale===e));return n||t.find((e=>"en"===e.locale))}function a(e,t){const r=e.matchAll(n.TRANSLATION_REGEX);return Array.from(r).reduce(((n,[r,i])=>{if(!t)throw new Error(`Failed to translate "${e}": No localization file found.`);const s=t.messages[i.trim()];if(!s)throw new Error(`Failed to translate "${e}": No translation found for "${i.trim()}" in "${t.locale}" file.`);return n.replace(r,s.message)}),e)}function c(e,t,r){const i=o(t,r);return n.LOCALIZABLE_FIELDS.reduce(((e,t)=>{const n=a(e[t],i);return{...e,[t]:n}}),e)}n.LOCALIZABLE_FIELDS=["description","proposedName"],n.LocalizationFileStruct=(0,i.object)({locale:(0,i.string)(),messages:(0,i.record)((0,i.string)(),(0,i.object)({message:(0,i.string)(),description:(0,i.optional)((0,i.string)())}))}),n.getValidatedLocalizationFiles=function(e){for(const t of e)try{t.result=(0,i.create)((0,s.parseJson)(t.toString()),n.LocalizationFileStruct)}catch(e){if(e instanceof i.StructError)throw new Error(`Failed to validate localization file "${t.path}": ${e.message}.`);if(e instanceof SyntaxError)throw new Error(`Failed to parse localization file "${t.path}" as JSON.`);throw e}return e},n.getLocalizationFile=o,n.TRANSLATION_REGEX=/\{\{\s?([a-zA-Z0-9-_\s]+)\s?\}\}/gu,n.translate=a,n.getLocalizedSnapManifest=c,n.validateSnapManifestLocalizations=function(e,t){try{t.filter((e=>"en"!==e.locale)).forEach((n=>{c(e,n.locale,t)})),c(e,"en",t)}catch(e){throw new Error(`Failed to localize Snap manifest: ${(0,r.getErrorMessage)(e)}`)}}},{"./json.cjs":282,"@metamask/snaps-sdk":176,"@metamask/superstruct":301}],284:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=n.logError=n.logInfo=n.snapsLogger=void 0;const r=e("@metamask/utils");n.snapsLogger=(0,r.createProjectLogger)("snaps"),n.logInfo=function(e,...t){console.log(e,...t)},n.logError=function(e,...t){console.error(e,...t)},n.logWarning=function(e,...t){console.warn(e,...t)}},{"@metamask/utils":318}],285:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./validation.cjs"),n)},{"./validation.cjs":286}],286:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapManifest=n.assertIsSnapManifest=n.isSnapManifest=n.SnapManifestStruct=n.InitialConnectionsStruct=n.SnapAuxilaryFilesStruct=n.PermissionsStruct=n.EmptyObjectStruct=n.HandlerCaveatsStruct=n.ProtocolScopesStruct=n.MaxRequestTimeStruct=n.MAXIMUM_REQUEST_TIMEOUT=n.MINIMUM_REQUEST_TIMEOUT=n.LookupMatchersStruct=n.ChainIdsStruct=n.SnapIdsStruct=n.SemVerRangeStruct=n.SnapGetBip32EntropyPermissionsStruct=n.Bip32EntropyStruct=n.CurveStruct=n.bip32entropy=n.Bip32PathStruct=n.FORBIDDEN_COIN_TYPES=void 0;const r=e("@metamask/key-tree"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("../array.cjs"),a=e("../cronjob.cjs"),c=e("../entropy.cjs"),u=e("../json-rpc.cjs"),l=e("../snaps.cjs"),d=e("../structs.cjs"),h=e("../types.cjs"),p=[c.SIP_6_MAGIC_VALUE,c.STATE_ENCRYPTION_MAGIC_VALUE];n.FORBIDDEN_COIN_TYPES=[60];const f=n.FORBIDDEN_COIN_TYPES.map((e=>["m","44'",`${e}'`]));n.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=>!(0,r.isValidBIP32PathSegment)(e)))?"Path must be a valid BIP-32 derivation path array.":p.includes(e[1])?`The purpose "${e[1]}" is not allowed for entropy derivation.`:!f.some((t=>(0,o.isEqual)(e.slice(0,t.length),t)))||`The path "${e.join("/")}" is not allowed for entropy derivation.`));n.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.")),n.CurveStruct=(0,i.enums)(["ed25519","secp256k1","ed25519Bip32"]),n.Bip32EntropyStruct=(0,n.bip32entropy)((0,i.type)({path:n.Bip32PathStruct,curve:n.CurveStruct})),n.SnapGetBip32EntropyPermissionsStruct=(0,i.size)((0,i.array)(n.Bip32EntropyStruct),1,1/0),n.SemVerRangeStruct=(0,i.refine)((0,i.string)(),"SemVer range",(e=>!!(0,s.isValidSemVerRange)(e)||"Expected a valid SemVer range.")),n.SnapIdsStruct=(0,i.refine)((0,i.record)(l.SnapIdStruct,(0,i.object)({version:(0,i.optional)(n.SemVerRangeStruct)})),"SnapIds",(e=>0!==Object.keys(e).length)),n.ChainIdsStruct=(0,i.size)((0,i.array)(s.CaipChainIdStruct),1,1/0),n.LookupMatchersStruct=(0,i.union)([(0,i.object)({tlds:(0,i.size)((0,i.array)((0,i.string)()),1,1/0)}),(0,i.object)({schemes:(0,i.size)((0,i.array)((0,i.string)()),1,1/0)}),(0,i.object)({tlds:(0,i.size)((0,i.array)((0,i.string)()),1,1/0),schemes:(0,i.size)((0,i.array)((0,i.string)()),1,1/0)})]),n.MINIMUM_REQUEST_TIMEOUT=(0,s.inMilliseconds)(5,s.Duration.Second),n.MAXIMUM_REQUEST_TIMEOUT=(0,s.inMilliseconds)(3,s.Duration.Minute),n.MaxRequestTimeStruct=(0,i.size)((0,i.integer)(),n.MINIMUM_REQUEST_TIMEOUT,n.MAXIMUM_REQUEST_TIMEOUT),n.ProtocolScopesStruct=(0,i.record)(s.CaipChainIdStruct,(0,i.object)({methods:(0,i.array)((0,i.string)())})),n.HandlerCaveatsStruct=(0,i.object)({maxRequestTime:(0,i.optional)(n.MaxRequestTimeStruct)}),n.EmptyObjectStruct=(0,i.object)({}),n.PermissionsStruct=(0,i.type)({"endowment:assets":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({scopes:n.ChainIdsStruct}))),"endowment:cronjob":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({jobs:(0,i.optional)(a.CronjobSpecificationArrayStruct)}))),"endowment:ethereum-provider":(0,i.optional)(n.EmptyObjectStruct),"endowment:keyring":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,u.KeyringOriginsStruct)),"endowment:protocol":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({scopes:n.ProtocolScopesStruct}))),"endowment:lifecycle-hooks":(0,i.optional)(n.HandlerCaveatsStruct),"endowment:name-lookup":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({chains:(0,i.optional)(n.ChainIdsStruct),matchers:(0,i.optional)(n.LookupMatchersStruct)}))),"endowment:network-access":(0,i.optional)(n.EmptyObjectStruct),"endowment:page-home":(0,i.optional)(n.HandlerCaveatsStruct),"endowment:rpc":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,u.RpcOriginsStruct)),"endowment:signature-insight":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({allowSignatureOrigin:(0,i.optional)((0,i.boolean)())}))),"endowment:transaction-insight":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({allowTransactionOrigin:(0,i.optional)((0,i.boolean)())}))),"endowment:webassembly":(0,i.optional)(n.EmptyObjectStruct),snap_dialog:(0,i.optional)(n.EmptyObjectStruct),snap_manageState:(0,i.optional)(n.EmptyObjectStruct),snap_manageAccounts:(0,i.optional)(n.EmptyObjectStruct),snap_notify:(0,i.optional)(n.EmptyObjectStruct),snap_getBip32Entropy:(0,i.optional)(n.SnapGetBip32EntropyPermissionsStruct),snap_getBip32PublicKey:(0,i.optional)(n.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)(n.EmptyObjectStruct),snap_getLocale:(0,i.optional)(n.EmptyObjectStruct),wallet_snap:(0,i.optional)(n.SnapIdsStruct)}),n.SnapAuxilaryFilesStruct=(0,i.array)((0,i.string)()),n.InitialConnectionsStruct=(0,i.record)((0,i.intersection)([(0,i.string)(),(0,h.uri)()]),(0,i.object)({})),n.SnapManifestStruct=(0,i.object)({version:s.VersionStruct,description:(0,i.size)((0,i.string)(),1,280),proposedName:(0,i.size)((0,i.string)(),1,214),repository:(0,i.optional)((0,i.type)({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:s.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:h.NameStruct,registry:(0,i.union)([(0,i.literal)("https://registry.npmjs.org"),(0,i.literal)("https://registry.npmjs.org/")])})}),files:(0,i.optional)(n.SnapAuxilaryFilesStruct),locales:(0,i.optional)(n.SnapAuxilaryFilesStruct)}),initialConnections:(0,i.optional)(n.InitialConnectionsStruct),initialPermissions:n.PermissionsStruct,manifestVersion:(0,i.literal)("0.1"),platformVersion:(0,i.optional)(s.VersionStruct),$schema:(0,i.optional)((0,i.string)())}),n.isSnapManifest=function(e){return(0,i.is)(e,n.SnapManifestStruct)},n.assertIsSnapManifest=function(e){(0,s.assertStruct)(e,n.SnapManifestStruct,`"${h.NpmSnapFileNames.Manifest}" is invalid`)},n.createSnapManifest=function(e){return(0,i.create)(e,n.SnapManifestStruct)}},{"../array.cjs":262,"../cronjob.cjs":269,"../entropy.cjs":274,"../json-rpc.cjs":281,"../snaps.cjs":289,"../structs.cjs":291,"../types.cjs":293,"@metamask/key-tree":68,"@metamask/superstruct":301,"@metamask/utils":318}],287:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.normalizeRelative=void 0;const r=e("@metamask/utils");n.normalizeRelative=function(e){return(0,r.assert)(!e.startsWith("/")),(0,r.assert)(-1===e.search(/:|\/\//u),`Path "${e}" potentially an URI instead of local relative`),e.startsWith("./")?e.slice(2):e}},{"@metamask/utils":318}],288:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.getPlatformVersion=void 0;const i=r(e("@metamask/snaps-sdk/package.json"));n.getPlatformVersion=function(){return i.default.version}},{"@metamask/snaps-sdk/package.json":261}],289:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.verifyRequestedSnapPermissions=n.isSnapPermitted=n.assertIsValidSnapId=n.isSnapId=n.stripSnapPrefix=n.getSnapPrefix=n.SnapIdStruct=n.SnapIdPrefixStruct=n.HttpSnapIdStruct=n.NpmSnapIdStruct=n.LocalSnapIdStruct=n.BaseSnapIdStruct=n.LOCALHOST_HOSTNAMES=n.validateSnapShasum=n.getSnapChecksum=n.SnapStatusEvents=n.SnapStatus=n.PROPOSED_NAME_REGEX=void 0;const i=e("@metamask/snaps-sdk"),s=e("@metamask/superstruct"),o=e("@metamask/utils"),a=e("@scure/base"),c=r(e("fast-json-stable-stringify")),u=r(e("validate-npm-package-name")),l=e("./caveats.cjs"),d=e("./checksum.cjs"),h=e("./types.cjs");var p,f;function m(e){const t=e.clone();return delete t.result.source.shasum,t.value=(0,c.default)(t.result),t}async function y(e){const{manifest:t,sourceCode:n,svgIcon:r,auxiliaryFiles:i,localizationFiles:s}=e,o=[m(t),n,r,...i,...s].filter((e=>void 0!==e));return a.base64.encode(await(0,d.checksumFiles)(o))}n.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"}(p||(n.SnapStatus=p={})),function(e){e.Start="START",e.Stop="STOP",e.Crash="CRASH",e.Update="UPDATE"}(f||(n.SnapStatusEvents=f={})),n.getSnapChecksum=y,n.validateSnapShasum=async function(e,t="Invalid Snap manifest: manifest shasum does not match computed shasum."){if(e.manifest.result.source.shasum!==await y(e))throw new Error(t)},n.LOCALHOST_HOSTNAMES=["localhost","127.0.0.1","[::1]"],n.BaseSnapIdStruct=(0,o.definePattern)("Base Snap Id",/^[\x21-\x7E]*$/u);const g=(0,h.uri)({protocol:(0,s.enums)(["http:","https:"]),hostname:(0,s.enums)(n.LOCALHOST_HOSTNAMES),hash:(0,s.empty)((0,s.string)()),search:(0,s.empty)((0,s.string)())});function b(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}"`)}n.LocalSnapIdStruct=(0,s.refine)(n.BaseSnapIdStruct,"local Snap Id",(e=>{if(!e.startsWith(h.SnapIdPrefixes.local))return`Expected local snap ID, got "${e}".`;const[t]=(0,s.validate)(e.slice(h.SnapIdPrefixes.local.length),g);return t??!0})),n.NpmSnapIdStruct=(0,s.intersection)([n.BaseSnapIdStruct,(0,h.uri)({protocol:(0,s.literal)(h.SnapIdPrefixes.npm),pathname:(0,s.refine)((0,s.string)(),"package name",(function*(e){const t=e.startsWith("/")?e.slice(1):e,{errors:n,validForNewPackages:r,warnings:i}=(0,u.default)(t);return r||(void 0===n?((0,o.assert)(void 0!==i),yield*i):yield*n),!0})),search:(0,s.empty)((0,s.string)()),hash:(0,s.empty)((0,s.string)())})]),n.HttpSnapIdStruct=(0,s.intersection)([n.BaseSnapIdStruct,(0,h.uri)({protocol:(0,s.enums)(["http:","https:"]),search:(0,s.empty)((0,s.string)()),hash:(0,s.empty)((0,s.string)())})]),n.SnapIdPrefixStruct=(0,s.refine)((0,s.string)(),"Snap ID prefix",(e=>{if(Object.values(h.SnapIdPrefixes).some((t=>e.startsWith(t))))return!0;return`Invalid or no prefix found. Expected Snap ID to start with one of: ${Object.values(h.SnapIdPrefixes).map((e=>`"${e}"`)).join(", ")}, but received: "${e}"`})),n.SnapIdStruct=(0,i.selectiveUnion)((e=>"string"==typeof e&&e.startsWith(h.SnapIdPrefixes.npm)?n.NpmSnapIdStruct:"string"==typeof e&&e.startsWith(h.SnapIdPrefixes.local)?n.LocalSnapIdStruct:n.SnapIdPrefixStruct)),n.getSnapPrefix=b,n.stripSnapPrefix=function(e){return e.replace(b(e),"")},n.isSnapId=function(e){return(0,s.is)(e,n.SnapIdStruct)},n.assertIsValidSnapId=function(e){(0,o.assertStruct)(e,n.SnapIdStruct,"Invalid snap ID")},n.isSnapPermitted=function(e,t){return Boolean((e?.wallet_snap?.caveats?.find((e=>e.type===l.SnapCaveatType.SnapIds))??{}).value?.[t])},n.verifyRequestedSnapPermissions=function(e){(0,o.assert)((0,o.isObject)(e),"Requested permissions must be an object.");const{wallet_snap:t}=e;(0,o.assert)((0,o.isObject)(t),"wallet_snap is missing from the requested permissions.");const{caveats:n}=t;(0,o.assert)(Array.isArray(n)&&1===n.length,"wallet_snap must have a caveat property with a single-item array value.");const[r]=n;(0,o.assert)((0,o.isObject)(r)&&r.type===l.SnapCaveatType.SnapIds&&(0,o.isObject)(r.value),`The requested permissions do not have a valid ${l.SnapCaveatType.SnapIds} caveat.`)}},{"./caveats.cjs":266,"./checksum.cjs":267,"./types.cjs":293,"@metamask/snaps-sdk":176,"@metamask/superstruct":301,"@metamask/utils":318,"@scure/base":351,"fast-json-stable-stringify":479,"validate-npm-package-name":577}],290:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.indent=void 0,n.indent=function(e,t=2){return e.replace(/^/gmu," ".repeat(t))}},{}],291:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeStructs=n.createUnion=n.validateUnion=n.getStructErrorMessage=n.getStructFailureMessage=n.getStructErrorPrefix=n.getUnionStructNames=n.getStructFromPath=n.createFromStruct=n.getError=n.arrayToGenerator=n.SnapsStructError=n.named=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("chalk"),a=e("./strings.cjs");function c(e,t,n){return n?t(e):e}n.named=function(e,t){return new i.Struct({...t,type:e})};class u extends i.StructError{constructor(e,t,n,r,i,s=!0){super(r,i),this.name="SnapsStructError",this.message=`${t}.\n\n${y(e,[...i()],s)}${n?`\n\n${n}`:""}`}}function*l(e){for(const t of e)yield t}function d({struct:e,prefix:t,suffix:n="",error:r,colorize:i}){return new u(e,t,n,r,(()=>l(r.failures())),i)}function h(e,t){return t.reduce(((t,n)=>(0,s.isObject)(e.schema)&&e.schema[n]?e.schema[n]:t),e)}function p(e,t=!0){return Array.isArray(e.schema)?e.schema.map((({type:e})=>c(e,o.green,t))):null}function f(e,t=!0){return"never"===e.type||0===e.path.length?"":`At path: ${c(e.path.join("."),o.bold,t)} — `}function m(e,t,n=!0){const r=c(JSON.stringify(t.value),o.red,n),i=f(t,n);if("union"===t.type){const s=p(h(e,t.path),n);return s?`${i}Expected the value to be one of: ${s.join(", ")}, but received: ${r}.`:`${i}${t.message}.`}if("literal"===t.type){return`${i}${t.message.replace(/the literal `(.+)`,/u,`the value to be \`${c("$1",o.green,n)}\`,`).replace(/, but received: (.+)/u,`, but received: ${c("$1",o.red,n)}`)}.`}if("never"===t.type)return`Unknown key: ${c(t.path.join("."),o.bold,n)}, received: ${r}.`;if("size"===t.refinement){return`${i}${t.message.replace(/length between `(\d+)` and `(\d+)`/u,`length between ${c("$1",o.green,n)} and ${c("$2",o.green,n)},`).replace(/length of `(\d+)`/u,`length of ${c("$1",o.red,n)}`).replace(/a array/u,"an array")}.`}return void 0!==t.refinement?`${i}${t.message}.`:`${i}Expected a value of type ${c(t.type,o.green,n)}, but received: ${r}.`}function y(e,t,n=!0){return t.map((t=>(0,a.indent)(`• ${m(e,t,n)}`))).join("\n")}function g(e,t,n,o=!1){(0,s.assert)(t.schema,"Expected a struct with a schema. Make sure to use `union` from `@metamask/snaps-sdk`."),(0,s.assert)(t.schema.length>0,"Expected a non-empty array of structs.");const a=t.schema.map((e=>e.schema[n])),c=(0,i.type)({[n]:(0,r.union)(a)}),[u]=(0,i.validate)(e,c,{coerce:o});if(u)throw new Error(m(c,u.failures()[0],!1));const l=e,d=t.schema.filter((e=>(0,i.is)(l[n],e.schema[n])));(0,s.assert)(d.length>0,"Expected a struct to match the value.");const h=d.map((e=>(0,i.validate)(l,e,{coerce:o}))),p=h.find((([e])=>!e));if(p)return p[1];(0,s.assert)(h[0][0],"Expected at least one error.");const f=h.reduce(((e,[t])=>((0,s.assert)(t,"Expected an error."),t.failures().length<e.failures().length?t:e)),h[0][0]);throw new Error(m(t,f.failures()[0],!1))}n.SnapsStructError=u,n.arrayToGenerator=l,n.getError=d,n.createFromStruct=function(e,t,n,r=""){try{return(0,i.create)(e,t)}catch(e){if(e instanceof i.StructError)throw d({struct:t,prefix:n,suffix:r,error:e});throw e}},n.getStructFromPath=h,n.getUnionStructNames=p,n.getStructErrorPrefix=f,n.getStructFailureMessage=m,n.getStructErrorMessage=y,n.validateUnion=g,n.createUnion=function(e,t,n){return g(e,t,n,!0)},n.mergeStructs=function(...e){const t=i.assign(...e);return new i.Struct({...t,*refiner(t,n){for(const r of e)yield*r.refiner(t,n)}})}},{"./strings.cjs":290,"@metamask/snaps-sdk":176,"@metamask/superstruct":301,"@metamask/utils":318,chalk:389}],292:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isSvg=n.parseSvg=void 0;const r=e("@metamask/utils"),i=e("fast-xml-parser");function s(e){try{const t=e.trim();(0,r.assert)(t.length>0);const n=new i.XMLParser({ignoreAttributes:!1,parseAttributeValue:!0}).parse(t,!0);return(0,r.assert)((0,r.hasProperty)(n,"svg")),(0,r.isObject)(n.svg)?n.svg:{}}catch{throw new Error("Snap icon must be a valid SVG.")}}n.parseSvg=s,n.isSvg=function(e){try{return s(e),!0}catch{return!1}}},{"@metamask/utils":318,"fast-xml-parser":481}],293:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WALLET_SNAP_PERMISSION_KEY=n.isValidUrl=n.uri=n.SNAP_STREAM_NAMES=n.SnapIdPrefixes=n.NpmSnapPackageJsonStruct=n.NameStruct=n.NpmSnapFileNames=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");var s,o,a;!function(e){e.PackageJson="package.json",e.Manifest="snap.manifest.json"}(s||(n.NpmSnapFileNames=s={})),n.NameStruct=(0,r.size)((0,i.definePattern)("Snap Name",/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214),n.NpmSnapPackageJsonStruct=(0,r.type)({version:i.VersionStruct,name:n.NameStruct,main:(0,r.optional)((0,r.size)((0,r.string)(),1,1/0)),repository:(0,r.optional)((0,r.type)({type:(0,r.size)((0,r.string)(),1,1/0),url:(0,r.size)((0,r.string)(),1,1/0)}))}),function(e){e.npm="npm:",e.local="local:"}(o||(n.SnapIdPrefixes=o={})),function(e){e.JSON_RPC="jsonRpc",e.COMMAND="command"}(a||(n.SNAP_STREAM_NAMES=a={}));n.uri=(e={})=>(0,r.refine)((0,r.union)([(0,r.string)(),(0,r.instance)(URL)]),"uri",(t=>{try{const n=new URL(t),i=(0,r.type)(e);return(0,r.assert)(n,i),!0}catch{return`Expected URL, got "${t.toString()}".`}})),n.isValidUrl=function(e,t={}){return(0,r.is)(e,(0,n.uri)(t))},n.WALLET_SNAP_PERMISSION_KEY="wallet_snap"},{"@metamask/superstruct":301,"@metamask/utils":318}],294:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.serialiseJsx=n.walkJsx=n.getJsxChildren=n.hasChildren=n.getTotalTextLength=n.validateJsxElements=n.validateAssetSelector=n.validateTextLinks=n.validateLink=n.getJsxElementFromComponent=n.getTextChildren=void 0;const r=e("@metamask/snaps-sdk/jsx-runtime"),i=e("@metamask/snaps-sdk"),s=e("@metamask/snaps-sdk/jsx"),o=e("@metamask/utils"),a=e("marked"),c=e("./url.cjs"),u=5e4,l=["https:","mailto:","metamask:"];function d(e){switch(e){case"primary":return"primary";case"secondary":return"destructive";default:return}}function h(e){return 1===e.length?e[0]:e}function p(e){return e.tokens&&e.tokens.length>0?h(e.tokens.flatMap(m)):e.href}function f(e){return h(e.flatMap(m))}function m(e){switch(e.type){case"link":return(0,r.jsx)(s.Link,{href:e.href,children:p(e)});case"text":return e.text;case"strong":return(0,r.jsx)(s.Bold,{children:f(e.tokens)});case"em":return(0,r.jsx)(s.Italic,{children:f(e.tokens)});default:return null}}function y(e){const t=(0,a.lexer)(e,{gfm:!1}),n=[];return(0,a.walkTokens)(t,(e=>{if("paragraph"===e.type){n.length>0&&n.push("\n\n");const{tokens:t}=e;n.push(...t.flatMap(m))}})),n.filter((e=>null!==e))}function g(e,t,n){try{const r=new URL(e);if((0,o.assert)(l.includes(r.protocol),`Protocol must be one of: ${l.join(", ")}.`),"metamask:"===r.protocol){const t=(0,c.parseMetaMaskUrl)(e);t.snapId&&(0,o.assert)(n(t.snapId),"The Snap being navigated to is not installed.")}else if("mailto:"===r.protocol){const e=r.pathname.split(",");for(const n of e){const e=n.split("@")[1];(0,o.assert)(!e.includes(":"));const r=`https://${e}`;(0,o.assert)(!t(r),"The specified URL is not allowed.")}return}(0,o.assert)(!t(r.href),"The specified URL is not allowed.")}catch(e){throw new Error(`Invalid URL: ${"ERR_ASSERTION"===e?.code?e.message:"Unable to parse URL."}`)}}function b(e,t){const n=t(e);(0,o.assert)(n,`Could not find account for address: ${e}`)}function v(e){const{type:t}=e;switch(t){case i.NodeType.Panel:return e.children.reduce(((e,t)=>e+v(t)),0);case i.NodeType.Row:return v(e.value);case i.NodeType.Text:return e.value.length;default:return 0}}function w(e){return(0,o.hasProperty)(e.props,"children")}function x(e){return Boolean(e)&&!0!==e}function E(e){if(w(e)){if(Array.isArray(e.props.children))return e.props.children.filter(x).flat(1/0);if(e.props.children)return[e.props.children]}return[]}function S(e,t,n=0){if(Array.isArray(e)){for(const r of e){const e=S(r,t,n);if(void 0!==e)return e}return}const r=t(e,n);if(void 0!==r)return r;if((0,o.hasProperty)(e,"props")&&(0,o.isPlainObject)(e.props)&&(0,o.hasProperty)(e.props,"children")){const r=E(e);for(const e of r)if((0,o.isPlainObject)(e)){const r=S(e,t,n+1);if(void 0!==r)return r}}}function A(e){return Object.entries(e).filter((([e])=>"children"!==e)).sort((([e],[t])=>e.localeCompare(t))).map((([e,t])=>{return` ${e}=${n=t,"string"==typeof n?`"${n}"`:`{${JSON.stringify(n)}}`}`;var n})).join("")}n.getTextChildren=y,n.getJsxElementFromComponent=function(e){return function(e){const t=v(e);(0,o.assert)(t<=u,`The text in a Snap UI may not be larger than ${u/1e3} kB.`)}(e),function e(t){switch(t.type){case i.NodeType.Address:return(0,r.jsx)(s.Address,{address:t.value});case i.NodeType.Button:return(0,r.jsx)(s.Button,{name:t.name,variant:d(t.variant),type:t.buttonType,children:t.value});case i.NodeType.Copyable:return(0,r.jsx)(s.Copyable,{value:t.value,sensitive:t.sensitive});case i.NodeType.Divider:return(0,r.jsx)(s.Divider,{});case i.NodeType.Form:return(0,r.jsx)(s.Form,{name:t.name,children:h(t.children.map(e))});case i.NodeType.Heading:return(0,r.jsx)(s.Heading,{children:t.value});case i.NodeType.Image:return(0,r.jsx)(s.Image,{src:t.value});case i.NodeType.Input:return(0,r.jsx)(s.Field,{label:t.label,error:t.error,children:(0,r.jsx)(s.Input,{name:t.name,type:t.inputType,value:t.value,placeholder:t.placeholder})});case i.NodeType.Panel:return(0,r.jsx)(s.Box,{children:h(t.children.map(e))});case i.NodeType.Row:return(0,r.jsx)(s.Row,{label:t.label,variant:t.variant,children:e(t.value)});case i.NodeType.Spinner:return(0,r.jsx)(s.Spinner,{});case i.NodeType.Text:return(0,r.jsx)(s.Text,{children:h(y(t.value))});default:return(0,o.assertExhaustive)(t)}}(e)},n.validateLink=g,n.validateTextLinks=function(e,t,n){const r=function(e){const t=(0,a.lexer)(e,{gfm:!1}),n=[];return(0,a.walkTokens)(t,(e=>{"link"===e.type&&n.push(e)})),n}(e);for(const e of r)g(e.href,t,n)},n.validateAssetSelector=b,n.validateJsxElements=function(e,{isOnPhishingList:t,getSnap:n,getAccountByAddress:r}){S(e,(e=>{switch(e.type){case"Link":g(e.props.href,t,n);break;case"AssetSelector":b(e.props.addresses[0],r)}}))},n.getTotalTextLength=v,n.hasChildren=w,n.getJsxChildren=E,n.walkJsx=S,n.serialiseJsx=function e(t,n=0){if(Array.isArray(t))return t.map((t=>e(t,n))).join("");const r=" ".repeat(n);if("string"==typeof t)return`${r}${t}\n`;if(!t)return"";const{type:i,props:s}=t,a=n>0?"\n":"";if((0,o.hasProperty)(s,"children")){const t=e(s.children,n+1);return`${r}<${i}${A(s)}>\n${t}${r}</${i}>${a}`}return`${r}<${i}${A(s)} />${a}`}},{"./url.cjs":295,"@metamask/snaps-sdk":176,"@metamask/snaps-sdk/jsx":260,"@metamask/snaps-sdk/jsx-runtime":259,"@metamask/utils":318,marked:503}],295:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseMetaMaskUrl=n.SNAP_PATHS=n.CLIENT_PATHS=void 0;const r=e("@metamask/utils"),i=e("./snaps.cjs");n.CLIENT_PATHS=["/"],n.SNAP_PATHS=["/home"],n.parseMetaMaskUrl=function(e){const t=new URL(e),{protocol:s}=t;if("metamask:"!==s)throw new Error(`Unable to parse URL. Expected the protocol to be "metamask:", but received "${s}".`);const[o,...a]=t.href.replace("metamask://","").split("/"),c=`/${a.join("/")}`;switch(o){case"client":return(0,r.assert)(n.CLIENT_PATHS.includes(c),`Unable to navigate to "${c}". The provided path is not allowed.`),{authority:o,path:c};case"snap":return function(e){const t="Invalid MetaMask url:",s=(0,i.stripSnapPrefix)(e.slice(1)),o=e.slice(1).startsWith("npm:")?"npm:":"local:",a=s.startsWith("@"),c=s.split("/"),u=`/${c[c.length-1]}`;let l;if("local:"===o){const[e,,...i]=c.slice(0,-1);l=`${e}//${i.join("/")}`,(0,r.assert)(n.SNAP_PATHS.includes(u),`${t} invalid snap path.`)}else l=a?`${c[0]}/${c[1]}`:c[0],(0,r.assert)(a?3===c.length&&n.SNAP_PATHS.includes(u):2===c.length&&n.SNAP_PATHS.includes(u),`${t} invalid snap path.`);const d=`${o}${l}`;return(0,i.assertIsValidSnapId)(d),{authority:"snap",snapId:d,path:u}}(c);default:throw new Error(`Expected "metamask:" URL to start with "client" or "snap", but received "${o}".`)}}},{"./snaps.cjs":289,"@metamask/utils":318}],296:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateFetchedSnap=void 0;const r=e("./icon.cjs"),i=e("./localization.cjs"),s=e("./manifest/validation.cjs"),o=e("./snaps.cjs");n.validateFetchedSnap=async function(e){(0,s.assertIsSnapManifest)(e.manifest.result),await(0,o.validateSnapShasum)(e),(0,i.validateSnapManifestLocalizations)(e.manifest.result,e.localizationFiles.map((e=>e.result))),e.svgIcon&&(0,r.assertIsSnapIcon)(e.svgIcon)}},{"./icon.cjs":278,"./localization.cjs":283,"./manifest/validation.cjs":286,"./snaps.cjs":289}],297:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.resolveVersionRange=n.getTargetVersion=n.DEFAULT_REQUESTED_SNAP_VERSION=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("semver");n.DEFAULT_REQUESTED_SNAP_VERSION="*",n.getTargetVersion=function(e,t){const n=(0,s.maxSatisfying)(e,t);return n||(0,s.maxSatisfying)(e,t,{includePrerelease:!0})},n.resolveVersionRange=function(e){return void 0===e||"latest"===e?[void 0,n.DEFAULT_REQUESTED_SNAP_VERSION]:(0,r.validate)(e,i.VersionRangeStruct)}},{"@metamask/superstruct":301,"@metamask/utils":318,semver:555}],298:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.VirtualFile=void 0;const r=e("@metamask/utils"),i=e("@scure/base"),s=e("../deep-clone.cjs");class o{constructor(e){let t;t="string"==typeof e||e instanceof Uint8Array?{value:e}:e,this.value=t?.value??"",this.result=t?.result??void 0,this.data=t?.data??{},this.path=t?.path??"/"}get size(){return"string"==typeof this.value?this.value.length:this.value.byteLength}toString(e){if("string"==typeof this.value)return(0,r.assert)(void 0===e,"Tried to encode string."),this.value;if(this.value instanceof Uint8Array&&"hex"===e)return(0,r.bytesToHex)(this.value);if(this.value instanceof Uint8Array&&"base64"===e)return i.base64.encode(this.value);return new TextDecoder(e).decode(this.value)}clone(){const e=new o;return"string"==typeof this.value?e.value=this.value:e.value=this.value.slice(0),e.result=(0,s.deepClone)(this.result),e.data=(0,s.deepClone)(this.data),e.path=this.path,e}}n.VirtualFile=o},{"../deep-clone.cjs":271,"@metamask/utils":318,"@scure/base":351}],299:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./VirtualFile.cjs"),n)},{"./VirtualFile.cjs":298}],300:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.StructError=void 0;class r extends TypeError{constructor(e,t){let n;const{message:r,explanation:i,...s}=e,{path:o}=e,a=0===o.length?r:`At path: ${o.join(".")} -- ${r}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}n.StructError=r},{}],301:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./error.cjs"),n),i(e("./struct.cjs"),n),i(e("./structs/coercions.cjs"),n),i(e("./structs/refinements.cjs"),n),i(e("./structs/types.cjs"),n),i(e("./structs/utilities.cjs"),n)},{"./error.cjs":300,"./struct.cjs":302,"./structs/coercions.cjs":303,"./structs/refinements.cjs":304,"./structs/types.cjs":305,"./structs/utilities.cjs":306}],302:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validate=n.is=n.mask=n.create=n.assert=n.Struct=void 0;const r=e("./error.cjs"),i=e("./utils.cjs");function s(e,t,n){const r=u(e,t,{message:n});if(r[0])throw r[0]}function o(e,t,n){const r=u(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function a(e,t,n){const r=u(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}function c(e,t){return!u(e,t)[0]}function u(e,t,n={}){const s=(0,i.run)(e,t,n),o=(0,i.shiftIterator)(s);if(o[0]){return[new r.StructError(o[0],(function*(){for(const e of s)e[0]&&(yield e[0])})),void 0]}return[void 0,o[1]]}n.Struct=class{constructor(e){const{type:t,schema:n,validator:r,refiner:s,coercer:o=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=o,this.validator=r?(e,t)=>{const n=r(e,t);return(0,i.toFailures)(n,t,this,e)}:()=>[],this.refiner=s?(e,t)=>{const n=s(e,t);return(0,i.toFailures)(n,t,this,e)}:()=>[]}assert(e,t){return s(e,this,t)}create(e,t){return o(e,this,t)}is(e){return c(e,this)}mask(e,t){return a(e,this,t)}validate(e,t={}){return u(e,this,t)}},n.assert=s,n.create=o,n.mask=a,n.is=c,n.validate=u},{"./error.cjs":300,"./utils.cjs":307}],303:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.trimmed=n.defaulted=n.coerce=void 0;const r=e("../struct.cjs"),i=e("../utils.cjs"),s=e("./types.cjs");function o(e,t,n){return new r.Struct({...e,coercer:(i,s)=>(0,r.is)(i,t)?e.coercer(n(i,s),s):e.coercer(i,s)})}n.coerce=o,n.defaulted=function(e,t,n={}){return o(e,(0,s.unknown)(),(e=>{const r="function"==typeof t?t():t;if(void 0===e)return r;if(!n.strict&&(0,i.isPlainObject)(e)&&(0,i.isPlainObject)(r)){const t={...e};let n=!1;for(const e in r)void 0===t[e]&&(t[e]=r[e],n=!0);if(n)return t}return e}))},n.trimmed=function(e){return o(e,(0,s.string)(),(e=>e.trim()))}},{"../struct.cjs":302,"../utils.cjs":307,"./types.cjs":305}],304:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.refine=n.size=n.pattern=n.nonempty=n.min=n.max=n.empty=void 0;const r=e("../struct.cjs"),i=e("../utils.cjs");function s(e){return e instanceof Map||e instanceof Set?e.size:e.length}function o(e,t,n){return new r.Struct({...e,*refiner(r,s){yield*e.refiner(r,s);const o=n(r,s),a=(0,i.toFailures)(o,s,e,r);for(const e of a)yield{...e,refinement:t}}})}n.empty=function(e){return o(e,"empty",(t=>{const n=s(t);return 0===n||`Expected an empty ${e.type} but received one with a size of \`${n}\``}))},n.max=function(e,t,n={}){const{exclusive:r}=n;return o(e,"max",(n=>r?n<t:n<=t||`Expected a ${e.type} less than ${r?"":"or equal to "}${t} but received \`${n}\``))},n.min=function(e,t,n={}){const{exclusive:r}=n;return o(e,"min",(n=>r?n>t:n>=t||`Expected a ${e.type} greater than ${r?"":"or equal to "}${t} but received \`${n}\``))},n.nonempty=function(e){return o(e,"nonempty",(t=>s(t)>0||`Expected a nonempty ${e.type} but received an empty one`))},n.pattern=function(e,t){return o(e,"pattern",(n=>t.test(n)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${n}"`))},n.size=function(e,t,n=t){const r=`Expected a ${e.type}`,i=t===n?`of \`${t}\``:`between \`${t}\` and \`${n}\``;return o(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=n||`${r} ${i} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:s}=e;return t<=s&&s<=n||`${r} with a size ${i} but received one with a size of \`${s}\``}const{length:s}=e;return t<=s&&s<=n||`${r} with a length ${i} but received one with a length of \`${s}\``}))},n.refine=o},{"../struct.cjs":302,"../utils.cjs":307}],305:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.unknown=n.union=n.type=n.tuple=n.string=n.set=n.regexp=n.record=n.optional=n.object=n.number=n.nullable=n.never=n.map=n.literal=n.intersection=n.integer=n.instance=n.func=n.enums=n.date=n.boolean=n.bigint=n.array=n.any=void 0;const r=e("../struct.cjs"),i=e("../utils.cjs"),s=e("./utilities.cjs");function o(){return(0,s.define)("never",(()=>!1))}n.any=function(){return(0,s.define)("any",(()=>!0))},n.array=function(e){return new r.Struct({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${(0,i.print)(e)}`})},n.bigint=function(){return(0,s.define)("bigint",(e=>"bigint"==typeof e))},n.boolean=function(){return(0,s.define)("boolean",(e=>"boolean"==typeof e))},n.date=function(){return(0,s.define)("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${(0,i.print)(e)}`))},n.enums=function(e){const t={},n=e.map((e=>(0,i.print)(e))).join();for(const n of e)t[n]=n;return new r.Struct({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${n}\`, but received: ${(0,i.print)(t)}`})},n.func=function(){return(0,s.define)("func",(e=>"function"==typeof e||`Expected a function, but received: ${(0,i.print)(e)}`))},n.instance=function(e){return(0,s.define)("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${(0,i.print)(t)}`))},n.integer=function(){return(0,s.define)("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${(0,i.print)(e)}`))},n.intersection=function(e){return new r.Struct({type:"intersection",schema:null,*entries(t,n){for(const{entries:r}of e)yield*r(t,n)},*validator(t,n){for(const{validator:r}of e)yield*r(t,n)},*refiner(t,n){for(const{refiner:r}of e)yield*r(t,n)}})},n.literal=function(e){const t=(0,i.print)(e),n=typeof e;return new r.Struct({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${(0,i.print)(n)}`})},n.map=function(e,t){return new r.Struct({type:"map",schema:null,*entries(n){if(e&&t&&n instanceof Map)for(const[r,i]of n.entries())yield[r,r,e],yield[r,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${(0,i.print)(e)}`})},n.never=o,n.nullable=function(e){return new r.Struct({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})},n.number=function(){return(0,s.define)("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${(0,i.print)(e)}`))},n.object=function(e){const t=e?Object.keys(e):[],n=o();return new r.Struct({type:"object",schema:e??null,*entries(r){if(e&&(0,i.isObject)(r)){const i=new Set(Object.keys(r));for(const n of t)i.delete(n),yield[n,r[n],e[n]];for(const e of i)yield[e,r[e],n]}},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`,coercer:e=>(0,i.isObject)(e)?{...e}:e})},n.optional=function(e){return new r.Struct({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})},n.record=function(e,t){return new r.Struct({type:"record",schema:null,*entries(n){if((0,i.isObject)(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`})},n.regexp=function(){return(0,s.define)("regexp",(e=>e instanceof RegExp))},n.set=function(e){return new r.Struct({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const n of t)yield[n,n,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${(0,i.print)(e)}`})},n.string=function(){return(0,s.define)("string",(e=>"string"==typeof e||`Expected a string, but received: ${(0,i.print)(e)}`))},n.tuple=function(e){const t=o();return new r.Struct({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let i=0;i<r;i++)yield[i,n[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${(0,i.print)(e)}`})},n.type=function(e){const t=Object.keys(e);return new r.Struct({type:"type",schema:e,*entries(n){if((0,i.isObject)(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`,coercer:e=>(0,i.isObject)(e)?{...e}:e})},n.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new r.Struct({type:"union",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:!0});if(!e)return r}return t},validator(n,r){const s=[];for(const t of e){const[...e]=(0,i.run)(n,t,r),[o]=e;if(!o?.[0])return[];for(const[t]of e)t&&s.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${(0,i.print)(n)}`,...s]}})},n.unknown=function(){return(0,s.define)("unknown",(()=>!0))}},{"../struct.cjs":302,"../utils.cjs":307,"./utilities.cjs":306}],306:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.pick=n.partial=n.omit=n.lazy=n.dynamic=n.deprecated=n.define=n.assign=void 0;const r=e("../struct.cjs"),i=e("./types.cjs");n.assign=function(...e){const t="type"===e[0]?.type,n=e.map((({schema:e})=>e)),r=Object.assign({},...n);return t?(0,i.type)(r):(0,i.object)(r)},n.define=function(e,t){return new r.Struct({type:e,schema:null,validator:t})},n.deprecated=function(e,t){return new r.Struct({...e,refiner:(t,n)=>void 0===t||e.refiner(t,n),validator:(n,r)=>void 0===n||(t(n,r),e.validator(n,r))})},n.dynamic=function(e){return new r.Struct({type:"dynamic",schema:null,*entries(t,n){const r=e(t,n);yield*r.entries(t,n)},validator:(t,n)=>e(t,n).validator(t,n),coercer:(t,n)=>e(t,n).coercer(t,n),refiner:(t,n)=>e(t,n).refiner(t,n)})},n.lazy=function(e){let t;return new r.Struct({type:"lazy",schema:null,*entries(n,r){t??(t=e()),yield*t.entries(n,r)},validator:(n,r)=>(t??(t=e()),t.validator(n,r)),coercer:(n,r)=>(t??(t=e()),t.coercer(n,r)),refiner:(n,r)=>(t??(t=e()),t.refiner(n,r))})},n.omit=function(e,t){const{schema:n}=e,r={...n};for(const e of t)delete r[e];return"type"===e.type?(0,i.type)(r):(0,i.object)(r)},n.partial=function(e){const t=e instanceof r.Struct,n=t?{...e.schema}:{...e};for(const e in n)n[e]=(0,i.optional)(n[e]);return t&&"type"===e.type?(0,i.type)(n):(0,i.object)(n)},n.pick=function(e,t){const{schema:n}=e,r={};for(const e of t)r[e]=n[e];return"type"===e.type?(0,i.type)(r):(0,i.object)(r)}},{"../struct.cjs":302,"./types.cjs":305}],307:[function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!==e}function i(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function s(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:s,branch:o}=t,{type:a}=n,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${i(r)}\``}=e;return{value:r,type:a,refinement:c,key:s[s.length-1],path:s,branch:o,...e,message:u}}Object.defineProperty(n,"__esModule",{value:!0}),n.run=n.toFailures=n.toFailure=n.shiftIterator=n.print=n.isPlainObject=n.isObject=void 0,n.isObject=r,n.isPlainObject=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},n.print=i,n.shiftIterator=function(e){const{done:t,value:n}=e.next();return t?void 0:n},n.toFailure=s,n.toFailures=function*(e,t,n,i){(function(e){return r(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const r of e){const e=s(r,t,n,i);e&&(yield e)}},n.run=function*e(t,n,i={}){const{path:s=[],branch:o=[t],coerce:a=!1,mask:c=!1}=i,u={path:s,branch:o};if(a&&(t=n.coercer(t,u),c&&"type"!==n.type&&r(n.schema)&&r(t)&&!Array.isArray(t)))for(const e in t)void 0===n.schema[e]&&delete t[e];let l="valid";for(const e of n.validator(t,u))e.explanation=i.message,l="not_valid",yield[e,void 0];for(let[d,h,p]of n.entries(t,u)){const n=e(h,p,{path:void 0===d?s:[...s,d],branch:void 0===d?o:[...o,h],coerce:a,mask:c,message:i.message});for(const e of n)e[0]?(l=null===e[0].refinement||void 0===e[0].refinement?"not_valid":"not_refined",yield[e[0],void 0]):a&&(h=e[1],void 0===d?t=h:t instanceof Map?t.set(d,h):t instanceof Set?t.add(h):r(t)&&(void 0!==h||d in t)&&(t[d]=h))}if("not_valid"!==l)for(const e of n.refiner(t,u))e.explanation=i.message,l="not_refined",yield[e,void 0];"valid"===l&&(yield[void 0,t])}},{}],308:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertExhaustive=n.assertStruct=n.assert=n.AssertionError=void 0;const r=e("@metamask/superstruct"),i=e("./errors.cjs");function s(e,t){return n=e,Boolean("string"==typeof n?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var n}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}n.AssertionError=o,n.assert=function(e,t="Assertion failed.",n=o){if(!e){if(t instanceof Error)throw t;throw s(n,t)}},n.assertStruct=function(e,t,n="Assertion failed",a=o){try{(0,r.assert)(e,t)}catch(e){throw s(a,`${n}: ${function(e){return(0,i.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},n.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},{"./errors.cjs":316,"@metamask/superstruct":301}],309:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.base64=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs");n.base64=(e,t={})=>{const n=t.paddingRequired??!1,s=t.characterSet??"base64";let o,a;return"base64"===s?o=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===s),o=String.raw`[-_A-Za-z0-9]`),a=n?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,r.pattern)(e,a)}},{"./assert.cjs":308,"@metamask/superstruct":301}],310:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDataView=n.concatBytes=n.valueToBytes=n.base64ToBytes=n.stringToBytes=n.numberToBytes=n.signedBigIntToBytes=n.bigIntToBytes=n.hexToBytes=n.bytesToBase64=n.bytesToString=n.bytesToNumber=n.bytesToSignedBigInt=n.bytesToBigInt=n.bytesToHex=n.assertIsBytes=n.isBytes=void 0;const r=e("@scure/base"),i=e("./assert.cjs"),s=e("./hex.cjs"),o=48,a=58,c=87;const u=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 d(e){(0,i.assert)(l(e),"Value must be a Uint8Array.")}function h(e){if(d(e),0===e.length)return"0x";const t=u(),n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=t[e[r]];return(0,s.add0x)(n.join(""))}function p(e){d(e);const t=h(e);return BigInt(t)}function f(e){if("0x"===e?.toLowerCase?.())return new Uint8Array;(0,s.assertIsHexString)(e);const t=(0,s.remove0x)(e).toLowerCase(),n=t.length%2==0?t:`0${t}`,r=new Uint8Array(n.length/2);for(let e=0;e<r.length;e++){const t=n.charCodeAt(2*e),i=n.charCodeAt(2*e+1),s=t-(t<a?o:c),u=i-(i<a?o:c);r[e]=16*s+u}return r}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 f(e.toString(16))}function y(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 f(e.toString(16))}function g(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 y(e);if("string"==typeof e)return e.startsWith("0x")?f(e):g(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}n.isBytes=l,n.assertIsBytes=d,n.bytesToHex=h,n.bytesToBigInt=p,n.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const n of e)t=(t<<BigInt(8))+BigInt(n);return BigInt.asIntN(8*e.length,t)},n.bytesToNumber=function(e){d(e);const t=p(e);return(0,i.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},n.bytesToString=function(e){return d(e),(new TextDecoder).decode(e)},n.bytesToBase64=function(e){return d(e),r.base64.encode(e)},n.hexToBytes=f,n.bigIntToBytes=m,n.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 n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let n=e;const r=new Uint8Array(t);for(let e=0;e<r.length;e++)r[e]=Number(BigInt.asUintN(8,n)),n>>=BigInt(8);return r.reverse()},n.numberToBytes=y,n.stringToBytes=g,n.base64ToBytes=function(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),r.base64.decode(e)},n.valueToBytes=b,n.concatBytes=function(e){const t=new Array(e.length);let n=0;for(let r=0;r<e.length;r++){const i=b(e[r]);t[r]=i,n+=i.length}const r=new Uint8Array(n);for(let e=0,n=0;e<t.length;e++)r.set(t[e],n),n+=t[e].length;return r},n.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)},{"./assert.cjs":308,"./hex.cjs":317,"@scure/base":351,buffer:385}],311:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toCaipAssetId=n.toCaipAssetType=n.toCaipAccountId=n.toCaipChainId=n.parseCaipAssetId=n.parseCaipAssetType=n.parseCaipAccountId=n.parseCaipChainId=n.isCaipAssetId=n.isCaipAssetType=n.isCaipTokenId=n.isCaipAssetReference=n.isCaipAssetNamespace=n.isCaipAccountAddress=n.isCaipAccountId=n.isCaipReference=n.isCaipNamespace=n.isCaipChainId=n.KnownCaipNamespace=n.CaipAssetTypeOrIdStruct=n.CaipAssetIdStruct=n.CaipAssetTypeStruct=n.CaipTokenIdStruct=n.CaipAssetReferenceStruct=n.CaipAssetNamespaceStruct=n.CaipAccountAddressStruct=n.CaipAccountIdStruct=n.CaipReferenceStruct=n.CaipNamespaceStruct=n.CaipChainIdStruct=n.CAIP_ASSET_ID_REGEX=n.CAIP_ASSET_TYPE_REGEX=n.CAIP_TOKEN_ID_REGEX=n.CAIP_ASSET_REFERENCE_REGEX=n.CAIP_ASSET_NAMESPACE_REGEX=n.CAIP_ACCOUNT_ADDRESS_REGEX=n.CAIP_ACCOUNT_ID_REGEX=n.CAIP_REFERENCE_REGEX=n.CAIP_NAMESPACE_REGEX=n.CAIP_CHAIN_ID_REGEX=void 0;const r=e("@metamask/superstruct"),i=e("./superstruct.cjs");n.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,n.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,n.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,n.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,n.CAIP_ASSET_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,n.CAIP_ASSET_REFERENCE_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,n.CAIP_TOKEN_ID_REGEX=/^[-.%a-zA-Z0-9]{1,78}$/u,n.CAIP_ASSET_TYPE_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ASSET_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u;function s(e){return(0,r.is)(e,n.CaipNamespaceStruct)}function o(e){return(0,r.is)(e,n.CaipReferenceStruct)}function a(e){return(0,r.is)(e,n.CaipAccountAddressStruct)}function c(e){return(0,r.is)(e,n.CaipAssetNamespaceStruct)}function u(e){return(0,r.is)(e,n.CaipAssetReferenceStruct)}function l(e){return(0,r.is)(e,n.CaipTokenIdStruct)}n.CaipChainIdStruct=(0,i.definePattern)("CaipChainId",n.CAIP_CHAIN_ID_REGEX),n.CaipNamespaceStruct=(0,i.definePattern)("CaipNamespace",n.CAIP_NAMESPACE_REGEX),n.CaipReferenceStruct=(0,i.definePattern)("CaipReference",n.CAIP_REFERENCE_REGEX),n.CaipAccountIdStruct=(0,i.definePattern)("CaipAccountId",n.CAIP_ACCOUNT_ID_REGEX),n.CaipAccountAddressStruct=(0,i.definePattern)("CaipAccountAddress",n.CAIP_ACCOUNT_ADDRESS_REGEX),n.CaipAssetNamespaceStruct=(0,i.definePattern)("CaipAssetNamespace",n.CAIP_ASSET_NAMESPACE_REGEX),n.CaipAssetReferenceStruct=(0,i.definePattern)("CaipAssetReference",n.CAIP_ASSET_REFERENCE_REGEX),n.CaipTokenIdStruct=(0,i.definePattern)("CaipTokenId",n.CAIP_TOKEN_ID_REGEX),n.CaipAssetTypeStruct=(0,i.definePattern)("CaipAssetType",n.CAIP_ASSET_TYPE_REGEX),n.CaipAssetIdStruct=(0,i.definePattern)("CaipAssetId",n.CAIP_ASSET_ID_REGEX),n.CaipAssetTypeOrIdStruct=(0,i.definePattern)("CaipAssetTypeOrId",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})(\/(?<tokenId>[-.%a-zA-Z0-9]{1,78}))?$/u),function(e){e.Bip122="bip122",e.Solana="solana",e.Eip155="eip155",e.Wallet="wallet"}(n.KnownCaipNamespace||(n.KnownCaipNamespace={})),n.isCaipChainId=function(e){return(0,r.is)(e,n.CaipChainIdStruct)},n.isCaipNamespace=s,n.isCaipReference=o,n.isCaipAccountId=function(e){return(0,r.is)(e,n.CaipAccountIdStruct)},n.isCaipAccountAddress=a,n.isCaipAssetNamespace=c,n.isCaipAssetReference=u,n.isCaipTokenId=l,n.isCaipAssetType=function(e){return(0,r.is)(e,n.CaipAssetTypeStruct)},n.isCaipAssetId=function(e){return(0,r.is)(e,n.CaipAssetIdStruct)},n.parseCaipChainId=function(e){const t=n.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},n.parseCaipAccountId=function(e){const t=n.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.parseCaipAssetType=function(e){const t=n.CAIP_ASSET_TYPE_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP asset type.");return{assetNamespace:t.groups.assetNamespace,assetReference:t.groups.assetReference,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.parseCaipAssetId=function(e){const t=n.CAIP_ASSET_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP asset ID.");return{assetNamespace:t.groups.assetNamespace,assetReference:t.groups.assetReference,tokenId:t.groups.tokenId,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.toCaipChainId=function(e,t){if(!s(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`},n.toCaipAccountId=function(e,t,r){if(!s(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);if(!a(r))throw new Error(`Invalid "accountAddress", must match: ${n.CAIP_ACCOUNT_ADDRESS_REGEX.toString()}`);return`${e}:${t}:${r}`},n.toCaipAssetType=function(e,t,r,i){if(!s(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);if(!c(r))throw new Error(`Invalid "assetNamespace", must match: ${n.CAIP_ASSET_NAMESPACE_REGEX.toString()}`);if(!u(i))throw new Error(`Invalid "assetReference", must match: ${n.CAIP_ASSET_REFERENCE_REGEX.toString()}`);return`${e}:${t}/${r}:${i}`},n.toCaipAssetId=function(e,t,r,i,a){if(!s(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);if(!c(r))throw new Error(`Invalid "assetNamespace", must match: ${n.CAIP_ASSET_NAMESPACE_REGEX.toString()}`);if(!u(i))throw new Error(`Invalid "assetReference", must match: ${n.CAIP_ASSET_REFERENCE_REGEX.toString()}`);if(!l(a))throw new Error(`Invalid "tokenId", must match: ${n.CAIP_TOKEN_ID_REGEX.toString()}`);return`${e}:${t}/${r}:${i}/${a}`}},{"./superstruct.cjs":326,"@metamask/superstruct":301}],312:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ChecksumStruct=void 0;const r=e("@metamask/superstruct"),i=e("./base64.cjs");n.ChecksumStruct=(0,r.size)((0,i.base64)((0,r.string)(),{paddingRequired:!0}),44,44)},{"./base64.cjs":309,"@metamask/superstruct":301}],313:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createHex=n.createBytes=n.createBigInt=n.createNumber=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs"),s=e("./bytes.cjs"),o=e("./hex.cjs"),a=(0,r.union)([(0,r.number)(),(0,r.bigint)(),(0,r.string)(),o.StrictHexStruct]),c=(0,r.coerce)((0,r.number)(),a,Number),u=(0,r.coerce)((0,r.bigint)(),a,BigInt),l=((0,r.union)([o.StrictHexStruct,(0,r.instance)(Uint8Array)]),(0,r.coerce)((0,r.instance)(Uint8Array),(0,r.union)([o.StrictHexStruct]),s.hexToBytes)),d=(0,r.coerce)(o.StrictHexStruct,(0,r.instance)(Uint8Array),s.bytesToHex);n.createNumber=function(e){try{const t=(0,r.create)(e,c);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof r.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},n.createBigInt=function(e){try{return(0,r.create)(e,u)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},n.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,r.create)(e,l)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},n.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,r.create)(e,d)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},{"./assert.cjs":308,"./bytes.cjs":310,"./hex.cjs":317,"@metamask/superstruct":301}],314:[function(e,t,n){"use strict";var r,i,s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.FrozenSet=n.FrozenMap=void 0;class a{get size(){return s(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return s(this,r,"f")[Symbol.iterator]()}constructor(e){r.set(this,void 0),o(this,r,new Map(e),"f"),Object.freeze(this)}entries(){return s(this,r,"f").entries()}forEach(e,t){return s(this,r,"f").forEach(((n,r,i)=>e.call(t,n,r,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(", ")} `:""}}`}}n.FrozenMap=a;class c{get size(){return s(this,i,"f").size}[(i=new WeakMap,Symbol.iterator)](){return s(this,i,"f")[Symbol.iterator]()}constructor(e){i.set(this,void 0),o(this,i,new Set(e),"f"),Object.freeze(this)}entries(){return s(this,i,"f").entries()}forEach(e,t){return s(this,i,"f").forEach(((n,r,i)=>e.call(t,n,r,this)))}has(e){return s(this,i,"f").has(e)}keys(){return s(this,i,"f").keys()}values(){return s(this,i,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}n.FrozenSet=c,Object.freeze(a),Object.freeze(a.prototype),Object.freeze(c),Object.freeze(c.prototype)},{}],315:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],316:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wrapError=n.getErrorMessage=n.isErrorWithStack=n.isErrorWithMessage=n.isErrorWithCode=void 0;const r=e("pony-cause"),i=e("./misc.cjs");function s(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}n.isErrorWithCode=s,n.isErrorWithMessage=o,n.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},n.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,i.isNullOrUndefined)(e)?"":String(e)},n.wrapError=function(e,t){if((n=e)instanceof Error||(0,i.isObject)(n)&&"Error"===n.constructor.name){let n;return n=2===Error.length?new Error(t,{cause:e}):new r.ErrorWithCause(t,{cause:e}),s(e)&&(n.code=e.code),n}var n;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}},{"./misc.cjs":322,"pony-cause":507}],317:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.remove0x=n.add0x=n.isValidChecksumAddress=n.getChecksumAddress=n.isValidHexAddress=n.assertIsStrictHexString=n.assertIsHexString=n.isStrictHexString=n.isHexString=n.HexChecksumAddressStruct=n.HexAddressStruct=n.StrictHexStruct=n.HexStruct=void 0;const r=e("@metamask/superstruct"),i=e("@noble/hashes/sha3"),s=e("./assert.cjs"),o=e("./bytes.cjs");function a(e){return(0,r.is)(e,n.HexStruct)}function c(e){return(0,r.is)(e,n.StrictHexStruct)}function u(e){(0,s.assert)((0,r.is)(e,n.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),a=d((0,o.bytesToHex)((0,i.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const n=a[t];return(0,s.assert)((0,r.is)(n,(0,r.string)()),"Hash shorter than address."),parseInt(n,16)>7?e.toUpperCase():e})).join("")}`}function l(e){return!!(0,r.is)(e,n.HexChecksumAddressStruct)&&u(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}n.HexStruct=(0,r.pattern)((0,r.string)(),/^(?:0x)?[0-9a-f]+$/iu),n.StrictHexStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]+$/iu),n.HexAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]{40}$/u),n.HexChecksumAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-fA-F]{40}$/u),n.isHexString=a,n.isStrictHexString=c,n.assertIsHexString=function(e){(0,s.assert)(a(e),"Value must be a hexadecimal string.")},n.assertIsStrictHexString=function(e){(0,s.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},n.isValidHexAddress=function(e){return(0,r.is)(e,n.HexAddressStruct)||l(e)},n.getChecksumAddress=u,n.isValidChecksumAddress=l,n.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},n.remove0x=d},{"./assert.cjs":308,"./bytes.cjs":310,"@metamask/superstruct":301,"@noble/hashes/sha3":348}],318:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./assert.cjs"),n),i(e("./base64.cjs"),n),i(e("./bytes.cjs"),n),i(e("./caip-types.cjs"),n),i(e("./checksum.cjs"),n),i(e("./coercers.cjs"),n),i(e("./collections.cjs"),n),i(e("./encryption-types.cjs"),n),i(e("./errors.cjs"),n),i(e("./hex.cjs"),n),i(e("./json.cjs"),n),i(e("./keyring.cjs"),n),i(e("./logging.cjs"),n),i(e("./misc.cjs"),n),i(e("./number.cjs"),n),i(e("./opaque.cjs"),n),i(e("./promise.cjs"),n),i(e("./superstruct.cjs"),n),i(e("./time.cjs"),n),i(e("./transaction-types.cjs"),n),i(e("./versions.cjs"),n)},{"./assert.cjs":308,"./base64.cjs":309,"./bytes.cjs":310,"./caip-types.cjs":311,"./checksum.cjs":312,"./coercers.cjs":313,"./collections.cjs":314,"./encryption-types.cjs":315,"./errors.cjs":316,"./hex.cjs":317,"./json.cjs":319,"./keyring.cjs":320,"./logging.cjs":321,"./misc.cjs":322,"./number.cjs":323,"./opaque.cjs":324,"./promise.cjs":325,"./superstruct.cjs":326,"./time.cjs":327,"./transaction-types.cjs":328,"./versions.cjs":329}],319:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonRpcIdValidator=n.assertIsJsonRpcError=n.isJsonRpcError=n.assertIsJsonRpcFailure=n.isJsonRpcFailure=n.assertIsJsonRpcSuccess=n.isJsonRpcSuccess=n.assertIsJsonRpcResponse=n.isJsonRpcResponse=n.assertIsPendingJsonRpcResponse=n.isPendingJsonRpcResponse=n.JsonRpcResponseStruct=n.JsonRpcFailureStruct=n.JsonRpcSuccessStruct=n.PendingJsonRpcResponseStruct=n.assertIsJsonRpcRequest=n.isJsonRpcRequest=n.assertIsJsonRpcNotification=n.isJsonRpcNotification=n.JsonRpcNotificationStruct=n.JsonRpcRequestStruct=n.JsonRpcParamsStruct=n.JsonRpcErrorStruct=n.JsonRpcIdStruct=n.JsonRpcVersionStruct=n.jsonrpc2=n.getJsonSize=n.getSafeJson=n.isValidJson=n.JsonStruct=n.UnsafeJsonStruct=n.exactOptional=n.object=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs"),s=e("./misc.cjs");function o({path:e,branch:t}){const n=e[e.length-1];return(0,s.hasProperty)(t[t.length-2],n)}function a(e){return new r.Struct({...e,type:`optional ${e.type}`,validator:(t,n)=>!o(n)||e.validator(t,n),refiner:(t,n)=>!o(n)||e.refiner(t,n)})}function c(e){if(null===e||"boolean"==typeof e||"string"==typeof e)return!0;if("number"==typeof e&&Number.isFinite(e))return!0;if("object"==typeof e){let t=!0;if(Array.isArray(e)){for(let n=0;n<e.length;n++)if(!c(e[n])){t=!1;break}return t}const n=Object.entries(e);for(let e=0;e<n.length;e++)if("string"!=typeof n[e][0]||!c(n[e][1])){t=!1;break}return t}return!1}function u(e){return(0,r.create)(e,n.JsonStruct)}n.object=e=>(0,r.object)(e),n.exactOptional=a,n.UnsafeJsonStruct=(0,r.define)("JSON",(e=>c(e))),n.JsonStruct=(0,r.coerce)(n.UnsafeJsonStruct,(0,r.refine)((0,r.any)(),"JSON",(e=>(0,r.is)(e,n.UnsafeJsonStruct))),(e=>JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))))),n.isValidJson=function(e){try{return u(e),!0}catch{return!1}},n.getSafeJson=u,n.getJsonSize=function(e){(0,i.assertStruct)(e,n.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},n.jsonrpc2="2.0",n.JsonRpcVersionStruct=(0,r.literal)(n.jsonrpc2),n.JsonRpcIdStruct=(0,r.nullable)((0,r.union)([(0,r.number)(),(0,r.string)()])),n.JsonRpcErrorStruct=(0,n.object)({code:(0,r.integer)(),message:(0,r.string)(),data:a(n.JsonStruct),stack:a((0,r.string)())}),n.JsonRpcParamsStruct=(0,r.union)([(0,r.record)((0,r.string)(),n.JsonStruct),(0,r.array)(n.JsonStruct)]),n.JsonRpcRequestStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:a(n.JsonRpcParamsStruct)}),n.JsonRpcNotificationStruct=(0,n.object)({jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:a(n.JsonRpcParamsStruct)}),n.isJsonRpcNotification=function(e){return(0,r.is)(e,n.JsonRpcNotificationStruct)},n.assertIsJsonRpcNotification=function(e,t){(0,i.assertStruct)(e,n.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},n.isJsonRpcRequest=function(e){return(0,r.is)(e,n.JsonRpcRequestStruct)},n.assertIsJsonRpcRequest=function(e,t){(0,i.assertStruct)(e,n.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},n.PendingJsonRpcResponseStruct=(0,r.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:(0,r.optional)((0,r.unknown)()),error:(0,r.optional)(n.JsonRpcErrorStruct)}),n.JsonRpcSuccessStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:n.JsonStruct}),n.JsonRpcFailureStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,error:n.JsonRpcErrorStruct}),n.JsonRpcResponseStruct=(0,r.union)([n.JsonRpcSuccessStruct,n.JsonRpcFailureStruct]),n.isPendingJsonRpcResponse=function(e){return(0,r.is)(e,n.PendingJsonRpcResponseStruct)},n.assertIsPendingJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,n.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},n.isJsonRpcResponse=function(e){return(0,r.is)(e,n.JsonRpcResponseStruct)},n.assertIsJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,n.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},n.isJsonRpcSuccess=function(e){return(0,r.is)(e,n.JsonRpcSuccessStruct)},n.assertIsJsonRpcSuccess=function(e,t){(0,i.assertStruct)(e,n.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},n.isJsonRpcFailure=function(e){return(0,r.is)(e,n.JsonRpcFailureStruct)},n.assertIsJsonRpcFailure=function(e,t){(0,i.assertStruct)(e,n.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},n.isJsonRpcError=function(e){return(0,r.is)(e,n.JsonRpcErrorStruct)},n.assertIsJsonRpcError=function(e,t){(0,i.assertStruct)(e,n.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},n.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:n,permitNull:r}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(n||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||r&&null===e)}},{"./assert.cjs":308,"./misc.cjs":322,"@metamask/superstruct":301}],320:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],321:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.createProjectLogger=void 0;const i=(0,r(e("debug")).default)("metamask");n.createProjectLogger=function(e){return i.extend(e)},n.createModuleLogger=function(e,t){return e.extend(t)}},{debug:428}],322:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.calculateNumberSize=n.calculateStringSize=n.isASCII=n.isPlainObject=n.ESCAPE_CHARACTERS_REGEXP=n.JsonSize=n.getKnownPropertyNames=n.hasProperty=n.isObject=n.isNullOrUndefined=n.isNonEmptyArray=void 0,n.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},n.isNullOrUndefined=function(e){return null==e},n.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function r(e){return e.charCodeAt(0)<=127}n.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),n.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(n.JsonSize||(n.JsonSize={})),n.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,n.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}},n.isASCII=r,n.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(e.match(n.ESCAPE_CHARACTERS_REGEXP)??[]).length},n.calculateNumberSize=function(e){return e.toString().length}},{}],323:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hexToBigInt=n.hexToNumber=n.bigIntToHex=n.numberToHex=void 0;const r=e("./assert.cjs"),i=e("./hex.cjs");n.numberToHex=e=>((0,r.assert)("number"==typeof e,"Value must be a number."),(0,r.assert)(e>=0,"Value must be a non-negative number."),(0,r.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16)));n.bigIntToHex=e=>((0,r.assert)("bigint"==typeof e,"Value must be a bigint."),(0,r.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16)));n.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,r.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};n.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},{"./assert.cjs":308,"./hex.cjs":317}],324:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],325:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDeferredPromise=void 0,n.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,n;const r=new Promise(((e,r)=>{t=e,n=r}));return e&&r.catch((e=>{})),{promise:r,resolve:t,reject:n}}},{}],326:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.definePattern=void 0;const r=e("@metamask/superstruct");n.definePattern=function(e,t){return(0,r.define)(e,(e=>"string"==typeof e&&t.test(e)))}},{"@metamask/superstruct":301}],327:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.timeSince=n.inMilliseconds=n.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"}(n.Duration||(n.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}".`)};n.inMilliseconds=function(e,t){return r(e,"count"),e*t},n.timeSince=function(e){return r(e,"timestamp"),Date.now()-e}},{}],328:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],329:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.satisfiesVersionRange=n.gtRange=n.gtVersion=n.assertIsSemVerRange=n.assertIsSemVerVersion=n.isValidSemVerRange=n.isValidSemVerVersion=n.VersionRangeStruct=n.VersionStruct=void 0;const r=e("@metamask/superstruct"),i=e("semver"),s=e("./assert.cjs");n.VersionStruct=(0,r.refine)((0,r.string)(),"Version",(e=>null!==(0,i.valid)(e)||`Expected SemVer version, got "${e}"`)),n.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",(e=>null!==(0,i.validRange)(e)||`Expected SemVer range, got "${e}"`)),n.isValidSemVerVersion=function(e){return(0,r.is)(e,n.VersionStruct)},n.isValidSemVerRange=function(e){return(0,r.is)(e,n.VersionRangeStruct)},n.assertIsSemVerVersion=function(e){(0,s.assertStruct)(e,n.VersionStruct)},n.assertIsSemVerRange=function(e){(0,s.assertStruct)(e,n.VersionRangeStruct)},n.gtVersion=function(e,t){return(0,i.gt)(e,t)},n.gtRange=function(e,t){return(0,i.gtr)(e,t)},n.satisfiesVersionRange=function(e,t){return(0,i.satisfies)(e,t,{includePrerelease:!0})}},{"./assert.cjs":308,"@metamask/superstruct":301,semver:555}],330:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getHash=o,n.createCurve=function(e,t){const n=t=>(0,s.weierstrass)({...e,...o(t)});return{...n(t),create:n}};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("@noble/hashes/hmac"),i=e("@noble/hashes/utils"),s=e("./abstract/weierstrass.js");function o(e){return{hash:e,hmac:(t,...n)=>(0,r.hmac)(e,t,(0,i.concatBytes)(...n)),randomBytes:i.randomBytes}}},{"./abstract/weierstrass.js":337,"@noble/hashes/hmac":344,"@noble/hashes/utils":350}],331:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wNAF=function(e,t){return{constTimeNegate:a,hasPrecomputes:e=>1!==f(e),unsafeLadder(t,n,r=e.ZERO){let i=t;for(;n>s;)n&o&&(r=r.add(i)),i=i.double(),n>>=o;return r},precomputeWindow(e,n){const{windows:r,windowSize:i}=u(n,t),s=[];let o=e,a=o;for(let e=0;e<r;e++){a=o,s.push(a);for(let e=1;e<i;e++)a=a.add(o),s.push(a);o=a.double()}return s},wNAF(n,r,i){const{windows:s,windowSize:c}=u(n,t);let l=e.ZERO,d=e.BASE;const h=BigInt(2**n-1),p=2**n,f=BigInt(n);for(let e=0;e<s;e++){const t=e*c;let n=Number(i&h);i>>=f,n>c&&(n-=p,i+=o);const s=t,u=t+Math.abs(n)-1,m=e%2!=0,y=n<0;0===n?d=d.add(a(m,r[s])):l=l.add(a(y,r[u]))}return{p:l,f:d}},wNAFUnsafe(n,r,i,a=e.ZERO){const{windows:c,windowSize:l}=u(n,t),d=BigInt(2**n-1),h=2**n,p=BigInt(n);for(let e=0;e<c;e++){const t=e*l;if(i===s)break;let n=Number(i&d);if(i>>=p,n>l&&(n-=h,i+=o),0===n)continue;let c=r[t+Math.abs(n)-1];n<0&&(c=c.negate()),a=a.add(c)}return a},getPrecomputes(e,t,n){let r=h.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&h.set(t,n(r))),r},wNAFCached(e,t,n){const r=f(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)},wNAFCachedUnsafe(e,t,n,r){const i=f(e);return 1===i?this.unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)},setWindowSize(e,n){c(n,t),p.set(e,n),h.delete(e)}}},n.pippenger=function(e,t,n,r){if(l(n,e),d(r,t),n.length!==r.length)throw new Error("arrays of points and scalars must have equal length");const s=e.ZERO,o=(0,i.bitLen)(BigInt(n.length)),a=o>12?o-3:o>4?o-2:o?2:1,c=(1<<a)-1,u=new Array(c+1).fill(s),h=Math.floor((t.BITS-1)/a)*a;let p=s;for(let e=h;e>=0;e-=a){u.fill(s);for(let t=0;t<r.length;t++){const i=r[t],s=Number(i>>BigInt(e)&BigInt(c));u[s]=u[s].add(n[t])}let t=s;for(let e=u.length-1,n=s;e>0;e--)n=n.add(u[e]),t=t.add(n);if(p=p.add(t),0!==e)for(let e=0;e<a;e++)p=p.double()}return p},n.precomputeMSMUnsafe=function(e,t,n,r){c(r,t.BITS),l(n,e);const i=e.ZERO,s=2**r-1,o=Math.ceil(t.BITS/r),a=BigInt((1<<r)-1),u=n.map((e=>{const t=[];for(let n=0,r=e;n<s;n++)t.push(r),r=r.add(e);return t}));return e=>{if(d(e,t),e.length>n.length)throw new Error("array of scalars must be smaller than array of points");let s=i;for(let t=0;t<o;t++){if(s!==i)for(let e=0;e<r;e++)s=s.double();const n=BigInt(o*r-(t+1)*r);for(let t=0;t<e.length;t++){const r=e[t],i=Number(r>>n&a);i&&(s=s.add(u[t][i-1]))}}return s}},n.validateBasic=function(e){return(0,r.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,r.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("./modular.js"),i=e("./utils.js"),s=BigInt(0),o=BigInt(1);function a(e,t){const n=t.negate();return e?n:t}function c(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function u(e,t){c(e,t);return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)}}function l(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach(((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)}))}function d(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach(((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)}))}const h=new WeakMap,p=new WeakMap;function f(e){return p.get(e)||1}},{"./modular.js":334,"./utils.js":336}],332:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.twistedEdwards=function(e){const t=function(e){const t=(0,r.validateBasic)(e);return s.validateObject(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:n,n:h,prehash:p,hash:f,randomBytes:m,nByteLength:y,h:g}=t,b=u<<BigInt(8*y)-c,v=n.create,w=(0,i.Field)(t.n,t.nBitLength),x=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:n.sqrt(e*n.inv(t))}}catch(e){return{isValid:!1,value:a}}}),E=t.adjustScalarBytes||(e=>e),S=t.domain||((e,t,n)=>{if((0,o.abool)("phflag",n),t.length||n)throw new Error("Contexts/pre-hash are not supported");return e});function A(e,t){s.aInRange("coordinate "+e,t,a,b)}function _(e){if(!(e instanceof C))throw new Error("ExtendedPoint expected")}const T=(0,o.memoized)(((e,t)=>{const{ex:r,ey:i,ez:s}=e,o=e.is0();null==t&&(t=o?l:n.inv(s));const u=v(r*t),d=v(i*t),h=v(s*t);if(o)return{x:a,y:c};if(h!==c)throw new Error("invZ was invalid");return{x:u,y:d}})),k=(0,o.memoized)((e=>{const{a:n,d:r}=t;if(e.is0())throw new Error("bad point: ZERO");const{ex:i,ey:s,ez:o,et:a}=e,c=v(i*i),u=v(s*s),l=v(o*o),d=v(l*l),h=v(c*n);if(v(l*v(h+u))!==v(d+v(r*v(c*u))))throw new Error("bad point: equation left != right (1)");if(v(i*s)!==v(o*a))throw new Error("bad point: equation left != right (2)");return!0}));class C{constructor(e,t,n,r){this.ex=e,this.ey=t,this.ez=n,this.et=r,A("x",e),A("y",t),A("z",n),A("t",r),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof C)throw new Error("extended point not allowed");const{x:t,y:n}=e||{};return A("x",t),A("y",n),new C(t,n,c,v(t*n))}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.ez)));return e.map(((e,n)=>e.toAffine(t[n]))).map(C.fromAffine)}static msm(e,t){return(0,r.pippenger)(C,w,e,t)}_setWindowSize(e){I.setWindowSize(this,e)}assertValidity(){k(this)}equals(e){_(e);const{ex:t,ey:n,ez:r}=this,{ex:i,ey:s,ez:o}=e,a=v(t*o),c=v(i*r),u=v(n*o),l=v(s*r);return a===c&&u===l}is0(){return this.equals(C.ZERO)}negate(){return new C(v(-this.ex),this.ey,this.ez,v(-this.et))}double(){const{a:e}=t,{ex:n,ey:r,ez:i}=this,s=v(n*n),o=v(r*r),a=v(u*v(i*i)),c=v(e*s),l=n+r,d=v(v(l*l)-s-o),h=c+o,p=h-a,f=c-o,m=v(d*p),y=v(h*f),g=v(d*f),b=v(p*h);return new C(m,y,b,g)}add(e){_(e);const{a:n,d:r}=t,{ex:i,ey:s,ez:o,et:c}=this,{ex:l,ey:d,ez:h,et:p}=e;if(n===BigInt(-1)){const e=v((s-i)*(d+l)),t=v((s+i)*(d-l)),n=v(t-e);if(n===a)return this.double();const r=v(o*u*p),f=v(c*u*h),m=f+r,y=t+e,g=f-r,b=v(m*n),w=v(y*g),x=v(m*g),E=v(n*y);return new C(b,w,E,x)}const f=v(i*l),m=v(s*d),y=v(c*r*p),g=v(o*h),b=v((i+s)*(l+d)-f-m),w=g-y,x=g+y,E=v(m-n*f),S=v(b*w),A=v(x*E),T=v(b*E),k=v(w*x);return new C(S,A,k,T)}subtract(e){return this.add(e.negate())}wNAF(e){return I.wNAFCached(this,e,C.normalizeZ)}multiply(e){const t=e;s.aInRange("scalar",t,c,h);const{p:n,f:r}=this.wNAF(t);return C.normalizeZ([n,r])[0]}multiplyUnsafe(e,t=C.ZERO){const n=e;return s.aInRange("scalar",n,a,h),n===a?O:this.is0()||n===c?this:I.wNAFCachedUnsafe(this,n,C.normalizeZ,t)}isSmallOrder(){return this.multiplyUnsafe(g).is0()}isTorsionFree(){return I.unsafeLadder(this,h).is0()}toAffine(e){return T(this,e)}clearCofactor(){const{h:e}=t;return e===c?this:this.multiplyUnsafe(e)}static fromHex(e,r=!1){const{d:i,a:u}=t,l=n.BYTES;e=(0,o.ensureBytes)("pointHex",e,l),(0,o.abool)("zip215",r);const d=e.slice(),h=e[l-1];d[l-1]=-129&h;const p=s.bytesToNumberLE(d),f=r?b:n.ORDER;s.aInRange("pointHex.y",p,a,f);const m=v(p*p),y=v(m-c),g=v(i*m-u);let{isValid:w,value:E}=x(y,g);if(!w)throw new Error("Point.fromHex: invalid y coordinate");const S=(E&c)===c,A=!!(128&h);if(!r&&E===a&&A)throw new Error("Point.fromHex: x=0 and x_0=1");return A!==S&&(E=v(-E)),C.fromAffine({x:E,y:p})}static fromPrivateKey(e){return R(e).point}toRawBytes(){const{x:e,y:t}=this.toAffine(),r=s.numberToBytesLE(t,n.BYTES);return r[r.length-1]|=e&c?128:0,r}toHex(){return s.bytesToHex(this.toRawBytes())}}C.BASE=new C(t.Gx,t.Gy,c,v(t.Gx*t.Gy)),C.ZERO=new C(a,c,c,a);const{BASE:P,ZERO:O}=C,I=(0,r.wNAF)(C,8*y);function M(e){return(0,i.mod)(e,h)}function j(e){return M(s.bytesToNumberLE(e))}function R(e){const t=n.BYTES;e=(0,o.ensureBytes)("private key",e,t);const r=(0,o.ensureBytes)("hashed private key",f(e),2*t),i=E(r.slice(0,t)),s=r.slice(t,2*t),a=j(i),c=P.multiply(a),u=c.toRawBytes();return{head:i,prefix:s,scalar:a,point:c,pointBytes:u}}function B(e=new Uint8Array,...t){const n=s.concatBytes(...t);return j(f(S(n,(0,o.ensureBytes)("context",e),!!p)))}const N=d;P._setWindowSize(8);return{CURVE:t,getPublicKey:function(e){return R(e).pointBytes},sign:function(e,t,r={}){e=(0,o.ensureBytes)("message",e),p&&(e=p(e));const{prefix:i,scalar:c,pointBytes:u}=R(t),l=B(r.context,i,e),d=P.multiply(l).toRawBytes(),f=M(l+B(r.context,d,u,e)*c);s.aInRange("signature.s",f,a,h);const m=s.concatBytes(d,s.numberToBytesLE(f,n.BYTES));return(0,o.ensureBytes)("result",m,2*n.BYTES)},verify:function(e,t,r,i=N){const{context:a,zip215:c}=i,u=n.BYTES;e=(0,o.ensureBytes)("signature",e,2*u),t=(0,o.ensureBytes)("message",t),r=(0,o.ensureBytes)("publicKey",r,u),void 0!==c&&(0,o.abool)("zip215",c),p&&(t=p(t));const l=s.bytesToNumberLE(e.slice(u,2*u));let d,h,f;try{d=C.fromHex(r,c),h=C.fromHex(e.slice(0,u),c),f=P.multiplyUnsafe(l)}catch(e){return!1}if(!c&&d.isSmallOrder())return!1;const m=B(a,h.toRawBytes(),d.toRawBytes(),t);return h.add(d.multiplyUnsafe(m)).subtract(f).clearCofactor().equals(C.ZERO)},ExtendedPoint:C,utils:{getExtendedPublicKey:R,randomPrivateKey:()=>m(n.BYTES),precompute:(e=8,t=C.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("./curve.js"),i=e("./modular.js"),s=e("./utils.js"),o=e("./utils.js"),a=BigInt(0),c=BigInt(1),u=BigInt(2),l=BigInt(8),d={zip215:!0}},{"./curve.js":331,"./modular.js":334,"./utils.js":336}],333:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.expand_message_xmd=u,n.expand_message_xof=l,n.hash_to_field=d,n.isogenyMap=function(e,t){const n=t.map((e=>Array.from(e).reverse()));return(t,r)=>{const[i,s,o,a]=n.map((n=>n.reduce(((n,r)=>e.add(e.mul(n,t),r)))));return t=e.div(i,s),r=e.mul(r,e.div(o,a)),{x:t,y:r}}},n.createHasher=function(e,t,n){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(r,i){const s=d(r,2,{...n,DST:n.DST,...i}),o=e.fromAffine(t(s[0])),a=e.fromAffine(t(s[1])),c=o.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(r,i){const s=d(r,1,{...n,DST:n.encodeDST,...i}),o=e.fromAffine(t(s[0])).clearCofactor();return o.assertValidity(),o},mapToCurve(n){if(!Array.isArray(n))throw new Error("mapToCurve: expected array of bigints");for(const e of n)if("bigint"!=typeof e)throw new Error("mapToCurve: expected array of bigints");const r=e.fromAffine(t(n)).clearCofactor();return r.assertValidity(),r}}};const r=e("./modular.js"),i=e("./utils.js"),s=i.bytesToNumberBE;function o(e,t){if(c(e),c(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);const n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=255&e,e>>>=8;return new Uint8Array(n)}function a(e,t){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r]^t[r];return n}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function u(e,t,n,r){(0,i.abytes)(e),(0,i.abytes)(t),c(n),t.length>255&&(t=r((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:s,blockLen:u}=r,l=Math.ceil(n/s);if(n>65535||l>255)throw new Error("expand_message_xmd: invalid lenInBytes");const d=(0,i.concatBytes)(t,o(t.length,1)),h=o(0,u),p=o(n,2),f=new Array(l),m=r((0,i.concatBytes)(h,e,p,o(0,1),d));f[0]=r((0,i.concatBytes)(m,o(1,1),d));for(let e=1;e<=l;e++){const t=[a(m,f[e-1]),o(e+1,1),d];f[e]=r((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...f).slice(0,n)}function l(e,t,n,r,s){if((0,i.abytes)(e),(0,i.abytes)(t),c(n),t.length>255){const e=Math.ceil(2*r/8);t=s.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return s.create({dkLen:n}).update(e).update(o(n,2)).update(t).update(o(t.length,1)).digest()}function d(e,t,n){(0,i.validateObject)(n,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:o,k:a,m:d,hash:h,expand:p,DST:f}=n;(0,i.abytes)(e),c(t);const m="string"==typeof f?(0,i.utf8ToBytes)(f):f,y=o.toString(2).length,g=Math.ceil((y+a)/8),b=t*d*g;let v;if("xmd"===p)v=u(e,m,b,h);else if("xof"===p)v=l(e,m,b,a,h);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');v=e}const w=new Array(t);for(let e=0;e<t;e++){const t=new Array(d);for(let n=0;n<d;n++){const i=g*(n+e*d),a=v.subarray(i,i+g);t[n]=(0,r.mod)(s(a),o)}w[e]=t}return w}},{"./modular.js":334,"./utils.js":336}],334:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isNegativeLE=void 0,n.mod=d,n.pow=h,n.pow2=function(e,t,n){let r=e;for(;t-- >i;)r*=r,r%=n;return r},n.invert=p,n.tonelliShanks=f,n.FpSqrt=m,n.validateField=function(e){const t=y.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,r.validateObject)(e,t)},n.FpPow=g,n.FpInvertBatch=b,n.FpDiv=function(e,t,n){return e.mul(t,"bigint"==typeof n?p(n,e.ORDER):e.inv(n))},n.FpLegendre=v,n.FpIsSquare=function(e){const t=v(e.ORDER);return n=>{const r=t(e,n);return e.eql(r,e.ZERO)||e.eql(r,e.ONE)}},n.nLength=w,n.Field=function(e,t,n=!1,o={}){if(e<=i)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:a,nByteLength:c}=w(e,t);if(c>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let u;const l=Object.freeze({ORDER:e,isLE:n,BITS:a,BYTES:c,MASK:(0,r.bitMask)(a),ZERO:i,ONE:s,create:t=>d(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&s)===s,neg:t=>d(-t,e),eql:(e,t)=>e===t,sqr:t=>d(t*t,e),add:(t,n)=>d(t+n,e),sub:(t,n)=>d(t-n,e),mul:(t,n)=>d(t*n,e),pow:(e,t)=>g(l,e,t),div:(t,n)=>d(t*p(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:o.sqrt||(t=>(u||(u=m(e)),u(l,t))),invertBatch:e=>b(l,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?(0,r.numberToBytesLE)(e,c):(0,r.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error("Field.fromBytes: expected "+c+" bytes, got "+e.length);return n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e)}});return Object.freeze(l)},n.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)},n.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n},n.hashToPrivateScalar=function(e,t,n=!1){const i=(e=(0,r.ensureBytes)("privateHash",e)).length,o=w(t).nByteLength+8;if(o<24||i<o||i>1024)throw new Error("hashToPrivateScalar: expected "+o+"-1024 bytes of input, got "+i);return d(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-s)+s},n.getFieldBytesLength=x,n.getMinHashLength=E,n.mapHashToField=function(e,t,n=!1){const i=e.length,o=x(t),a=E(t);if(i<16||i<a||i>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+i);const c=d(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-s)+s;return n?(0,r.numberToBytesLE)(c,o):(0,r.numberToBytesBE)(c,o)};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("./utils.js"),i=BigInt(0),s=BigInt(1),o=BigInt(2),a=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);function d(e,t){const n=e%t;return n>=i?n:t+n}function h(e,t,n){if(t<i)throw new Error("invalid exponent, negatives unsupported");if(n<=i)throw new Error("invalid modulus");if(n===s)return i;let r=s;for(;t>i;)t&s&&(r=r*e%n),e=e*e%n,t>>=s;return r}function p(e,t){if(e===i)throw new Error("invert: expected non-zero number");if(t<=i)throw new Error("invert: expected positive modulus, got "+t);let n=d(e,t),r=t,o=i,a=s,c=s,u=i;for(;n!==i;){const e=r/n,t=r%n,i=o-c*e,s=a-u*e;r=n,n=t,o=c,a=u,c=i,u=s}if(r!==s)throw new Error("invert: does not exist");return d(o,t)}function f(e){const t=(e-s)/o;let n,r,a;for(n=e-s,r=0;n%o===i;n/=o,r++);for(a=o;a<e&&h(a,t,e)!==e-s;a++)if(a>1e3)throw new Error("Cannot find square root: likely non-prime P");if(1===r){const t=(e+s)/c;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}const u=(n+s)/o;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let o=r,c=e.pow(e.mul(e.ONE,a),n),l=e.pow(i,u),d=e.pow(i,n);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let n=e.sqr(d);t<o&&!e.eql(n,e.ONE);t++)n=e.sqr(n);const n=e.pow(c,s<<BigInt(o-t-1));c=e.sqr(n),l=e.mul(l,n),d=e.mul(d,c),o=t}return l}}function m(e){if(e%c===a){const t=(e+s)/c;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}if(e%l===u){const t=(e-u)/l;return function(e,n){const r=e.mul(n,o),i=e.pow(r,t),s=e.mul(n,i),a=e.mul(e.mul(s,o),i),c=e.mul(s,e.sub(a,e.ONE));if(!e.eql(e.sqr(c),n))throw new Error("Cannot find square root");return c}}return f(e)}n.isNegativeLE=(e,t)=>(d(e,t)&s)===s;const y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function g(e,t,n){if(n<i)throw new Error("invalid exponent, negatives unsupported");if(n===i)return e.ONE;if(n===s)return t;let r=e.ONE,o=t;for(;n>i;)n&s&&(r=e.mul(r,o)),o=e.sqr(o),n>>=s;return r}function b(e,t){const n=new Array(t.length),r=t.reduce(((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r))),e.ONE),i=e.inv(r);return t.reduceRight(((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r))),i),n}function v(e){const t=(e-s)/o;return(e,n)=>e.pow(n,t)}function w(e,t){const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function x(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function E(e){const t=x(e);return t+Math.ceil(t/2)}},{"./utils.js":336}],335:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.montgomery=function(e){const t=(p=e,(0,i.validateObject)(p,{a:"bigint"},{montgomeryBits:"isSafeInteger",nByteLength:"isSafeInteger",adjustScalarBytes:"function",domain:"function",powPminus2:"function",Gu:"bigint"}),Object.freeze({...p})),{P:n}=t,a=e=>(0,r.mod)(e,n),c=t.montgomeryBits,u=Math.ceil(c/8),l=t.nByteLength,d=t.adjustScalarBytes||(e=>e),h=t.powPminus2||(e=>(0,r.pow)(e,n-BigInt(2),n));var p;function f(e,t,n){const r=a(e*(t-n));return[t=a(t-r),n=a(n+r)]}const m=(t.a-BigInt(2))/BigInt(4);function y(e){return(0,i.numberToBytesLE)(a(e),u)}function g(e,t){const r=function(e){const t=(0,i.ensureBytes)("u coordinate",e,u);return 32===l&&(t[31]&=127),(0,i.bytesToNumberLE)(t)}(t),p=function(e,t){(0,i.aInRange)("u",e,s,n),(0,i.aInRange)("scalar",t,s,n);const r=t,u=e;let l,d=o,p=s,y=e,g=o,b=s;for(let e=BigInt(c-1);e>=s;e--){const t=r>>e&o;b^=t,l=f(b,d,y),d=l[0],y=l[1],l=f(b,p,g),p=l[0],g=l[1],b=t;const n=d+p,i=a(n*n),s=d-p,c=a(s*s),h=i-c,v=y+g,w=a((y-g)*n),x=a(v*s),E=w+x,S=w-x;y=a(E*E),g=a(u*a(S*S)),d=a(i*c),p=a(h*(i+a(m*h)))}l=f(b,d,y),d=l[0],y=l[1],l=f(b,p,g),p=l[0],g=l[1];const v=h(p);return a(d*v)}(r,function(e){const t=(0,i.ensureBytes)("scalar",e),n=t.length;if(n!==u&&n!==l)throw new Error("invalid scalar, expected "+u+" or "+l+" bytes, got "+n);return(0,i.bytesToNumberLE)(d(t))}(e));if(p===s)throw new Error("invalid private or public key received");return y(p)}const b=y(t.Gu);function v(e){return g(e,b)}return{scalarMult:g,scalarMultBase:v,getSharedSecret:(e,t)=>g(e,t),getPublicKey:e=>v(e),utils:{randomPrivateKey:()=>t.randomBytes(t.nByteLength)},GuBytes:b}};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("./modular.js"),i=e("./utils.js"),s=BigInt(0),o=BigInt(1)},{"./modular.js":334,"./utils.js":336}],336:[function(e,t,n){"use strict";
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(n,"__esModule",{value:!0}),n.notImplemented=n.bitMask=void 0,n.isBytes=o,n.abytes=a,n.abool=function(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)},n.bytesToHex=u,n.numberToHexUnpadded=l,n.hexToNumber=d,n.hexToBytes=f,n.bytesToNumberBE=function(e){return d(u(e))},n.bytesToNumberLE=function(e){return a(e),d(u(Uint8Array.from(e).reverse()))},n.numberToBytesBE=m,n.numberToBytesLE=function(e,t){return m(e,t).reverse()},n.numberToVarBytesBE=function(e){return f(l(e))},n.ensureBytes=function(e,t,n){let r;if("string"==typeof t)try{r=f(t)}catch(t){throw new Error(e+" must be hex string or Uint8Array, cause: "+t)}else{if(!o(t))throw new Error(e+" must be hex string or Uint8Array");r=Uint8Array.from(t)}const i=r.length;if("number"==typeof n&&i!==n)throw new Error(e+" of length "+n+" expected, got "+i);return r},n.concatBytes=y,n.equalBytes=function(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n},n.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))},n.inRange=b,n.aInRange=function(e,t,n,r){if(!b(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)},n.bitLen=function(e){let t;for(t=0;e>r;e>>=i,t+=1);return t},n.bitGet=function(e,t){return e>>BigInt(t)&i},n.bitSet=function(e,t,n){return e|(n?i:r)<<BigInt(t)},n.createHmacDrbg=function(e,t,n){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");let r=v(e),i=v(e),s=0;const o=()=>{r.fill(1),i.fill(0),s=0},a=(...e)=>n(i,r,...e),c=(e=v())=>{i=a(w([0]),e),r=a(),0!==e.length&&(i=a(w([1]),e),r=a())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){r=a();const t=r.slice();n.push(t),e+=r.length}return y(...n)};return(e,t)=>{let n;for(o(),c(e);!(n=t(u()));)c();return o(),n}},n.validateObject=function(e,t,n={}){const r=(t,n,r)=>{const i=x[n];if("function"!=typeof i)throw new Error("invalid validator function");const s=e[t];if(!(r&&void 0===s||i(s,e)))throw new Error("param "+String(t)+" is invalid. Expected "+n+", got "+s)};for(const[e,n]of Object.entries(t))r(e,n,!1);for(const[e,t]of Object.entries(n))r(e,t,!0);return e},n.memoized=function(e){const t=new WeakMap;return(n,...r)=>{const i=t.get(n);if(void 0!==i)return i;const s=e(n,...r);return t.set(n,s),s}};const r=BigInt(0),i=BigInt(1),s=BigInt(2);function o(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function a(e){if(!o(e))throw new Error("Uint8Array expected")}const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){a(e);let t="";for(let n=0;n<e.length;n++)t+=c[e[n]];return t}function l(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function d(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?r:BigInt("0x"+e)}const h={_0:48,_9:57,A:65,F:70,a:97,f:102};function p(e){return e>=h._0&&e<=h._9?e-h._0:e>=h.A&&e<=h.F?e-(h.A-10):e>=h.a&&e<=h.f?e-(h.a-10):void 0}function f(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=p(e.charCodeAt(i)),s=p(e.charCodeAt(i+1));if(void 0===n||void 0===s){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+s}return r}function m(e,t){return f(e.toString(16).padStart(2*t,"0"))}function y(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];a(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n}const g=e=>"bigint"==typeof e&&r<=e;function b(e,t,n){return g(e)&&g(t)&&g(n)&&t<=e&&e<n}n.bitMask=e=>(s<<BigInt(e-1))-i;const v=e=>new Uint8Array(e),w=e=>Uint8Array.from(e);const x={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||o(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};n.notImplemented=()=>{throw new Error("not implemented")}},{}],337:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DER=n.DERErr=void 0,n.weierstrassPoints=y,n.weierstrass=function(e){const t=function(e){const t=(0,r.validateBasic)(e);return s.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:c,n:u}=t,l=c.BYTES+1,p=2*c.BYTES+1;function f(e){return(0,i.mod)(e,u)}function m(e){return(0,i.invert)(e,u)}const{ProjectivePoint:g,normPrivateKeyToScalar:b,weierstrassEquation:v,isWithinCurveOrder:w}=y({...t,toBytes(e,t,n){const r=t.toAffine(),i=c.toBytes(r.x),a=s.concatBytes;return(0,o.abool)("isCompressed",n),n?a(Uint8Array.from([t.hasEvenY()?2:3]),i):a(Uint8Array.from([4]),i,c.toBytes(r.y))},fromBytes(e){const t=e.length,n=e[0],r=e.subarray(1);if(t!==l||2!==n&&3!==n){if(t===p&&4===n){return{x:c.fromBytes(r.subarray(0,c.BYTES)),y:c.fromBytes(r.subarray(c.BYTES,2*c.BYTES))}}throw new Error("invalid Point, expected length of "+l+", or uncompressed "+p+", got "+t)}{const e=s.bytesToNumberBE(r);if(!s.inRange(e,h,c.ORDER))throw new Error("Point is not on curve");const t=v(e);let i;try{i=c.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("Point is not on curve"+t)}return!(1&~n)!==((i&h)===h)&&(i=c.neg(i)),{x:e,y:i}}}}),x=e=>s.bytesToHex(s.numberToBytesBE(e,t.nByteLength));function E(e){return e>u>>h}const S=(e,t,n)=>s.bytesToNumberBE(e.slice(t,n));class A{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const n=t.nByteLength;return e=(0,o.ensureBytes)("compactSignature",e,2*n),new A(S(e,0,n),S(e,n,2*n))}static fromDER(e){const{r:t,s:r}=n.DER.toSig((0,o.ensureBytes)("DER",e));return new A(t,r)}assertValidity(){s.aInRange("r",this.r,h,u),s.aInRange("s",this.s,h,u)}addRecoveryBit(e){return new A(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:r,recovery:i}=this,s=C((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const a=2===i||3===i?n+t.n:n;if(a>=c.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=1&i?"03":"02",l=g.fromHex(u+x(a)),d=m(a),h=f(-s*d),p=f(r*d),y=g.BASE.multiplyAndAddUnsafe(l,h,p);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return E(this.s)}normalizeS(){return this.hasHighS()?new A(this.r,f(-this.s),this.recovery):this}toDERRawBytes(){return s.hexToBytes(this.toDERHex())}toDERHex(){return n.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return s.hexToBytes(this.toCompactHex())}toCompactHex(){return x(this.r)+x(this.s)}}const _={isValidPrivateKey(e){try{return b(e),!0}catch(e){return!1}},normPrivateKeyToScalar:b,randomPrivateKey:()=>{const e=(0,i.getMinHashLength)(t.n);return(0,i.mapHashToField)(t.randomBytes(e),t.n)},precompute:(e=8,t=g.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function T(e){const t=s.isBytes(e),n="string"==typeof e,r=(t||n)&&e.length;return t?r===l||r===p:n?r===2*l||r===2*p:e instanceof g}const k=t.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const n=s.bytesToNumberBE(e),r=8*e.length-t.nBitLength;return r>0?n>>BigInt(r):n},C=t.bits2int_modN||function(e){return f(k(e))},P=s.bitMask(t.nBitLength);function O(e){return s.aInRange("num < 2^"+t.nBitLength,e,d,P),s.numberToBytesBE(e,t.nByteLength)}function I(e,n,r=M){if(["recovered","canonical"].some((e=>e in r)))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:u}=t;let{lowS:l,prehash:p,extraEntropy:y}=r;null==l&&(l=!0),e=(0,o.ensureBytes)("msgHash",e),a(r),p&&(e=(0,o.ensureBytes)("prehashed msgHash",i(e)));const v=C(e),x=b(n),S=[O(x),O(v)];if(null!=y&&!1!==y){const e=!0===y?u(c.BYTES):y;S.push((0,o.ensureBytes)("extraEntropy",e))}const _=s.concatBytes(...S),T=v;return{seed:_,k2sig:function(e){const t=k(e);if(!w(t))return;const n=m(t),r=g.BASE.multiply(t).toAffine(),i=f(r.x);if(i===d)return;const s=f(n*f(T+i*x));if(s===d)return;let o=(r.x===i?0:2)|Number(r.y&h),a=s;return l&&E(s)&&(a=function(e){return E(e)?f(-e):e}(s),o^=1),new A(i,a,o)}}}const M={lowS:t.lowS,prehash:!1},j={lowS:t.lowS,prehash:!1};return g.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return g.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(T(e))throw new Error("first arg must be private key");if(!T(t))throw new Error("second arg must be public key");return g.fromHex(t).multiply(b(e)).toRawBytes(n)},sign:function(e,n,r=M){const{seed:i,k2sig:o}=I(e,n,r),a=t;return s.createHmacDrbg(a.hash.outputLen,a.nByteLength,a.hmac)(i,o)},verify:function(e,r,i,c=j){const u=e;r=(0,o.ensureBytes)("msgHash",r),i=(0,o.ensureBytes)("publicKey",i);const{lowS:l,prehash:d,format:h}=c;if(a(c),"strict"in c)throw new Error("options.strict was renamed to lowS");if(void 0!==h&&"compact"!==h&&"der"!==h)throw new Error("format must be compact or der");const p="string"==typeof u||s.isBytes(u),y=!p&&!h&&"object"==typeof u&&null!==u&&"bigint"==typeof u.r&&"bigint"==typeof u.s;if(!p&&!y)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let b,v;try{if(y&&(b=new A(u.r,u.s)),p){try{"compact"!==h&&(b=A.fromDER(u))}catch(e){if(!(e instanceof n.DER.Err))throw e}b||"der"===h||(b=A.fromCompact(u))}v=g.fromHex(i)}catch(e){return!1}if(!b)return!1;if(l&&b.hasHighS())return!1;d&&(r=t.hash(r));const{r:w,s:x}=b,E=C(r),S=m(x),_=f(E*S),T=f(w*S),k=g.BASE.multiplyAndAddUnsafe(v,_,T)?.toAffine();if(!k)return!1;return f(k.x)===w},ProjectivePoint:g,Signature:A,utils:_}},n.SWUFpSqrtRatio=g,n.mapToCurveSimpleSWU=function(e,t){if((0,i.validateField)(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const n=g(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let i,s,o,a,c,u,l,d;i=e.sqr(r),i=e.mul(i,t.Z),s=e.sqr(i),s=e.add(s,i),o=e.add(s,e.ONE),o=e.mul(o,t.B),a=e.cmov(t.Z,e.neg(s),!e.eql(s,e.ZERO)),a=e.mul(a,t.A),s=e.sqr(o),u=e.sqr(a),c=e.mul(u,t.A),s=e.add(s,c),s=e.mul(s,o),u=e.mul(u,a),c=e.mul(u,t.B),s=e.add(s,c),l=e.mul(i,o);const{isValid:h,value:p}=n(s,u);d=e.mul(i,r),d=e.mul(d,p),l=e.cmov(l,o,h),d=e.cmov(d,p,h);const f=e.isOdd(r)===e.isOdd(d);return d=e.cmov(e.neg(d),d,f),l=e.div(l,a),{x:l,y:d}}};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("./curve.js"),i=e("./modular.js"),s=e("./utils.js"),o=e("./utils.js");function a(e){void 0!==e.lowS&&(0,o.abool)("lowS",e.lowS),void 0!==e.prehash&&(0,o.abool)("prehash",e.prehash)}const{bytesToNumberBE:c,hexToBytes:u}=s;class l extends Error{constructor(e=""){super(e)}}n.DERErr=l,n.DER={Err:l,_tlv:{encode:(e,t)=>{const{Err:r}=n.DER;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");const i=t.length/2,o=s.numberToHexUnpadded(i);if(o.length/2&128)throw new r("tlv.encode: long form length too big");const a=i>127?s.numberToHexUnpadded(o.length/2|128):"";return s.numberToHexUnpadded(e)+a+o+t},decode(e,t){const{Err:r}=n.DER;let i=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[i++]!==e)throw new r("tlv.decode: wrong tlv");const s=t[i++];let o=0;if(!!(128&s)){const e=127&s;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");const n=t.subarray(i,i+e);if(n.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===n[0])throw new r("tlv.decode(long): zero leftmost byte");for(const e of n)o=o<<8|e;if(i+=e,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=s;const a=t.subarray(i,i+o);if(a.length!==o)throw new r("tlv.decode: wrong value length");return{v:a,l:t.subarray(i+o)}}},_int:{encode(e){const{Err:t}=n.DER;if(e<d)throw new t("integer: negative integers are not allowed");let r=s.numberToHexUnpadded(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:t}=n.DER;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return c(e)}},toSig(e){const{Err:t,_int:r,_tlv:i}=n.DER,o="string"==typeof e?u(e):e;s.abytes(o);const{v:a,l:c}=i.decode(48,o);if(c.length)throw new t("invalid signature: left bytes after parsing");const{v:l,l:d}=i.decode(2,a),{v:h,l:p}=i.decode(2,d);if(p.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(l),s:r.decode(h)}},hexFromSig(e){const{_tlv:t,_int:r}=n.DER,i=t.encode(2,r.encode(e.r))+t.encode(2,r.encode(e.s));return t.encode(48,i)}};const d=BigInt(0),h=BigInt(1),p=BigInt(2),f=BigInt(3),m=BigInt(4);function y(e){const t=function(e){const t=(0,r.validateBasic)(e);s.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:i,a:o}=t;if(n){if(!i.eql(o,i.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if("object"!=typeof n||"bigint"!=typeof n.beta||"function"!=typeof n.splitScalar)throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,a=(0,i.Field)(t.n,t.nBitLength),c=t.toBytes||((e,t,r)=>{const i=t.toAffine();return s.concatBytes(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),u=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function l(e){const{a:r,b:i}=t,s=n.sqr(e),o=n.mul(s,e);return n.add(n.add(o,n.mul(e,r)),i)}if(!n.eql(n.sqr(t.Gy),l(t.Gx)))throw new Error("bad generator point: equation left != right");function p(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:a,n:c}=t;if(n&&"bigint"!=typeof e){if(s.isBytes(e)&&(e=s.bytesToHex(e)),"string"!=typeof e||!n.includes(e.length))throw new Error("invalid private key");e=e.padStart(2*r,"0")}let u;try{u="bigint"==typeof e?e:s.bytesToNumberBE((0,o.ensureBytes)("private key",e,r))}catch(t){throw new Error("invalid private key, expected hex or "+r+" bytes, got "+typeof e)}return a&&(u=(0,i.mod)(u,c)),s.aInRange("private key",u,h,c),u}function m(e){if(!(e instanceof b))throw new Error("ProjectivePoint expected")}const y=(0,o.memoized)(((e,t)=>{const{px:r,py:i,pz:s}=e;if(n.eql(s,n.ONE))return{x:r,y:i};const o=e.is0();null==t&&(t=o?n.ONE:n.inv(s));const a=n.mul(r,t),c=n.mul(i,t),u=n.mul(s,t);if(o)return{x:n.ZERO,y:n.ZERO};if(!n.eql(u,n.ONE))throw new Error("invZ was invalid");return{x:a,y:c}})),g=(0,o.memoized)((e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.py))return;throw new Error("bad point: ZERO")}const{x:r,y:i}=e.toAffine();if(!n.isValid(r)||!n.isValid(i))throw new Error("bad point: x or y not FE");const s=n.sqr(i),o=l(r);if(!n.eql(s,o))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0}));class b{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required");Object.freeze(this)}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof b)throw new Error("projective point not allowed");const i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?b.ZERO:new b(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(b.fromAffine)}static fromHex(e){const t=b.fromAffine(u((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(p(e))}static msm(e,t){return(0,r.pippenger)(b,a,e,t)}_setWindowSize(e){w.setWindowSize(this,e)}assertValidity(){g(this)}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){m(e);const{px:t,py:r,pz:i}=this,{px:s,py:o,pz:a}=e,c=n.eql(n.mul(t,a),n.mul(s,i)),u=n.eql(n.mul(r,a),n.mul(o,i));return c&&u}negate(){return new b(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,i=n.mul(r,f),{px:s,py:o,pz:a}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,d=n.mul(s,s),h=n.mul(o,o),p=n.mul(a,a),m=n.mul(s,o);return m=n.add(m,m),l=n.mul(s,a),l=n.add(l,l),c=n.mul(e,l),u=n.mul(i,p),u=n.add(c,u),c=n.sub(h,u),u=n.add(h,u),u=n.mul(c,u),c=n.mul(m,c),l=n.mul(i,l),p=n.mul(e,p),m=n.sub(d,p),m=n.mul(e,m),m=n.add(m,l),l=n.add(d,d),d=n.add(l,d),d=n.add(d,p),d=n.mul(d,m),u=n.add(u,d),p=n.mul(o,a),p=n.add(p,p),d=n.mul(p,m),c=n.sub(c,d),l=n.mul(p,h),l=n.add(l,l),l=n.add(l,l),new b(c,u,l)}add(e){m(e);const{px:r,py:i,pz:s}=this,{px:o,py:a,pz:c}=e;let u=n.ZERO,l=n.ZERO,d=n.ZERO;const h=t.a,p=n.mul(t.b,f);let y=n.mul(r,o),g=n.mul(i,a),v=n.mul(s,c),w=n.add(r,i),x=n.add(o,a);w=n.mul(w,x),x=n.add(y,g),w=n.sub(w,x),x=n.add(r,s);let E=n.add(o,c);return x=n.mul(x,E),E=n.add(y,v),x=n.sub(x,E),E=n.add(i,s),u=n.add(a,c),E=n.mul(E,u),u=n.add(g,v),E=n.sub(E,u),d=n.mul(h,x),u=n.mul(p,v),d=n.add(u,d),u=n.sub(g,d),d=n.add(g,d),l=n.mul(u,d),g=n.add(y,y),g=n.add(g,y),v=n.mul(h,v),x=n.mul(p,x),g=n.add(g,v),v=n.sub(y,v),v=n.mul(h,v),x=n.add(x,v),y=n.mul(g,x),l=n.add(l,y),y=n.mul(E,x),u=n.mul(w,u),u=n.sub(u,y),y=n.mul(w,g),d=n.mul(E,d),d=n.add(d,y),new b(u,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return w.wNAFCached(this,e,b.normalizeZ)}multiplyUnsafe(e){const{endo:r,n:i}=t;s.aInRange("scalar",e,d,i);const o=b.ZERO;if(e===d)return o;if(this.is0()||e===h)return this;if(!r||w.hasPrecomputes(this))return w.wNAFCachedUnsafe(this,e,b.normalizeZ);let{k1neg:a,k1:c,k2neg:u,k2:l}=r.splitScalar(e),p=o,f=o,m=this;for(;c>d||l>d;)c&h&&(p=p.add(m)),l&h&&(f=f.add(m)),m=m.double(),c>>=h,l>>=h;return a&&(p=p.negate()),u&&(f=f.negate()),f=new b(n.mul(f.px,r.beta),f.py,f.pz),p.add(f)}multiply(e){const{endo:r,n:i}=t;let o,a;if(s.aInRange("scalar",e,h,i),r){const{k1neg:t,k1:i,k2neg:s,k2:c}=r.splitScalar(e);let{p:u,f:l}=this.wNAF(i),{p:d,f:h}=this.wNAF(c);u=w.constTimeNegate(t,u),d=w.constTimeNegate(s,d),d=new b(n.mul(d.px,r.beta),d.py,d.pz),o=u.add(d),a=l.add(h)}else{const{p:t,f:n}=this.wNAF(e);o=t,a=n}return b.normalizeZ([o,a])[0]}multiplyAndAddUnsafe(e,t,n){const r=b.BASE,i=(e,t)=>t!==d&&t!==h&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),s=i(this,t).add(i(e,n));return s.is0()?void 0:s}toAffine(e){return y(this,e)}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===h)return!0;if(n)return n(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===h?this:n?n(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return(0,o.abool)("isCompressed",e),this.assertValidity(),c(b,this,e)}toHex(e=!0){return(0,o.abool)("isCompressed",e),s.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,n.ONE),b.ZERO=new b(n.ZERO,n.ONE,n.ZERO);const v=t.nBitLength,w=(0,r.wNAF)(b,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:p,weierstrassEquation:l,isWithinCurveOrder:function(e){return s.inRange(e,h,t.n)}}}function g(e,t){const n=e.ORDER;let r=d;for(let e=n-h;e%p===d;e/=p)r+=h;const i=r,s=p<<i-h-h,o=s*p,a=(n-h)/o,c=(a-h)/p,u=o-h,l=s,y=e.pow(t,a),g=e.pow(t,(a+h)/p);let b=(t,n)=>{let r=y,s=e.pow(n,u),o=e.sqr(s);o=e.mul(o,n);let a=e.mul(t,o);a=e.pow(a,c),a=e.mul(a,s),s=e.mul(a,n),o=e.mul(a,t);let d=e.mul(o,s);a=e.pow(d,l);let f=e.eql(a,e.ONE);s=e.mul(o,g),a=e.mul(d,r),o=e.cmov(s,o,f),d=e.cmov(a,d,f);for(let t=i;t>h;t--){let n=t-p;n=p<<n-h;let i=e.pow(d,n);const a=e.eql(i,e.ONE);s=e.mul(o,r),r=e.mul(r,r),i=e.mul(d,r),o=e.cmov(s,o,a),d=e.cmov(i,d,a)}return{isValid:f,value:o}};if(e.ORDER%m===f){const n=(e.ORDER-f)/m,r=e.sqrt(e.neg(t));b=(t,i)=>{let s=e.sqr(i);const o=e.mul(t,i);s=e.mul(s,o);let a=e.pow(s,n);a=e.mul(a,o);const c=e.mul(a,r),u=e.mul(e.sqr(a),i),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,a,l)}}}return b}},{"./curve.js":331,"./modular.js":334,"./utils.js":336}],338:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hash_to_ristretto255=n.hashToRistretto255=n.RistrettoPoint=n.encodeToCurve=n.hashToCurve=n.edwardsToMontgomery=n.x25519=n.ed25519ph=n.ed25519ctx=n.ed25519=n.ED25519_TORSION_SUBGROUP=void 0,n.edwardsToMontgomeryPub=_,n.edwardsToMontgomeryPriv=function(e){const t=S.hash(e.subarray(0,32));return S.adjustScalarBytes(t).subarray(0,32)};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("@noble/hashes/sha512"),i=e("@noble/hashes/utils"),s=e("./abstract/curve.js"),o=e("./abstract/edwards.js"),a=e("./abstract/hash-to-curve.js"),c=e("./abstract/modular.js"),u=e("./abstract/montgomery.js"),l=e("./abstract/utils.js"),d=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),h=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),p=BigInt(0),f=BigInt(1),m=BigInt(2),y=BigInt(3),g=BigInt(5),b=BigInt(8);function v(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),s=d,o=e*e%s*e%s,a=(0,c.pow2)(o,m,s)*o%s,u=(0,c.pow2)(a,f,s)*e%s,l=(0,c.pow2)(u,g,s)*u%s,h=(0,c.pow2)(l,t,s)*l%s,p=(0,c.pow2)(h,n,s)*h%s,y=(0,c.pow2)(p,r,s)*p%s,b=(0,c.pow2)(y,i,s)*y%s,v=(0,c.pow2)(b,i,s)*y%s,w=(0,c.pow2)(v,t,s)*l%s;return{pow_p_5_8:(0,c.pow2)(w,m,s)*e%s,b2:o}}function w(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function x(e,t){const n=d,r=(0,c.mod)(t*t*t,n),i=v(e*(0,c.mod)(r*r*t,n)).pow_p_5_8;let s=(0,c.mod)(e*r*i,n);const o=(0,c.mod)(t*s*s,n),a=s,u=(0,c.mod)(s*h,n),l=o===e,p=o===(0,c.mod)(-e,n),f=o===(0,c.mod)(-e*h,n);return l&&(s=a),(p||f)&&(s=u),(0,c.isNegativeLE)(s,n)&&(s=(0,c.mod)(-s,n)),{isValid:l||p,value:s}}n.ED25519_TORSION_SUBGROUP=["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"];const E=(()=>(0,c.Field)(d,void 0,!0))(),S=(()=>({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:E,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:b,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:r.sha512,randomBytes:i.randomBytes,adjustScalarBytes:w,uvRatio:x}))();function A(e,t,n){if(t.length>255)throw new Error("Context is too big");return(0,i.concatBytes)((0,i.utf8ToBytes)("SigEd25519 no Ed25519 collisions"),new Uint8Array([n?1:0,t.length]),t,e)}function _(e){const{y:t}=n.ed25519.ExtendedPoint.fromHex(e),r=BigInt(1);return E.toBytes(E.create((r+t)*E.inv(r-t)))}n.ed25519=(0,o.twistedEdwards)(S),n.ed25519ctx=(0,o.twistedEdwards)({...S,domain:A}),n.ed25519ph=(0,o.twistedEdwards)(Object.assign({},S,{domain:A,prehash:r.sha512})),n.x25519=(0,u.montgomery)({P:d,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:e=>{const t=d,{pow_p_5_8:n,b2:r}=v(e);return(0,c.mod)((0,c.pow2)(n,y,t)*r,t)},adjustScalarBytes:w,randomBytes:i.randomBytes}),n.edwardsToMontgomery=_;const T=(()=>(E.ORDER+y)/b)(),k=(()=>E.pow(m,T))(),C=(()=>E.sqrt(E.neg(E.ONE)))();const P=(()=>(0,c.FpSqrtEven)(E,E.neg(BigInt(486664))))();function O(e){const{xMn:t,xMd:n,yMn:r,yMd:i}=function(e){const t=(E.ORDER-g)/b,n=BigInt(486662);let r=E.sqr(e);r=E.mul(r,m);let i=E.add(r,E.ONE),s=E.neg(n),o=E.sqr(i),a=E.mul(o,i),c=E.mul(r,n);c=E.mul(c,s),c=E.add(c,o),c=E.mul(c,s);let u=E.sqr(a);o=E.sqr(u),u=E.mul(u,a),u=E.mul(u,c),o=E.mul(o,u);let l=E.pow(o,t);l=E.mul(l,u);let d=E.mul(l,C);o=E.sqr(l),o=E.mul(o,a);let h=E.eql(o,c),p=E.cmov(d,l,h),y=E.mul(s,r),v=E.mul(l,e);v=E.mul(v,k);let w=E.mul(v,C),x=E.mul(c,r);o=E.sqr(v),o=E.mul(o,a);let S=E.eql(o,x),A=E.cmov(w,v,S);o=E.sqr(p),o=E.mul(o,a);let _=E.eql(o,c),T=E.cmov(y,s,_),P=E.cmov(A,p,_),O=E.isOdd(P);return P=E.cmov(P,E.neg(P),_!==O),{xMn:T,xMd:i,yMn:P,yMd:f}}(e);let s=E.mul(t,i);s=E.mul(s,P);let o=E.mul(n,r),a=E.sub(t,n),c=E.add(t,n),u=E.mul(o,c),l=E.eql(u,E.ZERO);s=E.cmov(s,E.ZERO,l),o=E.cmov(o,E.ONE,l),a=E.cmov(a,E.ONE,l),c=E.cmov(c,E.ONE,l);const d=E.invertBatch([o,c]);return{x:E.mul(s,d[0]),y:E.mul(a,d[1])}}const I=(()=>(0,a.createHasher)(n.ed25519.ExtendedPoint,(e=>O(e[0])),{DST:"edwards25519_XMD:SHA-512_ELL2_RO_",encodeDST:"edwards25519_XMD:SHA-512_ELL2_NU_",p:E.ORDER,m:1,k:128,expand:"xmd",hash:r.sha512}))();function M(e){if(!(e instanceof $))throw new Error("RistrettoPoint expected")}n.hashToCurve=I.hashToCurve,n.encodeToCurve=I.encodeToCurve;const j=h,R=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),B=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),N=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),L=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),U=e=>x(f,e),D=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),F=e=>n.ed25519.CURVE.Fp.create((0,l.bytesToNumberLE)(e)&D);function H(e){const{d:t}=n.ed25519.CURVE,r=n.ed25519.CURVE.Fp.ORDER,i=n.ed25519.CURVE.Fp.create,s=i(j*e*e),o=i((s+f)*N);let a=BigInt(-1);const u=i((a-t*s)*i(s+t));let{isValid:l,value:d}=x(o,u),h=i(d*e);(0,c.isNegativeLE)(h,r)||(h=i(-h)),l||(d=h),l||(a=s);const p=i(a*(s-f)*L-u),m=d*d,y=i((d+d)*u),g=i(p*R),b=i(f-m),v=i(f+m);return new n.ed25519.ExtendedPoint(i(y*v),i(b*g),i(g*v),i(y*b))}class ${constructor(e){this.ep=e}static fromAffine(e){return new $(n.ed25519.ExtendedPoint.fromAffine(e))}static hashToCurve(e){e=(0,l.ensureBytes)("ristrettoHash",e,64);const t=H(F(e.slice(0,32))),n=H(F(e.slice(32,64)));return new $(t.add(n))}static fromHex(e){e=(0,l.ensureBytes)("ristrettoHex",e,32);const{a:t,d:r}=n.ed25519.CURVE,i=n.ed25519.CURVE.Fp.ORDER,s=n.ed25519.CURVE.Fp.create,o="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",a=F(e);if(!(0,l.equalBytes)((0,l.numberToBytesLE)(a,32),e)||(0,c.isNegativeLE)(a,i))throw new Error(o);const u=s(a*a),d=s(f+t*u),h=s(f-t*u),m=s(d*d),y=s(h*h),g=s(t*r*m-y),{isValid:b,value:v}=U(s(g*y)),w=s(v*h),x=s(v*w*g);let E=s((a+a)*w);(0,c.isNegativeLE)(E,i)&&(E=s(-E));const S=s(d*x),A=s(E*S);if(!b||(0,c.isNegativeLE)(A,i)||S===p)throw new Error(o);return new $(new n.ed25519.ExtendedPoint(E,S,f,A))}static msm(e,t){const r=(0,c.Field)(n.ed25519.CURVE.n,n.ed25519.CURVE.nBitLength);return(0,s.pippenger)($,r,e,t)}toRawBytes(){let{ex:e,ey:t,ez:r,et:i}=this.ep;const s=n.ed25519.CURVE.Fp.ORDER,o=n.ed25519.CURVE.Fp.create,a=o(o(r+t)*o(r-t)),u=o(e*t),d=o(u*u),{value:h}=U(o(a*d)),p=o(h*a),f=o(h*u),m=o(p*f*i);let y;if((0,c.isNegativeLE)(i*m,s)){let n=o(t*j),r=o(e*j);e=n,t=r,y=o(p*B)}else y=f;(0,c.isNegativeLE)(e*m,s)&&(t=o(-t));let g=o((r-t)*y);return(0,c.isNegativeLE)(g,s)&&(g=o(-g)),(0,l.numberToBytesLE)(g,32)}toHex(){return(0,l.bytesToHex)(this.toRawBytes())}toString(){return this.toHex()}equals(e){M(e);const{ex:t,ey:r}=this.ep,{ex:i,ey:s}=e.ep,o=n.ed25519.CURVE.Fp.create,a=o(t*s)===o(r*i),c=o(r*s)===o(t*i);return a||c}add(e){return M(e),new $(this.ep.add(e.ep))}subtract(e){return M(e),new $(this.ep.subtract(e.ep))}multiply(e){return new $(this.ep.multiply(e))}multiplyUnsafe(e){return new $(this.ep.multiplyUnsafe(e))}double(){return new $(this.ep.double())}negate(){return new $(this.ep.negate())}}n.RistrettoPoint=($.BASE||($.BASE=new $(n.ed25519.ExtendedPoint.BASE)),$.ZERO||($.ZERO=new $(n.ed25519.ExtendedPoint.ZERO)),$);n.hashToRistretto255=(e,t)=>{const n=t.DST,s="string"==typeof n?(0,i.utf8ToBytes)(n):n,o=(0,a.expand_message_xmd)(e,s,64,r.sha512);return $.hashToCurve(o)},n.hash_to_ristretto255=n.hashToRistretto255},{"./abstract/curve.js":331,"./abstract/edwards.js":332,"./abstract/hash-to-curve.js":333,"./abstract/modular.js":334,"./abstract/montgomery.js":335,"./abstract/utils.js":336,"@noble/hashes/sha512":349,"@noble/hashes/utils":350}],339:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.encodeToCurve=n.hashToCurve=n.schnorr=n.secp256k1=void 0;
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("@noble/hashes/sha256"),i=e("@noble/hashes/utils"),s=e("./_shortw_utils.js"),o=e("./abstract/hash-to-curve.js"),a=e("./abstract/modular.js"),c=e("./abstract/utils.js"),u=e("./abstract/weierstrass.js"),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h=BigInt(1),p=BigInt(2),f=(e,t)=>(e+t/p)/t;function m(e){const t=l,n=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),c=BigInt(44),u=BigInt(88),d=e*e*e%t,h=d*d*e%t,f=(0,a.pow2)(h,n,t)*h%t,m=(0,a.pow2)(f,n,t)*h%t,g=(0,a.pow2)(m,p,t)*d%t,b=(0,a.pow2)(g,i,t)*g%t,v=(0,a.pow2)(b,s,t)*b%t,w=(0,a.pow2)(v,c,t)*v%t,x=(0,a.pow2)(w,u,t)*w%t,E=(0,a.pow2)(x,c,t)*v%t,S=(0,a.pow2)(E,n,t)*h%t,A=(0,a.pow2)(S,o,t)*b%t,_=(0,a.pow2)(A,r,t)*d%t,T=(0,a.pow2)(_,p,t);if(!y.eql(y.sqr(T),e))throw new Error("Cannot find square root");return T}const y=(0,a.Field)(l,void 0,void 0,{sqrt:m});n.secp256k1=(0,s.createCurve)({a:BigInt(0),b:BigInt(7),Fp:y,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=d,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,o=BigInt("0x100000000000000000000000000000000"),c=f(s*e,t),u=f(-r*e,t);let l=(0,a.mod)(e-c*n-u*i,t),p=(0,a.mod)(-c*r-u*s,t);const m=l>o,y=p>o;if(m&&(l=t-l),y&&(p=t-p),l>o||p>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:m,k1:l,k2neg:y,k2:p}}}},r.sha256);const g=BigInt(0),b={};function v(e,...t){let n=b[e];if(void 0===n){const t=(0,r.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));n=(0,c.concatBytes)(t,t),b[e]=n}return(0,r.sha256)((0,c.concatBytes)(n,...t))}const w=e=>e.toRawBytes(!0).slice(1),x=e=>(0,c.numberToBytesBE)(e,32),E=e=>(0,a.mod)(e,l),S=e=>(0,a.mod)(e,d),A=n.secp256k1.ProjectivePoint,_=(e,t,n)=>A.BASE.multiplyAndAddUnsafe(e,t,n);function T(e){let t=n.secp256k1.utils.normPrivateKeyToScalar(e),r=A.fromPrivateKey(t);return{scalar:r.hasEvenY()?t:S(-t),bytes:w(r)}}function k(e){(0,c.aInRange)("x",e,h,l);const t=E(e*e);let n=m(E(t*e+BigInt(7)));n%p!==g&&(n=E(-n));const r=new A(e,n,h);return r.assertValidity(),r}const C=c.bytesToNumberBE;function P(...e){return S(C(v("BIP0340/challenge",...e)))}function O(e){return T(e).bytes}function I(e,t,n=(0,i.randomBytes)(32)){const r=(0,c.ensureBytes)("message",e),{bytes:s,scalar:o}=T(t),a=(0,c.ensureBytes)("auxRand",n,32),u=x(o^C(v("BIP0340/aux",a))),l=v("BIP0340/nonce",u,s,r),d=S(C(l));if(d===g)throw new Error("sign failed: k is zero");const{bytes:h,scalar:p}=T(d),f=P(h,s,r),m=new Uint8Array(64);if(m.set(h,0),m.set(x(S(p+f*o)),32),!M(m,r,s))throw new Error("sign: Invalid signature produced");return m}function M(e,t,n){const r=(0,c.ensureBytes)("signature",e,64),i=(0,c.ensureBytes)("message",t),s=(0,c.ensureBytes)("publicKey",n,32);try{const e=k(C(s)),t=C(r.subarray(0,32));if(!(0,c.inRange)(t,h,l))return!1;const n=C(r.subarray(32,64));if(!(0,c.inRange)(n,h,d))return!1;const o=P(x(t),w(e),i),a=_(e,n,S(-o));return!(!a||!a.hasEvenY()||a.toAffine().x!==t)}catch(e){return!1}}n.schnorr={getPublicKey:O,sign:I,verify:M,utils:{randomPrivateKey:n.secp256k1.utils.randomPrivateKey,lift_x:k,pointToBytes:w,numberToBytesBE:c.numberToBytesBE,bytesToNumberBE:c.bytesToNumberBE,taggedHash:v,mod:a.mod}};const j=(()=>(0,o.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),R=(()=>(0,u.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}))(),B=(()=>(0,o.createHasher)(n.secp256k1.ProjectivePoint,(e=>{const{x:t,y:n}=R(y.create(e[0]));return j(t,n)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}))();n.hashToCurve=B.hashToCurve,n.encodeToCurve=B.encodeToCurve},{"./_shortw_utils.js":330,"./abstract/hash-to-curve.js":333,"./abstract/modular.js":334,"./abstract/utils.js":336,"./abstract/weierstrass.js":337,"@noble/hashes/sha256":347,"@noble/hashes/utils":350}],340:[function(e,t,n){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function i(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}Object.defineProperty(n,"__esModule",{value:!0}),n.anumber=r,n.abytes=i,n.ahash=function(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)},n.aexists=function(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")},n.aoutput=function(e,t){i(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}},{}],341:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.HashMD=void 0,n.setBigUint64=s,n.Chi=function(e,t,n){return e&t^~e&n},n.Maj=function(e,t,n){return e&t^e&n^t&n};const r=e("./_assert.js"),i=e("./utils.js");function s(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(n>>i&s),a=Number(n&s),c=r?4:0,u=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+u,a,r)}class o extends i.Hash{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,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){(0,r.aexists)(this);const{view:t,buffer:n,blockLen:s}=this,o=(e=(0,i.toBytes)(e)).length;for(let r=0;r<o;){const a=Math.min(s-this.pos,o-r);if(a!==s)n.set(e.subarray(r,r+a),this.pos),this.pos+=a,r+=a,this.pos===s&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;s<=o-r;r+=s)this.process(t,r)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.aexists)(this),(0,r.aoutput)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:o,isLE:a}=this;let{pos:c}=this;t[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>o-c&&(this.process(n,0),c=0);for(let e=c;e<o;e++)t[e]=0;s(n,o-8,BigInt(8*this.length),a),this.process(n,0);const u=(0,i.createView)(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=l/4,h=this.get();if(d>h.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<d;e++)u.setUint32(4*e,h[e],a)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:s,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=s,r%t&&e.buffer.set(n),e}}n.HashMD=o},{"./_assert.js":340,"./utils.js":350}],342:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.add5L=n.add5H=n.add4H=n.add4L=n.add3H=n.add3L=n.rotlBL=n.rotlBH=n.rotlSL=n.rotlSH=n.rotr32L=n.rotr32H=n.rotrBL=n.rotrBH=n.rotrSL=n.rotrSH=n.shrSL=n.shrSH=n.toBig=void 0,n.fromBig=s,n.split=o,n.add=w;const r=BigInt(2**32-1),i=BigInt(32);function s(e,t=!1){return t?{h:Number(e&r),l:Number(e>>i&r)}:{h:0|Number(e>>i&r),l:0|Number(e&r)}}function o(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:a}=s(e[i],t);[n[i],r[i]]=[o,a]}return[n,r]}const a=(e,t)=>BigInt(e>>>0)<<i|BigInt(t>>>0);n.toBig=a;const c=(e,t,n)=>e>>>n;n.shrSH=c;const u=(e,t,n)=>e<<32-n|t>>>n;n.shrSL=u;const l=(e,t,n)=>e>>>n|t<<32-n;n.rotrSH=l;const d=(e,t,n)=>e<<32-n|t>>>n;n.rotrSL=d;const h=(e,t,n)=>e<<64-n|t>>>n-32;n.rotrBH=h;const p=(e,t,n)=>e>>>n-32|t<<64-n;n.rotrBL=p;const f=(e,t)=>t;n.rotr32H=f;const m=(e,t)=>e;n.rotr32L=m;const y=(e,t,n)=>e<<n|t>>>32-n;n.rotlSH=y;const g=(e,t,n)=>t<<n|e>>>32-n;n.rotlSL=g;const b=(e,t,n)=>t<<n-32|e>>>64-n;n.rotlBH=b;const v=(e,t,n)=>e<<n-32|t>>>64-n;function w(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}n.rotlBL=v;const x=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);n.add3L=x;const E=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;n.add3H=E;const S=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);n.add4L=S;const A=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;n.add4H=A;const _=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);n.add5L=_;const T=(e,t,n,r,i,s)=>t+n+r+i+s+(e/2**32|0)|0;n.add5H=T;const k={fromBig:s,split:o,toBig:a,shrSH:c,shrSL:u,rotrSH:l,rotrSL:d,rotrBH:h,rotrBL:p,rotr32H:f,rotr32L:m,rotlSH:y,rotlSL:g,rotlBH:b,rotlBL:v,add:w,add3L:x,add3H:E,add4L:S,add4H:A,add5H:T,add5L:_};n.default=k},{}],343:[function(e,t,n){arguments[4][104][0].apply(n,arguments)},{dup:104}],344:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hmac=n.HMAC=void 0;const r=e("./_assert.js"),i=e("./utils.js");class s extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.ahash)(e);const n=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(n.length>s?e.create().update(n).digest():n);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return(0,r.aexists)(this),this.iHash.update(e),this}digestInto(e){(0,r.aexists)(this),(0,r.abytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:s,outputLen:o}=this;return e.finished=r,e.destroyed=i,e.blockLen=s,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}n.HMAC=s;n.hmac=(e,t,n)=>new s(e,t).update(n).digest(),n.hmac.create=(e,t)=>new s(e,t)},{"./_assert.js":340,"./utils.js":350}],345:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.pbkdf2=function(e,t,n,r){const{c:i,dkLen:c,DK:u,PRF:l,PRFSalt:d}=o(e,t,n,r);let h;const p=new Uint8Array(4),f=(0,s.createView)(p),m=new Uint8Array(l.outputLen);for(let e=1,t=0;t<c;e++,t+=l.outputLen){const n=u.subarray(t,t+l.outputLen);f.setInt32(0,e,!1),(h=d._cloneInto(h)).update(p).digestInto(m),n.set(m.subarray(0,n.length));for(let e=1;e<i;e++){l._cloneInto(h).update(m).digestInto(m);for(let e=0;e<n.length;e++)n[e]^=m[e]}}return a(l,d,u,h,m)},n.pbkdf2Async=async function(e,t,n,r){const{c:i,dkLen:c,asyncTick:u,DK:l,PRF:d,PRFSalt:h}=o(e,t,n,r);let p;const f=new Uint8Array(4),m=(0,s.createView)(f),y=new Uint8Array(d.outputLen);for(let e=1,t=0;t<c;e++,t+=d.outputLen){const n=l.subarray(t,t+d.outputLen);m.setInt32(0,e,!1),(p=h._cloneInto(p)).update(f).digestInto(y),n.set(y.subarray(0,n.length)),await(0,s.asyncLoop)(i-1,u,(()=>{d._cloneInto(p).update(y).digestInto(y);for(let e=0;e<n.length;e++)n[e]^=y[e]}))}return a(d,h,l,p,y)};const r=e("./_assert.js"),i=e("./hmac.js"),s=e("./utils.js");function o(e,t,n,o){(0,r.ahash)(e);const a=(0,s.checkOpts)({dkLen:32,asyncTick:10},o),{c:c,dkLen:u,asyncTick:l}=a;if((0,r.anumber)(c),(0,r.anumber)(u),(0,r.anumber)(l),c<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const d=(0,s.toBytes)(t),h=(0,s.toBytes)(n),p=new Uint8Array(u),f=i.hmac.create(e,d),m=f._cloneInto().update(h);return{c:c,dkLen:u,asyncTick:l,DK:p,PRF:f,PRFSalt:m}}function a(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}},{"./_assert.js":340,"./hmac.js":344,"./utils.js":350}],346:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ripemd160=n.RIPEMD160=void 0;const r=e("./_md.js"),i=e("./utils.js"),s=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),o=new Uint8Array(new Array(16).fill(0).map(((e,t)=>t)));let a=[o],c=[o.map((e=>(9*e+5)%16))];for(let e=0;e<4;e++)for(let t of[a,c])t.push(t[e].map((e=>s[e])));const u=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),l=a.map(((e,t)=>e.map((e=>u[t][e])))),d=c.map(((e,t)=>e.map((e=>u[t][e])))),h=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),p=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]);function f(e,t,n,r){return 0===e?t^n^r:1===e?t&n|~t&r:2===e?(t|~n)^r:3===e?t&r|n&~r:t^(n|~r)}const m=new Uint32Array(16);class y extends r.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:n,h3:r,h4:i}=this;return[e,t,n,r,i]}set(e,t,n,r,i){this.h0=0|e,this.h1=0|t,this.h2=0|n,this.h3=0|r,this.h4=0|i}process(e,t){for(let n=0;n<16;n++,t+=4)m[n]=e.getUint32(t,!0);let n=0|this.h0,r=n,s=0|this.h1,o=s,u=0|this.h2,y=u,g=0|this.h3,b=g,v=0|this.h4,w=v;for(let e=0;e<5;e++){const t=4-e,x=h[e],E=p[e],S=a[e],A=c[e],_=l[e],T=d[e];for(let t=0;t<16;t++){const r=(0,i.rotl)(n+f(e,s,u,g)+m[S[t]]+x,_[t])+v|0;n=v,v=g,g=0|(0,i.rotl)(u,10),u=s,s=r}for(let e=0;e<16;e++){const n=(0,i.rotl)(r+f(t,o,y,b)+m[A[e]]+E,T[e])+w|0;r=w,w=b,b=0|(0,i.rotl)(y,10),y=o,o=n}}this.set(this.h1+u+b|0,this.h2+g+w|0,this.h3+v+r|0,this.h4+n+o|0,this.h0+s+y|0)}roundClean(){m.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}n.RIPEMD160=y,n.ripemd160=(0,i.wrapConstructor)((()=>new y))},{"./_md.js":341,"./utils.js":350}],347:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha224=n.sha256=n.SHA256=void 0;const r=e("./_md.js"),i=e("./utils.js"),s=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]),o=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class c extends r.HashMD{constructor(){super(64,32,8,!1),this.A=0|o[0],this.B=0|o[1],this.C=0|o[2],this.D=0|o[3],this.E=0|o[4],this.F=0|o[5],this.G=0|o[6],this.H=0|o[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:s,G:o,H:a}=this;return[e,t,n,r,i,s,o,a]}set(e,t,n,r,i,s,o,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)a[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=a[e-15],n=a[e-2],r=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,s=(0,i.rotr)(n,17)^(0,i.rotr)(n,19)^n>>>10;a[e]=s+a[e-7]+r+a[e-16]|0}let{A:n,B:o,C:c,D:u,E:l,F:d,G:h,H:p}=this;for(let e=0;e<64;e++){const t=p+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+(0,r.Chi)(l,d,h)+s[e]+a[e]|0,f=((0,i.rotr)(n,2)^(0,i.rotr)(n,13)^(0,i.rotr)(n,22))+(0,r.Maj)(n,o,c)|0;p=h,h=d,d=l,l=u+t|0,u=c,c=o,o=n,n=t+f|0}n=n+this.A|0,o=o+this.B|0,c=c+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,h=h+this.G|0,p=p+this.H|0,this.set(n,o,c,u,l,d,h,p)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}n.SHA256=c;class u extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}n.sha256=(0,i.wrapConstructor)((()=>new c)),n.sha224=(0,i.wrapConstructor)((()=>new u))},{"./_md.js":341,"./utils.js":350}],348:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shake256=n.shake128=n.keccak_512=n.keccak_384=n.keccak_256=n.keccak_224=n.sha3_512=n.sha3_384=n.sha3_256=n.sha3_224=n.Keccak=void 0,n.keccakP=v;const r=e("./_assert.js"),i=e("./_u64.js"),s=e("./utils.js"),o=[],a=[],c=[],u=BigInt(0),l=BigInt(1),d=BigInt(2),h=BigInt(7),p=BigInt(256),f=BigInt(113);for(let e=0,t=l,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],o.push(2*(5*r+n)),a.push((e+1)*(e+2)/2%64);let i=u;for(let e=0;e<7;e++)t=(t<<l^(t>>h)*f)%p,t&d&&(i^=l<<(l<<BigInt(e))-l);c.push(i)}const[m,y]=(0,i.split)(c,!0),g=(e,t,n)=>n>32?(0,i.rotlBH)(e,t,n):(0,i.rotlSH)(e,t,n),b=(e,t,n)=>n>32?(0,i.rotlBL)(e,t,n):(0,i.rotlSL)(e,t,n);function v(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const r=(t+8)%10,i=(t+2)%10,s=n[i],o=n[i+1],a=g(s,o,1)^n[r],c=b(s,o,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=a,e[t+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){const r=a[n],s=g(t,i,r),c=b(t,i,r),u=o[n];t=e[u],i=e[u+1],e[u]=s,e[u+1]=c}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=m[r],e[1]^=y[r]}n.fill(0)}class w extends s.Hash{constructor(e,t,n,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,r.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,s.u32)(this.state)}keccak(){s.isLE||(0,s.byteSwap32)(this.state32),v(this.state32,this.rounds),s.isLE||(0,s.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(e){(0,r.aexists)(this);const{blockLen:t,state:n}=this,i=(e=(0,s.toBytes)(e)).length;for(let r=0;r<i;){const s=Math.min(t-this.pos,i-r);for(let t=0;t<s;t++)n[this.pos++]^=e[r++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,128&t&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){(0,r.aexists)(this,!1),(0,r.abytes)(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();const s=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+s),r),this.posOut+=s,r+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,r.anumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,r.aoutput)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:s}=this;return e||(e=new w(t,n,r,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=s,e.destroyed=this.destroyed,e}}n.Keccak=w;const x=(e,t,n)=>(0,s.wrapConstructor)((()=>new w(t,e,n)));n.sha3_224=x(6,144,28),n.sha3_256=x(6,136,32),n.sha3_384=x(6,104,48),n.sha3_512=x(6,72,64),n.keccak_224=x(1,144,28),n.keccak_256=x(1,136,32),n.keccak_384=x(1,104,48),n.keccak_512=x(1,72,64);const E=(e,t,n)=>(0,s.wrapXOFConstructorWithOpts)(((r={})=>new w(t,e,void 0===r.dkLen?n:r.dkLen,!0)));n.shake128=E(31,168,16),n.shake256=E(31,136,32)},{"./_assert.js":340,"./_u64.js":342,"./utils.js":350}],349:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha384=n.sha512_256=n.sha512_224=n.sha512=n.SHA384=n.SHA512_256=n.SHA512_224=n.SHA512=void 0;const r=e("./_md.js"),i=e("./_u64.js"),s=e("./utils.js"),[o,a]=(()=>i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),c=new Uint32Array(80),u=new Uint32Array(80);class l extends r.HashMD{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:s,Dh:o,Dl:a,Eh:c,El:u,Fh:l,Fl:d,Gh:h,Gl:p,Hh:f,Hl:m}=this;return[e,t,n,r,i,s,o,a,c,u,l,d,h,p,f,m]}set(e,t,n,r,i,s,o,a,c,u,l,d,h,p,f,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|s,this.Dh=0|o,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|m}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t),u[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|c[e-15],n=0|u[e-15],r=i.default.rotrSH(t,n,1)^i.default.rotrSH(t,n,8)^i.default.shrSH(t,n,7),s=i.default.rotrSL(t,n,1)^i.default.rotrSL(t,n,8)^i.default.shrSL(t,n,7),o=0|c[e-2],a=0|u[e-2],l=i.default.rotrSH(o,a,19)^i.default.rotrBH(o,a,61)^i.default.shrSH(o,a,6),d=i.default.rotrSL(o,a,19)^i.default.rotrBL(o,a,61)^i.default.shrSL(o,a,6),h=i.default.add4L(s,d,u[e-7],u[e-16]),p=i.default.add4H(h,r,l,c[e-7],c[e-16]);c[e]=0|p,u[e]=0|h}let{Ah:n,Al:r,Bh:s,Bl:l,Ch:d,Cl:h,Dh:p,Dl:f,Eh:m,El:y,Fh:g,Fl:b,Gh:v,Gl:w,Hh:x,Hl:E}=this;for(let e=0;e<80;e++){const t=i.default.rotrSH(m,y,14)^i.default.rotrSH(m,y,18)^i.default.rotrBH(m,y,41),S=i.default.rotrSL(m,y,14)^i.default.rotrSL(m,y,18)^i.default.rotrBL(m,y,41),A=m&g^~m&v,_=y&b^~y&w,T=i.default.add5L(E,S,_,a[e],u[e]),k=i.default.add5H(T,x,t,A,o[e],c[e]),C=0|T,P=i.default.rotrSH(n,r,28)^i.default.rotrBH(n,r,34)^i.default.rotrBH(n,r,39),O=i.default.rotrSL(n,r,28)^i.default.rotrBL(n,r,34)^i.default.rotrBL(n,r,39),I=n&s^n&d^s&d,M=r&l^r&h^l&h;x=0|v,E=0|w,v=0|g,w=0|b,g=0|m,b=0|y,({h:m,l:y}=i.default.add(0|p,0|f,0|k,0|C)),p=0|d,f=0|h,d=0|s,h=0|l,s=0|n,l=0|r;const j=i.default.add3L(C,O,M);n=i.default.add3H(j,k,P,I),r=0|j}({h:n,l:r}=i.default.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:s,l:l}=i.default.add(0|this.Bh,0|this.Bl,0|s,0|l)),({h:d,l:h}=i.default.add(0|this.Ch,0|this.Cl,0|d,0|h)),({h:p,l:f}=i.default.add(0|this.Dh,0|this.Dl,0|p,0|f)),({h:m,l:y}=i.default.add(0|this.Eh,0|this.El,0|m,0|y)),({h:g,l:b}=i.default.add(0|this.Fh,0|this.Fl,0|g,0|b)),({h:v,l:w}=i.default.add(0|this.Gh,0|this.Gl,0|v,0|w)),({h:x,l:E}=i.default.add(0|this.Hh,0|this.Hl,0|x,0|E)),this.set(n,r,s,l,d,h,p,f,m,y,g,b,v,w,x,E)}roundClean(){c.fill(0),u.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}n.SHA512=l;class d extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}n.SHA512_224=d;class h extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}n.SHA512_256=h;class p extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}n.SHA384=p,n.sha512=(0,s.wrapConstructor)((()=>new l)),n.sha512_224=(0,s.wrapConstructor)((()=>new d)),n.sha512_256=(0,s.wrapConstructor)((()=>new h)),n.sha384=(0,s.wrapConstructor)((()=>new p))},{"./_md.js":341,"./_u64.js":342,"./utils.js":350}],350:[function(e,t,n){"use strict";
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(n,"__esModule",{value:!0}),n.Hash=n.nextTick=n.byteSwapIfBE=n.isLE=void 0,n.isBytes=function(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name},n.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},n.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},n.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},n.rotr=function(e,t){return e<<32-t|e>>>t},n.rotl=function(e,t){return e<<t|e>>>32-t>>>0},n.byteSwap=s,n.byteSwap32=function(e){for(let t=0;t<e.length;t++)e[t]=s(e[t])},n.bytesToHex=function(e){(0,i.abytes)(e);let t="";for(let n=0;n<e.length;n++)t+=o[e[n]];return t},n.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=c(e.charCodeAt(i)),s=c(e.charCodeAt(i+1));if(void 0===n||void 0===s){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+s}return r},n.asyncLoop=async function(e,t,r){let i=Date.now();for(let s=0;s<e;s++){r(s);const e=Date.now()-i;e>=0&&e<t||(await(0,n.nextTick)(),i+=e)}},n.utf8ToBytes=u,n.toBytes=l,n.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];(0,i.abytes)(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n},n.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},n.wrapConstructor=function(e){const t=t=>e().update(l(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},n.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(l(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(l(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));if(r.crypto&&"function"==typeof r.crypto.randomBytes)return r.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")};const r=e("@noble/hashes/crypto"),i=e("./_assert.js");function s(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],n.byteSwapIfBE=n.isLE?e=>e:e=>s(e);const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const a={_0:48,_9:57,A:65,F:70,a:97,f:102};function c(e){return e>=a._0&&e<=a._9?e-a._0:e>=a.A&&e<=a.F?e-(a.A-10):e>=a.a&&e<=a.f?e-(a.a-10):void 0}function u(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function l(e){return"string"==typeof e&&(e=u(e)),(0,i.abytes)(e),e}n.nextTick=async()=>{};n.Hash=class{clone(){return this._cloneInto()}}},{"./_assert.js":340,"@noble/hashes/crypto":343}],351:[function(e,t,n){"use strict";
/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function r(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function s(...e){const t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map((e=>e.encode)).reduceRight(n,t),decode:e.map((e=>e.decode)).reduce(n,t)}}function o(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 n=e.indexOf(t);if(-1===n)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}}function a(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 c(e,t="="){if(r(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&"string"!=typeof n[0])throw new Error("padding.encode input should be array of strings");for(let e of n)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&"string"!=typeof n[0])throw new Error("padding.encode input should be array of strings");for(let e of n)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let r=n.length;if(r*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function u(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function l(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],c=t*e+a;if(!Number.isSafeInteger(c)||t*e/t!==e||c-a!=t*e)throw new Error("convertRadix: carry overflow");e=c%n;const u=Math.floor(c/n);if(o[s]=u,!Number.isSafeInteger(u)||u*n+e!==c)throw new Error("convertRadix: carry overflow");r&&(u?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(n,"__esModule",{value:!0}),n.bytes=n.stringToBytes=n.str=n.bytesToString=n.hex=n.utf8=n.bech32m=n.bech32=n.base58check=n.createBase58check=n.base58xmr=n.base58xrp=n.base58flickr=n.base58=n.base64urlnopad=n.base64url=n.base64nopad=n.base64=n.base32crockford=n.base32hexnopad=n.base32hex=n.base32nopad=n.base32=n.base16=n.utils=void 0,n.assertNumber=r;const d=(e,t)=>t?d(t,e%t):e,h=(e,t)=>e+(t-d(e,t));function p(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(h(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${h(t,n)}`);let s=0,o=0;const a=2**n-1,c=[];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)c.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&&c.push(s>>>0),c}function f(e){return r(e),{encode:t=>{if(!i(t))throw new Error("radix.encode input should be Uint8Array");return l(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 numbers");return Uint8Array.from(l(t,e,256))}}}function m(e,t=!1){if(r(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(h(8,e)>32||h(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!i(n))throw new Error("radix2.encode input should be Uint8Array");return p(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&"number"!=typeof n[0])throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(p(n,e,8,t))}}}function y(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function g(e,t){if(r(e),"function"!=typeof t)throw new Error("checksum fn should be function");return{encode(n){if(!i(n))throw new Error("checksum.encode: input should be Uint8Array");const r=t(n).slice(0,e),s=new Uint8Array(n.length+e);return s.set(n),s.set(r,n.length),s},decode(n){if(!i(n))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-e),s=t(r).slice(0,e),o=n.slice(-e);for(let t=0;t<e;t++)if(s[t]!==o[t])throw new Error("Invalid checksum");return r}}}n.utils={alphabet:o,chain:s,checksum:g,convertRadix:l,convertRadix2:p,radix:f,radix2:m,join:a,padding:c},n.base16=s(m(4),o("0123456789ABCDEF"),a("")),n.base32=s(m(5),o("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),c(5),a("")),n.base32nopad=s(m(5),o("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),a("")),n.base32hex=s(m(5),o("0123456789ABCDEFGHIJKLMNOPQRSTUV"),c(5),a("")),n.base32hexnopad=s(m(5),o("0123456789ABCDEFGHIJKLMNOPQRSTUV"),a("")),n.base32crockford=s(m(5),o("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),a(""),u((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),n.base64=s(m(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),c(6),a("")),n.base64nopad=s(m(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a("")),n.base64url=s(m(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),c(6),a("")),n.base64urlnopad=s(m(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(""));const b=e=>s(f(58),o(e),a(""));n.base58=b("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),n.base58flickr=b("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),n.base58xrp=b("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const v=[0,2,3,5,6,7,9,10,11];n.base58xmr={encode(e){let t="";for(let r=0;r<e.length;r+=8){const i=e.subarray(r,r+8);t+=n.base58.encode(i).padStart(v[i.length],"1")}return t},decode(e){let t=[];for(let r=0;r<e.length;r+=11){const i=e.slice(r,r+11),s=v.indexOf(i.length),o=n.base58.decode(i);for(let e=0;e<o.length-s;e++)if(0!==o[e])throw new Error("base58xmr: wrong padding");t=t.concat(Array.from(o.slice(o.length-s)))}return Uint8Array.from(t)}};n.createBase58check=e=>s(g(4,(t=>e(e(t)))),n.base58),n.base58check=n.createBase58check;const w=s(o("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),a("")),x=[996825010,642813549,513874426,1027748829,705979059];function E(e){const t=e>>25;let n=(33554431&e)<<5;for(let e=0;e<x.length;e++)1==(t>>e&1)&&(n^=x[e]);return n}function S(e,t,n=1){const r=e.length;let i=1;for(let t=0;t<r;t++){const n=e.charCodeAt(t);if(n<33||n>126)throw new Error(`Invalid prefix (${e})`);i=E(i)^n>>5}i=E(i);for(let t=0;t<r;t++)i=E(i)^31&e.charCodeAt(t);for(let e of t)i=E(i)^e;for(let e=0;e<6;e++)i=E(i);return i^=n,w.encode(p([i%2**30],30,5,!1))}function A(e){const t="bech32"===e?1:734539939,n=m(5),r=n.decode,i=n.encode,s=y(r);function o(e,n,r=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(n instanceof Uint8Array&&(n=Array.from(n)),!Array.isArray(n)||n.length&&"number"!=typeof n[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof n);if(0===e.length)throw new TypeError(`Invalid prefix length ${e.length}`);const i=e.length+7+n.length;if(!1!==r&&i>r)throw new TypeError(`Length ${i} exceeds limit ${r}`);const s=e.toLowerCase(),o=S(s,n,t);return`${s}1${w.encode(n)}${o}`}function a(e,n=90){if("string"!=typeof e)throw new Error("bech32.decode input should be string, not "+typeof e);if(e.length<8||!1!==n&&e.length>n)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${n})`);const r=e.toLowerCase();if(e!==r&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const i=r.lastIndexOf("1");if(0===i||-1===i)throw new Error('Letter "1" must be present between prefix and data only');const s=r.slice(0,i),o=r.slice(i+1);if(o.length<6)throw new Error("Data must be at least 6 characters long");const a=w.decode(o).slice(0,-6),c=S(s,a,t);if(!o.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:s,words:a}}return{encode:o,decode:a,encodeFromBytes:function(e,t){return o(e,i(t))},decodeToBytes:function(e){const{prefix:t,words:n}=a(e,!1);return{prefix:t,words:n,bytes:r(n)}},decodeUnsafe:y(a),fromWords:r,fromWordsUnsafe:s,toWords:i}}n.bech32=A("bech32"),n.bech32m=A("bech32m"),n.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},n.hex=s(m(4),o("0123456789abcdef"),a(""),u((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:n.utf8,hex:n.hex,base16:n.base16,base32:n.base32,base64:n.base64,base64url:n.base64url,base58:n.base58,base58xmr:n.base58xmr},T="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";n.bytesToString=(e,t)=>{if("string"!=typeof e||!_.hasOwnProperty(e))throw new TypeError(T);if(!i(t))throw new TypeError("bytesToString() expects Uint8Array");return _[e].encode(t)},n.str=n.bytesToString;n.stringToBytes=(e,t)=>{if(!_.hasOwnProperty(e))throw new TypeError(T);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return _[e].decode(t)},n.bytes=n.stringToBytes},{}],352:[function(e,t,n){"use strict";var r,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.ParsedMessage=void 0;const s=i(e("apg-js/src/apg-api/api")),o=i(e("apg-js/src/apg-lib/node-exports")),a=e("./utils");class c{static generateApi(){const e=new s.default('\nsign-in-with-ethereum =\n [ scheme "://" ] domain %s" wants you to sign in with your Ethereum account:" LF\n address LF\n LF\n [ statement LF ]\n LF\n %s"URI: " URI LF\n %s"Version: " version LF\n %s"Chain ID: " chain-id LF\n %s"Nonce: " nonce LF\n %s"Issued At: " issued-at\n [ LF %s"Expiration Time: " expiration-time ]\n [ LF %s"Not Before: " not-before ]\n [ LF %s"Request ID: " request-id ]\n [ LF %s"Resources:"\n resources ]\n\ndomain = authority\n\naddress = "0x" 40*40HEXDIG\n ; Must also conform to captilization\n ; checksum encoding specified in EIP-55\n ; where applicable (EOAs).\n\nstatement = 1*( reserved / unreserved / " " )\n ; The purpose is to exclude LF (line breaks).\n\nversion = "1"\n\nnonce = 8*( ALPHA / DIGIT )\n\nissued-at = date-time\nexpiration-time = date-time\nnot-before = date-time\n\nrequest-id = *pchar\n\nchain-id = 1*DIGIT\n ; See EIP-155 for valid CHAIN_IDs.\n\nresources = *( LF resource )\n\nresource = "- " URI\n\n; ------------------------------------------------------------------------------\n; RFC 3986\n\nURI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]\n\nhier-part = "//" authority path-abempty\n / path-absolute\n / path-rootless\n / path-empty\n\nscheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )\n\nauthority = [ userinfo "@" ] host [ ":" port ]\nuserinfo = *( unreserved / pct-encoded / sub-delims / ":" )\nhost = IP-literal / IPv4address / reg-name\nport = *DIGIT\n\nIP-literal = "[" ( IPv6address / IPvFuture ) "]"\n\nIPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )\n\nIPv6address = 6( h16 ":" ) ls32\n / "::" 5( h16 ":" ) ls32\n / [ h16 ] "::" 4( h16 ":" ) ls32\n / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32\n / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32\n / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32\n / [ *4( h16 ":" ) h16 ] "::" ls32\n / [ *5( h16 ":" ) h16 ] "::" h16\n / [ *6( h16 ":" ) h16 ] "::"\n\nh16 = 1*4HEXDIG\nls32 = ( h16 ":" h16 ) / IPv4address\nIPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet\ndec-octet = DIGIT ; 0-9\n / %x31-39 DIGIT ; 10-99\n / "1" 2DIGIT ; 100-199\n / "2" %x30-34 DIGIT ; 200-249\n / "25" %x30-35 ; 250-255\n\nreg-name = *( unreserved / pct-encoded / sub-delims )\n\npath-abempty = *( "/" segment )\npath-absolute = "/" [ segment-nz *( "/" segment ) ]\npath-rootless = segment-nz *( "/" segment )\npath-empty = 0pchar\n\nsegment = *pchar\nsegment-nz = 1*pchar\n\npchar = unreserved / pct-encoded / sub-delims / ":" / "@"\n\nquery = *( pchar / "/" / "?" )\n\nfragment = *( pchar / "/" / "?" )\n\npct-encoded = "%" HEXDIG HEXDIG\n\nunreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"\nreserved = gen-delims / sub-delims\ngen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"\nsub-delims = "!" / "$" / "&" / "\'" / "(" / ")"\n / "*" / "+" / "," / ";" / "="\n\n; ------------------------------------------------------------------------------\n; RFC 3339\n\ndate-fullyear = 4DIGIT\ndate-month = 2DIGIT ; 01-12\ndate-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on\n ; month/year\ntime-hour = 2DIGIT ; 00-23\ntime-minute = 2DIGIT ; 00-59\ntime-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second\n ; rules\ntime-secfrac = "." 1*DIGIT\ntime-numoffset = ("+" / "-") time-hour ":" time-minute\ntime-offset = "Z" / time-numoffset\n\npartial-time = time-hour ":" time-minute ":" time-second\n [time-secfrac]\nfull-date = date-fullyear "-" date-month "-" date-mday\nfull-time = partial-time time-offset\n\ndate-time = full-date "T" full-time\n\n; ------------------------------------------------------------------------------\n; RFC 5234\n\nALPHA = %x41-5A / %x61-7A ; A-Z / a-z\nLF = %x0A\n ; linefeed\nDIGIT = %x30-39\n ; 0-9\nHEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n');if(e.generate(),e.errors.length)throw console.error(e.errorsToAscii()),console.error(e.linesToAscii()),console.log(e.displayAttributeErrors()),new Error("ABNF grammar has errors");return e.toObject()}}r=c,c.grammarObj=r.generateApi();n.ParsedMessage=class{constructor(e){const t=new o.default.parser;t.ast=new o.default.ast;const n=o.default.ids;t.ast.callbacks.scheme=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&0===r&&(s.scheme=o.default.utils.charsToString(t,r,i)),a};t.ast.callbacks.domain=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&(s.domain=o.default.utils.charsToString(t,r,i)),a};t.ast.callbacks.address=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&(s.address=o.default.utils.charsToString(t,r,i)),a};t.ast.callbacks.statement=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&(s.statement=o.default.utils.charsToString(t,r,i)),a};t.ast.callbacks.uri=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&(s.uri||(s.uri=o.default.utils.charsToString(t,r,i))),a};t.ast.callbacks.version=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&(s.version=o.default.utils.charsToString(t,r,i)),a};t.ast.callbacks["chain-id"]=function(e,t,r,i,s){const c=n.SEM_OK;return e===n.SEM_PRE&&(s.chainId=(0,a.parseIntegerNumber)(o.default.utils.charsToString(t,r,i))),c};t.ast.callbacks.nonce=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&(s.nonce=o.default.utils.charsToString(t,r,i)),a};t.ast.callbacks["issued-at"]=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&(s.issuedAt=o.default.utils.charsToString(t,r,i)),a};t.ast.callbacks["expiration-time"]=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&(s.expirationTime=o.default.utils.charsToString(t,r,i)),a};t.ast.callbacks["not-before"]=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&(s.notBefore=o.default.utils.charsToString(t,r,i)),a};t.ast.callbacks["request-id"]=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&(s.requestId=o.default.utils.charsToString(t,r,i)),a};t.ast.callbacks.resources=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_PRE&&(s.resources=o.default.utils.charsToString(t,r,i).slice(3).split("\n- ")),a};const r=t.parse(c.grammarObj,"sign-in-with-ethereum",e);if(!r.success)throw new Error(`Invalid message: ${JSON.stringify(r)}`);const i={};t.ast.translate(i);for(const[e,t]of Object.entries(i))this[e]=t;if(0===this.domain.length)throw new Error("Domain cannot be empty.")}}},{"./utils":354,"apg-js/src/apg-api/api":357,"apg-js/src/apg-lib/node-exports":375}],353:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.ParsedMessage=void 0;const s=e("./abnf");Object.defineProperty(n,"ParsedMessage",{enumerable:!0,get:function(){return s.ParsedMessage}}),i(e("./utils"),n)},{"./abnf":352,"./utils":354}],354:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseIntegerNumber=n.isEIP55Address=void 0;const r=e("@noble/hashes/sha3"),i=e("@noble/hashes/utils");n.isEIP55Address=e=>{if(42!=e.length)return!1;const t=`${e}`.toLowerCase().replace("0x",""),n=(0,i.bytesToHex)((0,r.keccak_256)(t));let s="0x";for(let e=0;e<t.length;e++)parseInt(n[e],16)>=8?s+=t[e].toUpperCase():s+=t[e];return e===s};n.parseIntegerNumber=e=>{const t=parseInt(e);if(isNaN(t))throw new Error("Invalid number.");if(t===1/0)throw new Error("Invalid number.");return t}},{"@noble/hashes/sha3":348,"@noble/hashes/utils":350}],355:[function(e,t,n){"use strict";const{AbortController:r}=globalThis;t.exports={AbortController:r}},{}],356:[function(e,t,n){"use strict";const r=(e,t)=>(...n)=>`[${e(...n)+t}m`,i=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},s=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},o=e=>e,a=(e,t,n)=>[e,t,n],c=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let u;const l=(t,n,r,i)=>{void 0===u&&(u=e("color-convert"));const s=i?10:0,o={};for(const[e,i]of Object.entries(u)){const a="ansi16"===e?"ansi":e;e===n?o[a]=t(r,s):"object"==typeof i&&(o[a]=t(i[n],s))}return o};Object.defineProperty(t,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[n,r]of Object.entries(t)){for(const[n,i]of Object.entries(r))t[n]={open:`[${i[0]}m`,close:`[${i[1]}m`},r[n]=t[n],e.set(i[0],i[1]);Object.defineProperty(t,n,{value:r,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="",t.bgColor.close="",c(t.color,"ansi",(()=>l(r,"ansi16",o,!1))),c(t.color,"ansi256",(()=>l(i,"ansi256",o,!1))),c(t.color,"ansi16m",(()=>l(s,"rgb",a,!1))),c(t.bgColor,"ansi",(()=>l(r,"ansi16",o,!0))),c(t.bgColor,"ansi256",(()=>l(i,"ansi256",o,!0))),c(t.bgColor,"ansi16m",(()=>l(s,"rgb",a,!0))),t}})},{"color-convert":419}],357:[function(e,t,n){t.exports=function(t){const{Buffer:n}=e("buffer"),r="api.js: ",i=this,s=e("../apg-lib/node-exports"),o=e("../apg-conv-api/converter"),a=e("./scanner"),c=new(e("./parser")),{attributes:u,showAttributes:l,showAttributeErrors:d,showRuleDependencies:h}=e("./attributes"),p=e("./show-rules"),f=function(e,t,n){const r=`<span class="${s.style.CLASS_CTRLCHAR}">`,i="</span>",o=`<span class="${s.style.CLASS_NOMATCH}">`,a="</span>";let c,u="";for(;Array.isArray(e)&&0!==e.length;){if("number"!=typeof t)throw new Error("abnfToHtml: beg must be type number");if(t>=e.length)break;c="number"!=typeof n||t+n>=e.length?e.length:t+n;let l=0;for(let n=t;n<c;n+=1){const t=e[n];if(t>=32&&t<=126)switch(1===l?(u+=i,l=0):2===l&&(u+=a,l=0),t){case 32:u+="&nbsp;";break;case 60:u+="&lt;";break;case 62:u+="&gt;";break;case 38:u+="&amp;";break;case 34:u+="&quot;";break;case 39:u+="&#039;";break;case 92:u+="&#092;";break;default:u+=String.fromCharCode(t)}else 9===t||10===t||13===t?(0===l?(u+=r,l=1):2===l&&(u+=a+r,l=1),9===t&&(u+="TAB"),10===t&&(u+="LF"),13===t&&(u+="CR")):(0===l?(u+=o,l=2):1===l&&(u+=i+o,l=2),u+=`\\x${s.utils.charToHex(t)}`)}2===l&&(u+=a),1===l&&(u+=i);break}return u},m=function(e,t,n){let r="";for(let i=t;i<t+n;i+=1){const t=e[i];if(t>=32&&t<=126)r+=String.fromCharCode(t);else switch(t){case 9:r+="\\t";break;case 10:r+="\\n";break;case 13:r+="\\r";break;default:r+="\\unknown"}}return r};let y,g=!1,b=!1,v=!1,w=!1,x=0;if(this.errors=[],n.isBuffer(t))this.chars=o.decode("BINARY",t);else if(Array.isArray(t))this.chars=t.slice();else{if("string"!=typeof t)throw new Error(`${r}input source is not a string, byte Buffer or character array`);this.chars=o.decode("STRING",t)}this.sabnf=o.encode("STRING",this.chars),this.scan=function(e,t){this.lines=a(this.chars,this.errors,e,t),g=!0},this.parse=function(e,t,n){if(!g)throw new Error(`${r}grammar not scanned`);c.syntax(this.chars,this.lines,this.errors,e,t,n),b=!0},this.translate=function(){if(!b)throw new Error(`${r}grammar not scanned and parsed`);const e=c.semantic(this.chars,this.lines,this.errors);0===this.errors.length&&(this.rules=e.rules,this.udts=e.udts,y=e.lineMap,v=!0)},this.attributes=function(){if(!v)throw new Error(`${r}grammar not scanned, parsed and translated`);return x=u(this.rules,this.udts,y,this.errors),w=!0,x},this.generate=function(e){if(this.lines=a(this.chars,this.errors,e),this.errors.length)return;if(c.syntax(this.chars,this.lines,this.errors,e),this.errors.length)return;const t=c.semantic(this.chars,this.lines,this.errors);this.errors.length||(this.rules=t.rules,this.udts=t.udts,y=t.lineMap,x=u(this.rules,this.udts,y,this.errors),w=!0)},this.displayRules=function(e="index"){if(!v)throw new Error(`${r}grammar not scanned, parsed and translated`);return p(this.rules,this.udts,e)},this.displayRuleDependencies=function(e="index"){if(!w)throw new Error(`${r}no attributes - must be preceeded by call to attributes()`);return h(e)},this.displayAttributes=function(e="index"){if(!w)throw new Error(`${r}no attributes - must be preceeded by call to attributes()`);return x&&d(e),l(e)},this.displayAttributeErrors=function(){if(!w)throw new Error(`${r}no attributes - must be preceeded by call to attributes()`);return d()},this.toSource=function(e=void 0){if(!w)throw new Error(`${r}can't generate parser source - must be preceeded by call to attributes()`);if(x)throw new Error(`${r}can't generate parser source - attributes have ${x} errors`);return c.generateSource(this.chars,this.lines,this.rules,this.udts,e)},this.toObject=function(){if(!w)throw new Error(`${r}can't generate parser source - must be preceeded by call to attributes()`);if(x)throw new Error(`${r}can't generate parser source - attributes have ${x} errors`);return c.generateObject(this.sabnf,this.rules,this.udts)},this.errorsToAscii=function(){return function(e,t,n){let r,i,s,o;return r="",e.forEach((e=>{i=t[e.line],r+=`${i.lineNo}: `,r+=`${i.beginChar}: `,r+=e.char-i.beginChar+": ",s=i.beginChar,o=e.char-i.beginChar,r+=m(n,s,o),r+=" >> ",s=e.char,o=i.beginChar+i.length-e.char,r+=m(n,s,o),r+="\n",r+=`${i.lineNo}: `,r+=`${i.beginChar}: `,r+=e.char-i.beginChar+": ",r+="error: ",r+=e.msg,r+="\n"})),r}(this.errors,this.lines,this.chars)},this.errorsToHtml=function(e){return function(e,t,n,r){const[i]=s;let o="";const a=`<span class="${i.CLASS_NOMATCH}">&raquo;</span>`;return o+=`<p><table class="${i.CLASS_GRAMMAR}">\n`,r&&"string"==typeof r&&(o+=`<caption>${r}</caption>\n`),o+="<tr><th>line<br>no.</th><th>line<br>offset</th><th>error<br>offset</th><th><br>text</th></tr>\n",e.forEach((e=>{let r,i,c,u,l,d="",h="";0===t.length?(l=a,i=0):(r=t[e.line],c=r.beginChar,e.char>c&&(d=f(n,c,e.char-c)),c=e.char,u=r.beginChar+r.length,c<u&&(h=f(n,c,u-c)),l=d+a+h,i=e.char-r.beginChar,o+="<tr>",o+=`<td>${e.line}</td><td>${r.beginChar}</td><td>${i}</td><td>${l}</td>`,o+="</tr>\n",o+="<tr>",o+=`<td colspan="3"></td><td>&uarr;:&nbsp;${s.utils.stringToAsciiHtml(e.msg)}</td>`,o+="</tr>\n")})),o+="</table></p>\n",o}(this.errors,this.lines,this.chars,e)},this.linesToAscii=function(){return function(e){let t="Annotated Input Grammar";return e.forEach((e=>{t+="\n",t+=`line no: ${e.lineNo}`,t+=` : char index: ${e.beginChar}`,t+=` : length: ${e.length}`,t+=` : abnf: ${m(i.chars,e.beginChar,e.length)}`})),t+="\n",t}(this.lines)},this.linesToHtml=function(){return function(e){let t="";return t+=`<table class="${s.style.CLASS_GRAMMAR}">\n`,t+="<caption>Annotated Input Grammar</caption>\n",t+="<tr>",t+="<th>line<br>no.</th><th>first<br>char</th><th><br>length</th><th><br>text</th>",t+="</tr>\n",e.forEach((e=>{t+="<tr>",t+=`<td>${e.lineNo}`,t+=`</td><td>${e.beginChar}`,t+=`</td><td>${e.length}`,t+=`</td><td>${f(i.chars,e.beginChar,e.length)}`,t+="</td>",t+="</tr>\n"})),t+="</table>\n",t}(this.lines)}}},{"../apg-conv-api/converter":369,"../apg-lib/node-exports":375,"./attributes":358,"./parser":359,"./scanner":365,"./show-rules":367,buffer:385}],358:[function(e,t,n){t.exports=function(){const t=e("../apg-lib/identifiers"),{ruleAttributes:n,showAttributes:r,showAttributeErrors:i}=e("./rule-attributes"),{ruleDependencies:s,showRuleDependencies:o}=e("./rule-dependencies");class a{constructor(e,t){this.rules=e,this.udts=t,this.ruleCount=e.length,this.udtCount=t.length,this.startRule=0,this.dependenciesComplete=!1,this.attributesComplete=!1,this.isMutuallyRecursive=!1,this.ruleIndexes=this.indexArray(this.ruleCount),this.ruleAlphaIndexes=this.indexArray(this.ruleCount),this.ruleTypeIndexes=this.indexArray(this.ruleCount),this.udtIndexes=this.indexArray(this.udtCount),this.udtAlphaIndexes=this.indexArray(this.udtCount),this.attrsErrorCount=0,this.attrs=[],this.attrsErrors=[],this.attrsWorking=[],this.ruleDeps=[];for(let t=0;t<this.ruleCount;t+=1)this.attrs.push(this.attrGen(this.rules[t])),this.attrsWorking.push(this.attrGen(this.rules[t])),this.ruleDeps.push(this.rdGen(e[t],this.ruleCount,this.udtCount));this.compRulesAlpha=this.compRulesAlpha.bind(this),this.compUdtsAlpha=this.compUdtsAlpha.bind(this),this.compRulesType=this.compRulesType.bind(this),this.compRulesGroup=this.compRulesGroup.bind(this)}attrGen(e){return{left:!1,nested:!1,right:!1,empty:!1,finite:!1,cyclic:!1,leaf:!1,isOpen:!1,isComplete:!1,rule:e}}attrInit(e){e.left=!1,e.nested=!1,e.right=!1,e.empty=!1,e.finite=!1,e.cyclic=!1,e.leaf=!1,e.isOpen=!1,e.isComplete=!1}attrCopy(e,t){e.left=t.left,e.nested=t.nested,e.right=t.right,e.empty=t.empty,e.finite=t.finite,e.cyclic=t.cyclic,e.leaf=t.leaf,e.isOpen=t.isOpen,e.isComplete=t.isComplete,e.rule=t.rule}rdGen(e,n,r){return{rule:e,recursiveType:t.ATTR_N,groupNumber:-1,refersTo:this.falseArray(n),refersToUdt:this.falseArray(r),referencedBy:this.falseArray(n)}}typeToString(e){switch(e){case t.ATTR_N:return" N";case t.ATTR_R:return" R";case t.ATTR_MR:return"MR";default:return"UNKNOWN"}}falseArray(e){const t=[];if(e>0)for(let n=0;n<e;n+=1)t.push(!1);return t}falsifyArray(e){for(let t=0;t<e.length;t+=1)e[t]=!1}indexArray(e){const t=[];if(e>0)for(let n=0;n<e;n+=1)t.push(n);return t}compRulesAlpha(e,t){return this.rules[e].lower<this.rules[t].lower?-1:this.rules[e].lower>this.rules[t].lower?1:0}compUdtsAlpha(e,t){return this.udts[e].lower<this.udts[t].lower?-1:this.udts[e].lower>this.udts[t].lower?1:0}compRulesType(e,t){return this.ruleDeps[e].recursiveType<this.ruleDeps[t].recursiveType?-1:this.ruleDeps[e].recursiveType>this.ruleDeps[t].recursiveType?1:0}compRulesGroup(e,n){if(this.ruleDeps[e].recursiveType===t.ATTR_MR&&this.ruleDeps[n].recursiveType===t.ATTR_MR){if(this.ruleDeps[e].groupNumber<this.ruleDeps[n].groupNumber)return-1;if(this.ruleDeps[e].groupNumber>this.ruleDeps[n].groupNumber)return 1}return 0}}return{attributes:function(e=[],t=[],r=[],i=[]){const o=new a(e,t);return s(o),n(o),o.attrsErrorCount&&i.push({line:0,char:0,msg:`${o.attrsErrorCount} attribute errors`}),o.attrsErrorCount},showAttributes:r,showAttributeErrors:i,showRuleDependencies:o}}()},{"../apg-lib/identifiers":374,"./rule-attributes":360,"./rule-dependencies":361}],359:[function(e,t,n){t.exports=function(){const t=e("../apg-lib/node-exports"),n=t.ids,r=new(e("./syntax-callbacks")),i=new(e("./semantic-callbacks")),s=new(e("./sabnf-grammar")),o=new t.parser;o.ast=new t.ast,o.callbacks=r.callbacks,o.ast.callbacks=i.callbacks;const a=function(e,t,n){if(t<0||t>=n)return-1;for(let n=0;n<e.length;n+=1)if(t>=e[n].beginChar&&t<e[n].beginChar+e[n].length)return n;return-1},c=function(e,t){let n=-1;if(t<e.length)for(let r=t;r<e.length;r+=1)if(null!==e[r]){n=e[r];break}return n};this.syntax=function(e,t,n,r,i,c){if(c){if("traceObject"!==c.traceObject)throw new TypeError("parser: trace argument is not a trace object");o.trace=c}const u={};u.errors=n,u.strict=!!r,u.lite=!!i,u.lines=t,u.findLine=a,u.charsLength=e.length,u.ruleCount=0;o.parse(s,"file",e,u).success||n.push({line:0,char:0,msg:"syntax analysis of input grammar failed"})},this.semantic=function(e,t,r){const i={};return i.errors=r,i.lines=t,i.findLine=a,i.charsLength=e.length,o.ast.translate(i),r.length?null:(i.rules.forEach((e=>{const t=[],r=[];let i=0;e.opcodes.forEach((e=>{e.type===n.ALT&&1===e.children.length||e.type===n.CAT&&1===e.children.length||e.type===n.REP&&1===e.min&&1===e.max?r.push(null):(r.push(i),t.push(e),i+=1)})),r.push(i),t.forEach((e=>{if(e.type===n.ALT||e.type===n.CAT)for(let t=0;t<e.children.length;t+=1)e.children[t]=c(r,e.children[t])})),e.opcodes=t})),{rules:i.rules,udts:i.udts,lineMap:i.rulesLineMap})},this.generateSource=function(e,t,r,i,s){let o,a,c,u="",l=!1,d=!1;s&&(s.typescript?(l=!0,d=!1):s.lite&&(l=!1,d=!0));let h=0,p=1/0,f=0;const m=[],y=[];let g,b=0,v=0,w=0,x=0,E=0,S=0,A=0,_=0,T=0,k=0,C=0,P=0,O=0,I=0,M=0;return r.forEach((e=>{m.push(e.lower),h+=e.opcodes.length,e.opcodes.forEach((e=>{switch(e.type){case n.ALT:b+=1;break;case n.CAT:v+=1;break;case n.RNM:w+=1;break;case n.UDT:x+=1;break;case n.REP:E+=1;break;case n.AND:S+=1;break;case n.NOT:A+=1;break;case n.BKA:P+=1;break;case n.BKN:O+=1;break;case n.BKR:C+=1;break;case n.ABG:I+=1;break;case n.AEN:M+=1;break;case n.TLS:for(_+=1,o=0;o<e.string.length;o+=1)e.string[o]<p&&(p=e.string[o]),e.string[o]>f&&(f=e.string[o]);break;case n.TBS:for(T+=1,o=0;o<e.string.length;o+=1)e.string[o]<p&&(p=e.string[o]),e.string[o]>f&&(f=e.string[o]);break;case n.TRG:k+=1,e.min<p&&(p=e.min),e.max>f&&(f=e.max);break;default:throw new Error("generateSource: unrecognized opcode")}}))})),m.sort(),i.length>0&&(i.forEach((e=>{y.push(e.lower)})),y.sort()),u+="// copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved<br>\n",u+="// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br>\n",u+="//\n",u+="// Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)\n",s?s.funcName?u+=`const ${s.funcName} = function grammar(){\n`:u+=l?"export function grammar(){\n":d?"export default function grammar(){\n":"module.exports = function grammar(){\n":u+="module.exports = function grammar(){\n",u+=" // ```\n",u+=" // SUMMARY\n",u+=` // rules = ${r.length}\n`,u+=` // udts = ${i.length}\n`,u+=` // opcodes = ${h}\n`,u+=" // --- ABNF original opcodes\n",u+=` // ALT = ${b}\n`,u+=` // CAT = ${v}\n`,u+=` // REP = ${E}\n`,u+=` // RNM = ${w}\n`,u+=` // TLS = ${_}\n`,u+=` // TBS = ${T}\n`,u+=` // TRG = ${k}\n`,u+=" // --- SABNF superset opcodes\n",u+=` // UDT = ${x}\n`,u+=` // AND = ${S}\n`,u+=` // NOT = ${A}\n`,d||(u+=` // BKA = ${P}\n`,u+=` // BKN = ${O}\n`,u+=` // BKR = ${C}\n`,u+=` // ABG = ${I}\n`,u+=` // AEN = ${M}\n`),u+=" // characters = [",u+=_+T+k===0?" none defined ]":`${p} - ${f}]`,x>0&&(u+=" + user defined"),u+="\n",u+=" // ```\n",u+=" /* OBJECT IDENTIFIER (for internal parser use) */\n",u+=" this.grammarObject = 'grammarObject';\n",u+="\n",u+=" /* RULES */\n",u+=" this.rules = [];\n",r.forEach(((e,t)=>{let n=" this.rules[";n+=t,n+="] = { name: '",n+=e.name,n+="', lower: '",n+=e.lower,n+="', index: ",n+=e.index,n+=", isBkr: ",n+=e.isBkr,n+=" };\n",u+=n})),u+="\n",u+=" /* UDTS */\n",u+=" this.udts = [];\n",i.length>0&&i.forEach(((e,t)=>{let n=" this.udts[";n+=t,n+="] = { name: '",n+=e.name,n+="', lower: '",n+=e.lower,n+="', index: ",n+=e.index,n+=", empty: ",n+=e.empty,n+=", isBkr: ",n+=e.isBkr,n+=" };\n",u+=n})),u+="\n",u+=" /* OPCODES */\n",r.forEach(((e,t)=>{t>0&&(u+="\n"),u+=` /* ${e.name} */\n`,u+=` this.rules[${t}].opcodes = [];\n`,e.opcodes.forEach(((e,s)=>{let o;switch(e.type){case n.ALT:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type}, children: [${e.children.toString()}] };// ALT\n`;break;case n.CAT:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type}, children: [${e.children.toString()}] };// CAT\n`;break;case n.RNM:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type}, index: ${e.index} };// RNM(${r[e.index].name})\n`;break;case n.BKR:e.index>=r.length?(a=i[e.index-r.length].name,c=i[e.index-r.length].lower):(a=r[e.index].name,c=r[e.index].lower),o="%i",e.bkrCase===n.BKR_MODE_CS&&(o="%s"),e.bkrMode===n.BKR_MODE_UM?o+="%u":o+="%p",a=o+a,u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type}, index: ${e.index}, lower: '${c}', bkrCase: ${e.bkrCase}, bkrMode: ${e.bkrMode} };// BKR(\\${a})\n`;break;case n.UDT:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type}, empty: ${e.empty}, index: ${e.index} };// UDT(${i[e.index].name})\n`;break;case n.REP:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type}, min: ${e.min}, max: ${e.max} };// REP\n`;break;case n.AND:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type} };// AND\n`;break;case n.NOT:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type} };// NOT\n`;break;case n.ABG:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type} };// ABG(%^)\n`;break;case n.AEN:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type} };// AEN(%$)\n`;break;case n.BKA:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type} };// BKA\n`;break;case n.BKN:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type} };// BKN\n`;break;case n.TLS:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type}, string: [${e.string.toString()}] };// TLS\n`;break;case n.TBS:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type}, string: [${e.string.toString()}] };// TBS\n`;break;case n.TRG:u+=` this.rules[${t}].opcodes[${s}] = { type: ${e.type}, min: ${e.min}, max: ${e.max} };// TRG\n`;break;default:throw new Error("parser.js: ~143: unrecognized opcode")}}))})),u+="\n",u+=" // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n",u+=" this.toString = function toString(){\n",u+=' let str = "";\n',t.forEach((t=>{const n=t.beginChar+t.length;g="",u+=' str += "';for(let r=t.beginChar;r<n;r+=1){switch(e[r]){case 9:g=" ";break;case 10:g="\\n";break;case 13:g="\\r";break;case 34:g='\\"';break;case 92:g="\\\\";break;default:g=String.fromCharCode(e[r])}u+=g}u+='";\n'})),u+=" return str;\n",u+=" }\n",u+="}\n",u},this.generateObject=function(e,t,n){const r={},i=[],s=[],o=e.slice(0);return r.grammarObject="grammarObject",t.forEach((e=>{i.push(e.lower)})),i.sort(),n.length>0&&(n.forEach((e=>{s.push(e.lower)})),s.sort()),r.callbacks=[],i.forEach((e=>{r.callbacks[e]=!1})),n.length>0&&s.forEach((e=>{r.callbacks[e]=!1})),r.rules=t,r.udts=n,r.toString=function(){return o},r}}},{"../apg-lib/node-exports":375,"./sabnf-grammar":362,"./semantic-callbacks":366,"./syntax-callbacks":368}],360:[function(e,t,n){t.exports=function(){const t=e("../apg-lib/identifiers");let n=null;function r(e){return!(e.left||e.nested||e.right||e.cyclic)&&e.empty}function i(e){return!!(e.left||e.nested||e.right||e.cyclic)}function s(e,t,n,s){let a=0;const c=t[n],u=c.children.length,l=[];for(a=0;a<u;a+=1)l.push(e.attrGen());for(a=0;a<u;a+=1)o(e,t,c.children[a],l[a]);s.left=function(e,t){for(let n=0;n<t;n+=1){if(e[n].left)return!0;if(!e[n].empty)return!1}return!1}(l,u),s.right=function(e,t){for(let n=t-1;n>=0;n-=1){if(e[n].right)return!0;if(!e[n].empty)return!1}return!1}(l,u),s.nested=function(e,t){let n=0,s=0,o=0;for(n=0;n<t;n+=1)if(e[n].nested)return!0;for(n=0;n<t;n+=1)if(e[n].right&&!e[n].leaf)for(s=n+1;s<t;s+=1)if(!r(e[s]))return!0;for(n=t-1;n>=0;n-=1)if(e[n].left&&!e[n].leaf)for(s=n-1;s>=0;s-=1)if(!r(e[s]))return!0;for(n=0;n<t;n+=1)if(!e[n].empty&&!i(e[n]))for(s=n+1;s<t;s+=1)if(i(e[s]))for(o=s+1;o<t;o+=1)if(!e[o].empty&&!i(e[o]))return!0;return!1}(l,u),s.empty=function(e,t){for(let n=0;n<t;n+=1)if(!e[n].empty)return!1;return!0}(l,u),s.finite=function(e,t){for(let n=0;n<t;n+=1)if(!e[n].finite)return!1;return!0}(l,u),s.cyclic=function(e,t){for(let n=0;n<t;n+=1)if(!e[n].cyclic)return!1;return!0}(l,u)}function o(e,n,r,i){e.attrInit(i);const c=n[r];switch(c.type){case t.ALT:!function(e,t,n,r){let i=0;const s=t[n],a=s.children.length,c=[];for(i=0;i<a;i+=1)c.push(e.attrGen());for(i=0;i<a;i+=1)o(e,t,s.children[i],c[i]);for(r.left=!1,r.right=!1,r.nested=!1,r.empty=!1,r.finite=!1,r.cyclic=!1,i=0;i<a;i+=1)c[i].left&&(r.left=!0),c[i].nested&&(r.nested=!0),c[i].right&&(r.right=!0),c[i].empty&&(r.empty=!0),c[i].finite&&(r.finite=!0),c[i].cyclic&&(r.cyclic=!0)}(e,n,r,i);break;case t.CAT:s(e,n,r,i);break;case t.REP:o(e,n,r+1,i),0===c.min&&(i.empty=!0,i.finite=!0);break;case t.RNM:a(e,n[r].index,i);break;case t.BKR:!function(e,t,n,r){const i=t[n];i.index>=e.ruleCount?(r.empty=e.udts[i.index-e.ruleCount].empty,r.finite=!0):(a(e,i.index,r),r.left=!1,r.nested=!1,r.right=!1,r.cyclic=!1)}(e,n,r,i);break;case t.AND:case t.NOT:case t.BKA:case t.BKN:o(e,n,r+1,i),i.empty=!0;break;case t.TLS:i.empty=!n[r].string.length,i.finite=!0,i.cyclic=!1;break;case t.TBS:case t.TRG:i.empty=!1,i.finite=!0,i.cyclic=!1;break;case t.UDT:i.empty=c.empty,i.finite=!0,i.cyclic=!1;break;case t.ABG:case t.AEN:i.empty=!0,i.finite=!0,i.cyclic=!1;break;default:throw new Error(`unknown opcode type: ${c}`)}}function a(e,t,n){const r=e.attrsWorking[t];r.isComplete?e.attrCopy(n,r):r.isOpen?t===e.startRule?t===e.startRule&&(n.left=!0,n.right=!0,n.cyclic=!0,n.leaf=!0):n.finite=!0:(r.isOpen=!0,o(e,r.rule.opcodes,0,n),r.left=n.left,r.right=n.right,r.nested=n.nested,r.empty=n.empty,r.finite=n.finite,r.cyclic=n.cyclic,r.leaf=!1,r.isOpen=!1,r.isComplete=!0)}const c=e=>e?"t":"f",u=e=>e?"e":"f",l=(e,r,i,s)=>{let o=`${e}:${r}:`;return o+=`${u(i.left)} `,o+=`${c(i.nested)} `,o+=`${c(i.right)} `,o+=`${u(i.cyclic)} `,o+=`${(e=>e?"t":"e")(i.finite)} `,o+=`${c(i.empty)}:`,o+=`${n.typeToString(s.recursiveType)}:`,o+=s.recursiveType===t.ATTR_MR?s.groupNumber:"-",o+=`:${i.rule.name}\n`,o},d=()=>{let e="LEGEND - t=true, f=false, e=error\n";return e+="sequence:rule index:left nested right cyclic finite empty:type:group number:rule name\n","LEGEND - t=true, f=false, e=error\nsequence:rule index:left nested right cyclic finite empty:type:group number:rule name\n"},h=e=>{let t=0,r=0,i=null,s=null,o="",{ruleIndexes:a}=n;for(97===e?a=n.ruleAlphaIndexes:116===e&&(a=n.ruleTypeIndexes),t=0;t<n.ruleCount;t+=1)r=a[t],i=n.attrs[r],s=n.ruleDeps[r],o+=l(t,r,i,s);return o};return{ruleAttributes:e=>{n=e;let t=0,r=0;const i=n.attrGen();for(t=0;t<n.ruleCount;t+=1){for(r=0;r<n.ruleCount;r+=1)n.attrInit(n.attrsWorking[r]);n.startRule=t,a(n,t,i),n.attrCopy(n.attrs[t],n.attrsWorking[t])}n.attributesComplete=!0;let s=null;for(t=0;t<n.ruleCount;t+=1)if(s=n.attrs[t],s.left||!s.finite||s.cyclic){const e=n.attrGen(s.rule);n.attrCopy(e,s),n.attrsErrors.push(e),n.attrsErrorCount+=1}},showAttributes:(e="index")=>{if(!n.attributesComplete)throw new Error("rule-attributes.js:showAttributes: attributes not available");let t="";const r="RULE ATTRIBUTES\n";return 97===e.charCodeAt(0)?(t+="alphabetical by rule name\n",t+=r,t+=d(),t+=h(97)):116===e.charCodeAt(0)?(t+="ordered by rule type\n",t+=r,t+=d(),t+=h(116)):(t+="ordered by rule index\n",t+=r,t+=d(),t+=h()),t},showAttributeErrors:()=>{let e=null,t=null,r="";if(r+="RULE ATTRIBUTES WITH ERRORS\n",r+=d(),n.attrsErrorCount)for(let i=0;i<n.attrsErrorCount;i+=1)e=n.attrsErrors[i],t=n.ruleDeps[e.rule.index],r+=l(i,e.rule.index,e,t);else r+="<none>\n";return r}}}()},{"../apg-lib/identifiers":374}],361:[function(e,t,n){t.exports=(()=>{const t=e("../apg-lib/identifiers");let n=null;const r=(e,n,i,s)=>{let o=0,a=0;const c=n[i];s[i]=!0;const u=c.rule.opcodes;for(o=0;o<u.length;o+=1){const i=u[o];if(i.type===t.RNM)for(c.refersTo[i.index]=!0,s[i.index]||r(e,n,i.index,s),a=0;a<e;a+=1)n[i.index].refersTo[a]&&(c.refersTo[a]=!0);else i.type===t.UDT?c.refersToUdt[i.index]=!0:i.type===t.BKR&&(i.index<e?(c.refersTo[i.index]=!0,s[i.index]||r(e,n,i.index,s)):c.refersToUdt[e-i.index]=!0)}},i=(e=null)=>{let t=0,r=0,i=0,s=0;const o=n.ruleCount-1,a=n.udtCount-1;let c="",u="";const l="=> ";let d=!1,h=null,{ruleIndexes:p}=n,{udtIndexes:f}=n;for(97===e?(p=n.ruleAlphaIndexes,f=n.udtAlphaIndexes):116===e&&(p=n.ruleTypeIndexes,f=n.udtAlphaIndexes),t=0;t<n.ruleCount;t+=1){for(h=n.ruleDeps[p[t]],u=`${p[t]}:${n.typeToString(h.recursiveType)}:`,n.isMutuallyRecursive&&(u+=h.groupNumber>-1?h.groupNumber:"-",u+=":"),u+=" ",c+=`${u+n.rules[p[t]].name}\n`,d=!0,i=0,s=c.length,c+=u,r=0;r<n.ruleCount;r+=1)h.refersTo[p[r]]&&(d?(c+=l,d=!1,c+=n.ruleDeps[p[r]].rule.name):c+=`, ${n.ruleDeps[p[r]].rule.name}`,i+=1),c.length-s>100&&r!==o&&(c+=`\n${u}${l}`,s=c.length);if(n.udtCount)for(r=0;r<n.udtCount;r+=1)h.refersToUdt[f[r]]&&(d?(c+=l,d=!1,c+=n.udts[f[r]].name):c+=`, ${n.udts[f[r]].name}`,i+=1),c.length-s>100&&r!==a&&(c+=`\n${u}${l}`,s=c.length);for(0===i&&(c+="=> <none>\n"),!1===d&&(c+="\n"),d=!0,i=0,s=c.length,c+=u,r=0;r<n.ruleCount;r+=1)h.referencedBy[p[r]]&&(d?(c+="<= ",d=!1,c+=n.ruleDeps[p[r]].rule.name):c+=`, ${n.ruleDeps[p[r]].rule.name}`,i+=1),c.length-s>100&&r!==o&&(c+=`\n${u}${l}`,s=c.length);0===i&&(c+="<= <none>\n"),!1===d&&(c+="\n"),c+="\n"}return c};return{ruleDependencies:e=>{n=e;let i=0,s=0,o=0,a=null,c=null,u=!1;n.dependenciesComplete=!1;const l=n.falseArray(n.ruleCount);for(i=0;i<n.ruleCount;i+=1)n.falsifyArray(l),r(n.ruleCount,n.ruleDeps,i,l);for(i=0;i<n.ruleCount;i+=1)for(s=0;s<n.ruleCount;s+=1)i!==s&&n.ruleDeps[s].refersTo[i]&&(n.ruleDeps[i].referencedBy[s]=!0);for(i=0;i<n.ruleCount;i+=1)n.ruleDeps[i].recursiveType=t.ATTR_N,n.ruleDeps[i].refersTo[i]&&(n.ruleDeps[i].recursiveType=t.ATTR_R);for(o=-1,i=0;i<n.ruleCount;i+=1)if(a=n.ruleDeps[i],a.recursiveType===t.ATTR_R)for(u=!0,s=0;s<n.ruleCount;s+=1)i!==s&&(c=n.ruleDeps[s],c.recursiveType===t.ATTR_R&&a.refersTo[s]&&c.refersTo[i]&&(u&&(o+=1,a.recursiveType=t.ATTR_MR,a.groupNumber=o,u=!1),c.recursiveType=t.ATTR_MR,c.groupNumber=o));n.isMutuallyRecursive=o>-1,n.ruleAlphaIndexes.sort(n.compRulesAlpha),n.ruleTypeIndexes.sort(n.compRulesAlpha),n.ruleTypeIndexes.sort(n.compRulesType),n.isMutuallyRecursive&&n.ruleTypeIndexes.sort(n.compRulesGroup),n.udtCount&&n.udtAlphaIndexes.sort(n.compUdtsAlpha),n.dependenciesComplete=!0},showRuleDependencies:(e="index")=>{let t="RULE DEPENDENCIES(index:type:[group number:])\n";return t+="=> refers to rule names\n",t+="<= referenced by rule names\n",n.dependenciesComplete?(97===e.charCodeAt(0)?(t+="alphabetical by rule name\n",t+=i(97)):116===e.charCodeAt(0)?(t+="ordered by rule type\n",t+=i(116)):(t+="ordered by rule index\n",t+=i(null)),t):t}}})()},{"../apg-lib/identifiers":374}],362:[function(e,t,n){t.exports=function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"File",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"BlankLine",lower:"blankline",index:1,isBkr:!1},this.rules[2]={name:"Rule",lower:"rule",index:2,isBkr:!1},this.rules[3]={name:"RuleLookup",lower:"rulelookup",index:3,isBkr:!1},this.rules[4]={name:"RuleNameTest",lower:"rulenametest",index:4,isBkr:!1},this.rules[5]={name:"RuleName",lower:"rulename",index:5,isBkr:!1},this.rules[6]={name:"RuleNameError",lower:"rulenameerror",index:6,isBkr:!1},this.rules[7]={name:"DefinedAsTest",lower:"definedastest",index:7,isBkr:!1},this.rules[8]={name:"DefinedAsError",lower:"definedaserror",index:8,isBkr:!1},this.rules[9]={name:"DefinedAs",lower:"definedas",index:9,isBkr:!1},this.rules[10]={name:"Defined",lower:"defined",index:10,isBkr:!1},this.rules[11]={name:"IncAlt",lower:"incalt",index:11,isBkr:!1},this.rules[12]={name:"RuleError",lower:"ruleerror",index:12,isBkr:!1},this.rules[13]={name:"LineEndError",lower:"lineenderror",index:13,isBkr:!1},this.rules[14]={name:"Alternation",lower:"alternation",index:14,isBkr:!1},this.rules[15]={name:"Concatenation",lower:"concatenation",index:15,isBkr:!1},this.rules[16]={name:"Repetition",lower:"repetition",index:16,isBkr:!1},this.rules[17]={name:"Modifier",lower:"modifier",index:17,isBkr:!1},this.rules[18]={name:"Predicate",lower:"predicate",index:18,isBkr:!1},this.rules[19]={name:"BasicElement",lower:"basicelement",index:19,isBkr:!1},this.rules[20]={name:"BasicElementErr",lower:"basicelementerr",index:20,isBkr:!1},this.rules[21]={name:"Group",lower:"group",index:21,isBkr:!1},this.rules[22]={name:"GroupError",lower:"grouperror",index:22,isBkr:!1},this.rules[23]={name:"GroupOpen",lower:"groupopen",index:23,isBkr:!1},this.rules[24]={name:"GroupClose",lower:"groupclose",index:24,isBkr:!1},this.rules[25]={name:"Option",lower:"option",index:25,isBkr:!1},this.rules[26]={name:"OptionError",lower:"optionerror",index:26,isBkr:!1},this.rules[27]={name:"OptionOpen",lower:"optionopen",index:27,isBkr:!1},this.rules[28]={name:"OptionClose",lower:"optionclose",index:28,isBkr:!1},this.rules[29]={name:"RnmOp",lower:"rnmop",index:29,isBkr:!1},this.rules[30]={name:"BkrOp",lower:"bkrop",index:30,isBkr:!1},this.rules[31]={name:"bkrModifier",lower:"bkrmodifier",index:31,isBkr:!1},this.rules[32]={name:"cs",lower:"cs",index:32,isBkr:!1},this.rules[33]={name:"ci",lower:"ci",index:33,isBkr:!1},this.rules[34]={name:"um",lower:"um",index:34,isBkr:!1},this.rules[35]={name:"pm",lower:"pm",index:35,isBkr:!1},this.rules[36]={name:"bkr-name",lower:"bkr-name",index:36,isBkr:!1},this.rules[37]={name:"rname",lower:"rname",index:37,isBkr:!1},this.rules[38]={name:"uname",lower:"uname",index:38,isBkr:!1},this.rules[39]={name:"ename",lower:"ename",index:39,isBkr:!1},this.rules[40]={name:"UdtOp",lower:"udtop",index:40,isBkr:!1},this.rules[41]={name:"udt-non-empty",lower:"udt-non-empty",index:41,isBkr:!1},this.rules[42]={name:"udt-empty",lower:"udt-empty",index:42,isBkr:!1},this.rules[43]={name:"RepOp",lower:"repop",index:43,isBkr:!1},this.rules[44]={name:"AltOp",lower:"altop",index:44,isBkr:!1},this.rules[45]={name:"CatOp",lower:"catop",index:45,isBkr:!1},this.rules[46]={name:"StarOp",lower:"starop",index:46,isBkr:!1},this.rules[47]={name:"AndOp",lower:"andop",index:47,isBkr:!1},this.rules[48]={name:"NotOp",lower:"notop",index:48,isBkr:!1},this.rules[49]={name:"BkaOp",lower:"bkaop",index:49,isBkr:!1},this.rules[50]={name:"BknOp",lower:"bknop",index:50,isBkr:!1},this.rules[51]={name:"AbgOp",lower:"abgop",index:51,isBkr:!1},this.rules[52]={name:"AenOp",lower:"aenop",index:52,isBkr:!1},this.rules[53]={name:"TrgOp",lower:"trgop",index:53,isBkr:!1},this.rules[54]={name:"TbsOp",lower:"tbsop",index:54,isBkr:!1},this.rules[55]={name:"TlsOp",lower:"tlsop",index:55,isBkr:!1},this.rules[56]={name:"TlsCase",lower:"tlscase",index:56,isBkr:!1},this.rules[57]={name:"TlsOpen",lower:"tlsopen",index:57,isBkr:!1},this.rules[58]={name:"TlsClose",lower:"tlsclose",index:58,isBkr:!1},this.rules[59]={name:"TlsString",lower:"tlsstring",index:59,isBkr:!1},this.rules[60]={name:"StringTab",lower:"stringtab",index:60,isBkr:!1},this.rules[61]={name:"ClsOp",lower:"clsop",index:61,isBkr:!1},this.rules[62]={name:"ClsOpen",lower:"clsopen",index:62,isBkr:!1},this.rules[63]={name:"ClsClose",lower:"clsclose",index:63,isBkr:!1},this.rules[64]={name:"ClsString",lower:"clsstring",index:64,isBkr:!1},this.rules[65]={name:"ProsVal",lower:"prosval",index:65,isBkr:!1},this.rules[66]={name:"ProsValOpen",lower:"prosvalopen",index:66,isBkr:!1},this.rules[67]={name:"ProsValString",lower:"prosvalstring",index:67,isBkr:!1},this.rules[68]={name:"ProsValClose",lower:"prosvalclose",index:68,isBkr:!1},this.rules[69]={name:"rep-min",lower:"rep-min",index:69,isBkr:!1},this.rules[70]={name:"rep-min-max",lower:"rep-min-max",index:70,isBkr:!1},this.rules[71]={name:"rep-max",lower:"rep-max",index:71,isBkr:!1},this.rules[72]={name:"rep-num",lower:"rep-num",index:72,isBkr:!1},this.rules[73]={name:"dString",lower:"dstring",index:73,isBkr:!1},this.rules[74]={name:"xString",lower:"xstring",index:74,isBkr:!1},this.rules[75]={name:"bString",lower:"bstring",index:75,isBkr:!1},this.rules[76]={name:"Dec",lower:"dec",index:76,isBkr:!1},this.rules[77]={name:"Hex",lower:"hex",index:77,isBkr:!1},this.rules[78]={name:"Bin",lower:"bin",index:78,isBkr:!1},this.rules[79]={name:"dmin",lower:"dmin",index:79,isBkr:!1},this.rules[80]={name:"dmax",lower:"dmax",index:80,isBkr:!1},this.rules[81]={name:"bmin",lower:"bmin",index:81,isBkr:!1},this.rules[82]={name:"bmax",lower:"bmax",index:82,isBkr:!1},this.rules[83]={name:"xmin",lower:"xmin",index:83,isBkr:!1},this.rules[84]={name:"xmax",lower:"xmax",index:84,isBkr:!1},this.rules[85]={name:"dnum",lower:"dnum",index:85,isBkr:!1},this.rules[86]={name:"bnum",lower:"bnum",index:86,isBkr:!1},this.rules[87]={name:"xnum",lower:"xnum",index:87,isBkr:!1},this.rules[88]={name:"alphanum",lower:"alphanum",index:88,isBkr:!1},this.rules[89]={name:"owsp",lower:"owsp",index:89,isBkr:!1},this.rules[90]={name:"wsp",lower:"wsp",index:90,isBkr:!1},this.rules[91]={name:"space",lower:"space",index:91,isBkr:!1},this.rules[92]={name:"comment",lower:"comment",index:92,isBkr:!1},this.rules[93]={name:"LineEnd",lower:"lineend",index:93,isBkr:!1},this.rules[94]={name:"LineContinue",lower:"linecontinue",index:94,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3,4]},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:4,index:2},this.rules[0].opcodes[4]={type:4,index:12},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,5,7]},this.rules[1].opcodes[1]={type:3,min:0,max:1/0},this.rules[1].opcodes[2]={type:1,children:[3,4]},this.rules[1].opcodes[3]={type:6,string:[32]},this.rules[1].opcodes[4]={type:6,string:[9]},this.rules[1].opcodes[5]={type:3,min:0,max:1},this.rules[1].opcodes[6]={type:4,index:92},this.rules[1].opcodes[7]={type:4,index:93},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:4,index:3},this.rules[2].opcodes[2]={type:4,index:89},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:1,children:[5,8]},this.rules[2].opcodes[5]={type:2,children:[6,7]},this.rules[2].opcodes[6]={type:4,index:89},this.rules[2].opcodes[7]={type:4,index:93},this.rules[2].opcodes[8]={type:2,children:[9,10]},this.rules[2].opcodes[9]={type:4,index:13},this.rules[2].opcodes[10]={type:4,index:93},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,3]},this.rules[3].opcodes[1]={type:4,index:4},this.rules[3].opcodes[2]={type:4,index:89},this.rules[3].opcodes[3]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:4,index:88},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:1,max:1/0},this.rules[6].opcodes[1]={type:1,children:[2,3]},this.rules[6].opcodes[2]={type:5,min:33,max:60},this.rules[6].opcodes[3]={type:5,min:62,max:126},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:4,index:9},this.rules[7].opcodes[2]={type:4,index:8},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:3,min:1,max:2},this.rules[8].opcodes[1]={type:5,min:33,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[61]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:6,string:[61,47]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:2,children:[1,6]},this.rules[12].opcodes[1]={type:3,min:1,max:1/0},this.rules[12].opcodes[2]={type:1,children:[3,4,5]},this.rules[12].opcodes[3]={type:5,min:32,max:126},this.rules[12].opcodes[4]={type:6,string:[9]},this.rules[12].opcodes[5]={type:4,index:94},this.rules[12].opcodes[6]={type:4,index:93},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:3,min:1,max:1/0},this.rules[13].opcodes[1]={type:1,children:[2,3,4]},this.rules[13].opcodes[2]={type:5,min:32,max:126},this.rules[13].opcodes[3]={type:6,string:[9]},this.rules[13].opcodes[4]={type:4,index:94},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2]},this.rules[14].opcodes[1]={type:4,index:15},this.rules[14].opcodes[2]={type:3,min:0,max:1/0},this.rules[14].opcodes[3]={type:2,children:[4,5,6]},this.rules[14].opcodes[4]={type:4,index:89},this.rules[14].opcodes[5]={type:4,index:44},this.rules[14].opcodes[6]={type:4,index:15},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2]},this.rules[15].opcodes[1]={type:4,index:16},this.rules[15].opcodes[2]={type:3,min:0,max:1/0},this.rules[15].opcodes[3]={type:2,children:[4,5]},this.rules[15].opcodes[4]={type:4,index:45},this.rules[15].opcodes[5]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,3]},this.rules[16].opcodes[1]={type:3,min:0,max:1},this.rules[16].opcodes[2]={type:4,index:17},this.rules[16].opcodes[3]={type:1,children:[4,5,6,7]},this.rules[16].opcodes[4]={type:4,index:21},this.rules[16].opcodes[5]={type:4,index:25},this.rules[16].opcodes[6]={type:4,index:19},this.rules[16].opcodes[7]={type:4,index:20},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,5]},this.rules[17].opcodes[1]={type:2,children:[2,3]},this.rules[17].opcodes[2]={type:4,index:18},this.rules[17].opcodes[3]={type:3,min:0,max:1},this.rules[17].opcodes[4]={type:4,index:43},this.rules[17].opcodes[5]={type:4,index:43},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[18].opcodes[1]={type:4,index:49},this.rules[18].opcodes[2]={type:4,index:50},this.rules[18].opcodes[3]={type:4,index:47},this.rules[18].opcodes[4]={type:4,index:48},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10]},this.rules[19].opcodes[1]={type:4,index:40},this.rules[19].opcodes[2]={type:4,index:29},this.rules[19].opcodes[3]={type:4,index:53},this.rules[19].opcodes[4]={type:4,index:54},this.rules[19].opcodes[5]={type:4,index:55},this.rules[19].opcodes[6]={type:4,index:61},this.rules[19].opcodes[7]={type:4,index:30},this.rules[19].opcodes[8]={type:4,index:51},this.rules[19].opcodes[9]={type:4,index:52},this.rules[19].opcodes[10]={type:4,index:65},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:3,min:1,max:1/0},this.rules[20].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[20].opcodes[2]={type:5,min:33,max:40},this.rules[20].opcodes[3]={type:5,min:42,max:46},this.rules[20].opcodes[4]={type:5,min:48,max:92},this.rules[20].opcodes[5]={type:5,min:94,max:126},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:2,children:[1,2,3]},this.rules[21].opcodes[1]={type:4,index:23},this.rules[21].opcodes[2]={type:4,index:14},this.rules[21].opcodes[3]={type:1,children:[4,5]},this.rules[21].opcodes[4]={type:4,index:24},this.rules[21].opcodes[5]={type:4,index:22},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:3,min:1,max:1/0},this.rules[22].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[22].opcodes[2]={type:5,min:33,max:40},this.rules[22].opcodes[3]={type:5,min:42,max:46},this.rules[22].opcodes[4]={type:5,min:48,max:92},this.rules[22].opcodes[5]={type:5,min:94,max:126},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:2,children:[1,2]},this.rules[23].opcodes[1]={type:6,string:[40]},this.rules[23].opcodes[2]={type:4,index:89},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:2,children:[1,2]},this.rules[24].opcodes[1]={type:4,index:89},this.rules[24].opcodes[2]={type:6,string:[41]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:2,children:[1,2,3]},this.rules[25].opcodes[1]={type:4,index:27},this.rules[25].opcodes[2]={type:4,index:14},this.rules[25].opcodes[3]={type:1,children:[4,5]},this.rules[25].opcodes[4]={type:4,index:28},this.rules[25].opcodes[5]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:3,min:1,max:1/0},this.rules[26].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[26].opcodes[2]={type:5,min:33,max:40},this.rules[26].opcodes[3]={type:5,min:42,max:46},this.rules[26].opcodes[4]={type:5,min:48,max:92},this.rules[26].opcodes[5]={type:5,min:94,max:126},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:6,string:[91]},this.rules[27].opcodes[2]={type:4,index:89},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:89},this.rules[28].opcodes[2]={type:6,string:[93]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:4,index:88},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:2,children:[1,2,4]},this.rules[30].opcodes[1]={type:6,string:[92]},this.rules[30].opcodes[2]={type:3,min:0,max:1},this.rules[30].opcodes[3]={type:4,index:31},this.rules[30].opcodes[4]={type:4,index:36},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:1,children:[1,7,13,19]},this.rules[31].opcodes[1]={type:2,children:[2,3]},this.rules[31].opcodes[2]={type:4,index:32},this.rules[31].opcodes[3]={type:3,min:0,max:1},this.rules[31].opcodes[4]={type:1,children:[5,6]},this.rules[31].opcodes[5]={type:4,index:34},this.rules[31].opcodes[6]={type:4,index:35},this.rules[31].opcodes[7]={type:2,children:[8,9]},this.rules[31].opcodes[8]={type:4,index:33},this.rules[31].opcodes[9]={type:3,min:0,max:1},this.rules[31].opcodes[10]={type:1,children:[11,12]},this.rules[31].opcodes[11]={type:4,index:34},this.rules[31].opcodes[12]={type:4,index:35},this.rules[31].opcodes[13]={type:2,children:[14,15]},this.rules[31].opcodes[14]={type:4,index:34},this.rules[31].opcodes[15]={type:3,min:0,max:1},this.rules[31].opcodes[16]={type:1,children:[17,18]},this.rules[31].opcodes[17]={type:4,index:32},this.rules[31].opcodes[18]={type:4,index:33},this.rules[31].opcodes[19]={type:2,children:[20,21]},this.rules[31].opcodes[20]={type:4,index:35},this.rules[31].opcodes[21]={type:3,min:0,max:1},this.rules[31].opcodes[22]={type:1,children:[23,24]},this.rules[31].opcodes[23]={type:4,index:32},this.rules[31].opcodes[24]={type:4,index:33},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:6,string:[37,115]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:6,string:[37,105]},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:6,string:[37,117]},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:6,string:[37,112]},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:1,children:[1,2,3]},this.rules[36].opcodes[1]={type:4,index:38},this.rules[36].opcodes[2]={type:4,index:39},this.rules[36].opcodes[3]={type:4,index:37},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:4,index:88},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:2,children:[1,2]},this.rules[38].opcodes[1]={type:6,string:[117,95]},this.rules[38].opcodes[2]={type:4,index:88},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:2,children:[1,2]},this.rules[39].opcodes[1]={type:6,string:[101,95]},this.rules[39].opcodes[2]={type:4,index:88},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2]},this.rules[40].opcodes[1]={type:4,index:42},this.rules[40].opcodes[2]={type:4,index:41},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:2,children:[1,2]},this.rules[41].opcodes[1]={type:6,string:[117,95]},this.rules[41].opcodes[2]={type:4,index:88},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:6,string:[101,95]},this.rules[42].opcodes[2]={type:4,index:88},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:1,children:[1,5,8,11,12]},this.rules[43].opcodes[1]={type:2,children:[2,3,4]},this.rules[43].opcodes[2]={type:4,index:69},this.rules[43].opcodes[3]={type:4,index:46},this.rules[43].opcodes[4]={type:4,index:71},this.rules[43].opcodes[5]={type:2,children:[6,7]},this.rules[43].opcodes[6]={type:4,index:69},this.rules[43].opcodes[7]={type:4,index:46},this.rules[43].opcodes[8]={type:2,children:[9,10]},this.rules[43].opcodes[9]={type:4,index:46},this.rules[43].opcodes[10]={type:4,index:71},this.rules[43].opcodes[11]={type:4,index:46},this.rules[43].opcodes[12]={type:4,index:70},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:2,children:[1,2]},this.rules[44].opcodes[1]={type:6,string:[47]},this.rules[44].opcodes[2]={type:4,index:89},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:4,index:90},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:6,string:[42]},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:6,string:[38]},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:6,string:[33]},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:6,string:[38,38]},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[33,33]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[37,94]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[37,36]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:6,string:[37]},this.rules[53].opcodes[2]={type:1,children:[3,8,13]},this.rules[53].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[53].opcodes[4]={type:4,index:76},this.rules[53].opcodes[5]={type:4,index:79},this.rules[53].opcodes[6]={type:6,string:[45]},this.rules[53].opcodes[7]={type:4,index:80},this.rules[53].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[53].opcodes[9]={type:4,index:77},this.rules[53].opcodes[10]={type:4,index:83},this.rules[53].opcodes[11]={type:6,string:[45]},this.rules[53].opcodes[12]={type:4,index:84},this.rules[53].opcodes[13]={type:2,children:[14,15,16,17]},this.rules[53].opcodes[14]={type:4,index:78},this.rules[53].opcodes[15]={type:4,index:81},this.rules[53].opcodes[16]={type:6,string:[45]},this.rules[53].opcodes[17]={type:4,index:82},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:2,children:[1,2]},this.rules[54].opcodes[1]={type:6,string:[37]},this.rules[54].opcodes[2]={type:1,children:[3,10,17]},this.rules[54].opcodes[3]={type:2,children:[4,5,6]},this.rules[54].opcodes[4]={type:4,index:76},this.rules[54].opcodes[5]={type:4,index:73},this.rules[54].opcodes[6]={type:3,min:0,max:1/0},this.rules[54].opcodes[7]={type:2,children:[8,9]},this.rules[54].opcodes[8]={type:6,string:[46]},this.rules[54].opcodes[9]={type:4,index:73},this.rules[54].opcodes[10]={type:2,children:[11,12,13]},this.rules[54].opcodes[11]={type:4,index:77},this.rules[54].opcodes[12]={type:4,index:74},this.rules[54].opcodes[13]={type:3,min:0,max:1/0},this.rules[54].opcodes[14]={type:2,children:[15,16]},this.rules[54].opcodes[15]={type:6,string:[46]},this.rules[54].opcodes[16]={type:4,index:74},this.rules[54].opcodes[17]={type:2,children:[18,19,20]},this.rules[54].opcodes[18]={type:4,index:78},this.rules[54].opcodes[19]={type:4,index:75},this.rules[54].opcodes[20]={type:3,min:0,max:1/0},this.rules[54].opcodes[21]={type:2,children:[22,23]},this.rules[54].opcodes[22]={type:6,string:[46]},this.rules[54].opcodes[23]={type:4,index:75},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[55].opcodes[1]={type:4,index:56},this.rules[55].opcodes[2]={type:4,index:57},this.rules[55].opcodes[3]={type:4,index:59},this.rules[55].opcodes[4]={type:4,index:58},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:3,min:0,max:1},this.rules[56].opcodes[1]={type:1,children:[2,3]},this.rules[56].opcodes[2]={type:7,string:[37,105]},this.rules[56].opcodes[3]={type:7,string:[37,115]},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:6,string:[34]},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:6,string:[34]},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:3,min:0,max:1/0},this.rules[59].opcodes[1]={type:1,children:[2,3,4]},this.rules[59].opcodes[2]={type:5,min:32,max:33},this.rules[59].opcodes[3]={type:5,min:35,max:126},this.rules[59].opcodes[4]={type:4,index:60},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:6,string:[9]},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3]},this.rules[61].opcodes[1]={type:4,index:62},this.rules[61].opcodes[2]={type:4,index:64},this.rules[61].opcodes[3]={type:4,index:63},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:6,string:[39]},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:6,string:[39]},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:3,min:0,max:1/0},this.rules[64].opcodes[1]={type:1,children:[2,3,4]},this.rules[64].opcodes[2]={type:5,min:32,max:38},this.rules[64].opcodes[3]={type:5,min:40,max:126},this.rules[64].opcodes[4]={type:4,index:60},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:2,children:[1,2,3]},this.rules[65].opcodes[1]={type:4,index:66},this.rules[65].opcodes[2]={type:4,index:67},this.rules[65].opcodes[3]={type:4,index:68},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:6,string:[60]},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:3,min:0,max:1/0},this.rules[67].opcodes[1]={type:1,children:[2,3,4]},this.rules[67].opcodes[2]={type:5,min:32,max:61},this.rules[67].opcodes[3]={type:5,min:63,max:126},this.rules[67].opcodes[4]={type:4,index:60},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:6,string:[62]},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:4,index:72},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:4,index:72},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:4,index:72},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:3,min:1,max:1/0},this.rules[72].opcodes[1]={type:5,min:48,max:57},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:4,index:85},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:4,index:87},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:4,index:86},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:6,string:[68]},this.rules[76].opcodes[2]={type:6,string:[100]},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:6,string:[88]},this.rules[77].opcodes[2]={type:6,string:[120]},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:1,children:[1,2]},this.rules[78].opcodes[1]={type:6,string:[66]},this.rules[78].opcodes[2]={type:6,string:[98]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:4,index:85},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:4,index:85},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:4,index:86},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:4,index:86},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:4,index:87},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:4,index:87},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:3,min:1,max:1/0},this.rules[85].opcodes[1]={type:5,min:48,max:57},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:3,min:1,max:1/0},this.rules[86].opcodes[1]={type:5,min:48,max:49},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:3,min:1,max:1/0},this.rules[87].opcodes[1]={type:1,children:[2,3,4]},this.rules[87].opcodes[2]={type:5,min:48,max:57},this.rules[87].opcodes[3]={type:5,min:65,max:70},this.rules[87].opcodes[4]={type:5,min:97,max:102},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:2,children:[1,4]},this.rules[88].opcodes[1]={type:1,children:[2,3]},this.rules[88].opcodes[2]={type:5,min:97,max:122},this.rules[88].opcodes[3]={type:5,min:65,max:90},this.rules[88].opcodes[4]={type:3,min:0,max:1/0},this.rules[88].opcodes[5]={type:1,children:[6,7,8,9]},this.rules[88].opcodes[6]={type:5,min:97,max:122},this.rules[88].opcodes[7]={type:5,min:65,max:90},this.rules[88].opcodes[8]={type:5,min:48,max:57},this.rules[88].opcodes[9]={type:6,string:[45]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:3,min:0,max:1/0},this.rules[89].opcodes[1]={type:4,index:91},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:3,min:1,max:1/0},this.rules[90].opcodes[1]={type:4,index:91},this.rules[91].opcodes=[],this.rules[91].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[91].opcodes[1]={type:6,string:[32]},this.rules[91].opcodes[2]={type:6,string:[9]},this.rules[91].opcodes[3]={type:4,index:92},this.rules[91].opcodes[4]={type:4,index:94},this.rules[92].opcodes=[],this.rules[92].opcodes[0]={type:2,children:[1,2]},this.rules[92].opcodes[1]={type:6,string:[59]},this.rules[92].opcodes[2]={type:3,min:0,max:1/0},this.rules[92].opcodes[3]={type:1,children:[4,5]},this.rules[92].opcodes[4]={type:5,min:32,max:126},this.rules[92].opcodes[5]={type:6,string:[9]},this.rules[93].opcodes=[],this.rules[93].opcodes[0]={type:1,children:[1,2,3]},this.rules[93].opcodes[1]={type:6,string:[13,10]},this.rules[93].opcodes[2]={type:6,string:[10]},this.rules[93].opcodes[3]={type:6,string:[13]},this.rules[94].opcodes=[],this.rules[94].opcodes[0]={type:2,children:[1,5]},this.rules[94].opcodes[1]={type:1,children:[2,3,4]},this.rules[94].opcodes[2]={type:6,string:[13,10]},this.rules[94].opcodes[3]={type:6,string:[10]},this.rules[94].opcodes[4]={type:6,string:[13]},this.rules[94].opcodes[5]={type:1,children:[6,7]},this.rules[94].opcodes[6]={type:6,string:[32]},this.rules[94].opcodes[7]={type:6,string:[9]},this.toString=function(){let e="";return e+=";\n",e+="; ABNF for JavaScript APG 2.0 SABNF\n",e+="; RFC 5234 with some restrictions and additions.\n",e+="; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation\n",e+='; - accepts %s"string" as a case-sensitive string\n',e+='; - accepts %i"string" as a case-insensitive string\n',e+='; - accepts "string" as a case-insensitive string\n',e+=";\n",e+="; Some restrictions:\n",e+="; 1. Rules must begin at first character of each line.\n",e+="; Indentations on first rule and rules thereafter are not allowed.\n",e+="; 2. Relaxed line endings. CRLF, LF or CR are accepted as valid line ending.\n",e+="; 3. Prose values, i.e. <prose value>, are accepted as valid grammar syntax.\n",e+="; However, a working parser cannot be generated from them.\n",e+=";\n",e+="; Super set (SABNF) additions:\n",e+="; 1. Look-ahead (syntactic predicate) operators are accepted as element prefixes.\n",e+="; & is the positive look-ahead operator, succeeds and backtracks if the look-ahead phrase is found\n",e+="; ! is the negative look-ahead operator, succeeds and backtracks if the look-ahead phrase is NOT found\n",e+="; e.g. &%d13 or &rule or !(A / B)\n",e+="; 2. User-Defined Terminals (UDT) of the form, u_name and e_name are accepted.\n",e+="; 'name' is alpha followed by alpha/num/hyphen just like a rule name.\n",e+="; u_name may be used as an element but no rule definition is given.\n",e+="; e.g. rule = A / u_myUdt\n",e+='; A = "a"\n',e+="; would be a valid grammar.\n",e+="; 3. Case-sensitive, single-quoted strings are accepted.\n",e+="; e.g. 'abc' would be equivalent to %d97.98.99\n",e+='; (kept for backward compatibility, but superseded by %s"abc") \n',e+="; New 12/26/2015\n",e+="; 4. Look-behind operators are accepted as element prefixes.\n",e+="; && is the positive look-behind operator, succeeds and backtracks if the look-behind phrase is found\n",e+="; !! is the negative look-behind operator, succeeds and backtracks if the look-behind phrase is NOT found\n",e+="; e.g. &&%d13 or &&rule or !!(A / B)\n",e+="; 5. Back reference operators, i.e. \\rulename, are accepted.\n",e+="; A back reference operator acts like a TLS or TBS terminal except that the phrase it attempts\n",e+="; to match is a phrase previously matched by the rule 'rulename'.\n",e+="; There are two modes of previous phrase matching - the parent-frame mode and the universal mode.\n",e+="; In universal mode, \\rulename matches the last match to 'rulename' regardless of where it was found.\n",e+="; In parent-frame mode, \\rulename matches only the last match found on the parent's frame or parse tree level.\n",e+="; Back reference modifiers can be used to specify case and mode.\n",e+="; \\A defaults to case-insensitive and universal mode, e.g. \\A === \\%i%uA\n",e+="; Modifiers %i and %s determine case-insensitive and case-sensitive mode, respectively.\n",e+="; Modifiers %u and %p determine universal mode and parent frame mode, respectively.\n",e+="; Case and mode modifiers can appear in any order, e.g. \\%s%pA === \\%p%sA. \n",e+="; 7. String begin anchor, ABG(%^) matches the beginning of the input string location.\n",e+="; Returns EMPTY or NOMATCH. Never consumes any characters.\n",e+="; 8. String end anchor, AEN(%$) matches the end of the input string location.\n",e+="; Returns EMPTY or NOMATCH. Never consumes any characters.\n",e+=";\n",e+="File = *(BlankLine / Rule / RuleError)\n",e+="BlankLine = *(%d32/%d9) [comment] LineEnd\n",e+="Rule = RuleLookup owsp Alternation ((owsp LineEnd)\n",e+=" / (LineEndError LineEnd))\n",e+="RuleLookup = RuleNameTest owsp DefinedAsTest\n",e+="RuleNameTest = RuleName/RuleNameError\n",e+="RuleName = alphanum\n",e+="RuleNameError = 1*(%d33-60/%d62-126)\n",e+="DefinedAsTest = DefinedAs / DefinedAsError\n",e+="DefinedAsError = 1*2%d33-126\n",e+="DefinedAs = IncAlt / Defined\n",e+="Defined = %d61\n",e+="IncAlt = %d61.47\n",e+="RuleError = 1*(%d32-126 / %d9 / LineContinue) LineEnd\n",e+="LineEndError = 1*(%d32-126 / %d9 / LineContinue)\n",e+="Alternation = Concatenation *(owsp AltOp Concatenation)\n",e+="Concatenation = Repetition *(CatOp Repetition)\n",e+="Repetition = [Modifier] (Group / Option / BasicElement / BasicElementErr)\n",e+="Modifier = (Predicate [RepOp])\n",e+=" / RepOp\n",e+="Predicate = BkaOp\n",e+=" / BknOp\n",e+=" / AndOp\n",e+=" / NotOp\n",e+="BasicElement = UdtOp\n",e+=" / RnmOp\n",e+=" / TrgOp\n",e+=" / TbsOp\n",e+=" / TlsOp\n",e+=" / ClsOp\n",e+=" / BkrOp\n",e+=" / AbgOp\n",e+=" / AenOp\n",e+=" / ProsVal\n",e+="BasicElementErr = 1*(%d33-40/%d42-46/%d48-92/%d94-126)\n",e+="Group = GroupOpen Alternation (GroupClose / GroupError)\n",e+="GroupError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\n",e+="GroupOpen = %d40 owsp\n",e+="GroupClose = owsp %d41\n",e+="Option = OptionOpen Alternation (OptionClose / OptionError)\n",e+="OptionError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\n",e+="OptionOpen = %d91 owsp\n",e+="OptionClose = owsp %d93\n",e+="RnmOp = alphanum\n",e+="BkrOp = %d92 [bkrModifier] bkr-name\n",e+="bkrModifier = (cs [um / pm]) / (ci [um / pm]) / (um [cs /ci]) / (pm [cs / ci])\n",e+="cs = '%s'\n",e+="ci = '%i'\n",e+="um = '%u'\n",e+="pm = '%p'\n",e+="bkr-name = uname / ename / rname\n",e+="rname = alphanum\n",e+="uname = %d117.95 alphanum\n",e+="ename = %d101.95 alphanum\n",e+="UdtOp = udt-empty\n",e+=" / udt-non-empty\n",e+="udt-non-empty = %d117.95 alphanum\n",e+="udt-empty = %d101.95 alphanum\n",e+="RepOp = (rep-min StarOp rep-max)\n",e+=" / (rep-min StarOp)\n",e+=" / (StarOp rep-max)\n",e+=" / StarOp\n",e+=" / rep-min-max\n",e+="AltOp = %d47 owsp\n",e+="CatOp = wsp\n",e+="StarOp = %d42\n",e+="AndOp = %d38\n",e+="NotOp = %d33\n",e+="BkaOp = %d38.38\n",e+="BknOp = %d33.33\n",e+="AbgOp = %d37.94\n",e+="AenOp = %d37.36\n",e+="TrgOp = %d37 ((Dec dmin %d45 dmax) / (Hex xmin %d45 xmax) / (Bin bmin %d45 bmax))\n",e+="TbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString)))\n",e+="TlsOp = TlsCase TlsOpen TlsString TlsClose\n",e+='TlsCase = ["%i" / "%s"]\n',e+="TlsOpen = %d34\n",e+="TlsClose = %d34\n",e+="TlsString = *(%d32-33/%d35-126/StringTab)\n",e+="StringTab = %d9\n",e+="ClsOp = ClsOpen ClsString ClsClose\n",e+="ClsOpen = %d39\n",e+="ClsClose = %d39\n",e+="ClsString = *(%d32-38/%d40-126/StringTab)\n",e+="ProsVal = ProsValOpen ProsValString ProsValClose\n",e+="ProsValOpen = %d60\n",e+="ProsValString = *(%d32-61/%d63-126/StringTab)\n",e+="ProsValClose = %d62\n",e+="rep-min = rep-num\n",e+="rep-min-max = rep-num\n",e+="rep-max = rep-num\n",e+="rep-num = 1*(%d48-57)\n",e+="dString = dnum\n",e+="xString = xnum\n",e+="bString = bnum\n",e+="Dec = (%d68/%d100)\n",e+="Hex = (%d88/%d120)\n",e+="Bin = (%d66/%d98)\n",e+="dmin = dnum\n",e+="dmax = dnum\n",e+="bmin = bnum\n",e+="bmax = bnum\n",e+="xmin = xnum\n",e+="xmax = xnum\n",e+="dnum = 1*(%d48-57)\n",e+="bnum = 1*%d48-49\n",e+="xnum = 1*(%d48-57 / %d65-70 / %d97-102)\n",e+=";\n",e+="; Basics\n",e+="alphanum = (%d97-122/%d65-90) *(%d97-122/%d65-90/%d48-57/%d45)\n",e+="owsp = *space\n",e+="wsp = 1*space\n",e+="space = %d32\n",e+=" / %d9\n",e+=" / comment\n",e+=" / LineContinue\n",e+="comment = %d59 *(%d32-126 / %d9)\n",e+="LineEnd = %d13.10\n",e+=" / %d10\n",e+=" / %d13\n",e+="LineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9)\n",";\n; ABNF for JavaScript APG 2.0 SABNF\n; RFC 5234 with some restrictions and additions.\n; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation\n; - accepts %s\"string\" as a case-sensitive string\n; - accepts %i\"string\" as a case-insensitive string\n; - accepts \"string\" as a case-insensitive string\n;\n; Some restrictions:\n; 1. Rules must begin at first character of each line.\n; Indentations on first rule and rules thereafter are not allowed.\n; 2. Relaxed line endings. CRLF, LF or CR are accepted as valid line ending.\n; 3. Prose values, i.e. <prose value>, are accepted as valid grammar syntax.\n; However, a working parser cannot be generated from them.\n;\n; Super set (SABNF) additions:\n; 1. Look-ahead (syntactic predicate) operators are accepted as element prefixes.\n; & is the positive look-ahead operator, succeeds and backtracks if the look-ahead phrase is found\n; ! is the negative look-ahead operator, succeeds and backtracks if the look-ahead phrase is NOT found\n; e.g. &%d13 or &rule or !(A / B)\n; 2. User-Defined Terminals (UDT) of the form, u_name and e_name are accepted.\n; 'name' is alpha followed by alpha/num/hyphen just like a rule name.\n; u_name may be used as an element but no rule definition is given.\n; e.g. rule = A / u_myUdt\n; A = \"a\"\n; would be a valid grammar.\n; 3. Case-sensitive, single-quoted strings are accepted.\n; e.g. 'abc' would be equivalent to %d97.98.99\n; (kept for backward compatibility, but superseded by %s\"abc\") \n; New 12/26/2015\n; 4. Look-behind operators are accepted as element prefixes.\n; && is the positive look-behind operator, succeeds and backtracks if the look-behind phrase is found\n; !! is the negative look-behind operator, succeeds and backtracks if the look-behind phrase is NOT found\n; e.g. &&%d13 or &&rule or !!(A / B)\n; 5. Back reference operators, i.e. \\rulename, are accepted.\n; A back reference operator acts like a TLS or TBS terminal except that the phrase it attempts\n; to match is a phrase previously matched by the rule 'rulename'.\n; There are two modes of previous phrase matching - the parent-frame mode and the universal mode.\n; In universal mode, \\rulename matches the last match to 'rulename' regardless of where it was found.\n; In parent-frame mode, \\rulename matches only the last match found on the parent's frame or parse tree level.\n; Back reference modifiers can be used to specify case and mode.\n; \\A defaults to case-insensitive and universal mode, e.g. \\A === \\%i%uA\n; Modifiers %i and %s determine case-insensitive and case-sensitive mode, respectively.\n; Modifiers %u and %p determine universal mode and parent frame mode, respectively.\n; Case and mode modifiers can appear in any order, e.g. \\%s%pA === \\%p%sA. \n; 7. String begin anchor, ABG(%^) matches the beginning of the input string location.\n; Returns EMPTY or NOMATCH. Never consumes any characters.\n; 8. String end anchor, AEN(%$) matches the end of the input string location.\n; Returns EMPTY or NOMATCH. Never consumes any characters.\n;\nFile = *(BlankLine / Rule / RuleError)\nBlankLine = *(%d32/%d9) [comment] LineEnd\nRule = RuleLookup owsp Alternation ((owsp LineEnd)\n / (LineEndError LineEnd))\nRuleLookup = RuleNameTest owsp DefinedAsTest\nRuleNameTest = RuleName/RuleNameError\nRuleName = alphanum\nRuleNameError = 1*(%d33-60/%d62-126)\nDefinedAsTest = DefinedAs / DefinedAsError\nDefinedAsError = 1*2%d33-126\nDefinedAs = IncAlt / Defined\nDefined = %d61\nIncAlt = %d61.47\nRuleError = 1*(%d32-126 / %d9 / LineContinue) LineEnd\nLineEndError = 1*(%d32-126 / %d9 / LineContinue)\nAlternation = Concatenation *(owsp AltOp Concatenation)\nConcatenation = Repetition *(CatOp Repetition)\nRepetition = [Modifier] (Group / Option / BasicElement / BasicElementErr)\nModifier = (Predicate [RepOp])\n / RepOp\nPredicate = BkaOp\n / BknOp\n / AndOp\n / NotOp\nBasicElement = UdtOp\n / RnmOp\n / TrgOp\n / TbsOp\n / TlsOp\n / ClsOp\n / BkrOp\n / AbgOp\n / AenOp\n / ProsVal\nBasicElementErr = 1*(%d33-40/%d42-46/%d48-92/%d94-126)\nGroup = GroupOpen Alternation (GroupClose / GroupError)\nGroupError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\nGroupOpen = %d40 owsp\nGroupClose = owsp %d41\nOption = OptionOpen Alternation (OptionClose / OptionError)\nOptionError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\nOptionOpen = %d91 owsp\nOptionClose = owsp %d93\nRnmOp = alphanum\nBkrOp = %d92 [bkrModifier] bkr-name\nbkrModifier = (cs [um / pm]) / (ci [um / pm]) / (um [cs /ci]) / (pm [cs / ci])\ncs = '%s'\nci = '%i'\num = '%u'\npm = '%p'\nbkr-name = uname / ename / rname\nrname = alphanum\nuname = %d117.95 alphanum\nename = %d101.95 alphanum\nUdtOp = udt-empty\n / udt-non-empty\nudt-non-empty = %d117.95 alphanum\nudt-empty = %d101.95 alphanum\nRepOp = (rep-min StarOp rep-max)\n / (rep-min StarOp)\n / (StarOp rep-max)\n / StarOp\n / rep-min-max\nAltOp = %d47 owsp\nCatOp = wsp\nStarOp = %d42\nAndOp = %d38\nNotOp = %d33\nBkaOp = %d38.38\nBknOp = %d33.33\nAbgOp = %d37.94\nAenOp = %d37.36\nTrgOp = %d37 ((Dec dmin %d45 dmax) / (Hex xmin %d45 xmax) / (Bin bmin %d45 bmax))\nTbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString)))\nTlsOp = TlsCase TlsOpen TlsString TlsClose\nTlsCase = [\"%i\" / \"%s\"]\nTlsOpen = %d34\nTlsClose = %d34\nTlsString = *(%d32-33/%d35-126/StringTab)\nStringTab = %d9\nClsOp = ClsOpen ClsString ClsClose\nClsOpen = %d39\nClsClose = %d39\nClsString = *(%d32-38/%d40-126/StringTab)\nProsVal = ProsValOpen ProsValString ProsValClose\nProsValOpen = %d60\nProsValString = *(%d32-61/%d63-126/StringTab)\nProsValClose = %d62\nrep-min = rep-num\nrep-min-max = rep-num\nrep-max = rep-num\nrep-num = 1*(%d48-57)\ndString = dnum\nxString = xnum\nbString = bnum\nDec = (%d68/%d100)\nHex = (%d88/%d120)\nBin = (%d66/%d98)\ndmin = dnum\ndmax = dnum\nbmin = bnum\nbmax = bnum\nxmin = xnum\nxmax = xnum\ndnum = 1*(%d48-57)\nbnum = 1*%d48-49\nxnum = 1*(%d48-57 / %d65-70 / %d97-102)\n;\n; Basics\nalphanum = (%d97-122/%d65-90) *(%d97-122/%d65-90/%d48-57/%d45)\nowsp = *space\nwsp = 1*space\nspace = %d32\n / %d9\n / comment\n / LineContinue\ncomment = %d59 *(%d32-126 / %d9)\nLineEnd = %d13.10\n / %d10\n / %d13\nLineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9)\n"}}},{}],363:[function(e,t,n){const r=e("../apg-lib/identifiers"),i=e("../apg-lib/utilities");const s=[];s.line=function(e,t,n,i,s){return e===r.SEM_PRE?(s.endLength=0,s.textLength=0,s.invalidCount=0):s.lines.push({lineNo:s.lines.length,beginChar:n,length:i,textLength:s.textLength,endType:s.endType,invalidChars:s.invalidCount}),r.SEM_OK},s["line-text"]=function(e,t,n,i,s){return e===r.SEM_PRE&&(s.textLength=i),r.SEM_OK},s["last-line"]=function(e,t,n,i,s){return e===r.SEM_PRE?(s.endLength=0,s.textLength=0,s.invalidCount=0):s.strict?(s.lines.push({lineNo:s.lines.length,beginChar:n,length:i,textLength:i,endType:"none",invalidChars:s.invalidCount}),s.errors.push({line:s.lineNo,char:n+i,msg:"no line end on last line - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})):(t.push(10),s.lines.push({lineNo:s.lines.length,beginChar:n,length:i+1,textLength:i,endType:"LF",invalidChars:s.invalidCount})),r.SEM_OK},s.invalid=function(e,t,n,s,o){return e===r.SEM_PRE&&o.errors.push({line:o.lineNo,char:n,msg:`invalid character found '\\x${i.charToHex(t[n])}'`}),r.SEM_OK},s.end=function(e,t,n,i,s){return e===r.SEM_POST&&(s.lineNo+=1),r.SEM_OK},s.lf=function(e,t,n,i,s){return e===r.SEM_PRE&&(s.endType="LF",s.strict&&s.errors.push({line:s.lineNo,char:n,msg:"line end character LF(\\n, \\x0A) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),r.SEM_OK},s.cr=function(e,t,n,i,s){return e===r.SEM_PRE&&(s.endType="CR",s.strict&&s.errors.push({line:s.lineNo,char:n,msg:"line end character CR(\\r, \\x0D) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),r.SEM_OK},s.crlf=function(e,t,n,i,s){return e===r.SEM_PRE&&(s.endType="CRLF"),r.SEM_OK},n.callbacks=s},{"../apg-lib/identifiers":374,"../apg-lib/utilities":380}],364:[function(e,t,n){t.exports=function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"file",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"line",lower:"line",index:1,isBkr:!1},this.rules[2]={name:"line-text",lower:"line-text",index:2,isBkr:!1},this.rules[3]={name:"last-line",lower:"last-line",index:3,isBkr:!1},this.rules[4]={name:"valid",lower:"valid",index:4,isBkr:!1},this.rules[5]={name:"invalid",lower:"invalid",index:5,isBkr:!1},this.rules[6]={name:"end",lower:"end",index:6,isBkr:!1},this.rules[7]={name:"CRLF",lower:"crlf",index:7,isBkr:!1},this.rules[8]={name:"LF",lower:"lf",index:8,isBkr:!1},this.rules[9]={name:"CR",lower:"cr",index:9,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,3]},this.rules[0].opcodes[1]={type:3,min:0,max:1/0},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:3,min:0,max:1},this.rules[0].opcodes[4]={type:4,index:3},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:6},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:0,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:5},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3]},this.rules[3].opcodes[2]={type:4,index:4},this.rules[3].opcodes[3]={type:4,index:5},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:32,max:126},this.rules[4].opcodes[2]={type:6,string:[9]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[5].opcodes[1]={type:5,min:0,max:8},this.rules[5].opcodes[2]={type:5,min:11,max:12},this.rules[5].opcodes[3]={type:5,min:14,max:31},this.rules[5].opcodes[4]={type:5,min:127,max:4294967295},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:6,string:[13,10]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:6,string:[10]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:6,string:[13]},this.toString=function(){let e="";return e+="file = *line [last-line]\n",e+="line = line-text end\n",e+="line-text = *(valid/invalid)\n",e+="last-line = 1*(valid/invalid)\n",e+="valid = %d32-126 / %d9\n",e+="invalid = %d0-8 / %d11-12 /%d14-31 / %x7f-ffffffff\n",e+="end = CRLF / LF / CR\n",e+="CRLF = %d13.10\n",e+="LF = %d10\n",e+="CR = %d13\n","file = *line [last-line]\nline = line-text end\nline-text = *(valid/invalid)\nlast-line = 1*(valid/invalid)\nvalid = %d32-126 / %d9\ninvalid = %d0-8 / %d11-12 /%d14-31 / %x7f-ffffffff\nend = CRLF / LF / CR\nCRLF = %d13.10\nLF = %d10\nCR = %d13\n"}}},{}],365:[function(e,t,n){t.exports=function(t,n,r,i){const s=e("../apg-lib/node-exports"),o=new(e("./scanner-grammar")),{callbacks:a}=e("./scanner-callbacks"),c=[],u=new s.parser;if(u.ast=new s.ast,u.ast.callbacks=a,i){if("traceObject"!==i.traceObject)throw new TypeError("scanner.js: trace argument is not a trace object");u.trace=i}if(!0!==u.parse(o,"file",t).success)return void n.push({line:0,char:0,msg:"syntax analysis error analyzing input SABNF grammar"});const l={lines:c,lineNo:0,errors:n,strict:!!r};return u.ast.translate(l),c}},{"../apg-lib/node-exports":375,"./scanner-callbacks":363,"./scanner-grammar":364}],366:[function(e,t,n){t.exports=function(){const t=e("../apg-lib/node-exports"),n=t.ids,r=function(){this.names=[],this.add=function(e){let t=-1;return-1===this.get(e)&&(t={name:e,lower:e.toLowerCase(),index:this.names.length},this.names.push(t)),t},this.get=function(e){let t=-1;const n=e.toLowerCase();for(let e=0;e<this.names.length;e+=1)if(this.names[e].lower===n){t=this.names[e];break}return t}},i=function(e,t,n){let r=0;for(let i=t;i<t+n;i+=1)r=10*r+e[i]-48;return r},s=function(e,t,n){let r=0;for(let i=t;i<t+n;i+=1)r=2*r+e[i]-48;return r},o=function(e,t,n){let r=0;for(let i=t;i<t+n;i+=1){let t=e[i];if(t>=48&&t<=57)t-=48;else if(t>=65&&t<=70)t-=55;else{if(!(t>=97&&t<=102))throw new Error("hexnum out of range");t-=87}r=16*r+t}return r};this.callbacks=[],this.callbacks.abgop=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&s.opcodes.push({type:n.ABG}),o},this.callbacks.aenop=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&s.opcodes.push({type:n.AEN}),o},this.callbacks.alternation=function(e,t,r,i,s){let o=n.SEM_OK;if(e===n.SEM_PRE){const e=!0;for(;e;){if(null===s.definedas){o=n.SEM_SKIP;break}if(null===s.topStack){if("="===s.definedas){s.topStack={alt:{type:n.ALT,children:[]},cat:null},s.altStack.push(s.topStack),s.opcodes.push(s.topStack.alt);break}s.topStack={alt:s.opcodes[0],cat:null},s.altStack.push(s.topStack);break}s.topStack={alt:{type:n.ALT,children:[]},cat:null},s.altStack.push(s.topStack),s.opcodes.push(s.topStack.alt);break}}else e===n.SEM_POST&&(s.altStack.pop(),s.altStack.length>0?s.topStack=s.altStack[s.altStack.length-1]:s.topStack=null);return o},this.callbacks.andop=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&s.opcodes.push({type:n.AND}),o},this.callbacks.bmax=function(e,t,r,i,o){const a=n.SEM_OK;return e===n.SEM_POST&&(o.max=s(t,r,i)),a},this.callbacks.bmin=function(e,t,r,i,o){const a=n.SEM_OK;return e===n.SEM_POST&&(o.min=s(t,r,i)),a},this.callbacks.bkaop=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&s.opcodes.push({type:n.BKA}),o},this.callbacks.bknop=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&s.opcodes.push({type:n.BKN}),o},this.callbacks.bkrop=function(e,r,i,s,o){const a=n.SEM_OK;return e===n.SEM_PRE?(o.ci=!0,o.cs=!1,o.um=!0,o.pm=!1):e===n.SEM_POST&&o.opcodes.push({type:n.BKR,bkrCase:!0===o.cs?n.BKR_MODE_CS:n.BKR_MODE_CI,bkrMode:!0===o.pm?n.BKR_MODE_PM:n.BKR_MODE_UM,index:{phraseIndex:o.bkrname.phraseIndex,name:t.utils.charsToString(r,o.bkrname.phraseIndex,o.bkrname.phraseLength)}}),a},this.callbacks["bkr-name"]=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&(s.bkrname={phraseIndex:r,phraseLength:i}),o},this.callbacks.bstring=function(e,t,r,i,o){const a=n.SEM_OK;return e===n.SEM_POST&&o.tbsstr.push(s(t,r,i)),a},this.callbacks.clsop=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&(i<=2?s.opcodes.push({type:n.TLS,string:[]}):s.opcodes.push({type:n.TBS,string:t.slice(r+1,r+i-1)})),o},this.callbacks.ci=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&(s.ci=!0),o},this.callbacks.cs=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&(s.cs=!0),o},this.callbacks.um=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&(s.um=!0),o},this.callbacks.pm=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&(s.pm=!0),o},this.callbacks.concatenation=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_PRE?(s.topStack.alt.children.push(s.opcodes.length),s.topStack.cat={type:n.CAT,children:[]},s.opcodes.push(s.topStack.cat)):e===n.SEM_POST&&(s.topStack.cat=null),o},this.callbacks.defined=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&(s.definedas="="),o},this.callbacks.dmax=function(e,t,r,s,o){const a=n.SEM_OK;return e===n.SEM_POST&&(o.max=i(t,r,s)),a},this.callbacks.dmin=function(e,t,r,s,o){const a=n.SEM_OK;return e===n.SEM_POST&&(o.min=i(t,r,s)),a},this.callbacks.dstring=function(e,t,r,s,o){const a=n.SEM_OK;return e===n.SEM_POST&&o.tbsstr.push(i(t,r,s)),a},this.callbacks.file=function(e,t,i,s,o){const a=n.SEM_OK;if(e===n.SEM_PRE)o.ruleNames=new r,o.udtNames=new r,o.rules=[],o.udts=[],o.rulesLineMap=[],o.opcodes=[],o.altStack=[],o.topStack=null,o.topRule=null;else if(e===n.SEM_POST){let e;o.rules.forEach((t=>{t.isBkr=!1,t.opcodes.forEach((t=>{t.type===n.RNM&&(e=o.ruleNames.get(t.index.name),-1===e?(o.errors.push({line:o.findLine(o.lines,t.index.phraseIndex,o.charsLength),char:t.index.phraseIndex,msg:`Rule name '${t.index.name}' used but not defined.`}),t.index=-1):t.index=e.index)}))})),o.udts.forEach((e=>{e.isBkr=!1})),o.rules.forEach((t=>{t.opcodes.forEach((r=>{r.type===n.BKR&&(t.hasBkr=!0,e=o.ruleNames.get(r.index.name),-1!==e?(o.rules[e.index].isBkr=!0,r.index=e.index):(e=o.udtNames.get(r.index.name),-1!==e?(o.udts[e.index].isBkr=!0,r.index=o.rules.length+e.index):(o.errors.push({line:o.findLine(o.lines,r.index.phraseIndex,o.charsLength),char:r.index.phraseIndex,msg:`Back reference name '${r.index.name}' refers to undefined rule or unamed UDT.`}),r.index=-1)))}))}))}return a},this.callbacks.incalt=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&(s.definedas="=/"),o},this.callbacks.notop=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&s.opcodes.push({type:n.NOT}),o},this.callbacks.optionopen=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&s.opcodes.push({type:n.REP,min:0,max:1,char:r}),o},this.callbacks["rep-max"]=function(e,t,r,s,o){const a=n.SEM_OK;return e===n.SEM_POST&&(o.max=i(t,r,s)),a},this.callbacks["rep-min"]=function(e,t,r,s,o){const a=n.SEM_OK;return e===n.SEM_POST&&(o.min=i(t,r,s)),a},this.callbacks["rep-min-max"]=function(e,t,r,s,o){const a=n.SEM_OK;return e===n.SEM_POST&&(o.max=i(t,r,s),o.min=o.max),a},this.callbacks.repetition=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_PRE&&s.topStack.cat.children.push(s.opcodes.length),o},this.callbacks.repop=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_PRE?(s.min=0,s.max=1/0,s.topRep={type:n.REP,min:0,max:1/0},s.opcodes.push(s.topRep)):e===n.SEM_POST&&(s.min>s.max&&s.errors.push({line:s.findLine(s.lines,r,s.charsLength),char:r,msg:`repetition min cannot be greater than max: min: ${s.min}: max: ${s.max}`}),s.topRep.min=s.min,s.topRep.max=s.max),o},this.callbacks.rnmop=function(e,r,i,s,o){const a=n.SEM_OK;return e===n.SEM_POST&&o.opcodes.push({type:n.RNM,index:{phraseIndex:i,name:t.utils.charsToString(r,i,s)}}),a},this.callbacks.rule=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_PRE&&(s.altStack.length=0,s.topStack=null,s.rulesLineMap.push({line:s.findLine(s.lines,r,s.charsLength),char:r})),o},this.callbacks.rulelookup=function(e,t,r,i,s){const o=n.SEM_OK;if(e===n.SEM_PRE)s.ruleName="",s.definedas="";else if(e===n.SEM_POST){let e;"="===s.definedas?(e=s.ruleNames.add(s.ruleName),-1===e?(s.definedas=null,s.errors.push({line:s.findLine(s.lines,r,s.charsLength),char:r,msg:`Rule name '${s.ruleName}' previously defined.`})):(s.topRule={name:e.name,lower:e.lower,opcodes:[],index:e.index},s.rules.push(s.topRule),s.opcodes=s.topRule.opcodes)):(e=s.ruleNames.get(s.ruleName),-1===e?(s.definedas=null,s.errors.push({line:s.findLine(s.lines,r,s.charsLength),char:r,msg:`Rule name '${s.ruleName}' for incremental alternate not previously defined.`})):(s.topRule=s.rules[e.index],s.opcodes=s.topRule.opcodes))}return o},this.callbacks.rulename=function(e,r,i,s,o){const a=n.SEM_OK;return e===n.SEM_PRE&&(o.ruleName=t.utils.charsToString(r,i,s)),a},this.callbacks.tbsop=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_PRE?s.tbsstr=[]:e===n.SEM_POST&&s.opcodes.push({type:n.TBS,string:s.tbsstr}),o},this.callbacks.tlscase=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_POST&&i>0&&(83===t[r+1]||115===t[r+1])&&(s.tlscase=!1),o},this.callbacks.tlsstring=function(e,t,r,i,s){const o=n.SEM_OK;if(e===n.SEM_POST)if(s.tlscase){const e=t.slice(r,r+i);for(let t=0;t<e.length;t+=1)e[t]>=65&&e[t]<=90&&(e[t]+=32);s.opcodes.push({type:n.TLS,string:e})}else s.opcodes.push({type:n.TBS,string:t.slice(r,r+i)});return o},this.callbacks.tlsop=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_PRE&&(s.tlscase=!0),o},this.callbacks.trgop=function(e,t,r,i,s){const o=n.SEM_OK;return e===n.SEM_PRE?(s.min=0,s.max=0):e===n.SEM_POST&&(s.min>s.max&&s.errors.push({line:s.findLine(s.lines,r,s.charsLength),char:r,msg:`TRG, (%dmin-max), min cannot be greater than max: min: ${s.min}: max: ${s.max}`}),s.opcodes.push({type:n.TRG,min:s.min,max:s.max})),o},this.callbacks["udt-empty"]=function(e,r,i,s,o){const a=n.SEM_OK;if(e===n.SEM_POST){const e=t.utils.charsToString(r,i,s);let a=o.udtNames.add(e);if(-1===a){if(a=o.udtNames.get(e),-1===a)throw new Error("semUdtEmpty: name look up error")}else o.udts.push({name:a.name,lower:a.lower,index:a.index,empty:!0});o.opcodes.push({type:n.UDT,empty:!0,index:a.index})}return a},this.callbacks["udt-non-empty"]=function(e,r,i,s,o){const a=n.SEM_OK;if(e===n.SEM_POST){const e=t.utils.charsToString(r,i,s);let a=o.udtNames.add(e);if(-1===a){if(a=o.udtNames.get(e),-1===a)throw new Error("semUdtNonEmpty: name look up error")}else o.udts.push({name:a.name,lower:a.lower,index:a.index,empty:!1});o.opcodes.push({type:n.UDT,empty:!1,index:a.index,syntax:null,semantic:null})}return a},this.callbacks.xmax=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_POST&&(s.max=o(t,r,i)),a},this.callbacks.xmin=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_POST&&(s.min=o(t,r,i)),a},this.callbacks.xstring=function(e,t,r,i,s){const a=n.SEM_OK;return e===n.SEM_POST&&s.tbsstr.push(o(t,r,i)),a}}},{"../apg-lib/node-exports":375}],367:[function(e,t,n){t.exports=function(){const e="show-rules.js";return function(t=[],n=[],r="index"){const i="showRules";let s=[],o=[];const a=[],c=[],u=t,l=n,d=t.length,h=n.length;let p,f="RULE/UDT NAMES";if(!Array.isArray(t)||!t.length)throw new Error(`${e}:${i}: rules arg must be array with length > 0`);if(!Array.isArray(n))throw new Error(`${e}:${i}: udts arg must be array`);for(p=0;p<d;p+=1)a.push(p);if(s=a.slice(0),s.sort((function(e,t){return u[e].lower<u[t].lower?-1:u[e].lower>u[t].lower?1:0})),h){for(p=0;p<h;p+=1)c.push(p);o=c.slice(0),o.sort((function(e,t){return l[e].lower<l[t].lower?-1:l[e].lower>l[t].lower?1:0}))}if(97===r.charCodeAt(0)){for(f+=" - alphabetical by rule/UDT name\n",p=0;p<d;p+=1)f+=`${p}: ${s[p]}: ${u[s[p]].name}\n`;if(h)for(p=0;p<h;p+=1)f+=`${p}: ${o[p]}: ${l[o[p]].name}\n`}else{for(f+=" - ordered by rule/UDT index\n",p=0;p<d;p+=1)f+=`${p}: ${u[p].name}\n`;if(h)for(p=0;p<h;p+=1)f+=`${p}: ${l[p].name}\n`}return f}}()},{}],368:[function(e,t,n){t.exports=function(){const t="syntax-callbacks.js: ",n=e("../apg-lib/node-exports"),r=n.ids;let i;this.callbacks=[],this.callbacks.andop=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:s.strict&&s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"AND operator(&) found - strict ABNF specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.basicelementerr=function(e,n,s,o){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:!1===i.basicError&&o.errors.push({line:o.findLine(o.lines,s,o.charsLength),char:s,msg:"Unrecognized SABNF element."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.clsclose=function(e,n,s,o){switch(e.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:o.errors.push({line:o.findLine(o.lines,i.clsOpen),char:i.clsOpen,msg:"Case-sensitive literal string('...') opened but not closed."}),i.clsOpen=null,i.basicError=!0;break;case r.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i.clsOpen),char:i.clsOpen,msg:"Case-sensitive string operator('...') found - strict ABNF specified."}),i.clsOpen=null;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.clsopen=function(e,n,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:i.clsOpen=s;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.clsstring=function(e,n,i,s){switch(e.state){case r.ACTIVE:s.stringTabChar=!1;break;case r.EMPTY:case r.NOMATCH:break;case r.MATCH:!1!==s.stringTabChar&&s.errors.push({line:s.findLine(s.lines,s.stringTabChar),char:s.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.definedaserror=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"Expected '=' or '=/'. Not found."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.file=function(e,n,i,s){switch(e.state){case r.ACTIVE:s.altStack=[],s.repCount=0;break;case r.EMPTY:s.errors.push({line:0,char:0,msg:"grammar file is empty"});break;case r.MATCH:0===s.ruleCount&&s.errors.push({line:0,char:0,msg:"no rules defined"});break;case r.NOMATCH:throw new Error(`${t}synFile: grammar file NOMATCH: design error: should never happen.`);default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.groupclose=function(e,n,s,o){switch(e.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:o.errors.push({line:o.findLine(o.lines,i.groupOpen),char:i.groupOpen,msg:'Group "(...)" opened but not closed.'}),i=o.altStack.pop(),i.groupError=!0;break;case r.MATCH:i=o.altStack.pop();break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.groupopen=function(e,n,s,o){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:i={groupOpen:s,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},o.altStack.push(i);break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.lineenderror=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"Unrecognized grammar element or characters."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.lineend=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:if(1===e.phraseLength&&s.strict){const e=13===n[i]?"CR":"LF";s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:`Line end '${e}' found - strict ABNF specified, only CRLF allowed.`})}break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.notop=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:s.strict&&s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"NOT operator(!) found - strict ABNF specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.optionclose=function(e,n,s,o){switch(e.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:o.errors.push({line:o.findLine(o.lines,i.optionOpen),char:i.optionOpen,msg:'Option "[...]" opened but not closed.'}),i=o.altStack.pop(),i.optionError=!0;break;case r.MATCH:i=o.altStack.pop();break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.optionopen=function(e,n,s,o){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:i={groupOpen:null,groupError:!1,optionOpen:s,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},o.altStack.push(i);break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.prosvalclose=function(e,n,s,o){switch(e.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:o.errors.push({line:o.findLine(o.lines,i.prosValOpen),char:i.prosValOpen,msg:"Prose value operator(<...>) opened but not closed."}),i.basicError=!0,i.prosValOpen=null;break;case r.MATCH:o.errors.push({line:o.findLine(o.lines,i.prosValOpen),char:i.prosValOpen,msg:"Prose value operator(<...>) found. The ABNF syntax is valid, but a parser cannot be generated from this grammar."}),i.prosValOpen=null;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.prosvalopen=function(e,n,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:i.prosValOpen=s;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.prosvalstring=function(e,n,i,s){switch(e.state){case r.ACTIVE:s.stringTabChar=!1;break;case r.EMPTY:case r.NOMATCH:break;case r.MATCH:!1!==s.stringTabChar&&s.errors.push({line:s.findLine(s.lines,s.stringTabChar),char:s.stringTabChar,msg:"Tab character (\\t, x09) not allowed in prose value string."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.repetition=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:case r.MATCH:s.repCount+=1;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.rule=function(e,n,s,o){switch(e.state){case r.ACTIVE:o.altStack.length=0,i={groupOpen:null,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},o.altStack.push(i);break;case r.EMPTY:throw new Error(`${t}synRule: EMPTY: rule cannot be empty`);case r.NOMATCH:break;case r.MATCH:o.ruleCount+=1;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.ruleerror=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"Unrecognized SABNF line. Invalid rule, comment or blank line."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.rulenameerror=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"Rule names must be alphanum and begin with alphabetic character."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.stringtab=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:s.stringTabChar=i;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsclose=function(e,n,s,o){switch(e.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:o.errors.push({line:o.findLine(o.lines,i.tlsOpen),char:i.tlsOpen,msg:'Case-insensitive literal string("...") opened but not closed.'}),i.basicError=!0,i.tlsOpen=null;break;case r.MATCH:i.tlsOpen=null;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsopen=function(e,n,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:i.tlsOpen=s;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsstring=function(e,n,i,s){switch(e.state){case r.ACTIVE:s.stringTabChar=!1;break;case r.EMPTY:case r.NOMATCH:break;case r.MATCH:!1!==s.stringTabChar&&s.errors.push({line:s.findLine(s.lines,s.stringTabChar),char:s.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string (see 'quoted-string' definition, RFC 7405.)"});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.udtop=function(e,i,s,o){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:if(o.strict){const t=n.utils.charsToString(i,s,e.phraseLength);o.errors.push({line:o.findLine(o.lines,s,o.charsLength),char:s,msg:`UDT operator found(${t}) - strict ABNF specified.`})}break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bkaop=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:s.strict?s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"Positive look-behind operator(&&) found - strict ABNF specified."}):s.lite&&s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"Positive look-behind operator(&&) found - apg-lite specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bknop=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:s.strict?s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"Negative look-behind operator(!!) found - strict ABNF specified."}):s.lite&&s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"Negative look-behind operator(!!) found - apg-lite specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bkrop=function(e,i,s,o){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:if(o.strict){const t=n.utils.charsToString(i,s,e.phraseLength);o.errors.push({line:o.findLine(o.lines,s,o.charsLength),char:s,msg:`Back reference operator(${t}) found - strict ABNF specified.`})}else if(o.lite){const t=n.utils.charsToString(i,s,e.phraseLength);o.errors.push({line:o.findLine(o.lines,s,o.charsLength),char:s,msg:`Back reference operator(${t}) found - apg-lite specified.`})}break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.abgop=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:s.strict?s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"Beginning of string anchor(%^) found - strict ABNF specified."}):s.lite&&s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"Beginning of string anchor(%^) found - apg-lite specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.aenop=function(e,n,i,s){switch(e.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:s.strict?s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"End of string anchor(%$) found - strict ABNF specified."}):s.lite&&s.errors.push({line:s.findLine(s.lines,i,s.charsLength),char:i,msg:"End of string anchor(%$) found - apg-lite specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}}}},{"../apg-lib/node-exports":375}],369:[function(e,t,n){const{Buffer:r}=e("buffer"),i=e("./transformers"),s="UTF8",o="UTF16",a="UTF16BE",c="UTF16LE",u="UTF32",l="UTF32BE",d="UTF32LE",h="UINT7",p="ASCII",f="BINARY",m="UINT8",y="UINT16",g="UINT16LE",b="UINT16BE",v="UINT32",w="UINT32LE",x="UINT32BE",E="ESCAPED",S="STRING",A=function(e,t){const n=function(e){const t={type:"",base64:!1},n=/^(base64:)?([a-zA-Z0-9]+)$/i.exec(e);return n&&(n[2]&&(t.type=n[2].toUpperCase()),n[1]&&(t.base64=!0)),t}(e.toUpperCase());if(n.base64){if(n.type===S)throw new TypeError(`type: "${e} "BASE64:" prefix not allowed with type ${S}`);if(r.isBuffer(t))n.data=i.base64.decode(t);else{if("string"!=typeof t)throw new TypeError(`type: "${e} unrecognized data type: typeof(data): ${typeof t}`);{const e=r.from(t,"ascii");n.data=i.base64.decode(e)}}}else n.data=t;switch(n.type){case s:!function(e){e.type=s;const t=e.data;e.bom=0,t.length>=3&&239===t[0]&&187===t[1]&&191===t[2]&&(e.bom=3)}(n);break;case o:case a:case c:!function(e){const t=e.data;switch(e.bom=0,e.type){case o:e.type=a,t.length>=2&&(254===t[0]&&255===t[1]?e.bom=2:255===t[0]&&254===t[1]&&(e.type=c,e.bom=2));break;case a:if(e.type=a,t.length>=2)if(254===t[0]&&255===t[1])e.bom=2;else if(255===t[0]&&254===t[1])throw new TypeError(`src type: "${a}" specified but BOM is for "${c}"`);break;case c:if(e.type=c,t.length>=0){if(254===t[0]&&255===t[1])throw new TypeError(`src type: "${c}" specified but BOM is for "${a}"`);255===t[0]&&254===t[1]&&(e.bom=2)}break;default:throw new TypeError(`UTF16 BOM: src type "${e.type}" unrecognized`)}}(n);break;case u:case l:case d:!function(e){const t=e.data;switch(e.bom=0,e.type){case u:e.type=l,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.type=d,e.bom=4));break;case l:if(e.type=l,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]))throw new TypeError(`src type: ${l} specified but BOM is for ${d}"`);break;case d:if(e.type=d,t.length>=4){if(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3])throw new TypeError(`src type: "${d}" specified but BOM is for "${l}"`);255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.bom=4)}break;default:throw new TypeError(`UTF32 BOM: src type "${e.type}" unrecognized`)}}(n);break;case y:n.type=b;break;case v:n.type=x;break;case p:n.type=h;break;case f:n.type=m;break;case h:case m:case g:case b:case w:case x:case S:case E:break;default:throw new TypeError(`type: "${e}" not recognized`)}if(n.type===S){if("string"!=typeof n.data)throw new TypeError(`type: "${e}" but data is not a string`)}else if(!r.isBuffer(n.data))throw new TypeError(`type: "${e}" but data is not a Buffer`);return n},_=function(e,t){switch(e){case s:return i.utf8.encode(t);case a:return i.utf16be.encode(t);case c:return i.utf16le.encode(t);case l:return i.utf32be.encode(t);case d:return i.utf32le.encode(t);case h:return i.uint7.encode(t);case m:return i.uint8.encode(t);case b:return i.uint16be.encode(t);case g:return i.uint16le.encode(t);case x:return i.uint32be.encode(t);case w:return i.uint32le.encode(t);case S:return i.string.encode(t);case E:return i.escaped.encode(t);default:throw new TypeError(`encode type "${e}" not recognized`)}};n.decode=function(e,t){return function(e){switch(e.type){case s:return i.utf8.decode(e.data,e.bom);case c:return i.utf16le.decode(e.data,e.bom);case a:return i.utf16be.decode(e.data,e.bom);case l:return i.utf32be.decode(e.data,e.bom);case d:return i.utf32le.decode(e.data,e.bom);case h:return i.uint7.decode(e.data);case m:return i.uint8.decode(e.data);case b:return i.uint16be.decode(e.data);case g:return i.uint16le.decode(e.data);case x:return i.uint32be.decode(e.data);case w:return i.uint32le.decode(e.data);case S:return i.string.decode(e.data);case E:return i.escaped.decode(e.data);default:throw new TypeError(`decode type "${e.type}" not recognized`)}}(A(e,t))},n.encode=function(e,t){let n,r;const A=function(e,t){if(!Array.isArray(t))throw new TypeError('dst chars: not array: "'+typeof t);if("string"!=typeof e)throw new TypeError('dst type: not string: "'+typeof e);const n=function(e){let t,n;const r={crlf:!1,lf:!1,base64:!1,type:""};for(;;){if(n=e,t=e.slice(0,5),"CRLF:"===t){r.crlf=!0,n=e.slice(5);break}if(t=e.slice(0,3),"LF:"===t){r.lf=!0,n=e.slice(3);break}break}return t=n.split(":"),1===t.length?r.type=t[0]:2===t.length&&"BASE64"===t[1]&&(r.base64=!0,r.type=t[0]),r}(e.toUpperCase());switch(n.type){case s:case a:case c:case l:case d:case h:case m:case g:case b:case w:case x:case E:break;case S:if(n.base64)throw new TypeError(`":BASE64" suffix not allowed with type ${S}`);break;case p:n.type=h;break;case f:n.type=m;break;case o:n.type=a;break;case u:n.type=l;break;case y:n.type=b;break;case v:n.type=x;break;default:throw new TypeError(`dst type unrecognized: "${e}" : must have form [crlf:|lf:]type[:base64]`)}return n}(e,t);return A.crlf?(n=i.lineEnds.crlf(t),r=_(A.type,n)):A.lf?(n=i.lineEnds.lf(t),r=_(A.type,n)):r=_(A.type,t),A.base64&&(r=i.base64.encode(r)),r};n.convert=function(e,t,r){return n.encode(r,n.decode(e,t))}},{"./transformers":370,buffer:385}],370:[function(e,t,n){const{Buffer:r}=e("buffer"),i=4294967292,s=4294967293,o=4294967294,a=4294967295,c=[0,1,3,7,15,31,63,127,255,511,1023],u=["00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F","10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F","20","21","22","23","24","25","26","27","28","29","2A","2B","2C","2D","2E","2F","30","31","32","33","34","35","36","37","38","39","3A","3B","3C","3D","3E","3F","40","41","42","43","44","45","46","47","48","49","4A","4B","4C","4D","4E","4F","50","51","52","53","54","55","56","57","58","59","5A","5B","5C","5D","5E","5F","60","61","62","63","64","65","66","67","68","69","6A","6B","6C","6D","6E","6F","70","71","72","73","74","75","76","77","78","79","7A","7B","7C","7D","7E","7F","80","81","82","83","84","85","86","87","88","89","8A","8B","8C","8D","8E","8F","90","91","92","93","94","95","96","97","98","99","9A","9B","9C","9D","9E","9F","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0","F1","F2","F3","F4","F5","F6","F7","F8","F9","FA","FB","FC","FD","FE","FF"],l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),d=[];l.forEach((e=>{d.push(e.charCodeAt(0))})),n.utf8={encode(e){const t=[];return e.forEach((e=>{if(e>=0&&e<=127)t.push(e);else if(e<=2047)t.push(192+(e>>6&c[5])),t.push(128+(e&c[6]));else if(e<55296||e>57343&&e<=65535)t.push(224+(e>>12&c[4])),t.push(128+(e>>6&c[6])),t.push(128+(e&c[6]));else{if(!(e>=65536&&e<=1114111))throw new RangeError(`utf8.encode: character out of range: char: ${e}`);{const n=e>>16&c[5];t.push(240+(n>>2)),t.push(128+((n&c[2])<<4)+(e>>12&c[4])),t.push(128+(e>>6&c[6])),t.push(128+(e&c[6]))}}})),r.from(t)},decode(e,t){function n(e,t){if(128!=(192&t))return s;const n=((e&c[5])<<6)+(t&c[6]);return n<128?i:n}function r(e,t,n){if(128!=(192&n)||128!=(192&t))return s;const r=((e&c[4])<<12)+((t&c[6])<<6)+(n&c[6]);return r<2048?i:r>=55296&&r<=57343?o:r}function u(e,t,n,r){if(128!=(192&r)||128!=(192&n)||128!=(192&t))return s;const a=(((e&c[3])<<2)+(t>>4&c[2])<<16)+((t&c[4])<<12)+((n&c[6])<<6)+(r&c[6]);return a<65536?i:a>1114111?o:a}let l,d,h,p,f,m;const y=e.length;let g=t?3:0;const b=[];for(;g<y;){d=e[g],l=a;const t=!0;for(;t;){if(d>=0&&d<=127){l=d,m=1;break}if(h=g+1,h<y&&d>=194&&d<=223){l=n(d,e[h]),m=2;break}if(p=g+2,p<y&&d>=224&&d<=239){l=r(d,e[h],e[p]),m=3;break}if(f=g+3,f<y&&d>=240&&d<=244){l=u(d,e[h],e[p],e[f]),m=4;break}break}if(l>1114111){const e=`byte[${g}]`;if(l===a)throw new RangeError(`utf8.decode: ill-formed UTF8 byte sequence found at: ${e}`);if(l===s)throw new RangeError(`utf8.decode: illegal trailing byte found at: ${e}`);if(l===o)throw new RangeError(`utf8.decode: code point out of range found at: ${e}`);if(l===i)throw new RangeError(`utf8.decode: non-shortest form found at: ${e}`);throw new RangeError(`utf8.decode: unrecognized error found at: ${e}`)}b.push(l),g+=m}return b}},n.utf16be={encode(e){const t=[];let n,i,s;for(let r=0;r<e.length;r+=1)if(n=e[r],n>=0&&n<=55295||n>=57344&&n<=65535)t.push(n>>8&c[8]),t.push(n&c[8]);else{if(!(n>=65536&&n<=1114111))throw new RangeError(`utf16be.encode: UTF16BE value out of range: char[${r}]: ${n}`);s=n-65536,i=55296+(s>>10),s=56320+(s&c[10]),t.push(i>>8&c[8]),t.push(i&c[8]),t.push(s>>8&c[8]),t.push(s&c[8])}return r.from(t)},decode(e,t){if(e.length%2>0)throw new RangeError(`utf16be.decode: data length must be even multiple of 2: length: ${e.length}`);const n=[],r=e.length;let i,s,o,a,c,u,l=t?2:0,d=0;for(;l<r;){const t=!0;for(;t;){if(o=l+1,o<r){if(c=(e[l]<<8)+e[o],c<55296||c>57343){i=c,s=2;break}if(a=l+3,a<r&&(u=(e[l+2]<<8)+e[a],c<=56319&&u>=56320&&u<=57343)){i=65536+(c-55296<<10)+(u-56320),s=4;break}}throw new RangeError(`utf16be.decode: ill-formed UTF16BE byte sequence found: byte[${l}]`)}n[d++]=i,l+=s}return n}},n.utf16le={encode(e){const t=[];let n,i,s;for(let r=0;r<e.length;r+=1)if(n=e[r],n>=0&&n<=55295||n>=57344&&n<=65535)t.push(n&c[8]),t.push(n>>8&c[8]);else{if(!(n>=65536&&n<=1114111))throw new RangeError(`utf16le.encode: UTF16LE value out of range: char[${r}]: ${n}`);s=n-65536,i=55296+(s>>10),s=56320+(s&c[10]),t.push(i&c[8]),t.push(i>>8&c[8]),t.push(s&c[8]),t.push(s>>8&c[8])}return r.from(t)},decode(e,t){if(e.length%2>0)throw new RangeError(`utf16le.decode: data length must be even multiple of 2: length: ${e.length}`);const n=[],r=e.length;let i,s,o,a,c,u,l=t?2:0,d=0;for(;l<r;){const t=!0;for(;t;){if(o=l+1,o<r){if(c=(e[o]<<8)+e[l],c<55296||c>57343){i=c,s=2;break}if(a=l+3,a<r&&(u=(e[a]<<8)+e[l+2],c<=56319&&u>=56320&&u<=57343)){i=65536+(c-55296<<10)+(u-56320),s=4;break}}throw new RangeError(`utf16le.decode: ill-formed UTF16LE byte sequence found: byte[${l}]`)}n[d++]=i,l+=s}return n}},n.utf32be={encode(e){const t=r.alloc(4*e.length);let n=0;return e.forEach((e=>{if(e>=55296&&e<=57343||e>1114111)throw new RangeError(`utf32be.encode: UTF32BE character code out of range: char[${n/4}]: ${e}`);t[n++]=e>>24&c[8],t[n++]=e>>16&c[8],t[n++]=e>>8&c[8],t[n++]=e&c[8]})),t},decode(e,t){if(e.length%4>0)throw new RangeError(`utf32be.decode: UTF32BE byte length must be even multiple of 4: length: ${e.length}`);const n=[];let r=t?4:0;for(;r<e.length;r+=4){const t=(e[r]<<24)+(e[r+1]<<16)+(e[r+2]<<8)+e[r+3];if(t>=55296&&t<=57343||t>1114111)throw new RangeError(`utf32be.decode: UTF32BE character code out of range: char[${r/4}]: ${t}`);n.push(t)}return n}},n.utf32le={encode(e){const t=r.alloc(4*e.length);let n=0;return e.forEach((e=>{if(e>=55296&&e<=57343||e>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${n/4}]: ${e}`);t[n++]=e&c[8],t[n++]=e>>8&c[8],t[n++]=e>>16&c[8],t[n++]=e>>24&c[8]})),t},decode(e,t){if(e.length%4>0)throw new RangeError(`utf32be.decode: UTF32LE byte length must be even multiple of 4: length: ${e.length}`);const n=[];let r=t?4:0;for(;r<e.length;r+=4){const t=(e[r+3]<<24)+(e[r+2]<<16)+(e[r+1]<<8)+e[r];if(t>=55296&&t<=57343||t>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${r/4}]: ${t}`);n.push(t)}return n}},n.uint7={encode(e){const t=r.alloc(e.length);for(let n=0;n<e.length;n+=1){if(e[n]>127)throw new RangeError(`uint7.encode: UINT7 character code out of range: char[${n}]: ${e[n]}`);t[n]=e[n]}return t},decode(e){const t=[];for(let n=0;n<e.length;n+=1){if(e[n]>127)throw new RangeError(`uint7.decode: UINT7 character code out of range: byte[${n}]: ${e[n]}`);t[n]=e[n]}return t}},n.uint8={encode(e){const t=r.alloc(e.length);for(let n=0;n<e.length;n+=1){if(e[n]>255)throw new RangeError(`uint8.encode: UINT8 character code out of range: char[${n}]: ${e[n]}`);t[n]=e[n]}return t},decode(e){const t=[];for(let n=0;n<e.length;n+=1)t[n]=e[n];return t}},n.uint16be={encode(e){const t=r.alloc(2*e.length);let n=0;return e.forEach((e=>{if(e>65535)throw new RangeError(`uint16be.encode: UINT16BE character code out of range: char[${n/2}]: ${e}`);t[n++]=e>>8&c[8],t[n++]=e&c[8]})),t},decode(e){if(e.length%2>0)throw new RangeError(`uint16be.decode: UINT16BE byte length must be even multiple of 2: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=2)t.push((e[n]<<8)+e[n+1]);return t}},n.uint16le={encode(e){const t=r.alloc(2*e.length);let n=0;return e.forEach((e=>{if(e>65535)throw new RangeError(`uint16le.encode: UINT16LE character code out of range: char[${n/2}]: ${e}`);t[n++]=e&c[8],t[n++]=e>>8&c[8]})),t},decode(e){if(e.length%2>0)throw new RangeError(`uint16le.decode: UINT16LE byte length must be even multiple of 2: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=2)t.push((e[n+1]<<8)+e[n]);return t}},n.uint32be={encode(e){const t=r.alloc(4*e.length);let n=0;return e.forEach((e=>{t[n++]=e>>24&c[8],t[n++]=e>>16&c[8],t[n++]=e>>8&c[8],t[n++]=e&c[8]})),t},decode(e){if(e.length%4>0)throw new RangeError(`uint32be.decode: UINT32BE byte length must be even multiple of 4: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=4)t.push((e[n]<<24)+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]);return t}},n.uint32le={encode(e){const t=r.alloc(4*e.length);let n=0;return e.forEach((e=>{t[n++]=e&c[8],t[n++]=e>>8&c[8],t[n++]=e>>16&c[8],t[n++]=e>>24&c[8]})),t},decode(e){if(e.length%4>0)throw new RangeError(`uint32le.decode: UINT32LE byte length must be even multiple of 4: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=4)t.push((e[n+3]<<24)+(e[n+2]<<16)+(e[n+1]<<8)+e[n]);return t}},n.string={encode:e=>n.utf16le.encode(e).toString("utf16le"),decode:e=>n.utf16le.decode(r.from(e,"utf16le"),0)},n.escaped={encode(e){const t=[];for(let n=0;n<e.length;n+=1){const i=e[n];if(96===i)t.push(i),t.push(i);else if(10===i)t.push(i);else if(i>=32&&i<=126)t.push(i);else{let e="";if(i>=0&&i<=31)e+=`\`x${u[i]}`;else if(i>=127&&i<=255)e+=`\`x${u[i]}`;else if(i>=256&&i<=65535)e+=`\`u${u[i>>8&c[8]]}${u[i&c[8]]}`;else{if(!(i>=65536&&i<=4294967295))throw new Error("escape.encode(char): char > 0xffffffff not allowed");{e+="`u{";const t=i>>24&c[8];t>0&&(e+=u[t]),e+=`${u[i>>16&c[8]]+u[i>>8&c[8]]+u[i&c[8]]}}`}}r.from(e).forEach((e=>{t.push(e)}))}}return r.from(t)},decode(e){function t(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function n(e,n,r){const i={char:null,nexti:e+2,error:!0};if(e+1<n&&t(r[e])&&t(r[e+1])){const t=String.fromCodePoint(r[e],r[e+1]);i.char=parseInt(t,16),Number.isNaN(i.char)||(i.error=!1)}return i}function r(e,n,r){const i={char:null,nexti:e+4,error:!0};if(e+3<n&&t(r[e])&&t(r[e+1])&&t(r[e+2])&&t(r[e+3])){const t=String.fromCodePoint(r[e],r[e+1],r[e+2],r[e+3]);i.char=parseInt(t,16),Number.isNaN(i.char)||(i.error=!1)}return i}function i(e,n,r){const i={char:null,nexti:e+4,error:!0};let s="";for(;e<n&&t(r[e]);)s+=String.fromCodePoint(r[e]),e+=1;return i.char=parseInt(s,16),125!==r[e]||Number.isNaN(i.char)||(i.error=!1),i.nexti=e+1,i}const s=[],o=e.length;let a,c,u,l=0;for(;l<o;){const t=!0;for(;t;){if(u=!0,96!==e[l]){s.push(e[l]),l+=1,u=!1;break}if(a=l+1,a>=o)break;if(96===e[a]){s.push(96),l+=2,u=!1;break}if(120===e[a]){if(c=n(a+1,o,e),c.error)break;s.push(c.char),l=c.nexti,u=!1;break}if(117===e[a]){if(123===e[a+1]){if(c=i(a+2,o,e),c.error)break;s.push(c.char),l=c.nexti,u=!1;break}if(c=r(a+1,o,e),c.error)break;s.push(c.char),l=c.nexti,u=!1;break}break}if(u)throw new Error(`escaped.decode: ill-formed escape sequence at buf[${l}]`)}return s}};const h=10;n.lineEnds={crlf(e){const t=[];let n=0;for(;n<e.length;)switch(e[n]){case 13:n+1<e.length&&e[n+1]===h?n+=2:n+=1,t.push(13),t.push(h);break;case h:t.push(13),t.push(h),n+=1;break;default:t.push(e[n]),n+=1}return t.length>0&&t[t.length-1]!==h&&(t.push(13),t.push(h)),t},lf(e){const t=[];let n=0;for(;n<e.length;)switch(e[n]){case 13:n+1<e.length&&e[n+1]===h?n+=2:n+=1,t.push(h);break;case h:t.push(h),n+=1;break;default:t.push(e[n]),n+=1}return t.length>0&&t[t.length-1]!==h&&t.push(h),t}},n.base64={encode(e){if(0===e.length)return r.alloc(0);let t,n,i,s=e.length%3;s=s>0?3-s:0;let o=(e.length+s)/3;const a=r.alloc(4*o);s>0&&(o-=1),t=0,n=0;for(let r=0;r<o;r+=1)i=e[t++]<<16,i+=e[t++]<<8,i+=e[t++],a[n++]=d[i>>18&c[6]],a[n++]=d[i>>12&c[6]],a[n++]=d[i>>6&c[6]],a[n++]=d[i&c[6]];return 0===s?a:1===s?(i=e[t++]<<16,i+=e[t]<<8,a[n++]=d[i>>18&c[6]],a[n++]=d[i>>12&c[6]],a[n++]=d[i>>6&c[6]],a[n]=d[64],a):2===s?(i=e[t]<<16,a[n++]=d[i>>18&c[6]],a[n++]=d[i>>12&c[6]],a[n++]=d[64],a[n]=d[64],a):void 0},decode(e){if(0===e.length)return r.alloc(0);const t=function(e){const t=[];let n=0;for(let r=0;r<e.length;r+=1){const i=e[r],s=!0;for(;s&&32!==i&&9!==i&&10!==i&&13!==i;){if(i>=65&&i<=90){t.push(i-65);break}if(i>=97&&i<=122){t.push(i-71);break}if(i>=48&&i<=57){t.push(i+4);break}if(43===i){t.push(62);break}if(47===i){t.push(63);break}if(61===i){t.push(64),n+=1;break}throw new RangeError(`base64.decode: invalid character buf[${r}]: ${i}`)}}if(t.length%4>0)throw new RangeError(`base64.decode: string length not integral multiple of 4: ${t.length}`);switch(n){case 0:break;case 1:if(64!==t[t.length-1])throw new RangeError("base64.decode: one tail character found: not last character");break;case 2:if(64!==t[t.length-1]||64!==t[t.length-2])throw new RangeError("base64.decode: two tail characters found: not last characters");break;default:throw new RangeError(`base64.decode: more than two tail characters found: ${n}`)}return{tail:n,buf:r.from(t)}}(e),{tail:n}=t,i=t.buf;let s,o,a,u=i.length/4;const l=r.alloc(3*u-n);n>0&&(u-=1),o=0,s=0;for(let e=0;e<u;e+=1)a=i[s++]<<18,a+=i[s++]<<12,a+=i[s++]<<6,a+=i[s++],l[o++]=a>>16&c[8],l[o++]=a>>8&c[8],l[o++]=a&c[8];return 1===n&&(a=i[s++]<<18,a+=i[s++]<<12,a+=i[s]<<6,l[o++]=a>>16&c[8],l[o]=a>>8&c[8]),2===n&&(a=i[s++]<<18,a+=i[s++]<<12,l[o]=a>>16&c[8]),l},toString(e){if(e.length%4>0)throw new RangeError(`base64.toString: input buffer length not multiple of 4: ${e.length}`);let t="",n=0;function r(e,r,i,s){switch(n){case 76:t+=`\r\n${e}${r}${i}${s}`,n=4;break;case 75:t+=`${e}\r\n${r}${i}${s}`,n=3;break;case 74:t+=`${e+r}\r\n${i}${s}`,n=2;break;case 73:t+=`${e+r+i}\r\n${s}`,n=1;break;default:t+=e+r+i+s,n+=4}}for(let t=0;t<e.length;t+=4){for(let n=t;n<t+4;n+=1)if(!((i=e[n])>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||43===i||47===i||61===i))throw new RangeError(`base64.toString: buf[${n}]: ${e[n]} : not valid base64 character code`);r(String.fromCharCode(e[t]),String.fromCharCode(e[t+1]),String.fromCharCode(e[t+2]),String.fromCharCode(e[t+3]))}var i;return t}}},{buffer:385}],371:[function(e,t,n){t.exports=function(){const t=e("./identifiers"),n=e("./utilities"),r=this;let i=null,s=null,o=null,a=0;const c=[],u=[],l=[],d=[];function h(e){let t="";for(let n=0;n<e;n+=1)t+=" ";return t}this.callbacks=[],this.astObject="astObject",this.init=function(e,t,n){let h;l.length=0,d.length=0,c.length=0,a=0,i=e,s=t,o=n;const p=[];for(h=0;h<i.length;h+=1)p.push(i[h].lower);for(h=0;h<s.length;h+=1)p.push(s[h].lower);for(a=i.length+s.length,h=0;h<a;h+=1)c[h]=!1,u[h]=null;for(const e in r.callbacks){const t=e.toLowerCase();if(h=p.indexOf(t),h<0)throw new Error(`ast.js: init: node '${e}' not a rule or udt name`);"function"==typeof r.callbacks[e]&&(c[h]=!0,u[h]=r.callbacks[e]),!0===r.callbacks[e]&&(c[h]=!0)}},this.ruleDefined=function(e){return!1!==c[e]},this.udtDefined=function(e){return!1!==c[i.length+e]},this.down=function(e,n){const r=d.length;return l.push(r),d.push({name:n,thisIndex:r,thatIndex:null,state:t.SEM_PRE,callbackIndex:e,phraseIndex:null,phraseLength:null,stack:l.length}),r},this.up=function(e,n,r,i){const s=d.length,o=l.pop();return d.push({name:n,thisIndex:s,thatIndex:o,state:t.SEM_POST,callbackIndex:e,phraseIndex:r,phraseLength:i,stack:l.length}),d[o].thatIndex=s,d[o].phraseIndex=r,d[o].phraseLength=i,s},this.translate=function(e){let n,r,i;for(let s=0;s<d.length;s+=1)i=d[s],r=u[i.callbackIndex],i.state===t.SEM_PRE?null!==r&&(n=r(t.SEM_PRE,o,i.phraseIndex,i.phraseLength,e),n===t.SEM_SKIP&&(s=i.thatIndex)):null!==r&&r(t.SEM_POST,o,i.phraseIndex,i.phraseLength,e)},this.setLength=function(e){d.length=e,l.length=e>0?d[e-1].stack:0},this.getLength=function(){return d.length},this.toXml=function(e){let r=n.charsToDec,i="decimal integer character codes";if("string"==typeof e&&e.length>=3){const t=e.slice(0,3).toLowerCase();"asc"===t?(r=n.charsToAscii,i="ASCII for printing characters, hex for non-printing"):"hex"===t?(r=n.charsToHex,i="hexadecimal integer character codes"):"uni"===t&&(r=n.charsToUnicode,i="Unicode UTF-32 integer character codes")}let s="",a=0;return s+='<?xml version="1.0" encoding="utf-8"?>\n',s+=`<root nodes="${d.length/2}" characters="${o.length}">\n`,s+=`\x3c!-- input string, ${i} --\x3e\n`,s+=h(a+2),s+=r(o),s+="\n",d.forEach((e=>{e.state===t.SEM_PRE?(a+=1,s+=h(a),s+=`<node name="${e.name}" index="${e.phraseIndex}" length="${e.phraseLength}">\n`,s+=h(a+2),s+=r(o,e.phraseIndex,e.phraseLength),s+="\n"):(s+=h(a),s+=`</node>\x3c!-- name="${e.name}" --\x3e\n`,a-=1)})),s+="</root>\n",s},this.phrases=function(){const e={};let n,r;for(n=0;n<d.length;n+=1)r=d[n],r.state===t.SEM_PRE&&(Array.isArray(e[r.name])||(e[r.name]=[]),e[r.name].push({index:r.phraseIndex,length:r.phraseLength}));return e}}},{"./identifiers":374,"./utilities":380}],372:[function(e,t,n){t.exports=function(){let e=-1,t=0;this.init=function(n){if("number"!=typeof n||n<=0)throw new Error("circular-buffer.js: init: circular buffer size must an integer > 0");t=Math.ceil(n),e=-1},this.increment=function(){return e+=1,(e+t)%t},this.maxSize=function(){return t},this.items=function(){return e+1},this.getListIndex=function(n){return-1===e||n<0||n>e||e-n>=t?-1:(n+t)%t},this.forEach=function(n){if(-1!==e)if(e<t)for(let t=0;t<=e;t+=1)n(t,t);else for(let r=e-t+1;r<=e;r+=1){n((r+t)%t,r)}}}},{}],373:[function(e,t,n){t.exports=function(){return"/* This file automatically generated by jsonToless() and LESS. */\n.apg-mono {\n font-family: monospace;\n}\n.apg-active {\n font-weight: bold;\n color: #000000;\n}\n.apg-match {\n font-weight: bold;\n color: #264BFF;\n}\n.apg-empty {\n font-weight: bold;\n color: #0fbd0f;\n}\n.apg-nomatch {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-lh-match {\n font-weight: bold;\n color: #1A97BA;\n}\n.apg-lb-match {\n font-weight: bold;\n color: #5F1687;\n}\n.apg-remainder {\n font-weight: bold;\n color: #999999;\n}\n.apg-ctrl-char {\n font-weight: bolder;\n font-style: italic;\n font-size: 0.6em;\n}\n.apg-line-end {\n font-weight: bold;\n color: #000000;\n}\n.apg-error {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-phrase {\n color: #000000;\n background-color: #8caae6;\n}\n.apg-empty-phrase {\n color: #0fbd0f;\n}\ntable.apg-state {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th,\ntable.apg-state td {\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th:nth-last-child(2),\ntable.apg-state td:nth-last-child(2) {\n text-align: right;\n}\ntable.apg-state caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-stats {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats th,\ntable.apg-stats td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace th,\ntable.apg-trace td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace th:last-child,\ntable.apg-trace th:nth-last-child(2),\ntable.apg-trace td:last-child,\ntable.apg-trace td:nth-last-child(2) {\n text-align: left;\n}\ntable.apg-grammar {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-grammar th,\ntable.apg-grammar td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar th:last-child,\ntable.apg-grammar td:last-child {\n text-align: left;\n}\ntable.apg-rules {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-rules th,\ntable.apg-rules td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules a {\n color: #003399 !important;\n}\ntable.apg-rules a:hover {\n color: #8caae6 !important;\n}\ntable.apg-attrs {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-attrs th,\ntable.apg-attrs td {\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs th:nth-child(1),\ntable.apg-attrs th:nth-child(2),\ntable.apg-attrs th:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs td:nth-child(1),\ntable.apg-attrs td:nth-child(2),\ntable.apg-attrs td:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs a {\n color: #003399 !important;\n}\ntable.apg-attrs a:hover {\n color: #8caae6 !important;\n}\n"}},{}],374:[function(e,t,n){t.exports={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,BKR:14,BKA:15,BKN:16,ABG:17,AEN:18,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,SEM_SKIP:301,ATTR_N:400,ATTR_R:401,ATTR_MR:402,LOOKAROUND_NONE:500,LOOKAROUND_AHEAD:501,LOOKAROUND_BEHIND:502,BKR_MODE_UM:601,BKR_MODE_PM:602,BKR_MODE_CS:603,BKR_MODE_CI:604}},{}],375:[function(e,t,n){t.exports={ast:e("./ast"),circular:e("./circular-buffer"),ids:e("./identifiers"),parser:e("./parser"),stats:e("./stats"),trace:e("./trace"),utils:e("./utilities"),emitcss:e("./emitcss"),style:e("./style")}},{"./ast":371,"./circular-buffer":372,"./emitcss":373,"./identifiers":374,"./parser":376,"./stats":377,"./style":378,"./trace":379,"./utilities":380}],376:[function(e,t,n){t.exports=function(){const t=e("./identifiers"),n=e("./utilities"),r="parser.js: ",i=this;let s;this.ast=null,this.stats=null,this.trace=null,this.callbacks=[];let o,a,c,u,l=null,d=null,h=0,p=0,f=0,m=null,y=null,g=null,b=null,v=null,w=0,x=1/0,E=1/0;const S=function(e,n,i){const o=`${r}evaluateRule(): `;if(e>=g.length)throw new Error(`${o}rule index: ${e} out of range`);if(n>=c)throw new Error(`${o}phrase index: ${n} out of range`);const{length:a}=l;l.push({type:t.RNM,index:e}),s(a,n,i),l.pop()},A=function(e,n,i){const o=`${r}evaluateUdt(): `;if(e>=b.length)throw new Error(`${o}udt index: ${e} out of range`);if(n>=c)throw new Error(`${o}phrase index: ${n} out of range`);const{length:a}=l;l.push({type:t.UDT,empty:b[e].empty,index:e}),s(a,n,i),l.pop()},_=function(){h=0,p=0,f=0,w=0,u=[{lookAround:t.LOOKAROUND_NONE,anchor:0,charsEnd:0,charsLength:0}],g=null,b=null,d=null,o=0,a=0,c=0,m=null,y=null,v=null,l=null},T=function(){const e=[];this.push=function(){e.push(function(){const t=e[e.length-1],n={};for(const e in t)n[e]=t[e];return n}())},this.pop=function(t){let n=t;if(n||(n=e.length-1),n<1||n>e.length)throw new Error(`${r}backRef.pop(): bad length: ${n}`);return e.length=n,e[e.length-1]},this.length=function(){return e.length},this.savePhrase=function(t,n,r){e[e.length-1][t]={phraseIndex:n,phraseLength:r}},this.getPhrase=function(t){return e[e.length-1][t]},function(){const t={};g.forEach((e=>{e.isBkr&&(t[e.lower]=null)})),b.length>0&&b.forEach((e=>{e.isBkr&&(t[e.lower]=null)})),e.push(t)}()},k=function(){const e=this;this.state=t.ACTIVE,this.phraseLength=0,this.ruleIndex=0,this.udtIndex=0,this.lookAround=u[u.length-1],this.uFrame=new T,this.pFrame=new T,this.evaluateRule=S,this.evaluateUdt=A,this.refresh=function(){e.state=t.ACTIVE,e.phraseLength=0,e.lookAround=u[u.length-1]}},C=function(){return u[u.length-1]},P=function(){return u.length>1},O=function(e,t,i){const s=`${r}initializeInputChars(): `;let u=e,l=t,h=i;if(void 0===u)throw new Error(`${s}input string is undefined`);if(null===u)throw new Error(`${s}input string is null`);if("string"==typeof u)u=n.stringToChars(u);else if(!Array.isArray(u))throw new Error(`${s}input string is not a string or array`);if(u.length>0&&"number"!=typeof u[0])throw new Error(`${s}input string not an array of integers`);if("number"!=typeof l)l=0;else if(l=Math.floor(l),l<0||l>u.length)throw new Error(`${s}input beginning index out of range: ${l}`);if("number"!=typeof h)h=u.length-l;else if(h=Math.floor(h),h<0||h>u.length-l)throw new Error(`${s}input length out of range: ${h}`);d=u,o=l,a=h,c=o+a};this.setMaxTreeDepth=function(e){if("number"!=typeof e)throw new Error(`parser: max tree depth must be integer > 0: ${e}`);if(x=Math.floor(e),x<=0)throw new Error(`parser: max tree depth must be integer > 0: ${e}`)},this.setMaxNodeHits=function(e){if("number"!=typeof e)throw new Error(`parser: max node hits must be integer > 0: ${e}`);if(E=Math.floor(e),E<=0)throw new Error(`parser: max node hits must be integer > 0: ${e}`)};const I=function(e,n,u){let h;const x=`${r}parse(): `;!function(e){const t=`${r}initializeGrammar(): `;if(!e)throw new Error(`${t}grammar object undefined`);if("grammarObject"!==e.grammarObject)throw new Error(`${t}bad grammar object`);g=e.rules,b=e.udts}(e);const E=function(e){const t=`${r}initializeStartRule(): `;let n=null;if("number"==typeof e){if(e>=g.length)throw new Error(`${t}start rule index too large: max: ${g.length}: index: ${e}`);n=e}else{if("string"!=typeof e)throw new Error(`${t}type of start rule '${typeof e}' not recognized`);{const r=e.toLowerCase();for(let e=0;e<g.length;e+=1)if(r===g[e].lower){n=g[e].index;break}if(null===n)throw new Error(`${t}start rule name '${e}' not recognized`)}}return n}(n);!function(){const e=`${r}initializeCallbacks(): `;let t,n;for(m=[],y=[],t=0;t<g.length;t+=1)m[t]=null;for(t=0;t<b.length;t+=1)y[t]=null;const s=[];for(t=0;t<g.length;t+=1)s.push(g[t].lower);for(t=0;t<b.length;t+=1)s.push(b[t].lower);for(const r in i.callbacks){if(t=s.indexOf(r.toLowerCase()),t<0)throw new Error(`${e}syntax callback '${r}' not a rule or udt name`);if(n=i.callbacks[r],n||(n=null),"function"!=typeof n&&null!==n)throw new Error(`${e}syntax callback[${r}] must be function reference or 'false' (false/null/undefined/etc.)`);t<g.length?m[t]=n:y[t-g.length]=n}for(t=0;t<b.length;t+=1)if(null===y[t])throw new Error(`${e}all UDT callbacks must be defined. UDT callback[${b[t].lower}] not a function reference`)}(),function(){const e=`${r}initializeTrace(): `;for(;;){if(void 0===i.trace){i.trace=null;break}if(null===i.trace)break;if("traceObject"!==i.trace.traceObject)throw new Error(`${e}trace object not recognized`);break}null!==i.trace&&i.trace.init(g,b,d)}(),function(){const e=`${r}initializeStats(): `;for(;;){if(void 0===i.stats){i.stats=null;break}if(null===i.stats)break;if("statsObject"!==i.stats.statsObject)throw new Error(`${e}stats object not recognized`);break}null!==i.stats&&i.stats.init(g,b)}(),function(){const e=`${r}initializeAst(): `;for(;;){if(void 0===i.ast){i.ast=null;break}if(null===i.ast)break;if("astObject"!==i.ast.astObject)throw new Error(`${e}ast object not recognized`);break}null!==i.ast&&i.ast.init(g,b,d)}();const S=new k;switch(null!=u&&(v=u),l=[{type:t.RNM,index:E}],s(0,o,S),l=null,S.state){case t.ACTIVE:throw new Error(`${x}final state should never be 'ACTIVE'`);case t.NOMATCH:h=!1;break;case t.EMPTY:case t.MATCH:h=S.phraseLength===a;break;default:throw new Error("unrecognized state")}return{success:h,state:S.state,length:a,matched:S.phraseLength,maxMatched:w,maxTreeDepth:p,nodeHits:f,inputLength:d.length,subBegin:o,subEnd:c,subLength:a}};this.parseSubstring=function(e,t,n,r,i,s){return _(),O(n,r,i),I(e,t,s)},this.parse=function(e,t,n,r){return _(),O(n,0,n.length),I(e,t,r)};const M=function(e,n,r){const i=l[e];for(let e=0;e<i.children.length&&(s(i.children[e],n,r),r.state===t.NOMATCH);e+=1);},j=function(e,n,i,s){if(n.phraseLength>i){let t=`${r}opRNM(${e.name}): callback function error: `;throw t+=`sysData.phraseLength: ${n.phraseLength}`,t+=` must be <= remaining chars: ${i}`,new Error(t)}switch(n.state){case t.ACTIVE:if(!0!==s)throw new Error(`${r}opRNM(${e.name}): callback function return error. ACTIVE state not allowed.`);break;case t.EMPTY:n.phraseLength=0;break;case t.MATCH:0===n.phraseLength&&(n.state=t.EMPTY);break;case t.NOMATCH:n.phraseLength=0;break;default:throw new Error(`${r}opRNM(${e.name}): callback function return error. Unrecognized return state: ${n.state}`)}},R=function(e,n,r){let o,a,u,h,p,f;const y=l[e],b=g[y.index],w=m[b.index],x=!P();if(x&&(a=i.ast&&i.ast.ruleDefined(y.index),a&&(o=i.ast.getLength(),i.ast.down(y.index,g[y.index].name)),h=r.uFrame.length(),p=r.pFrame.length(),r.uFrame.push(),r.pFrame.push(),f=r.pFrame,r.pFrame=new T),null===w)u=l,l=b.opcodes,s(0,n,r),l=u;else{const e=c-n;r.ruleIndex=b.index,w(r,d,n,v),j(b,r,e,!0),r.state===t.ACTIVE&&(u=l,l=b.opcodes,s(0,n,r),l=u,r.ruleIndex=b.index,w(r,d,n,v),j(b,r,e,!1))}x&&(a&&(r.state===t.NOMATCH?i.ast.setLength(o):i.ast.up(y.index,b.name,n,r.phraseLength)),r.pFrame=f,r.state===t.NOMATCH?(r.uFrame.pop(h),r.pFrame.pop(p)):b.isBkr&&(r.pFrame.savePhrase(b.lower,n,r.phraseLength),r.uFrame.savePhrase(b.lower,n,r.phraseLength)))},B=function(e,n,s){let o,a,u,h,p,f;const m=l[e],w=b[m.index];s.UdtIndex=w.index;const x=!P();x&&(u=i.ast&&i.ast.udtDefined(m.index),u&&(a=g.length+m.index,o=i.ast.getLength(),i.ast.down(a,w.name)),h=s.uFrame.length(),p=s.pFrame.length(),s.uFrame.push(),s.pFrame.push(),f=s.pFrame,s.pFrame=new T);const E=c-n;y[m.index](s,d,n,v),function(e,n,i){if(n.phraseLength>i){let t=`${r}opUDT(${e.name}): callback function error: `;throw t+=`sysData.phraseLength: ${n.phraseLength}`,t+=` must be <= remaining chars: ${i}`,new Error(t)}switch(n.state){case t.ACTIVE:throw new Error(`${r}opUDT(${e.name}): callback function return error. ACTIVE state not allowed.`);case t.EMPTY:if(!1===e.empty)throw new Error(`${r}opUDT(${e.name}): callback function return error. May not return EMPTY.`);n.phraseLength=0;break;case t.MATCH:if(0===n.phraseLength){if(!1===e.empty)throw new Error(`${r}opUDT(${e.name}): callback function return error. May not return EMPTY.`);n.state=t.EMPTY}break;case t.NOMATCH:n.phraseLength=0;break;default:throw new Error(`${r}opUDT(${e.name}): callback function return error. Unrecognized return state: ${n.state}`)}}(w,s,E),x&&(u&&(s.state===t.NOMATCH?i.ast.setLength(o):i.ast.up(a,w.name,n,s.phraseLength)),s.pFrame=f,s.state===t.NOMATCH?(s.uFrame.pop(h),s.pFrame.pop(p)):w.isBkr&&(s.pFrame.savePhrase(w.lower,n,s.phraseLength),s.uFrame.savePhrase(w.lower,n,s.phraseLength)))},N=function(e,n,r){u.push({lookAround:t.LOOKAROUND_AHEAD,anchor:n,charsEnd:c,charsLength:a}),c=d.length,a=d.length-o,s(e+1,n,r);const i=u.pop();switch(c=i.charsEnd,a=i.charsLength,r.phraseLength=0,r.state){case t.EMPTY:case t.MATCH:r.state=t.EMPTY;break;case t.NOMATCH:r.state=t.NOMATCH;break;default:throw new Error(`opAND: invalid state ${r.state}`)}},L=function(e,n,r){u.push({lookAround:t.LOOKAROUND_AHEAD,anchor:n,charsEnd:c,charsLength:a}),c=d.length,a=d.length-o,s(e+1,n,r);const i=u.pop();switch(c=i.charsEnd,a=i.charsLength,r.phraseLength=0,r.state){case t.EMPTY:case t.MATCH:r.state=t.NOMATCH;break;case t.NOMATCH:r.state=t.EMPTY;break;default:throw new Error(`opNOT: invalid state ${r.state}`)}},U=function(e,n,r){r.state=t.NOMATCH,r.phraseLength=0,r.state=0===n?t.EMPTY:t.NOMATCH},D=function(e,n,r){r.state=t.NOMATCH,r.phraseLength=0,r.state=n===d.length?t.EMPTY:t.NOMATCH},F=function(e,n,r){switch(u.push({lookAround:t.LOOKAROUND_BEHIND,anchor:n}),s(e+1,n,r),u.pop(),r.phraseLength=0,r.state){case t.EMPTY:case t.MATCH:r.state=t.EMPTY;break;case t.NOMATCH:r.state=t.NOMATCH;break;default:throw new Error(`opBKA: invalid state ${r.state}`)}},H=function(e,n,r){switch(u.push({lookAround:t.LOOKAROUND_BEHIND,anchor:n}),s(e+1,n,r),u.pop(),r.phraseLength=0,r.state){case t.EMPTY:case t.MATCH:r.state=t.NOMATCH;break;case t.NOMATCH:r.state=t.EMPTY;break;default:throw new Error(`opBKN: invalid state ${r.state}`)}};s=function(e,n,r){let o=!0;const a=l[e];if(f+=1,f>E)throw new Error(`parser: maximum number of node hits exceeded: ${E}`);if(h+=1,h>p&&(p=h,p>x))throw new Error(`parser: maximum parse tree depth exceeded: ${x}`);if(r.refresh(),null!==i.trace){const e=C();i.trace.down(a,r.state,n,r.phraseLength,e.anchor,e.lookAround)}if(u[u.length-1].lookAround===t.LOOKAROUND_BEHIND)switch(a.type){case t.ALT:M(e,n,r);break;case t.CAT:!function(e,n,r){let o,a,c,u;const d=l[e],h=r.uFrame.length(),p=r.pFrame.length();i.ast&&(a=i.ast.getLength()),o=!0,c=n,u=0;for(let e=d.children.length-1;e>=0;e-=1)if(s(d.children[e],c,r),c-=r.phraseLength,u+=r.phraseLength,r.state===t.NOMATCH){o=!1;break}o?(r.state=0===u?t.EMPTY:t.MATCH,r.phraseLength=u):(r.state=t.NOMATCH,r.phraseLength=0,r.uFrame.pop(h),r.pFrame.pop(p),i.ast&&i.ast.setLength(a))}(e,n,r);break;case t.REP:!function(e,n,r){let o,a,c,u;const d=l[e];a=n,c=0,u=0;const h=r.uFrame.length(),p=r.pFrame.length();for(i.ast&&(o=i.ast.getLength());!(a<=0)&&(s(e+1,a,r),r.state!==t.NOMATCH)&&r.state!==t.EMPTY&&(u+=1,c+=r.phraseLength,a-=r.phraseLength,u!==d.max););r.state===t.EMPTY||u>=d.min?(r.state=0===c?t.EMPTY:t.MATCH,r.phraseLength=c):(r.state=t.NOMATCH,r.phraseLength=0,r.uFrame.pop(h),r.pFrame.pop(p),i.ast&&i.ast.setLength(o))}(e,n,r);break;case t.RNM:R(e,n,r);break;case t.UDT:B(e,n,r);break;case t.AND:N(e,n,r);break;case t.NOT:L(e,n,r);break;case t.TRG:!function(e,n,r){const i=l[e];if(r.state=t.NOMATCH,r.phraseLength=0,n>0){const e=d[n-1];i.min<=e&&e<=i.max&&(r.state=t.MATCH,r.phraseLength=1)}}(e,n,r);break;case t.TBS:!function(e,n,r){let i;const s=l[e];r.state=t.NOMATCH;const o=s.string.length,a=n-o;if(a>=0){for(i=0;i<o;i+=1)if(d[a+i]!==s.string[i])return;r.state=t.MATCH,r.phraseLength=o}}(e,n,r);break;case t.TLS:!function(e,n,r){let i;const s=l[e];r.state=t.NOMATCH;const o=s.string.length;if(0===o)return void(r.state=t.EMPTY);const a=n-o;if(a>=0){for(let e=0;e<o;e+=1)if(i=d[a+e],i>=65&&i<=90&&(i+=32),i!==s.string[e])return;r.state=t.MATCH,r.phraseLength=o}}(e,n,r);break;case t.BKR:!function(e,n,r){let i,s,o,a;const c=l[e];r.state=t.NOMATCH,r.phraseLength=0,a=c.index<g.length?g[c.index].lower:b[c.index-g.length].lower;const u=c.bkrMode===t.BKR_MODE_PM?r.pFrame.getPhrase(a):r.uFrame.getPhrase(a),h=c.bkrCase===t.BKR_MODE_CI;if(null===u)return;const p=u.phraseIndex,f=u.phraseLength;if(0===f)return r.state=t.EMPTY,void(r.phraseLength=0);const m=n-f;if(m>=0){if(h){for(i=0;i<f;i+=1)if(s=d[m+i],o=d[p+i],s>=65&&s<=90&&(s+=32),o>=65&&o<=90&&(o+=32),s!==o)return;r.state=t.MATCH,r.phraseLength=f}else for(i=0;i<f;i+=1)if(s=d[m+i],o=d[p+i],s!==o)return;r.state=t.MATCH,r.phraseLength=f}}(e,n,r);break;case t.BKA:F(e,n,r);break;case t.BKN:H(e,n,r);break;case t.ABG:U(0,n,r);break;case t.AEN:D(0,n,r);break;default:o=!1}else switch(a.type){case t.ALT:M(e,n,r);break;case t.CAT:!function(e,n,r){let o,a,c,u;const d=l[e],h=r.uFrame.length(),p=r.pFrame.length();i.ast&&(a=i.ast.getLength()),o=!0,c=n,u=0;for(let e=0;e<d.children.length;e+=1){if(s(d.children[e],c,r),r.state===t.NOMATCH){o=!1;break}c+=r.phraseLength,u+=r.phraseLength}o?(r.state=0===u?t.EMPTY:t.MATCH,r.phraseLength=u):(r.state=t.NOMATCH,r.phraseLength=0,r.uFrame.pop(h),r.pFrame.pop(p),i.ast&&i.ast.setLength(a))}(e,n,r);break;case t.REP:!function(e,n,r){let o,a,u,d;const h=l[e];if(0===h.max)return r.state=t.EMPTY,void(r.phraseLength=0);a=n,u=0,d=0;const p=r.uFrame.length(),f=r.pFrame.length();for(i.ast&&(o=i.ast.getLength());!(a>=c)&&(s(e+1,a,r),r.state!==t.NOMATCH)&&r.state!==t.EMPTY&&(d+=1,u+=r.phraseLength,a+=r.phraseLength,d!==h.max););r.state===t.EMPTY||d>=h.min?(r.state=0===u?t.EMPTY:t.MATCH,r.phraseLength=u):(r.state=t.NOMATCH,r.phraseLength=0,r.uFrame.pop(p),r.pFrame.pop(f),i.ast&&i.ast.setLength(o))}(e,n,r);break;case t.RNM:R(e,n,r);break;case t.UDT:B(e,n,r);break;case t.AND:N(e,n,r);break;case t.NOT:L(e,n,r);break;case t.TRG:!function(e,n,r){const i=l[e];r.state=t.NOMATCH,n<c&&i.min<=d[n]&&d[n]<=i.max&&(r.state=t.MATCH,r.phraseLength=1)}(e,n,r);break;case t.TBS:!function(e,n,r){let i;const s=l[e],o=s.string.length;if(r.state=t.NOMATCH,n+o<=c){for(i=0;i<o;i+=1)if(d[n+i]!==s.string[i])return;r.state=t.MATCH,r.phraseLength=o}}(e,n,r);break;case t.TLS:!function(e,n,r){let i,s;const o=l[e];r.state=t.NOMATCH;const a=o.string.length;if(0!==a){if(n+a<=c){for(i=0;i<a;i+=1)if(s=d[n+i],s>=65&&s<=90&&(s+=32),s!==o.string[i])return;r.state=t.MATCH,r.phraseLength=a}}else r.state=t.EMPTY}(e,n,r);break;case t.BKR:!function(e,n,r){let i,s,o,a;const u=l[e];r.state=t.NOMATCH,a=u.index<g.length?g[u.index].lower:b[u.index-g.length].lower;const h=u.bkrMode===t.BKR_MODE_PM?r.pFrame.getPhrase(a):r.uFrame.getPhrase(a),p=u.bkrCase===t.BKR_MODE_CI;if(null===h)return;const f=h.phraseIndex,m=h.phraseLength;if(0!==m){if(n+m<=c){if(p){for(i=0;i<m;i+=1)if(s=d[n+i],o=d[f+i],s>=65&&s<=90&&(s+=32),o>=65&&o<=90&&(o+=32),s!==o)return;r.state=t.MATCH,r.phraseLength=m}else for(i=0;i<m;i+=1)if(s=d[n+i],o=d[f+i],s!==o)return;r.state=t.MATCH,r.phraseLength=m}}else r.state=t.EMPTY}(e,n,r);break;case t.BKA:F(e,n,r);break;case t.BKN:H(e,n,r);break;case t.ABG:U(0,n,r);break;case t.AEN:D(0,n,r);break;default:o=!1}if(!P()&&n+r.phraseLength>w&&(w=n+r.phraseLength),null!==i.stats&&i.stats.collect(a,r),null!==i.trace){const e=C();i.trace.up(a,r.state,n,r.phraseLength,e.anchor,e.lookAround)}return h-=1,o}}},{"./identifiers":374,"./utilities":380}],377:[function(e,t,n){t.exports=function(){const t=e("./identifiers"),n=e("./utilities"),r=e("./style");let i=[],s=[];const o=[];let a;const c=[],u=[];this.statsObject="statsObject";const l=function(e,t){return e.lower<t.lower?-1:e.lower>t.lower?1:0},d=function(e,t){return e.total<t.total?1:e.total>t.total?-1:l(e,t)},h=function(e,t){return e.index<t.index?-1:e.index>t.index?1:0},p=function(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},f=function(e,n){switch(e.total+=1,n){case t.EMPTY:e.empty+=1;break;case t.MATCH:e.match+=1;break;case t.NOMATCH:e.nomatch+=1;break;default:throw new Error(`stats.js: collect(): incStat(): unrecognized state: ${n}`)}},m=function(e,t){let n="";return n+="<tr>",n+=`<td class="${r.CLASS_ACTIVE}">${e}</td>`,n+=`<td class="${r.CLASS_EMPTY}">${t.empty}</td>`,n+=`<td class="${r.CLASS_MATCH}">${t.match}</td>`,n+=`<td class="${r.CLASS_NOMATCH}">${t.nomatch}</td>`,n+=`<td class="${r.CLASS_ACTIVE}">${t.total}</td>`,n+="</tr>\n",n},y=function(){let e="";return e+=m("ALT",o[t.ALT]),e+=m("CAT",o[t.CAT]),e+=m("REP",o[t.REP]),e+=m("RNM",o[t.RNM]),e+=m("TRG",o[t.TRG]),e+=m("TBS",o[t.TBS]),e+=m("TLS",o[t.TLS]),e+=m("UDT",o[t.UDT]),e+=m("AND",o[t.AND]),e+=m("NOT",o[t.NOT]),e+=m("BKR",o[t.BKR]),e+=m("BKA",o[t.BKA]),e+=m("BKN",o[t.BKN]),e+=m("ABG",o[t.ABG]),e+=m("AEN",o[t.AEN]),e+=m("totals",a),e},g=function(){let e="";e+="<tr><th></th><th></th><th></th><th></th><th></th></tr>\n",e+="<tr><th>rules</th><th></th><th></th><th></th><th></th></tr>\n";for(let t=0;t<i.length;t+=1)c[t].total>0&&(e+="<tr>",e+=`<td class="${r.CLASS_ACTIVE}">${c[t].name}</td>`,e+=`<td class="${r.CLASS_EMPTY}">${c[t].empty}</td>`,e+=`<td class="${r.CLASS_MATCH}">${c[t].match}</td>`,e+=`<td class="${r.CLASS_NOMATCH}">${c[t].nomatch}</td>`,e+=`<td class="${r.CLASS_ACTIVE}">${c[t].total}</td>`,e+="</tr>\n");if(s.length>0){e+="<tr><th></th><th></th><th></th><th></th><th></th></tr>\n",e+="<tr><th>udts</th><th></th><th></th><th></th><th></th></tr>\n";for(let t=0;t<s.length;t+=1)u[t].total>0&&(e+="<tr>",e+=`<td class="${r.CLASS_ACTIVE}">${u[t].name}</td>`,e+=`<td class="${r.CLASS_EMPTY}">${u[t].empty}</td>`,e+=`<td class="${r.CLASS_MATCH}">${u[t].match}</td>`,e+=`<td class="${r.CLASS_NOMATCH}">${u[t].nomatch}</td>`,e+=`<td class="${r.CLASS_ACTIVE}">${u[t].total}</td>`,e+="</tr>\n")}return e};this.validate=function(e){let t=!1;return"string"==typeof e&&"stats"===e&&(t=!0),t},this.init=function(e,n){i=e,s=n,function(){o.length=0,a=new p,o[t.ALT]=new p,o[t.CAT]=new p,o[t.REP]=new p,o[t.RNM]=new p,o[t.TRG]=new p,o[t.TBS]=new p,o[t.TLS]=new p,o[t.UDT]=new p,o[t.AND]=new p,o[t.NOT]=new p,o[t.BKR]=new p,o[t.BKA]=new p,o[t.BKN]=new p,o[t.ABG]=new p,o[t.AEN]=new p,c.length=0;for(let e=0;e<i.length;e+=1)c.push({empty:0,match:0,nomatch:0,total:0,name:i[e].name,lower:i[e].lower,index:i[e].index});if(s.length>0){u.length=0;for(let e=0;e<s.length;e+=1)u.push({empty:0,match:0,nomatch:0,total:0,name:s[e].name,lower:s[e].lower,index:s[e].index})}}()},this.collect=function(e,n){f(a,n.state,n.phraseLength),f(o[e.type],n.state,n.phraseLength),e.type===t.RNM&&f(c[e.index],n.state,n.phraseLength),e.type===t.UDT&&f(u[e.index],n.state,n.phraseLength)},this.toHtml=function(e,t){let n="";n+=`<table class="${r.CLASS_STATS}">\n`,"string"==typeof t&&(n+=`<caption>${t}</caption>\n`),n+=`<tr><th class="${r.CLASS_ACTIVE}">ops</th>\n`,n+=`<th class="${r.CLASS_EMPTY}">EMPTY</th>\n`,n+=`<th class="${r.CLASS_MATCH}">MATCH</th>\n`,n+=`<th class="${r.CLASS_NOMATCH}">NOMATCH</th>\n`,n+=`<th class="${r.CLASS_ACTIVE}">totals</th></tr>\n`;for(;;){if(void 0===e){n+=y();break}if(null===e){n+=y();break}if("ops"===e){n+=y();break}if("index"===e){c.sort(h),u.length>0&&u.sort(h),n+=y(),n+=g();break}if("hits"===e){c.sort(d),u.length>0&&u.sort(h),n+=y(),n+=g();break}if("alpha"===e){c.sort(l),u.length>0&&u.sort(l),n+=y(),n+=g();break}break}return n+="</table>\n",n},this.toHtmlPage=function(e,t,r){return n.htmlToPage(this.toHtml(e,t),r)}}},{"./identifiers":374,"./style":378,"./utilities":380}],378:[function(e,t,n){t.exports={CLASS_MONOSPACE:"apg-mono",CLASS_ACTIVE:"apg-active",CLASS_EMPTY:"apg-empty",CLASS_MATCH:"apg-match",CLASS_NOMATCH:"apg-nomatch",CLASS_LOOKAHEAD:"apg-lh-match",CLASS_LOOKBEHIND:"apg-lb-match",CLASS_REMAINDER:"apg-remainder",CLASS_CTRLCHAR:"apg-ctrl-char",CLASS_LINEEND:"apg-line-end",CLASS_ERROR:"apg-error",CLASS_PHRASE:"apg-phrase",CLASS_EMPTYPHRASE:"apg-empty-phrase",CLASS_STATE:"apg-state",CLASS_STATS:"apg-stats",CLASS_TRACE:"apg-trace",CLASS_GRAMMAR:"apg-grammar",CLASS_RULES:"apg-rules",CLASS_RULESLINK:"apg-rules-link",CLASS_ATTRIBUTES:"apg-attrs"}},{}],379:[function(e,t,n){t.exports=function(){const t=e("./utilities"),n=e("./style"),r=new(e("./circular-buffer")),i=e("./identifiers"),s="trace.js: ",o=this,a=16,c=80,u=[];let l=5e3,d=-1,h=0,p=0;const f=[];let m=null,y=null,g=null;const b=[],v=[],w=`<span class="${n.CLASS_LINEEND}">&bull;</span>`,x=`<span class="${n.CLASS_LINEEND}">&hellip;</span>`,E=`<span class="${n.CLASS_EMPTY}">&#120634;</span>`;this.traceObject="traceObject",this.filter={operators:[],rules:[]},this.setMaxRecords=function(e,t){d=-1,"number"==typeof e&&e>0?(l=Math.ceil(e),"number"==typeof t&&(d=Math.floor(t),d<0&&(d=-1))):l=0},this.getMaxRecords=function(){return l},this.getLastRecord=function(){return d},this.init=function(e,t,n){u.length=0,f.length=0,h=0,p=0,m=n,y=e,g=t,function(){const e=function(e){b[i.ALT]=e,b[i.CAT]=e,b[i.REP]=e,b[i.TLS]=e,b[i.TBS]=e,b[i.TRG]=e,b[i.AND]=e,b[i.NOT]=e,b[i.BKR]=e,b[i.BKA]=e,b[i.BKN]=e,b[i.ABG]=e,b[i.AEN]=e};let t=0;for(const e in o.filter.operators)t+=1;if(0!==t){for(const t in o.filter.operators){const n=t.toUpperCase();if("<ALL>"===n)return void e(!0);if("<NONE>"===n)return void e(!1)}e(!1);for(const e in o.filter.operators){const t=e.toUpperCase();if("ALT"===t)b[i.ALT]=!0===o.filter.operators[e];else if("CAT"===t)b[i.CAT]=!0===o.filter.operators[e];else if("REP"===t)b[i.REP]=!0===o.filter.operators[e];else if("AND"===t)b[i.AND]=!0===o.filter.operators[e];else if("NOT"===t)b[i.NOT]=!0===o.filter.operators[e];else if("TLS"===t)b[i.TLS]=!0===o.filter.operators[e];else if("TBS"===t)b[i.TBS]=!0===o.filter.operators[e];else if("TRG"===t)b[i.TRG]=!0===o.filter.operators[e];else if("BKR"===t)b[i.BKR]=!0===o.filter.operators[e];else if("BKA"===t)b[i.BKA]=!0===o.filter.operators[e];else if("BKN"===t)b[i.BKN]=!0===o.filter.operators[e];else if("ABG"===t)b[i.ABG]=!0===o.filter.operators[e];else{if("AEN"!==t)throw new Error(`${s}initOpratorFilter: '${e}' not a valid operator name. Must be <all>, <none>, alt, cat, rep, tls, tbs, trg, and, not, bkr, bka or bkn`);b[i.AEN]=!0===o.filter.operators[e]}}}else e(!1)}(),function(){const e=function(e){b[i.RNM]=e,b[i.UDT]=e;const t=y.length+g.length;v.length=0;for(let n=0;n<t;n+=1)v.push(e)};let t,n;const r=[];for(n=0;n<y.length;n+=1)r.push(y[n].lower);for(n=0;n<g.length;n+=1)r.push(g[n].lower);v.length=0,t=0;for(const e in o.filter.rules)t+=1;if(0!==t){for(const t in o.filter.rules){const n=t.toLowerCase();if("<all>"===n)return void e(!0);if("<none>"===n)return void e(!1)}e(!1),b[i.RNM]=!0,b[i.UDT]=!0;for(const e in o.filter.rules){const t=e.toLowerCase();if(n=r.indexOf(t),n<0)throw new Error(`${s}initRuleFilter: '${e}' not a valid rule or udt name`);v[n]=!0===o.filter.rules[e]}}else e(!0)}(),r.init(l)};const S=function(e){let t=!1;return t=e.type===i.RNM?!(!b[e.type]||!v[e.index]):e.type===i.UDT?!(!b[e.type]||!v[y.length+e.index]):b[e.type],t},A=function(e){return-1===d||e<=d};this.down=function(e,t,n,i,s,o){A(h)&&S(e)&&(f.push(h),u[r.increment()]={dirUp:!1,depth:p,thisLine:h,thatLine:void 0,opcode:e,state:t,phraseIndex:n,phraseLength:i,lookAnchor:s,lookAround:o},h+=1,p+=1)},this.up=function(e,t,n,i,s,o){if(A(h)&&S(e)){const a=h,c=f.pop(),l=r.getListIndex(c);-1!==l&&(u[l].thatLine=a),p-=1,u[r.increment()]={dirUp:!0,depth:p,thisLine:a,thatLine:c,opcode:e,state:t,phraseIndex:n,phraseLength:i,lookAnchor:s,lookAround:o},h+=1}};this.toTree=function(e){const n=function(){function e(e,n){let r,s,o;if(n)switch(e.op={id:n.type,name:t.opcodeToString(n.type)},e.opData=void 0,n.type){case i.RNM:e.opData=y[n.index].name;break;case i.UDT:e.opData=g[n.index].name;break;case i.BKR:r=n.index<y.length?y[n.index].name:g[n.index-y.length].name,s=n.bkrCase===i.BKR_MODE_CI?"%i":"%s",o=n.bkrMode===i.BKR_MODE_UM?"%u":"%p",e.opData=`\\\\${s}${o}${r}`;break;case i.TLS:e.opData=[];for(let t=0;t<n.string.length;t+=1)e.opData.push(n.string[t]);break;case i.TBS:e.opData=[];for(let t=0;t<n.string.length;t+=1)e.opData.push(n.string[t]);break;case i.TRG:case i.REP:e.opData=[n.min,n.max];break;default:throw new Error("unrecognized opcode")}else e.op={id:void 0,name:void 0},e.opData=void 0}function n(e,t,n){return e===i.MATCH?{index:t,length:n}:e===i.NOMATCH||e===i.EMPTY?{index:t,length:0}:null}let s=-1;function o(r,i,o){const a={id:s++,branch:-1,parent:r,up:!1,down:!1,depth:o,children:[]};return i?(a.down=!0,a.state={id:i.state,name:t.stateToString(i.state)},a.phrase=null,e(a,i.opcode)):(a.state={id:void 0,name:void 0},a.phrase=n(),e(a,void 0)),a}function a(r,i){i&&(r.up=!0,r.state={id:i.state,name:t.stateToString(i.state)},r.phrase=n(i.state,i.phraseIndex,i.phraseLength),r.down||e(r,i.opcode))}let c=0,l=-1,d=1;const h=[];let f,b,v,w,x=!0;const E=o(null,null,-1);for(h.push(E),b=E,r.forEach((e=>{if(w=u[e],x&&(x=!1,w.depth>0)){const e=w.dirUp?w.depth+1:w.depth;for(let t=0;t<e;t+=1)v=b,b=o(b,null,t),h.push(b),v.children.push(b)}w.dirUp?(b=h.pop(),a(b,w),b=h[h.length-1]):(v=b,b=o(b,w,w.depth),h.push(b),v.children.push(b))}));h.length>1;)b=h.pop(),a(b,null);if(0===E.children.length)throw new Error("trace.toTree(): parse tree has no nodes");if(0===h.length)throw new Error("trace.toTree(): integrity check: dummy root node disappeared?");f=E.children[0];let S=f;for(;f&&!f.down&&!f.up;)S=f,f=f.children[0];f=S,f.leftMost=!0,f.rightMost=!0,function e(t){if(l+=1,t.branch=d,l>p&&(p=l),0===t.children.length)c+=1;else for(let n=0;n<t.children.length;n+=1)n>0&&(d+=1),t.children[n].leftMost=!1,t.children[n].rightMost=!1,t.leftMost&&(t.children[n].leftMost=0===n),t.rightMost&&(t.children[n].rightMost=n===t.children.length-1),e(t.children[n]);l-=1}(f),f.branch=0;const A={string:[]};for(let e=0;e<m.length;e+=1)A.string[e]=m[e];A.rules=[];for(let e=0;e<y.length;e+=1)A.rules[e]=y[e].name;A.udts=[];for(let e=0;e<g.length;e+=1)A.udts[e]=g[e].name;let _;return A.id={},A.id.ALT={id:i.ALT,name:"ALT"},A.id.CAT={id:i.CAT,name:"CAT"},A.id.REP={id:i.REP,name:"REP"},A.id.RNM={id:i.RNM,name:"RNM"},A.id.TLS={id:i.TLS,name:"TLS"},A.id.TBS={id:i.TBS,name:"TBS"},A.id.TRG={id:i.TRG,name:"TRG"},A.id.UDT={id:i.UDT,name:"UDT"},A.id.AND={id:i.AND,name:"AND"},A.id.NOT={id:i.NOT,name:"NOT"},A.id.BKR={id:i.BKR,name:"BKR"},A.id.BKA={id:i.BKA,name:"BKA"},A.id.BKN={id:i.BKN,name:"BKN"},A.id.ABG={id:i.ABG,name:"ABG"},A.id.AEN={id:i.AEN,name:"AEN"},A.id.ACTIVE={id:i.ACTIVE,name:"ACTIVE"},A.id.MATCH={id:i.MATCH,name:"MATCH"},A.id.EMPTY={id:i.EMPTY,name:"EMPTY"},A.id.NOMATCH={id:i.NOMATCH,name:"NOMATCH"},A.treeDepth=p,A.leafNodes=c,_=f.down?f.up?"none":"right":f.up?"left":"both",A.branchesIncomplete=_,A.tree=function e(t,n){let r;const i={};if(i.id=t.id,i.branch=t.branch,i.leftMost=t.leftMost,i.rightMost=t.rightMost,r=t.state.name?t.state.name:"ACTIVE",i.state={id:t.state.id,name:r},r=t.op.name?t.op.name:"?",i.op={id:t.op.id,name:r},"string"==typeof t.opData)i.opData=t.opData;else if(Array.isArray(t.opData)){i.opData=[];for(let e=0;e<t.opData.length;e+=1)i.opData[e]=t.opData[e]}else i.opData=void 0;t.phrase?i.phrase={index:t.phrase.index,length:t.phrase.length}:i.phrase=null,i.depth=t.depth,i.children=[];for(let r=0;r<t.children.length;r+=1)t.children.length,i.children[r]=e(t.children[r],n);return i}(f,f.depth),A}();return e?JSON.stringify(n):n},this.toHtmlPage=function(e,n,r){return t.htmlToPage(this.toHtml(e,n),r)};this.indent=function(e){let t="";for(let n=0;n<e;n+=1)t+=".";return t};const _=function(e,n,r,i,s){if(0===i)return"";let o="";const c=s?",":"";switch(e){case a:o=c+t.charsToHex(n,r,i);break;case 10:if(s)return`,${t.charsToDec(n,r,i)}`;o=c+t.charsToDec(n,r,i);break;case 32:o=t.charsToUnicode(n,r,i);break;default:o=t.charsToAsciiHtml(n,r,i)}return o},T=function(e,t,r,s,o,a){let u,l,d,h,p="",f=w;const m=`<span class="${n.CLASS_REMAINDER}">`,y="</span>";let g=!1;switch(r){case i.EMPTY:p+=E;case i.NOMATCH:case i.ACTIVE:u=s,l=0,d=s,h=t.length-d;break;case i.MATCH:u=s,l=o,d=s+l,h=t.length-d;break;default:throw new Error("unrecognized state")}return f=w,l>c?(l=c,f=x,h=0):l+h>c&&(f=x,h=c-l),l>0&&(p+=a,p+=_(e,t,u,l,g),p+=y,g=!0),h>0&&(p+=m,p+=_(e,t,d,h,g),p+=y),p+f},k=function(e){if(null===y)return"";let s,l,d,h,p,f,b="";return b+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th>",b+="<th>operator</th><th>phrase</th></tr>\n",r.forEach((r=>{const v=u[r];switch(s=v.thisLine,l=void 0!==v.thatLine?v.thatLine:"--",d=!1,h=!1,p=!1,v.lookAround===i.LOOKAROUND_AHEAD&&(d=!0,p=!0,f=v.lookAnchor),v.opcode.type!==i.AND&&v.opcode.type!==i.NOT||(d=!0,p=!0,f=v.phraseIndex),v.lookAround===i.LOOKAROUND_BEHIND&&(h=!0,p=!0,f=v.lookAnchor),v.opcode.type!==i.BKA&&v.opcode.type!==i.BKN||(h=!0,p=!0,f=v.phraseIndex),b+="<tr>",b+=`<td>${s}</td><td>${l}</td>`,b+=`<td>${v.phraseIndex}</td>`,b+=`<td>${v.phraseLength}</td>`,b+=`<td>${v.depth}</td>`,b+="<td>",v.state){case i.ACTIVE:b+=`<span class="${n.CLASS_ACTIVE}">&darr;&nbsp;</span>`;break;case i.MATCH:b+=`<span class="${n.CLASS_MATCH}">&uarr;M</span>`;break;case i.NOMATCH:b+=`<span class="${n.CLASS_NOMATCH}">&uarr;N</span>`;break;case i.EMPTY:b+=`<span class="${n.CLASS_EMPTY}">&uarr;E</span>`;break;default:b+=`<span class="${n.CLASS_ACTIVE}">--</span>`}if(b+="</td>",b+="<td>",b+=o.indent(v.depth),d?b+=`<span class="${n.CLASS_LOOKAHEAD}">`:h&&(b+=`<span class="${n.CLASS_LOOKBEHIND}">`),b+=t.opcodeToString(v.opcode.type),v.opcode.type===i.RNM&&(b+=`(${y[v.opcode.index].name}) `),v.opcode.type===i.BKR){const e=v.opcode.bkrCase===i.BKR_MODE_CI?"%i":"%s",t=v.opcode.bkrMode===i.BKR_MODE_UM?"%u":"%p";b+=`(\\${e}${t}${y[v.opcode.index].name}) `}v.opcode.type===i.UDT&&(b+=`(${g[v.opcode.index].name}) `),v.opcode.type===i.TRG&&(b+=`(${function(e,t){let n="";if(t.type===i.TRG)if(e===a||32===e){let r=t.min.toString(16).toUpperCase();r.length%2!=0&&(r=`0${r}`),n+=e===a?"%x":"U+",n+=r,r=t.max.toString(16).toUpperCase(),r.length%2!=0&&(r=`0${r}`),n+=`&ndash;${r}`}else n=`%d${t.min.toString(10)}&ndash;${t.max.toString(10)}`;return n}(e,v.opcode)}) `),v.opcode.type===i.TBS&&(b+=`(${function(e,t){let n="";if(t.type===i.TBS){const r=Math.min(t.string.length,10);if(e===a||32===e){n+=e===a?"%x":"U+";for(let e=0;e<r;e+=1){let r;e>0&&(n+="."),r=t.string[e].toString(16).toUpperCase(),r.length%2!=0&&(r=`0${r}`),n+=r}}else{n="%d";for(let e=0;e<r;e+=1)e>0&&(n+="."),n+=t.string[e].toString(10)}r<t.string.length&&(n+=x)}return n}(e,v.opcode)}) `),v.opcode.type===i.TLS&&(b+=`(${function(e,n){let r="";if(n.type===i.TLS){const i=Math.min(n.string.length,5);if(e===a||10===e){let t,s,o;e===a?(r="%x",o=16):(r="%d",o=10);for(let e=0;e<i;e+=1)e>0&&(r+="."),s=n.string[e],s>=97&&s<=122?(t=s-32,r+=`${t.toString(o)}/${s.toString(o)}`.toUpperCase()):s>=65&&s<=90?(t=s,s+=32,r+=`${t.toString(o)}/${s.toString(o)}`.toUpperCase()):r+=s.toString(o).toUpperCase();i<n.string.length&&(r+=x)}else{r='"';for(let e=0;e<i;e+=1)r+=t.asciiChars[n.string[e]];i<n.string.length&&(r+=x),r+='"'}}return r}(e,v.opcode)}) `),v.opcode.type===i.REP&&(b+=`(${function(e,t){let n="";if(t.type===i.REP)if(e===a){let e=t.min.toString(16).toUpperCase();e.length%2!=0&&(e=`0${e}`),n=`x${e}`,t.max<1/0?(e=t.max.toString(16).toUpperCase(),e.length%2!=0&&(e=`0${e}`)):e="inf",n+=`&ndash;${e}`}else n=t.max<1/0?`${t.min.toString(10)}&ndash;${t.max.toString(10)}`:`${t.min.toString(10)}&ndash;inf`;return n}(e,v.opcode)}) `),p&&(b+="</span>"),b+="</td>",b+="<td>",b+=h?function(e,t,r,s,o,a){let u,l,d,h,p="",f=w;const m=`<span class="${n.CLASS_LOOKBEHIND}">`,y=`<span class="${n.CLASS_REMAINDER}">`,g="</span>";let b=!1;switch(r){case i.EMPTY:p+=E;case i.NOMATCH:case i.MATCH:case i.ACTIVE:u=s-o,l=a-u,d=a,h=t.length-d;break;default:throw new Error("unrecognized state")}return f=w,l>c?(l=c,f=x,h=0):l+h>c&&(f=x,h=c-l),l>0&&(p+=m,p+=_(e,t,u,l,b),p+=g,b=!0),h>0&&(p+=y,p+=_(e,t,d,h,b),p+=g),p+f}(e,m,v.state,v.phraseIndex,v.phraseLength,f):d?function(e,t,r,i,s){const o=`<span class="${n.CLASS_LOOKAHEAD}">`;return T(e,t,r,i,s,o)}(e,m,v.state,v.phraseIndex,v.phraseLength):function(e,t,r,i,s){const o=`<span class="${n.CLASS_MATCH}">`;return T(e,t,r,i,s,o)}(e,m,v.state,v.phraseIndex,v.phraseLength),b+="</td></tr>\n"})),b+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th>",b+="<th>operator</th><th>phrase</th></tr>\n",b+="</table>\n",b};this.toHtml=function(e,t){let r=8;if("string"==typeof e&&e.length>=3){const t=e.toLowerCase().slice(0,3);"hex"===t?r=a:"dec"===t?r=10:"uni"===t&&(r=32)}let i="";return i+=function(e,t){let r;switch(e){case a:r="hexadecimal";break;case 10:r="decimal";break;case 8:r="ASCII";break;case 32:r="UNICODE";break;default:throw new Error(`${s}htmlHeader: unrecognized mode: ${e}`)}let i="";return i+=`<p>display mode: ${r}</p>\n`,i+=`<table class="${n.CLASS_TRACE}">\n`,"string"==typeof t&&(i+=`<caption>${t}</caption>`),i}(r,t),i+=k(r),i+=function(){let e="";return e+="</table>\n",e+=`<p class="${n.CLASS_MONOSPACE}">legend:<br>\n`,e+="(a)&nbsp;-&nbsp;line number<br>\n",e+="(b)&nbsp;-&nbsp;matching line number<br>\n",e+="(c)&nbsp;-&nbsp;phrase offset<br>\n",e+="(d)&nbsp;-&nbsp;phrase length<br>\n",e+="(e)&nbsp;-&nbsp;tree depth<br>\n",e+="(f)&nbsp;-&nbsp;operator state<br>\n",e+=`&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<span class="${n.CLASS_ACTIVE}">&darr;</span>&nbsp;&nbsp;phrase opened<br>\n`,e+=`&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<span class="${n.CLASS_MATCH}">&uarr;M</span> phrase matched<br>\n`,e+=`&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<span class="${n.CLASS_EMPTY}">&uarr;E</span> empty phrase matched<br>\n`,e+=`&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<span class="${n.CLASS_NOMATCH}">&uarr;N</span> phrase not matched<br>\n`,e+="operator&nbsp;-&nbsp;ALT, CAT, REP, RNM, TRG, TLS, TBS<sup>&dagger;</sup>, UDT, AND, NOT, BKA, BKN, BKR, ABG, AEN<sup>&Dagger;</sup><br>\n",e+="phrase&nbsp;&nbsp;&nbsp;-&nbsp;up to 80 characters of the phrase being matched<br>\n",e+=`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<span class="${n.CLASS_MATCH}">matched characters</span><br>\n`,e+=`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<span class="${n.CLASS_LOOKAHEAD}">matched characters in look ahead mode</span><br>\n`,e+=`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<span class="${n.CLASS_LOOKBEHIND}">matched characters in look behind mode</span><br>\n`,e+=`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<span class="${n.CLASS_REMAINDER}">remainder characters(not yet examined by parser)</span><br>\n`,e+=`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<span class="${n.CLASS_CTRLCHAR}">control characters, TAB, LF, CR, etc. (ASCII mode only)</span><br>\n`,e+=`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;${E} empty string<br>\n`,e+=`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;${w} end of input string<br>\n`,e+=`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;${x} input string display truncated<br>\n`,e+="</p>\n",e+=`<p class="${n.CLASS_MONOSPACE}">\n`,e+="<sup>&dagger;</sup>original ABNF operators:<br>\n",e+="ALT - alternation<br>\n",e+="CAT - concatenation<br>\n",e+="REP - repetition<br>\n",e+="RNM - rule name<br>\n",e+="TRG - terminal range<br>\n",e+="TLS - terminal literal string (case insensitive)<br>\n",e+="TBS - terminal binary string (case sensitive)<br>\n",e+="<br>\n",e+="<sup>&Dagger;</sup>super set SABNF operators:<br>\n",e+="UDT - user-defined terminal<br>\n",e+="AND - positive look ahead<br>\n",e+="NOT - negative look ahead<br>\n",e+="BKA - positive look behind<br>\n",e+="BKN - negative look behind<br>\n",e+="BKR - back reference<br>\n",e+="ABG - anchor - begin of input string<br>\n",e+="AEN - anchor - end of input string<br>\n",e+="</p>\n",e}(),i}}},{"./circular-buffer":372,"./identifiers":374,"./style":378,"./utilities":380}],380:[function(e,t,n){const r=e("./style"),i=e("../apg-conv-api/converter"),s=e("./emitcss"),o=e("./identifiers"),a="utilities.js: ",c=function(e,t,n){let r,i=t;for(;;){if(e<=0){i=0,r=0;break}if("number"!=typeof i){i=0,r=e;break}if(i>=e){i=e,r=e;break}if("number"!=typeof n){r=e;break}if(r=i+n,r>e){r=e;break}break}return{beg:i,end:r}};n.htmlToPage=function(e,t){let n;if("string"!=typeof e)throw new Error(`${a}htmlToPage: input HTML is not a string`);n="string"!=typeof t?"htmlToPage":t;let r="";return r+="<!DOCTYPE html>\n",r+='<html lang="en">\n',r+="<head>\n",r+='<meta charset="utf-8">\n',r+=`<title>${n}</title>\n`,r+="<style>\n",r+=s(),r+="</style>\n",r+="</head>\n<body>\n",r+=`<p>${new Date}</p>\n`,r+=e,r+="</body>\n</html>\n",r},n.parserResultToHtml=function(e,t){let n,i,s=null;"string"==typeof t&&""!==t&&(s=t),n=!0===e.success?`<span class="${r.CLASS_MATCH}">true</span>`:`<span class="${r.CLASS_NOMATCH}">false</span>`,i=e.state===o.EMPTY?`<span class="${r.CLASS_EMPTY}">EMPTY</span>`:e.state===o.MATCH?`<span class="${r.CLASS_MATCH}">MATCH</span>`:e.state===o.NOMATCH?`<span class="${r.CLASS_NOMATCH}">NOMATCH</span>`:`<span class="${r.CLASS_NOMATCH}">unrecognized</span>`;let a="";return a+=`<table class="${r.CLASS_STATE}">\n`,s&&(a+=`<caption>${s}</caption>\n`),a+="<tr><th>state item</th><th>value</th><th>description</th></tr>\n",a+=`<tr><td>parser success</td><td>${n}</td>\n`,a+=`<td><span class="${r.CLASS_MATCH}">true</span> if the parse succeeded,\n`,a+=` <span class="${r.CLASS_NOMATCH}">false</span> otherwise`,a+="<br><i>NOTE: for success, entire string must be matched</i></td></tr>\n",a+=`<tr><td>parser state</td><td>${i}</td>\n`,a+=`<td><span class="${r.CLASS_EMPTY}">EMPTY</span>, `,a+=`<span class="${r.CLASS_MATCH}">MATCH</span> or \n`,a+=`<span class="${r.CLASS_NOMATCH}">NOMATCH</span></td></tr>\n`,a+=`<tr><td>string length</td><td>${e.length}</td><td>length of the input (sub)string</td></tr>\n`,a+=`<tr><td>matched length</td><td>${e.matched}</td><td>number of input string characters matched</td></tr>\n`,a+=`<tr><td>max matched</td><td>${e.maxMatched}</td><td>maximum number of input string characters matched</td></tr>\n`,a+=`<tr><td>max tree depth</td><td>${e.maxTreeDepth}</td><td>maximum depth of the parse tree reached</td></tr>\n`,a+=`<tr><td>node hits</td><td>${e.nodeHits}</td><td>number of parse tree node hits (opcode function calls)</td></tr>\n`,a+=`<tr><td>input length</td><td>${e.inputLength}</td><td>length of full input string</td></tr>\n`,a+=`<tr><td>sub-string begin</td><td>${e.subBegin}</td><td>sub-string first character index</td></tr>\n`,a+=`<tr><td>sub-string end</td><td>${e.subEnd}</td><td>sub-string end-of-string index</td></tr>\n`,a+=`<tr><td>sub-string length</td><td>${e.subLength}</td><td>sub-string length</td></tr>\n`,a+="</table>\n",a},n.charsToString=function(e,t,n){let r,s;if("number"==typeof t){if(t>=e.length)return"";r=t<0?0:t}else r=0;if("number"==typeof n){if(n<=0)return"";s=n>e.length-r?e.length:r+n}else s=e.length;return r<s?i.encode("UTF16LE",e.slice(r,s)).toString("utf16le"):""},n.stringToChars=function(e){return i.decode("STRING",e)},n.opcodeToString=function(e){let t="unknown";switch(e){case o.ALT:t="ALT";break;case o.CAT:t="CAT";break;case o.RNM:t="RNM";break;case o.UDT:t="UDT";break;case o.AND:t="AND";break;case o.NOT:t="NOT";break;case o.REP:t="REP";break;case o.TRG:t="TRG";break;case o.TBS:t="TBS";break;case o.TLS:t="TLS";break;case o.BKR:t="BKR";break;case o.BKA:t="BKA";break;case o.BKN:t="BKN";break;case o.ABG:t="ABG";break;case o.AEN:t="AEN";break;default:throw new Error("unrecognized opcode")}return t},n.stateToString=function(e){let t="unknown";switch(e){case o.ACTIVE:t="ACTIVE";break;case o.MATCH:t="MATCH";break;case o.EMPTY:t="EMPTY";break;case o.NOMATCH:t="NOMATCH";break;default:throw new Error("unrecognized state")}return t},n.asciiChars=["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL","BS","TAB","LF","VT","FF","CR","SO","SI","DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB","CAN","EM","SUB","ESC","FS","GS","RS","US","&nbsp;","!","&#34;","#","$","%","&#38;","&#39;","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","&#60;","=","&#62;","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","&#92;","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","DEL"],n.charToHex=function(e){let t=e.toString(16).toUpperCase();switch(t.length){case 1:case 3:case 7:t=`0${t}`;break;case 2:case 6:t=`00${t}`;break;case 4:break;case 5:t=`000${t}`;break;default:throw new Error("unrecognized option")}return t},n.charsToDec=function(e,t,n){let r="";if(!Array.isArray(e))throw new Error(`${a}charsToDec: input must be an array of integers`);const i=c(e.length,t,n);if(i.end>i.beg){r+=e[i.beg];for(let t=i.beg+1;t<i.end;t+=1)r+=`,${e[t]}`}return r},n.charsToHex=function(e,t,r){let i="";if(!Array.isArray(e))throw new Error(`${a}charsToHex: input must be an array of integers`);const s=c(e.length,t,r);if(s.end>s.beg){i+=`\\x${n.charToHex(e[s.beg])}`;for(let t=s.beg+1;t<s.end;t+=1)i+=`,\\x${n.charToHex(e[t])}`}return i},n.charsToHtmlEntities=function(e,t,n){let r="";if(!Array.isArray(e))throw new Error(`${a}charsToHex: input must be an array of integers`);const i=c(e.length,t,n);if(i.end>i.beg)for(let t=i.beg;t<i.end;t+=1)r+=`&#x${e[t].toString(16)};`;return r},n.charsToUnicode=function(e,t,r){let i="";if(!Array.isArray(e))throw new Error(`${a}charsToUnicode: input must be an array of integers`);const s=c(e.length,t,r);if(s.end>s.beg)for(let t=s.beg;t<s.end;t+=1)i+=(o=e[t])>=55296&&o<=57343||o>1114111?` U+${n.charToHex(e[t])}`:`&#${e[t]};`;var o;return i},n.charsToJsUnicode=function(e,t,r){let i="";if(!Array.isArray(e))throw new Error(`${a}charsToJsUnicode: input must be an array of integers`);const s=c(e.length,t,r);if(s.end>s.beg){i+=`\\u${n.charToHex(e[s.beg])}`;for(let t=s.beg+1;t<s.end;t+=1)i+=`,\\u${n.charToHex(e[t])}`}return i},n.charsToAscii=function(e,t,r){let i="";if(!Array.isArray(e))throw new Error(`${a}charsToAscii: input must be an array of integers`);const s=c(e.length,t,r);for(let t=s.beg;t<s.end;t+=1){const r=e[t];i+=r>=32&&r<=126?String.fromCharCode(r):`\\x${n.charToHex(r)}`}return i},n.charsToAsciiHtml=function(e,t,i){if(!Array.isArray(e))throw new Error(`${a}charsToAsciiHtml: input must be an array of integers`);let s,o="";const u=c(e.length,t,i);for(let t=u.beg;t<u.end;t+=1)s=e[t],o+=s<32||127===s?`<span class="${r.CLASS_CTRLCHAR}">${n.asciiChars[s]}</span>`:s>127?`<span class="${r.CLASS_CTRLCHAR}">U+${n.charToHex(s)}</span>`:n.asciiChars[s];return o},n.stringToAsciiHtml=function(e){const t=i.decode("STRING",e);return this.charsToAsciiHtml(t)}},{"../apg-conv-api/converter":369,"./emitcss":373,"./identifiers":374,"./style":378}],381:[function(e,t,n){"use strict";n.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=c(e),o=r[0],a=r[1],u=new s(function(e,t,n){return 3*(t+n)/4-n}(0,o,a)),l=0,d=a>0?o-4:o;for(n=0;n<d;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],o=16383,a=0,c=n-i;a<c;a+=o)s.push(u(e,a,a+o>c?c: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=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],i[o.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(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("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],382:[function(e,t,n){!function(t,n){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof t?t.exports=s:n.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:e("buffer").Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function c(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,i){for(var s=0,o=0,a=Math.min(e.length,n),c=t;c<a;c++){var u=e.charCodeAt(c)-48;s*=i,o=u>=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&o<i,"Invalid character"),s+=o}return s}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this._strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=c(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=c(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this._strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,o=s%r,a=Math.min(s,s-o)+n,c=0,l=n;l<a;l+=r)c=u(e,l,l+r,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var d=1;for(c=u(e,l,e.length,t),l=0;l<o;l++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype._move=function(e){l(e,this)},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){s.prototype.inspect=d}else s.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],c=(16777215&(a<<i|s)).toString(16);s=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,o--),n=0!==s||o!==this.length-1?h[6-c.length]+c+n:c+n}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=p[e],l=f[e];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(l).toString(e);n=(d=d.idivn(l)).isZero()?m+n:h[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,c=o/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var l=c>>>26,d=67108863&c,h=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=h;p++){var f=u-p|0;l+=(o=(i=0|e.words[f])*(s=0|t.words[p])+d)/67108864|0,d=67108863&o}n.words[u]=0|d,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n._strip()}s.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,i),o},s.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;e[n++]=255&o,n<e.length&&(e[n++]=o>>8&255),n<e.length&&(e[n++]=o>>16&255),6===s?(n<e.length&&(e[n++]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},s.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;e[n--]=255&o,n>=0&&(e[n--]=o>>8&255),n>=0&&(e[n--]=o>>16&255),6===s?(n>=0&&(e[n--]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},s.prototype.ior=function(e){return r(!(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},s.prototype.iand=function(e){return r(!(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},s.prototype.ixor=function(e){return r(!(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},s.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,o=0;o<r.length;o++)s=(t=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<n.length;o++)s=(t=(0|n.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var y=function(e,t,n){var r,i,s,o=e.words,a=t.words,c=n.words,u=0,l=0|o[0],d=8191&l,h=l>>>13,p=0|o[1],f=8191&p,m=p>>>13,y=0|o[2],g=8191&y,b=y>>>13,v=0|o[3],w=8191&v,x=v>>>13,E=0|o[4],S=8191&E,A=E>>>13,_=0|o[5],T=8191&_,k=_>>>13,C=0|o[6],P=8191&C,O=C>>>13,I=0|o[7],M=8191&I,j=I>>>13,R=0|o[8],B=8191&R,N=R>>>13,L=0|o[9],U=8191&L,D=L>>>13,F=0|a[0],H=8191&F,$=F>>>13,V=0|a[1],K=8191&V,G=V>>>13,z=0|a[2],W=8191&z,q=z>>>13,X=0|a[3],Y=8191&X,J=X>>>13,Z=0|a[4],Q=8191&Z,ee=Z>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],ce=8191&ae,ue=ae>>>13,le=0|a[8],de=8191&le,he=le>>>13,pe=0|a[9],fe=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var ye=(u+(r=Math.imul(d,H))|0)+((8191&(i=(i=Math.imul(d,$))+Math.imul(h,H)|0))<<13)|0;u=((s=Math.imul(h,$))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(f,H),i=(i=Math.imul(f,$))+Math.imul(m,H)|0,s=Math.imul(m,$);var ge=(u+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(h,K)|0))<<13)|0;u=((s=s+Math.imul(h,G)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,H),i=(i=Math.imul(g,$))+Math.imul(b,H)|0,s=Math.imul(b,$),r=r+Math.imul(f,K)|0,i=(i=i+Math.imul(f,G)|0)+Math.imul(m,K)|0,s=s+Math.imul(m,G)|0;var be=(u+(r=r+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,q)|0)+Math.imul(h,W)|0))<<13)|0;u=((s=s+Math.imul(h,q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,H),i=(i=Math.imul(w,$))+Math.imul(x,H)|0,s=Math.imul(x,$),r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(b,K)|0,s=s+Math.imul(b,G)|0,r=r+Math.imul(f,W)|0,i=(i=i+Math.imul(f,q)|0)+Math.imul(m,W)|0,s=s+Math.imul(m,q)|0;var ve=(u+(r=r+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(h,Y)|0))<<13)|0;u=((s=s+Math.imul(h,J)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(S,H),i=(i=Math.imul(S,$))+Math.imul(A,H)|0,s=Math.imul(A,$),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(x,K)|0,s=s+Math.imul(x,G)|0,r=r+Math.imul(g,W)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(b,W)|0,s=s+Math.imul(b,q)|0,r=r+Math.imul(f,Y)|0,i=(i=i+Math.imul(f,J)|0)+Math.imul(m,Y)|0,s=s+Math.imul(m,J)|0;var we=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,Q)|0))<<13)|0;u=((s=s+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(T,H),i=(i=Math.imul(T,$))+Math.imul(k,H)|0,s=Math.imul(k,$),r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,K)|0,s=s+Math.imul(A,G)|0,r=r+Math.imul(w,W)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(x,W)|0,s=s+Math.imul(x,q)|0,r=r+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(b,Y)|0,s=s+Math.imul(b,J)|0,r=r+Math.imul(f,Q)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var xe=(u+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(h,ne)|0))<<13)|0;u=((s=s+Math.imul(h,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(P,H),i=(i=Math.imul(P,$))+Math.imul(O,H)|0,s=Math.imul(O,$),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,K)|0,s=s+Math.imul(k,G)|0,r=r+Math.imul(S,W)|0,i=(i=i+Math.imul(S,q)|0)+Math.imul(A,W)|0,s=s+Math.imul(A,q)|0,r=r+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(x,Y)|0,s=s+Math.imul(x,J)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(f,ne)|0,i=(i=i+Math.imul(f,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var Ee=(u+(r=r+Math.imul(d,se)|0)|0)+((8191&(i=(i=i+Math.imul(d,oe)|0)+Math.imul(h,se)|0))<<13)|0;u=((s=s+Math.imul(h,oe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(M,H),i=(i=Math.imul(M,$))+Math.imul(j,H)|0,s=Math.imul(j,$),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(O,K)|0,s=s+Math.imul(O,G)|0,r=r+Math.imul(T,W)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(k,W)|0,s=s+Math.imul(k,q)|0,r=r+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(A,Y)|0,s=s+Math.imul(A,J)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,s=s+Math.imul(x,ee)|0,r=r+Math.imul(g,ne)|0,i=(i=i+Math.imul(g,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(f,se)|0,i=(i=i+Math.imul(f,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var Se=(u+(r=r+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(h,ce)|0))<<13)|0;u=((s=s+Math.imul(h,ue)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(B,H),i=(i=Math.imul(B,$))+Math.imul(N,H)|0,s=Math.imul(N,$),r=r+Math.imul(M,K)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(j,K)|0,s=s+Math.imul(j,G)|0,r=r+Math.imul(P,W)|0,i=(i=i+Math.imul(P,q)|0)+Math.imul(O,W)|0,s=s+Math.imul(O,q)|0,r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(k,Y)|0,s=s+Math.imul(k,J)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(A,Q)|0,s=s+Math.imul(A,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,s=s+Math.imul(x,re)|0,r=r+Math.imul(g,se)|0,i=(i=i+Math.imul(g,oe)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,oe)|0,r=r+Math.imul(f,ce)|0,i=(i=i+Math.imul(f,ue)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,ue)|0;var Ae=(u+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,he)|0)+Math.imul(h,de)|0))<<13)|0;u=((s=s+Math.imul(h,he)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(U,H),i=(i=Math.imul(U,$))+Math.imul(D,H)|0,s=Math.imul(D,$),r=r+Math.imul(B,K)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(N,K)|0,s=s+Math.imul(N,G)|0,r=r+Math.imul(M,W)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(j,W)|0,s=s+Math.imul(j,q)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(O,Y)|0,s=s+Math.imul(O,J)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(k,Q)|0,s=s+Math.imul(k,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(A,ne)|0,s=s+Math.imul(A,re)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(x,se)|0,s=s+Math.imul(x,oe)|0,r=r+Math.imul(g,ce)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(b,ce)|0,s=s+Math.imul(b,ue)|0,r=r+Math.imul(f,de)|0,i=(i=i+Math.imul(f,he)|0)+Math.imul(m,de)|0,s=s+Math.imul(m,he)|0;var _e=(u+(r=r+Math.imul(d,fe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(h,fe)|0))<<13)|0;u=((s=s+Math.imul(h,me)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,G))+Math.imul(D,K)|0,s=Math.imul(D,G),r=r+Math.imul(B,W)|0,i=(i=i+Math.imul(B,q)|0)+Math.imul(N,W)|0,s=s+Math.imul(N,q)|0,r=r+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(j,Y)|0,s=s+Math.imul(j,J)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(O,Q)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(k,ne)|0,s=s+Math.imul(k,re)|0,r=r+Math.imul(S,se)|0,i=(i=i+Math.imul(S,oe)|0)+Math.imul(A,se)|0,s=s+Math.imul(A,oe)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(x,ce)|0,s=s+Math.imul(x,ue)|0,r=r+Math.imul(g,de)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(b,de)|0,s=s+Math.imul(b,he)|0;var Te=(u+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;u=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(U,W),i=(i=Math.imul(U,q))+Math.imul(D,W)|0,s=Math.imul(D,q),r=r+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(N,Y)|0,s=s+Math.imul(N,J)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(j,Q)|0,s=s+Math.imul(j,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(k,se)|0,s=s+Math.imul(k,oe)|0,r=r+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(A,ce)|0,s=s+Math.imul(A,ue)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(x,de)|0,s=s+Math.imul(x,he)|0;var ke=(u+(r=r+Math.imul(g,fe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,fe)|0))<<13)|0;u=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(U,Y),i=(i=Math.imul(U,J))+Math.imul(D,Y)|0,s=Math.imul(D,J),r=r+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(N,Q)|0,s=s+Math.imul(N,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(j,ne)|0,s=s+Math.imul(j,re)|0,r=r+Math.imul(P,se)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,oe)|0,r=r+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(k,ce)|0,s=s+Math.imul(k,ue)|0,r=r+Math.imul(S,de)|0,i=(i=i+Math.imul(S,he)|0)+Math.imul(A,de)|0,s=s+Math.imul(A,he)|0;var Ce=(u+(r=r+Math.imul(w,fe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,fe)|0))<<13)|0;u=((s=s+Math.imul(x,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(U,Q),i=(i=Math.imul(U,ee))+Math.imul(D,Q)|0,s=Math.imul(D,ee),r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(N,ne)|0,s=s+Math.imul(N,re)|0,r=r+Math.imul(M,se)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(j,se)|0,s=s+Math.imul(j,oe)|0,r=r+Math.imul(P,ce)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(O,ce)|0,s=s+Math.imul(O,ue)|0,r=r+Math.imul(T,de)|0,i=(i=i+Math.imul(T,he)|0)+Math.imul(k,de)|0,s=s+Math.imul(k,he)|0;var Pe=(u+(r=r+Math.imul(S,fe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(A,fe)|0))<<13)|0;u=((s=s+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(U,ne),i=(i=Math.imul(U,re))+Math.imul(D,ne)|0,s=Math.imul(D,re),r=r+Math.imul(B,se)|0,i=(i=i+Math.imul(B,oe)|0)+Math.imul(N,se)|0,s=s+Math.imul(N,oe)|0,r=r+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(j,ce)|0,s=s+Math.imul(j,ue)|0,r=r+Math.imul(P,de)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(O,de)|0,s=s+Math.imul(O,he)|0;var Oe=(u+(r=r+Math.imul(T,fe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(k,fe)|0))<<13)|0;u=((s=s+Math.imul(k,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(U,se),i=(i=Math.imul(U,oe))+Math.imul(D,se)|0,s=Math.imul(D,oe),r=r+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,ue)|0)+Math.imul(N,ce)|0,s=s+Math.imul(N,ue)|0,r=r+Math.imul(M,de)|0,i=(i=i+Math.imul(M,he)|0)+Math.imul(j,de)|0,s=s+Math.imul(j,he)|0;var Ie=(u+(r=r+Math.imul(P,fe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(O,fe)|0))<<13)|0;u=((s=s+Math.imul(O,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(D,ce)|0,s=Math.imul(D,ue),r=r+Math.imul(B,de)|0,i=(i=i+Math.imul(B,he)|0)+Math.imul(N,de)|0,s=s+Math.imul(N,he)|0;var Me=(u+(r=r+Math.imul(M,fe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(j,fe)|0))<<13)|0;u=((s=s+Math.imul(j,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(U,de),i=(i=Math.imul(U,he))+Math.imul(D,de)|0,s=Math.imul(D,he);var je=(u+(r=r+Math.imul(B,fe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(N,fe)|0))<<13)|0;u=((s=s+Math.imul(N,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863;var Re=(u+(r=Math.imul(U,fe))|0)+((8191&(i=(i=Math.imul(U,me))+Math.imul(D,fe)|0))<<13)|0;return u=((s=Math.imul(D,me))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,c[0]=ye,c[1]=ge,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=Ee,c[7]=Se,c[8]=Ae,c[9]=_e,c[10]=Te,c[11]=ke,c[12]=Ce,c[13]=Pe,c[14]=Oe,c[15]=Ie,c[16]=Me,c[17]=je,c[18]=Re,0!==u&&(c[19]=u,n.length++),n};function g(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,c=Math.min(s,t.length-1),u=Math.max(0,s-e.length+1);u<=c;u++){var l=s-u,d=(0|e.words[l])*(0|t.words[u]),h=67108863&d;a=67108863&(h=h+a|0),i+=(o=(o=o+(d/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function b(e,t,n){return g(e,t,n)}function v(e,t){this.x=e,this.y=t}Math.imul||(y=m),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?y(this,e,t):n<63?m(this,e,t):n<1024?g(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},v.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},v.prototype.permute=function(e,t,n,r,i,s){for(var o=0;o<s;o++)r[o]=t[e[o]],i[o]=n[e[o]]},v.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,c=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var d=c,h=u,p=0;p<o;p++){var f=n[l+p],m=r[l+p],y=n[l+p+o],g=r[l+p+o],b=d*y-h*g;g=d*g+h*y,y=b,n[l+p]=f+y,r[l+p]=m+g,n[l+p+o]=f-y,r[l+p+o]=m-g,p!==a&&(b=c*d-u*h,h=c*h+u*d,d=b)}},v.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},v.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},v.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,n,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(0===s),r(!(-8192&s))},v.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},v.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),c=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),h=n.words;h.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,u,r),this.transform(o,s,a,c,r,i),this.transform(u,s,l,d,r,i);for(var p=0;p<r;p++){var f=a[p]*l[p]-c[p]*d[p];c[p]=a[p]*d[p]+c[p]*l[p],a[p]=f}return this.conjugate(a,c,r),this.transform(a,c,h,s,r,i),this.conjugate(h,s,r),this.normalize13b(h,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),b(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,o=(67108863&s)+(67108863&n);n>>=26,n+=s/67108864|0,n+=o>>>26,this.words[i]=67108863&o}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,c=(0|this.words[t])-a<<n;this.words[t]=c|o,o=a>>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},s.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,c=n;if(i-=o,i=Math.max(0,i),c){for(var u=0;u<o;u++)c.words[u]=this.words[u];c.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-s|d>>>s,l=d&a}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},s.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){var i,s,o=e.length+n;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+a;var c=(0|e.words[i])*t;a=((s-=67108863&c)>>26)-(c/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,c=r.length-i.length;if("mod"!==t){(a=new s(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var l=r.clone()._ishlnsubmul(i,1,c);0===l.negative&&(r=l,a&&(a.words[c]=1));for(var d=c-1;d>=0;d--){var h=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(h=Math.min(h/o|0,67108863),r._ishlnsubmul(i,h,d);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);a&&(a.words[d]=h)}return a&&a._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(n*i+(0|this.words[s]))%e;return t?-i:i},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*n;this.words[i]=s/e|0,n=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),c=new s(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),d=t.clone();!t.isZero();){for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(l),o.isub(d)),i.iushrn(1),o.iushrn(1);for(var f=0,m=1;!(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(l),c.isub(d)),a.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),o.isub(c)):(n.isub(t),a.isub(i),c.isub(o))}return{a:a,b:c,gcd:n.iushln(u)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,l=1;!(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,h=1;!(n.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(n.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a)):(n.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return!(1&this.words[0])},s.prototype.isOdd=function(){return!(1&~this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new T(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}x.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},i(E,x),E.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&n)<<4|s>>>22,s=o}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(S,x),i(A,x),i(_,x),_.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new S;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return w[e]=t,t},T.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){r(!(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},T.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new s(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,i),h=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),f=o;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();r(y<f);var g=this.pow(d,new s(1).iushln(f-y-1));h=h.redMul(g),d=g.redSqr(),p=p.redMul(d),f=y}return h},T.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},T.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var d=u>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++a||0===r&&0===l)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}c=26}return i},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new k(e)},i(k,T),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:384}],383:[function(e,t,n){var r,i;r=this,i=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(n),o=Math.max(i,s),a=0,c=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var a=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=s.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,(n=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}])&&o(t,n),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),s=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},s=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)})),r>0){var o=Object.keys(n),c=a.default.find(o,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var l=a.default.find(o,(function(e){return t.isPlatform(e)}));if(l){var d=this.satisfies(n[l]);if(void 0!==d)return d}}if(s>0){var h=Object.keys(i),p=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},"object"==typeof n&&"object"==typeof t?t.exports=i():"function"==typeof define&&define.amd?define([],i):"object"==typeof n?n.bowser=i():r.bowser=i()},{}],384:[function(e,t,n){},{}],385:[function(e,t,n){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
"use strict";var r=e("base64-js"),i=e("ieee754");n.Buffer=a,n.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},n.INSPECT_MAX_BYTES=50;var s=2147483647;function o(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=a.prototype,t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|p(e,t),r=o(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return d(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return r.__proto__=a.prototype,r}(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return a.from(r,t,n);var i=function(e){if(a.isBuffer(e)){var t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||$(e.length)?o(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 a.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(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 l(e){return u(e),o(e<0?0:0|h(e))}function d(e){for(var t=e.length<0?0:0|h(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function h(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(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);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return D(e).length;default:if(i)return r?-1:U(e).length;t=(""+t).toLowerCase(),i=!0}}function f(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),$(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var s,o=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,c/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(s=n;s<a;s++)if(u(e,s)===u(t,-1===l?0:s-l)){if(-1===l&&(l=s),s-l+1===c)return l*o}else-1!==l&&(s-=s-l),l=-1}else for(n+c>a&&(n=a-c),s=n;s>=0;s--){for(var d=!0,h=0;h<c;h++)if(u(e,s+h)!==u(t,h)){d=!1;break}if(d)return s}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var s=t.length;r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a=parseInt(t.substr(2*o,2),16);if($(a))return o;e[n+o]=a}return o}function v(e,t,n,r){return F(U(t,e.length-n),e,n,r)}function w(e,t,n,r){return F(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return w(e,t,n,r)}function E(e,t,n,r){return F(D(t),e,n,r)}function S(e,t,n,r){return F(function(e,t){for(var n,r,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s,o,a,c,u=e[i],l=null,d=u>239?4:u>223?3:u>191?2:1;if(i+d<=n)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(s=e[i+1]))&&(c=(31&u)<<6|63&s)>127&&(l=c);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(c=(15&u)<<12|(63&s)<<6|63&o)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(c=(15&u)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=d}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}n.kMaxLength=s,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),a.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(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(e,t,n){return c(e,t,n)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(H(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),H(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.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}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(H(s,Uint8Array)&&(s=a.from(s)),!a.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?_(this,0,e):f.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(H(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.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===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),c=Math.min(s,o),u=this.slice(r,i),l=e.slice(t,n),d=0;d<c;++d)if(u[d]!==l[d]){s=u[d],o=l[d];break}return s<o?-1:o<s?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return v(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s<n;++s)i+=L(e[s]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function I(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,s){if(!a.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(n+r>e.length)throw new RangeError("Index out of range")}function j(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,s){return t=+t,n>>>=0,s||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,s){return t=+t,n>>>=0,s||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}a.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=a.prototype,r},a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||I(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||I(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||I(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||I(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},a.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(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},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(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},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<n&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(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},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(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},a.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var s=i-1;s>=0;--s)e[s+t]=this[s+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var o=a.isBuffer(e)?e:a.from(e,r),c=o.length;if(0===c)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<n-t;++s)this[s+t]=o[s%c]}return this};var N=/[^+/0-9A-Za-z-_]/g;function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,t){var n;t=t||1/0;for(var r=e.length,i=null,s=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function D(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function $(e){return e!=e}},{"base64-js":381,ieee754:494}],386:[function(e,t,n){(function(e){(function(){!function(r){var i="object"==typeof n&&n&&!n.nodeType&&n,s="object"==typeof t&&t&&!t.nodeType&&t,o="object"==typeof e&&e;o.global!==o&&o.window!==o&&o.self!==o||(r=o);var a,c,u=2147483647,l=36,d=1,h=26,p=38,f=700,m=72,y=128,g="-",b=/^xn--/,v=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=l-d,S=Math.floor,A=String.fromCharCode;function _(e){throw new RangeError(x[e])}function T(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function k(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+T((e=e.replace(w,".")).split("."),t).join(".")}function C(e){for(var t,n,r=[],i=0,s=e.length;i<s;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<s?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function P(e){return T(e,(function(e){var t="";return e>65535&&(t+=A((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=A(e)})).join("")}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function I(e,t,n){var r=0;for(e=n?S(e/f):e>>1,e+=S(e/t);e>E*h>>1;r+=l)e=S(e/E);return S(r+(E+1)*e/(e+p))}function M(e){var t,n,r,i,s,o,a,c,p,f,b,v=[],w=e.length,x=0,E=y,A=m;for((n=e.lastIndexOf(g))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&_("not-basic"),v.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<w;){for(s=x,o=1,a=l;i>=w&&_("invalid-input"),((c=(b=e.charCodeAt(i++))-48<10?b-22:b-65<26?b-65:b-97<26?b-97:l)>=l||c>S((u-x)/o))&&_("overflow"),x+=c*o,!(c<(p=a<=A?d:a>=A+h?h:a-A));a+=l)o>S(u/(f=l-p))&&_("overflow"),o*=f;A=I(x-s,t=v.length+1,0==s),S(x/t)>u-E&&_("overflow"),E+=S(x/t),x%=t,v.splice(x++,0,E)}return P(v)}function j(e){var t,n,r,i,s,o,a,c,p,f,b,v,w,x,E,T=[];for(v=(e=C(e)).length,t=y,n=0,s=m,o=0;o<v;++o)(b=e[o])<128&&T.push(A(b));for(r=i=T.length,i&&T.push(g);r<v;){for(a=u,o=0;o<v;++o)(b=e[o])>=t&&b<a&&(a=b);for(a-t>S((u-n)/(w=r+1))&&_("overflow"),n+=(a-t)*w,t=a,o=0;o<v;++o)if((b=e[o])<t&&++n>u&&_("overflow"),b==t){for(c=n,p=l;!(c<(f=p<=s?d:p>=s+h?h:p-s));p+=l)E=c-f,x=l-f,T.push(A(O(f+E%x,0))),c=S(E/x);T.push(A(O(c,0))),s=I(n,w,r==i),n=0,++r}++n,++t}return T.join("")}if(a={version:"1.4.1",ucs2:{decode:C,encode:P},decode:M,encode:j,toASCII:function(e){return k(e,(function(e){return v.test(e)?"xn--"+j(e):e}))},toUnicode:function(e){return k(e,(function(e){return b.test(e)?M(e.slice(4).toLowerCase()):e}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return a}));else if(i&&s)if(t.exports==i)s.exports=a;else for(c in a)a.hasOwnProperty(c)&&(i[c]=a[c]);else r.punycode=a}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],387:[function(e,t,n){(function(n){(function(){"use strict";const r=e("semver"),i=["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"],s={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"},o={worker_threads:">=10.5.0",wasi:">=12.16.0",diagnostics_channel:"^14.17.0 || >=15.1.0"};t.exports=({version:e=n.version,experimental:t=!1}={})=>{const a=[...i];for(const[t,n]of Object.entries(s))("*"===e||r.satisfies(e,n))&&a.push(t);if(t)for(const[t,n]of Object.entries(o))a.includes(t)||"*"!==e&&!r.satisfies(e,n)||a.push(t);return a}}).call(this)}).call(this,e("_process"))},{_process:510,semver:555}],388:[function(e,t,n){"use strict";t.exports={stdout:!1,stderr:!1}},{}],389:[function(e,t,n){"use strict";const r=e("ansi-styles"),{stdout:i,stderr:s}=e("supports-color"),{stringReplaceAll:o,stringEncaseCRLFWithFirstIndex:a}=e("./util"),{isArray:c}=Array,u=["ansi","ansi","ansi256","ansi16m"],l=Object.create(null);class d{constructor(e){return h(e)}}const h=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=i?i.level:0;e.level=void 0===t.level?n:t.level})(t,e),t.template=(...e)=>w(t.template,...e),Object.setPrototypeOf(t,p.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=d,t.template};function p(e){return h(e)}for(const[e,t]of Object.entries(r))l[e]={get(){const n=g(this,y(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:n}),n}};l.visible={get(){const e=g(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const f=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of f)l[e]={get(){const{level:t}=this;return function(...n){const i=y(r.color[u[t]][e](...n),r.color.close,this._styler);return g(this,i,this._isEmpty)}}};for(const e of f){l["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const i=y(r.bgColor[u[t]][e](...n),r.bgColor.close,this._styler);return g(this,i,this._isEmpty)}}}}const m=Object.defineProperties((()=>{}),{...l,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),y=(e,t,n)=>{let r,i;return void 0===n?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},g=(e,t,n)=>{const r=(...e)=>c(e[0])&&c(e[0].raw)?b(r,w(r,...e)):b(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,m),r._generator=e,r._styler=t,r._isEmpty=n,r},b=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let n=e._styler;if(void 0===n)return t;const{openAll:r,closeAll:i}=n;if(-1!==t.indexOf(""))for(;void 0!==n;)t=o(t,n.close,n.open),n=n.parent;const s=t.indexOf("\n");return-1!==s&&(t=a(t,i,r,s)),r+t+i};let v;const w=(t,...n)=>{const[r]=n;if(!c(r)||!c(r.raw))return n.join(" ");const i=n.slice(1),s=[r.raw[0]];for(let e=1;e<r.length;e++)s.push(String(i[e-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[e]));return void 0===v&&(v=e("./templates")),v(t,s.join(""))};Object.defineProperties(p.prototype,l);const x=p();x.supportsColor=i,x.stderr=p({level:s?s.level:0}),x.stderr.supportsColor=s,t.exports=x},{"./templates":390,"./util":391,"ansi-styles":356,"supports-color":388}],390:[function(e,t,n){"use strict";const r=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,i=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,s=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,o=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,a=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function c(e){const t="u"===e[0],n="{"===e[1];return t&&!n&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(parseInt(e.slice(2,-1),16)):a.get(e)||e}function u(e,t){const n=[],r=t.trim().split(/\s*,\s*/g);let i;for(const t of r){const r=Number(t);if(Number.isNaN(r)){if(!(i=t.match(s)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);n.push(i[2].replace(o,((e,t,n)=>t?c(t):n)))}else n.push(r)}return n}function l(e){i.lastIndex=0;const t=[];let n;for(;null!==(n=i.exec(e));){const e=n[1];if(n[2]){const r=u(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function d(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const[e,t]of Object.entries(n))if(Array.isArray(t)){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=t.length>0?r[e](...t):r[e]}return r}t.exports=(e,t)=>{const n=[],i=[];let s=[];if(t.replace(r,((t,r,o,a,u,h)=>{if(r)s.push(c(r));else if(a){const t=s.join("");s=[],i.push(0===n.length?t:d(e,n)(t)),n.push({inverse:o,styles:l(a)})}else if(u){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");i.push(d(e,n)(s.join(""))),s=[],n.pop()}else s.push(h)})),i.push(s.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")}},{}],391:[function(e,t,n){"use strict";t.exports={stringReplaceAll:(e,t,n)=>{let r=e.indexOf(t);if(-1===r)return e;const i=t.length;let s=0,o="";do{o+=e.substr(s,r-s)+t+n,s=r+i,r=e.indexOf(t,s)}while(-1!==r);return o+=e.substr(s),o},stringEncaseCRLFWithFirstIndex:(e,t,n,r)=>{let i=0,s="";do{const o="\r"===e[r-1];s+=e.substr(i,(o?r-1:r)-i)+t+(o?"\r\n":"\n")+n,i=r+1,r=e.indexOf("\n",i)}while(-1!==r);return s+=e.substr(i),s}}},{}],392:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BulkheadPolicy=void 0;const r=e("./common/abort"),i=e("./common/defer"),s=e("./common/Event"),o=e("./common/Executor"),a=e("./errors/BulkheadRejectedError"),c=e("./errors/Errors");n.BulkheadPolicy=class{constructor(e,t){this.capacity=e,this.queueCapacity=t,this.active=0,this.queue=[],this.onRejectEmitter=new s.EventEmitter,this.executor=new o.ExecuteWrapper,this.onSuccess=this.executor.onSuccess,this.onFailure=this.executor.onFailure,this.onReject=this.onRejectEmitter.addListener}get executionSlots(){return this.capacity-this.active}get queueSlots(){return this.queueCapacity-this.queue.length}async execute(e,t=r.neverAbortedSignal){if(t.aborted)throw new c.TaskCancelledError;if(this.active<this.capacity){this.active++;try{return await e({signal:t})}finally{this.active--,this.dequeue()}}if(this.queue.length<this.queueCapacity){const{resolve:n,reject:r,promise:s}=(0,i.defer)();return this.queue.push({signal:t,fn:e,resolve:n,reject:r}),s}throw this.onRejectEmitter.emit(),new a.BulkheadRejectedError(this.capacity,this.queueCapacity)}dequeue(){const e=this.queue.shift();e&&Promise.resolve().then((()=>this.execute(e.fn,e.signal))).then(e.resolve).catch(e.reject)}}},{"./common/Event":408,"./common/Executor":409,"./common/abort":410,"./common/defer":411,"./errors/BulkheadRejectedError":413,"./errors/Errors":414}],393:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CircuitBreakerPolicy=n.CircuitState=void 0;const r=e("./common/abort"),i=e("./common/Event"),s=e("./common/Executor"),o=e("./errors/Errors"),a=e("./errors/IsolatedCircuitError");var c;!function(e){e[e.Closed=0]="Closed",e[e.Open=1]="Open",e[e.HalfOpen=2]="HalfOpen",e[e.Isolated=3]="Isolated"}(c=n.CircuitState||(n.CircuitState={}));n.CircuitBreakerPolicy=class{constructor(e,t){this.options=e,this.executor=t,this.breakEmitter=new i.EventEmitter,this.resetEmitter=new i.EventEmitter,this.halfOpenEmitter=new i.EventEmitter,this.stateChangeEmitter=new i.EventEmitter,this.innerState={value:c.Closed},this.onBreak=this.breakEmitter.addListener,this.onReset=this.resetEmitter.addListener,this.onHalfOpen=this.halfOpenEmitter.addListener,this.onStateChange=this.stateChangeEmitter.addListener,this.onSuccess=this.executor.onSuccess,this.onFailure=this.executor.onFailure}get state(){return this.innerState.value}get lastFailure(){return this.innerLastFailure}isolate(){this.innerState.value!==c.Isolated&&(this.innerState={value:c.Isolated,counters:0},this.breakEmitter.emit({isolated:!0}),this.stateChangeEmitter.emit(c.Isolated)),this.innerState.counters++;let e=!1;return{dispose:()=>{e||(e=!0,this.innerState.value!==c.Isolated||--this.innerState.counters||(this.innerState={value:c.Closed},this.resetEmitter.emit(),this.stateChangeEmitter.emit(c.Closed)))}}}async execute(e,t=r.neverAbortedSignal){const n=this.innerState;switch(n.value){case c.Closed:const r=await this.executor.invoke(e,{signal:t});return"success"in r?this.options.breaker.success(n.value):(this.innerLastFailure=r,this.options.breaker.failure(n.value)&&this.open(r)),(0,s.returnOrThrow)(r);case c.HalfOpen:if(await n.test.catch((()=>{})),this.state===c.Closed&&t.aborted)throw new o.TaskCancelledError;return this.execute(e);case c.Open:if(Date.now()-n.openedAt<this.options.halfOpenAfter)throw new o.BrokenCircuitError;const i=this.halfOpen(e,t);return this.innerState={value:c.HalfOpen,test:i},this.stateChangeEmitter.emit(c.HalfOpen),i;case c.Isolated:throw new a.IsolatedCircuitError;default:throw new Error(`Unexpected circuit state ${n}`)}}async halfOpen(e,t){this.halfOpenEmitter.emit();try{const n=await this.executor.invoke(e,{signal:t});return"success"in n?(this.options.breaker.success(c.HalfOpen),this.close()):(this.innerLastFailure=n,this.options.breaker.failure(c.HalfOpen),this.open(n)),(0,s.returnOrThrow)(n)}catch(e){throw this.close(),e}}open(e){this.state!==c.Isolated&&this.state!==c.Open&&(this.innerState={value:c.Open,openedAt:Date.now()},this.breakEmitter.emit(e),this.stateChangeEmitter.emit(c.Open))}close(){this.state===c.HalfOpen&&(this.innerState={value:c.Closed},this.resetEmitter.emit(),this.stateChangeEmitter.emit(c.Closed))}}},{"./common/Event":408,"./common/Executor":409,"./common/abort":410,"./errors/Errors":414,"./errors/IsolatedCircuitError":415}],394:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FallbackPolicy=void 0;const r=e("./common/abort");n.FallbackPolicy=class{constructor(e,t){this.executor=e,this.value=t,this.onSuccess=this.executor.onSuccess,this.onFailure=this.executor.onFailure}async execute(e,t=r.neverAbortedSignal){const n=await this.executor.invoke(e,{signal:t});return"success"in n?n.success:this.value()}}},{"./common/abort":410}],395:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NoopPolicy=void 0;const r=e("./common/abort"),i=e("./common/Executor");n.NoopPolicy=class{constructor(){this.executor=new i.ExecuteWrapper,this.onSuccess=this.executor.onSuccess,this.onFailure=this.executor.onFailure}async execute(e,t=r.neverAbortedSignal){return(0,i.returnOrThrow)(await this.executor.invoke(e,{signal:t}))}}},{"./common/Executor":409,"./common/abort":410}],396:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fallback=n.circuitBreaker=n.retry=n.wrap=n.timeout=n.usePolicy=n.bulkhead=n.handleWhenResult=n.handleResultType=n.handleWhen=n.handleType=n.handleAll=n.noop=n.Policy=void 0;const r=e("./backoff/Backoff"),i=e("./BulkheadPolicy"),s=e("./CircuitBreakerPolicy"),o=e("./common/Executor"),a=e("./FallbackPolicy"),c=e("./NoopPolicy"),u=e("./RetryPolicy"),l=e("./TimeoutPolicy"),d=(e,t)=>t?n=>n instanceof e&&t(n):t=>t instanceof e,h=()=>!1;class p{constructor(e){this.options=e}orType(e,t){const n=d(e,t);return new p({...this.options,errorFilter:e=>this.options.errorFilter(e)||n(e)})}orWhen(e){return new p({...this.options,errorFilter:t=>this.options.errorFilter(t)||e(t)})}orWhenResult(e){return new p({...this.options,resultFilter:t=>this.options.resultFilter(t)||e(t)})}orResultType(e,t){const n=d(e,t);return new p({...this.options,resultFilter:e=>this.options.resultFilter(e)||n(e)})}}n.Policy=p,n.noop=new c.NoopPolicy,n.handleAll=new p({errorFilter:()=>!0,resultFilter:h}),n.handleType=function(e,t){return new p({errorFilter:d(e,t),resultFilter:h})},n.handleWhen=function(e){return new p({errorFilter:e,resultFilter:h})},n.handleResultType=function(e,t){return new p({errorFilter:h,resultFilter:d(e,t)})},n.handleWhenResult=function(e){return new p({errorFilter:h,resultFilter:e})},n.bulkhead=function(e,t=0){return new i.BulkheadPolicy(e,t)},n.usePolicy=function(e){return(t,n,r)=>{const i=r.value;if("function"!=typeof i)throw new Error("Can only decorate functions with @cockatiel, got "+typeof i);r.value=function(...t){const n=t[t.length-1]instanceof AbortSignal?t.pop():void 0;return e.execute((e=>i.apply(this,[...t,e])),n)}}},n.timeout=function(e,t){return new l.TimeoutPolicy(e,"string"==typeof t?{strategy:t}:t)},n.wrap=function(...e){return{_altReturn:void 0,onFailure:e[0].onFailure,onSuccess:e[0].onSuccess,wrapped:e,execute(t,n){const r=(n,i)=>i===e.length?t(n):e[i].execute((e=>r({...n,...e},i+1)),n.signal);return Promise.resolve(r({signal:n},0))}}},n.retry=function(e,t){return new u.RetryPolicy({backoff:t.backoff||new r.ConstantBackoff(0),maxAttempts:t.maxAttempts??1/0},new o.ExecuteWrapper(e.options.errorFilter,e.options.resultFilter))},n.circuitBreaker=function(e,t){return new s.CircuitBreakerPolicy(t,new o.ExecuteWrapper(e.options.errorFilter,e.options.resultFilter))},n.fallback=function(e,t){return new a.FallbackPolicy(new o.ExecuteWrapper(e.options.errorFilter,e.options.resultFilter),"function"==typeof t?t:()=>t)}},{"./BulkheadPolicy":392,"./CircuitBreakerPolicy":393,"./FallbackPolicy":394,"./NoopPolicy":395,"./RetryPolicy":397,"./TimeoutPolicy":398,"./backoff/Backoff":399,"./common/Executor":409}],397:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RetryPolicy=void 0;const r=e("./backoff/ConstantBackoff"),i=e("./common/abort"),s=e("./common/Event"),o=(e,t)=>new Promise((n=>{const r=setTimeout(n,e);t&&r.unref()}));class a{constructor(e,t){this.options=e,this.executor=t,this.onGiveUpEmitter=new s.EventEmitter,this.onRetryEmitter=new s.EventEmitter,this.onSuccess=this.executor.onSuccess,this.onFailure=this.executor.onFailure,this.onRetry=this.onRetryEmitter.addListener,this.onGiveUp=this.onGiveUpEmitter.addListener}dangerouslyUnref(){return new a({...this.options,unref:!0},this.executor.clone())}async execute(e,t=i.neverAbortedSignal){const n=this.options.backoff||new r.ConstantBackoff(0);let s;for(let r=0;;r++){const i=await this.executor.invoke(e,{attempt:r,signal:t});if("success"in i)return i.success;if(t.aborted||!(r<this.options.maxAttempts)){if(this.onGiveUpEmitter.emit(i),"error"in i)throw i.error;return i.value}{const e={attempt:r+1,signal:t,result:i};s=s?s.next(e):n.next(e);const a=s.duration,c=o(a,!!this.options.unref);this.onRetryEmitter.emit({...i,delay:a}),await c}}}}n.RetryPolicy=a},{"./backoff/ConstantBackoff":400,"./common/Event":408,"./common/abort":410}],398:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TimeoutPolicy=n.TimeoutStrategy=void 0;const r=e("./common/abort"),i=e("./common/Event"),s=e("./common/Executor"),o=e("./errors/TaskCancelledError");var a;!function(e){e.Cooperative="optimistic",e.Aggressive="aggressive"}(a=n.TimeoutStrategy||(n.TimeoutStrategy={}));class c{constructor(e,t,n=new s.ExecuteWrapper,r=!1){this.duration=e,this.options=t,this.executor=n,this.unref=r,this.timeoutEmitter=new i.EventEmitter,this.onTimeout=this.timeoutEmitter.addListener,this.onFailure=this.executor.onFailure,this.onSuccess=this.executor.onSuccess}dangerouslyUnref(){return new c(this.duration,this.options,this.executor,!0)}async execute(e,t){const n=(0,r.deriveAbortController)(t),c=setTimeout((()=>n.abort()),this.duration);this.unref&&c.unref();const u={signal:n.signal},l=(0,i.onAbort)(n.signal),d=l((()=>this.timeoutEmitter.emit()));try{return this.options.strategy===a.Cooperative?(0,s.returnOrThrow)(await this.executor.invoke(e,u,n.signal)):await this.executor.invoke((async()=>Promise.race([Promise.resolve(e(u,n.signal)),i.Event.toPromise(l).then((()=>{throw new o.TaskCancelledError(`Operation timed out after ${this.duration}ms`)}))]))).then(s.returnOrThrow)}finally{d.dispose(),!1!==this.options.abortOnReturn&&n.abort(),clearTimeout(c)}}}n.TimeoutPolicy=c},{"./common/Event":408,"./common/Executor":409,"./common/abort":410,"./errors/TaskCancelledError":416}],399:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./ConstantBackoff"),n),i(e("./DelegateBackoff"),n),i(e("./ExponentialBackoff"),n),i(e("./ExponentialBackoffGenerators"),n),i(e("./IterableBackoff"),n)},{"./ConstantBackoff":400,"./DelegateBackoff":401,"./ExponentialBackoff":402,"./ExponentialBackoffGenerators":403,"./IterableBackoff":404}],400:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConstantBackoff=void 0;n.ConstantBackoff=class{constructor(e){this.interval=e}next(){return r(this.interval)}};const r=e=>({duration:e,next(){return this}})},{}],401:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DelegateBackoff=void 0;n.DelegateBackoff=class{constructor(e){this.fn=e}next(e){return r(this.fn).next(e)}};const r=(e,t,n=0)=>({duration:n,next(n){const i=e(n,t);return"number"==typeof i?r(e,t,i):r(e,i.state,i.delay)}})},{}],402:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ExponentialBackoff=void 0;const r={generator:e("./ExponentialBackoffGenerators").decorrelatedJitterGenerator,maxDelay:3e4,exponent:2,initialDelay:128};n.ExponentialBackoff=class{constructor(e){this.options=e?{...r,...e}:r}next(){return i(this.options).next(void 0)}};const i=(e,t,n=0,r=-1)=>({duration:n,next(){const[n,s]=e.generator(t,e);return i(e,s,n,r+1)}})},{"./ExponentialBackoffGenerators":403}],403:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decorrelatedJitterGenerator=n.halfJitterGenerator=n.fullJitterGenerator=n.noJitterGenerator=void 0;n.noJitterGenerator=(e=0,t)=>[Math.min(t.maxDelay,t.initialDelay*2**e),e+1];n.fullJitterGenerator=(e,t)=>{const[r,i]=(0,n.noJitterGenerator)(e,t);return[Math.floor(Math.random()*r),i]};n.halfJitterGenerator=(e,t)=>{const[r,i]=(0,n.noJitterGenerator)(e,t);return[Math.floor((r+Math.random()*r)/2),i]};const r=1/1.4;n.decorrelatedJitterGenerator=(e,t)=>{const[n,i]=e||[0,0],s=n+Math.random(),o=Math.pow(t.exponent,s)*Math.tanh(Math.sqrt(4*s)),a=Math.max(0,o-i);return[Math.min(a*r*t.initialDelay,t.maxDelay),[n+1,o]]}},{}],404:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.IterableBackoff=void 0;n.IterableBackoff=class{constructor(e){this.durations=e}next(){return r(this.durations,0)}};const r=(e,t)=>({duration:e[t],next(){return t===e.length-1?this:r(e,t+1)}})},{}],405:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./SamplingBreaker"),n),i(e("./ConsecutiveBreaker"),n)},{"./ConsecutiveBreaker":406,"./SamplingBreaker":407}],406:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsecutiveBreaker=void 0;n.ConsecutiveBreaker=class{constructor(e){this.threshold=e,this.count=0}success(){this.count=0}failure(){return++this.count>=this.threshold}}},{}],407:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SamplingBreaker=void 0;const r=e("../CircuitBreakerPolicy");n.SamplingBreaker=class{constructor({threshold:e,duration:t,minimumRps:n}){if(this.windows=[],this.currentWindow=0,this.currentFailures=0,this.currentSuccesses=0,e<=0||e>=1)throw new RangeError(`SamplingBreaker threshold should be between (0, 1), got ${e}`);this.threshold=e;const r=Math.max(5,Math.ceil(t/1e3));for(let e=0;e<r;e++)this.windows.push({startedAt:0,failures:0,successes:0});this.windowSize=Math.round(t/r),this.duration=this.windowSize*r,this.minimumRpms=n?n/1e3:5/(1e3*e)}success(e){e===r.CircuitState.HalfOpen&&this.resetWindows(),this.push(!0)}failure(e){if(this.push(!1),e!==r.CircuitState.Closed)return!0;const t=this.currentSuccesses+this.currentFailures;return!(t<this.duration*this.minimumRpms)&&this.currentFailures>this.threshold*t}resetWindows(){this.currentFailures=0,this.currentSuccesses=0;for(const e of this.windows)e.failures=0,e.successes=0,e.startedAt=0}rotateWindow(e){const t=(this.currentWindow+1)%this.windows.length;this.currentFailures-=this.windows[t].failures,this.currentSuccesses-=this.windows[t].successes;const n=this.windows[t]={failures:0,successes:0,startedAt:e};return this.currentWindow=t,n}push(e){const t=Date.now();let n=this.windows[this.currentWindow];t-n.startedAt>=this.windowSize&&(n=this.rotateWindow(t)),e?(n.successes++,this.currentSuccesses++):(n.failures++,this.currentFailures++)}}},{"../CircuitBreakerPolicy":393}],408:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemorizingEventEmitter=n.EventEmitter=n.onAbort=n.Event=n.noopDisposable=void 0;const r=e("../errors/TaskCancelledError");n.noopDisposable={dispose:()=>{}},function(e){e.once=(e,t)=>{let r,i=!1;return r=e((e=>{t(e),r?r.dispose():i=!0})),i?(r.dispose(),n.noopDisposable):r},e.toPromise=(t,i)=>i?i.aborted?Promise.reject(new r.TaskCancelledError):new Promise(((s,o)=>{const a=(0,n.onAbort)(i)((()=>{c.dispose(),o(new r.TaskCancelledError)})),c=e.once(t,(e=>{a.dispose(),s(e)}))})):new Promise((n=>e.once(t,n)))}(n.Event||(n.Event={}));n.onAbort=e=>{const t=new s;if(e.aborted)return t.emit(),t.addListener;const n=()=>{t.emit(),e.removeEventListener("abort",n)};return e.addEventListener("abort",n),t.addListener};class i{constructor(){this.addListener=e=>this.addListenerInner(e)}get size(){return this.listeners?"function"==typeof this.listeners?1:this.listeners.length:0}emit(e){if(this.listeners)if("function"==typeof this.listeners)this.listeners(e);else for(const t of this.listeners)t(e);else;}addListenerInner(e){return this.listeners?"function"==typeof this.listeners?this.listeners=[this.listeners,e]:this.listeners.push(e):this.listeners=e,{dispose:()=>this.removeListener(e)}}removeListener(e){if(!this.listeners)return;if("function"==typeof this.listeners)return void(this.listeners===e&&(this.listeners=void 0));const t=this.listeners.indexOf(e);-1!==t&&(2===this.listeners.length?this.listeners=0===t?this.listeners[1]:this.listeners[0]:this.listeners=this.listeners.slice(0,t).concat(this.listeners.slice(t+1)))}}n.EventEmitter=i;n.MemorizingEventEmitter=class extends i{constructor(){super(...arguments),this.addListener=e=>{const t=this.addListenerInner(e);return this.lastValue&&e(this.lastValue.value),t}}get hasEmitted(){return!!this.lastValue}emit(e){this.lastValue={value:e},super.emit(e)}};class s extends i{constructor(){super(...arguments),this.addListener=e=>this.lastValue?(e(this.lastValue.value),n.noopDisposable):this.addListenerInner(e)}emit(e){this.lastValue={value:e},super.emit(e),this.listeners=void 0}}},{"../errors/TaskCancelledError":416}],409:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ExecuteWrapper=n.returnOrThrow=void 0;const r=e("./Event");n.returnOrThrow=e=>{if("error"in e)throw e.error;return"success"in e?e.success:e.value};class i{constructor(e=(()=>!1),t=(()=>!1)){this.errorFilter=e,this.resultFilter=t,this.successEmitter=new r.EventEmitter,this.failureEmitter=new r.EventEmitter,this.onSuccess=this.successEmitter.addListener,this.onFailure=this.failureEmitter.addListener}clone(){return new i(this.errorFilter,this.resultFilter)}async invoke(e,...n){const r=this.successEmitter.size||this.failureEmitter.size?(()=>{if("undefined"!=typeof performance){const e=performance.now();return()=>performance.now()-e}{const e=t.hrtime.bigint();return()=>Number(t.hrtime.bigint()-e)/1e6}})():null;try{const t=await e(...n);return this.resultFilter(t)?(r&&this.failureEmitter.emit({duration:r(),handled:!0,reason:{value:t}}),{value:t}):(r&&this.successEmitter.emit({duration:r()}),{success:t})}catch(e){const t=e,n=this.errorFilter(t);if(r&&this.failureEmitter.emit({duration:r(),handled:n,reason:{error:t}}),!n)throw t;return{error:t}}}}n.ExecuteWrapper=i}).call(this)}).call(this,e("_process"))},{"./Event":408,_process:510}],410:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveAbortController=n.abortedSignal=n.neverAbortedSignal=void 0;const r=e("./Event");n.neverAbortedSignal=(new AbortController).signal;const i=new AbortController;i.abort(),n.abortedSignal=i.signal;n.deriveAbortController=e=>{const t=new AbortController;if(!e)return t;if(e.aborted&&t.abort(),e!==n.neverAbortedSignal){const n=new WeakRef(t);(0,r.onAbort)(e)((()=>n.deref()?.abort()))}return t}},{"./Event":408}],411:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.defer=void 0;n.defer=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return{resolve:e,reject:t,promise:n}}},{}],412:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BrokenCircuitError=void 0;class r extends Error{constructor(e="Execution prevented because the circuit breaker is open"){super(e),this.isBrokenCircuitError=!0}}n.BrokenCircuitError=r},{}],413:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BulkheadRejectedError=void 0;class r extends Error{constructor(e,t){super(`Bulkhead capacity exceeded (0/${e} execution slots, 0/${t} available)`),this.isBulkheadRejectedError=!0}}n.BulkheadRejectedError=r},{}],414:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.isTaskCancelledError=n.isIsolatedCircuitError=n.isBulkheadRejectedError=n.isBrokenCircuitError=void 0,i(e("./BrokenCircuitError"),n),i(e("./BulkheadRejectedError"),n),i(e("./IsolatedCircuitError"),n),i(e("./TaskCancelledError"),n);n.isBrokenCircuitError=e=>!!e&&e instanceof Error&&"isBrokenCircuitError"in e;n.isBulkheadRejectedError=e=>!!e&&e instanceof Error&&"isBulkheadRejectedError"in e;n.isIsolatedCircuitError=e=>!!e&&e instanceof Error&&"isBulkheadRejectedError"in e;n.isTaskCancelledError=e=>!!e&&e instanceof Error&&"isBulkheadRejectedError"in e},{"./BrokenCircuitError":412,"./BulkheadRejectedError":413,"./IsolatedCircuitError":415,"./TaskCancelledError":416}],415:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.IsolatedCircuitError=void 0;const r=e("./BrokenCircuitError");class i extends r.BrokenCircuitError{constructor(){super("Execution prevented because the circuit breaker is open"),this.isIsolatedCircuitError=!0}}n.IsolatedCircuitError=i},{"./BrokenCircuitError":412}],416:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TaskCancelledError=void 0;class r extends Error{constructor(e="Operation cancelled"){super(e),this.message=e,this.isTaskCancelledError=!0}}n.TaskCancelledError=r},{}],417:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.EventEmitter=n.Event=void 0,i(e("./backoff/Backoff"),n),i(e("./breaker/Breaker"),n),i(e("./BulkheadPolicy"),n),i(e("./CircuitBreakerPolicy"),n);var s=e("./common/Event");Object.defineProperty(n,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(n,"EventEmitter",{enumerable:!0,get:function(){return s.EventEmitter}}),i(e("./errors/Errors"),n),i(e("./FallbackPolicy"),n),i(e("./NoopPolicy"),n),i(e("./Policy"),n),i(e("./RetryPolicy"),n),i(e("./TimeoutPolicy"),n)},{"./BulkheadPolicy":392,"./CircuitBreakerPolicy":393,"./FallbackPolicy":394,"./NoopPolicy":395,"./Policy":396,"./RetryPolicy":397,"./TimeoutPolicy":398,"./backoff/Backoff":399,"./breaker/Breaker":405,"./common/Event":408,"./errors/Errors":414}],418:[function(e,t,n){const r=e("color-name"),i={};for(const e of Object.keys(r))i[r[e]]=e;const s={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};t.exports=s;for(const e of Object.keys(s)){if(!("channels"in s[e]))throw new Error("missing channels property: "+e);if(!("labels"in s[e]))throw new Error("missing channel labels property: "+e);if(s[e].labels.length!==s[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=s[e];delete s[e].channels,delete s[e].labels,Object.defineProperty(s[e],"channels",{value:t}),Object.defineProperty(s[e],"labels",{value:n})}s.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=s-i;let a,c;s===i?a=0:t===s?a=(n-r)/o:n===s?a=2+(r-t)/o:r===s&&(a=4+(t-n)/o),a=Math.min(60*a,360),a<0&&(a+=360);const u=(i+s)/2;return c=s===i?0:u<=.5?o/(s+i):o/(2-s-i),[a,100*c,100*u]},s.rgb.hsv=function(e){let t,n,r,i,s;const o=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(o,a,c),l=u-Math.min(o,a,c),d=function(e){return(u-e)/6/l+.5};return 0===l?(i=0,s=0):(s=l/u,t=d(o),n=d(a),r=d(c),o===u?i=r-n:a===u?i=1/3+t-r:c===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*s,100*u]},s.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=s.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,100*o,100*r]},s.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r);return[100*((1-t-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},s.rgb.keyword=function(e){const t=i[e];if(t)return t;let n,s=1/0;for(const t of Object.keys(r)){const i=r[t],c=(a=i,((o=e)[0]-a[0])**2+(o[1]-a[1])**2+(o[2]-a[2])**2);c<s&&(s=c,n=t)}var o,a;return n},s.keyword.rgb=function(e){return r[e]},s.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},s.rgb.lab=function(e){const t=s.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*r-16,500*(n-r),200*(r-i)]},s.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,s,o;if(0===n)return o=255*r,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;const a=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)s=t+1/3*-(e-1),s<0&&s++,s>1&&s--,o=6*s<1?a+6*(i-a)*s:2*s<1?i:3*s<2?a+(i-a)*(2/3-s)*6:a,c[e]=255*o;return c},s.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=s<=1?s:2-s;return[t,100*(0===r?2*i/(s+i):2*n/(r+n)),100*((r+n)/2)]},s.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,s=t-Math.floor(t),o=255*r*(1-n),a=255*r*(1-n*s),c=255*r*(1-n*(1-s));switch(r*=255,i){case 0:return[r,c,o];case 1:return[a,r,o];case 2:return[o,r,c];case 3:return[o,a,r];case 4:return[c,o,r];case 5:return[r,o,a]}},s.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let s,o;o=(2-n)*r;const a=(2-n)*i;return s=n*i,s/=a<=1?a:2-a,s=s||0,o/=2,[t,100*s,100*o]},s.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let s;i>1&&(n/=i,r/=i);const o=Math.floor(6*t),a=1-r;s=6*t-o,1&o&&(s=1-s);const c=n+s*(a-n);let u,l,d;switch(o){default:case 6:case 0:u=a,l=c,d=n;break;case 1:u=c,l=a,d=n;break;case 2:u=n,l=a,d=c;break;case 3:u=n,l=c,d=a;break;case 4:u=c,l=n,d=a;break;case 5:u=a,l=n,d=c}return[255*u,255*l,255*d]},s.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},s.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,s,o;return i=3.2406*t+-1.5372*n+-.4986*r,s=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[255*i,255*s,255*o]},s.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},s.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const i=n**3,s=t**3,o=r**3;return n=i>.008856?i:(n-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},s.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(n*n+r*r),i]},s.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},s.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=null===t?s.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let a=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===o&&(a+=60),a},s.hsv.ansi16=function(e){return s.rgb.ansi16(s.hsv.rgb(e),e[2])},s.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},s.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},s.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},s.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},s.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},s.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),s=Math.min(Math.min(t,n),r),o=i-s;let a,c;return a=o<1?s/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[360*c,100*o,100*a]},s.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},s.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},s.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const i=[0,0,0],s=t%1*6,o=s%1,a=1-o;let c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-n)*r,[255*(n*i[0]+c),255*(n*i[1]+c),255*(n*i[2]+c)]},s.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},s.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},s.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},s.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},s.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},s.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},s.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},s.gray.hsl=function(e){return[0,0,e[0]]},s.gray.hsv=s.gray.hsl,s.gray.hwb=function(e){return[0,100,e[0]]},s.gray.cmyk=function(e){return[0,0,0,e[0]]},s.gray.lab=function(e){return[e[0],0,0]},s.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},s.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},{"color-name":421}],419:[function(e,t,n){const r=e("./conversions"),i=e("./route"),s={};Object.keys(r).forEach((e=>{s[e]={},Object.defineProperty(s[e],"channels",{value:r[e].channels}),Object.defineProperty(s[e],"labels",{value:r[e].labels});const t=i(e);Object.keys(t).forEach((n=>{const r=t[n];s[e][n]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(r),s[e][n].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),t.exports=s},{"./conversions":418,"./route":420}],420:[function(e,t,n){const r=e("./conversions");function i(e){const t=function(){const e={},t=Object.keys(r);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){const e=n.pop(),i=Object.keys(r[e]);for(let r=i.length,s=0;s<r;s++){const r=i[s],o=t[r];-1===o.distance&&(o.distance=t[e].distance+1,o.parent=e,n.unshift(r))}}return t}function s(e,t){return function(n){return t(e(n))}}function o(e,t){const n=[t[e].parent,e];let i=r[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),i=s(r[t[o].parent][o],i),o=t[o].parent;return i.conversion=n,i}t.exports=function(e){const t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){const e=r[i];null!==t[e].parent&&(n[e]=o(e,t))}return n}},{"./conversions":418}],421:[function(e,t,n){"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],422:[function(e,t,n){"use strict";var r=e("luxon");function i(e,t){var n={zone:t};if(e?e instanceof i?this._date=e._date:e instanceof Date?this._date=r.DateTime.fromJSDate(e,n):"number"==typeof e?this._date=r.DateTime.fromMillis(e,n):"string"==typeof e&&(this._date=r.DateTime.fromISO(e,n),this._date.isValid||(this._date=r.DateTime.fromRFC2822(e,n)),this._date.isValid||(this._date=r.DateTime.fromSQL(e,n)),this._date.isValid||(this._date=r.DateTime.fromFormat(e,"EEE, d MMM yyyy HH:mm:ss",n))):this._date=r.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},t.exports=i},{luxon:502}],423:[function(e,t,n){"use strict";var r=e("./date"),i=e("./field_stringify");function s(e,t){this._options=t,this._utc=t.utc||!1,this._tz=this._utc?"UTC":t.tz,this._currentDate=new r(t.currentDate,this._tz),this._startDate=t.startDate?new r(t.startDate,this._tz):null,this._endDate=t.endDate?new r(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,n){switch(e){case"month":case"dayOfWeek":var r=s.aliases[e];t=t.replace(/[a-z]{3}/gi,(function(e){if(e=e.toLowerCase(),void 0!==r[e])return r[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]+"-"+n.max,t[1]]),o(t[0],t[t.length-1])):o(e,1)}function o(e,t){var r=[],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<n.min||o>n.max)throw new Error("Constraint error, got range "+s+"-"+o+" expected range "+n.min+"-"+n.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 c=s,u=o;c<=u;c++)a>0&&a%t==0?(a=1,r.push(c)):a++;return r}return Number.isNaN(+e)?e:+e}return-1!==t.indexOf("*")?t=t.replace(/\*/g,n.min+"-"+n.max):-1!==t.indexOf("?")&&(t=t.replace(/\?/g,n.min+"-"+n.max)),function(t){var r=[];function o(t){if(t instanceof Array)for(var i=0,o=t.length;i<o;i++){var a=t[i];if(s._isValidConstraintChar(n,a))r.push(a);else{if("number"!=typeof a||Number.isNaN(a)||a<n.min||a>n.max)throw new Error("Constraint error, got value "+a+" expected range "+n.min+"-"+n.max);r.push(a)}}else{if(s._isValidConstraintChar(n,t))return void r.push(t);var c=+t;if(Number.isNaN(c)||c<n.min||c>n.max)throw new Error("Constraint error, got value "+t+" expected range "+n.min+"-"+n.max);"dayOfWeek"===e&&(c%=7),r.push(c)}}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 c=0,u=a.length;c<u;c++)o(i(a[c]));else o(i(t));return r.sort(s._sortCompareFn),r}(t)},s._sortCompareFn=function(e,t){var n="number"==typeof e,r="number"==typeof t;return n&&r?e-t:!n&&r?1:n&&!r?-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,n=s.map.length;t<n;++t){var r=s.map[t],i=e[r];e[r]=Object.freeze(i)}return Object.freeze(e)},s.prototype._applyTimezoneShift=function(e,t,n){if("Month"===n||"Day"===n){var r=e.getTime();e[t+n](),r===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+n]();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 n=0,r=t.length;n<r;n++)if(t[n]>=e)return t[n]===e;return t[0]===e}function n(e,t){if(t<6){if(e.getDate()<8&&1===t)return!0;var n=e.getDate()%7?1:0,r=e.getDate()-e.getDate()%7;return Math.floor(r/7)+n===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 r(this._currentDate,this._tz),c=this._startDate,u=this._endDate,l=a.getTime(),d=0;for(;d<1e4;){if(d++,e){if(c&&a.getTime()-c.getTime()<0)throw new Error("Out of the timespan range")}else if(u&&u.getTime()-a.getTime()<0)throw new Error("Out of the timespan range");var h=t(a.getDate(),this.fields.dayOfMonth);i(this.fields.dayOfMonth)&&(h=h||a.isLastDayOfMonth());var p=t(a.getDay(),this.fields.dayOfWeek);i(this.fields.dayOfWeek)&&(p=p||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 f=this.fields.dayOfMonth.length>=s.daysInMonth[a.getMonth()],m=this.fields.dayOfWeek.length===s.constraints[5].max-s.constraints[5].min+1,y=a.getHours();if(h||p&&!m)if(f||!m||h)if(!f||m||p)if(this._nthDayOfWeek>0&&!n(a,this._nthDayOfWeek))this._applyTimezoneShift(a,o,"Day");else if(t(a.getMonth()+1,this.fields.month)){if(t(y,this.fields.hour)){if(this._dstEnd===y&&!e){this._dstEnd=null,this._applyTimezoneShift(a,"add","Hour");continue}}else{if(this._dstStart!==y){this._dstStart=null,this._applyTimezoneShift(a,o,"Hour");continue}if(!t(y-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(d>=1e4)throw new Error("Invalid expression, loop limit exceeded");return this._currentDate=new r(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 n=[];if(e>=0)for(var r=0,i=e;r<i;r++)try{var s=this.next();n.push(s),t&&t(s,r)}catch(e){break}else for(r=0,i=e;r>i;r--)try{s=this.prev();n.push(s),t&&t(s,r)}catch(e){break}return n},s.prototype.reset=function(e){this._currentDate=new r(e||this._options.currentDate)},s.prototype.stringify=function(e){for(var t=[],n=e?0:1,r=s.map.length;n<r;++n){var o=s.map[n],a=this.fields[o],c="dayOfMonth"===o&&1===this.fields.month.length?{min:1,max:s.daysInMonth[this.fields.month[0]-1]}:s.constraints[n];t.push(i(a,c.min,c.max))}return t.join(" ")},s.parse=function(e,t){var n=this;function i(e,t){t||(t={}),void 0===t.currentDate&&(t.currentDate=new r(void 0,n._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,c=0,u=s.map.length;c<u;++c){var l=s.map[c],d=o[o.length>u?c:c-a];if(c<a||!d)i.push(s._parseField(l,s.parseDefaults[c],s.constraints[c]));else{var h="dayOfWeek"===l?m(d):d;i.push(s._parseField(l,h,s.constraints[c]))}}var p={};for(c=0,u=s.map.length;c<u;c++){p[s.map[c]]=i[c]}var f=s._handleMaxDaysInMonth(p);return p.dayOfMonth=f||p.dayOfMonth,new s(p,t);function m(e){var n=e.split("#");if(n.length>1){var r=+n[n.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(n.length>2||Number.isNaN(r)||r<1||r>5)throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return t.nthDayOfWeek=r,n[0]}return e}}return"function"==typeof t&&(t={}),i(e,t)},s.fieldsToExpression=function(e,t){function n(e,t,n){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 r=0,i=t.length;r<i;r++){var o=t[r];if(!s._isValidConstraintChar(n,o)&&("number"!=typeof o||Number.isNaN(o)||o<n.min||o>n.max))throw new Error("Constraint error, got value "+o+" expected range "+n.min+"-"+n.max)}}for(var r={},i=0,o=s.map.length;i<o;++i){var a=s.map[i],c=e[a];n(a,c,s.constraints[i]);for(var u=[],l=-1;++l<c.length;)u[l]=c[l];if((c=u.sort(s._sortCompareFn).filter((function(e,t,n){return!t||e!==n[t-1]}))).length!==u.length)throw new Error("Validation error, Field "+a+" contains duplicate values");r[a]=c}var d=s._handleMaxDaysInMonth(r);return r.dayOfMonth=d||r.dayOfMonth,new s(r,t||{})},t.exports=s},{"./date":422,"./field_stringify":425}],424:[function(e,t,n){"use strict";function r(e){return{start:e,count:1}}function i(e,t){e.end=t,e.step=t-e.start,e.count=2}function s(e,t,n){t&&(2===t.count?(e.push(r(t.start)),e.push(r(t.end))):e.push(t)),n&&e.push(n)}t.exports=function(e){for(var t=[],n=void 0,o=0;o<e.length;o++){var a=e[o];"number"!=typeof a?(s(t,n,r(a)),n=void 0):n?1===n.count?i(n,a):n.step===a-n.end?(n.count++,n.end=a):2===n.count?(t.push(r(n.start)),i(n=r(n.end),a)):(s(t,n),n=r(a)):n=r(a)}return s(t,n),t}},{}],425:[function(e,t,n){"use strict";var r=e("./field_compactor");t.exports=function(e,t,n){var i=r(e);if(1===i.length){var s=i[0];if(1===(u=s.step)&&s.start===t&&s.end===n)return"*";if(1!==u&&s.start===t&&s.end===n-u+1)return"*/"+u}for(var o=[],a=0,c=i.length;a<c;++a){var u,l=i[a];if(1===l.count)o.push(l.start);else 1===(u=l.step)?o.push(l.start+"-"+l.end):l.end===n-u+1?o.push(l.start+"/"+u):o.push(l.start+"-"+l.end+"/"+u)}return o.join(",")}},{"./field_compactor":424}],426:[function(e,t,n){"use strict";var r=e("./expression");function i(){}i._parseEntry=function(e){var t=e.split(" ");if(6===t.length)return{interval:r.parse(e)};if(t.length>6)return{interval:r.parse(t.slice(0,6).join(" ")),command:t.slice(6,t.length)};throw new Error("Invalid entry: "+e)},i.parseExpression=function(e,t){return r.parse(e,t)},i.fieldsToExpression=function(e,t){return r.fieldsToExpression(e,t)},i.parseString=function(e){for(var t=e.split("\n"),n={variables:{},expressions:[],errors:{}},r=0,s=t.length;r<s;r++){var o=null,a=t[r].trim();if(a.length>0){if(a.match(/^#/))continue;if(o=a.match(/^(.*)=(.*)$/))n.variables[o[1]]=o[2];else{var c=null;try{c=i._parseEntry("0 "+a),n.expressions.push(c.interval)}catch(e){n.errors[a]=e}}}}return n},i.parseFile=function(t,n){e("fs").readFile(t,(function(e,t){if(!e)return n(null,i.parseString(t.toString()));n(e)}))},t.exports=i},{"./expression":423,fs:384}],427:[function(e,t,n){var r=1e3,i=60*r,s=60*i,o=24*s,a=7*o,c=365.25*o;function u(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}t.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*c;case"weeks":case"week":case"w":return n*a;case"days":case"day":case"d":return n*o;case"hours":case"hour":case"hrs":case"hr":case"h":return n*s;case"minutes":case"minute":case"mins":case"min":case"m":return n*i;case"seconds":case"second":case"secs":case"sec":case"s":return n*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return u(e,t,o,"day");if(t>=s)return u(e,t,s,"hour");if(t>=i)return u(e,t,i,"minute");if(t>=r)return u(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=s)return Math.round(e/s)+"h";if(t>=i)return Math.round(e/i)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],428:[function(e,t,n){(function(r){(function(){n.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),e.splice(i,0,n)},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug")}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},n.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+)/)},n.storage=function(){try{return localStorage}catch(e){}}(),n.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`."))}})(),n.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"],n.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(n);const{formatters:i}=t.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this)}).call(this,e("_process"))},{"./common":429,_process:510}],429:[function(e,t,n){t.exports=function(t){function n(e){let t,i,s,o=null;function a(...e){if(!a.enabled)return;const r=a,i=Number(new Date),s=i-(t||i);r.diff=s,r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,i)=>{if("%%"===t)return"%";o++;const s=n.formatters[i];if("function"==typeof s){const n=e[o];t=s.call(r,n),e.splice(o,1),o--}return t})),n.formatArgs.call(r,e);(r.log||n.log).apply(r,e)}return a.namespace=e,a.useColors=n.useColors(),a.color=n.selectColor(e),a.extend=r,a.destroy=n.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==n.namespaces&&(i=n.namespaces,s=n.enabled(e)),s),set:e=>{o=e}}),"function"==typeof n.init&&n.init(a),a}function r(e,t){const r=n(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},n.disable=function(){const e=[...n.names.map(i),...n.skips.map(i).map((e=>"-"+e))].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.namespaces=e,n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(t=0;t<i;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.slice(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){if("*"===e[e.length-1])return!0;let t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=e("ms"),n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((e=>{n[e]=t[e]})),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}},{ms:427}],430:[function(e,t,n){t.exports=function e(t){Object.freeze(t);var n="function"==typeof t,r=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(t).forEach((function(i){!r.call(t,i)||n&&("caller"===i||"callee"===i||"arguments"===i)||null===t[i]||"object"!=typeof t[i]&&"function"!=typeof t[i]||Object.isFrozen(t[i])||e(t[i])})),t}},{}],431:[function(e,t,n){(function(t){(function(){var r=e("js-sha3").keccak_256,i=e("idna-uts46-hx");function s(e){return e?i.toUnicode(e,{useStd3ASCII:!0,transitional:!1}):e}n.hash=function(e){for(var n="",i=0;i<32;i++)n+="00";if(name=s(e),name){var o=name.split(".");for(i=o.length-1;i>=0;i--){var a=r(o[i]);n=r(new t(n+a,"hex"))}}return"0x"+n},n.normalize=s}).call(this)}).call(this,e("buffer").Buffer)},{buffer:385,"idna-uts46-hx":493,"js-sha3":500}],432:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.keccak512=n.keccak384=n.keccak256=n.keccak224=void 0;const r=e("@noble/hashes/sha3"),i=e("./utils.js");n.keccak224=(0,i.wrapHash)(r.keccak_224),n.keccak256=(()=>{const e=(0,i.wrapHash)(r.keccak_256);return e.create=r.keccak_256.create,e})(),n.keccak384=(0,i.wrapHash)(r.keccak_384),n.keccak512=(0,i.wrapHash)(r.keccak_512)},{"./utils.js":451,"@noble/hashes/sha3":446}],433:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getHash=o,n.createCurve=function(e,t){const n=t=>(0,s.weierstrass)({...e,...o(t)});return Object.freeze({...n(t),create:n})};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("@noble/hashes/hmac"),i=e("@noble/hashes/utils"),s=e("./abstract/weierstrass.js");function o(e){return{hash:e,hmac:(t,...n)=>(0,r.hmac)(e,t,(0,i.concatBytes)(...n)),randomBytes:i.randomBytes}}},{"./abstract/weierstrass.js":438,"@noble/hashes/hmac":444,"@noble/hashes/utils":447}],434:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wNAF=function(e,t){const n=(e,t)=>{const n=t.negate();return e?n:t},r=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,i=t;for(;n>s;)n&o&&(r=r.add(i)),i=i.double(),n>>=o;return r},precomputeWindow(e,t){const{windows:n,windowSize:i}=r(t),s=[];let o=e,a=o;for(let e=0;e<n;e++){a=o,s.push(a);for(let e=1;e<i;e++)a=a.add(o),s.push(a);o=a.double()}return s},wNAF(t,i,s){const{windows:a,windowSize:c}=r(t);let u=e.ZERO,l=e.BASE;const d=BigInt(2**t-1),h=2**t,p=BigInt(t);for(let e=0;e<a;e++){const t=e*c;let r=Number(s&d);s>>=p,r>c&&(r-=h,s+=o);const a=t,f=t+Math.abs(r)-1,m=e%2!=0,y=r<0;0===r?l=l.add(n(m,i[a])):u=u.add(n(y,i[f]))}return{p:u,f:l}},wNAFCached(e,t,n,r){const i=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,i),1!==i&&t.set(e,r(s))),this.wNAF(i,s,n)}}},n.validateBasic=function(e){return(0,r.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,r.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("./modular.js"),i=e("./utils.js"),s=BigInt(0),o=BigInt(1)},{"./modular.js":436,"./utils.js":437}],435:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.expand_message_xmd=u,n.expand_message_xof=l,n.hash_to_field=d,n.isogenyMap=function(e,t){const n=t.map((e=>Array.from(e).reverse()));return(t,r)=>{const[i,s,o,a]=n.map((n=>n.reduce(((n,r)=>e.add(e.mul(n,t),r)))));return t=e.div(i,s),r=e.mul(r,e.div(o,a)),{x:t,y:r}}},n.createHasher=function(e,t,n){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(r,i){const s=d(r,2,{...n,DST:n.DST,...i}),o=e.fromAffine(t(s[0])),a=e.fromAffine(t(s[1])),c=o.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(r,i){const s=d(r,1,{...n,DST:n.encodeDST,...i}),o=e.fromAffine(t(s[0])).clearCofactor();return o.assertValidity(),o},mapToCurve(n){if(!Array.isArray(n))throw new Error("mapToCurve: expected array of bigints");for(const e of n)if("bigint"!=typeof e)throw new Error(`mapToCurve: expected array of bigints, got ${e} in array`);const r=e.fromAffine(t(n)).clearCofactor();return r.assertValidity(),r}}};const r=e("./modular.js"),i=e("./utils.js"),s=i.bytesToNumberBE;function o(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=255&e,e>>>=8;return new Uint8Array(n)}function a(e,t){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r]^t[r];return n}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function u(e,t,n,r){(0,i.abytes)(e),(0,i.abytes)(t),c(n),t.length>255&&(t=r((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:s,blockLen:u}=r,l=Math.ceil(n/s);if(l>255)throw new Error("Invalid xmd length");const d=(0,i.concatBytes)(t,o(t.length,1)),h=o(0,u),p=o(n,2),f=new Array(l),m=r((0,i.concatBytes)(h,e,p,o(0,1),d));f[0]=r((0,i.concatBytes)(m,o(1,1),d));for(let e=1;e<=l;e++){const t=[a(m,f[e-1]),o(e+1,1),d];f[e]=r((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...f).slice(0,n)}function l(e,t,n,r,s){if((0,i.abytes)(e),(0,i.abytes)(t),c(n),t.length>255){const e=Math.ceil(2*r/8);t=s.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return s.create({dkLen:n}).update(e).update(o(n,2)).update(t).update(o(t.length,1)).digest()}function d(e,t,n){(0,i.validateObject)(n,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:o,k:a,m:d,hash:h,expand:p,DST:f}=n;(0,i.abytes)(e),c(t);const m="string"==typeof f?(0,i.utf8ToBytes)(f):f,y=o.toString(2).length,g=Math.ceil((y+a)/8),b=t*d*g;let v;if("xmd"===p)v=u(e,m,b,h);else if("xof"===p)v=l(e,m,b,a,h);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');v=e}const w=new Array(t);for(let e=0;e<t;e++){const t=new Array(d);for(let n=0;n<d;n++){const i=g*(n+e*d),a=v.subarray(i,i+g);t[n]=(0,r.mod)(s(a),o)}w[e]=t}return w}},{"./modular.js":436,"./utils.js":437}],436:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isNegativeLE=void 0,n.mod=d,n.pow=h,n.pow2=function(e,t,n){let r=e;for(;t-- >i;)r*=r,r%=n;return r},n.invert=p,n.tonelliShanks=f,n.FpSqrt=m,n.validateField=function(e){const t=y.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,r.validateObject)(e,t)},n.FpPow=g,n.FpInvertBatch=b,n.FpDiv=function(e,t,n){return e.mul(t,"bigint"==typeof n?p(n,e.ORDER):e.inv(n))},n.FpIsSquare=function(e){const t=(e.ORDER-s)/o;return n=>{const r=e.pow(n,t);return e.eql(r,e.ZERO)||e.eql(r,e.ONE)}},n.nLength=v,n.Field=function(e,t,n=!1,o={}){if(e<=i)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:c}=v(e,t);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const u=m(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:c,MASK:(0,r.bitMask)(a),ZERO:i,ONE:s,create:t=>d(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&s)===s,neg:t=>d(-t,e),eql:(e,t)=>e===t,sqr:t=>d(t*t,e),add:(t,n)=>d(t+n,e),sub:(t,n)=>d(t-n,e),mul:(t,n)=>d(t*n,e),pow:(e,t)=>g(l,e,t),div:(t,n)=>d(t*p(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:o.sqrt||(e=>u(l,e)),invertBatch:e=>b(l,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?(0,r.numberToBytesLE)(e,c):(0,r.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e)}});return Object.freeze(l)},n.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)},n.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n},n.hashToPrivateScalar=function(e,t,n=!1){const i=(e=(0,r.ensureBytes)("privateHash",e)).length,o=v(t).nByteLength+8;if(o<24||i<o||i>1024)throw new Error(`hashToPrivateScalar: expected ${o}-1024 bytes of input, got ${i}`);return d(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-s)+s},n.getFieldBytesLength=w,n.getMinHashLength=x,n.mapHashToField=function(e,t,n=!1){const i=e.length,o=w(t),a=x(t);if(i<16||i<a||i>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${i}`);const c=d(n?(0,r.bytesToNumberBE)(e):(0,r.bytesToNumberLE)(e),t-s)+s;return n?(0,r.numberToBytesLE)(c,o):(0,r.numberToBytesBE)(c,o)};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("./utils.js"),i=BigInt(0),s=BigInt(1),o=BigInt(2),a=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);BigInt(9),BigInt(16);function d(e,t){const n=e%t;return n>=i?n:t+n}function h(e,t,n){if(n<=i||t<i)throw new Error("Expected power/modulo > 0");if(n===s)return i;let r=s;for(;t>i;)t&s&&(r=r*e%n),e=e*e%n,t>>=s;return r}function p(e,t){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=d(e,t),r=t,o=i,a=s,c=s,u=i;for(;n!==i;){const e=r/n,t=r%n,i=o-c*e,s=a-u*e;r=n,n=t,o=c,a=u,c=i,u=s}if(r!==s)throw new Error("invert: does not exist");return d(o,t)}function f(e){const t=(e-s)/o;let n,r,a;for(n=e-s,r=0;n%o===i;n/=o,r++);for(a=o;a<e&&h(a,t,e)!==e-s;a++);if(1===r){const t=(e+s)/c;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}const u=(n+s)/o;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let o=r,c=e.pow(e.mul(e.ONE,a),n),l=e.pow(i,u),d=e.pow(i,n);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let n=e.sqr(d);t<o&&!e.eql(n,e.ONE);t++)n=e.sqr(n);const n=e.pow(c,s<<BigInt(o-t-1));c=e.sqr(n),l=e.mul(l,n),d=e.mul(d,c),o=t}return l}}function m(e){if(e%c===a){const t=(e+s)/c;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}if(e%l===u){const t=(e-u)/l;return function(e,n){const r=e.mul(n,o),i=e.pow(r,t),s=e.mul(n,i),a=e.mul(e.mul(s,o),i),c=e.mul(s,e.sub(a,e.ONE));if(!e.eql(e.sqr(c),n))throw new Error("Cannot find square root");return c}}return f(e)}n.isNegativeLE=(e,t)=>(d(e,t)&s)===s;const y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function g(e,t,n){if(n<i)throw new Error("Expected power > 0");if(n===i)return e.ONE;if(n===s)return t;let r=e.ONE,o=t;for(;n>i;)n&s&&(r=e.mul(r,o)),o=e.sqr(o),n>>=s;return r}function b(e,t){const n=new Array(t.length),r=t.reduce(((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r))),e.ONE),i=e.inv(r);return t.reduceRight(((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r))),i),n}function v(e,t){const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function w(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function x(e){const t=w(e);return t+Math.ceil(t/2)}},{"./utils.js":437}],437:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.bitMask=void 0,n.isBytes=o,n.abytes=a,n.bytesToHex=u,n.numberToHexUnpadded=l,n.hexToNumber=d,n.hexToBytes=f,n.bytesToNumberBE=function(e){return d(u(e))},n.bytesToNumberLE=function(e){return a(e),d(u(Uint8Array.from(e).reverse()))},n.numberToBytesBE=m,n.numberToBytesLE=function(e,t){return m(e,t).reverse()},n.numberToVarBytesBE=function(e){return f(l(e))},n.ensureBytes=function(e,t,n){let r;if("string"==typeof t)try{r=f(t)}catch(n){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${n}`)}else{if(!o(t))throw new Error(`${e} must be hex string or Uint8Array`);r=Uint8Array.from(t)}const i=r.length;if("number"==typeof n&&i!==n)throw new Error(`${e} expected ${n} bytes, got ${i}`);return r},n.concatBytes=y,n.equalBytes=function(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n},n.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))},n.bitLen=function(e){let t;for(t=0;e>r;e>>=i,t+=1);return t},n.bitGet=function(e,t){return e>>BigInt(t)&i},n.bitSet=function(e,t,n){return e|(n?i:r)<<BigInt(t)},n.createHmacDrbg=function(e,t,n){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");let r=g(e),i=g(e),s=0;const o=()=>{r.fill(1),i.fill(0),s=0},a=(...e)=>n(i,r,...e),c=(e=g())=>{i=a(b([0]),e),r=a(),0!==e.length&&(i=a(b([1]),e),r=a())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){r=a();const t=r.slice();n.push(t),e+=r.length}return y(...n)};return(e,t)=>{let n;for(o(),c(e);!(n=t(u()));)c();return o(),n}},n.validateObject=function(e,t,n={}){const r=(t,n,r)=>{const i=v[n];if("function"!=typeof i)throw new Error(`Invalid validator "${n}", expected function`);const s=e[t];if(!(r&&void 0===s||i(s,e)))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${n}`)};for(const[e,n]of Object.entries(t))r(e,n,!1);for(const[e,t]of Object.entries(n))r(e,t,!0);return e};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=BigInt(0),i=BigInt(1),s=BigInt(2);function o(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function a(e){if(!o(e))throw new Error("Uint8Array expected")}const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){a(e);let t="";for(let n=0;n<e.length;n++)t+=c[e[n]];return t}function l(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function d(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}const h={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function p(e){return e>=h._0&&e<=h._9?e-h._0:e>=h._A&&e<=h._F?e-(h._A-10):e>=h._a&&e<=h._f?e-(h._a-10):void 0}function f(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=p(e.charCodeAt(i)),s=p(e.charCodeAt(i+1));if(void 0===n||void 0===s){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+s}return r}function m(e,t){return f(e.toString(16).padStart(2*t,"0"))}function y(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];a(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n}n.bitMask=e=>(s<<BigInt(e-1))-i;const g=e=>new Uint8Array(e),b=e=>Uint8Array.from(e);const v={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||o(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)}},{}],438:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DER=void 0,n.weierstrassPoints=f,n.weierstrass=function(e){const t=function(e){const t=(0,r.validateBasic)(e);return s.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:c}=t,d=a.BYTES+1,h=2*a.BYTES+1;function p(e){return i.mod(e,c)}function m(e){return i.invert(e,c)}const{ProjectivePoint:y,normPrivateKeyToScalar:g,weierstrassEquation:b,isWithinCurveOrder:v}=f({...t,toBytes(e,t,n){const r=t.toAffine(),i=a.toBytes(r.x),o=s.concatBytes;return n?o(Uint8Array.from([t.hasEvenY()?2:3]),i):o(Uint8Array.from([4]),i,a.toBytes(r.y))},fromBytes(e){const t=e.length,n=e[0],r=e.subarray(1);if(t!==d||2!==n&&3!==n){if(t===h&&4===n){return{x:a.fromBytes(r.subarray(0,a.BYTES)),y:a.fromBytes(r.subarray(a.BYTES,2*a.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${d} compressed bytes or ${h} uncompressed bytes`)}{const e=s.bytesToNumberBE(r);if(!(u<(i=e)&&i<a.ORDER))throw new Error("Point is not on curve");const t=b(e);let o;try{o=a.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("Point is not on curve"+t)}return!(1&~n)!==((o&l)===l)&&(o=a.neg(o)),{x:e,y:o}}var i}}),w=e=>s.bytesToHex(s.numberToBytesBE(e,t.nByteLength));function x(e){return e>c>>l}const E=(e,t,n)=>s.bytesToNumberBE(e.slice(t,n));class S{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const n=t.nByteLength;return e=(0,o.ensureBytes)("compactSignature",e,2*n),new S(E(e,0,n),E(e,n,2*n))}static fromDER(e){const{r:t,s:r}=n.DER.toSig((0,o.ensureBytes)("DER",e));return new S(t,r)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new S(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:r,recovery:i}=this,s=k((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const c=2===i||3===i?n+t.n:n;if(c>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=1&i?"03":"02",l=y.fromHex(u+w(c)),d=m(c),h=p(-s*d),f=p(r*d),g=y.BASE.multiplyAndAddUnsafe(l,h,f);if(!g)throw new Error("point at infinify");return g.assertValidity(),g}hasHighS(){return x(this.s)}normalizeS(){return this.hasHighS()?new S(this.r,p(-this.s),this.recovery):this}toDERRawBytes(){return s.hexToBytes(this.toDERHex())}toDERHex(){return n.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return s.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const A={isValidPrivateKey(e){try{return g(e),!0}catch(e){return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{const e=i.getMinHashLength(t.n);return i.mapHashToField(t.randomBytes(e),t.n)},precompute:(e=8,t=y.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function _(e){const t=s.isBytes(e),n="string"==typeof e,r=(t||n)&&e.length;return t?r===d||r===h:n?r===2*d||r===2*h:e instanceof y}const T=t.bits2int||function(e){const n=s.bytesToNumberBE(e),r=8*e.length-t.nBitLength;return r>0?n>>BigInt(r):n},k=t.bits2int_modN||function(e){return p(T(e))},C=s.bitMask(t.nBitLength);function P(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(u<=e&&e<C))throw new Error(`bigint expected < 2^${t.nBitLength}`);return s.numberToBytesBE(e,t.nByteLength)}function O(e,n,r=I){if(["recovered","canonical"].some((e=>e in r)))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:c}=t;let{lowS:d,prehash:h,extraEntropy:f}=r;null==d&&(d=!0),e=(0,o.ensureBytes)("msgHash",e),h&&(e=(0,o.ensureBytes)("prehashed msgHash",i(e)));const b=k(e),w=g(n),E=[P(w),P(b)];if(null!=f&&!1!==f){const e=!0===f?c(a.BYTES):f;E.push((0,o.ensureBytes)("extraEntropy",e))}const A=s.concatBytes(...E),_=b;return{seed:A,k2sig:function(e){const t=T(e);if(!v(t))return;const n=m(t),r=y.BASE.multiply(t).toAffine(),i=p(r.x);if(i===u)return;const s=p(n*p(_+i*w));if(s===u)return;let o=(r.x===i?0:2)|Number(r.y&l),a=s;return d&&x(s)&&(a=function(e){return x(e)?p(-e):e}(s),o^=1),new S(i,a,o)}}}const I={lowS:t.lowS,prehash:!1},M={lowS:t.lowS,prehash:!1};return y.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return y.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(_(e))throw new Error("first arg must be private key");if(!_(t))throw new Error("second arg must be public key");return y.fromHex(t).multiply(g(e)).toRawBytes(n)},sign:function(e,n,r=I){const{seed:i,k2sig:o}=O(e,n,r),a=t;return s.createHmacDrbg(a.hash.outputLen,a.nByteLength,a.hmac)(i,o)},verify:function(e,r,i,a=M){const c=e;if(r=(0,o.ensureBytes)("msgHash",r),i=(0,o.ensureBytes)("publicKey",i),"strict"in a)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:l}=a;let d,h;try{if("string"==typeof c||s.isBytes(c))try{d=S.fromDER(c)}catch(e){if(!(e instanceof n.DER.Err))throw e;d=S.fromCompact(c)}else{if("object"!=typeof c||"bigint"!=typeof c.r||"bigint"!=typeof c.s)throw new Error("PARSE");{const{r:e,s:t}=c;d=new S(e,t)}}h=y.fromHex(i)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&d.hasHighS())return!1;l&&(r=t.hash(r));const{r:f,s:g}=d,b=k(r),v=m(g),w=p(b*v),x=p(f*v),E=y.BASE.multiplyAndAddUnsafe(h,w,x)?.toAffine();if(!E)return!1;return p(E.x)===f},ProjectivePoint:y,Signature:S,utils:A}},n.SWUFpSqrtRatio=m,n.mapToCurveSimpleSWU=function(e,t){if(i.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const n=m(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let i,s,o,a,c,u,l,d;i=e.sqr(r),i=e.mul(i,t.Z),s=e.sqr(i),s=e.add(s,i),o=e.add(s,e.ONE),o=e.mul(o,t.B),a=e.cmov(t.Z,e.neg(s),!e.eql(s,e.ZERO)),a=e.mul(a,t.A),s=e.sqr(o),u=e.sqr(a),c=e.mul(u,t.A),s=e.add(s,c),s=e.mul(s,o),u=e.mul(u,a),c=e.mul(u,t.B),s=e.add(s,c),l=e.mul(i,o);const{isValid:h,value:p}=n(s,u);d=e.mul(i,r),d=e.mul(d,p),l=e.cmov(l,o,h),d=e.cmov(d,p,h);const f=e.isOdd(r)===e.isOdd(d);return d=e.cmov(e.neg(d),d,f),l=e.div(l,a),{x:l,y:d}}};
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("./curve.js"),i=e("./modular.js"),s=e("./utils.js"),o=e("./utils.js");const{bytesToNumberBE:a,hexToBytes:c}=s;n.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:t}=n.DER;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const r=e[1],i=e.subarray(2,r+2);if(!r||i.length!==r)throw new t("Invalid signature integer: wrong length");if(128&i[0])throw new t("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:a(i),l:e.subarray(r+2)}},toSig(e){const{Err:t}=n.DER,r="string"==typeof e?c(e):e;s.abytes(r);let i=r.length;if(i<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==i-2)throw new t("Invalid signature: incorrect length");const{d:o,l:a}=n.DER._parseInt(r.subarray(2)),{d:u,l:l}=n.DER._parseInt(a);if(l.length)throw new t("Invalid signature: left bytes after parsing");return{r:o,s:u}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,n=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},r=t(n(e.s)),i=t(n(e.r)),s=r.length/2,o=i.length/2,a=n(s),c=n(o);return`30${n(o+s+4)}02${c}${i}02${a}${r}`}};const u=BigInt(0),l=BigInt(1),d=BigInt(2),h=BigInt(3),p=BigInt(4);function f(e){const t=function(e){const t=(0,r.validateBasic)(e);s.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:i,a:o}=t;if(n){if(!i.eql(o,i.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof n||"bigint"!=typeof n.beta||"function"!=typeof n.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,a=t.toBytes||((e,t,r)=>{const i=t.toAffine();return s.concatBytes(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),c=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function d(e){const{a:r,b:i}=t,s=n.sqr(e),o=n.mul(s,e);return n.add(n.add(o,n.mul(e,r)),i)}if(!n.eql(n.sqr(t.Gy),d(t.Gx)))throw new Error("bad generator point: equation left != right");function p(e){return"bigint"==typeof e&&u<e&&e<t.n}function f(e){if(!p(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function m(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:a,n:c}=t;if(n&&"bigint"!=typeof e){if(s.isBytes(e)&&(e=s.bytesToHex(e)),"string"!=typeof e||!n.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*r,"0")}let u;try{u="bigint"==typeof e?e:s.bytesToNumberBE((0,o.ensureBytes)("private key",e,r))}catch(t){throw new Error(`private key must be ${r} bytes, hex or bigint, not ${typeof e}`)}return a&&(u=i.mod(u,c)),f(u),u}const y=new Map;function g(e){if(!(e instanceof b))throw new Error("ProjectivePoint expected")}class b{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required")}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof b)throw new Error("projective point not allowed");const i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?b.ZERO:new b(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(b.fromAffine)}static fromHex(e){const t=b.fromAffine(c((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(m(e))}_setWindowSize(e){this._WINDOW_SIZE=e,y.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:r}=this.toAffine();if(!n.isValid(e)||!n.isValid(r))throw new Error("bad point: x or y not FE");const i=n.sqr(r),s=d(e);if(!n.eql(i,s))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){g(e);const{px:t,py:r,pz:i}=this,{px:s,py:o,pz:a}=e,c=n.eql(n.mul(t,a),n.mul(s,i)),u=n.eql(n.mul(r,a),n.mul(o,i));return c&&u}negate(){return new b(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,i=n.mul(r,h),{px:s,py:o,pz:a}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,d=n.mul(s,s),p=n.mul(o,o),f=n.mul(a,a),m=n.mul(s,o);return m=n.add(m,m),l=n.mul(s,a),l=n.add(l,l),c=n.mul(e,l),u=n.mul(i,f),u=n.add(c,u),c=n.sub(p,u),u=n.add(p,u),u=n.mul(c,u),c=n.mul(m,c),l=n.mul(i,l),f=n.mul(e,f),m=n.sub(d,f),m=n.mul(e,m),m=n.add(m,l),l=n.add(d,d),d=n.add(l,d),d=n.add(d,f),d=n.mul(d,m),u=n.add(u,d),f=n.mul(o,a),f=n.add(f,f),d=n.mul(f,m),c=n.sub(c,d),l=n.mul(f,p),l=n.add(l,l),l=n.add(l,l),new b(c,u,l)}add(e){g(e);const{px:r,py:i,pz:s}=this,{px:o,py:a,pz:c}=e;let u=n.ZERO,l=n.ZERO,d=n.ZERO;const p=t.a,f=n.mul(t.b,h);let m=n.mul(r,o),y=n.mul(i,a),v=n.mul(s,c),w=n.add(r,i),x=n.add(o,a);w=n.mul(w,x),x=n.add(m,y),w=n.sub(w,x),x=n.add(r,s);let E=n.add(o,c);return x=n.mul(x,E),E=n.add(m,v),x=n.sub(x,E),E=n.add(i,s),u=n.add(a,c),E=n.mul(E,u),u=n.add(y,v),E=n.sub(E,u),d=n.mul(p,x),u=n.mul(f,v),d=n.add(u,d),u=n.sub(y,d),d=n.add(y,d),l=n.mul(u,d),y=n.add(m,m),y=n.add(y,m),v=n.mul(p,v),x=n.mul(f,x),y=n.add(y,v),v=n.sub(m,v),v=n.mul(p,v),x=n.add(x,v),m=n.mul(y,x),l=n.add(l,m),m=n.mul(E,x),u=n.mul(w,u),u=n.sub(u,m),m=n.mul(w,y),d=n.mul(E,d),d=n.add(d,m),new b(u,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return w.wNAFCached(this,y,e,(e=>{const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(b.fromAffine)}))}multiplyUnsafe(e){const r=b.ZERO;if(e===u)return r;if(f(e),e===l)return this;const{endo:i}=t;if(!i)return w.unsafeLadder(this,e);let{k1neg:s,k1:o,k2neg:a,k2:c}=i.splitScalar(e),d=r,h=r,p=this;for(;o>u||c>u;)o&l&&(d=d.add(p)),c&l&&(h=h.add(p)),p=p.double(),o>>=l,c>>=l;return s&&(d=d.negate()),a&&(h=h.negate()),h=new b(n.mul(h.px,i.beta),h.py,h.pz),d.add(h)}multiply(e){f(e);let r,i,s=e;const{endo:o}=t;if(o){const{k1neg:e,k1:t,k2neg:a,k2:c}=o.splitScalar(s);let{p:u,f:l}=this.wNAF(t),{p:d,f:h}=this.wNAF(c);u=w.constTimeNegate(e,u),d=w.constTimeNegate(a,d),d=new b(n.mul(d.px,o.beta),d.py,d.pz),r=u.add(d),i=l.add(h)}else{const{p:e,f:t}=this.wNAF(s);r=e,i=t}return b.normalizeZ([r,i])[0]}multiplyAndAddUnsafe(e,t,n){const r=b.BASE,i=(e,t)=>t!==u&&t!==l&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),s=i(this,t).add(i(e,n));return s.is0()?void 0:s}toAffine(e){const{px:t,py:r,pz:i}=this,s=this.is0();null==e&&(e=s?n.ONE:n.inv(i));const o=n.mul(t,e),a=n.mul(r,e),c=n.mul(i,e);if(s)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw new Error("invZ was invalid");return{x:o,y:a}}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===l)return!0;if(n)return n(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===l?this:n?n(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(b,this,e)}toHex(e=!0){return s.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,n.ONE),b.ZERO=new b(n.ZERO,n.ONE,n.ZERO);const v=t.nBitLength,w=(0,r.wNAF)(b,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:m,weierstrassEquation:d,isWithinCurveOrder:p}}function m(e,t){const n=e.ORDER;let r=u;for(let e=n-l;e%d===u;e/=d)r+=l;const i=r,s=d<<i-l-l,o=s*d,a=(n-l)/o,c=(a-l)/d,f=o-l,m=s,y=e.pow(t,a),g=e.pow(t,(a+l)/d);let b=(t,n)=>{let r=y,s=e.pow(n,f),o=e.sqr(s);o=e.mul(o,n);let a=e.mul(t,o);a=e.pow(a,c),a=e.mul(a,s),s=e.mul(a,n),o=e.mul(a,t);let u=e.mul(o,s);a=e.pow(u,m);let h=e.eql(a,e.ONE);s=e.mul(o,g),a=e.mul(u,r),o=e.cmov(s,o,h),u=e.cmov(a,u,h);for(let t=i;t>l;t--){let n=t-d;n=d<<n-l;let i=e.pow(u,n);const a=e.eql(i,e.ONE);s=e.mul(o,r),r=e.mul(r,r),i=e.mul(u,r),o=e.cmov(s,o,a),u=e.cmov(i,u,a)}return{isValid:h,value:o}};if(e.ORDER%p===h){const n=(e.ORDER-h)/p,r=e.sqrt(e.neg(t));b=(t,i)=>{let s=e.sqr(i);const o=e.mul(t,i);s=e.mul(s,o);let a=e.pow(s,n);a=e.mul(a,o);const c=e.mul(a,r),u=e.mul(e.sqr(a),i),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,a,l)}}}return b}},{"./curve.js":434,"./modular.js":436,"./utils.js":437}],439:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.encodeToCurve=n.hashToCurve=n.schnorr=n.secp256k1=void 0;
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
const r=e("@noble/hashes/sha256"),i=e("@noble/hashes/utils"),s=e("./_shortw_utils.js"),o=e("./abstract/hash-to-curve.js"),a=e("./abstract/modular.js"),c=e("./abstract/utils.js"),u=e("./abstract/weierstrass.js"),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h=BigInt(1),p=BigInt(2),f=(e,t)=>(e+t/p)/t;function m(e){const t=l,n=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),c=BigInt(44),u=BigInt(88),d=e*e*e%t,h=d*d*e%t,f=(0,a.pow2)(h,n,t)*h%t,m=(0,a.pow2)(f,n,t)*h%t,g=(0,a.pow2)(m,p,t)*d%t,b=(0,a.pow2)(g,i,t)*g%t,v=(0,a.pow2)(b,s,t)*b%t,w=(0,a.pow2)(v,c,t)*v%t,x=(0,a.pow2)(w,u,t)*w%t,E=(0,a.pow2)(x,c,t)*v%t,S=(0,a.pow2)(E,n,t)*h%t,A=(0,a.pow2)(S,o,t)*b%t,_=(0,a.pow2)(A,r,t)*d%t,T=(0,a.pow2)(_,p,t);if(!y.eql(y.sqr(T),e))throw new Error("Cannot find square root");return T}const y=(0,a.Field)(l,void 0,void 0,{sqrt:m});n.secp256k1=(0,s.createCurve)({a:BigInt(0),b:BigInt(7),Fp:y,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=d,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,o=BigInt("0x100000000000000000000000000000000"),c=f(s*e,t),u=f(-r*e,t);let l=(0,a.mod)(e-c*n-u*i,t),p=(0,a.mod)(-c*r-u*s,t);const m=l>o,y=p>o;if(m&&(l=t-l),y&&(p=t-p),l>o||p>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:m,k1:l,k2neg:y,k2:p}}}},r.sha256);const g=BigInt(0),b=e=>"bigint"==typeof e&&g<e&&e<l,v=e=>"bigint"==typeof e&&g<e&&e<d,w={};function x(e,...t){let n=w[e];if(void 0===n){const t=(0,r.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));n=(0,c.concatBytes)(t,t),w[e]=n}return(0,r.sha256)((0,c.concatBytes)(n,...t))}const E=e=>e.toRawBytes(!0).slice(1),S=e=>(0,c.numberToBytesBE)(e,32),A=e=>(0,a.mod)(e,l),_=e=>(0,a.mod)(e,d),T=n.secp256k1.ProjectivePoint,k=(e,t,n)=>T.BASE.multiplyAndAddUnsafe(e,t,n);function C(e){let t=n.secp256k1.utils.normPrivateKeyToScalar(e),r=T.fromPrivateKey(t);return{scalar:r.hasEvenY()?t:_(-t),bytes:E(r)}}function P(e){if(!b(e))throw new Error("bad x: need 0 < x < p");const t=A(e*e);let n=m(A(t*e+BigInt(7)));n%p!==g&&(n=A(-n));const r=new T(e,n,h);return r.assertValidity(),r}function O(...e){return _((0,c.bytesToNumberBE)(x("BIP0340/challenge",...e)))}function I(e){return C(e).bytes}function M(e,t,n=(0,i.randomBytes)(32)){const r=(0,c.ensureBytes)("message",e),{bytes:s,scalar:o}=C(t),a=(0,c.ensureBytes)("auxRand",n,32),u=S(o^(0,c.bytesToNumberBE)(x("BIP0340/aux",a))),l=x("BIP0340/nonce",u,s,r),d=_((0,c.bytesToNumberBE)(l));if(d===g)throw new Error("sign failed: k is zero");const{bytes:h,scalar:p}=C(d),f=O(h,s,r),m=new Uint8Array(64);if(m.set(h,0),m.set(S(_(p+f*o)),32),!j(m,r,s))throw new Error("sign: Invalid signature produced");return m}function j(e,t,n){const r=(0,c.ensureBytes)("signature",e,64),i=(0,c.ensureBytes)("message",t),s=(0,c.ensureBytes)("publicKey",n,32);try{const e=P((0,c.bytesToNumberBE)(s)),t=(0,c.bytesToNumberBE)(r.subarray(0,32));if(!b(t))return!1;const n=(0,c.bytesToNumberBE)(r.subarray(32,64));if(!v(n))return!1;const o=O(S(t),E(e),i),a=k(e,n,_(-o));return!(!a||!a.hasEvenY()||a.toAffine().x!==t)}catch(e){return!1}}n.schnorr={getPublicKey:I,sign:M,verify:j,utils:{randomPrivateKey:n.secp256k1.utils.randomPrivateKey,lift_x:P,pointToBytes:E,numberToBytesBE:c.numberToBytesBE,bytesToNumberBE:c.bytesToNumberBE,taggedHash:x,mod:a.mod}};const R=(()=>(0,o.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),B=(()=>(0,u.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}))(),N=(()=>(0,o.createHasher)(n.secp256k1.ProjectivePoint,(e=>{const{x:t,y:n}=B(y.create(e[0]));return R(t,n)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}))();n.hashToCurve=N.hashToCurve,n.encodeToCurve=N.encodeToCurve},{"./_shortw_utils.js":433,"./abstract/hash-to-curve.js":435,"./abstract/modular.js":436,"./abstract/utils.js":437,"./abstract/weierstrass.js":438,"@noble/hashes/sha256":445,"@noble/hashes/utils":447}],440:[function(e,t,n){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function i(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)}function s(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function o(e,...t){if(!s(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function a(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 c(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 u(e,t){o(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}Object.defineProperty(n,"__esModule",{value:!0}),n.output=n.exists=n.hash=n.bytes=n.bool=n.number=n.isBytes=void 0,n.number=r,n.bool=i,n.isBytes=s,n.bytes=o,n.hash=a,n.exists=c,n.output=u;const l={number:r,bool:i,bytes:o,hash:a,exists:c,output:u};n.default=l},{}],441:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.HashMD=n.Maj=n.Chi=void 0;const r=e("./_assert.js"),i=e("./utils.js");n.Chi=(e,t,n)=>e&t^~e&n;n.Maj=(e,t,n)=>e&t^e&n^t&n;class s extends i.Hash{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,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){(0,r.exists)(this);const{view:t,buffer:n,blockLen:s}=this,o=(e=(0,i.toBytes)(e)).length;for(let r=0;r<o;){const a=Math.min(s-this.pos,o-r);if(a!==s)n.set(e.subarray(r,r+a),this.pos),this.pos+=a,r+=a,this.pos===s&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;s<=o-r;r+=s)this.process(t,r)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.exists)(this),(0,r.output)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:s,isLE:o}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>s-a&&(this.process(n,0),a=0);for(let e=a;e<s;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(n>>i&s),a=Number(n&s),c=r?4:0,u=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+u,a,r)}(n,s-8,BigInt(8*this.length),o),this.process(n,0);const c=(0,i.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,d[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:s,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=s,r%t&&e.buffer.set(n),e}}n.HashMD=s},{"./_assert.js":440,"./utils.js":447}],442:[function(e,t,n){arguments[4][103][0].apply(n,arguments)},{dup:103}],443:[function(e,t,n){arguments[4][104][0].apply(n,arguments)},{dup:104}],444:[function(e,t,n){arguments[4][105][0].apply(n,arguments)},{"./_assert.js":440,"./utils.js":447,dup:105}],445:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha224=n.sha256=void 0;const r=e("./_md.js"),i=e("./utils.js"),s=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]),o=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class c extends r.HashMD{constructor(){super(64,32,8,!1),this.A=0|o[0],this.B=0|o[1],this.C=0|o[2],this.D=0|o[3],this.E=0|o[4],this.F=0|o[5],this.G=0|o[6],this.H=0|o[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:s,G:o,H:a}=this;return[e,t,n,r,i,s,o,a]}set(e,t,n,r,i,s,o,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)a[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=a[e-15],n=a[e-2],r=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,s=(0,i.rotr)(n,17)^(0,i.rotr)(n,19)^n>>>10;a[e]=s+a[e-7]+r+a[e-16]|0}let{A:n,B:o,C:c,D:u,E:l,F:d,G:h,H:p}=this;for(let e=0;e<64;e++){const t=p+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+(0,r.Chi)(l,d,h)+s[e]+a[e]|0,f=((0,i.rotr)(n,2)^(0,i.rotr)(n,13)^(0,i.rotr)(n,22))+(0,r.Maj)(n,o,c)|0;p=h,h=d,d=l,l=u+t|0,u=c,c=o,o=n,n=t+f|0}n=n+this.A|0,o=o+this.B|0,c=c+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,h=h+this.G|0,p=p+this.H|0,this.set(n,o,c,u,l,d,h,p)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class u extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}n.sha256=(0,i.wrapConstructor)((()=>new c)),n.sha224=(0,i.wrapConstructor)((()=>new u))},{"./_md.js":441,"./utils.js":447}],446:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shake256=n.shake128=n.keccak_512=n.keccak_384=n.keccak_256=n.keccak_224=n.sha3_512=n.sha3_384=n.sha3_256=n.sha3_224=n.Keccak=n.keccakP=void 0;const r=e("./_assert.js"),i=e("./_u64.js"),s=e("./utils.js"),o=[],a=[],c=[],u=BigInt(0),l=BigInt(1),d=BigInt(2),h=BigInt(7),p=BigInt(256),f=BigInt(113);for(let e=0,t=l,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],o.push(2*(5*r+n)),a.push((e+1)*(e+2)/2%64);let i=u;for(let e=0;e<7;e++)t=(t<<l^(t>>h)*f)%p,t&d&&(i^=l<<(l<<BigInt(e))-l);c.push(i)}const[m,y]=(0,i.split)(c,!0),g=(e,t,n)=>n>32?(0,i.rotlBH)(e,t,n):(0,i.rotlSH)(e,t,n),b=(e,t,n)=>n>32?(0,i.rotlBL)(e,t,n):(0,i.rotlSL)(e,t,n);function v(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const r=(t+8)%10,i=(t+2)%10,s=n[i],o=n[i+1],a=g(s,o,1)^n[r],c=b(s,o,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=a,e[t+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){const r=a[n],s=g(t,i,r),c=b(t,i,r),u=o[n];t=e[u],i=e[u+1],e[u]=s,e[u+1]=c}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=m[r],e[1]^=y[r]}n.fill(0)}n.keccakP=v;class w extends s.Hash{constructor(e,t,n,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,r.number)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,s.u32)(this.state)}keccak(){s.isLE||(0,s.byteSwap32)(this.state32),v(this.state32,this.rounds),s.isLE||(0,s.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(e){(0,r.exists)(this);const{blockLen:t,state:n}=this,i=(e=(0,s.toBytes)(e)).length;for(let r=0;r<i;){const s=Math.min(t-this.pos,i-r);for(let t=0;t<s;t++)n[this.pos++]^=e[r++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,128&t&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){(0,r.exists)(this,!1),(0,r.bytes)(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();const s=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+s),r),this.posOut+=s,r+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,r.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,r.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:s}=this;return e||(e=new w(t,n,r,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=s,e.destroyed=this.destroyed,e}}n.Keccak=w;const x=(e,t,n)=>(0,s.wrapConstructor)((()=>new w(t,e,n)));n.sha3_224=x(6,144,28),n.sha3_256=x(6,136,32),n.sha3_384=x(6,104,48),n.sha3_512=x(6,72,64),n.keccak_224=x(1,144,28),n.keccak_256=x(1,136,32),n.keccak_384=x(1,104,48),n.keccak_512=x(1,72,64);const E=(e,t,n)=>(0,s.wrapXOFConstructorWithOpts)(((r={})=>new w(t,e,void 0===r.dkLen?n:r.dkLen,!0)));n.shake128=E(31,168,16),n.shake256=E(31,136,32)},{"./_assert.js":440,"./_u64.js":442,"./utils.js":447}],447:[function(e,t,n){"use strict";
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(n,"__esModule",{value:!0}),n.randomBytes=n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.checkOpts=n.Hash=n.concatBytes=n.toBytes=n.utf8ToBytes=n.asyncLoop=n.nextTick=n.hexToBytes=n.bytesToHex=n.byteSwap32=n.byteSwapIfBE=n.byteSwap=n.isLE=n.rotl=n.rotr=n.createView=n.u32=n.u8=n.isBytes=void 0;const r=e("@noble/hashes/crypto"),i=e("./_assert.js");n.isBytes=function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name};n.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);n.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));n.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);n.rotr=(e,t)=>e<<32-t|e>>>t;n.rotl=(e,t)=>e<<t|e>>>32-t>>>0,n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];n.byteSwap=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,n.byteSwapIfBE=n.isLE?e=>e:e=>(0,n.byteSwap)(e),n.byteSwap32=function(e){for(let t=0;t<e.length;t++)e[t]=(0,n.byteSwap)(e[t])};const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));n.bytesToHex=function(e){(0,i.bytes)(e);let t="";for(let n=0;n<e.length;n++)t+=s[e[n]];return t};const o={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(e){return e>=o._0&&e<=o._9?e-o._0:e>=o._A&&e<=o._F?e-(o._A-10):e>=o._a&&e<=o._f?e-(o._a-10):void 0}n.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=a(e.charCodeAt(i)),s=a(e.charCodeAt(i+1));if(void 0===n||void 0===s){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+s}return r};function c(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function u(e){return"string"==typeof e&&(e=c(e)),(0,i.bytes)(e),e}n.nextTick=async()=>{},n.asyncLoop=async function(e,t,r){let i=Date.now();for(let s=0;s<e;s++){r(s);const e=Date.now()-i;e>=0&&e<t||(await(0,n.nextTick)(),i+=e)}},n.utf8ToBytes=c,n.toBytes=u,n.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];(0,i.bytes)(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n};n.Hash=class{clone(){return this._cloneInto()}};const l={}.toString;n.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==l.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},n.wrapConstructor=function(e){const t=t=>e().update(u(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},n.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},{"./_assert.js":440,"@noble/hashes/crypto":443}],448:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getRandomBytesSync=function(e){return(0,r.randomBytes)(e)},n.getRandomBytes=async function(e){return(0,r.randomBytes)(e)};const r=e("@noble/hashes/utils")},{"@noble/hashes/utils":447}],449:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.secp256k1=void 0;var r=e("@noble/curves/secp256k1");Object.defineProperty(n,"secp256k1",{enumerable:!0,get:function(){return r.secp256k1}})},{"@noble/curves/secp256k1":439}],450:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha256=void 0;const r=e("@noble/hashes/sha256"),i=e("./utils.js");n.sha256=(0,i.wrapHash)(r.sha256)},{"./utils.js":451,"@noble/hashes/sha256":445}],451:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=n.utf8ToBytes=n.createView=n.concatBytes=n.toHex=n.bytesToHex=n.assertBytes=n.assertBool=void 0,n.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},n.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,s.hexToBytes)(t)},n.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},n.wrapHash=function(e){return t=>(i.default.bytes(t),e(t))};const i=r(e("@noble/hashes/_assert")),s=e("@noble/hashes/utils"),o=i.default.bool;n.assertBool=o;const a=i.default.bytes;n.assertBytes=a;var c=e("@noble/hashes/utils");Object.defineProperty(n,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(n,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(n,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(n,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(n,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}}),n.crypto=(()=>{const e="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,n=void 0!==t&&"function"==typeof t.require&&t.require.bind(t);return{node:n&&!e?n("crypto"):void 0,web:e}})()},{"@noble/hashes/_assert":440,"@noble/hashes/utils":447}],452:[function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,s),r(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}g(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,s,o,a;if(u(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"==typeof o?o=s[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=l(e))>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,a=c,console&&console.warn&&console.warn(a)}return e}function h(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):y(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);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){r.once&&e.removeEventListener(t,i),n(s)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),a.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},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(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},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){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 c=i[e];if(void 0===c)return!1;if("function"==typeof c)s(c,this,t);else{var u=c.length,l=y(c,u);for(n=0;n<u;++n)s(l[n],this,t)}return!0},a.prototype.addListener=function(e,t){return d(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return d(this,e,t,!0)},a.prototype.once=function(e,t){return u(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,s,o;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(i=s[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},{}],453:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("readable-stream");class i extends r.Duplex{constructor(e){super({objectMode:!0}),this._port=e,this._port.onMessage.addListener((e=>this._onMessage(e))),this._port.onDisconnect.addListener((()=>this._onDisconnect())),this._log=()=>null}_onMessage(e){if(t.isBuffer(e)){const n=t.from(e);this._log(n,!1),this.push(n)}else this._log(e,!1),this.push(e)}_onDisconnect(){this.destroy()}_read(){}_write(e,n,r){try{if(t.isBuffer(e)){const t=e.toJSON();t._isBuffer=!0,this._log(t,!0),this._port.postMessage(t)}else this._log(e,!0),this._port.postMessage(e)}catch(e){return r(new Error("PortDuplexStream - disconnected"))}return r()}_setLogger(e){this._log=e}}n.default=i}).call(this)}).call(this,e("buffer").Buffer)},{buffer:385,"readable-stream":472}],454:[function(e,t,n){"use strict";const{SymbolDispose:r}=e("../../ours/primordials"),{AbortError:i,codes:s}=e("../../ours/errors"),{isNodeStream:o,isWebStream:a,kControllerErrorFunction:c}=e("./utils"),u=e("./end-of-stream"),{ERR_INVALID_ARG_TYPE:l}=s;let d;t.exports.addAbortSignal=function(e,n){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new l(t,"AbortSignal",e)})(e,"signal"),!o(n)&&!a(n))throw new l("stream",["ReadableStream","WritableStream","Stream"],n);return t.exports.addAbortSignalNoValidate(e,n)},t.exports.addAbortSignalNoValidate=function(t,n){if("object"!=typeof t||!("aborted"in t))return n;const s=o(n)?()=>{n.destroy(new i(void 0,{cause:t.reason}))}:()=>{n[c](new i(void 0,{cause:t.reason}))};if(t.aborted)s();else{d=d||e("../../ours/util").addAbortListener;const i=d(t,s);u(n,i[r])}return n}},{"../../ours/errors":473,"../../ours/primordials":474,"../../ours/util":475,"./end-of-stream":460,"./utils":469}],455:[function(e,t,n){"use strict";const{StringPrototypeSlice:r,SymbolIterator:i,TypedArrayPrototypeSet:s,Uint8Array:o}=e("../../ours/primordials"),{Buffer:a}=e("buffer"),{inspect:c}=e("../../ours/util");t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,n=""+t.data;for(;null!==(t=t.next);)n+=e+t.data;return n}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let n=this.head,r=0;for(;n;)s(t,n.data,r),r+=n.data.length,n=n.next;return t}consume(e,t){const n=this.head.data;if(e<n.length){const t=n.slice(0,e);return this.head.data=n.slice(e),t}return e===n.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(t+=s,++i,n.next?this.head=n.next:this.head=this.tail=null):(t+=r(s,0,e),this.head=n,n.data=r(s,e));break}t+=s,e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}_getBuffer(e){const t=a.allocUnsafe(e),n=e;let r=this.head,i=0;do{const a=r.data;if(!(e>a.length)){e===a.length?(s(t,a,n-e),++i,r.next?this.head=r.next:this.head=this.tail=null):(s(t,new o(a.buffer,a.byteOffset,e),n-e),this.head=r,r.data=a.slice(e));break}s(t,a,n-e),e-=a.length,++i}while(null!==(r=r.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return c(this,{...t,depth:0,customInspect:!1})}}},{"../../ours/primordials":474,"../../ours/util":475,buffer:385}],456:[function(e,t,n){"use strict";const{pipeline:r}=e("./pipeline"),i=e("./duplex"),{destroyer:s}=e("./destroy"),{isNodeStream:o,isReadable:a,isWritable:c,isWebStream:u,isTransformStream:l,isWritableStream:d,isReadableStream:h}=e("./utils"),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:f,ERR_MISSING_ARGS:m}}=e("../../ours/errors"),y=e("./end-of-stream");t.exports=function(...e){if(0===e.length)throw new m("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let n=0;n<e.length;++n)if(o(e[n])||u(e[n])){if(n<e.length-1&&!(a(e[n])||h(e[n])||l(e[n])))throw new f(`streams[${n}]`,t[n],"must be readable");if(n>0&&!(c(e[n])||d(e[n])||l(e[n])))throw new f(`streams[${n}]`,t[n],"must be writable")}let n,g,b,v,w;const x=e[0],E=r(e,(function(e){const t=v;v=null,t?t(e):e?w.destroy(e):A||S||w.destroy()})),S=!!(c(x)||d(x)||l(x)),A=!!(a(E)||h(E)||l(E));if(w=new i({writableObjectMode:!(null==x||!x.writableObjectMode),readableObjectMode:!(null==E||!E.readableObjectMode),writable:S,readable:A}),S){if(o(x))w._write=function(e,t,r){x.write(e,t)?r():n=r},w._final=function(e){x.end(),g=e},x.on("drain",(function(){if(n){const e=n;n=null,e()}}));else if(u(x)){const e=(l(x)?x.writable:x).getWriter();w._write=async function(t,n,r){try{await e.ready,e.write(t).catch((()=>{})),r()}catch(e){r(e)}},w._final=async function(t){try{await e.ready,e.close().catch((()=>{})),g=t}catch(e){t(e)}}}const e=l(E)?E.readable:E;y(e,(()=>{if(g){const e=g;g=null,e()}}))}if(A)if(o(E))E.on("readable",(function(){if(b){const e=b;b=null,e()}})),E.on("end",(function(){w.push(null)})),w._read=function(){for(;;){const e=E.read();if(null===e)return void(b=w._read);if(!w.push(e))return}};else if(u(E)){const e=(l(E)?E.readable:E).getReader();w._read=async function(){for(;;)try{const{value:t,done:n}=await e.read();if(!w.push(t))return;if(n)return void w.push(null)}catch{return}}}return w._destroy=function(e,t){e||null===v||(e=new p),b=null,n=null,g=null,null===v?t(e):(v=t,o(E)&&s(E,e))},w}},{"../../ours/errors":473,"./destroy":457,"./duplex":458,"./end-of-stream":460,"./pipeline":465,"./utils":469}],457:[function(e,t,n){"use strict";const r=e("process/"),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:s},AbortError:o}=e("../../ours/errors"),{Symbol:a}=e("../../ours/primordials"),{kIsDestroyed:c,isDestroyed:u,isFinished:l,isServerRequest:d}=e("./utils"),h=a("kDestroy"),p=a("kConstruct");function f(e,t,n){e&&(e.stack,t&&!t.errored&&(t.errored=e),n&&!n.errored&&(n.errored=e))}function m(e,t,n){let i=!1;function s(t){if(i)return;i=!0;const s=e._readableState,o=e._writableState;f(t,o,s),o&&(o.closed=!0),s&&(s.closed=!0),"function"==typeof n&&n(t),t?r.nextTick(y,e,t):r.nextTick(g,e)}try{e._destroy(t||null,s)}catch(t){s(t)}}function y(e,t){b(e,t),g(e)}function g(e){const t=e._readableState,n=e._writableState;n&&(n.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=n&&n.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function b(e,t){const n=e._readableState,r=e._writableState;null!=r&&r.errorEmitted||null!=n&&n.errorEmitted||(r&&(r.errorEmitted=!0),n&&(n.errorEmitted=!0),e.emit("error",t))}function v(e,t,n){const i=e._readableState,s=e._writableState;if(null!=s&&s.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=s&&s.autoDestroy?e.destroy(t):t&&(t.stack,s&&!s.errored&&(s.errored=t),i&&!i.errored&&(i.errored=t),n?r.nextTick(b,e,t):b(e,t))}function w(e){let t=!1;function n(n){if(t)return void v(e,null!=n?n:new s);t=!0;const i=e._readableState,o=e._writableState,a=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),a.destroyed?e.emit(h,n):n?v(e,n,!0):r.nextTick(x,e)}try{e._construct((e=>{r.nextTick(n,e)}))}catch(e){r.nextTick(n,e)}}function x(e){e.emit(p)}function E(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function S(e){e.emit("close")}function A(e,t){e.emit("error",t),r.nextTick(S,e)}t.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const n=e._readableState,i=e._writableState;n&&(n.constructed=!1),i&&(i.constructed=!1),e.once(p,t),e.listenerCount(p)>1||r.nextTick(w,e)},destroyer:function(e,t){e&&!u(e)&&(t||l(e)||(t=new o),d(e)?(e.socket=null,e.destroy(t)):E(e)?e.abort():E(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?r.nextTick(A,e,t):r.nextTick(S,e),e.destroyed||(e[c]=!0))},destroy:function(e,t){const n=this._readableState,r=this._writableState,s=r||n;return null!=r&&r.destroyed||null!=n&&n.destroyed?("function"==typeof t&&t(),this):(f(e,r,n),r&&(r.destroyed=!0),n&&(n.destroyed=!0),s.constructed?m(this,e,t):this.once(h,(function(n){m(this,i(n,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:v}},{"../../ours/errors":473,"../../ours/primordials":474,"./utils":469,"process/":510}],458:[function(e,t,n){"use strict";const{ObjectDefineProperties:r,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:s,ObjectSetPrototypeOf:o}=e("../../ours/primordials");t.exports=u;const a=e("./readable"),c=e("./writable");o(u.prototype,a.prototype),o(u,a);{const e=s(c.prototype);for(let t=0;t<e.length;t++){const n=e[t];u.prototype[n]||(u.prototype[n]=c.prototype[n])}}function u(e){if(!(this instanceof u))return new u(e);a.call(this,e),c.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let l,d;function h(){return void 0===l&&(l={}),l}r(u.prototype,{writable:{__proto__:null,...i(c.prototype,"writable")},writableHighWaterMark:{__proto__:null,...i(c.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...i(c.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...i(c.prototype,"writableBuffer")},writableLength:{__proto__:null,...i(c.prototype,"writableLength")},writableFinished:{__proto__:null,...i(c.prototype,"writableFinished")},writableCorked:{__proto__:null,...i(c.prototype,"writableCorked")},writableEnded:{__proto__:null,...i(c.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...i(c.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),u.fromWeb=function(e,t){return h().newStreamDuplexFromReadableWritablePair(e,t)},u.toWeb=function(e){return h().newReadableWritablePairFromDuplex(e)},u.from=function(t){return d||(d=e("./duplexify")),d(t,"body")}},{"../../ours/primordials":474,"./duplexify":459,"./readable":466,"./writable":470}],459:[function(e,t,n){const r=e("process/"),i=e("buffer"),{isReadable:s,isWritable:o,isIterable:a,isNodeStream:c,isReadableNodeStream:u,isWritableNodeStream:l,isDuplexNodeStream:d,isReadableStream:h,isWritableStream:p}=e("./utils"),f=e("./end-of-stream"),{AbortError:m,codes:{ERR_INVALID_ARG_TYPE:y,ERR_INVALID_RETURN_VALUE:g}}=e("../../ours/errors"),{destroyer:b}=e("./destroy"),v=e("./duplex"),w=e("./readable"),x=e("./writable"),{createDeferredPromise:E}=e("../../ours/util"),S=e("./from"),A=globalThis.Blob||i.Blob,_=void 0!==A?function(e){return e instanceof A}:function(e){return!1},T=globalThis.AbortController||e("abort-controller").AbortController,{FunctionPrototypeCall:k}=e("../../ours/primordials");class C extends v{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function P(e){const t=e.readable&&"function"!=typeof e.readable.read?w.wrap(e.readable):e.readable,n=e.writable;let r,i,a,c,u,l=!!s(t),d=!!o(n);function h(e){const t=c;c=null,t?t(e):e&&u.destroy(e)}return u=new C({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==n||!n.writableObjectMode),readable:l,writable:d}),d&&(f(n,(e=>{d=!1,e&&b(t,e),h(e)})),u._write=function(e,t,i){n.write(e,t)?i():r=i},u._final=function(e){n.end(),i=e},n.on("drain",(function(){if(r){const e=r;r=null,e()}})),n.on("finish",(function(){if(i){const e=i;i=null,e()}}))),l&&(f(t,(e=>{l=!1,e&&b(t,e),h(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(a=u._read);if(!u.push(e))return}}),u._destroy=function(e,s){e||null===c||(e=new m),a=null,r=null,i=null,null===c?s(e):(c=s,b(n,e),b(t,e))},u}t.exports=function e(t,n){if(d(t))return t;if(u(t))return P({readable:t});if(l(t))return P({writable:t});if(c(t))return P({writable:!1,readable:!1});if(h(t))return P({readable:w.fromWeb(t)});if(p(t))return P({writable:x.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:s,destroy:o}=function(e){let{promise:t,resolve:n}=E();const i=new T,s=i.signal,o=e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:o,cb:a}=await e;if(r.nextTick(a),o)return;if(s.aborted)throw new m(void 0,{cause:s.reason});({promise:t,resolve:n}=E()),yield i}}(),{signal:s});return{value:o,write(e,t,r){const i=n;n=null,i({chunk:e,done:!1,cb:r})},final(e){const t=n;n=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(a(e))return S(C,e,{objectMode:!0,write:i,final:s,destroy:o});const c=null==e?void 0:e.then;if("function"==typeof c){let t;const n=k(c,e,(e=>{if(null!=e)throw new g("nully","body",e)}),(e=>{b(t,e)}));return t=new C({objectMode:!0,readable:!1,write:i,final(e){s((async()=>{try{await n,r.nextTick(e,null)}catch(t){r.nextTick(e,t)}}))},destroy:o})}throw new g("Iterable, AsyncIterable or AsyncFunction",n,e)}if(_(t))return e(t.arrayBuffer());if(a(t))return S(C,t,{objectMode:!0,writable:!1});if(h(null==t?void 0:t.readable)&&p(null==t?void 0:t.writable))return C.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable)){return P({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?l(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0})}const i=null==t?void 0:t.then;if("function"==typeof i){let e;return k(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{b(e,t)})),e=new C({objectMode:!0,writable:!1,read(){}})}throw new y(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},{"../../ours/errors":473,"../../ours/primordials":474,"../../ours/util":475,"./destroy":457,"./duplex":458,"./end-of-stream":460,"./from":461,"./readable":466,"./utils":469,"./writable":470,"abort-controller":355,buffer:385,"process/":510}],460:[function(e,t,n){const r=e("process/"),{AbortError:i,codes:s}=e("../../ours/errors"),{ERR_INVALID_ARG_TYPE:o,ERR_STREAM_PREMATURE_CLOSE:a}=s,{kEmptyObject:c,once:u}=e("../../ours/util"),{validateAbortSignal:l,validateFunction:d,validateObject:h,validateBoolean:p}=e("../validators"),{Promise:f,PromisePrototypeThen:m,SymbolDispose:y}=e("../../ours/primordials"),{isClosed:g,isReadable:b,isReadableNodeStream:v,isReadableStream:w,isReadableFinished:x,isReadableErrored:E,isWritable:S,isWritableNodeStream:A,isWritableStream:_,isWritableFinished:T,isWritableErrored:k,isNodeStream:C,willEmitClose:P,kIsClosedPromise:O}=e("./utils");let I;const M=()=>{};function j(t,n,s){var p,f;if(2===arguments.length?(s=n,n=c):null==n?n=c:h(n,"options"),d(s,"callback"),l(n.signal,"options.signal"),s=u(s),w(t)||_(t))return function(t,n,s){let o=!1,a=M;if(n.signal)if(a=()=>{o=!0,s.call(t,new i(void 0,{cause:n.signal.reason}))},n.signal.aborted)r.nextTick(a);else{I=I||e("../../ours/util").addAbortListener;const r=I(n.signal,a),i=s;s=u(((...e)=>{r[y](),i.apply(t,e)}))}const c=(...e)=>{o||r.nextTick((()=>s.apply(t,e)))};return m(t[O].promise,c,c),M}(t,n,s);if(!C(t))throw new o("stream",["ReadableStream","WritableStream","Stream"],t);const j=null!==(p=n.readable)&&void 0!==p?p:v(t),R=null!==(f=n.writable)&&void 0!==f?f:A(t),B=t._writableState,N=t._readableState,L=()=>{t.writable||F()};let U=P(t)&&v(t)===j&&A(t)===R,D=T(t,!1);const F=()=>{D=!0,t.destroyed&&(U=!1),(!U||t.readable&&!j)&&(j&&!H||s.call(t))};let H=x(t,!1);const $=()=>{H=!0,t.destroyed&&(U=!1),(!U||t.writable&&!R)&&(R&&!D||s.call(t))},V=e=>{s.call(t,e)};let K=g(t);const G=()=>{K=!0;const e=k(t)||E(t);return e&&"boolean"!=typeof e?s.call(t,e):j&&!H&&v(t,!0)&&!x(t,!1)?s.call(t,new a):!R||D||T(t,!1)?void s.call(t):s.call(t,new a)},z=()=>{K=!0;const e=k(t)||E(t);if(e&&"boolean"!=typeof e)return s.call(t,e);s.call(t)},W=()=>{t.req.on("finish",F)};!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?R&&!B&&(t.on("end",L),t.on("close",L)):(t.on("complete",F),U||t.on("abort",G),t.req?W():t.on("request",W)),U||"boolean"!=typeof t.aborted||t.on("aborted",G),t.on("end",$),t.on("finish",F),!1!==n.error&&t.on("error",V),t.on("close",G),K?r.nextTick(G):null!=B&&B.errorEmitted||null!=N&&N.errorEmitted?U||r.nextTick(z):(j||U&&!b(t)||!D&&!1!==S(t))&&(R||U&&!S(t)||!H&&!1!==b(t))?N&&t.req&&t.aborted&&r.nextTick(z):r.nextTick(z);const q=()=>{s=M,t.removeListener("aborted",G),t.removeListener("complete",F),t.removeListener("abort",G),t.removeListener("request",W),t.req&&t.req.removeListener("finish",F),t.removeListener("end",L),t.removeListener("close",L),t.removeListener("finish",F),t.removeListener("end",$),t.removeListener("error",V),t.removeListener("close",G)};if(n.signal&&!K){const o=()=>{const e=s;q(),e.call(t,new i(void 0,{cause:n.signal.reason}))};if(n.signal.aborted)r.nextTick(o);else{I=I||e("../../ours/util").addAbortListener;const r=I(n.signal,o),i=s;s=u(((...e)=>{r[y](),i.apply(t,e)}))}}return q}t.exports=j,t.exports.finished=function(e,t){var n;let r=!1;return null===t&&(t=c),null!==(n=t)&&void 0!==n&&n.cleanup&&(p(t.cleanup,"cleanup"),r=t.cleanup),new f(((n,i)=>{const s=j(e,t,(e=>{r&&s(),e?i(e):n()}))}))}},{"../../ours/errors":473,"../../ours/primordials":474,"../../ours/util":475,"../validators":471,"./utils":469,"process/":510}],461:[function(e,t,n){"use strict";const r=e("process/"),{PromisePrototypeThen:i,SymbolAsyncIterator:s,SymbolIterator:o}=e("../../ours/primordials"),{Buffer:a}=e("buffer"),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:u}=e("../../ours/errors").codes;t.exports=function(e,t,n){let l,d;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...n,read(){this.push(t),this.push(null)}});if(t&&t[s])d=!0,l=t[s]();else{if(!t||!t[o])throw new c("iterable",["Iterable"],t);d=!1,l=t[o]()}const h=new e({objectMode:!0,highWaterMark:1,...n});let p=!1;return h._read=function(){p||(p=!0,async function(){for(;;){try{const{value:e,done:t}=d?await l.next():l.next();if(t)h.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw p=!1,new u;if(h.push(t))continue;p=!1}}catch(e){h.destroy(e)}break}}())},h._destroy=function(e,t){i(async function(e){const t=null!=e,n="function"==typeof l.throw;if(t&&n){const{value:t,done:n}=await l.throw(e);if(await t,n)return}if("function"==typeof l.return){const{value:e}=await l.return();await e}}(e),(()=>r.nextTick(t,e)),(n=>r.nextTick(t,n||e)))},h}},{"../../ours/errors":473,"../../ours/primordials":474,buffer:385,"process/":510}],462:[function(e,t,n){"use strict";const{ArrayIsArray:r,ObjectSetPrototypeOf:i}=e("../../ours/primordials"),{EventEmitter:s}=e("events");function o(e){s.call(this,e)}function a(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?r(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}i(o.prototype,s.prototype),i(o,s),o.prototype.pipe=function(e,t){const n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",i),e._isStdio||t&&!1===t.end||(n.on("end",c),n.on("close",u));let o=!1;function c(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){d(),0===s.listenerCount(this,"error")&&this.emit("error",e)}function d(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",c),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",d),n.removeListener("close",d),e.removeListener("close",d)}return a(n,"error",l),a(e,"error",l),n.on("end",d),n.on("close",d),e.on("close",d),e.emit("pipe",n),e},t.exports={Stream:o,prependListener:a}},{"../../ours/primordials":474,events:452}],463:[function(e,t,n){"use strict";const r=globalThis.AbortController||e("abort-controller").AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:s,ERR_MISSING_ARGS:o,ERR_OUT_OF_RANGE:a},AbortError:c}=e("../../ours/errors"),{validateAbortSignal:u,validateInteger:l,validateObject:d}=e("../validators"),h=e("../../ours/primordials").Symbol("kWeak"),p=e("../../ours/primordials").Symbol("kResistStopPropagation"),{finished:f}=e("./end-of-stream"),m=e("./compose"),{addAbortSignalNoValidate:y}=e("./add-abort-signal"),{isWritable:g,isNodeStream:b}=e("./utils"),{deprecate:v}=e("../../ours/util"),{ArrayPrototypePush:w,Boolean:x,MathFloor:E,Number:S,NumberIsNaN:A,Promise:_,PromiseReject:T,PromiseResolve:k,PromisePrototypeThen:C,Symbol:P}=e("../../ours/primordials"),O=P("kEmpty"),I=P("kEof");function M(t,n){if("function"!=typeof t)throw new s("fn",["Function","AsyncFunction"],t);null!=n&&d(n,"options"),null!=(null==n?void 0:n.signal)&&u(n.signal,"options.signal");let r=1;null!=(null==n?void 0:n.concurrency)&&(r=E(n.concurrency));let i=r-1;return null!=(null==n?void 0:n.highWaterMark)&&(i=E(n.highWaterMark)),l(r,"options.concurrency",1),l(i,"options.highWaterMark",0),i+=r,async function*(){const s=e("../../ours/util").AbortSignalAny([null==n?void 0:n.signal].filter(x)),o=this,a=[],u={signal:s};let l,d,h=!1,p=0;function f(){h=!0,m()}function m(){p-=1,y()}function y(){d&&!h&&p<r&&a.length<i&&(d(),d=null)}!async function(){try{for await(let e of o){if(h)return;if(s.aborted)throw new c;try{if(e=t(e,u),e===O)continue;e=k(e)}catch(t){e=T(t)}p+=1,C(e,m,f),a.push(e),l&&(l(),l=null),!h&&(a.length>=i||p>=r)&&await new _((e=>{d=e}))}a.push(I)}catch(e){const t=T(e);C(t,m,f),a.push(t)}finally{h=!0,l&&(l(),l=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===I)return;if(s.aborted)throw new c;e!==O&&(yield e),a.shift(),y()}await new _((e=>{l=e}))}}finally{h=!0,d&&(d(),d=null)}}.call(this)}async function j(e,t=void 0){for await(const n of R.call(this,e,t))return!0;return!1}function R(e,t){if("function"!=typeof e)throw new s("fn",["Function","AsyncFunction"],e);return M.call(this,(async function(t,n){return await e(t,n)?t:O}),t)}class B extends o{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function N(e){if(e=S(e),A(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}t.exports.streamReturningOperators={asIndexedPairs:v((function(e=void 0){return null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const r of this){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new c({cause:e.signal.reason});yield[t++,r]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=N(e),async function*(){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;for await(const n of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;e--<=0&&(yield n)}}.call(this)},filter:R,flatMap:function(e,t){const n=M.call(this,e,t);return async function*(){for await(const e of n)yield*e}.call(this)},map:M,take:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=N(e),async function*(){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;for await(const n of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;if(e-- >0&&(yield n),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),b(e)&&!g(e))throw new i("stream",e,"must be writable");const n=m(this,e);return null!=t&&t.signal&&y(t.signal,n),n}},t.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new s("fn",["Function","AsyncFunction"],e);return!await j.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new s("fn",["Function","AsyncFunction"],e);for await(const n of M.call(this,(async function(t,n){return await e(t,n),O}),t));},reduce:async function(e,t,n){var i;if("function"!=typeof e)throw new s("reducer",["Function","AsyncFunction"],e);null!=n&&d(n,"options"),null!=(null==n?void 0:n.signal)&&u(n.signal,"options.signal");let o=arguments.length>1;if(null!=n&&null!==(i=n.signal)&&void 0!==i&&i.aborted){const e=new c(void 0,{cause:n.signal.reason});throw this.once("error",(()=>{})),await f(this.destroy(e)),e}const a=new r,l=a.signal;if(null!=n&&n.signal){const e={once:!0,[h]:this,[p]:!0};n.signal.addEventListener("abort",(()=>a.abort()),e)}let m=!1;try{for await(const r of this){var y;if(m=!0,null!=n&&null!==(y=n.signal)&&void 0!==y&&y.aborted)throw new c;o?t=await e(t,r,{signal:l}):(t=r,o=!0)}if(!m&&!o)throw new B}finally{a.abort()}return t},toArray:async function(e){null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const r of this){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new c(void 0,{cause:e.signal.reason});w(t,r)}return t},some:j,find:async function(e,t){for await(const n of R.call(this,e,t))return n}}},{"../../ours/errors":473,"../../ours/primordials":474,"../../ours/util":475,"../validators":471,"./add-abort-signal":454,"./compose":456,"./end-of-stream":460,"./utils":469,"abort-controller":355}],464:[function(e,t,n){"use strict";const{ObjectSetPrototypeOf:r}=e("../../ours/primordials");t.exports=s;const i=e("./transform");function s(e){if(!(this instanceof s))return new s(e);i.call(this,e)}r(s.prototype,i.prototype),r(s,i),s.prototype._transform=function(e,t,n){n(null,e)}},{"../../ours/primordials":474,"./transform":468}],465:[function(e,t,n){const r=e("process/"),{ArrayIsArray:i,Promise:s,SymbolAsyncIterator:o,SymbolDispose:a}=e("../../ours/primordials"),c=e("./end-of-stream"),{once:u}=e("../../ours/util"),l=e("./destroy"),d=e("./duplex"),{aggregateTwoErrors:h,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:f,ERR_MISSING_ARGS:m,ERR_STREAM_DESTROYED:y,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:b}=e("../../ours/errors"),{validateFunction:v,validateAbortSignal:w}=e("../validators"),{isIterable:x,isReadable:E,isReadableNodeStream:S,isNodeStream:A,isTransformStream:_,isWebStream:T,isReadableStream:k,isReadableFinished:C}=e("./utils"),P=globalThis.AbortController||e("abort-controller").AbortController;let O,I,M;function j(e,t,n){let r=!1;e.on("close",(()=>{r=!0}));return{destroy:t=>{r||(r=!0,l.destroyer(e,t||new y("pipe")))},cleanup:c(e,{readable:t,writable:n},(e=>{r=!e}))}}function R(t){if(x(t))return t;if(S(t))return async function*(t){I||(I=e("./readable"));yield*I.prototype[o].call(t)}(t);throw new p("val",["Readable","Iterable","AsyncIterable"],t)}async function B(e,t,n,{end:r}){let i,o=null;const a=e=>{if(e&&(i=e),o){const e=o;o=null,e()}},u=()=>new s(((e,t)=>{i?t(i):o=()=>{i?t(i):e()}}));t.on("drain",a);const l=c(t,{readable:!1},a);try{t.writableNeedDrain&&await u();for await(const n of e)t.write(n)||await u();r&&(t.end(),await u()),n()}catch(e){n(i!==e?h(i,e):e)}finally{l(),t.off("drain",a)}}async function N(e,t,n,{end:r}){_(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,r&&await i.close(),n()}catch(e){try{await i.abort(e),n(e)}catch(e){n(e)}}}function L(t,n,s){if(1===t.length&&i(t[0])&&(t=t[0]),t.length<2)throw new m("streams");const o=new P,c=o.signal,u=null==s?void 0:s.signal,l=[];function h(){F(new b)}let y,g,v;w(u,"options.signal"),M=M||e("../../ours/util").addAbortListener,u&&(y=M(u,h));const C=[];let I,L=0;function D(e){F(e,0==--L)}function F(e,t){var i;if(!e||g&&"ERR_STREAM_PREMATURE_CLOSE"!==g.code||(g=e),g||t){for(;C.length;)C.shift()(g);null===(i=y)||void 0===i||i[a](),o.abort(),t&&(g||l.forEach((e=>e())),r.nextTick(n,g,v))}}for(let K=0;K<t.length;K++){const G=t[K],z=K<t.length-1,W=K>0,q=z||!1!==(null==s?void 0:s.end),X=K===t.length-1;if(A(G)){if(q){const{destroy:Y,cleanup:J}=j(G,z,W);C.push(Y),E(G)&&X&&l.push(J)}function H(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&D(e)}G.on("error",H),E(G)&&X&&l.push((()=>{G.removeListener("error",H)}))}if(0===K)if("function"==typeof G){if(I=G({signal:c}),!x(I))throw new f("Iterable, AsyncIterable or Stream","source",I)}else I=x(G)||S(G)||_(G)?G:d.from(G);else if("function"==typeof G){var $;if(_(I))I=R(null===($=I)||void 0===$?void 0:$.readable);else I=R(I);if(I=G(I,{signal:c}),z){if(!x(I,!0))throw new f("AsyncIterable",`transform[${K-1}]`,I)}else{var V;O||(O=e("./passthrough"));const Z=new O({objectMode:!0}),Q=null===(V=I)||void 0===V?void 0:V.then;if("function"==typeof Q)L++,Q.call(I,(e=>{v=e,null!=e&&Z.write(e),q&&Z.end(),r.nextTick(D)}),(e=>{Z.destroy(e),r.nextTick(D,e)}));else if(x(I,!0))L++,B(I,Z,D,{end:q});else{if(!k(I)&&!_(I))throw new f("AsyncIterable or Promise","destination",I);{const ne=I.readable||I;L++,B(ne,Z,D,{end:q})}}I=Z;const{destroy:ee,cleanup:te}=j(I,!1,!0);C.push(ee),X&&l.push(te)}}else if(A(G)){if(S(I)){L+=2;const re=U(I,G,D,{end:q});E(G)&&X&&l.push(re)}else if(_(I)||k(I)){const ie=I.readable||I;L++,B(ie,G,D,{end:q})}else{if(!x(I))throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],I);L++,B(I,G,D,{end:q})}I=G}else if(T(G)){if(S(I))L++,N(R(I),G,D,{end:q});else if(k(I)||x(I))L++,N(I,G,D,{end:q});else{if(!_(I))throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],I);L++,N(I.readable,G,D,{end:q})}I=G}else I=d.from(G)}return(null!=c&&c.aborted||null!=u&&u.aborted)&&r.nextTick(h),I}function U(e,t,n,{end:i}){let s=!1;if(t.on("close",(()=>{s||n(new g)})),e.pipe(t,{end:!1}),i){function o(){s=!0,t.end()}C(e)?r.nextTick(o):e.once("end",o)}else n();return c(e,{readable:!0,writable:!1},(t=>{const r=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&r&&r.ended&&!r.errored&&!r.errorEmitted?e.once("end",n).once("error",n):n(t)})),c(t,{readable:!1,writable:!0},n)}t.exports={pipelineImpl:L,pipeline:function(...e){return L(e,u(function(e){return v(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},{"../../ours/errors":473,"../../ours/primordials":474,"../../ours/util":475,"../validators":471,"./destroy":457,"./duplex":458,"./end-of-stream":460,"./passthrough":464,"./readable":466,"./utils":469,"abort-controller":355,"process/":510}],466:[function(e,t,n){const r=e("process/"),{ArrayPrototypeIndexOf:i,NumberIsInteger:s,NumberIsNaN:o,NumberParseInt:a,ObjectDefineProperties:c,ObjectKeys:u,ObjectSetPrototypeOf:l,Promise:d,SafeSet:h,SymbolAsyncDispose:p,SymbolAsyncIterator:f,Symbol:m}=e("../../ours/primordials");t.exports=X,X.ReadableState=q;const{EventEmitter:y}=e("events"),{Stream:g,prependListener:b}=e("./legacy"),{Buffer:v}=e("buffer"),{addAbortSignal:w}=e("./add-abort-signal"),x=e("./end-of-stream");let E=e("../../ours/util").debuglog("stream",(e=>{E=e}));const S=e("./buffer_list"),A=e("./destroy"),{getHighWaterMark:_,getDefaultHighWaterMark:T}=e("./state"),{aggregateTwoErrors:k,codes:{ERR_INVALID_ARG_TYPE:C,ERR_METHOD_NOT_IMPLEMENTED:P,ERR_OUT_OF_RANGE:O,ERR_STREAM_PUSH_AFTER_EOF:I,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:M},AbortError:j}=e("../../ours/errors"),{validateObject:R}=e("../validators"),B=m("kPaused"),{StringDecoder:N}=e("string_decoder"),L=e("./from");l(X.prototype,g.prototype),l(X,g);const U=()=>{},{errorOrDestroy:D}=A,F=1,H=16,$=32,V=64,K=2048,G=4096,z=65536;function W(e){return{enumerable:!1,get(){return!!(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function q(t,n,r){"boolean"!=typeof r&&(r=n instanceof e("./duplex")),this.state=K|G|H|$,t&&t.objectMode&&(this.state|=F),r&&t&&t.readableObjectMode&&(this.state|=F),this.highWaterMark=t?_(this,t,"readableHighWaterMark",r):T(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this[B]=null,t&&!1===t.emitClose&&(this.state&=~K),t&&!1===t.autoDestroy&&(this.state&=~G),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new N(t.encoding),this.encoding=t.encoding)}function X(t){if(!(this instanceof X))return new X(t);const n=this instanceof e("./duplex");this._readableState=new q(t,this,n),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!n&&w(t.signal,this)),g.call(this,t),A.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function Y(e,t,n,r){E("readableAddChunk",t);const i=e._readableState;let s;if(i.state&F||("string"==typeof t?(n=n||i.defaultEncoding,i.encoding!==n&&(r&&i.encoding?t=v.from(t,n).toString(i.encoding):(t=v.from(t,n),n=""))):t instanceof v?n="":g._isUint8Array(t)?(t=g._uint8ArrayToBuffer(t),n=""):null!=t&&(s=new C("chunk",["string","Buffer","Uint8Array"],t))),s)D(e,s);else if(null===t)i.state&=-9,function(e,t){if(E("onEofChunk"),t.ended)return;if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Q(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}(e,i);else if(i.state&F||t&&t.length>0)if(r)if(4&i.state)D(e,new M);else{if(i.destroyed||i.errored)return!1;J(e,i,t,!0)}else if(i.ended)D(e,new I);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||0!==t.length?J(e,i,t,!1):te(e,i)):J(e,i,t,!1)}else r||(i.state&=-9,te(e,i));return!i.ended&&(i.length<i.highWaterMark||0===i.length)}function J(e,t,n,r){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(t.state&z?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.state&V&&Q(e)),te(e,t)}c(q.prototype,{objectMode:W(F),ended:W(2),endEmitted:W(4),reading:W(8),constructed:W(H),sync:W($),needReadable:W(V),emittedReadable:W(128),readableListening:W(256),resumeScheduled:W(512),errorEmitted:W(1024),emitClose:W(K),autoDestroy:W(G),destroyed:W(8192),closed:W(16384),closeEmitted:W(32768),multiAwaitDrain:W(z),readingMore:W(1<<17),dataEmitted:W(1<<18)}),X.prototype.destroy=A.destroy,X.prototype._undestroy=A.undestroy,X.prototype._destroy=function(e,t){t(e)},X.prototype[y.captureRejectionSymbol]=function(e){this.destroy(e)},X.prototype[p]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new j,this.destroy(e)),new d(((t,n)=>x(this,(r=>r&&r!==e?n(r):t(null)))))},X.prototype.push=function(e,t){return Y(this,e,t,!1)},X.prototype.unshift=function(e,t){return Y(this,e,t,!0)},X.prototype.isPaused=function(){const e=this._readableState;return!0===e[B]||!1===e.flowing},X.prototype.setEncoding=function(e){const t=new N(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const n=this._readableState.buffer;let r="";for(const e of n)r+=t.write(e);return n.clear(),""!==r&&n.push(r),this._readableState.length=r.length,this};function Z(e,t){return e<=0||0===t.length&&t.ended?0:t.state&F?1:o(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Q(e){const t=e._readableState;E("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(E("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(ee,e))}function ee(e){const t=e._readableState;E("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,oe(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,r.nextTick(ne,e,t))}function ne(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){const n=t.length;if(E("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function re(e){const t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[B]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){E("readable nexttick read 0"),e.read(0)}function se(e,t){E("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),oe(e),t.flowing&&!t.reading&&e.read(0)}function oe(e){const t=e._readableState;for(E("flow",t.flowing);t.flowing&&null!==e.read(););}function ae(e,t){"function"!=typeof e.read&&(e=X.wrap(e,{objectMode:!0}));const n=async function*(e,t){let n,r=U;function i(t){this===e?(r(),r=U):r=t}e.on("readable",i);const s=x(e,{writable:!1},(e=>{n=e?k(n,e):null,r(),r=U}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(n)throw n;if(null===n)return;await new d(i)}}}catch(e){throw n=k(n,e),n}finally{!n&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==n&&!e._readableState.autoDestroy?(e.off("readable",i),s()):A.destroyer(e,null)}}(e,t);return n.stream=e,n}function ce(e,t){if(0===t.length)return null;let n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n}function ue(e){const t=e._readableState;E("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(le,t,e))}function le(e,t){if(E("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)r.nextTick(de,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function de(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let he;function pe(){return void 0===he&&(he={}),he}X.prototype.read=function(e){E("read",e),void 0===e?e=NaN:s(e)||(e=a(e,10));const t=this._readableState,n=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new O("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return E("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ue(this):Q(this),null;if(0===(e=Z(e,t))&&t.ended)return 0===t.length&&ue(this),null;let r,i=!!(t.state&V);if(E("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,E("length less than watermark",i)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)i=!1,E("reading, ended or constructing",i);else if(i){E("do read"),t.state|=8|$,0===t.length&&(t.state|=V);try{this._read(t.highWaterMark)}catch(e){D(this,e)}t.state&=~$,t.reading||(e=Z(n,t))}return r=e>0?ce(e,t):null,null===r?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&ue(this)),null===r||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",r)),r},X.prototype._read=function(e){throw new P("_read()")},X.prototype.pipe=function(e,t){const n=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),E("pipe count=%d opts=%j",i.pipes.length,t);const s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?a:y;function o(t,r){E("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,function(){E("cleanup"),e.removeListener("close",f),e.removeListener("finish",m),c&&e.removeListener("drain",c);e.removeListener("error",p),e.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",y),n.removeListener("data",d),u=!0,c&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&c()}())}function a(){E("onend"),e.end()}let c;i.endEmitted?r.nextTick(s):n.once("end",s),e.on("unpipe",o);let u=!1;function l(){u||(1===i.pipes.length&&i.pipes[0]===e?(E("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(E("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),n.pause()),c||(c=function(e,t){return function(){const n=e._readableState;n.awaitDrainWriters===t?(E("pipeOnDrain",1),n.awaitDrainWriters=null):n.multiAwaitDrain&&(E("pipeOnDrain",n.awaitDrainWriters.size),n.awaitDrainWriters.delete(t)),n.awaitDrainWriters&&0!==n.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(n,e),e.on("drain",c))}function d(t){E("ondata");const n=e.write(t);E("dest.write",n),!1===n&&l()}function p(t){if(E("onerror",t),y(),e.removeListener("error",p),0===e.listenerCount("error")){const n=e._writableState||e._readableState;n&&!n.errorEmitted?D(e,t):e.emit("error",t)}}function f(){e.removeListener("finish",m),y()}function m(){E("onfinish"),e.removeListener("close",f),y()}function y(){E("unpipe"),n.unpipe(e)}return n.on("data",d),b(e,"error",p),e.once("close",f),e.once("finish",m),e.emit("pipe",n),!0===e.writableNeedDrain?l():i.flowing||(E("pipe resume"),n.resume()),e},X.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}const n=i(t.pipes,e);return-1===n||(t.pipes.splice(n,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},X.prototype.on=function(e,t){const n=g.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,E("on readable",i.length,i.reading),i.length?Q(this):i.reading||r.nextTick(ie,this))),n},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(e,t){const n=g.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(re,this),n},X.prototype.off=X.prototype.removeListener,X.prototype.removeAllListeners=function(e){const t=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(re,this),t},X.prototype.resume=function(){const e=this._readableState;return e.flowing||(E("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(se,e,t))}(this,e)),e[B]=!1,this},X.prototype.pause=function(){return E("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(E("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[B]=!0,this},X.prototype.wrap=function(e){let t=!1;e.on("data",(n=>{!this.push(n)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{D(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const n=u(e);for(let t=1;t<n.length;t++){const r=n[t];void 0===this[r]&&"function"==typeof e[r]&&(this[r]=e[r].bind(e))}return this},X.prototype[f]=function(){return ae(this)},X.prototype.iterator=function(e){return void 0!==e&&R(e,"options"),ae(this,e)},c(X.prototype,{readable:{__proto__:null,get(){const e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),c(q.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[B]},set(e){this[B]=!!e}}}),X._fromList=ce,X.from=function(e,t){return L(X,e,t)},X.fromWeb=function(e,t){return pe().newStreamReadableFromReadableStream(e,t)},X.toWeb=function(e,t){return pe().newReadableStreamFromStreamReadable(e,t)},X.wrap=function(e,t){var n,r;return new X({objectMode:null===(n=null!==(r=e.readableObjectMode)&&void 0!==r?r:e.objectMode)||void 0===n||n,...t,destroy(t,n){A.destroyer(e,t),n(t)}}).wrap(e)}},{"../../ours/errors":473,"../../ours/primordials":474,"../../ours/util":475,"../validators":471,"./add-abort-signal":454,"./buffer_list":455,"./destroy":457,"./duplex":458,"./end-of-stream":460,"./from":461,"./legacy":462,"./state":467,buffer:385,events:452,"process/":510,string_decoder:573}],467:[function(e,t,n){"use strict";const{MathFloor:r,NumberIsInteger:i}=e("../../ours/primordials"),{validateInteger:s}=e("../validators"),{ERR_INVALID_ARG_VALUE:o}=e("../../ours/errors").codes;let a=16384,c=16;function u(e){return e?c:a}t.exports={getHighWaterMark:function(e,t,n,s){const a=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,s,n);if(null!=a){if(!i(a)||a<0){throw new o(s?`options.${n}`:"options.highWaterMark",a)}return r(a)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){s(t,"value",0),e?c=t:a=t}}},{"../../ours/errors":473,"../../ours/primordials":474,"../validators":471}],468:[function(e,t,n){"use strict";const{ObjectSetPrototypeOf:r,Symbol:i}=e("../../ours/primordials");t.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:s}=e("../../ours/errors").codes,o=e("./duplex"),{getHighWaterMark:a}=e("./state");r(u.prototype,o.prototype),r(u,o);const c=i("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),o.call(this,e),this._readableState.sync=!1,this[c]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function l(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,n)=>{t?e?e(t):this.destroy(t):(null!=n&&this.push(n),this.push(null),e&&e())}))}function d(){this._final!==l&&l.call(this)}u.prototype._final=l,u.prototype._transform=function(e,t,n){throw new s("_transform()")},u.prototype._write=function(e,t,n){const r=this._readableState,i=this._writableState,s=r.length;this._transform(e,t,((e,t)=>{e?n(e):(null!=t&&this.push(t),i.ended||s===r.length||r.length<r.highWaterMark?n():this[c]=n)}))},u.prototype._read=function(){if(this[c]){const e=this[c];this[c]=null,e()}}},{"../../ours/errors":473,"../../ours/primordials":474,"./duplex":458,"./state":467}],469:[function(e,t,n){"use strict";const{SymbolAsyncIterator:r,SymbolIterator:i,SymbolFor:s}=e("../../ours/primordials"),o=s("nodejs.stream.destroyed"),a=s("nodejs.stream.errored"),c=s("nodejs.stream.readable"),u=s("nodejs.stream.writable"),l=s("nodejs.stream.disturbed"),d=s("nodejs.webstream.isClosedPromise"),h=s("nodejs.webstream.controllerErrorFunction");function p(e,t=!1){var n;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(n=e._readableState)||void 0===n?void 0:n.readable)||e._writableState&&!e._readableState)}function f(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function m(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function y(e){return!(!e||m(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function g(e){return!(!e||m(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function b(e){return!(!e||m(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function v(e){if(!m(e))return null;const t=e._writableState,n=e._readableState,r=t||n;return!!(e.destroyed||e[o]||null!=r&&r.destroyed)}function w(e){if(!f(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function x(e,t){if(!p(e))return null;const n=e._readableState;return(null==n||!n.errored)&&("boolean"!=typeof(null==n?void 0:n.endEmitted)?null:!!(n.endEmitted||!1===t&&!0===n.ended&&0===n.length))}function E(e){return e&&null!=e[c]?e[c]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!v(e)&&(p(e)&&e.readable&&!x(e))}function S(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!v(e)&&(f(e)&&e.writable&&!w(e))}function A(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function _(e){return"boolean"==typeof e._sent100&&A(e)}t.exports={isDestroyed:v,kIsDestroyed:o,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[l])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:l,isErrored:function(e){var t,n,r,i,s,o,c,u,l,d;return!(!e||!(null!==(t=null!==(n=null!==(r=null!==(i=null!==(s=null!==(o=e[a])&&void 0!==o?o:e.readableErrored)&&void 0!==s?s:e.writableErrored)&&void 0!==i?i:null===(c=e._readableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==r?r:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==n?n:null===(l=e._readableState)||void 0===l?void 0:l.errored)&&void 0!==t?t:null===(d=e._writableState)||void 0===d?void 0:d.errored))},kIsErrored:a,isReadable:E,kIsReadable:c,kIsClosedPromise:d,kControllerErrorFunction:h,kIsWritable:u,isClosed:function(e){if(!m(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,n=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==n?void 0:n.closed)?(null==t?void 0:t.closed)||(null==n?void 0:n.closed):"boolean"==typeof e._closed&&A(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return m(e)?!!v(e)||(!1===(null==t?void 0:t.readable)||!E(e))&&(!1===(null==t?void 0:t.writable)||!S(e)):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[r]:!1===t?"function"==typeof e[i]:"function"==typeof e[r]||"function"==typeof e[i])},isReadableNodeStream:p,isReadableStream:y,isReadableEnded:function(e){if(!p(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:x,isReadableErrored:function(e){var t,n;return m(e)?e.readableErrored?e.readableErrored:null!==(t=null===(n=e._readableState)||void 0===n?void 0:n.errored)&&void 0!==t?t:null:null},isNodeStream:m,isWebStream:function(e){return y(e)||g(e)||b(e)},isWritable:S,isWritableNodeStream:f,isWritableStream:g,isWritableEnded:w,isWritableFinished:function(e,t){if(!f(e))return null;if(!0===e.writableFinished)return!0;const n=e._writableState;return(null==n||!n.errored)&&("boolean"!=typeof(null==n?void 0:n.finished)?null:!!(n.finished||!1===t&&!0===n.ended&&0===n.length))},isWritableErrored:function(e){var t,n;return m(e)?e.writableErrored?e.writableErrored:null!==(t=null===(n=e._writableState)||void 0===n?void 0:n.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:_,willEmitClose:function(e){if(!m(e))return null;const t=e._writableState,n=e._readableState,r=t||n;return!r&&_(e)||!!(r&&r.autoDestroy&&r.emitClose&&!1===r.closed)},isTransformStream:b}},{"../../ours/primordials":474}],470:[function(e,t,n){const r=e("process/"),{ArrayPrototypeSlice:i,Error:s,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:a,ObjectDefineProperties:c,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:l,Symbol:d,SymbolHasInstance:h}=e("../../ours/primordials");t.exports=R,R.WritableState=M;const{EventEmitter:p}=e("events"),f=e("./legacy").Stream,{Buffer:m}=e("buffer"),y=e("./destroy"),{addAbortSignal:g}=e("./add-abort-signal"),{getHighWaterMark:b,getDefaultHighWaterMark:v}=e("./state"),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:x,ERR_MULTIPLE_CALLBACK:E,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:A,ERR_STREAM_ALREADY_FINISHED:_,ERR_STREAM_NULL_VALUES:T,ERR_STREAM_WRITE_AFTER_END:k,ERR_UNKNOWN_ENCODING:C}=e("../../ours/errors").codes,{errorOrDestroy:P}=y;function O(){}u(R.prototype,f.prototype),u(R,f);const I=d("kOnFinished");function M(t,n,r){"boolean"!=typeof r&&(r=n instanceof e("./duplex")),this.objectMode=!(!t||!t.objectMode),r&&(this.objectMode=this.objectMode||!(!t||!t.writableObjectMode)),this.highWaterMark=t?b(this,t,"writableHighWaterMark",r):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!t||!1!==t.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=U.bind(void 0,n),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,j(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[I]=[]}function j(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function R(t){const n=this instanceof e("./duplex");if(!n&&!o(R,this))return new R(t);this._writableState=new M(t,this,n),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&g(t.signal,this)),f.call(this,t),y.construct(this,(()=>{const e=this._writableState;e.writing||$(this,e),G(this,e)}))}function B(e,t,n,i){const s=e._writableState;if("function"==typeof n)i=n,n=s.defaultEncoding;else{if(n){if("buffer"!==n&&!m.isEncoding(n))throw new C(n)}else n=s.defaultEncoding;"function"!=typeof i&&(i=O)}if(null===t)throw new T;if(!s.objectMode)if("string"==typeof t)!1!==s.decodeStrings&&(t=m.from(t,n),n="buffer");else if(t instanceof m)n="buffer";else{if(!f._isUint8Array(t))throw new w("chunk",["string","Buffer","Uint8Array"],t);t=f._uint8ArrayToBuffer(t),n="buffer"}let o;return s.ending?o=new k:s.destroyed&&(o=new A("write")),o?(r.nextTick(i,o),P(e,o,!0),o):(s.pendingcb++,function(e,t,n,r,i){const s=t.objectMode?1:n.length;t.length+=s;const o=t.length<t.highWaterMark;o||(t.needDrain=!0);t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:n,encoding:r,callback:i}),t.allBuffers&&"buffer"!==r&&(t.allBuffers=!1),t.allNoop&&i!==O&&(t.allNoop=!1)):(t.writelen=s,t.writecb=i,t.writing=!0,t.sync=!0,e._write(n,r,t.onwrite),t.sync=!1);return o&&!t.errored&&!t.destroyed}(e,s,t,n,i))}function N(e,t,n,r,i,s,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new A("write")):n?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function L(e,t,n,r){--t.pendingcb,r(n),H(t),P(e,n)}function U(e,t){const n=e._writableState,i=n.sync,s=n.writecb;"function"==typeof s?(n.writing=!1,n.writecb=null,n.length-=n.writelen,n.writelen=0,t?(t.stack,n.errored||(n.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),i?r.nextTick(L,e,n,t,s):L(e,n,t,s)):(n.buffered.length>n.bufferedIndex&&$(e,n),i?null!==n.afterWriteTickInfo&&n.afterWriteTickInfo.cb===s?n.afterWriteTickInfo.count++:(n.afterWriteTickInfo={count:1,cb:s,stream:e,state:n},r.nextTick(D,n.afterWriteTickInfo)):F(e,n,1,s))):P(e,new E)}function D({stream:e,state:t,count:n,cb:r}){return t.afterWriteTickInfo=null,F(e,t,n,r)}function F(e,t,n,r){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));n-- >0;)t.pendingcb--,r();t.destroyed&&H(t),G(e,t)}function H(e){if(e.writing)return;for(let n=e.bufferedIndex;n<e.buffered.length;++n){var t;const{chunk:r,callback:i}=e.buffered[n],s=e.objectMode?1:r.length;e.length-=s,i(null!==(t=e.errored)&&void 0!==t?t:new A("write"))}const n=e[I].splice(0);for(let t=0;t<n.length;t++){var r;n[t](null!==(r=e.errored)&&void 0!==r?r:new A("end"))}j(e)}function $(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;const{buffered:n,bufferedIndex:r,objectMode:s}=t,o=n.length-r;if(!o)return;let a=r;if(t.bufferProcessing=!0,o>1&&e._writev){t.pendingcb-=o-1;const r=t.allNoop?O:e=>{for(let t=a;t<n.length;++t)n[t].callback(e)},s=t.allNoop&&0===a?n:i(n,a);s.allBuffers=t.allBuffers,N(e,t,!0,t.length,s,"",r),j(t)}else{do{const{chunk:r,encoding:i,callback:o}=n[a];n[a++]=null;N(e,t,!1,s?1:r.length,r,i,o)}while(a<n.length&&!t.writing);a===n.length?j(t):a>256?(n.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function V(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function K(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let n=!1;function i(i){if(n)P(e,null!=i?i:E());else if(n=!0,t.pendingcb--,i){const n=t[I].splice(0);for(let e=0;e<n.length;e++)n[e](i);P(e,i,t.sync)}else V(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,r.nextTick(z,e,t))}t.sync=!0,t.pendingcb++;try{e._final(i)}catch(e){i(e)}t.sync=!1}(e,t)))}function G(e,t,n){V(t)&&(K(e,t),0===t.pendingcb&&(n?(t.pendingcb++,r.nextTick(((e,t)=>{V(t)?z(e,t):t.pendingcb--}),e,t)):V(t)&&(t.pendingcb++,z(e,t))))}function z(e,t){t.pendingcb--,t.finished=!0;const n=t[I].splice(0);for(let e=0;e<n.length;e++)n[e]();if(e.emit("finish"),t.autoDestroy){const t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||!1===t.readable))&&e.destroy()}}M.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},a(M.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),a(R,h,{__proto__:null,value:function(e){return!!o(this,e)||this===R&&(e&&e._writableState instanceof M)}}),R.prototype.pipe=function(){P(this,new S)},R.prototype.write=function(e,t,n){return!0===B(this,e,t,n)},R.prototype.cork=function(){this._writableState.corked++},R.prototype.uncork=function(){const e=this._writableState;e.corked&&(e.corked--,e.writing||$(this,e))},R.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=l(e)),!m.isEncoding(e))throw new C(e);return this._writableState.defaultEncoding=e,this},R.prototype._write=function(e,t,n){if(!this._writev)throw new x("_write()");this._writev([{chunk:e,encoding:t}],n)},R.prototype._writev=null,R.prototype.end=function(e,t,n){const i=this._writableState;let o;if("function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e){const n=B(this,e,t);n instanceof s&&(o=n)}return i.corked&&(i.corked=1,this.uncork()),o||(i.errored||i.ending?i.finished?o=new _("end"):i.destroyed&&(o=new A("end")):(i.ending=!0,G(this,i,!0),i.ended=!0)),"function"==typeof n&&(o||i.finished?r.nextTick(n,o):i[I].push(n)),this},c(R.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){const e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const e=this._writableState;return!!e&&(!e.destroyed&&!e.ending&&e.needDrain)}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const W=y.destroy;let q;function X(){return void 0===q&&(q={}),q}R.prototype.destroy=function(e,t){const n=this._writableState;return!n.destroyed&&(n.bufferedIndex<n.buffered.length||n[I].length)&&r.nextTick(H,n),W.call(this,e,t),this},R.prototype._undestroy=y.undestroy,R.prototype._destroy=function(e,t){t(e)},R.prototype[p.captureRejectionSymbol]=function(e){this.destroy(e)},R.fromWeb=function(e,t){return X().newStreamWritableFromWritableStream(e,t)},R.toWeb=function(e){return X().newWritableStreamFromStreamWritable(e)}},{"../../ours/errors":473,"../../ours/primordials":474,"./add-abort-signal":454,"./destroy":457,"./duplex":458,"./legacy":462,"./state":467,buffer:385,events:452,"process/":510}],471:[function(e,t,n){"use strict";const{ArrayIsArray:r,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:s,ArrayPrototypeMap:o,NumberIsInteger:a,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:l,NumberParseInt:d,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:p,String:f,StringPrototypeToUpperCase:m,StringPrototypeTrim:y}=e("../ours/primordials"),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:x,ERR_UNKNOWN_SIGNAL:E}}=e("../ours/errors"),{normalizeEncoding:S}=e("../ours/util"),{isAsyncFunction:A,isArrayBufferView:_}=e("../ours/util").types,T={};const k=/^[0-7]+$/;const C=g(((e,t,n=l,r=u)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new x(t,"an integer",e);if(e<n||e>r)throw new x(t,`>= ${n} && <= ${r}`,e)})),P=g(((e,t,n=-2147483648,r=2147483647)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new x(t,"an integer",e);if(e<n||e>r)throw new x(t,`>= ${n} && <= ${r}`,e)})),O=g(((e,t,n=!1)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new x(t,"an integer",e);const r=n?1:0,i=4294967295;if(e<r||e>i)throw new x(t,`>= ${r} && <= ${i}`,e)}));function I(e,t){if("string"!=typeof e)throw new v(t,"string",e)}const M=g(((e,t,n)=>{if(!i(n,e)){const r=s(o(n,(e=>"string"==typeof e?`'${e}'`:f(e))),", ");throw new w(t,e,"must be one of: "+r)}}));function j(e,t){if("boolean"!=typeof e)throw new v(t,"boolean",e)}function R(e,t,n){return null!=e&&h(e,t)?e[t]:n}const B=g(((e,t,n=null)=>{const i=R(n,"allowArray",!1),s=R(n,"allowFunction",!1);if(!R(n,"nullable",!1)&&null===e||!i&&r(e)||"object"!=typeof e&&(!s||"function"!=typeof e))throw new v(t,"Object",e)})),N=g(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new v(t,"a dictionary",e)})),L=g(((e,t,n=0)=>{if(!r(e))throw new v(t,"Array",e);if(e.length<n){throw new w(t,e,`must be longer than ${n}`)}}));const U=g(((e,t="buffer")=>{if(!_(e))throw new v(t,["Buffer","TypedArray","DataView"],e)}));const D=g(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new v(t,"AbortSignal",e)})),F=g(((e,t)=>{if("function"!=typeof e)throw new v(t,"Function",e)})),H=g(((e,t)=>{if("function"!=typeof e||A(e))throw new v(t,"Function",e)})),$=g(((e,t)=>{if(void 0!==e)throw new v(t,"undefined",e)}));const V=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function K(e,t){if(void 0===e||!p(V,e))throw new w(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}t.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,n){if(void 0===e&&(e=n),"string"==typeof e){if(null===p(k,e))throw new w(t,e,"must be a 32-bit unsigned integer or an octal string");e=d(e,8)}return O(e,t),e},validateArray:L,validateStringArray:function(e,t){L(e,t);for(let n=0;n<e.length;n++)I(e[n],`${t}[${n}]`)},validateBooleanArray:function(e,t){L(e,t);for(let n=0;n<e.length;n++)j(e[n],`${t}[${n}]`)},validateAbortSignalArray:function(e,t){L(e,t);for(let n=0;n<e.length;n++){const r=e[n],i=`${t}[${n}]`;if(null==r)throw new v(i,"AbortSignal",r);D(r,i)}},validateBoolean:j,validateBuffer:U,validateDictionary:N,validateEncoding:function(e,t){const n=S(t),r=e.length;if("hex"===n&&r%2!=0)throw new w("encoding",t,`is invalid for data of length ${r}`)},validateFunction:F,validateInt32:P,validateInteger:C,validateNumber:function(e,t,n=void 0,r){if("number"!=typeof e)throw new v(t,"number",e);if(null!=n&&e<n||null!=r&&e>r||(null!=n||null!=r)&&c(e))throw new x(t,`${null!=n?`>= ${n}`:""}${null!=n&&null!=r?" && ":""}${null!=r?`<= ${r}`:""}`,e)},validateObject:B,validateOneOf:M,validatePlainFunction:H,validatePort:function(e,t="Port",n=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===y(e).length||+e!=+e>>>0||e>65535||0===e&&!n)throw new b(t,e,n);return 0|e},validateSignalName:function(e,t="signal"){if(I(e,t),void 0===T[e]){if(void 0!==T[m(e)])throw new E(e+" (signals must use all capital letters)");throw new E(e)}},validateString:I,validateUint32:O,validateUndefined:$,validateUnion:function(e,t,n){if(!i(n,e))throw new v(t,`('${s(n,"|")}')`,e)},validateAbortSignal:D,validateLinkHeaderValue:function(e){if("string"==typeof e)return K(e,"hints"),e;if(r(e)){const t=e.length;let n="";if(0===t)return n;for(let r=0;r<t;r++){const i=e[r];K(i,"hints"),n+=i,r!==t-1&&(n+=", ")}return n}throw new w("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},{"../ours/errors":473,"../ours/primordials":474,"../ours/util":475}],472:[function(e,t,n){"use strict";const r=e("../stream"),i=e("../stream/promises"),s=r.Readable.destroy;t.exports=r.Readable,t.exports._uint8ArrayToBuffer=r._uint8ArrayToBuffer,t.exports._isUint8Array=r._isUint8Array,t.exports.isDisturbed=r.isDisturbed,t.exports.isErrored=r.isErrored,t.exports.isReadable=r.isReadable,t.exports.Readable=r.Readable,t.exports.Writable=r.Writable,t.exports.Duplex=r.Duplex,t.exports.Transform=r.Transform,t.exports.PassThrough=r.PassThrough,t.exports.addAbortSignal=r.addAbortSignal,t.exports.finished=r.finished,t.exports.destroy=r.destroy,t.exports.destroy=s,t.exports.pipeline=r.pipeline,t.exports.compose=r.compose,Object.defineProperty(r,"promises",{configurable:!0,enumerable:!0,get:()=>i}),t.exports.Stream=r.Stream,t.exports.default=t.exports},{"../stream":476,"../stream/promises":477}],473:[function(e,t,n){"use strict";const{format:r,inspect:i,AggregateError:s}=e("./util"),o=globalThis.AggregateError||s,a=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,l={};function d(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function h(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function p(e,t,n){n||(n=Error);class i extends n{constructor(...n){super(function(e,t,n){if("function"==typeof t)return d(t.length<=n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${t.length}).`),t(...n);const i=(t.match(/%[dfijoOs]/g)||[]).length;return d(i===n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${i}).`),0===n.length?t:r(t,...n)}(e,t,n))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,l[e]=i}function f(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class m extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new l.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}p("ERR_ASSERTION","%s",Error),p("ERR_INVALID_ARG_TYPE",((e,t,n)=>{d("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let r="The ";e.endsWith(" argument")?r+=`${e} `:r+=`"${e}" ${e.includes(".")?"property":"argument"} `,r+="must be ";const s=[],o=[],a=[];for(const e of t)d("string"==typeof e,"All expected entries have to be of type string"),c.includes(e)?s.push(e.toLowerCase()):u.test(e)?o.push(e):(d("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(o.length>0){const e=s.indexOf("object");-1!==e&&(s.splice(s,e,1),o.push("Object"))}if(s.length>0){switch(s.length){case 1:r+=`of type ${s[0]}`;break;case 2:r+=`one of type ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();r+=`one of type ${s.join(", ")}, or ${e}`}}(o.length>0||a.length>0)&&(r+=" or ")}if(o.length>0){switch(o.length){case 1:r+=`an instance of ${o[0]}`;break;case 2:r+=`an instance of ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();r+=`an instance of ${o.join(", ")}, or ${e}`}}a.length>0&&(r+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(r+="an "),r+=`${a[0]}`;break;case 2:r+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();r+=`one of ${a.join(", ")}, or ${e}`}}if(null==n)r+=`. Received ${n}`;else if("function"==typeof n&&n.name)r+=`. Received function ${n.name}`;else if("object"==typeof n){var l;if(null!==(l=n.constructor)&&void 0!==l&&l.name)r+=`. Received an instance of ${n.constructor.name}`;else{r+=`. Received ${i(n,{depth:-1})}`}}else{let e=i(n,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),r+=`. Received type ${typeof n} (${e})`}return r}),TypeError),p("ERR_INVALID_ARG_VALUE",((e,t,n="is invalid")=>{let r=i(t);r.length>128&&(r=r.slice(0,128)+"...");return`The ${e.includes(".")?"property":"argument"} '${e}' ${n}. Received ${r}`}),TypeError),p("ERR_INVALID_RETURN_VALUE",((e,t,n)=>{var r;return`Expected ${e} to be returned from the "${t}" function but got ${null!=n&&null!==(r=n.constructor)&&void 0!==r&&r.name?`instance of ${n.constructor.name}`:"type "+typeof n}.`}),TypeError),p("ERR_MISSING_ARGS",((...e)=>{let t;d(e.length>0,"At least one arg needs to be specified");const n=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),n){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const n=e.pop();t+=`The ${e.join(", ")}, and ${n} arguments`}}return`${t} must be specified`}),TypeError),p("ERR_OUT_OF_RANGE",((e,t,n)=>{let r;return d(t,'Missing "range" argument'),Number.isInteger(n)&&Math.abs(n)>2**32?r=h(String(n)):"bigint"==typeof n?(r=String(n),(n>2n**32n||n<-(2n**32n))&&(r=h(r)),r+="n"):r=i(n),`The value of "${e}" is out of range. It must be ${t}. Received ${r}`}),RangeError),p("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),p("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),p("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),p("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),p("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),p("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),p("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),p("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),p("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),p("ERR_STREAM_WRITE_AFTER_END","write after end",Error),p("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exports={AbortError:m,aggregateTwoErrors:f((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const n=new o([t,e],t.message);return n.code=t.code,n}return e||t})),hideStackFrames:f,codes:l}},{"./util":475}],474:[function(e,t,n){"use strict";t.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,n)=>e.slice(t,n),Error:Error,FunctionPrototypeCall:(e,t,...n)=>e.call(t,...n),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number:Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,n)=>Object.defineProperty(e,t,n),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise:Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,n)=>e.then(t,n),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String:String,StringPrototypeSlice:(e,t,n)=>e.slice(t,n),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol:Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,n)=>e.set(t,n),Boolean:Boolean,Uint8Array:Uint8Array}},{}],475:[function(e,t,n){"use strict";const r=e("buffer"),{kResistStopPropagation:i,SymbolDispose:s}=e("./primordials"),o=globalThis.AbortSignal||e("abort-controller").AbortSignal,a=globalThis.AbortController||e("abort-controller").AbortController,c=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||r.Blob,l=void 0!==u?function(e){return e instanceof u}:function(e){return!1},d=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class h extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let n=0;n<e.length;n++)t+=` ${e[n].stack}\n`;super(t),this.name="AggregateError",this.errors=e}}t.exports={AggregateError:h,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...n){t||(t=!0,e.apply(this,n))}},createDeferredPromise:function(){let e,t;return{promise:new Promise(((n,r)=>{e=n,t=r})),resolve:e,reject:t}},promisify:e=>new Promise(((t,n)=>{e(((e,...r)=>e?n(e):t(...r)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,n]){const r=t.shift();if("f"===n)return r.toFixed(6);if("j"===n)return JSON.stringify(r);if("s"===n&&"object"==typeof r){return`${r.constructor!==Object?r.constructor.name:""} {}`.trim()}return r.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof c,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:l,deprecate:(e,t)=>e,addAbortListener:e("events").addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let n;return d(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE(t,"Function",e)})(t,"listener"),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),n=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[s](){var e;null===(e=n)||void 0===e||e()}}},AbortSignalAny:o.any||function(e){if(1===e.length)return e[0];const t=new a,n=()=>t.abort();return e.forEach((e=>{d(e,"signals"),e.addEventListener("abort",n,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",n)))}),{once:!0}),t.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},{"./primordials":474,"abort-controller":355,buffer:385,events:452}],476:[function(e,t,n){const{Buffer:r}=e("buffer"),{ObjectDefineProperty:i,ObjectKeys:s,ReflectApply:o}=e("./ours/primordials"),{promisify:{custom:a}}=e("./ours/util"),{streamReturningOperators:c,promiseReturningOperators:u}=e("./internal/streams/operators"),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=e("./ours/errors"),d=e("./internal/streams/compose"),{setDefaultHighWaterMark:h,getDefaultHighWaterMark:p}=e("./internal/streams/state"),{pipeline:f}=e("./internal/streams/pipeline"),{destroyer:m}=e("./internal/streams/destroy"),y=e("./internal/streams/end-of-stream"),g=e("./stream/promises"),b=e("./internal/streams/utils"),v=t.exports=e("./internal/streams/legacy").Stream;v.isDestroyed=b.isDestroyed,v.isDisturbed=b.isDisturbed,v.isErrored=b.isErrored,v.isReadable=b.isReadable,v.isWritable=b.isWritable,v.Readable=e("./internal/streams/readable");for(const E of s(c)){const S=c[E];function w(...e){if(new.target)throw l();return v.Readable.from(o(S,this,e))}i(w,"name",{__proto__:null,value:S.name}),i(w,"length",{__proto__:null,value:S.length}),i(v.Readable.prototype,E,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}for(const A of s(u)){const _=u[A];function w(...e){if(new.target)throw l();return o(_,this,e)}i(w,"name",{__proto__:null,value:_.name}),i(w,"length",{__proto__:null,value:_.length}),i(v.Readable.prototype,A,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}v.Writable=e("./internal/streams/writable"),v.Duplex=e("./internal/streams/duplex"),v.Transform=e("./internal/streams/transform"),v.PassThrough=e("./internal/streams/passthrough"),v.pipeline=f;const{addAbortSignal:x}=e("./internal/streams/add-abort-signal");v.addAbortSignal=x,v.finished=y,v.destroy=m,v.compose=d,v.setDefaultHighWaterMark=h,v.getDefaultHighWaterMark=p,i(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>g}),i(f,a,{__proto__:null,enumerable:!0,get:()=>g.pipeline}),i(y,a,{__proto__:null,enumerable:!0,get:()=>g.finished}),v.Stream=v,v._isUint8Array=function(e){return e instanceof Uint8Array},v._uint8ArrayToBuffer=function(e){return r.from(e.buffer,e.byteOffset,e.byteLength)}},{"./internal/streams/add-abort-signal":454,"./internal/streams/compose":456,"./internal/streams/destroy":457,"./internal/streams/duplex":458,"./internal/streams/end-of-stream":460,"./internal/streams/legacy":462,"./internal/streams/operators":463,"./internal/streams/passthrough":464,"./internal/streams/pipeline":465,"./internal/streams/readable":466,"./internal/streams/state":467,"./internal/streams/transform":468,"./internal/streams/utils":469,"./internal/streams/writable":470,"./ours/errors":473,"./ours/primordials":474,"./ours/util":475,"./stream/promises":477,buffer:385}],477:[function(e,t,n){"use strict";const{ArrayPrototypePop:r,Promise:i}=e("../ours/primordials"),{isIterable:s,isNodeStream:o,isWebStream:a}=e("../internal/streams/utils"),{pipelineImpl:c}=e("../internal/streams/pipeline"),{finished:u}=e("../internal/streams/end-of-stream");e("../../lib/stream.js"),t.exports={finished:u,pipeline:function(...e){return new i(((t,n)=>{let i,u;const l=e[e.length-1];if(l&&"object"==typeof l&&!o(l)&&!s(l)&&!a(l)){const t=r(e);i=t.signal,u=t.end}c(e,((e,r)=>{e?n(e):t(r)}),{signal:i,end:u})}))}}},{"../../lib/stream.js":476,"../internal/streams/end-of-stream":460,"../internal/streams/pipeline":465,"../internal/streams/utils":469,"../ours/primordials":474}],478:[function(e,t,n){"use strict";t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;0!=i--;){var o=s[i];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},{}],479:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n,r="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(n=t.cmp,function(e){return function(t,r){var i={key:t,value:e[t]},s={key:r,value:e[r]};return n(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 n,o;if(Array.isArray(t)){for(o="[",n=0;n<t.length;n++)n&&(o+=","),o+=e(t[n])||"null";return o+"]"}if(null===t)return"null";if(-1!==s.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var a=s.push(t)-1,c=Object.keys(t).sort(i&&i(t));for(o="",n=0;n<c.length;n++){var u=c[n],l=e(t[u]);l&&(o&&(o+=","),o+=JSON.stringify(u)+":"+l)}return s.splice(a,1),"{"+o+"}"}}(e)}},{}],480:[function(e,t,n){t.exports=c,c.default=c,c.stable=h,c.stableStringify=h;var r="[...]",i="[Circular]",s=[],o=[];function a(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function c(e,t,n,r){var i;void 0===r&&(r=a()),l(e,"",0,[],void 0,0,r);try{i=0===o.length?JSON.stringify(e,t,n):JSON.stringify(e,f(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var c=s.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return i}function u(e,t,n,r){var i=Object.getOwnPropertyDescriptor(r,n);void 0!==i.get?i.configurable?(Object.defineProperty(r,n,{value:e}),s.push([r,n,t,i])):o.push([t,n,e]):(r[n]=e,s.push([r,n,t]))}function l(e,t,n,s,o,a,c){var d;if(a+=1,"object"==typeof e&&null!==e){for(d=0;d<s.length;d++)if(s[d]===e)return void u(i,e,t,o);if(void 0!==c.depthLimit&&a>c.depthLimit)return void u(r,e,t,o);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void u(r,e,t,o);if(s.push(e),Array.isArray(e))for(d=0;d<e.length;d++)l(e[d],d,d,s,e,a,c);else{var h=Object.keys(e);for(d=0;d<h.length;d++){var p=h[d];l(e[p],p,d,s,e,a,c)}}s.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function h(e,t,n,r){void 0===r&&(r=a());var i,c=p(e,"",0,[],void 0,0,r)||e;try{i=0===o.length?JSON.stringify(c,t,n):JSON.stringify(c,f(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var u=s.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return i}function p(e,t,n,o,a,c,l){var h;if(c+=1,"object"==typeof e&&null!==e){for(h=0;h<o.length;h++)if(o[h]===e)return void u(i,e,t,a);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==l.depthLimit&&c>l.depthLimit)return void u(r,e,t,a);if(void 0!==l.edgesLimit&&n+1>l.edgesLimit)return void u(r,e,t,a);if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)p(e[h],h,h,o,e,c,l);else{var f={},m=Object.keys(e).sort(d);for(h=0;h<m.length;h++){var y=m[h];p(e[y],y,h,o,e,c,l),f[y]=e[y]}if(void 0===a)return f;s.push([a,t,e]),a[t]=f}o.pop()}}function f(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(o.length>0)for(var r=0;r<o.length;r++){var i=o[r];if(i[1]===t&&i[0]===n){n=i[2],o.splice(r,1);break}}return e.call(this,t,n)}}},{}],481:[function(e,t,n){"use strict";const r=e("./validator"),i=e("./xmlparser/XMLParser"),s=e("./xmlbuilder/json2xml");t.exports={XMLParser:i,XMLValidator:r,XMLBuilder:s}},{"./validator":483,"./xmlbuilder/json2xml":484,"./xmlparser/XMLParser":489}],482:[function(e,t,n){"use strict";const r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+r+"]["+(r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",s=new RegExp("^"+i+"$");n.isExist=function(e){return void 0!==e},n.isEmptyObject=function(e){return 0===Object.keys(e).length},n.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let s=0;s<i;s++)e[r[s]]="strict"===n?[t[r[s]]]:t[r[s]]}},n.getValue=function(e){return n.isExist(e)?e:""},n.isName=function(e){const t=s.exec(e);return!(null==t)},n.getAllMatches=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[];i.startIndex=t.lastIndex-r[0].length;const s=r.length;for(let e=0;e<s;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n},n.nameRegexp=i},{}],483:[function(e,t,n){"use strict";const r=e("./util"),i={allowBooleanAttributes:!1,unpairedTags:[]};function s(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function o(e,t){const n=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const r=e.substr(n,t-n);if(t>5&&"xml"===r)return f("InvalidXml","XML declaration allowed only at the start of the document.",y(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function a(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}n.validate=function(e,t){t=Object.assign({},i,t);const n=[];let c=!1,u=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=o(e,i),i.err)return i}else{if("<"!==e[i]){if(s(e[i]))continue;return f("InvalidChar","char '"+e[i]+"' is not expected.",y(e,i))}{let m=i;if(i++,"!"===e[i]){i=a(e,i);continue}{let g=!1;"/"===e[i]&&(g=!0,i++);let b="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)b+=e[i];if(b=b.trim(),"/"===b[b.length-1]&&(b=b.substring(0,b.length-1),i--),d=b,!r.isName(d)){let t;return t=0===b.trim().length?"Invalid space after '<'.":"Tag '"+b+"' is an invalid name.",f("InvalidTag",t,y(e,i))}const v=l(e,i);if(!1===v)return f("InvalidAttr","Attributes for '"+b+"' have open quote.",y(e,i));let w=v.value;if(i=v.index,"/"===w[w.length-1]){const n=i-w.length;w=w.substring(0,w.length-1);const r=h(w,t);if(!0!==r)return f(r.err.code,r.err.msg,y(e,n+r.err.line));c=!0}else if(g){if(!v.tagClosed)return f("InvalidTag","Closing tag '"+b+"' doesn't have proper closing.",y(e,i));if(w.trim().length>0)return f("InvalidTag","Closing tag '"+b+"' can't have attributes or invalid starting.",y(e,m));if(0===n.length)return f("InvalidTag","Closing tag '"+b+"' has not been opened.",y(e,m));{const t=n.pop();if(b!==t.tagName){let n=y(e,t.tagStartPos);return f("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+b+"'.",y(e,m))}0==n.length&&(u=!0)}}else{const r=h(w,t);if(!0!==r)return f(r.err.code,r.err.msg,y(e,i-w.length+r.err.line));if(!0===u)return f("InvalidXml","Multiple possible root nodes found.",y(e,i));-1!==t.unpairedTags.indexOf(b)||n.push({tagName:b,tagStartPos:m}),c=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=a(e,i);continue}if("?"!==e[i+1])break;if(i=o(e,++i),i.err)return i}else if("&"===e[i]){const t=p(e,i);if(-1==t)return f("InvalidChar","char '&' is not expected.",y(e,i));i=t}else if(!0===u&&!s(e[i]))return f("InvalidXml","Extra text at the end",y(e,i));"<"===e[i]&&i--}}}var d;return c?1==n.length?f("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",y(e,n[0].tagStartPos)):!(n.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):f("InvalidXml","Start tag expected.",1)};const c='"',u="'";function l(e,t){let n="",r="",i=!1;for(;t<e.length;t++){if(e[t]===c||e[t]===u)""===r?r=e[t]:r!==e[t]||(r="");else if(">"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function h(e,t){const n=r.getAllMatches(e,d),i={};for(let e=0;e<n.length;e++){if(0===n[e][1].length)return f("InvalidAttr","Attribute '"+n[e][2]+"' has no space in starting.",g(n[e]));if(void 0!==n[e][3]&&void 0===n[e][4])return f("InvalidAttr","Attribute '"+n[e][2]+"' is without value.",g(n[e]));if(void 0===n[e][3]&&!t.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+n[e][2]+"' is not allowed.",g(n[e]));const r=n[e][2];if(!m(r))return f("InvalidAttr","Attribute '"+r+"' is an invalid name.",g(n[e]));if(i.hasOwnProperty(r))return f("InvalidAttr","Attribute '"+r+"' is repeated.",g(n[e]));i[r]=1}return!0}function p(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function f(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function m(e){return r.isName(e)}function y(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function g(e){return e.startIndex+e[1].length}},{"./util":482}],484:[function(e,t,n){"use strict";const r=e("./orderedJs2Xml"),i={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function s(e){this.options=Object.assign({},i,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=o,this.options.format?(this.indentate=a,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function o(e,t,n){const r=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,r.attrStr,n):this.buildObjectNode(r.val,t,r.attrStr,n)}function a(e){return this.options.indentBy.repeat(e)}function c(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}s.prototype.build=function(e){return this.options.preserveOrder?r(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},s.prototype.j2x=function(e,t){let n="",r="";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i))if(void 0===e[i])this.isAttribute(i)&&(r+="");else if(null===e[i])this.isAttribute(i)?r+="":"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)r+=this.buildTextValNode(e[i],i,"",t);else if("object"!=typeof e[i]){const s=this.isAttribute(i);if(s)n+=this.buildAttrPairStr(s,""+e[i]);else if(i===this.options.textNodeName){let t=this.options.tagValueProcessor(i,""+e[i]);r+=this.replaceEntitiesValue(t)}else r+=this.buildTextValNode(e[i],i,"",t)}else if(Array.isArray(e[i])){const n=e[i].length;let s="",o="";for(let a=0;a<n;a++){const n=e[i][a];if(void 0===n);else if(null===n)"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const e=this.j2x(n,t+1);s+=e.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(o+=e.attrStr)}else s+=this.processTextOrObjNode(n,i,t);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(i,n);e=this.replaceEntitiesValue(e),s+=e}else s+=this.buildTextValNode(n,i,"",t)}this.options.oneListGroup&&(s=this.buildObjectNode(s,i,o,t)),r+=s}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const t=Object.keys(e[i]),r=t.length;for(let s=0;s<r;s++)n+=this.buildAttrPairStr(t[s],""+e[i][t[s]])}else r+=this.processTextOrObjNode(e[i],i,t);return{attrStr:n,val:r}},s.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},s.prototype.buildObjectNode=function(e,t,n,r){if(""===e)return"?"===t[0]?this.indentate(r)+"<"+t+n+"?"+this.tagEndChar:this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,s="";return"?"===t[0]&&(s="?",i=""),!n&&""!==n||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===s.length?this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(r)+"<"+t+n+s+this.tagEndChar+e+this.indentate(r)+i:this.indentate(r)+"<"+t+n+s+">"+e+i}},s.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},s.prototype.buildTextValNode=function(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"</"+t+this.tagEndChar}},s.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e},t.exports=s},{"./orderedJs2Xml":485}],485:[function(e,t,n){function r(e,t,n,c){let u="",l=!1;for(let d=0;d<e.length;d++){const h=e[d],p=i(h);if(void 0===p)continue;let f="";if(f=0===n.length?p:`${n}.${p}`,p===t.textNodeName){let e=h[p];o(f,t)||(e=t.tagValueProcessor(p,e),e=a(e,t)),l&&(u+=c),u+=e,l=!1;continue}if(p===t.cdataPropName){l&&(u+=c),u+=`<![CDATA[${h[p][0][t.textNodeName]}]]>`,l=!1;continue}if(p===t.commentPropName){u+=c+`\x3c!--${h[p][0][t.textNodeName]}--\x3e`,l=!0;continue}if("?"===p[0]){const e=s(h[":@"],t),n="?xml"===p?"":c;let r=h[p][0][t.textNodeName];r=0!==r.length?" "+r:"",u+=n+`<${p}${r}${e}?>`,l=!0;continue}let m=c;""!==m&&(m+=t.indentBy);const y=c+`<${p}${s(h[":@"],t)}`,g=r(h[p],t,f,m);-1!==t.unpairedTags.indexOf(p)?t.suppressUnpairedNode?u+=y+">":u+=y+"/>":g&&0!==g.length||!t.suppressEmptyNode?g&&g.endsWith(">")?u+=y+`>${g}${c}</${p}>`:(u+=y+">",g&&""!==c&&(g.includes("/>")||g.includes("</"))?u+=c+t.indentBy+g+c:u+=g,u+=`</${p}>`):u+=y+"/>",l=!0}return u}function i(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];if(e.hasOwnProperty(r)&&":@"!==r)return r}}function s(e,t){let n="";if(e&&!t.ignoreAttributes)for(let r in e){if(!e.hasOwnProperty(r))continue;let i=t.attributeValueProcessor(r,e[r]);i=a(i,t),!0===i&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function o(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]==="*."+n)return!0;return!1}function a(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const r=t.entities[n];e=e.replace(r.regex,r.val)}return e}t.exports=function(e,t){let n="";return t.format&&t.indentBy.length>0&&(n="\n"),r(e,t,"",n)}},{}],486:[function(e,t,n){const r=e("../util");function i(e,t){let n="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)n+=e[t];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const r=e[t++];let i="";for(;t<e.length&&e[t]!==r;t++)i+=e[t];return[n,i,t]}function s(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function o(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function a(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function c(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function u(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function l(e){if(r.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}t.exports=function(e,t){const n={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let r=1,d=!1,h=!1,p="";for(;t<e.length;t++)if("<"!==e[t]||h)if(">"===e[t]){if(h?"-"===e[t-1]&&"-"===e[t-2]&&(h=!1,r--):r--,0===r)break}else"["===e[t]?d=!0:p+=e[t];else{if(d&&o(e,t))t+=7,[entityName,val,t]=i(e,t+1),-1===val.indexOf("&")&&(n[l(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(d&&a(e,t))t+=8;else if(d&&c(e,t))t+=8;else if(d&&u(e,t))t+=9;else{if(!s)throw new Error("Invalid DOCTYPE");h=!0}r++,p=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}}},{"../util":482}],487:[function(e,t,n){const r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};n.buildOptions=function(e){return Object.assign({},r,e)},n.defaultOptions=r},{}],488:[function(e,t,n){"use strict";const r=e("../util"),i=e("./xmlNode"),s=e("./DocTypeReader"),o=e("strnum");function a(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:e[r]}}}function c(e,t,n,r,i,s,o){if(void 0!==e&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,s);if(null==r)return e;if(typeof r!=typeof e||r!==e)return r;if(this.options.trimValues)return w(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?w(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function u(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function d(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=r.getAllMatches(e,l),i=n.length,s={};for(let e=0;e<i;e++){const r=this.resolveNameSpace(n[e][1]);let i=n[e][4],o=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const e=this.options.attributeValueProcessor(r,i,t);s[o]=null==e?i:typeof e!=typeof i||e!==i?e:w(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[o]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=s,e}return s}}const h=function(e){e=e.replace(/\r\n?/g,"\n");const t=new i("!xml");let n=t,r="",o="";for(let a=0;a<e.length;a++){if("<"===e[a])if("/"===e[a+1]){const t=g(e,">",a,"Closing Tag is not closed.");let i=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(r=this.saveTextToParentTag(r,n,o));const s=o.substring(o.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let c=0;s&&-1!==this.options.unpairedTags.indexOf(s)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),n=this.tagsNodeStack.pop(),r="",a=t}else if("?"===e[a+1]){let t=b(e,a,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new i(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o,t.tagName)),this.addChild(n,e,o)}a=t.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=g(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(a+4,t-2);r=this.saveTextToParentTag(r,n,o),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}a=t}else if("!D"===e.substr(a+1,2)){const t=s(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=g(e,"]]>",a,"CDATA is not closed.")-2,i=e.substring(a+9,t);r=this.saveTextToParentTag(r,n,o);let s=this.parseTextData(i,n.tagname,o,!0,!1,!0,!0);null==s&&(s=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,s),a=t+2}else{let s=b(e,a,this.options.removeNSPrefix),c=s.tagName;const u=s.rawTagName;let l=s.tagExp,d=s.attrExpPresent,h=s.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,o,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==t.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),a=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=s.closeIndex;else{const n=this.readStopNodeData(e,u,h+1);if(!n)throw new Error(`Unexpected end of ${u}`);a=n.i,t=n.tagContent}const r=new i(c);c!==l&&d&&(r[":@"]=this.buildAttributesMap(l,o,c)),t&&(t=this.parseTextData(t,c,o,!0,d,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,o)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new i(c);c!==l&&d&&(e[":@"]=this.buildAttributesMap(l,o,c)),this.addChild(n,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new i(c);this.tagsNodeStack.push(n),c!==l&&d&&(e[":@"]=this.buildAttributesMap(l,o,c)),this.addChild(n,e,o),n=e}r="",a=h}}else r+=e[a]}return t.child};function p(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r?(t.tagname=r,e.addChild(t)):e.addChild(t))}const f=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function m(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function y(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function g(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function b(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let s=t;s<e.length;s++){let t=e[s];if(r)t===r&&(r="");else if('"'===t||"'"===t)r=t;else if(t===n[0]){if(!n[1])return{data:i,index:s};if(e[s+1]===n[1])return{data:i,index:s}}else"\t"===t&&(t=" ");i+=t}}(e,t+1,r);if(!i)return;let s=i.data;const o=i.index,a=s.search(/\s/);let c=s,u=!0;-1!==a&&(c=s.substring(0,a),s=s.substring(a+1).trimStart());const l=c;if(n){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),u=c!==i.data.substr(e+1))}return{tagName:c,tagExp:s,closeIndex:o,attrExpPresent:u,rawTagName:l}}function v(e,t,n){const r=n;let i=1;for(;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){const s=g(e,">",n,`${t} is not closed`);if(e.substring(n+2,s).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:s};n=s}else if("?"===e[n+1]){n=g(e,"?>",n+1,"StopNode is not closed.")}else if("!--"===e.substr(n+1,3)){n=g(e,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===e.substr(n+1,2)){n=g(e,"]]>",n,"StopNode is not closed.")-2}else{const r=b(e,n,">");if(r){(r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex}}}function w(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&o(e,n)}return r.isExist(e)?e:""}t.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=a,this.parseXml=h,this.parseTextData=c,this.resolveNameSpace=u,this.buildAttributesMap=d,this.isItStopNode=y,this.replaceEntitiesValue=f,this.readStopNodeData=v,this.saveTextToParentTag=m,this.addChild=p}}},{"../util":482,"./DocTypeReader":486,"./xmlNode":491,strnum:575}],489:[function(e,t,n){const{buildOptions:r}=e("./OptionsBuilder"),i=e("./OrderedObjParser"),{prettify:s}=e("./node2json"),o=e("../validator");t.exports=class{constructor(e){this.externalEntities={},this.options=r(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=o.validate(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new i(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(e);return this.options.preserveOrder||void 0===r?r:s(r,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},{"../validator":483,"./OptionsBuilder":487,"./OrderedObjParser":488,"./node2json":490}],490:[function(e,t,n){"use strict";function r(e,t,n){let a;const c={};for(let u=0;u<e.length;u++){const l=e[u],d=i(l);let h="";if(h=void 0===n?d:n+"."+d,d===t.textNodeName)void 0===a?a=l[d]:a+=""+l[d];else{if(void 0===d)continue;if(l[d]){let e=r(l[d],t,h);const n=o(e,t);l[":@"]?s(e,l[":@"],h,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==c[d]&&c.hasOwnProperty(d)?(Array.isArray(c[d])||(c[d]=[c[d]]),c[d].push(e)):t.isArray(d,h,n)?c[d]=[e]:c[d]=e}}}return"string"==typeof a?a.length>0&&(c[t.textNodeName]=a):void 0!==a&&(c[t.textNodeName]=a),c}function i(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function s(e,t,n,r){if(t){const i=Object.keys(t),s=i.length;for(let o=0;o<s;o++){const s=i[o];r.isArray(s,n+"."+s,!0,!0)?e[s]=[t[s]]:e[s]=t[s]}}}function o(e,t){const{textNodeName:n}=t,r=Object.keys(e).length;return 0===r||!(1!==r||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n])}n.prettify=function(e,t){return r(e,t)}},{}],491:[function(e,t,n){"use strict";t.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},{}],492:[function(e,t,n){var r,i;r=this,i=function(){var e=[new Uint32Array([2157250,2157314,2157378,2157442,2157506,2157570,2157634,0,2157698,2157762,2157826,2157890,2157954,0,2158018,0]),new Uint32Array([2179041,6291456,2179073,6291456,2179105,6291456,2179137,6291456,2179169,6291456,2179201,6291456,2179233,6291456,2179265,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,2113729,2197345,2197377,2113825,2197409,2197441,2113921,2197473,2114017,2197505,2197537,2197569,2197601,2197633,2197665]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672,23068672,0,0,0,0,23068672]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064]),new Uint32Array([2196001,2196033,2196065,2196097,2196129,2196161,2196193,2196225,2196257,2196289,2196321,2196353,2196385,2196417,2196449,2196481]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2177025,6291456,2177057,6291456,2177089,6291456,2177121,6291456,2177153,6291456,2177185,6291456,2177217,6291456,2177249,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456]),new Uint32Array([2134435,2134531,2134627,2134723,2134723,2134819,2134819,2134915,2134915,2135011,2105987,2135107,2135203,2135299,2131587,2135395]),new Uint32Array([0,0,0,0,0,0,0,6291456,2168673,2169249,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354,2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354]),new Uint32Array([2125219,2125315,2152834,2152898,2125411,2152962,2153026,2125506,2125507,2125603,2153090,2153154,2153218,2153282,2153346,2105348]),new Uint32Array([2203393,6291456,2203425,6291456,2203457,6291456,2203489,6291456,6291456,6291456,6291456,2203521,6291456,2181281,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,6291456,2145538,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,6291456]),new Uint32Array([2139426,2160834,2160898,2160962,2134242,2161026,2161090,2161154,2161218,2161282,2161346,2161410,2138658,2161474,2161538,2134722]),new Uint32Array([2119939,2124930,2125026,2106658,2125218,2128962,2129058,2129154,2129250,2129346,2129442,2108866,2108770,2150466,2150530,2150594]),new Uint32Array([2201601,6291456,2201633,6291456,2201665,6291456,2201697,6291456,2201729,6291456,2201761,6291456,2201793,6291456,2201825,6291456]),new Uint32Array([2193537,2193569,2193601,2193633,2193665,2193697,2193729,2193761,2193793,2193825,2193857,2193889,2193921,2193953,2193985,2194017]),new Uint32Array([6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2190561,6291456,2190593,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2190625,6291456,2190657,6291456,23068672]),new Uint32Array([2215905,2215937,2215969,2216001,2216033,2216065,2216097,2216129,2216161,2216193,2216225,2216257,2105441,2216289,2216321,2216353]),new Uint32Array([23068672,18884130,23068672,23068672,23068672,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2191233,2191265,2191297,2191329,2191361,2191393,2191425,2117377,2191457,2191489,2191521,2191553,2191585,2191617,2191649,2117953]),new Uint32Array([2132227,2132323,2132419,2132419,2132515,2132515,2132611,2132707,2132707,2132803,2132899,2132899,2132995,2132995,2133091,2133187]),new Uint32Array([0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10609889,10610785,10609921,10610817,2222241]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([2219969,2157121,2157441,2157505,2157889,2157953,2220001,2158465,2158529,10575617,2156994,2157058,2129923,2130019,2157122,2157186]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2185249,6291456,2185281,6291456,2185313,6291456,2185345,6291456,2185377,6291456,2185409,6291456,2185441,6291456,2185473,6291456]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,6291456,0]),new Uint32Array([2183361,6291456,2183393,6291456,2183425,6291456,2183457,6291456,2183489,6291456,2183521,6291456,2183553,6291456,2183585,6291456]),new Uint32Array([2192161,2192193,2192225,2192257,2192289,2192321,2192353,2192385,2192417,2192449,2192481,2192513,2192545,2192577,2192609,2192641]),new Uint32Array([2212001,2212033,2212065,2212097,2212129,2212161,2212193,2212225,2212257,2212289,2212321,2212353,2212385,2212417,2212449,2207265]),new Uint32Array([2249825,2249857,2249889,2249921,2249954,2250018,2250082,2250145,2250177,2250209,2250241,2250274,2250337,2250370,2250433,2250465]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147905,2147969,2148033,2148097,2148161,2148225,2148289,2148353]),new Uint32Array([10485857,6291456,2197217,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2180353,2180385,2144033,2180417,2180449,2180481,2180513,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10610209,10610465,10610241,10610753,10609857]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2223842,2223906,2223970,2224034,2224098,2224162,2224226,2224290,2224354,2224418,2224482,2224546,2224610,2224674,2224738,2224802]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,18923650,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,18923714,23068672,23068672]),new Uint32Array([2126179,2125538,2126275,2126371,2126467,2125634,2126563,2105603,2105604,2125346,2126659,2126755,2126851,2098179,2098181,2098182]),new Uint32Array([2227426,2227490,2227554,2227618,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2192353,2240642,2240642,2240705,2240737,2240737,2240769,2240802,2240866,2240929,2240961,2240993,2241025,2241057,2241089,2241121]),new Uint32Array([6291456,2170881,2170913,2170945,6291456,2170977,6291456,2171009,2171041,6291456,6291456,6291456,2171073,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2132226,2132514,2163586,2132610,2160386,2133090,2133186,2160450,2160514,2160578,2133570,2106178,2160642,2133858,2160706,2160770]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10532162,10532226,10532290,10532354,10532418,10532482,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2098209,2108353,2108193,2108481,2170241,2111713,2105473,2105569,2105601,2112289,2112481,2098305,2108321,0,0,0]),new Uint32Array([2209121,2209153,2209185,2209217,2209249,2209281,2209313,2209345,2209377,2209409,2209441,2209473,2207265,2209505,2209537,2209569]),new Uint32Array([2189025,6291456,2189057,6291456,2189089,6291456,2189121,6291456,2189153,6291456,2189185,6291456,2189217,6291456,2189249,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2165764,2140004]),new Uint32Array([2215105,6291456,2215137,6291456,6291456,2215169,2215201,6291456,6291456,6291456,2215233,2215265,2215297,2215329,2215361,2215393]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,23068672,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([10505091,10505187,10505283,10505379,10505475,10505571,10505667,10505763,10505859,10505955,10506051,10506147,10506243,10506339,10506435,10506531]),new Uint32Array([2229730,2229794,2229858,2229922,2229986,2230050,2230114,2230178,2230242,2230306,2230370,2230434,2230498,2230562,2230626,2230690]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,0,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([6291456,6291456,6291456,6291456,10502115,10502178,10502211,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2190305,6291456,2190337,6291456,2190369,6291456,2190401,6291456,2190433,6291456,2190465,6291456,2190497,6291456,2190529,6291456]),new Uint32Array([2173793,2173985,2174017,6291456,2173761,2173697,6291456,2174689,6291456,2174017,2174721,6291456,6291456,2174753,2174785,2174817]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609,2100033]),new Uint32Array([2132898,2163842,2163906,2133282,2132034,2131938,2137410,2132802,2132706,2164866,2133282,2160578,2165186,2165186,6291456,6291456]),new Uint32Array([10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059,10501155,10501251,10501347,10501443]),new Uint32Array([2163458,2130978,2131074,2131266,2131362,2163522,2160130,2132066,2131010,2131106,2106018,2131618,2131298,2132034,2131938,2137410]),new Uint32Array([2212961,2116993,2212993,2213025,2213057,2213089,2213121,2213153,2213185,2213217,2213249,2209633,2213281,2213313,2213345,2213377]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2113729,2113825,2113921,2114017,2114113,2114209,2114305,2114401,2114497,2114593,2114689,2114785,2114881,2114977,2115073,2115169]),new Uint32Array([2238177,2238209,2238241,2238273,2238305,2238337,2238337,2217537,2238369,2238401,2238433,2238465,2215649,2238497,2238529,2238561]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0]),new Uint32Array([6291456,0,6291456,2145026,0,6291456,2145090,0,6291456,6291456,0,0,23068672,0,23068672,23068672]),new Uint32Array([2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129,2100289]),new Uint32Array([6291456,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0]),new Uint32Array([2187681,2187713,2187745,2187777,2187809,2187841,2187873,2187905,2187937,2187969,2188001,2188033,2188065,2188097,2188129,2188161]),new Uint32Array([0,10554498,10554562,10554626,10554690,10554754,10554818,10554882,10554946,10555010,10555074,6291456,6291456,0,0,0]),new Uint32Array([2235170,2235234,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0]),new Uint32Array([2181153,6291456,2188897,6291456,6291456,2188929,6291456,6291456,6291456,6291456,6291456,6291456,2111905,2100865,2188961,2188993]),new Uint32Array([2100833,2100897,0,0,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,2112289]),new Uint32Array([6291456,2172833,6291456,2172865,2172897,2172929,2172961,6291456,2172993,6291456,2173025,6291456,2173057,6291456,2173089,6291456]),new Uint32Array([6291456,0,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,2190721]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456]),new Uint32Array([2184993,6291456,2185025,6291456,2185057,6291456,2185089,6291456,2185121,6291456,2185153,6291456,2185185,6291456,2185217,6291456]),new Uint32Array([2115265,2115361,2115457,2115553,2115649,2115745,2115841,2115937,2116033,2116129,2116225,2116321,2150658,2150722,2200225,6291456]),new Uint32Array([2168321,6291456,2168353,6291456,2168385,6291456,2168417,6291456,2168449,6291456,2168481,6291456,2168513,6291456,2168545,6291456]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,0,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2186625,0,0,6291456,6291456,2186657,2186689,2186721,2173505,0,10496067,10496163,10496259]),new Uint32Array([2178785,6291456,2178817,6291456,2178849,6291456,2178881,6291456,2178913,6291456,2178945,6291456,2178977,6291456,2179009,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2097152,0,0,0,2097152,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2197857,2197889,2197921,2197953,2197985,2198017,0,0,2198049,2198081,2198113,2198145,2198177,2198209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2098209,2167297,2111137,6291456]),new Uint32Array([2171393,6291456,2171425,6291456,2171457,6291456,2171489,6291456,2171521,6291456,2171553,6291456,2171585,6291456,2171617,6291456]),new Uint32Array([2206753,2206785,2195457,2206817,2206849,2206881,2206913,2197153,2197153,2206945,2117857,2206977,2207009,2207041,2207073,2207105]),new Uint32Array([0,0,0,0,0,0,0,23068672,0,0,0,0,2144834,2144898,0,2144962]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,0,2105505,2098241]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,2202049,6291456,2202081,6291456,2202113,6291456,2202145,6291456,2202177,6291456,2202209,6291456,2202241,6291456]),new Uint32Array([10501155,10501251,10501347,10501443,10501539,10501635,10501731,10501827,10501923,10502019,2141731,2105505,2098177,2155586,2166530,0]),new Uint32Array([2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441]),new Uint32Array([2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330,2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10502307,10502403,10502499,10502595,10502691,10502787,10502883,10502979,10503075,10503171,10503267,10503363,10503459,10503555,10503651,10503747]),new Uint32Array([2179937,2179969,2180001,2180033,2156545,2180065,2156577,2180097,2180129,2180161,2180193,2180225,2180257,2180289,2156737,2180321]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,0,0,6291456,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([2227682,2227746,2227810,2227874,2227938,2228002,2228066,2228130,2228194,2228258,2228322,2228386,2228450,2228514,2228578,2228642]),new Uint32Array([2105601,2169121,2108193,2170049,2181025,2181057,2112481,2108321,2108289,2181089,2170497,2100865,2181121,2173601,2173633,2173665]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180641,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,6291456,0,6291456,0,6291456,0,0,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2178273,6291456,2178305,6291456,2178337,6291456,2178369,6291456,2178401,6291456,2178433,6291456,2178465,6291456,2178497,6291456]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2237377,2237409,2236225,2237441,2237473,2217441,2215521,2215553,2217473,2237505,2237537,2209697,2237569,2215585,2237601,2237633]),new Uint32Array([2221985,2165601,2165601,2165665,2165665,2222017,2222017,2165729,2165729,2158913,2158913,2158913,2158913,2097281,2097281,2105921]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2149634,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2176897,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2176929,6291456,2176961,6291456,2176993,6291456]),new Uint32Array([2172641,6291456,2172673,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2172705,2172737,6291456,2172769,2172801,6291456]),new Uint32Array([2099173,2104196,2121667,2099395,2121763,2152258,2152322,2098946,2152386,2121859,2121955,2099333,2122051,2104324,2099493,2122147]),new Uint32Array([6291456,6291456,6291456,2145794,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2145858,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,0,0,6291456,0]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,0,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2239074,2239138,2239201,2239233,2239265,2239297,2239329,2239361,0,2239393,2239425,2239425,2239458,2239521,2239553,2209569]),new Uint32Array([14680064,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,6291456,23068672]),new Uint32Array([2108321,2108289,2113153,2098209,2180897,2180929,2180961,2111137,2098241,2108353,2170241,2170273,2180993,2105825,6291456,2105473]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146114,6291456,6291456,6291456,0,0,0]),new Uint32Array([2105921,2105921,2105921,2222049,2222049,2130977,2130977,2130977,2130977,2160065,2160065,2160065,2160065,2097729,2097729,2097729]),new Uint32Array([2218145,2214785,2207937,2218177,2218209,2192993,2210113,2212769,2218241,2218273,2216129,2218305,2216161,2218337,2218369,2218401]),new Uint32Array([0,0,0,2156546,2156610,2156674,2156738,2156802,0,0,0,0,0,2156866,23068672,2156930]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2213409,2213441,2213473,2213505,2213537,2213569,2213601,2213633,2213665,2195681,2213697,2213729,2213761,2213793,2213825,2213857]),new Uint32Array([2100033,2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2201857,6291456,2201889,6291456,2201921,6291456,2201953,6291456,2201985,6291456,2202017,6291456,2176193,2176257,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2188193,2188225,2188257,2188289,2188321,2188353,2188385,2188417,2188449,2188481,2188513,2188545,2188577,2188609,2188641,0]),new Uint32Array([10554529,2221089,0,10502113,10562017,10537921,10538049,2221121,2221153,0,0,0,0,0,0,0]),new Uint32Array([2213889,2213921,2213953,2213985,2214017,2214049,2214081,2194177,2214113,2214145,2214177,2214209,2214241,2214273,2214305,2214337]),new Uint32Array([2166978,2167042,2099169,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180545,6291456,6291456,6291456]),new Uint32Array([10518915,10519011,10519107,10519203,2162242,2162306,2159554,2162370,2159362,2159618,2105922,2162434,2159746,2162498,2159810,2159874]),new Uint32Array([2161730,2161794,2135586,2161858,2161922,2137186,2131810,2160290,2135170,2161986,2137954,2162050,2162114,2162178,10518723,10518819]),new Uint32Array([10506627,10506723,10506819,10506915,10507011,10507107,10507203,10507299,10507395,10507491,10507587,10507683,10507779,10507875,10507971,10508067]),new Uint32Array([6291456,23068672,23068672,23068672,0,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2175873,2175905,2175937,2175969,2176001,2176033,2176065,2176097,2176129,2176161,2176193,2176225,2176257,2176289,2176321,2176353]),new Uint32Array([2140006,2140198,2140390,2140582,2140774,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241]),new Uint32Array([0,23068672,0,0,0,0,0,0,0,2145154,2145218,2145282,6291456,0,2145346,0]),new Uint32Array([0,0,0,0,10531458,10495395,2148545,2143201,2173473,2148865,2173505,0,2173537,0,2173569,2149121]),new Uint32Array([10537282,10495683,2148738,2148802,2148866,0,6291456,2148930,2186593,2173473,2148737,2148865,2148802,10495779,10495875,10495971]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2215425,2215457,2215489,2215521,2215553,2215585,2215617,2215649,2215681,2215713,2215745,2215777,2192033,2215809,2215841,2215873]),new Uint32Array([2242049,2242081,2242113,2242145,2242177,2242209,2242241,2242273,2215937,2242305,2242338,2242401,2242433,2242465,2242497,2216001]),new Uint32Array([10554529,2221089,0,0,10562017,10502113,10538049,10537921,2221185,10489601,10489697,10609889,10609921,2141729,2141793,10610273]),new Uint32Array([2141923,2142019,2142115,2142211,2142307,2142403,2142499,2142595,2142691,0,0,0,0,0,0,0]),new Uint32Array([0,2221185,2221217,10609857,10609857,10489601,10489697,10609889,10609921,2141729,2141793,2221345,2221377,2221409,2221441,2187105]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18923970,23068672,23068672,23068672,0,6291456,6291456]),new Uint32Array([2183105,6291456,2183137,6291456,2183169,6291456,2183201,6291456,2183233,6291456,2183265,6291456,2183297,6291456,2183329,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2134434,2134818,2097666,2097186,2097474,2097698,2105986,2131586,2132450,2131874,2131778,2135970,2135778,2161602,2136162,2161666]),new Uint32Array([2236865,2236897,2236930,2236993,2237025,2235681,2237058,2237121,2237153,2237185,2237217,2217281,2237250,2191233,2237313,2237345]),new Uint32Array([2190049,6291456,2190081,6291456,2190113,6291456,2190145,6291456,2190177,6291456,2190209,6291456,2190241,6291456,2190273,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2101922,2102050,2102178,2102306,10498755,10498851,10498947,10499043,10499139,10499235,10499331,10499427,10499523,10489604,10489732,10489860]),new Uint32Array([2166914,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2181601,2170561,2181633,2181665,2170753,2181697,2172897,2170881,2181729,2170913,2172929,2113441,2181761,2181793,2171009,2173761]),new Uint32Array([0,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2248001,2248033,2248066,2248130,2248193,2248226,2248289,2248322,2248385,2248417,2216673,2248450,2248514,2248577,2248610,2248673]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([2169729,6291456,2169761,6291456,2169793,6291456,2169825,6291456,2169857,2169889,6291456,2169921,6291456,2143329,6291456,2098305]),new Uint32Array([2162178,2163202,2163266,2135170,2136226,2161986,2137954,2159426,2159490,2163330,2159554,2163394,2159682,2139522,2136450,2159746]),new Uint32Array([2173953,2173985,0,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2174209,2174241,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,4271169,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2174273]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,2190785,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2189793,6291456,2189825,6291456,2189857,6291456,2189889,6291456,2189921,6291456,2189953,6291456,2189985,6291456,2190017,6291456]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,0,2098305,2108321,2108289,2100865,2113153,2108481,2113345,0,2098209,2111137]),new Uint32Array([2172129,6291456,2172161,6291456,2172193,6291456,2172225,6291456,2172257,6291456,2172289,6291456,2172321,6291456,2172353,6291456]),new Uint32Array([2214753,6291456,2214785,6291456,6291456,2214817,2214849,2214881,2214913,2214945,2214977,2215009,2215041,2215073,2194401,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([10610305,10610337,10575617,2221761,10610401,10610433,10502177,0,10610465,10610497,10610529,10610561,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2187105,2187137,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2199393,2199425,2199457,2199489,2199521,2199553,2199585,2199617,2199649,2199681,2199713,2199745,2199777,2199809,2199841,0]),new Uint32Array([2217249,2217281,2217313,2217345,2217377,2217409,2217441,2217473,2215617,2217505,2217537,2217569,2214753,2217601,2217633,2217665]),new Uint32Array([2170273,2170305,6291456,2170337,2170369,6291456,2170401,2170433,2170465,6291456,6291456,6291456,2170497,2170529,6291456,2170561]),new Uint32Array([2188673,6291456,2188705,2188737,2188769,6291456,6291456,2188801,6291456,2188833,6291456,2188865,6291456,2180929,2181505,2180897]),new Uint32Array([10489988,10490116,10490244,10490372,10490500,10490628,10490756,10490884,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147393,2147457,2147521,2147585,2147649,2147713,2147777,2147841]),new Uint32Array([23068672,23068672,0,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2241153,2241185,2241217,2215809,2241250,2241313,2241345,2241377,2217921,2241377,2241409,2215873,2241441,2241473,2241505,2241537]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220417,2220417,2220449,2220449,2220481,2220481,2220513,2220513,2220545,2220545,2220577,2220577,2220609,2220609,2220641,2220641]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2144002,0,6291456,6291456,0,0,6291456,6291456,6291456]),new Uint32Array([2167105,2167137,2167169,2167201,2167233,2167265,2167297,2167329,2167361,2167393,2167425,2167457,2167489,2167521,2167553,2167585]),new Uint32Array([10575521,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2234146,2234210,2234274,2234338,2234402,2234466,2234530,2234594,2234658,2234722,2234786,2234850,2234914,2234978,2235042,2235106]),new Uint32Array([0,0,0,0,0,0,0,2180577,0,0,0,0,0,2180609,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456]),new Uint32Array([2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2242529,2242561,2242593,2242625,2242657,2242689,2242721,2242753,2207937,2218177,2242785,2242817,2242849,2242882,2242945,2242977]),new Uint32Array([2118049,2105345,2118241,2105441,2118433,2118529,2118625,2118721,2118817,2200257,2200289,2191809,2200321,2200353,2200385,2200417]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2185505,6291456,2185537,6291456,2185569,6291456,2185601,6291456,2185633,6291456,2185665,6291456,2185697,6291456,2185729,6291456]),new Uint32Array([2231970,2232034,2232098,2232162,2232226,2232290,2232354,2232418,2232482,2232546,2232610,2232674,2232738,2232802,2232866,2232930]),new Uint32Array([2218625,2246402,2246466,2246530,2246594,2246657,2246689,2246689,2218657,2219681,2246721,2246753,2246785,2246818,2246881,2208481]),new Uint32Array([2197025,2197057,2197089,2197121,2197153,2197185,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2219137,2216961,2219169,2219201,2219233,2219265,2219297,2217025,2215041,2219329,2217057,2219361,2217089,2219393,2197153,2219426]),new Uint32Array([23068672,23068672,23068672,0,0,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713]),new Uint32Array([2243522,2243585,2243617,2243649,2243681,2210113,2243713,2243746,2243810,2243874,2243937,2243970,2244033,2244065,2244097,2244129]),new Uint32Array([2178017,6291456,2178049,6291456,2178081,6291456,2178113,6291456,2178145,6291456,2178177,6291456,2178209,6291456,2178241,6291456]),new Uint32Array([10553858,2165314,10518722,6291456,10518818,0,10518914,2130690,10519010,2130786,10519106,2130882,10519202,2165378,10554050,2165506]),new Uint32Array([0,0,2135491,2135587,2135683,2135779,2135875,2135971,2135971,2136067,2136163,2136259,2136355,2136355,2136451,2136547]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2220033,2220033,2220065,2220065,2220065,2220065,2220097,2220097,2220097,2220097,2220129,2220129,2220129,2220129,2220161,2220161]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2100897,2100898,2100899,2150018,2100865,2100866,2100867,2100868,2150082,2108481,2109858,2109859,2105569,2105505,2098241,2105601]),new Uint32Array([2097217,2097505,2097505,2097505,2097505,2165570,2165570,2165634,2165634,2165698,2165698,2097858,2097858,0,0,2097152]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10503843,10503939,10504035,10504131,10504227,10504323,10504419,10504515,10504611,10504707,10504803,10504899,10504995,10491140,10491268,0]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,2235297,2220769,2235329,2235361]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2222401,2222433,2222465,10531394,2222497,2222529,2222561,0,2222593,2222625,2222657,2222689,2222721,2222753,2222785,0]),new Uint32Array([2184481,6291456,2184513,6291456,2184545,6291456,2184577,6291456,2184609,6291456,2184641,6291456,2184673,6291456,2184705,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2105570,2156034,2126947,2156098,2153666,2127043,2127139,2156162,0,2127235,2156226,2156290,2156354,2156418,2127331,2127427]),new Uint32Array([2215905,2207041,2153185,2241569,2241601,2241633,2241665,2241697,2241730,2241793,2241825,2241857,2241889,2241921,2241954,2242017]),new Uint32Array([2203777,6291456,2203809,6291456,2203841,6291456,2203873,6291456,2203905,6291456,2173121,2180993,2181249,2203937,2181313,0]),new Uint32Array([2168577,6291456,2168609,6291456,2168641,6291456,2168673,6291456,2168705,6291456,2168737,6291456,2168769,6291456,2168801,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,0,0]),new Uint32Array([2210113,2195521,2210145,2210177,2210209,2210241,2210273,2210305,2210337,2210369,2210401,2210433,2210465,2210497,2210529,2210561]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2228706,2228770,2228834,2228898,2228962,2229026,2229090,2229154,2229218,2229282,2229346,2229410,2229474,2229538,2229602,2229666]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,18874368,18874368,18874368,0,0]),new Uint32Array([2133089,2133281,2133281,2133281,2133281,2160577,2160577,2160577,2160577,2097441,2097441,2097441,2097441,2133857,2133857,2133857]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089]),new Uint32Array([2178529,6291456,2178561,6291456,2178593,6291456,2178625,6291456,2178657,6291456,2178689,6291456,2178721,6291456,2178753,6291456]),new Uint32Array([2221025,2221025,2221057,2221057,2159329,2159329,2159329,2159329,2097217,2097217,2158914,2158914,2158978,2158978,2159042,2159042]),new Uint32Array([2208161,2208193,2208225,2208257,2194433,2208289,2208321,2208353,2208385,2208417,2208449,2208481,2208513,2208545,2208577,2208609]),new Uint32Array([2169217,6291456,2169249,6291456,2169281,6291456,2169313,6291456,2169345,6291456,2169377,6291456,2169409,6291456,2169441,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2133187,2133283,2133283,2133379,2133475,2133571,2133667,2133667,2133763,2133859,2133955,2134051,2134147,2134147,2134243,2134339]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,0]),new Uint32Array([2193089,2193121,2193153,2193185,2117665,2117569,2193217,2193249,2193281,2193313,2193345,2193377,2193409,2193441,2193473,2193505]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184225,6291456,2184257,6291456,2184289,6291456,2184321,6291456,2184353,6291456,2184385,6291456,2184417,6291456,2184449,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2100833,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2200801,2200833,2200865,0]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2181153,2105505,2181185,2167617,2180993]),new Uint32Array([2160002,2160066,2160130,2160194,2160258,2132066,2131010,2131106,2106018,2131618,2160322,2131298,2132034,2131938,2137410,2132226]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2183617,6291456,2183649,6291456,2183681,6291456,2183713,6291456,2183745,6291456,2183777,6291456,2183809,6291456,2183841,6291456]),new Uint32Array([0,6291456,6291456,0,6291456,0,0,6291456,6291456,0,6291456,0,0,6291456,0,0]),new Uint32Array([2250977,2251009,2251041,2251073,2195009,2251106,2251169,2251201,2251233,2251265,2251297,2251330,2251394,2251457,2251489,2251521]),new Uint32Array([2205729,2205761,2205793,2205825,2205857,2205889,2205921,2205953,2205985,2206017,2206049,2206081,2206113,2206145,2206177,2206209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2143170,2168993,6291456,2169025,6291456,2169057,6291456,2169089,6291456,2143234,2169121,6291456,2169153,6291456,2169185,6291456]),new Uint32Array([23068672,23068672,2190689,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2248706,2248769,2248801,2248833,2248865,2248897,2248929,2248962,2249026,2249090,2249154,2240705,2249217,2249249,2249281,2249313]),new Uint32Array([10485857,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10495394,6291456,2098209,6291456,6291456,2097152,6291456,10531394]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([6291456,2186977,6291456,6291456,6291456,6291456,6291456,10537858,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2209601,2209633,2209665,2209697,2209729,2209761,2209793,2209825,2209857,2209889,2209921,2209953,2209985,2210017,2210049,2210081]),new Uint32Array([10501539,10501635,10501731,10501827,10501923,10502019,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2194561,2194593,2194625,2119777,2119873,2194657,2194689,2194721,2194753,2194785,2194817,2194849,2194881,2194913,2194945,2194977]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569]),new Uint32Array([2222818,2222882,2222946,2223010,2223074,2223138,2223202,2223266,2223330,2223394,2223458,2223522,2223586,2223650,2223714,2223778]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672]),new Uint32Array([0,2179553,2179585,2179617,2179649,2144001,2179681,2179713,2179745,2179777,2179809,2156705,2179841,2156833,2179873,2179905]),new Uint32Array([6291456,23068672,6291456,2145602,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,6291456,0,0]),new Uint32Array([2196513,2196545,2196577,2196609,2196641,2196673,2196705,2196737,2196769,2196801,2196833,2196865,2196897,2196929,2196961,2196993]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2177281,6291456,2177313,6291456,2177345,6291456,2177377,6291456,2177409,6291456,2177441,6291456,2177473,6291456,2177505,6291456]),new Uint32Array([2187137,2221473,2221505,2221537,2221569,6291456,6291456,10610209,10610241,10537986,10537986,10537986,10537986,10609857,10609857,10609857]),new Uint32Array([2243009,2243041,2216033,2243074,2243137,2243169,2243201,2219617,2243233,2243265,2243297,2243329,2243362,2243425,2243457,2243489]),new Uint32Array([10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,2097152,4194304,4194304,0,0]),new Uint32Array([2143042,6291456,2143106,2143106,2168833,6291456,2168865,6291456,6291456,2168897,6291456,2168929,6291456,2168961,6291456,2143170]),new Uint32Array([6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2204193,2204225,2204257,2204289,2204321,2204353,2204385,2204417,2204449,2204481,2204513,2204545,2204577,2204609,2204641,2204673]),new Uint32Array([2202753,6291456,2202785,6291456,2202817,6291456,2202849,6291456,2202881,6291456,2202913,6291456,2202945,6291456,2202977,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321]),new Uint32Array([2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842,2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842]),new Uint32Array([2253313,2253346,2253409,2253441,2253473,2253505,2253537,2253569,2253601,2253634,2219393,2253697,2253729,2253761,2253793,2253825]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([2162562,2162626,2131362,2162690,2159938,2160002,2162754,2162818,2160130,2162882,2160194,2160258,2160834,2160898,2161026,2161090]),new Uint32Array([2175361,2175393,2175425,2175457,2175489,2175521,2175553,2175585,2175617,2175649,2175681,2175713,2175745,2175777,2175809,2175841]),new Uint32Array([2253858,2253921,2253954,2254018,2254082,2196737,2254145,2196865,2254177,2254209,2254241,2254273,2197025,2254306,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2202113,2204129,2188705,2204161]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953]),new Uint32Array([2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,0,2108417,0,2111713,2100897,2111905]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2175425,2175489,2175809,2175905,2175937,2175937,2176193,2176417,2180865,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,2143298,2143298,2143298,2143362,2143362,2143362,2143426,2143426,2143426,2171105,6291456,2171137]),new Uint32Array([2120162,2120258,2151618,2151682,2151746,2151810,2151874,2151938,2152002,2120035,2120131,2120227,2152066,2120323,2152130,2120419]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2195361,2142433,2236065,2236097,2236129,2236161,2118241,2117473,2236193,2236225,2236257,2236289,0,0,0,0]),new Uint32Array([2189281,6291456,2189313,6291456,2189345,6291456,2189377,6291456,2189409,6291456,2189441,6291456,2189473,6291456,2189505,6291456]),new Uint32Array([6291456,6291456,2145922,6291456,6291456,6291456,6291456,2145986,6291456,6291456,6291456,6291456,2146050,6291456,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10502113,10562017,10610401,10502177,10610433,10538049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,2186401,0,2186433,0,2186465,0,2186497]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,23068672,23068672]),new Uint32Array([0,0,2198241,2198273,2198305,2198337,2198369,2198401,0,0,2198433,2198465,2198497,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,0,23068672,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,2133281,2097505,2105889,0,2097697,2135777,2097633,2097441]),new Uint32Array([2197889,2197921,2197953,2197985,2198017,2198049,2198081,2198113,2198145,2198177,2198209,2198241,2198273,2198305,2198337,2198369]),new Uint32Array([2132514,2132610,2160386,2133090,2133186,2160450,2160514,2133282,2160578,2133570,2106178,2160642,2133858,2160706,2160770,2134146]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,6291456,23068672,23068672,6291456,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2184737,6291456,2184769,6291456,2184801,6291456,2184833,6291456,2184865,6291456,2184897,6291456,2184929,6291456,2184961,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,2186753,6291456,6291456,6291456,6291456,2186785,2186817,2186849,2173569,2186881,10496355,10495395,10575521]),new Uint32Array([0,0,2097729,0,0,0,0,2106017,0,2097505,0,2097185,0,2135777,2097633,2097441]),new Uint32Array([2189537,6291456,2189569,6291456,2189601,6291456,2189633,6291456,2189665,6291456,2189697,6291456,2189729,6291456,2189761,6291456]),new Uint32Array([2202497,6291456,2202529,6291456,2202561,6291456,2202593,6291456,2202625,6291456,2202657,6291456,2202689,6291456,2202721,6291456]),new Uint32Array([2245217,2218369,2245249,2245282,2245345,2245377,2245410,2245474,2245537,2245569,2245601,2245633,2245665,2245665,2245697,2245729]),new Uint32Array([6291456,0,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,23068672,6291456,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,2097377,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2176641,6291456,2176673,6291456,2176705,6291456,2176737,6291456,2176769,6291456,2176801,6291456,2176833,6291456,2176865,6291456]),new Uint32Array([2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2174369,2174369,0,0,2100833,2100737]),new Uint32Array([2116513,2190817,2190849,2190881,2190913,2190945,2116609,2190977,2191009,2191041,2191073,2117185,2191105,2191137,2191169,2191201]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2167617,2167649,2167681,2167713,2167745,2167777,2167809,6291456,2167841,2167873,2167905,2167937,2167969,2168001,2168033,4240130]),new Uint32Array([2165122,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122,2134562,2132162,2132834,2136866]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2186209,2186241,2186273,2186305,2186337,2186369,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,0,23068672,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([0,10537921,10610689,10610273,10610497,10610529,10610305,10610721,10489601,10489697,10610337,10575617,10554529,2221761,2197217,10496577]),new Uint32Array([2105473,2105569,2105601,2112289,0,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2125346,2153410,2153474,2127394,2153538,2153602,2153666,2153730,2105507,2105476,2153794,2153858,2153922,2153986,2154050,2105794]),new Uint32Array([2200449,2119681,2200481,2153313,2199873,2199905,2199937,2200513,2200545,2200577,2200609,2119105,2119201,2119297,2119393,2119489]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2175777,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2222273,2197217,2221473,2221505,2221089,2222305,2200865,2099681,2104481,2222337,2099905,2120737,2222369,2103713,2100225,2098785]),new Uint32Array([2201377,6291456,2201409,6291456,2201441,6291456,2201473,6291456,2201505,6291456,2201537,6291456,2201569,6291456,6291456,23068672]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([2200897,6291456,2200929,6291456,2200961,6291456,2200993,6291456,2201025,6291456,2180865,6291456,2201057,6291456,2201089,6291456]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2161154,2161410,2138658,2161474,2161538,2097666,2097186,2097474,2162946,2132450,2163010,2163074,2136162,2163138,2161666,2161730]),new Uint32Array([2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953]),new Uint32Array([0,0,0,0,0,0,23068672,23068672,0,0,0,0,2145410,2145474,0,6291456]),new Uint32Array([2244161,2216065,2212769,2244193,2244225,2244257,2244290,2244353,2244385,2244417,2244449,2218273,2244481,2244514,2244577,2244609]),new Uint32Array([2125730,2125699,2125795,2125891,2125987,2154114,2154178,2154242,2154306,2154370,2154434,2154498,2126082,2126178,2126274,2126083]),new Uint32Array([2237665,2237697,2237697,2237697,2237730,2237793,2237825,2237857,2237890,2237953,2237985,2238017,2238049,2238081,2238113,2238145]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150146,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2214369,2238593,2238625,2238657,2238689,2238721,2238753,2238785,2238817,2238850,2238913,2238945,2238977,2235457,2239009,2239041]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2252066,2252130,2252193,2252225,2252257,2252290,2252353,2252385,2252417,2252449,2252481,2252513,2252545,2252578,2252641,2252673]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,2197857]),new Uint32Array([2224866,2224930,2224994,2225058,2225122,2225186,2225250,2225314,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2219490,2219554,2219617,2219649,2219681,2219714,2219778,2219842,2219905,2219937,0,0,0,0,0,0]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665]),new Uint32Array([2220161,2220161,2220193,2220193,2220193,2220193,2220225,2220225,2220225,2220225,2220257,2220257,2220257,2220257,2220289,2220289]),new Uint32Array([2192673,2192705,2192737,2192769,2192801,2192833,2192865,2118049,2192897,2117473,2117761,2192929,2192961,2192993,2193025,2193057]),new Uint32Array([2179297,6291456,2179329,6291456,2179361,6291456,2179393,6291456,2179425,6291456,2179457,6291456,2179489,6291456,2179521,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2235745,2235777,2193633,2235809,2235841,2235873,2235905,2235937,2235969,2116513,2116705,2236001,2200513,2199905,2200545,2236033]),new Uint32Array([2113153,2108481,2113345,2113441,2232993,2233025,0,0,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761]),new Uint32Array([2170593,6291456,2170625,6291456,2170657,6291456,2170689,2170721,6291456,2170753,6291456,6291456,2170785,6291456,2170817,2170849]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2166786,2166850,0,0,0,0]),new Uint32Array([23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,0]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2134562,2132162,2132834,2136866,2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058]),new Uint32Array([6291456,6291456,2098337,2101441,10531458,2153473,6291456,6291456,10531522,2100737,2108193,6291456,2106499,2106595,2106691,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2233122,2233186,2233250,2233314,2233378,2233442,2233506,2233570,2233634,2233698,2233762,2233826,2233890,2233954,2234018,2234082]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2205217,2205249,2205281,2205313,2205345,2205377,2205409,2205441,2205473,2205505,2205537,2205569,2205601,2205633,2205665,2205697]),new Uint32Array([6291456,0,6291456,0,0,0,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([2173601,2173761,2174081,2173569,2174241,2174113,2173953,6291456,2174305,6291456,2174337,6291456,2174369,6291456,2174401,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2152450,2152514,2099653,2104452,2099813,2122243,2099973,2152578,2122339,2122435,2122531,2122627,2122723,2104580,2122819,2152642]),new Uint32Array([2236385,2236417,2236449,2236482,2236545,2215425,2236577,2236609,2236641,2236673,2215457,2236705,2236737,2236770,2215489,2236833]),new Uint32Array([2163394,2159746,2163458,2131362,2163522,2160130,2163778,2132226,2163842,2132898,2163906,2161410,2138658,2097666,2136162,2163650]),new Uint32Array([2218721,2246913,2246946,2216385,2247010,2247074,2215009,2247137,2247169,2216481,2247201,2247233,2247266,2247330,2247330,0]),new Uint32Array([2129730,2129762,2129858,2129731,2129827,2156482,2156482,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0,0,0,0,6291456,0,0]),new Uint32Array([2203969,2204001,2181377,2204033,2204065,6291456,2204097,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2169473,6291456,2169505,6291456,2169537,6291456,2169569,6291456,2169601,6291456,2169633,6291456,2169665,6291456,2169697,6291456]),new Uint32Array([2141542,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220801,2220801,2220801,2220801,2220833,2220833,2220865,2220865,2220865,2220865,2220897,2220897,2220897,2220897,2139873,2139873]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,0,0,0,0,0,0,6291456,0]),new Uint32Array([2214849,2218433,2218465,2218497,2218529,2218561,2214881,2218593,2218625,2218657,2218689,2218721,2218753,2216545,2218785,2218817]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058,2165122,2132802,2132706,2164866]),new Uint32Array([2207649,2207681,2207713,2207745,2207777,2207809,2207841,2207873,2207905,2207937,2207969,2208001,2208033,2208065,2208097,2208129]),new Uint32Array([2123683,2105092,2152706,2123779,2105220,2152770,2100453,2098755,2123906,2124002,2124098,2124194,2124290,2124386,2124482,2124578]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,0,0,0,0,0,0,0,10485857]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([10508163,10508259,10508355,10508451,2200129,2200161,2192737,2200193,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203553,6291456,2203585,6291456,6291456,6291456,2203617,6291456,2203649,6291456,2203681,6291456,2203713,6291456,2203745,6291456]),new Uint32Array([18884449,18884065,23068672,18884417,18884034,18921185,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18874368]),new Uint32Array([2247393,2247426,2247489,2247521,2247553,2247586,2247649,2247681,2247713,2247745,2247777,2247810,2247873,2247905,2247937,2247969]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,2160577,2133857,2235297,0,2235329,0]),new Uint32Array([2182593,6291456,2182625,6291456,2182657,6291456,2182689,6291456,2182721,6291456,2182753,6291456,2182785,6291456,2182817,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102402,2102403,6291456,2110050]),new Uint32Array([2149890,2108323,2149954,6291456,2113441,6291456,2149057,6291456,2113441,6291456,2105473,2167265,2111137,2105505,6291456,2108353]),new Uint32Array([2219105,2219137,2195233,2251554,2251617,2251649,2251681,2251713,2251746,2251810,2251873,2251905,2251937,2251970,2252033,2219169]),new Uint32Array([2203009,6291456,2203041,6291456,2203073,6291456,2203105,6291456,2203137,6291456,2203169,6291456,2203201,6291456,2203233,6291456]),new Uint32Array([2128195,2128291,2128387,2128483,2128579,2128675,2128771,2128867,2128963,2129059,2129155,2129251,2129347,2129443,2129539,2129635]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2140964,2141156,2140966,2141158,2141350]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2225378,2225442,2225506,2225570,2225634,2225698,2225762,2225826,2225890,2225954,2226018,2226082,2226146,2226210,2226274,2226338]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417]),new Uint32Array([2108353,2108417,0,2105601,2108193,2157121,2157313,2157377,2157441,2100897,6291456,2108419,2173953,2173633,2173633,2173953]),new Uint32Array([2111713,2173121,2111905,2098177,2173153,2173185,2173217,2113153,2113345,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2190753]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,2197249,6291456,2117377,2197281,2197313,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,23068672]),new Uint32Array([2173281,6291456,2173313,6291456,2173345,6291456,2173377,6291456,0,0,10532546,6291456,6291456,6291456,10562017,2173441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2159426,2159490,2159554,2159362,2159618,2159682,2139522,2136450,2159746,2159810,2159874,2130978,2131074,2131266,2131362,2159938]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203233,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2203265,6291456,2203297,6291456,2203329,2203361,6291456]),new Uint32Array([6291456,6291456,2148418,2148482,2148546,0,6291456,2148610,2186529,2186561,2148417,2148545,2148482,10495778,2143969,10495778]),new Uint32Array([2134146,2139426,2160962,2134242,2161218,2161282,2161346,2161410,2138658,2134722,2134434,2134818,2097666,2097346,2097698,2105986]),new Uint32Array([2198881,2198913,2198945,2198977,2199009,2199041,2199073,2199105,2199137,2199169,2199201,2199233,2199265,2199297,2199329,2199361]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([10610561,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2183873,6291456,2183905,6291456,2183937,6291456,2183969,6291456,2184001,6291456,2184033,6291456,2184065,6291456,2184097,6291456]),new Uint32Array([2244642,2244706,2244769,2244801,2218305,2244833,2244865,2244897,2244929,2244961,2244993,2245026,2245089,2245122,2245185,0]),new Uint32Array([6291456,6291456,2116513,2116609,2116705,2116801,2199873,2199905,2199937,2199969,2190913,2200001,2200033,2200065,2200097,2191009]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2180673,2180705,2180737,2180769,2180801,2180833,0,0]),new Uint32Array([2098081,2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150402]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,2145666,2145730,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665]),new Uint32Array([2187073,6291456,6291456,6291456,6291456,2098241,2098241,2108353,2100897,2111905,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102404,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2100612,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10485857]),new Uint32Array([2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([2217697,2217729,2217761,2217793,2217825,2217857,2217889,2217921,2217953,2215873,2217985,2215905,2218017,2218049,2218081,2218113]),new Uint32Array([2211233,2218849,2216673,2218881,2218913,2218945,2218977,2219009,2216833,2219041,2215137,2219073,2216865,2209505,2219105,2216897]),new Uint32Array([2240097,2240129,2240161,2240193,2240225,2240257,2240289,2240321,2240353,2240386,2240449,2240481,2240513,2240545,2207905,2240578]),new Uint32Array([6291456,6291456,2202273,6291456,2202305,6291456,2202337,6291456,2202369,6291456,2202401,6291456,2202433,6291456,2202465,6291456]),new Uint32Array([0,23068672,23068672,18923394,23068672,18923458,18923522,18884099,18923586,18884195,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2201121,6291456,2201153,6291456,2201185,6291456,2201217,6291456,2201249,6291456,2201281,6291456,2201313,6291456,2201345,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2211041,2211073,2211105,2211137,2211169,2211201,2211233,2211265,2211297,2211329,2211361,2211393,2211425,2211457,2211489,2211521]),new Uint32Array([2181825,6291456,2181857,6291456,2181889,6291456,2181921,6291456,2181953,6291456,2181985,6291456,2182017,6291456,2182049,6291456]),new Uint32Array([2162337,2097633,2097633,2097633,2097633,2132705,2132705,2132705,2132705,2097153,2097153,2097153,2097153,2133089,2133089,2133089]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,2148545,6291456,2173473,6291456,2148865,6291456,2173505,6291456,2173537,6291456,2173569,6291456,2149121,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2207137,2207169,2207201,2207233,2207265,2207297,2207329,2207361,2207393,2207425,2207457,2207489,2207521,2207553,2207585,2207617]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,23068672,23068672,0,0,0,0,0,0]),new Uint32Array([2198401,2198433,2198465,2198497,0,2198529,2198561,2198593,2198625,2198657,2198689,2198721,2198753,2198785,2198817,2198849]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2216385,2118721,2216417,2216449,2216481,2216513,2216545,2211233,2216577,2216609,2216641,2216673,2216705,2216737,2216737,2216769]),new Uint32Array([2216801,2216833,2216865,2216897,2216929,2216961,2216993,2215169,2217025,2217057,2217089,2217121,2217154,2217217,0,0]),new Uint32Array([2210593,2191809,2210625,2210657,2210689,2210721,2210753,2210785,2210817,2210849,2191297,2210881,2210913,2210945,2210977,2211009]),new Uint32Array([0,0,2105825,0,0,2111905,2105473,0,0,2112289,2108193,2112481,2112577,0,2098305,2108321]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,2097153,2134241,0,2132705,0,0,2131297,0,2133089,0,2133857,0,2220769,0,2235361]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,6291456,6291456,14680064]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2171873,6291456,2171905,6291456,2171937,6291456,2171969,6291456,2172001,6291456,2172033,6291456,2172065,6291456,2172097,6291456]),new Uint32Array([2220929,2220929,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2133857,2134145,2134145,2134145,2134145,2134241,2134241,2134241,2134241,2105889,2105889,2105889,2105889,2097185,2097185,2097185]),new Uint32Array([2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,10499619,10499715,10499811,10499907]),new Uint32Array([0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2144322,2144386,2144450,2144514,2144578,2144642,2144706,2144770]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0,0,2111905,2105473,2105569]),new Uint32Array([2236321,2236353,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2152194,2121283,2103684,2103812,2097986,2098533,2097990,2098693,2098595,2098853,2099013,2103940,2121379,2121475,2121571,2104068]),new Uint32Array([2206241,2206273,2206305,2206337,2206369,2206401,2206433,2206465,2206497,2206529,2206561,2206593,2206625,2206657,2206689,2206721]),new Uint32Array([6291456,6291456,6291456,6291456,16777216,16777216,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,10538818,10538882,6291456,6291456,2150338]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2214369,2214401,2214433,2214465,2214497,2214529,2214561,2214593,2194977,2214625,2195073,2214657,2214689,2214721,6291456,6291456]),new Uint32Array([2097152,2097152,2097152,2097152,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2182081,6291456,2182113,6291456,2182145,6291456,2182177,6291456,2182209,6291456,2182241,6291456,2182273,6291456,2182305,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146881,2146945,2147009,2147073,2147137,2147201,2147265,2147329]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672]),new Uint32Array([0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2122915,2123011,2123107,2104708,2123203,2123299,2123395,2100133,2104836,2100290,2100293,2104962,2104964,2098052,2123491,2123587]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,2171169,6291456,2171201,6291456,2171233,6291456,2171265,6291456,2171297,6291456,2171329,6291456,6291456,2171361,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2148994,2149058,2149122,0,6291456,2149186,2186945,2173537,2148993,2149121,2149058,10531458,10496066,0]),new Uint32Array([2195009,2195041,2195073,2195105,2195137,2195169,2195201,2195233,2195265,2195297,2195329,2195361,2195393,2195425,2195457,2195489]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,0,0,6291456,6291456]),new Uint32Array([2182849,6291456,2182881,6291456,2182913,6291456,2182945,6291456,2182977,6291456,2183009,6291456,2183041,6291456,2183073,6291456]),new Uint32Array([2211553,2210081,2211585,2211617,2211649,2211681,2211713,2211745,2211777,2211809,2209569,2211841,2211873,2211905,2211937,2211969]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2166594,2127298,2166658,2142978,2141827,2166722]),new Uint32Array([2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2185761,2185793,2185825,2185857,2185889,2185921,0,0]),new Uint32Array([6291456,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456]),new Uint32Array([0,0,0,2220961,2220961,2220961,2220961,2144193,2144193,2159201,2159201,2159265,2159265,2144194,2220993,2220993]),new Uint32Array([2192641,2235393,2235425,2152257,2116609,2235457,2235489,2200065,2235521,2235553,2235585,2212449,2235617,2235649,2235681,2235713]),new Uint32Array([2194049,2194081,2194113,2194145,2194177,2194209,2194241,2194273,2194305,2194337,2194369,2194401,2194433,2194465,2194497,2194529]),new Uint32Array([2196673,2208641,2208673,2208705,2208737,2208769,2208801,2208833,2208865,2208897,2208929,2208961,2208993,2209025,2209057,2209089]),new Uint32Array([2191681,2191713,2191745,2191777,2153281,2191809,2191841,2191873,2191905,2191937,2191969,2192001,2192033,2192065,2192097,2192129]),new Uint32Array([2230946,2231010,2231074,2231138,2231202,2231266,2231330,2231394,2231458,2231522,2231586,2231650,2231714,2231778,2231842,2231906]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2185953,2185985,2186017,2186049,2186081,2186113,2186145,2186177]),new Uint32Array([2139811,2139907,2097284,2105860,2105988,2106116,2106244,2097444,2097604,2097155,10485778,10486344,2106372,6291456,0,0]),new Uint32Array([2110051,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2172385,6291456,2172417,6291456,2172449,6291456,2172481,6291456,2172513,6291456,2172545,6291456,2172577,6291456,2172609,6291456]),new Uint32Array([0,0,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2249345,2249377,2249409,2249441,2249473,2249505,2249537,2249570,2210209,2249633,2249665,2249697,2249729,2249761,2249793,2216769]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2187169,2187201,2187233,2187265,2187297,2187329,2187361,2187393,2187425,2187457,2187489,2187521,2187553,2187585,2187617,2187649]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,6291456,6291456,0,0,0,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2182337,6291456,2182369,6291456,2182401,6291456,2182433,6291456,2182465,6291456,2182497,6291456,2182529,6291456,2182561,6291456]),new Uint32Array([2138179,2138275,2138371,2138467,2134243,2134435,2138563,2138659,2138755,2138851,2138947,2139043,2138947,2138755,2139139,2139235]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2250498,2250562,2250625,2250657,2208321,2250689,2250721,2250753,2250785,2250817,2250849,2218945,2250881,2250913,2250945,0]),new Uint32Array([2170369,2105569,2098305,2108481,2173249,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,0,2108193,0,0,0,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2100897,2100897,2105569,2105569,6291456,2112289,2149826,6291456,6291456,2112481,2112577,2098177,2098177,2098177,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,2169953,2169985,6291456,2170017,6291456,2170049,2170081,6291456,2170113,2170145,2170177,6291456,6291456,2170209,2170241]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220641,2220641,2220673,2220673,2220673,2220673,2220705,2220705,2220705,2220705,2220737,2220737,2220737,2220737,2220769,2220769]),new Uint32Array([2127650,2127746,2127842,2127938,2128034,2128130,2128226,2128322,2128418,2127523,2127619,2127715,2127811,2127907,2128003,2128099]),new Uint32Array([2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177]),new Uint32Array([0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2204705,2204737,2204769,2204801,2204833,2204865,2204897,2204929,2204961,2204993,2205025,2205057,2205089,2205121,2205153,2205185]),new Uint32Array([2176385,6291456,2176417,6291456,2176449,6291456,2176481,6291456,2176513,6291456,2176545,6291456,2176577,6291456,2176609,6291456]),new Uint32Array([2195521,2195553,2195585,2195617,2195649,2195681,2117857,2195713,2195745,2195777,2195809,2195841,2195873,2195905,2195937,2195969]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113]),new Uint32Array([2131586,2132450,2135970,2135778,2161602,2136162,2163650,2161794,2135586,2163714,2137186,2131810,2160290,2135170,2097506,2159554]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,0,0,0,0]),new Uint32Array([2116513,2116609,2116705,2116801,2116897,2116993,2117089,2117185,2117281,2117377,2117473,2117569,2117665,2117761,2117857,2117953]),new Uint32Array([2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100802,2101154,2101282,2101410,2101538,2101666,2101794]),new Uint32Array([2100289,2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2098977,2150241,2150305]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,2109955,6291456,6291456,0,0,0,0]),new Uint32Array([18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,0,0]),new Uint32Array([2130979,2131075,2131075,2131171,2131267,2131363,2131459,2131555,2131651,2131651,2131747,2131843,2131939,2132035,2132131,2132227]),new Uint32Array([0,2177793,6291456,2177825,6291456,2177857,6291456,2177889,6291456,2177921,6291456,2177953,6291456,2177985,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2113345,0,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2136643,2136739,2136835,2136931,2137027,2137123,2137219,2137315,2137411,2137507,2137603,2137699,2137795,2137891,2137987,2138083]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2174433,6291456,2174465,6291456,2174497,6291456,2174529,6291456,2174561,6291456,2174593,6291456,2174625,6291456,2174657,6291456]),new Uint32Array([0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([10496547,10496643,2105505,2149698,6291456,10496739,10496835,2170273,6291456,2149762,2105825,2111713,2111713,2111713,2111713,2168673]),new Uint32Array([6291456,2143490,2143490,2143490,2171649,6291456,2171681,2171713,2171745,6291456,2171777,6291456,2171809,6291456,2171841,6291456]),new Uint32Array([2159106,2159106,2159170,2159170,2159234,2159234,2159298,2159298,2159298,2159362,2159362,2159362,2106401,2106401,2106401,2106401]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137]),new Uint32Array([2108417,2181217,2181249,2181281,2170433,2170401,2181313,2181345,2181377,2181409,2181441,2181473,2181505,2181537,2170529,2181569]),new Uint32Array([2218433,2245761,2245793,2245825,2245857,2245890,2245953,2245986,2209665,2246050,2246113,2246146,2246210,2246274,2246337,2246369]),new Uint32Array([2230754,2230818,2230882,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184129,6291456,2184161,6291456,2184193,6291456,6291456,6291456,6291456,6291456,2146818,2183361,6291456,6291456,2142978,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2135170,2097506,2130691,2130787,2130883,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122]),new Uint32Array([2108515,2108611,2100740,2108707,2108803,2108899,2108995,2109091,2109187,2109283,2109379,2109475,2109571,2109667,2109763,2100738]),new Uint32Array([2102788,2102916,2103044,2120515,2103172,2120611,2120707,2098373,2103300,2120803,2120899,2120995,2103428,2103556,2121091,2121187]),new Uint32Array([2158082,2158146,0,2158210,2158274,0,2158338,2158402,2158466,2129922,2158530,2158594,2158658,2158722,2158786,2158850]),new Uint32Array([10499619,10499715,10499811,10499907,10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059]),new Uint32Array([2239585,2239618,2239681,2239713,0,2191969,2239745,2239777,2192033,2239809,2239841,2239874,2239937,2239970,2240033,2240065]),new Uint32Array([2252705,2252738,2252801,2252833,2252865,2252897,2252930,2252994,2253057,2253089,2253121,2253154,2253217,2253250,2219361,2219361]),new Uint32Array([2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,10538050,10538114,10538178,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2226402,2226466,2226530,2226594,2226658,2226722,2226786,2226850,2226914,2226978,2227042,2227106,2227170,2227234,2227298,2227362]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,2144066,2144130,2144194,2144258,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2124674,2124770,2123875,2123971,2124067,2124163,2124259,2124355,2124451,2124547,2124643,2124739,2124835,2124931,2125027,2125123]),new Uint32Array([2168065,6291456,2168097,6291456,2168129,6291456,2168161,6291456,2168193,6291456,2168225,6291456,2168257,6291456,2168289,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2100610,2100611,6291456,2107842,2107843,6291456,6291456,6291456,6291456,10537922,6291456,10537986,6291456]),new Uint32Array([2174849,2174881,2174913,2174945,2174977,2175009,2175041,2175073,2175105,2175137,2175169,2175201,2175233,2175265,2175297,2175329]),new Uint32Array([2154562,2154626,2154690,2154754,2141858,2154818,2154882,2127298,2154946,2127298,2155010,2155074,2155138,2155202,2155266,2155202]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0]),new Uint32Array([2200641,2150786,2150850,2150914,2150978,2151042,2106562,2151106,2150562,2151170,2151234,2151298,2151362,2151426,2151490,2151554]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456]),new Uint32Array([2220289,2220289,2220321,2220321,2220321,2220321,2220353,2220353,2220353,2220353,2220385,2220385,2220385,2220385,2220417,2220417]),new Uint32Array([2155330,2155394,0,2155458,2155522,2155586,2105732,0,2155650,2155714,2155778,2125314,2155842,2155906,2126274,2155970]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0]),new Uint32Array([2097729,2106017,2106017,2106017,2106017,2131297,2131297,2131297,2131297,2106081,2106081,2162049,2162049,2105953,2105953,2162337]),new Uint32Array([2097185,2097697,2097697,2097697,2097697,2135777,2135777,2135777,2135777,2097377,2097377,2097377,2097377,2097601,2097601,2097217]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([2139331,2139427,2139523,2139043,2133571,2132611,2139619,2139715,0,0,0,0,0,0,0,0]),new Uint32Array([2174113,2174145,2100897,2098177,2108289,2100865,2173601,2173633,2173985,2174113,2174145,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,23068672,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,18923778,23068672,23068672,23068672,23068672,18923842,23068672,23068672,23068672,23068672,18923906,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,0,2133857,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2177537,6291456,2177569,6291456,2177601,6291456,2177633,6291456,2177665,6291456,2177697,6291456,2177729,6291456,2177761,6291456]),new Uint32Array([2212481,2212513,2212545,2212577,2197121,2212609,2212641,2212673,2212705,2212737,2212769,2212801,2212833,2212865,2212897,2212929]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2098241,2108353,2170209,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,6291456,2108193,2172417,2112481,2098177]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456])],t=new Uint16Array([616,616,565,147,161,411,330,2,131,131,328,454,241,408,86,86,696,113,285,350,325,301,473,214,639,232,447,64,369,598,124,672,567,223,621,154,107,86,86,86,86,86,86,505,86,68,634,86,218,218,218,218,486,218,218,513,188,608,216,86,217,463,668,85,700,360,184,86,86,86,647,402,153,10,346,718,662,260,145,298,117,1,443,342,138,54,563,86,240,572,218,70,387,86,118,460,641,602,86,86,306,218,86,692,86,86,86,86,86,162,707,86,458,26,86,218,638,86,86,86,86,86,65,449,86,86,306,183,86,58,391,667,86,157,131,131,131,131,86,433,131,406,31,218,247,86,86,693,218,581,351,86,438,295,69,462,45,126,173,650,14,295,69,97,168,187,641,78,523,390,69,108,287,664,173,219,83,295,69,108,431,426,173,694,412,115,628,52,257,398,641,118,501,121,69,579,151,423,173,620,464,121,69,382,151,476,173,27,53,121,86,594,578,226,173,86,632,130,86,96,228,268,641,622,563,86,86,21,148,650,131,131,321,43,144,343,381,531,131,131,178,20,86,399,156,375,164,541,30,60,715,198,92,118,131,131,86,86,306,407,86,280,457,196,488,358,131,131,244,86,86,143,86,86,86,86,86,667,563,86,86,86,86,86,86,86,86,86,86,86,86,86,336,363,86,86,336,86,86,380,678,67,86,86,86,678,86,86,86,512,86,307,86,708,86,86,86,86,86,528,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,563,307,86,86,86,86,86,104,450,337,86,720,86,32,450,397,86,86,86,587,218,558,708,708,293,708,86,86,86,86,86,694,205,86,8,86,86,86,86,549,86,667,697,697,679,86,458,460,86,86,650,86,708,543,86,86,86,245,86,86,86,140,218,127,708,708,458,197,131,131,131,131,500,86,86,483,251,86,306,510,515,86,722,86,86,86,65,201,86,86,483,580,470,86,86,86,368,131,131,131,694,114,110,555,86,86,123,721,163,142,713,418,86,317,675,209,218,218,218,371,545,592,629,490,603,199,46,320,525,680,310,279,388,111,42,252,593,607,235,617,410,377,50,548,135,356,17,520,189,116,392,600,349,332,482,699,690,535,119,106,451,71,152,667,131,218,218,265,671,637,492,504,533,683,269,269,658,86,86,86,86,86,86,86,86,86,491,619,86,86,6,86,86,86,86,86,86,86,86,86,86,86,229,86,86,86,86,86,86,86,86,86,86,86,86,667,86,86,171,131,118,131,656,206,234,571,89,334,670,246,311,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,534,86,86,86,86,86,86,82,86,86,86,86,86,430,86,86,86,86,86,86,86,86,86,599,86,324,86,470,69,640,264,131,626,101,174,86,86,667,233,105,73,374,394,221,204,84,28,326,86,86,471,86,86,86,109,573,86,171,200,200,200,200,218,218,86,86,86,86,460,131,131,131,86,506,86,86,86,86,86,220,404,34,614,47,442,305,25,612,338,601,648,7,344,255,131,131,51,86,312,507,563,86,86,86,86,588,86,86,86,86,86,530,511,86,458,3,435,384,556,522,230,527,86,118,86,86,717,86,137,273,79,181,484,23,93,112,655,249,417,703,370,87,98,313,684,585,155,465,596,481,695,18,416,428,61,701,706,282,643,495,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,86,86,86,171,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,650,131,422,542,420,263,24,172,86,86,86,86,86,566,86,86,132,540,395,353,494,519,19,485,284,472,131,131,131,16,714,86,211,708,86,86,86,694,698,86,86,483,704,708,218,272,86,86,120,86,159,478,86,307,247,86,86,663,597,459,627,667,86,86,277,455,39,302,86,250,86,86,86,271,99,452,306,281,329,400,200,86,86,362,549,352,646,461,323,586,86,86,4,708,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,717,86,518,86,86,650,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,125,554,480,300,613,72,333,288,561,544,604,48,719,91,169,176,590,224,76,191,29,559,560,231,537,166,477,538,256,437,131,131,469,167,40,0,685,266,441,705,239,642,475,568,640,610,299,673,517,318,385,22,202,180,179,359,424,215,90,66,521,653,467,682,453,409,479,88,131,661,35,303,15,262,666,630,712,131,131,618,659,175,218,195,347,193,227,261,150,165,709,546,294,569,710,270,413,376,524,55,242,38,419,529,170,657,3,304,122,379,278,131,651,86,67,576,458,458,131,131,86,86,86,86,86,86,86,118,309,86,86,547,86,86,86,86,667,650,664,131,131,86,86,56,131,131,131,131,131,131,131,131,86,307,86,86,86,664,238,650,86,86,717,86,118,86,86,315,86,59,86,86,574,549,131,131,340,57,436,86,86,86,86,86,86,458,708,499,691,62,86,650,86,86,694,86,86,86,319,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,86,549,694,131,131,131,131,131,131,131,131,131,77,86,86,139,86,502,86,86,86,667,595,131,131,131,86,12,86,13,86,609,131,131,131,131,86,86,86,625,86,669,86,86,182,129,86,5,694,104,86,86,86,86,131,131,86,86,386,171,86,86,86,345,86,324,86,589,86,213,36,131,131,131,131,131,86,86,86,86,104,131,131,131,141,290,80,677,86,86,86,267,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,515,86,86,33,136,669,86,711,515,86,86,550,640,86,104,708,515,86,159,372,717,86,86,444,515,86,86,663,37,86,563,460,86,390,624,702,131,131,131,131,389,59,708,86,86,341,208,708,635,295,69,108,431,508,100,190,131,131,131,131,131,131,131,131,86,86,86,649,516,660,131,131,86,86,86,218,631,708,131,131,131,131,131,131,131,131,131,131,86,86,341,575,238,514,131,131,86,86,86,218,291,708,307,131,86,86,306,367,708,131,131,131,86,378,697,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,615,253,86,86,86,292,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,104,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,69,86,341,553,549,86,307,86,86,645,275,455,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,708,131,131,131,131,131,131,86,86,86,86,86,86,667,460,86,86,86,86,86,86,86,86,86,86,86,86,717,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,104,86,667,459,131,131,131,131,131,131,86,458,225,86,86,86,516,549,11,390,405,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,460,44,218,197,711,515,131,131,131,131,664,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,118,307,104,286,591,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,681,86,86,75,185,314,582,86,358,496,474,86,104,131,86,86,86,86,146,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,171,86,640,131,131,131,131,131,131,131,131,246,503,689,339,674,81,258,415,439,128,562,366,414,246,503,689,583,222,557,316,636,665,186,355,95,670,246,503,689,339,674,557,258,415,439,186,355,95,670,246,503,689,446,644,536,652,331,532,335,440,274,421,297,570,74,425,364,425,606,552,403,509,134,365,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,218,218,218,498,218,218,577,627,551,497,572,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,553,354,236,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,296,455,131,131,456,243,103,86,41,459,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,9,276,158,716,393,564,383,489,401,654,210,654,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,650,86,86,86,86,86,86,717,667,563,563,563,86,549,102,686,133,246,605,86,448,86,86,207,307,131,131,131,641,86,177,611,445,373,194,584,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,307,171,86,86,86,86,86,86,86,717,86,86,86,86,86,460,131,131,650,86,86,86,694,708,86,86,694,86,458,131,131,131,131,131,131,667,694,289,650,667,131,131,86,640,131,131,664,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,460,86,86,86,86,86,86,86,86,86,86,86,86,86,458,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,466,203,149,429,94,432,160,687,539,63,237,283,192,248,348,259,427,526,396,676,254,468,487,212,327,623,49,633,322,493,434,688,357,361,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]);return{mapStr:"صلى الله عليه وسلمجل جلالهキロメートルrads2エスクードキログラムキロワットグラムトンクルゼイロサンチームパーセントピアストルファラッドブッシェルヘクタールマンションミリバールレントゲン110viii(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)∫∫∫∫(오전)(오후)アパートアルファアンペアイニングエーカーカラットカロリーキュリーギルダークローネサイクルシリングバーレルフィートポイントマイクロミクロンメガトンリットルルーブル株式会社kcalms2ckgاكبرمحمدصلعمرسولریال141234 ̈́ྲཱྀླཱྀ ̈͂ ̓̀ ̓́ ̓͂ ̔̀ ̔́ ̔͂ ̈̀a/ca/sc/oc/utelfax1719132315253545165618385878xii03∮∮∮(1)(2)(3)(4)(5)(6)(7)(8)(9)(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)::====(ᄀ)(ᄂ)(ᄃ)(ᄅ)(ᄆ)(ᄇ)(ᄉ)(ᄋ)(ᄌ)(ᄎ)(ᄏ)(ᄐ)(ᄑ)(ᄒ)(가)(나)(다)(라)(마)(바)(사)(아)(자)(차)(카)(타)(파)(하)(주)(一)(二)(三)(四)(五)(六)(七)(八)(九)(十)(月)(火)(水)(木)(金)(土)(日)(株)(有)(社)(名)(特)(財)(祝)(労)(代)(呼)(学)(監)(企)(資)(協)(祭)(休)(自)(至)pte10月11月12月ergltdアールインチウォンオンスオームカイリガロンガンマギニーケースコルナコーポセンチダースットハイツパーツピクルフランペニヒヘルツペンスページベータボルトポンドホールホーンマイルマッハマルクヤードヤールユアンルピー10点11点12点13点14点15点16点17点18点19点20点21点22点23点24点hpabardm2dm3khzmhzghzthzmm2cm2km2mm3cm3km3kpampagpalogmilmolppmvmam10日11日12日13日14日15日16日17日18日19日20日21日22日23日24日25日26日27日28日29日30日31日galffifflשּׁשּׂ ٌّ ٍّ َّ ُّ ِّ ّٰـَّـُّـِّتجمتحجتحمتخمتمجتمحتمخجمححميحمىسحجسجحسجىسمحسمجسممصححصممشحمشجيشمخشممضحىضخمطمحطممطميعجمعممعمىغممغميغمىفخمقمحقمملحملحيلحىلججلخملمحمحجمحيمجحمجممخممجخهمجهممنحمنحىنجمنجىنمينمىيممبخيتجيتجىتخيتخىتميتمىجميجحىجمىسخىصحيشحيضحيلجيلمييحييجييميمميقمينحيعميكمينجحمخيلجمكممجحيحجيمجيفميبحيسخينجيصلےقلے𝅘𝅥𝅮𝅘𝅥𝅯𝅘𝅥𝅰𝅘𝅥𝅱𝅘𝅥𝅲𝆹𝅥𝅮𝆺𝅥𝅮𝆹𝅥𝅯𝆺𝅥𝅯sppv ̄ ́ ̧ssi̇ijl·ʼndžljnjdz ̆ ̇ ̊ ̨ ̃ ̋ ιեւاٴوٴۇٴيٴक़ख़ग़ज़ड़ढ़फ़य़ড়ঢ়য়ਲ਼ਸ਼ਖ਼ਗ਼ਜ਼ਫ਼ଡ଼ଢ଼ําໍາຫນຫມགྷཌྷདྷབྷཛྷཀྵཱཱིུྲྀླྀྒྷྜྷྡྷྦྷྫྷྐྵaʾιιιιιιιιιιιιιιιιιιιιιιιιιαιάιι ͂ὴιηιήιῆιὼιωιώιῶι ̳!! ̅???!!?rs°c°fnosmtmivix⫝̸ ゙ ゚よりコト333435참고주의363738394042444546474849503月4月5月6月7月8月9月hgevギガデシドルナピコビルペソホンリラレムdaauovpciu平成昭和大正明治naμakakbmbgbpfnfμfμgmgμlmldlklfmnmμmpsnsμsmsnvμvkvpwnwμwmwkwkωmωbqcccddbgyhainkkktlnlxphprsrsvwbstմնմեմիվնմխיִײַשׁשׂאַאָאּבּגּדּהּוּזּטּיּךּכּלּמּנּסּףּפּצּקּרּתּוֹבֿכֿפֿאלئائەئوئۇئۆئۈئېئىئجئحئمئيبجبمبىبيتىتيثجثمثىثيخحضجضمطحظمغجفجفحفىفيقحقىقيكاكجكحكخكلكىكينخنىنيهجهىهييىذٰرٰىٰئرئزئنبزبنترتزتنثرثزثنمانرنزننيريزئخئهبهتهصخنههٰثهسهشهطىطيعىعيغىغيسىسيشىشيصىصيضىضيشخشرسرصرضراً ًـًـّ ْـْلآلألإ𝅗𝅥0,1,2,3,4,5,6,7,8,9,wzhvsdwcmcmddjほかココàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįĵķĺļľłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷÿźżɓƃƅɔƈɖɗƌǝəɛƒɠɣɩɨƙɯɲɵơƣƥʀƨʃƭʈưʊʋƴƶʒƹƽǎǐǒǔǖǘǚǜǟǡǣǥǧǩǫǭǯǵƕƿǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟƞȣȥȧȩȫȭȯȱȳⱥȼƚⱦɂƀʉʌɇɉɋɍɏɦɹɻʁʕͱͳʹͷ;ϳέίόύβγδεζθκλνξοπρστυφχψϊϋϗϙϛϝϟϡϣϥϧϩϫϭϯϸϻͻͼͽѐёђѓєѕіїјљњћќѝўџабвгдежзийклмнопрстуфхцчшщъыьэюяѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯաբգդզէըթժլծկհձղճյշոչպջռստրցփքօֆ་ⴧⴭნᏰᏱᏲᏳᏴᏵꙋɐɑᴂɜᴖᴗᴝᴥɒɕɟɡɥɪᵻʝɭᶅʟɱɰɳɴɸʂƫᴜʐʑḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿἐἑἒἓἔἕἰἱἲἳἴἵἶἷὀὁὂὃὄὅὑὓὕὗᾰᾱὲΐῐῑὶΰῠῡὺῥ`ὸ‐+−∑〈〉ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞⱡɫᵽɽⱨⱪⱬⱳⱶȿɀⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳬⳮⳳⵡ母龟丨丶丿乙亅亠人儿入冂冖冫几凵刀力勹匕匚匸卜卩厂厶又口囗士夂夊夕女子宀寸小尢尸屮山巛工己巾干幺广廴廾弋弓彐彡彳心戈戶手支攴文斗斤方无曰欠止歹殳毋比毛氏气爪父爻爿片牙牛犬玄玉瓜瓦甘生用田疋疒癶白皮皿目矛矢石示禸禾穴立竹米糸缶网羊羽老而耒耳聿肉臣臼舌舛舟艮色艸虍虫血行衣襾見角言谷豆豕豸貝赤走足身車辛辰辵邑酉釆里長門阜隶隹雨靑非面革韋韭音頁風飛食首香馬骨高髟鬥鬯鬲鬼魚鳥鹵鹿麥麻黃黍黑黹黽鼎鼓鼠鼻齊齒龍龜龠.〒卄卅ᄁᆪᆬᆭᄄᆰᆱᆲᆳᆴᆵᄚᄈᄡᄊ짜ᅢᅣᅤᅥᅦᅧᅨᅩᅪᅫᅬᅭᅮᅯᅰᅱᅲᅳᅴᅵᄔᄕᇇᇈᇌᇎᇓᇗᇙᄜᇝᇟᄝᄞᄠᄢᄣᄧᄩᄫᄬᄭᄮᄯᄲᄶᅀᅇᅌᇱᇲᅗᅘᅙᆄᆅᆈᆑᆒᆔᆞᆡ上中下甲丙丁天地問幼箏우秘男適優印注項写左右医宗夜テヌモヨヰヱヲꙁꙃꙅꙉꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝺꝼᵹꝿꞁꞃꞅꞇꞑꞓꞗꞛꞝꞡꞣꞥꞧꞩɬʞʇꭓꞵꞷꬷᎣᎤᎦᎧᎨᎯᎰᎱᎲᎴᎵᎶᎸᎹᎺᎾᎿᏄᏅᏆᏇᏈᏉᏊᏋᏌᏍᏐᏑᏖᏗᏘᏛᏜᏝᏠᏡᏣᏤᏥᏨᏩᏪᏫᏬᏭᏯ豈更賈滑串句契喇奈懶癩羅蘿螺裸邏樂洛烙珞落酪駱亂卵欄爛蘭鸞嵐濫藍襤拉臘蠟廊朗浪狼郎來冷勞擄櫓爐盧蘆虜路露魯鷺碌祿綠菉錄論壟弄籠聾牢磊賂雷壘屢樓淚漏累縷陋勒肋凜凌稜綾菱陵讀拏諾丹寧怒率異北磻便復不泌數索參塞省葉說殺沈拾若掠略亮兩凉梁糧良諒量勵呂廬旅濾礪閭驪麗黎曆歷轢年憐戀撚漣煉璉秊練聯輦蓮連鍊列劣咽烈裂廉念捻殮簾獵令囹嶺怜玲瑩羚聆鈴零靈領例禮醴隸惡了僚寮尿料燎療蓼遼暈阮劉杻柳流溜琉留硫紐類戮陸倫崙淪輪律慄栗隆利吏履易李梨泥理痢罹裏裡離匿溺吝燐璘藺隣鱗麟林淋臨笠粒狀炙識什茶刺切度拓糖宅洞暴輻降廓兀嗀塚晴凞猪益礼神祥福靖精蘒諸逸都飯飼館鶴郞隷侮僧免勉勤卑喝嘆器塀墨層悔慨憎懲敏既暑梅海渚漢煮爫琢碑祉祈祐祖禍禎穀突節縉繁署者臭艹著褐視謁謹賓贈辶難響頻恵𤋮舘並况全侀充冀勇勺啕喙嗢墳奄奔婢嬨廒廙彩徭惘慎愈慠戴揄搜摒敖望杖滛滋瀞瞧爵犯瑱甆画瘝瘟盛直睊着磌窱类絛缾荒華蝹襁覆調請諭變輸遲醙鉶陼韛頋鬒𢡊𢡄𣏕㮝䀘䀹𥉉𥳐𧻓齃龎עםٱٻپڀٺٿٹڤڦڄڃچڇڍڌڎڈژڑکگڳڱںڻۀہھۓڭۋۅۉ、〖〗—_{}【】《》「」『』[]#&*-<>\\$%@ءؤة\"'^|~⦅⦆・ゥャ¢£¬¦¥₩│←↑→↓■○𐐨𐐩𐐪𐐫𐐬𐐭𐐮𐐯𐐰𐐱𐐲𐐳𐐴𐐵𐐶𐐷𐐸𐐹𐐺𐐻𐐼𐐽𐐾𐐿𐑀𐑁𐑂𐑃𐑄𐑅𐑆𐑇𐑈𐑉𐑊𐑋𐑌𐑍𐑎𐑏𐓘𐓙𐓚𐓛𐓜𐓝𐓞𐓟𐓠𐓡𐓢𐓣𐓤𐓥𐓦𐓧𐓨𐓩𐓪𐓫𐓬𐓭𐓮𐓯𐓰𐓱𐓲𐓳𐓴𐓵𐓶𐓷𐓸𐓹𐓺𐓻𐳀𐳁𐳂𐳃𐳄𐳅𐳆𐳇𐳈𐳉𐳊𐳋𐳌𐳍𐳎𐳏𐳐𐳑𐳒𐳓𐳔𐳕𐳖𐳗𐳘𐳙𐳚𐳛𐳜𐳝𐳞𐳟𐳠𐳡𐳢𐳣𐳤𐳥𐳦𐳧𐳨𐳩𐳪𐳫𐳬𐳭𐳮𐳯𐳰𐳱𐳲𑣀𑣁𑣂𑣃𑣄𑣅𑣆𑣇𑣈𑣉𑣊𑣋𑣌𑣍𑣎𑣏𑣐𑣑𑣒𑣓𑣔𑣕𑣖𑣗𑣘𑣙𑣚𑣛𑣜𑣝𑣞𑣟ıȷ∇∂𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃ٮڡٯ字双多解交映無前後再新初終販声吹演投捕遊指禁空合満申割営配得可丽丸乁𠄢你侻倂偺備像㒞𠘺兔兤具𠔜㒹內𠕋冗冤仌冬𩇟刃㓟刻剆剷㔕包匆卉博即卽卿𠨬灰及叟𠭣叫叱吆咞吸呈周咢哶唐啓啣善喫喳嗂圖圗噑噴壮城埴堍型堲報墬𡓤売壷夆夢奢𡚨𡛪姬娛娧姘婦㛮嬈嬾𡧈寃寘寳𡬘寿将㞁屠峀岍𡷤嵃𡷦嵮嵫嵼巡巢㠯巽帨帽幩㡢𢆃㡼庰庳庶𪎒𢌱舁弢㣇𣊸𦇚形彫㣣徚忍志忹悁㤺㤜𢛔惇慈慌慺憲憤憯懞戛扝抱拔捐𢬌挽拼捨掃揤𢯱搢揅掩㨮摩摾撝摷㩬敬𣀊旣書晉㬙㬈㫤冒冕最暜肭䏙朡杞杓𣏃㭉柺枅桒𣑭梎栟椔楂榣槪檨𣚣櫛㰘次𣢧歔㱎歲殟殻𣪍𡴋𣫺汎𣲼沿泍汧洖派浩浸涅𣴞洴港湮㴳滇𣻑淹潮𣽞𣾎濆瀹瀛㶖灊災灷炭𠔥煅𤉣熜爨牐𤘈犀犕𤜵𤠔獺王㺬玥㺸瑇瑜璅瓊㼛甤𤰶甾𤲒𢆟瘐𤾡𤾸𥁄㿼䀈𥃳𥃲𥄙𥄳眞真瞋䁆䂖𥐝硎䃣𥘦𥚚𥛅秫䄯穊穏𥥼𥪧䈂𥮫篆築䈧𥲀糒䊠糨糣紀𥾆絣䌁緇縂繅䌴𦈨𦉇䍙𦋙罺𦌾羕翺𦓚𦔣聠𦖨聰𣍟䏕育脃䐋脾媵𦞧𦞵𣎓𣎜舄辞䑫芑芋芝劳花芳芽苦𦬼茝荣莭茣莽菧荓菊菌菜𦰶𦵫𦳕䔫蓱蓳蔖𧏊蕤𦼬䕝䕡𦾱𧃒䕫虐虧虩蚩蚈蜎蛢蜨蝫螆蟡蠁䗹衠𧙧裗裞䘵裺㒻𧢮𧥦䚾䛇誠𧲨貫賁贛起𧼯𠠄跋趼跰𠣞軔𨗒𨗭邔郱鄑𨜮鄛鈸鋗鋘鉼鏹鐕𨯺開䦕閷𨵷䧦雃嶲霣𩅅𩈚䩮䩶韠𩐊䪲𩒖頩𩖶飢䬳餩馧駂駾䯎𩬰鱀鳽䳎䳭鵧𪃎䳸𪄅𪈎𪊑䵖黾鼅鼏鼖𪘀",mapChar:function(n){return n>=196608?n>=917760&&n<=917999?18874368:0:e[t[n>>4]][15&n]}}},"function"==typeof define&&define.amd?define([],(function(){return i()})):"object"==typeof n?t.exports=i():r.uts46_map=i()},{}],493:[function(e,t,n){var r,i;r=this,i=function(e,t){function n(n,r,i){for(var s=[],o=e.ucs2.decode(n),a=0;a<o.length;a++){var c=o[a],u=e.ucs2.encode([o[a]]),l=t.mapChar(c),d=l>>23,h=l>>21&3,p=l>>5&65535,f=31&l,m=t.mapStr.substr(p,f);if(0===h||r&&1&d)throw new Error("Illegal char "+u);1===h?s.push(m):2===h?s.push(i?m:u):3===h&&s.push(u)}return s.join("").normalize("NFC")}function r(t,r,s){void 0===s&&(s=!1);var o=n(t,s,r).split(".");return(o=o.map((function(t){return t.startsWith("xn--")?i(t=e.decode(t.substring(4)),s,!1):i(t,s,r),t}))).join(".")}function i(e,r,i){if("-"===e[2]&&"-"===e[3])throw new Error("Failed to validate "+e);if(e.startsWith("-")||e.endsWith("-"))throw new Error("Failed to validate "+e);if(e.includes("."))throw new Error("Failed to validate "+e);if(n(e,r,i)!==e)throw new Error("Failed to validate "+e);var s=e.codePointAt(0);if(t.mapChar(s)&2<<23)throw new Error("Label contains illegal character: "+s)}return{toUnicode:function(e,t){return void 0===t&&(t={}),r(e,!1,"useStd3ASCII"in t&&t.useStd3ASCII)},toAscii:function(t,n){void 0===n&&(n={});var i,s=!("transitional"in n)||n.transitional,o="useStd3ASCII"in n&&n.useStd3ASCII,a="verifyDnsLength"in n&&n.verifyDnsLength,c=r(t,s,o).split(".").map(e.toASCII),u=c.join(".");if(a){if(u.length<1||u.length>253)throw new Error("DNS name has wrong length: "+u);for(i=0;i<c.length;i++){var l=c[i];if(l.length<1||l.length>63)throw new Error("DNS label has wrong length: "+l)}}return u}}},"function"==typeof define&&define.amd?define(["punycode","./idna-map"],(function(e,t){return i(e,t)})):"object"==typeof n?t.exports=i(e("punycode"),e("./idna-map")):r.uts46=i(r.punycode,r.idna_map)},{"./idna-map":492,punycode:386}],494:[function(e,t,n){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
n.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,c=(1<<a)-1,u=c>>1,l=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,s=p&(1<<-l)-1,p>>=-l,l+=a;l>0;s=256*s+e[t+d],d+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=256*o+e[t+d],d+=h,l-=8);if(0===s)s=1-u;else{if(s===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),s-=u}return(p?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){var o,a,c,u=8*s-i-1,l=(1<<u)-1,d=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,f=r?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*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(o++,c/=2),o+d>=l?(a=0,o=l):o+d>=1?(a=(t*c-1)*Math.pow(2,i),o+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&a,p+=f,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;e[n+p]=255&o,p+=f,o/=256,u-=8);e[n+p-f]|=128*m}},{}],495:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0});var i="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),s="undefined"!=typeof Map,o="undefined"!=typeof Set,a="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,c=i?Symbol.for("immer-nothing"):((r={})["immer-nothing"]=!0,r),u=i?Symbol.for("immer-draftable"):"__$immer_draftable",l=i?Symbol.for("immer-state"):"__$immer_state",d="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",h={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"};function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=h[e],s=i?"function"==typeof i?i.apply(null,n):i:"unknown error nr: "+e;throw new Error("[Immer] "+s)}function f(e){return!!e&&!!e[l]}function m(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===y}(e)||Array.isArray(e)||!!e[u]||!!(null===(t=e.constructor)||void 0===t?void 0:t[u])||_(e)||T(e))}var y=Object.prototype.constructor.toString();var g="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,b=Object.getOwnPropertyDescriptors||function(e){var t={};return g(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t};function v(e,t,n){void 0===n&&(n=!1),0===w(e)?(n?Object.keys:g)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function w(e){var t=e[l];return t?t.type_>3?t.type_-4:t.type_:Array.isArray(e)?1:_(e)?2:T(e)?3:0}function x(e,t){return 2===w(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function E(e,t){return 2===w(e)?e.get(t):e[t]}function S(e,t,n){var r=w(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function A(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function _(e){return s&&e instanceof Map}function T(e){return o&&e instanceof Set}function k(e){return e.copy_||e.base_}function C(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=b(e);delete t[l];for(var n=g(t),r=0;r<n.length;r++){var i=n[r],s=t[i];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function P(e,t){return void 0===t&&(t=!1),I(e)||f(e)||!m(e)||(w(e)>1&&(e.set=e.add=e.clear=e.delete=O),Object.freeze(e),t&&v(e,(function(e,t){return P(t,!0)}),!0)),e}function O(){p(2)}function I(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}var M,j={};function R(e){var t=j[e];return t||p(18,e),t}function B(e,t){j[e]||(j[e]=t)}function N(){return M||p(0),M}function L(e,t){t&&(R("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function U(e){D(e),e.drafts_.forEach(H),e.drafts_=null}function D(e){e===M&&(M=e.parent_)}function F(e){return M={drafts_:[],parent_:M,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function H(e){var t=e[l];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function $(e,t){t.unfinalizedDrafts_=t.drafts_.length;var n=t.drafts_[0],r=void 0!==e&&e!==n;return t.immer_.useProxies_||R("ES5").willFinalizeES5_(t,e,r),r?(n[l].modified_&&(U(t),p(4)),m(e)&&(e=V(t,e),t.parent_||G(t,e)),t.patches_&&R("Patches").generateReplacementPatches_(n[l].base_,e,t.patches_,t.inversePatches_)):e=V(t,n,[]),U(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==c?e:void 0}function V(e,t,n){if(I(t))return t;var r=t[l];if(!r)return v(t,(function(i,s){return K(e,r,t,i,s,n)}),!0),t;if(r.scope_!==e)return t;if(!r.modified_)return G(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;var i=4===r.type_||5===r.type_?r.copy_=C(r.draft_):r.copy_,s=i,o=!1;3===r.type_&&(s=new Set(i),i.clear(),o=!0),v(s,(function(t,s){return K(e,r,i,t,s,n,o)})),G(e,i,!1),n&&e.patches_&&R("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function K(e,t,n,r,i,s,o){if(i===n&&p(5),f(i)){var a=V(e,i,s&&t&&3!==t.type_&&!x(t.assigned_,r)?s.concat(r):void 0);if(S(n,r,a),!f(a))return;e.canAutoFreeze_=!1}else o&&n.add(i);if(m(i)&&!I(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;V(e,i),t&&t.scope_.parent_||G(e,i)}}function G(e,t,n){void 0===n&&(n=!1),!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&P(t,n)}var z={get:function(e,t){if(t===l)return e;var n=k(e);if(!x(n,t))return function(e,t,n){var r,i=X(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.draft_):void 0}(e,n,t);var r=n[t];return e.finalized_||!m(r)?r:r===q(e.base_,t)?(J(e),e.copy_[t]=Q(e.scope_.immer_,r,e)):r},has:function(e,t){return t in k(e)},ownKeys:function(e){return Reflect.ownKeys(k(e))},set:function(e,t,n){var r=X(k(e),t);if(null==r?void 0:r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){var i=q(k(e),t),s=null==i?void 0:i[l];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(A(n,i)&&(void 0!==n||x(e.base_,t)))return!0;J(e),Y(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:function(e,t){return void 0!==q(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,J(e),Y(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor:function(e,t){var n=k(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){p(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.base_)},setPrototypeOf:function(){p(12)}},W={};function q(e,t){var n=e[l];return(n?k(n):e)[t]}function X(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Y(e){e.modified_||(e.modified_=!0,e.parent_&&Y(e.parent_))}function J(e){e.copy_||(e.copy_=C(e.base_))}v(z,(function(e,t){W[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),W.deleteProperty=function(e,t){return isNaN(parseInt(t))&&p(13),W.set.call(this,e,t,void 0)},W.set=function(e,t,n){return"length"!==t&&isNaN(parseInt(t))&&p(14),z.set.call(this,e[0],t,n,e[0])};var Z=function(){function e(e){var t=this;this.useProxies_=a,this.autoFreeze_=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var s=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return s.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(o))}))}}var o;if("function"!=typeof n&&p(6),void 0!==r&&"function"!=typeof r&&p(7),m(e)){var a=F(t),u=Q(t,e,void 0),l=!0;try{o=n(u),l=!1}finally{l?U(a):D(a)}return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return L(a,r),$(e,a)}),(function(e){throw U(a),e})):(L(a,r),$(o,a))}if(!e||"object"!=typeof e){if(void 0===(o=n(e))&&(o=e),o===c&&(o=void 0),t.autoFreeze_&&P(o,!0),r){var d=[],h=[];R("Patches").generateReplacementPatches_(e,o,d,h),r(d,h)}return o}p(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))};var r,i,s=t.produce(e,n,(function(e,t){r=e,i=t}));return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(e){return[e,r,i]})):[s,r,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){m(e)||p(8),f(e)&&(e=ee(e));var t=F(this),n=Q(this,e,void 0);return n[l].isManual_=!0,D(t),n},t.finishDraft=function(e,t){var n=e&&e[l];n&&n.isManual_||p(9),n.finalized_&&p(10);var r=n.scope_;return L(r,t),$(void 0,r)},t.setAutoFreeze=function(e){this.autoFreeze_=e},t.setUseProxies=function(e){e&&!a&&p(20),this.useProxies_=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=R("Patches").applyPatches_;return f(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}();function Q(e,t,n){var r=_(t)?R("MapSet").proxyMap_(t,n):T(t)?R("MapSet").proxySet_(t,n):e.useProxies_?function(e,t){var n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:N(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=r,s=z;n&&(i=[r],s=W);var o=Proxy.revocable(i,s),a=o.revoke,c=o.proxy;return r.draft_=c,r.revoke_=a,c}(t,n):R("ES5").createES5Proxy_(t,n);return(n?n.scope_:N()).drafts_.push(r),r}function ee(e){return f(e)||p(22,e),te(e)}function te(e){if(!m(e))return e;var t,n=e[l],r=w(e);if(n){if(!n.modified_&&(n.type_<4||!R("ES5").hasChanges_(n)))return n.base_;n.finalized_=!0,t=ne(e,r),n.finalized_=!1}else t=ne(e,r);return v(t,(function(e,r){n&&E(n.base_,e)===r||S(t,e,te(r))})),3===r?new Set(t):t}function ne(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return C(e)}function re(){var e={};function t(t,n){var r=e[t];return r?r.enumerable=n:e[t]=r={configurable:!0,enumerable:n,get:function(){var e=this[l];return o(e),z.get(e,t)},set:function(e){var n=this[l];o(n),z.set(n,t,e)}},r}function n(e){for(var t=e.length-1;t>=0;t--){var n=e[t][l];if(!n.modified_)switch(n.type_){case 5:s(n)&&Y(n);break;case 4:i(n)&&Y(n)}}}function r(e){if(e&&"object"==typeof e){var t=e[l];if(t){var n=t.base_,i=t.draft_,o=t.assigned_,a=t.type_;if(4===a)v(i,(function(e){e!==l&&(void 0!==n[e]||x(n,e)?o[e]||r(i[e]):(o[e]=!0,Y(t)))})),v(n,(function(e){void 0!==i[e]||x(i,e)||(o[e]=!1,Y(t))}));else if(5===a){if(s(t)&&(Y(t),o.length=!0),i.length<n.length)for(var c=i.length;c<n.length;c++)o[c]=!1;else for(var u=n.length;u<i.length;u++)o[u]=!0;for(var d=Math.min(i.length,n.length),h=0;h<d;h++)i.hasOwnProperty(h)||(o[h]=!0),void 0===o[h]&&r(i[h])}}}}function i(e){for(var t=e.base_,n=e.draft_,r=g(n),i=r.length-1;i>=0;i--){var s=r[i];if(s!==l){var o=t[s];if(void 0===o&&!x(t,s))return!0;var a=n[s],c=a&&a[l];if(c?c.base_!==o:!A(a,o))return!0}}var u=!!t[l];return r.length!==g(t).length+(u?0:1)}function s(e){var t=e.draft_;if(t.length!==e.base_.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}function o(e){e.revoked_&&p(3,JSON.stringify(k(e)))}B("ES5",{createES5Proxy_:function(e,n){var r=Array.isArray(e),i=function(e,n){if(e){for(var r=new Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var s=b(n);delete s[l];for(var o=g(s),a=0;a<o.length;a++){var c=o[a];s[c]=t(c,e||!!s[c].enumerable)}return Object.create(Object.getPrototypeOf(n),s)}(r,e),s={type_:r?5:4,scope_:n?n.scope_:N(),modified_:!1,finalized_:!1,assigned_:{},parent_:n,base_:e,draft_:i,copy_:null,revoked_:!1,isManual_:!1};return Object.defineProperty(i,l,{value:s,writable:!0}),i},willFinalizeES5_:function(e,t,i){i?f(t)&&t[l].scope_===e&&n(e.drafts_):(e.patches_&&r(e.drafts_[0]),n(e.drafts_))},hasChanges_:function(e){return 4===e.type_?i(e):s(e)}})}function ie(){var e="replace",t="add",n="remove";function r(e){if(!m(e))return e;if(Array.isArray(e))return e.map(r);if(_(e))return new Map(Array.from(e.entries()).map((function(e){return[e[0],r(e[1])]})));if(T(e))return new Set(Array.from(e).map(r));var t=Object.create(Object.getPrototypeOf(e));for(var n in e)t[n]=r(e[n]);return x(e,u)&&(t[u]=e[u]),t}function i(e){return f(e)?r(e):e}B("Patches",{applyPatches_:function(i,s){return s.forEach((function(s){for(var o=s.path,a=s.op,c=i,u=0;u<o.length-1;u++){var l=w(c),d=o[u];"string"!=typeof d&&"number"!=typeof d&&(d=""+d),0!==l&&1!==l||"__proto__"!==d&&"constructor"!==d||p(24),"function"==typeof c&&"prototype"===d&&p(24),"object"!=typeof(c=E(c,d))&&p(15,o.join("/"))}var h=w(c),f=r(s.value),m=o[o.length-1];switch(a){case e:switch(h){case 2:return c.set(m,f);case 3:p(16);default:return c[m]=f}case t:switch(h){case 1:return"-"===m?c.push(f):c.splice(m,0,f);case 2:return c.set(m,f);case 3:return c.add(f);default:return c[m]=f}case n:switch(h){case 1:return c.splice(m,1);case 2:return c.delete(m);case 3:return c.delete(s.value);default:return delete c[m]}default:p(17,a)}})),i},generatePatches_:function(r,s,o,a){switch(r.type_){case 0:case 4:case 2:return function(r,s,o,a){var c=r.base_,u=r.copy_;v(r.assigned_,(function(r,l){var d=E(c,r),h=E(u,r),p=l?x(c,r)?e:t:n;if(d!==h||p!==e){var f=s.concat(r);o.push(p===n?{op:p,path:f}:{op:p,path:f,value:h}),a.push(p===t?{op:n,path:f}:p===n?{op:t,path:f,value:i(d)}:{op:e,path:f,value:i(d)})}}))}(r,s,o,a);case 5:case 1:return function(n,r,s,o){var a=n.base_,c=n.assigned_,u=n.copy_;if(u.length<a.length){var l=[u,a];a=l[0],u=l[1];var d=[o,s];s=d[0],o=d[1]}for(var h=0;h<a.length;h++)if(c[h]&&u[h]!==a[h]){var p=r.concat([h]);s.push({op:e,path:p,value:i(u[h])}),o.push({op:e,path:p,value:i(a[h])})}for(var f=a.length;f<u.length;f++){var m=r.concat([f]);s.push({op:t,path:m,value:i(u[f])})}a.length<u.length&&o.push({op:e,path:r.concat(["length"]),value:a.length})}(r,s,o,a);case 3:return function(e,r,i,s){var o=e.base_,a=e.copy_,c=0;o.forEach((function(e){if(!a.has(e)){var o=r.concat([c]);i.push({op:n,path:o,value:e}),s.unshift({op:t,path:o,value:e})}c++})),c=0,a.forEach((function(e){if(!o.has(e)){var a=r.concat([c]);i.push({op:t,path:a,value:e}),s.unshift({op:n,path:a,value:e})}c++}))}(r,s,o,a)}},generateReplacementPatches_:function(t,n,r,i){r.push({op:e,path:[],value:n===c?void 0:n}),i.push({op:e,path:[],value:t})}})}function se(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};function t(t,n){function r(){this.constructor=t}e(t,n),t.prototype=(r.prototype=n.prototype,new r)}var n=function(e){function n(e,t){return this[l]={type_:2,parent_:t,scope_:t?t.scope_:N(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:e,draft_:this,isManual_:!1,revoked_:!1},this}t(n,Map);var i=n.prototype;return Object.defineProperty(i,"size",{get:function(){return k(this[l]).size}}),i.has=function(e){return k(this[l]).has(e)},i.set=function(e,t){var n=this[l];return o(n),k(n).has(e)&&k(n).get(e)===t||(r(n),Y(n),n.assigned_.set(e,!0),n.copy_.set(e,t),n.assigned_.set(e,!0)),this},i.delete=function(e){if(!this.has(e))return!1;var t=this[l];return o(t),r(t),Y(t),t.base_.has(e)?t.assigned_.set(e,!1):t.assigned_.delete(e),t.copy_.delete(e),!0},i.clear=function(){var e=this[l];o(e),k(e).size&&(r(e),Y(e),e.assigned_=new Map,v(e.base_,(function(t){e.assigned_.set(t,!1)})),e.copy_.clear())},i.forEach=function(e,t){var n=this;k(this[l]).forEach((function(r,i,s){e.call(t,n.get(i),i,n)}))},i.get=function(e){var t=this[l];o(t);var n=k(t).get(e);if(t.finalized_||!m(n))return n;if(n!==t.base_.get(e))return n;var i=Q(t.scope_.immer_,n,t);return r(t),t.copy_.set(e,i),i},i.keys=function(){return k(this[l]).keys()},i.values=function(){var e,t=this,n=this.keys();return(e={})[d]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},i.entries=function(){var e,t=this,n=this.keys();return(e={})[d]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},i[d]=function(){return this.entries()},n}();function r(e){e.copy_||(e.assigned_=new Map,e.copy_=new Map(e.base_))}var i=function(e){function n(e,t){return this[l]={type_:3,parent_:t,scope_:t?t.scope_:N(),modified_:!1,finalized_:!1,copy_:void 0,base_:e,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1},this}t(n,Set);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return k(this[l]).size}}),r.has=function(e){var t=this[l];return o(t),t.copy_?!!t.copy_.has(e)||!(!t.drafts_.has(e)||!t.copy_.has(t.drafts_.get(e))):t.base_.has(e)},r.add=function(e){var t=this[l];return o(t),this.has(e)||(s(t),Y(t),t.copy_.add(e)),this},r.delete=function(e){if(!this.has(e))return!1;var t=this[l];return o(t),s(t),Y(t),t.copy_.delete(e)||!!t.drafts_.has(e)&&t.copy_.delete(t.drafts_.get(e))},r.clear=function(){var e=this[l];o(e),k(e).size&&(s(e),Y(e),e.copy_.clear())},r.values=function(){var e=this[l];return o(e),s(e),e.copy_.values()},r.entries=function(){var e=this[l];return o(e),s(e),e.copy_.entries()},r.keys=function(){return this.values()},r[d]=function(){return this.values()},r.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},n}();function s(e){e.copy_||(e.copy_=new Set,e.base_.forEach((function(t){if(m(t)){var n=Q(e.scope_.immer_,t,e);e.drafts_.set(t,n),e.copy_.add(n)}else e.copy_.add(t)})))}function o(e){e.revoked_&&p(3,JSON.stringify(k(e)))}B("MapSet",{proxyMap_:function(e,t){return new n(e,t)},proxySet_:function(e,t){return new i(e,t)}})}var oe=new Z,ae=oe.produce,ce=oe.produceWithPatches.bind(oe),ue=oe.setAutoFreeze.bind(oe),le=oe.setUseProxies.bind(oe),de=oe.applyPatches.bind(oe),he=oe.createDraft.bind(oe),pe=oe.finishDraft.bind(oe);n.Immer=Z,n.applyPatches=de,n.castDraft=function(e){return e},n.castImmutable=function(e){return e},n.createDraft=he,n.current=ee,n.default=ae,n.enableAllPlugins=function(){re(),se(),ie()},n.enableES5=re,n.enableMapSet=se,n.enablePatches=ie,n.finishDraft=pe,n.freeze=P,n.immerable=u,n.isDraft=f,n.isDraftable=m,n.nothing=c,n.original=function(e){return f(e)||p(23,e),e[l].base_},n.produce=ae,n.produceWithPatches=ce,n.setAutoFreeze=ue,n.setUseProxies=le},{}],496:[function(e,t,n){function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function i(e){return!!e&&!!e[X]}function s(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===J}(e)||Array.isArray(e)||!!e[q]||!!(null===(t=e.constructor)||void 0===t?void 0:t[q])||h(e)||p(e))}function o(e,t,n){void 0===n&&(n=!1),0===a(e)?(n?Object.keys:Z)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function a(e){var t=e[X];return t?t.t>3?t.t-4:t.t:Array.isArray(e)?1:h(e)?2:p(e)?3:0}function c(e,t){return 2===a(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){return 2===a(e)?e.get(t):e[t]}function l(e,t,n){var r=a(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e){return K&&e instanceof Map}function p(e){return G&&e instanceof Set}function f(e){return e.i||e.u}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Q(e);delete t[X];for(var n=Z(t),r=0;r<n.length;r++){var i=n[r],s=t[i];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function y(e,t){return void 0===t&&(t=!1),b(e)||i(e)||!s(e)||(a(e)>1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&o(e,(function(e,t){return y(t,!0)}),!0)),e}function g(){r(2)}function b(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(e){var t=ee[e];return t||r(18,e),t}function w(e,t){ee[e]||(ee[e]=t)}function x(){return $}function E(e,t){t&&(v("Patches"),e.o=[],e.v=[],e.s=t)}function S(e){A(e),e.p.forEach(T),e.p=null}function A(e){e===$&&($=e.l)}function _(e){return $={p:[],l:$,h:e,_:!0,m:0}}function T(e){var t=e[X];0===t.t||1===t.t?t.j():t.O=!0}function k(e,t){t.m=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.S||v("ES5").P(t,e,i),i?(n[X].g&&(S(t),r(4)),s(e)&&(e=C(t,e),t.l||O(t,e)),t.o&&v("Patches").M(n[X].u,e,t.o,t.v)):e=C(t,n,[]),S(t),t.o&&t.s(t.o,t.v),e!==W?e:void 0}function C(e,t,n){if(b(t))return t;var r=t[X];if(!r)return o(t,(function(i,s){return P(e,r,t,i,s,n)}),!0),t;if(r.A!==e)return t;if(!r.g)return O(e,r.u,!0),r.u;if(!r.R){r.R=!0,r.A.m--;var i=4===r.t||5===r.t?r.i=m(r.k):r.i,s=i,a=!1;3===r.t&&(s=new Set(i),i.clear(),a=!0),o(s,(function(t,s){return P(e,r,i,t,s,n,a)})),O(e,i,!1),n&&e.o&&v("Patches").F(r,n,e.o,e.v)}return r.i}function P(e,t,n,r,o,a,u){if(i(o)){var d=C(e,o,a&&t&&3!==t.t&&!c(t.N,r)?a.concat(r):void 0);if(l(n,r,d),!i(d))return;e._=!1}else u&&n.add(o);if(s(o)&&!b(o)){if(!e.h.D&&e.m<1)return;C(e,o),t&&t.A.l||O(e,o)}}function O(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e._&&y(t,n)}function I(e,t){var n=e[X];return(n?f(n):e)[t]}function M(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function j(e){e.g||(e.g=!0,e.l&&j(e.l))}function R(e){e.i||(e.i=m(e.u))}function B(e,t,n){var r=h(t)?v("MapSet").K(t,n):p(t)?v("MapSet").$(t,n):e.S?function(e,t){var n=Array.isArray(e),r={t:n?1:0,A:t?t.A:x(),g:!1,R:!1,N:{},l:t,u:e,k:null,i:null,j:null,C:!1},i=r,s=te;n&&(i=[r],s=ne);var o=Proxy.revocable(i,s),a=o.revoke,c=o.proxy;return r.k=c,r.j=a,c}(t,n):v("ES5").I(t,n);return(n?n.A:x()).p.push(r),r}function N(e){return i(e)||r(22,e),function e(t){if(!s(t))return t;var n,r=t[X],i=a(t);if(r){if(!r.g&&(r.t<4||!v("ES5").J(r)))return r.u;r.R=!0,n=L(t,i),r.R=!1}else n=L(t,i);return o(n,(function(t,i){r&&u(r.u,t)===i||l(n,t,e(i))})),3===i?new Set(n):n}(e)}function L(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function U(){function e(e,t){var n=s[e];return n?n.enumerable=t:s[e]=n={configurable:!0,enumerable:t,get:function(){return te.get(this[X],e)},set:function(t){te.set(this[X],e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][X];if(!i.g)switch(i.t){case 5:r(i)&&j(i);break;case 4:n(i)&&j(i)}}}function n(e){for(var t=e.u,n=e.k,r=Z(n),i=r.length-1;i>=0;i--){var s=r[i];if(s!==X){var o=t[s];if(void 0===o&&!c(t,s))return!0;var a=n[s],u=a&&a[X];if(u?u.u!==o:!d(a,o))return!0}}var l=!!t[X];return r.length!==Z(t).length+(l?0:1)}function r(e){var t=e.k;if(t.length!==e.u.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var s={};w("ES5",{I:function(t,n){var r=Array.isArray(t),i=function(t,n){if(t){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,e(i,!0));return r}var s=Q(n);delete s[X];for(var o=Z(s),a=0;a<o.length;a++){var c=o[a];s[c]=e(c,t||!!s[c].enumerable)}return Object.create(Object.getPrototypeOf(n),s)}(r,t),s={t:r?5:4,A:n?n.A:x(),g:!1,R:!1,N:{},l:n,u:t,k:i,i:null,O:!1,C:!1};return Object.defineProperty(i,X,{value:s,writable:!0}),i},P:function(e,n,s){s?i(n)&&n[X].A===e&&t(e.p):(e.o&&function e(t){if(t&&"object"==typeof t){var n=t[X];if(n){var i=n.u,s=n.k,a=n.N,u=n.t;if(4===u)o(s,(function(t){t!==X&&(void 0!==i[t]||c(i,t)?a[t]||e(s[t]):(a[t]=!0,j(n)))})),o(i,(function(e){void 0!==s[e]||c(s,e)||(a[e]=!1,j(n))}));else if(5===u){if(r(n)&&(j(n),a.length=!0),s.length<i.length)for(var l=s.length;l<i.length;l++)a[l]=!1;else for(var d=i.length;d<s.length;d++)a[d]=!0;for(var h=Math.min(s.length,i.length),p=0;p<h;p++)s.hasOwnProperty(p)||(a[p]=!0),void 0===a[p]&&e(s[p])}}}}(e.p[0]),t(e.p))},J:function(e){return 4===e.t?n(e):r(e)}})}function D(){function e(t){if(!s(t))return t;if(Array.isArray(t))return t.map(e);if(h(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(p(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return c(t,q)&&(n[q]=t[q]),n}function t(t){return i(t)?e(t):t}var n="add";w("Patches",{W:function(t,i){return i.forEach((function(i){for(var s=i.path,o=i.op,c=t,l=0;l<s.length-1;l++){var d=a(c),h=s[l];"string"!=typeof h&&"number"!=typeof h&&(h=""+h),0!==d&&1!==d||"__proto__"!==h&&"constructor"!==h||r(24),"function"==typeof c&&"prototype"===h&&r(24),"object"!=typeof(c=u(c,h))&&r(15,s.join("/"))}var p=a(c),f=e(i.value),m=s[s.length-1];switch(o){case"replace":switch(p){case 2:return c.set(m,f);case 3:r(16);default:return c[m]=f}case n:switch(p){case 1:return"-"===m?c.push(f):c.splice(m,0,f);case 2:return c.set(m,f);case 3:return c.add(f);default:return c[m]=f}case"remove":switch(p){case 1:return c.splice(m,1);case 2:return c.delete(m);case 3:return c.delete(i.value);default:return delete c[m]}default:r(17,o)}})),t},F:function(e,r,i,s){switch(e.t){case 0:case 4:case 2:return function(e,r,i,s){var a=e.u,l=e.i;o(e.N,(function(e,o){var d=u(a,e),h=u(l,e),p=o?c(a,e)?"replace":n:"remove";if(d!==h||"replace"!==p){var f=r.concat(e);i.push("remove"===p?{op:p,path:f}:{op:p,path:f,value:h}),s.push(p===n?{op:"remove",path:f}:"remove"===p?{op:n,path:f,value:t(d)}:{op:"replace",path:f,value:t(d)})}}))}(e,r,i,s);case 5:case 1:return function(e,r,i,s){var o=e.u,a=e.N,c=e.i;if(c.length<o.length){var u=[c,o];o=u[0],c=u[1];var l=[s,i];i=l[0],s=l[1]}for(var d=0;d<o.length;d++)if(a[d]&&c[d]!==o[d]){var h=r.concat([d]);i.push({op:"replace",path:h,value:t(c[d])}),s.push({op:"replace",path:h,value:t(o[d])})}for(var p=o.length;p<c.length;p++){var f=r.concat([p]);i.push({op:n,path:f,value:t(c[p])})}o.length<c.length&&s.push({op:"replace",path:r.concat(["length"]),value:o.length})}(e,r,i,s);case 3:return function(e,t,r,i){var s=e.u,o=e.i,a=0;s.forEach((function(e){if(!o.has(e)){var s=t.concat([a]);r.push({op:"remove",path:s,value:e}),i.unshift({op:n,path:s,value:e})}a++})),a=0,o.forEach((function(e){if(!s.has(e)){var o=t.concat([a]);r.push({op:n,path:o,value:e}),i.unshift({op:"remove",path:o,value:e})}a++}))}(e,r,i,s)}},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t===W?void 0:t}),r.push({op:"replace",path:[],value:e})}})}function F(){function e(e,t){function n(){this.constructor=e}a(e,t),e.prototype=(n.prototype=t.prototype,new n)}function t(e){e.i||(e.N=new Map,e.i=new Map(e.u))}function n(e){e.i||(e.i=new Set,e.u.forEach((function(t){if(s(t)){var n=B(e.A.h,t,e);e.p.set(t,n),e.i.add(n)}else e.i.add(t)})))}function i(e){e.O&&r(3,JSON.stringify(f(e)))}var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},c=function(){function n(e,t){return this[X]={t:2,l:t,A:t?t.A:x(),g:!1,R:!1,i:void 0,N:void 0,u:e,k:this,C:!1,O:!1},this}e(n,Map);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return f(this[X]).size}}),r.has=function(e){return f(this[X]).has(e)},r.set=function(e,n){var r=this[X];return i(r),f(r).has(e)&&f(r).get(e)===n||(t(r),j(r),r.N.set(e,!0),r.i.set(e,n),r.N.set(e,!0)),this},r.delete=function(e){if(!this.has(e))return!1;var n=this[X];return i(n),t(n),j(n),n.u.has(e)?n.N.set(e,!1):n.N.delete(e),n.i.delete(e),!0},r.clear=function(){var e=this[X];i(e),f(e).size&&(t(e),j(e),e.N=new Map,o(e.u,(function(t){e.N.set(t,!1)})),e.i.clear())},r.forEach=function(e,t){var n=this;f(this[X]).forEach((function(r,i){e.call(t,n.get(i),i,n)}))},r.get=function(e){var n=this[X];i(n);var r=f(n).get(e);if(n.R||!s(r))return r;if(r!==n.u.get(e))return r;var o=B(n.A.h,r,n);return t(n),n.i.set(e,o),o},r.keys=function(){return f(this[X]).keys()},r.values=function(){var e,t=this,n=this.keys();return(e={})[Y]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},r.entries=function(){var e,t=this,n=this.keys();return(e={})[Y]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},r[Y]=function(){return this.entries()},n}(),u=function(){function t(e,t){return this[X]={t:3,l:t,A:t?t.A:x(),g:!1,R:!1,i:void 0,u:e,k:this,p:new Map,O:!1,C:!1},this}e(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return f(this[X]).size}}),r.has=function(e){var t=this[X];return i(t),t.i?!!t.i.has(e)||!(!t.p.has(e)||!t.i.has(t.p.get(e))):t.u.has(e)},r.add=function(e){var t=this[X];return i(t),this.has(e)||(n(t),j(t),t.i.add(e)),this},r.delete=function(e){if(!this.has(e))return!1;var t=this[X];return i(t),n(t),j(t),t.i.delete(e)||!!t.p.has(e)&&t.i.delete(t.p.get(e))},r.clear=function(){var e=this[X];i(e),f(e).size&&(n(e),j(e),e.i.clear())},r.values=function(){var e=this[X];return i(e),n(e),e.i.values()},r.entries=function(){var e=this[X];return i(e),n(e),e.i.entries()},r.keys=function(){return this.values()},r[Y]=function(){return this.values()},r.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},t}();w("MapSet",{K:function(e,t){return new c(e,t)},$:function(e,t){return new u(e,t)}})}var H;Object.defineProperty(n,"__esModule",{value:!0});var $,V="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),K="undefined"!=typeof Map,G="undefined"!=typeof Set,z="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,W=V?Symbol.for("immer-nothing"):((H={})["immer-nothing"]=!0,H),q=V?Symbol.for("immer-draftable"):"__$immer_draftable",X=V?Symbol.for("immer-state"):"__$immer_state",Y="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",J=""+Object.prototype.constructor,Z="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Q=Object.getOwnPropertyDescriptors||function(e){var t={};return Z(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},ee={},te={get:function(e,t){if(t===X)return e;var n=f(e);if(!c(n,t))return function(e,t,n){var r,i=M(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.R||!s(r)?r:r===I(e.u,t)?(R(e),e.i[t]=B(e.A.h,r,e)):r},has:function(e,t){return t in f(e)},ownKeys:function(e){return Reflect.ownKeys(f(e))},set:function(e,t,n){var r=M(f(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.g){var i=I(f(e),t),s=null==i?void 0:i[X];if(s&&s.u===n)return e.i[t]=n,e.N[t]=!1,!0;if(d(n,i)&&(void 0!==n||c(e.u,t)))return!0;R(e),j(e)}return e.i[t]===n&&(void 0!==n||t in e.i)||Number.isNaN(n)&&Number.isNaN(e.i[t])||(e.i[t]=n,e.N[t]=!0),!0},deleteProperty:function(e,t){return void 0!==I(e.u,t)||t in e.u?(e.N[t]=!1,R(e),j(e)):delete e.N[t],e.i&&delete e.i[t],!0},getOwnPropertyDescriptor:function(e,t){var n=f(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.t||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.u)},setPrototypeOf:function(){r(12)}},ne={};o(te,(function(e,t){ne[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),ne.deleteProperty=function(e,t){return ne.set.call(this,e,t,void 0)},ne.set=function(e,t,n){return te.set.call(this,e[0],t,n,e[0])};var re=function(){function e(e){var t=this;this.S=z,this.D=!0,this.produce=function(e,n,i){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,i=Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return a.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(i))}))}}var c;if("function"!=typeof n&&r(6),void 0!==i&&"function"!=typeof i&&r(7),s(e)){var u=_(t),l=B(t,e,void 0),d=!0;try{c=n(l),d=!1}finally{d?S(u):A(u)}return"undefined"!=typeof Promise&&c instanceof Promise?c.then((function(e){return E(u,i),k(e,u)}),(function(e){throw S(u),e})):(E(u,i),k(c,u))}if(!e||"object"!=typeof e){if(void 0===(c=n(e))&&(c=e),c===W&&(c=void 0),t.D&&y(c,!0),i){var h=[],p=[];v("Patches").M(e,c,h,p),i(h,p)}return c}r(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))};var r,i,s=t.produce(e,n,(function(e,t){r=e,i=t}));return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(e){return[e,r,i]})):[s,r,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){s(e)||r(8),i(e)&&(e=N(e));var t=_(this),n=B(this,e,void 0);return n[X].C=!0,A(t),n},t.finishDraft=function(e,t){var n=(e&&e[X]).A;return E(n,t),k(void 0,n)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!z&&r(20),this.S=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var s=v("Patches").W;return i(e)?s(e,t):this.produce(e,(function(e){return s(e,t)}))},e}(),ie=new re,se=ie.produce,oe=ie.produceWithPatches.bind(ie),ae=ie.setAutoFreeze.bind(ie),ce=ie.setUseProxies.bind(ie),ue=ie.applyPatches.bind(ie),le=ie.createDraft.bind(ie),de=ie.finishDraft.bind(ie);n.Immer=re,n.applyPatches=ue,n.castDraft=function(e){return e},n.castImmutable=function(e){return e},n.createDraft=le,n.current=N,n.default=se,n.enableAllPlugins=function(){U(),F(),D()},n.enableES5=U,n.enableMapSet=F,n.enablePatches=D,n.finishDraft=de,n.freeze=y,n.immerable=q,n.isDraft=i,n.isDraftable=s,n.nothing=W,n.original=function(e){return i(e)||r(23,e),e[X].u},n.produce=se,n.produceWithPatches=oe,n.setAutoFreeze=ae,n.setUseProxies=ce},{}],497:[function(e,t,n){"use strict";t.exports=e("./immer.cjs.production.min.js")},{"./immer.cjs.development.js":495,"./immer.cjs.production.min.js":496}],498:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],499:[function(e,t,n){t.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},{}],500:[function(e,t,n){(function(e,n){(function(){
/**
* [js-sha3]{@link https://github.com/emn178/js-sha3}
*
* @version 0.9.3
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2015-2023
* @license MIT
*/
!function(){"use strict";var r="input is invalid type",i="object"==typeof window,s=i?window:{};s.JS_SHA3_NO_WINDOW&&(i=!1);var o=!i&&"object"==typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"==typeof e&&e.versions&&e.versions.node?s=n:o&&(s=self);for(var a=!s.JS_SHA3_NO_COMMON_JS&&"object"==typeof t&&t.exports,c="function"==typeof define&&define.amd,u=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),d=[4,1024,262144,67108864],h=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],f=[224,256,384,512],m=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],g={128:168,256:136},b=s.JS_SHA3_NO_NODE_JS||!Array.isArray?function(e){return"[object Array]"===Object.prototype.toString.call(e)}:Array.isArray,v=!u||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView?ArrayBuffer.isView:function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer},w=function(e){var t=typeof e;if("string"===t)return[e,!0];if("object"!==t||null===e)throw new Error(r);if(u&&e.constructor===ArrayBuffer)return[new Uint8Array(e),!1];if(!b(e)&&!v(e))throw new Error(r);return[e,!1]},x=function(e){return 0===w(e)[0].length},E=function(e){for(var t=[],n=0;n<e.length;++n)t[n]=e[n];return t},S=function(e,t,n){return function(r){return new U(e,t,e).update(r)[n]()}},A=function(e,t,n){return function(r,i){return new U(e,t,i).update(r)[n]()}},_=function(e,t,n){return function(t,r,i,s){return O["cshake"+e].update(t,r,i,s)[n]()}},T=function(e,t,n){return function(t,r,i,s){return O["kmac"+e].update(t,r,i,s)[n]()}},k=function(e,t,n,r){for(var i=0;i<y.length;++i){var s=y[i];e[s]=t(n,r,s)}return e},C=function(e,t){var n=S(e,t,"hex");return n.create=function(){return new U(e,t,e)},n.update=function(e){return n.create().update(e)},k(n,S,e,t)},P=[{name:"keccak",padding:[1,256,65536,16777216],bits:f,createMethod:C},{name:"sha3",padding:[6,1536,393216,100663296],bits:f,createMethod:C},{name:"shake",padding:[31,7936,2031616,520093696],bits:m,createMethod:function(e,t){var n=A(e,t,"hex");return n.create=function(n){return new U(e,t,n)},n.update=function(e,t){return n.create(t).update(e)},k(n,A,e,t)}},{name:"cshake",padding:d,bits:m,createMethod:function(e,t){var n=g[e],r=_(e,0,"hex");return r.create=function(r,i,s){return x(i)&&x(s)?O["shake"+e].create(r):new U(e,t,r).bytepad([i,s],n)},r.update=function(e,t,n,i){return r.create(t,n,i).update(e)},k(r,_,e,t)}},{name:"kmac",padding:d,bits:m,createMethod:function(e,t){var n=g[e],r=T(e,0,"hex");return r.create=function(r,i,s){return new D(e,t,i).bytepad(["KMAC",s],n).bytepad([r],n)},r.update=function(e,t,n,i){return r.create(e,n,i).update(t)},k(r,T,e,t)}}],O={},I=[],M=0;M<P.length;++M)for(var j=P[M],R=j.bits,B=0;B<R.length;++B){var N=j.name+"_"+R[B];if(I.push(N),O[N]=j.createMethod(R[B],j.padding),"sha3"!==j.name){var L=j.name+R[B];I.push(L),O[L]=O[N]}}function U(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}function D(e,t,n){U.call(this,e,t,n)}U.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t=w(e);e=t[0];for(var n,r,i=t[1],s=this.blocks,o=this.byteCount,a=e.length,c=this.blockCount,u=0,l=this.s;u<a;){if(this.reset)for(this.reset=!1,s[0]=this.block,n=1;n<c+1;++n)s[n]=0;if(i)for(n=this.start;u<a&&n<o;++u)(r=e.charCodeAt(u))<128?s[n>>2]|=r<<h[3&n++]:r<2048?(s[n>>2]|=(192|r>>6)<<h[3&n++],s[n>>2]|=(128|63&r)<<h[3&n++]):r<55296||r>=57344?(s[n>>2]|=(224|r>>12)<<h[3&n++],s[n>>2]|=(128|r>>6&63)<<h[3&n++],s[n>>2]|=(128|63&r)<<h[3&n++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++u)),s[n>>2]|=(240|r>>18)<<h[3&n++],s[n>>2]|=(128|r>>12&63)<<h[3&n++],s[n>>2]|=(128|r>>6&63)<<h[3&n++],s[n>>2]|=(128|63&r)<<h[3&n++]);else for(n=this.start;u<a&&n<o;++u)s[n>>2]|=e[u]<<h[3&n++];if(this.lastByteIndex=n,n>=o){for(this.start=n-o,this.block=s[c],n=0;n<c;++n)l[n]^=s[n];F(l),this.reset=!0}else this.start=n}return this},U.prototype.encode=function(e,t){var n=255&e,r=1,i=[n];for(n=255&(e>>=8);n>0;)i.unshift(n),n=255&(e>>=8),++r;return t?i.push(r):i.unshift(r),this.update(i),i.length},U.prototype.encodeString=function(e){var t=w(e);e=t[0];var n=t[1],r=0,i=e.length;if(n)for(var s=0;s<e.length;++s){var o=e.charCodeAt(s);o<128?r+=1:o<2048?r+=2:o<55296||o>=57344?r+=3:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++s)),r+=4)}else r=i;return r+=this.encode(8*r),this.update(e),r},U.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r<e.length;++r)n+=this.encodeString(e[r]);var i=(t-n%t)%t,s=[];return s.length=i,this.update(s),this},U.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];F(r)}},U.prototype.toString=U.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,s=0,o=0,a="";o<r;){for(s=0;s<t&&o<r;++s,++o)e=n[s],a+=l[e>>4&15]+l[15&e]+l[e>>12&15]+l[e>>8&15]+l[e>>20&15]+l[e>>16&15]+l[e>>28&15]+l[e>>24&15];o%t==0&&(n=E(n),F(n),s=0)}return i&&(e=n[s],a+=l[e>>4&15]+l[15&e],i>1&&(a+=l[e>>12&15]+l[e>>8&15]),i>2&&(a+=l[e>>20&15]+l[e>>16&15])),a},U.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,s=0,o=0,a=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(a);for(var c=new Uint32Array(e);o<r;){for(s=0;s<t&&o<r;++s,++o)c[o]=n[s];o%t==0&&(n=E(n),F(n))}return i&&(c[o]=n[s],e=e.slice(0,a)),e},U.prototype.buffer=U.prototype.arrayBuffer,U.prototype.digest=U.prototype.array=function(){this.finalize();for(var e,t,n=this.blockCount,r=this.s,i=this.outputBlocks,s=this.extraBytes,o=0,a=0,c=[];a<i;){for(o=0;o<n&&a<i;++o,++a)e=a<<2,t=r[o],c[e]=255&t,c[e+1]=t>>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;a%n==0&&(r=E(r),F(r))}return s&&(e=a<<2,t=r[o],c[e]=255&t,s>1&&(c[e+1]=t>>8&255),s>2&&(c[e+2]=t>>16&255)),c},D.prototype=new U,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),U.prototype.finalize.call(this)};var F=function(e){var t,n,r,i,s,o,a,c,u,l,d,h,f,m,y,g,b,v,w,x,E,S,A,_,T,k,C,P,O,I,M,j,R,B,N,L,U,D,F,H,$,V,K,G,z,W,q,X,Y,J,Z,Q,ee,te,ne,re,ie,se,oe,ae,ce,ue,le;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],s=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|a>>>31),n=(f=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|o>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(c<<1|u>>>31),n=s^(u<<1|c>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=o^(l<<1|d>>>31),n=a^(d<<1|l>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=c^(h<<1|f>>>31),n=u^(f<<1|h>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=l^(i<<1|s>>>31),n=d^(s<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,m=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,q=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,B=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,I=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,j=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,_=e[6]<<28|e[7]>>>4,T=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,x=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,z=e[9]<<27|e[8]>>>5,k=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,se=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,$=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=m^~g&v,e[1]=y^~b&w,e[10]=_^~k&P,e[11]=T^~C&O,e[20]=B^~L&D,e[21]=N^~U&F,e[30]=G^~W&X,e[31]=z^~q&Y,e[40]=te^~re&se,e[41]=ne^~ie&oe,e[2]=g^~v&x,e[3]=b^~w&E,e[12]=k^~P&I,e[13]=C^~O&M,e[22]=L^~D&H,e[23]=U^~F&$,e[32]=W^~X&J,e[33]=q^~Y&Z,e[42]=re^~se&ae,e[43]=ie^~oe&ce,e[4]=v^~x&S,e[5]=w^~E&A,e[14]=P^~I&j,e[15]=O^~M&R,e[24]=D^~H&V,e[25]=F^~$&K,e[34]=X^~J&Q,e[35]=Y^~Z&ee,e[44]=se^~ae&ue,e[45]=oe^~ce&le,e[6]=x^~S&m,e[7]=E^~A&y,e[16]=I^~j&_,e[17]=M^~R&T,e[26]=H^~V&B,e[27]=$^~K&N,e[36]=J^~Q&G,e[37]=Z^~ee&z,e[46]=ae^~ue&te,e[47]=ce^~le&ne,e[8]=S^~m&g,e[9]=A^~y&b,e[18]=j^~_&k,e[19]=R^~T&C,e[28]=V^~B&L,e[29]=K^~N&U,e[38]=Q^~G&W,e[39]=ee^~z&q,e[48]=ue^~te&re,e[49]=le^~ne&ie,e[0]^=p[r],e[1]^=p[r+1]};if(a)t.exports=O;else{for(M=0;M<I.length;++M)s[I[M]]=O[I[M]];c&&define((function(){return O}))}}()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:510}],501:[function(e,t,n){!function(e,n){"use strict";"function"==typeof define&&define.amd?define(n):"object"==typeof t&&t.exports?t.exports=n():e.log=n()}(this,(function(){"use strict";var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},s=null;function o(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(){for(var n=this.getLevel(),i=0;i<r.length;i++){var s=r[i];this[s]=i<n?e:this.methodFactory(s,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return"No console available for logging"}function u(e){return function(){typeof console!==t&&(c.call(this),this[e].apply(this,arguments))}}function l(r,i,s){return function(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&n?a:void 0!==console[r]?o(console,r):void 0!==console.log?o(console,"log"):e)}(r)||u.apply(this,arguments)}function d(e,n){var o,a,u,d=this,h="loglevel";function p(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(h),i=n.indexOf(r+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}}function f(e){var t=e;if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=d.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=n||l,d.getLevel=function(){return null!=u?u:null!=a?a:o},d.setLevel=function(e,n){return u=f(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+n+";"}catch(e){}}}(u),c.call(d)},d.setDefaultLevel=function(e){a=f(e),p()||d.setLevel(e,!1)},d.resetLevel=function(){u=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),c.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(s!==d&&(o=f(s.getLevel())),c.call(d),s===d)for(var e in i)i[e].rebuild()},o=f(s?s.getLevel():"WARN");var m=p();null!=m&&(u=f(m)),c.call(d)}(s=new d).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new d(e,s.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return s.noConflict=function(){return typeof window!==t&&window.log===s&&(window.log=h),s},s.getLoggers=function(){return i},s.default=s,s}))},{}],502:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(i=r.key,s=void 0,"symbol"==typeof(s=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"))?s:String(s)),r)}var i,s}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function u(e,t,n){return u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&c(i,n.prototype),i},u.apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)},l(e)}function d(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(n,"__esModule",{value:!0});var f=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(l(Error)),m=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return o(t,e),t}(f),y=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return o(t,e),t}(f),g=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return o(t,e),t}(f),b=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(f),v=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return o(t,e),t}(f),w=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(f),x=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return o(t,e),t}(f),E="numeric",S="short",A="long",_={year:E,month:E,day:E},T={year:E,month:S,day:E},k={year:E,month:S,day:E,weekday:S},C={year:E,month:A,day:E},P={year:E,month:A,day:E,weekday:A},O={hour:E,minute:E},I={hour:E,minute:E,second:E},M={hour:E,minute:E,second:E,timeZoneName:S},j={hour:E,minute:E,second:E,timeZoneName:A},R={hour:E,minute:E,hourCycle:"h23"},B={hour:E,minute:E,second:E,hourCycle:"h23"},N={hour:E,minute:E,second:E,hourCycle:"h23",timeZoneName:S},L={hour:E,minute:E,second:E,hourCycle:"h23",timeZoneName:A},U={year:E,month:E,day:E,hour:E,minute:E},D={year:E,month:E,day:E,hour:E,minute:E,second:E},F={year:E,month:S,day:E,hour:E,minute:E},H={year:E,month:S,day:E,hour:E,minute:E,second:E},$={year:E,month:S,day:E,weekday:S,hour:E,minute:E},V={year:E,month:A,day:E,hour:E,minute:E,timeZoneName:S},K={year:E,month:A,day:E,hour:E,minute:E,second:E,timeZoneName:S},G={year:E,month:A,day:E,weekday:A,hour:E,minute:E,timeZoneName:A},z={year:E,month:A,day:E,weekday:A,hour:E,minute:E,second:E,timeZoneName:A},W=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new x},t.formatOffset=function(e,t){throw new x},t.offset=function(e){throw new x},t.equals=function(e){throw new x},i(e,[{key:"type",get:function(){throw new x}},{key:"name",get:function(){throw new x}},{key:"ianaName",get:function(){return this.name}},{key:"isUniversal",get:function(){throw new x}},{key:"isValid",get:function(){throw new x}}]),e}(),q=null,X=function(e){function t(){return e.apply(this,arguments)||this}o(t,e);var n=t.prototype;return n.offsetName=function(e,t){return mt(e,t.format,t.locale)},n.formatOffset=function(e,t){return vt(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"system"===e.type},i(t,[{key:"type",get:function(){return"system"}},{key:"name",get:function(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===q&&(q=new t),q}}]),t}(W),Y={};var J={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};var Z={},Q=function(e){function t(n){var r;return(r=e.call(this)||this).zoneName=n,r.valid=t.isValidZone(n),r}o(t,e),t.create=function(e){return Z[e]||(Z[e]=new t(e)),Z[e]},t.resetCache=function(){Z={},Y={}},t.isValidSpecifier=function(e){return this.isValidZone(e)},t.isValidZone=function(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}};var n=t.prototype;return n.offsetName=function(e,t){return mt(e,t.format,t.locale,this.name)},n.formatOffset=function(e,t){return vt(this.offset(e),t)},n.offset=function(e){var t=new Date(e);if(isNaN(t))return NaN;var n,r=(n=this.name,Y[n]||(Y[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"})),Y[n]),i=r.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var s=n[i],o=s.type,a=s.value,c=J[o];"era"===o?r[c]=a:qe(c)||(r[c]=parseInt(a,10))}return r}(r,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),i=r[1],s=r[2];return[r[3],i,s,r[4],r[5],r[6],r[7]]}(r,t),s=i[0],o=i[1],a=i[2],c=i[3],u=i[4],l=i[5],d=i[6];"BC"===c&&(s=1-Math.abs(s));var h=+t,p=h%1e3;return(dt({year:s,month:o,day:a,hour:24===u?0:u,minute:l,second:d,millisecond:0})-(h-=p>=0?p:1e3+p))/6e4},n.equals=function(e){return"iana"===e.type&&e.name===this.name},i(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(W),ee=["base"],te=["padTo","floor"],ne={};var re={};function ie(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=re[n];return r||(r=new Intl.DateTimeFormat(e,t),re[n]=r),r}var se={};var oe={};var ae=null;var ce={};function ue(e,t,n,r){var i=e.listingMode();return"error"===i?null:"en"===i?n(t):r(t)}var le=function(){function e(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,n.padTo,n.floor;var r=d(n,te);if(!t||Object.keys(r).length>0){var i=s({useGrouping:!1},n);n.padTo>0&&(i.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=se[n];return r||(r=new Intl.NumberFormat(e,t),se[n]=r),r}(e,i)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return rt(this.floor?Math.floor(e):at(e,3),this.padTo)},e}(),de=function(){function e(e,t,n){this.opts=n,this.originalZone=void 0;var r=void 0;if(this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){var i=e.offset/60*-1,o=i>=0?"Etc/GMT+"+i:"Etc/GMT"+i;0!==e.offset&&Q.create(o).valid?(r=o,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);var a=s({},this.opts);a.timeZone=a.timeZone||r,this.dtf=ie(t,a)}var t=e.prototype;return t.format=function(){return this.originalZone?this.formatToParts().map((function(e){return e.value})).join(""):this.dtf.format(this.dt.toJSDate())},t.formatToParts=function(){var e=this,t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map((function(t){return"timeZoneName"===t.type?s({},t,{value:e.originalZone.offsetName(e.dt.ts,{locale:e.dt.locale,format:e.opts.timeZoneName})}):t})):t},t.resolvedOptions=function(){return this.dtf.resolvedOptions()},e}(),he=function(){function e(e,t,n){this.opts=s({style:"long"},n),!t&&Je()&&(this.rtf=function(e,t){void 0===t&&(t={});var n=t;n.base;var r=d(n,ee),i=JSON.stringify([e,r]),s=oe[i];return s||(s=new Intl.RelativeTimeFormat(e,t),oe[i]=s),s}(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,r){void 0===n&&(n="always");void 0===r&&(r=!1);var 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"===n&&s){var o="days"===e;switch(t){case 1:return o?"tomorrow":"next "+i[e][0];case-1:return o?"yesterday":"last "+i[e][0];case 0:return o?"today":"this "+i[e][0]}}var a=Object.is(t,-0)||t<0,c=Math.abs(t),u=1===c,l=i[e],d=r?u?l[1]:l[2]||l[1]:u?i[e][0]:e;return a?c+" "+d+" ago":"in "+c+" "+d}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),pe={firstDay:1,minimalDays:4,weekend:[6,7]},fe=function(){function e(e,t,n,r,i){var s=function(e){var t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));var n,r,i=e.indexOf("-u-");if(-1===i)return[e];try{n=ie(e).resolvedOptions(),r=e}catch(t){var s=e.substring(0,i);n=ie(s).resolvedOptions(),r=s}var o=n;return[r,o.numberingSystem,o.calendar]}(e),o=s[0],a=s[1],c=s[2];this.locale=o,this.numberingSystem=t||a||null,this.outputCalendar=n||c||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+="-ca-"+n),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=i,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)},e.create=function(t,n,r,i,s){void 0===s&&(s=!1);var o=t||Me.defaultLocale;return new e(o||(s?"en-US":ae||(ae=(new Intl.DateTimeFormat).resolvedOptions().locale)),n||Me.defaultNumberingSystem,r||Me.defaultOutputCalendar,tt(i)||Me.defaultWeekSettings,o)},e.resetCache=function(){ae=null,re={},se={},oe={}},e.fromObject=function(t){var n=void 0===t?{}:t,r=n.locale,i=n.numberingSystem,s=n.outputCalendar,o=n.weekSettings;return e.create(r,i,s,o)};var t=e.prototype;return t.listingMode=function(){var e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,tt(t.weekSettings)||this.weekSettings,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(s({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(s({},e,{defaultToEN:!1}))},t.months=function(e,t){var n=this;return void 0===t&&(t=!1),ue(this,e,At,(function(){var r=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return n.monthsCache[i][e]||(n.monthsCache[i][e]=function(e){for(var t=[],n=1;n<=12;n++){var r=Pr.utc(2009,n,1);t.push(e(r))}return t}((function(e){return n.extract(e,r,"month")}))),n.monthsCache[i][e]}))},t.weekdays=function(e,t){var n=this;return void 0===t&&(t=!1),ue(this,e,Ct,(function(){var r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return n.weekdaysCache[i][e]||(n.weekdaysCache[i][e]=function(e){for(var t=[],n=1;n<=7;n++){var r=Pr.utc(2016,11,13+n);t.push(e(r))}return t}((function(e){return n.extract(e,r,"weekday")}))),n.weekdaysCache[i][e]}))},t.meridiems=function(){var e=this;return ue(this,void 0,(function(){return Pt}),(function(){if(!e.meridiemCache){var t={hour:"numeric",hourCycle:"h12"};e.meridiemCache=[Pr.utc(2016,11,13,9),Pr.utc(2016,11,13,19)].map((function(n){return e.extract(n,t,"dayperiod")}))}return e.meridiemCache}))},t.eras=function(e){var t=this;return ue(this,e,jt,(function(){var n={era:e};return t.eraCache[e]||(t.eraCache[e]=[Pr.utc(-40,1,1),Pr.utc(2017,1,1)].map((function(e){return t.extract(e,n,"era")}))),t.eraCache[e]}))},t.extract=function(e,t,n){var r=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===n}));return r?r.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new le(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new de(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new he(this.intl,this.isEnglish(),e)},t.listFormatter=function(e){return void 0===e&&(e={}),function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=ne[n];return r||(r=new Intl.ListFormat(e,t),ne[n]=r),r}(this.intl,e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.getWeekSettings=function(){return this.weekSettings?this.weekSettings:Ze()?function(e){var t=ce[e];if(!t){var n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,ce[e]=t}return t}(this.locale):pe},t.getStartOfWeek=function(){return this.getWeekSettings().firstDay},t.getMinDaysInFirstWeek=function(){return this.getWeekSettings().minimalDays},t.getWeekendDays=function(){return this.getWeekSettings().weekend},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},t.toString=function(){return"Locale("+this.locale+", "+this.numberingSystem+", "+this.outputCalendar+")"},i(e,[{key:"fastNumbers",get:function(){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}}]),e}(),me=null,ye=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}o(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(yt(n[1],n[2]))}return null};var n=t.prototype;return n.offsetName=function(){return this.name},n.formatOffset=function(e,t){return vt(this.fixed,t)},n.offset=function(){return this.fixed},n.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},i(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+vt(this.fixed,"narrow")}},{key:"ianaName",get:function(){return 0===this.fixed?"Etc/UTC":"Etc/GMT"+vt(-this.fixed,"narrow")}},{key:"isUniversal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}],[{key:"utcInstance",get:function(){return null===me&&(me=new t(0)),me}}]),t}(W),ge=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}o(t,e);var n=t.prototype;return n.offsetName=function(){return null},n.formatOffset=function(){return""},n.offset=function(){return NaN},n.equals=function(){return!1},i(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(W);function be(e,t){if(qe(e)||null===e)return t;if(e instanceof W)return e;if("string"==typeof e){var n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?X.instance:"utc"===n||"gmt"===n?ye.utcInstance:ye.parseSpecifier(n)||Q.create(e)}return Xe(e)?ye.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ge(e)}var ve={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[-৯]",deva:"[-९]",fullwide:"[-]",gujr:"[-૯]",hanidec:"[|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[-೯]",laoo:"[-໙]",limb:"[᥆-᥏]",mlym:"[-൯]",mong:"[᠐-᠙]",mymr:"[-၉]",orya:"[-୯]",tamldec:"[-௯]",telu:"[-౯]",thai:"[-๙]",tibt:"[༠-༩]",latn:"\\d"},we={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]},xe=ve.hanidec.replace(/[\[|\]]/g,"").split("");var Ee={};function Se(e,t){void 0===t&&(t="");var n=e.numberingSystem||"latn";return Ee[n]||(Ee[n]={}),Ee[n][t]||(Ee[n][t]=new RegExp(""+ve[n]+t)),Ee[n][t]}var Ae,_e=function(){return Date.now()},Te="system",ke=null,Ce=null,Pe=null,Oe=60,Ie=null,Me=function(){function e(){}return e.resetCaches=function(){fe.resetCache(),Q.resetCache(),Pr.resetCache(),Ee={}},i(e,null,[{key:"now",get:function(){return _e},set:function(e){_e=e}},{key:"defaultZone",get:function(){return be(Te,X.instance)},set:function(e){Te=e}},{key:"defaultLocale",get:function(){return ke},set:function(e){ke=e}},{key:"defaultNumberingSystem",get:function(){return Ce},set:function(e){Ce=e}},{key:"defaultOutputCalendar",get:function(){return Pe},set:function(e){Pe=e}},{key:"defaultWeekSettings",get:function(){return Ie},set:function(e){Ie=tt(e)}},{key:"twoDigitCutoffYear",get:function(){return Oe},set:function(e){Oe=e%100}},{key:"throwOnInvalid",get:function(){return Ae},set:function(e){Ae=e}}]),e}(),je=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Re=[0,31,59,90,120,151,181,212,243,273,304,334],Be=[0,31,60,91,121,152,182,213,244,274,305,335];function Ne(e,t){return new je("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function Le(e,t,n){var r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);var i=r.getUTCDay();return 0===i?7:i}function Ue(e,t,n){return n+(ct(e)?Be:Re)[t-1]}function De(e,t){var n=ct(e)?Be:Re,r=n.findIndex((function(e){return e<t}));return{month:r+1,day:t-n[r]}}function Fe(e,t){return(e-t+7)%7+1}function He(e,t,n){void 0===t&&(t=4),void 0===n&&(n=1);var r,i=e.year,o=e.month,a=e.day,c=Ue(i,o,a),u=Fe(Le(i,o,a),n),l=Math.floor((c-u+14-t)/7);return l<1?l=pt(r=i-1,t,n):l>pt(i,t,n)?(r=i+1,l=1):r=i,s({weekYear:r,weekNumber:l,weekday:u},wt(e))}function $e(e,t,n){void 0===t&&(t=4),void 0===n&&(n=1);var r,i=e.weekYear,o=e.weekNumber,a=e.weekday,c=Fe(Le(i,1,t),n),u=ut(i),l=7*o+a-c-7+t;l<1?l+=ut(r=i-1):l>u?(r=i+1,l-=ut(i)):r=i;var d=De(r,l);return s({year:r,month:d.month,day:d.day},wt(e))}function Ve(e){var t=e.year;return s({year:t,ordinal:Ue(t,e.month,e.day)},wt(e))}function Ke(e){var t=e.year,n=De(t,e.ordinal);return s({year:t,month:n.month,day:n.day},wt(e))}function Ge(e,t){if(!qe(e.localWeekday)||!qe(e.localWeekNumber)||!qe(e.localWeekYear)){if(!qe(e.weekday)||!qe(e.weekNumber)||!qe(e.weekYear))throw new b("Cannot mix locale-based week fields with ISO-based week fields");return qe(e.localWeekday)||(e.weekday=e.localWeekday),qe(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),qe(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function ze(e){var t=Ye(e.year),n=nt(e.month,1,12),r=nt(e.day,1,lt(e.year,e.month));return t?n?!r&&Ne("day",e.day):Ne("month",e.month):Ne("year",e.year)}function We(e){var t=e.hour,n=e.minute,r=e.second,i=e.millisecond,s=nt(t,0,23)||24===t&&0===n&&0===r&&0===i,o=nt(n,0,59),a=nt(r,0,59),c=nt(i,0,999);return s?o?a?!c&&Ne("millisecond",i):Ne("second",r):Ne("minute",n):Ne("hour",t)}function qe(e){return void 0===e}function Xe(e){return"number"==typeof e}function Ye(e){return"number"==typeof e&&e%1==0}function Je(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Ze(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Qe(e,t,n){if(0!==e.length)return e.reduce((function(e,r){var i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i}),null)[1]}function et(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tt(e){if(null==e)return null;if("object"!=typeof e)throw new w("Week settings must be an object");if(!nt(e.firstDay,1,7)||!nt(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((function(e){return!nt(e,1,7)})))throw new w("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function nt(e,t,n){return Ye(e)&&e>=t&&e<=n}function rt(e,t){return void 0===t&&(t=2),e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0")}function it(e){return qe(e)||null===e||""===e?void 0:parseInt(e,10)}function st(e){return qe(e)||null===e||""===e?void 0:parseFloat(e)}function ot(e){if(!qe(e)&&null!==e&&""!==e){var t=1e3*parseFloat("0."+e);return Math.floor(t)}}function at(e,t,n){void 0===n&&(n=!1);var r=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*r)/r}function ct(e){return e%4==0&&(e%100!=0||e%400==0)}function ut(e){return ct(e)?366:365}function lt(e,t){var n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?ct(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function dt(e){var 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)).setUTCFullYear(e.year,e.month-1,e.day),+t}function ht(e,t,n){return-Fe(Le(e,1,t),n)+t-1}function pt(e,t,n){void 0===t&&(t=4),void 0===n&&(n=1);var r=ht(e,t,n),i=ht(e+1,t,n);return(ut(e)-r+i)/7}function ft(e){return e>99?e:e>Me.twoDigitCutoffYear?1900+e:2e3+e}function mt(e,t,n,r){void 0===r&&(r=null);var i=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);var a=s({timeZoneName:t},o),c=new Intl.DateTimeFormat(n,a).formatToParts(i).find((function(e){return"timezonename"===e.type.toLowerCase()}));return c?c.value:null}function yt(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function gt(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new w("Invalid unit value "+e);return t}function bt(e,t){var n={};for(var r in e)if(et(e,r)){var i=e[r];if(null==i)continue;n[t(r)]=gt(i)}return n}function vt(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return""+i+rt(n,2)+":"+rt(r,2);case"narrow":return""+i+n+(r>0?":"+r:"");case"techie":return""+i+rt(n,2)+rt(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function wt(e){return function(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}(e,["hour","minute","second","millisecond"])}var xt=["January","February","March","April","May","June","July","August","September","October","November","December"],Et=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],St=["J","F","M","A","M","J","J","A","S","O","N","D"];function At(e){switch(e){case"narrow":return[].concat(St);case"short":return[].concat(Et);case"long":return[].concat(xt);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}}var _t=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Tt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],kt=["M","T","W","T","F","S","S"];function Ct(e){switch(e){case"narrow":return[].concat(kt);case"short":return[].concat(Tt);case"long":return[].concat(_t);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Pt=["AM","PM"],Ot=["Before Christ","Anno Domini"],It=["BC","AD"],Mt=["B","A"];function jt(e){switch(e){case"narrow":return[].concat(Mt);case"short":return[].concat(It);case"long":return[].concat(Ot);default:return null}}function Rt(e,t){for(var n,r="",i=p(e);!(n=i()).done;){var s=n.value;s.literal?r+=s.val:r+=t(s.val)}return r}var Bt={D:_,DD:T,DDD:C,DDDD:P,t:O,tt:I,ttt:M,tttt:j,T:R,TT:B,TTT:N,TTTT:L,f:U,ff:F,fff:V,ffff:G,F:D,FF:H,FFF:K,FFFF:z},Nt=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],s=0;s<e.length;s++){var o=e.charAt(s);"'"===o?(n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),t=null,n="",r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i},e.macroTokenToFormatOpts=function(e){return Bt[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,s({},this.opts,t)).format()},t.dtFormatter=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,s({},this.opts,t))},t.formatDateTime=function(e,t){return this.dtFormatter(e,t).format()},t.formatDateTimeParts=function(e,t){return this.dtFormatter(e,t).formatToParts()},t.formatInterval=function(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())},t.resolvedOptions=function(e,t){return this.dtFormatter(e,t).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return rt(e,t);var n=s({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var r=this,i="en"===this.loc.listingMode(),s=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,o=function(e,n){return r.loc.extract(t,e,n)},a=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},c=function(){return i?function(e){return Pt[e.hour<12?0:1]}(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod")},u=function(e,n){return i?function(e,t){return At(t)[e.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month")},l=function(e,n){return i?function(e,t){return Ct(t)[e.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},d=function(e){return i?function(e,t){return jt(t)[e.year<0?0:1]}(t,e):o({era:e},"era")};return Rt(e.parseFormat(n),(function(n){switch(n){case"S":return r.num(t.millisecond);case"u":case"SSS":return r.num(t.millisecond,3);case"s":return r.num(t.second);case"ss":return r.num(t.second,2);case"uu":return r.num(Math.floor(t.millisecond/10),2);case"uuu":return r.num(Math.floor(t.millisecond/100));case"m":return r.num(t.minute);case"mm":return r.num(t.minute,2);case"h":return r.num(t.hour%12==0?12:t.hour%12);case"hh":return r.num(t.hour%12==0?12:t.hour%12,2);case"H":return r.num(t.hour);case"HH":return r.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return a({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:r.loc.locale});case"z":return t.zoneName;case"a":return c();case"d":return s?o({day:"numeric"},"day"):r.num(t.day);case"dd":return s?o({day:"2-digit"},"day"):r.num(t.day,2);case"c":case"E":return r.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return s?o({month:"numeric",day:"numeric"},"month"):r.num(t.month);case"LL":return s?o({month:"2-digit",day:"numeric"},"month"):r.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return s?o({month:"numeric"},"month"):r.num(t.month);case"MM":return s?o({month:"2-digit"},"month"):r.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return s?o({year:"numeric"},"year"):r.num(t.year);case"yy":return s?o({year:"2-digit"},"year"):r.num(t.year.toString().slice(-2),2);case"yyyy":return s?o({year:"numeric"},"year"):r.num(t.year,4);case"yyyyyy":return s?o({year:"numeric"},"year"):r.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return r.num(t.weekYear.toString().slice(-2),2);case"kkkk":return r.num(t.weekYear,4);case"W":return r.num(t.weekNumber);case"WW":return r.num(t.weekNumber,2);case"n":return r.num(t.localWeekNumber);case"nn":return r.num(t.localWeekNumber,2);case"ii":return r.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return r.num(t.localWeekYear,4);case"o":return r.num(t.ordinal);case"ooo":return r.num(t.ordinal,3);case"q":return r.num(t.quarter);case"qq":return r.num(t.quarter,2);case"X":return r.num(Math.floor(t.ts/1e3));case"x":return r.num(t.ts);default:return function(n){var i=e.macroTokenToFormatOpts(n);return i?r.formatWithSystemDefault(t,i):n}(n)}}))},t.formatDurationFromString=function(t,n){var r,i=this,s=function(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}},o=e.parseFormat(n),a=o.reduce((function(e,t){var n=t.literal,r=t.val;return n?e:e.concat(r)}),[]),c=t.shiftTo.apply(t,a.map(s).filter((function(e){return e})));return Rt(o,(r=c,function(e){var t=s(e);return t?i.num(r.get(t),e.length):e}))},e}(),Lt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ut(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce((function(e,t){return e+t.source}),"");return RegExp("^"+r+"$")}function Dt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(t,n){var r=t[0],i=t[1],o=t[2],a=n(e,o),c=a[0],u=a[1],l=a[2];return[s({},r,c),u||i,l]}),[{},null,1]).slice(0,2)}}function Ft(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,s=n;i<s.length;i++){var o=s[i],a=o[0],c=o[1],u=a.exec(e);if(u)return c(u)}return[null,null]}function Ht(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){var r,i={};for(r=0;r<t.length;r++)i[t[r]]=it(e[n+r]);return[i,null,n+r]}}var $t=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Vt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Kt=RegExp(""+Vt.source+("(?:"+$t.source+"?(?:\\[("+Lt.source+")\\])?)?")),Gt=RegExp("(?:T"+Kt.source+")?"),zt=Ht("weekYear","weekNumber","weekDay"),Wt=Ht("year","ordinal"),qt=RegExp(Vt.source+" ?(?:"+$t.source+"|("+Lt.source+"))?"),Xt=RegExp("(?: "+qt.source+")?");function Yt(e,t,n){var r=e[t];return qe(r)?n:it(r)}function Jt(e,t){return[{hours:Yt(e,t,0),minutes:Yt(e,t+1,0),seconds:Yt(e,t+2,0),milliseconds:ot(e[t+3])},null,t+4]}function Zt(e,t){var n=!e[t]&&!e[t+1],r=yt(e[t+1],e[t+2]);return[{},n?null:ye.instance(r),t+3]}function Qt(e,t){return[{},e[t]?Q.create(e[t]):null,t+1]}var en=RegExp("^T?"+Vt.source+"$"),tn=/^-?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 nn(e){var t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],o=e[5],a=e[6],c=e[7],u=e[8],l="-"===t[0],d=c&&"-"===c[0],h=function(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&l)?-e:e};return[{years:h(st(n)),months:h(st(r)),weeks:h(st(i)),days:h(st(s)),hours:h(st(o)),minutes:h(st(a)),seconds:h(st(c),"-0"===c),milliseconds:h(ot(u),d)}]}var rn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function sn(e,t,n,r,i,s,o){var a={year:2===t.length?ft(it(t)):it(t),month:Et.indexOf(n)+1,day:it(r),hour:it(i),minute:it(s)};return o&&(a.second=it(o)),e&&(a.weekday=e.length>3?_t.indexOf(e)+1:Tt.indexOf(e)+1),a}var on=/^(?:(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 an(e){var t,n=e[1],r=e[2],i=e[3],s=e[4],o=e[5],a=e[6],c=e[7],u=e[8],l=e[9],d=e[10],h=e[11],p=sn(n,s,i,r,o,a,c);return t=u?rn[u]:l?0:yt(d,h),[p,new ye(t)]}var cn=/^(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$/,un=/^(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$/,ln=/^(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 dn(e){var t=e[1],n=e[2],r=e[3];return[sn(t,e[4],r,n,e[5],e[6],e[7]),ye.utcInstance]}function hn(e){var t=e[1],n=e[2],r=e[3],i=e[4],s=e[5],o=e[6];return[sn(t,e[7],n,r,i,s,o),ye.utcInstance]}var pn=Ut(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Gt),fn=Ut(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Gt),mn=Ut(/(\d{4})-?(\d{3})/,Gt),yn=Ut(Kt),gn=Dt((function(e,t){return[{year:Yt(e,t),month:Yt(e,t+1,1),day:Yt(e,t+2,1)},null,t+3]}),Jt,Zt,Qt),bn=Dt(zt,Jt,Zt,Qt),vn=Dt(Wt,Jt,Zt,Qt),wn=Dt(Jt,Zt,Qt);var xn=Dt(Jt);var En=Ut(/(\d{4})-(\d\d)-(\d\d)/,Xt),Sn=Ut(qt),An=Dt(Jt,Zt,Qt);var _n="Invalid Duration",Tn={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}},kn=s({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}},Tn),Cn=365.2425,Pn=30.436875,On=s({years:{quarters:4,months:12,weeks:52.1775,days:Cn,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:Pn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Tn),In=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Mn=In.slice(0).reverse();function jn(e,t,n){void 0===n&&(n=!1);var r={values:n?t.values:s({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Nn(r)}function Rn(e,t){for(var n,r,i=null!=(n=t.milliseconds)?n:0,s=p(Mn.slice(1));!(r=s()).done;){var o=r.value;t[o]&&(i+=t[o]*e[o].milliseconds)}return i}function Bn(e,t){var n=Rn(e,t)<0?-1:1;In.reduceRight((function(r,i){if(qe(t[i]))return r;if(r){var s=t[r]*n,o=e[i][r],a=Math.floor(s/o);t[i]+=a*n,t[r]-=a*o*n}return i}),null),In.reduce((function(n,r){if(qe(t[r]))return n;if(n){var i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r}),null)}var Nn=function(e){function t(e){var t="longterm"===e.conversionAccuracy||!1,n=t?On:kn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||fe.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}t.fromMillis=function(e,n){return t.fromObject({milliseconds:e},n)},t.fromObject=function(e,n){if(void 0===n&&(n={}),null==e||"object"!=typeof e)throw new w("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new t({values:bt(e,t.normalizeUnit),loc:fe.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})},t.fromDurationLike=function(e){if(Xe(e))return t.fromMillis(e);if(t.isDuration(e))return e;if("object"==typeof e)return t.fromObject(e);throw new w("Unknown duration argument "+e+" of type "+typeof e)},t.fromISO=function(e,n){var r=function(e){return Ft(e,[tn,nn])}(e),i=r[0];return i?t.fromObject(i,n):t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.fromISOTime=function(e,n){var r=function(e){return Ft(e,[en,xn])}(e),i=r[0];return i?t.fromObject(i,n):t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.invalid=function(e,n){if(void 0===n&&(n=null),!e)throw new w("need to specify a reason the Duration is invalid");var r=e instanceof je?e:new je(e,n);if(Me.throwOnInvalid)throw new g(r);return new t({invalid:r})},t.normalizeUnit=function(e){var 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 v(e);return t},t.isDuration=function(e){return e&&e.isLuxonDuration||!1};var n=t.prototype;return n.toFormat=function(e,t){void 0===t&&(t={});var n=s({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Nt.create(this.loc,n).formatDurationFromString(this,e):_n},n.toHuman=function(e){var t=this;if(void 0===e&&(e={}),!this.isValid)return _n;var n=In.map((function(n){var r=t.values[n];return qe(r)?null:t.loc.numberFormatter(s({style:"unit",unitDisplay:"long"},e,{unit:n.slice(0,-1)})).format(r)})).filter((function(e){return e}));return this.loc.listFormatter(s({type:"conjunction",style:e.listStyle||"narrow"},e)).format(n)},n.toObject=function(){return this.isValid?s({},this.values):{}},n.toISO=function(){if(!this.isValid)return null;var 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+=at(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},n.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();return t<0||t>=864e5?null:(e=s({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e,{includeOffset:!1}),Pr.fromMillis(t,{zone:"UTC"}).toISOTime(e))},n.toJSON=function(){return this.toISO()},n.toString=function(){return this.toISO()},n[e]=function(){return this.isValid?"Duration { values: "+JSON.stringify(this.values)+" }":"Duration { Invalid, reason: "+this.invalidReason+" }"},n.toMillis=function(){return this.isValid?Rn(this.matrix,this.values):NaN},n.valueOf=function(){return this.toMillis()},n.plus=function(e){if(!this.isValid)return this;for(var n=t.fromDurationLike(e),r={},i=0,s=In;i<s.length;i++){var o=s[i];(et(n.values,o)||et(this.values,o))&&(r[o]=n.get(o)+this.get(o))}return jn(this,{values:r},!0)},n.minus=function(e){if(!this.isValid)return this;var n=t.fromDurationLike(e);return this.plus(n.negate())},n.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];t[i]=gt(e(this.values[i],i))}return jn(this,{values:t},!0)},n.get=function(e){return this[t.normalizeUnit(e)]},n.set=function(e){return this.isValid?jn(this,{values:s({},this.values,bt(e,t.normalizeUnit))}):this},n.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.conversionAccuracy,s=t.matrix;return jn(this,{loc:this.loc.clone({locale:n,numberingSystem:r}),matrix:s,conversionAccuracy:i})},n.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},n.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return Bn(this.matrix,e),jn(this,{values:e},!0)},n.rescale=function(){return this.isValid?jn(this,{values:function(e){for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var i=r[n],s=i[0],o=i[1];0!==o&&(t[s]=o)}return t}(this.normalize().shiftToAll().toObject())},!0):this},n.shiftTo=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(!this.isValid)return this;if(0===n.length)return this;n=n.map((function(e){return t.normalizeUnit(e)}));for(var i,s={},o={},a=this.toObject(),c=0,u=In;c<u.length;c++){var l=u[c];if(n.indexOf(l)>=0){i=l;var d=0;for(var h in o)d+=this.matrix[h][l]*o[h],o[h]=0;Xe(a[l])&&(d+=a[l]);var p=Math.trunc(d);s[l]=p,o[l]=(1e3*d-1e3*p)/1e3}else Xe(a[l])&&(o[l]=a[l])}for(var f in o)0!==o[f]&&(s[i]+=f===i?o[f]:o[f]/this.matrix[i][f]);return Bn(this.matrix,s),jn(this,{values:s},!0)},n.shiftToAll=function(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this},n.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var r=n[t];e[r]=0===this.values[r]?0:-this.values[r]}return jn(this,{values:e},!0)},n.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t=0,n=In;t<n.length;t++){var r=n[t];if(i=this.values[r],s=e.values[r],!(void 0===i||0===i?void 0===s||0===s:i===s))return!1}var i,s;return!0},i(t,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),t}(Symbol.for("nodejs.util.inspect.custom")),Ln="Invalid Interval";function Un(e,t){return e&&e.isValid?t&&t.isValid?t<e?Dn.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:Dn.invalid("missing or invalid end"):Dn.invalid("missing or invalid start")}var Dn=function(e){function t(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}t.invalid=function(e,n){if(void 0===n&&(n=null),!e)throw new w("need to specify a reason the Interval is invalid");var r=e instanceof je?e:new je(e,n);if(Me.throwOnInvalid)throw new y(r);return new t({invalid:r})},t.fromDateTimes=function(e,n){var r=Or(e),i=Or(n),s=Un(r,i);return null==s?new t({start:r,end:i}):s},t.after=function(e,n){var r=Nn.fromDurationLike(n),i=Or(e);return t.fromDateTimes(i,i.plus(r))},t.before=function(e,n){var r=Nn.fromDurationLike(n),i=Or(e);return t.fromDateTimes(i.minus(r),i)},t.fromISO=function(e,n){var r=(e||"").split("/",2),i=r[0],s=r[1];if(i&&s){var o,a,c,u;try{a=(o=Pr.fromISO(i,n)).isValid}catch(s){a=!1}try{u=(c=Pr.fromISO(s,n)).isValid}catch(s){u=!1}if(a&&u)return t.fromDateTimes(o,c);if(a){var l=Nn.fromISO(s,n);if(l.isValid)return t.after(o,l)}else if(u){var d=Nn.fromISO(i,n);if(d.isValid)return t.before(c,d)}}return t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.isInterval=function(e){return e&&e.isLuxonInterval||!1};var n=t.prototype;return n.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},n.count=function(e,t){if(void 0===e&&(e="milliseconds"),!this.isValid)return NaN;var n,r=this.start.startOf(e,t);return n=(n=null!=t&&t.useLocaleWeeks?this.end.reconfigure({locale:r.locale}):this.end).startOf(e,t),Math.floor(n.diff(r,e).get(e))+(n.valueOf()!==this.end.valueOf())},n.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},n.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},n.isAfter=function(e){return!!this.isValid&&this.s>e},n.isBefore=function(e){return!!this.isValid&&this.e<=e},n.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},n.set=function(e){var n=void 0===e?{}:e,r=n.start,i=n.end;return this.isValid?t.fromDateTimes(r||this.s,i||this.e):this},n.splitAt=function(){var e=this;if(!this.isValid)return[];for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var s=r.map(Or).filter((function(t){return e.contains(t)})).sort((function(e,t){return e.toMillis()-t.toMillis()})),o=[],a=this.s,c=0;a<this.e;){var u=s[c]||this.e,l=+u>+this.e?this.e:u;o.push(t.fromDateTimes(a,l)),a=l,c+=1}return o},n.splitBy=function(e){var n=Nn.fromDurationLike(e);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var r,i=this.s,s=1,o=[];i<this.e;){var a=this.start.plus(n.mapUnits((function(e){return e*s})));r=+a>+this.e?this.e:a,o.push(t.fromDateTimes(i,r)),i=r,s+=1}return o},n.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},n.overlaps=function(e){return this.e>e.s&&this.s<e.e},n.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},n.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},n.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},n.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},n.intersection=function(e){if(!this.isValid)return this;var n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:t.fromDateTimes(n,r)},n.union=function(e){if(!this.isValid)return this;var n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return t.fromDateTimes(n,r)},t.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],r=e[1];return r?r.overlaps(t)||r.abutsStart(t)?[n,r.union(t)]:[n.concat([r]),t]:[n,t]}),[[],null]),n=t[0],r=t[1];return r&&n.push(r),n},t.xor=function(e){for(var n,r,i=null,s=0,o=[],a=e.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),c=p((n=Array.prototype).concat.apply(n,a).sort((function(e,t){return e.time-t.time})));!(r=c()).done;){var u=r.value;1===(s+="s"===u.type?1:-1)?i=u.time:(i&&+i!=+u.time&&o.push(t.fromDateTimes(i,u.time)),i=null)}return t.merge(o)},n.difference=function(){for(var e=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.xor([this].concat(r)).map((function(t){return e.intersection(t)})).filter((function(e){return e&&!e.isEmpty()}))},n.toString=function(){return this.isValid?"["+this.s.toISO()+" "+this.e.toISO()+")":Ln},n[e]=function(){return this.isValid?"Interval { start: "+this.s.toISO()+", end: "+this.e.toISO()+" }":"Interval { Invalid, reason: "+this.invalidReason+" }"},n.toLocaleString=function(e,t){return void 0===e&&(e=_),void 0===t&&(t={}),this.isValid?Nt.create(this.s.loc.clone(t),e).formatInterval(this):Ln},n.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):Ln},n.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():Ln},n.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):Ln},n.toFormat=function(e,t){var n=(void 0===t?{}:t).separator,r=void 0===n?" ":n;return this.isValid?""+this.s.toFormat(e)+r+this.e.toFormat(e):Ln},n.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Nn.invalid(this.invalidReason)},n.mapEndpoints=function(e){return t.fromDateTimes(e(this.s),e(this.e))},i(t,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),t}(Symbol.for("nodejs.util.inspect.custom")),Fn=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Me.defaultZone);var t=Pr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return Q.isValidZone(e)},e.normalizeZone=function(e){return be(e,Me.defaultZone)},e.getStartOfWeek=function(e){var t=void 0===e?{}:e,n=t.locale,r=void 0===n?null:n,i=t.locObj;return((void 0===i?null:i)||fe.create(r)).getStartOfWeek()},e.getMinimumDaysInFirstWeek=function(e){var t=void 0===e?{}:e,n=t.locale,r=void 0===n?null:n,i=t.locObj;return((void 0===i?null:i)||fe.create(r)).getMinDaysInFirstWeek()},e.getWeekendWeekdays=function(e){var t=void 0===e?{}:e,n=t.locale,r=void 0===n?null:n,i=t.locObj;return((void 0===i?null:i)||fe.create(r)).getWeekendDays().slice()},e.months=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,s=n.numberingSystem,o=void 0===s?null:s,a=n.locObj,c=void 0===a?null:a,u=n.outputCalendar,l=void 0===u?"gregory":u;return(c||fe.create(i,o,l)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,s=n.numberingSystem,o=void 0===s?null:s,a=n.locObj,c=void 0===a?null:a,u=n.outputCalendar,l=void 0===u?"gregory":u;return(c||fe.create(i,o,l)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,s=n.numberingSystem,o=void 0===s?null:s,a=n.locObj;return((void 0===a?null:a)||fe.create(i,o,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,s=n.numberingSystem,o=void 0===s?null:s,a=n.locObj;return((void 0===a?null:a)||fe.create(i,o,null)).weekdays(e,!0)},e.meridiems=function(e){var t=(void 0===e?{}:e).locale,n=void 0===t?null:t;return fe.create(n).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");var n=(void 0===t?{}:t).locale,r=void 0===n?null:n;return fe.create(r,null,"gregory").eras(e)},e.features=function(){return{relative:Je(),localeWeek:Ze()}},e}();function Hn(e,t){var n=function(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},r=n(t)-n(e);return Math.floor(Nn.fromMillis(r).as("days"))}function $n(e,t,n,r){var i=function(e,t,n){for(var r,i,s={},o=e,a=0,c=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter+4*(t.year-e.year)}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var n=Hn(e,t);return(n-n%7)/7}],["days",Hn]];a<c.length;a++){var u=c[a],l=u[0],d=u[1];n.indexOf(l)>=0&&(r=l,s[l]=d(e,t),(i=o.plus(s))>t?(s[l]--,(e=o.plus(s))>t&&(i=e,s[l]--,e=o.plus(s))):e=i)}return[e,s,i,r]}(e,t,n),s=i[0],o=i[1],a=i[2],c=i[3],u=t-s,l=n.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===l.length){var d;if(a<t)a=s.plus(((d={})[c]=1,d));a!==s&&(o[c]=(o[c]||0)+u/(a-s))}var h,p=Nn.fromObject(o,r);return l.length>0?(h=Nn.fromMillis(u,r)).shiftTo.apply(h,l).plus(p):p}function Vn(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(function(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(-1!==e[n].search(ve.hanidec))t+=xe.indexOf(e[n]);else for(var i in we){var s=we[i],o=s[0],a=s[1];r>=o&&r<=a&&(t+=r-o)}}return parseInt(t,10)}return t}(n))}}}var Kn="[ "+String.fromCharCode(160)+"]",Gn=new RegExp(Kn,"g");function zn(e){return e.replace(/\./g,"\\.?").replace(Gn,Kn)}function Wn(e){return e.replace(/\./g,"").replace(Gn," ").toLowerCase()}function qn(e,t){return null===e?null:{regex:RegExp(e.map(zn).join("|")),deser:function(n){var r=n[0];return e.findIndex((function(e){return Wn(r)===Wn(e)}))+t}}}function Xn(e,t){return{regex:e,deser:function(e){return yt(e[1],e[2])},groups:t}}function Yn(e){return{regex:e,deser:function(e){return e[0]}}}var Jn={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",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};var Zn=null;function Qn(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return function(e,t){if(e.literal)return e;var n=nr(Nt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)})))}var er=function(){function e(e,t){if(this.locale=e,this.format=t,this.tokens=Qn(Nt.parseFormat(t),e),this.units=this.tokens.map((function(t){return n=t,i=Se(r=e),s=Se(r,"{2}"),o=Se(r,"{3}"),a=Se(r,"{4}"),c=Se(r,"{6}"),u=Se(r,"{1,2}"),l=Se(r,"{1,3}"),d=Se(r,"{1,6}"),h=Se(r,"{1,9}"),p=Se(r,"{2,4}"),f=Se(r,"{4,6}"),m=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},y=function(e){if(n.literal)return m(e);switch(e.val){case"G":return qn(r.eras("short"),0);case"GG":return qn(r.eras("long"),0);case"y":return Vn(d);case"yy":case"kk":return Vn(p,ft);case"yyyy":case"kkkk":return Vn(a);case"yyyyy":return Vn(f);case"yyyyyy":return Vn(c);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Vn(u);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Vn(s);case"MMM":return qn(r.months("short",!0),1);case"MMMM":return qn(r.months("long",!0),1);case"LLL":return qn(r.months("short",!1),1);case"LLLL":return qn(r.months("long",!1),1);case"o":case"S":return Vn(l);case"ooo":case"SSS":return Vn(o);case"u":return Yn(h);case"uu":return Yn(u);case"uuu":case"E":case"c":return Vn(i);case"a":return qn(r.meridiems(),0);case"EEE":return qn(r.weekdays("short",!1),1);case"EEEE":return qn(r.weekdays("long",!1),1);case"ccc":return qn(r.weekdays("short",!0),1);case"cccc":return qn(r.weekdays("long",!0),1);case"Z":case"ZZ":return Xn(new RegExp("([+-]"+u.source+")(?::("+s.source+"))?"),2);case"ZZZ":return Xn(new RegExp("([+-]"+u.source+")("+s.source+")?"),2);case"z":return Yn(/[a-z_+-/]{1,256}?/i);case" ":return Yn(/[^\S\n\r]/);default:return m(e)}}(n)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"},y.token=n,y;var n,r,i,s,o,a,c,u,l,d,h,p,f,m,y})),this.disqualifyingUnit=this.units.find((function(e){return e.invalidReason})),!this.disqualifyingUnit){var n=["^"+(s=this.units).map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",s],r=n[0],i=n[1];this.regex=RegExp(r,"i"),this.handlers=i}var s}return e.prototype.explainFromTokens=function(e){if(this.isValid){var t=function(e,t,n){var r=e.match(t);if(r){var i={},s=1;for(var o in n)if(et(n,o)){var a=n[o],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(i[a.token.val[0]]=a.deser(r.slice(s,s+c))),s+=c}return[r,i]}return[r,{}]}(e,this.regex,this.handlers),n=t[0],r=t[1],i=r?function(e){var t,n=null;return qe(e.z)||(n=Q.create(e.z)),qe(e.Z)||(n||(n=new ye(e.Z)),t=e.Z),qe(e.q)||(e.M=3*(e.q-1)+1),qe(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),qe(e.u)||(e.S=ot(e.u)),[Object.keys(e).reduce((function(t,n){var r=function(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}}(n);return r&&(t[r]=e[n]),t}),{}),n,t]}(r):[null,null,void 0],s=i[0],o=i[1],a=i[2];if(et(r,"a")&&et(r,"H"))throw new b("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:s,zone:o,specificOffset:a}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}},i(e,[{key:"isValid",get:function(){return!this.disqualifyingUnit}},{key:"invalidReason",get:function(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}]),e}();function tr(e,t,n){return new er(e,n).explainFromTokens(t)}function nr(e,t){if(!e)return null;var n=Nt.create(t,e).dtFormatter((Zn||(Zn=Pr.fromMillis(1555555555555)),Zn)),r=n.formatToParts(),i=n.resolvedOptions();return r.map((function(t){return function(e,t,n){var r=e.type,i=e.value;if("literal"===r){var s=/^\s+$/.test(i);return{literal:!s,val:s?" ":i}}var o=t[r],a=r;"hour"===r&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");var c=Jn[a];if("object"==typeof c&&(c=c[o]),c)return{literal:!1,val:c}}(t,e,i)}))}var rr="Invalid DateTime",ir=864e13;function sr(e){return new je("unsupported zone",'the zone "'+e.name+'" is not supported')}function or(e){return null===e.weekData&&(e.weekData=He(e.c)),e.weekData}function ar(e){return null===e.localWeekData&&(e.localWeekData=He(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function cr(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Pr(s({},n,t,{old:n}))}function ur(e,t,n){var r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;var s=n.offset(r);return i===s?[r,i]:[e-60*Math.min(i,s)*1e3,Math.max(i,s)]}function lr(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function dr(e,t,n){return ur(dt(e),t,n)}function hr(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o=s({},e.c,{year:r,month:i,day:Math.min(e.c.day,lt(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),a=Nn.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"),c=ur(dt(o),n,e.zone),u=c[0],l=c[1];return 0!==a&&(u+=a,l=e.zone.offset(u)),{ts:u,o:l}}function pr(e,t,n,r,i,o){var a=n.setZone,c=n.zone;if(e&&0!==Object.keys(e).length||t){var u=t||c,l=Pr.fromObject(e,s({},n,{zone:u,specificOffset:o}));return a?l:l.setZone(c)}return Pr.invalid(new je("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function fr(e,t,n){return void 0===n&&(n=!0),e.isValid?Nt.create(fe.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function mr(e,t){var n=e.c.year>9999||e.c.year<0,r="";return n&&e.c.year>=0&&(r+="+"),r+=rt(e.c.year,n?6:4),t?(r+="-",r+=rt(e.c.month),r+="-",r+=rt(e.c.day)):(r+=rt(e.c.month),r+=rt(e.c.day)),r}function yr(e,t,n,r,i,s){var o=rt(e.c.hour);return t?(o+=":",o+=rt(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(o+=":")):o+=rt(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(o+=rt(e.c.second),0===e.c.millisecond&&r||(o+=".",o+=rt(e.c.millisecond,3))),i&&(e.isOffsetFixed&&0===e.offset&&!s?o+="Z":e.o<0?(o+="-",o+=rt(Math.trunc(-e.o/60)),o+=":",o+=rt(Math.trunc(-e.o%60))):(o+="+",o+=rt(Math.trunc(e.o/60)),o+=":",o+=rt(Math.trunc(e.o%60)))),s&&(o+="["+e.zone.ianaName+"]"),o}var gr,br={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},wr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},xr=["year","month","day","hour","minute","second","millisecond"],Er=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Sr=["year","ordinal","hour","minute","second","millisecond"];function Ar(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(e){var 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 v(e);return t}(e)}}function _r(e,t){var n=be(t.zone,Me.defaultZone);if(!n.isValid)return Pr.invalid(sr(n));var r,i,s=fe.fromObject(t);if(qe(e.year))r=Me.now();else{for(var o=0,a=xr;o<a.length;o++){var c=a[o];qe(e[c])&&(e[c]=br[c])}var u=ze(e)||We(e);if(u)return Pr.invalid(u);var l=function(e){return Cr[e]||(void 0===gr&&(gr=Me.now()),Cr[e]=e.offset(gr)),Cr[e]}(n),d=dr(e,l,n);r=d[0],i=d[1]}return new Pr({ts:r,zone:n,loc:s,o:i})}function Tr(e,t,n){var r=!!qe(n.round)||n.round,i=function(e,i){return e=at(e,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,i)},s=function(r){return n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r)};if(n.unit)return i(s(n.unit),n.unit);for(var o,a=p(n.units);!(o=a()).done;){var c=o.value,u=s(c);if(Math.abs(u)>=1)return i(u,c)}return i(e>t?-0:0,n.units[n.units.length-1])}function kr(e){var t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}var Cr={},Pr=function(e){function t(e){var t=e.zone||Me.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new je("invalid input"):null)||(t.isValid?null:sr(t));this.ts=qe(e.ts)?Me.now():e.ts;var r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var s=[e.old.c,e.old.o];r=s[0],i=s[1]}else{var o=Xe(e.o)&&!e.old?e.o:t.offset(this.ts);r=lr(this.ts,o),r=(n=Number.isNaN(r.year)?new je("invalid input"):null)?null:r,i=n?null:o}this._zone=t,this.loc=e.loc||fe.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}t.now=function(){return new t({})},t.local=function(){var e=kr(arguments),t=e[0],n=e[1];return _r({year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]},t)},t.utc=function(){var e=kr(arguments),t=e[0],n=e[1],r=n[0],i=n[1],s=n[2],o=n[3],a=n[4],c=n[5],u=n[6];return t.zone=ye.utcInstance,_r({year:r,month:i,day:s,hour:o,minute:a,second:c,millisecond:u},t)},t.fromJSDate=function(e,n){void 0===n&&(n={});var r,i=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);if(Number.isNaN(i))return t.invalid("invalid input");var s=be(n.zone,Me.defaultZone);return s.isValid?new t({ts:i,zone:s,loc:fe.fromObject(n)}):t.invalid(sr(s))},t.fromMillis=function(e,n){if(void 0===n&&(n={}),Xe(e))return e<-ir||e>ir?t.invalid("Timestamp out of range"):new t({ts:e,zone:be(n.zone,Me.defaultZone),loc:fe.fromObject(n)});throw new w("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},t.fromSeconds=function(e,n){if(void 0===n&&(n={}),Xe(e))return new t({ts:1e3*e,zone:be(n.zone,Me.defaultZone),loc:fe.fromObject(n)});throw new w("fromSeconds requires a numerical input")},t.fromObject=function(e,n){void 0===n&&(n={}),e=e||{};var r=be(n.zone,Me.defaultZone);if(!r.isValid)return t.invalid(sr(r));var i=fe.fromObject(n),s=bt(e,Ar),o=Ge(s,i),a=o.minDaysInFirstWeek,c=o.startOfWeek,u=Me.now(),l=qe(n.specificOffset)?r.offset(u):n.specificOffset,d=!qe(s.ordinal),h=!qe(s.year),f=!qe(s.month)||!qe(s.day),m=h||f,y=s.weekYear||s.weekNumber;if((m||d)&&y)throw new b("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&d)throw new b("Can't mix ordinal dates with month/day");var g,v,w=y||s.weekday&&!m,x=lr(u,l);w?(g=Er,v=vr,x=He(x,a,c)):d?(g=Sr,v=wr,x=Ve(x)):(g=xr,v=br);for(var E,S=!1,A=p(g);!(E=A()).done;){var _=E.value;qe(s[_])?s[_]=S?v[_]:x[_]:S=!0}var T=w?function(e,t,n){void 0===t&&(t=4),void 0===n&&(n=1);var r=Ye(e.weekYear),i=nt(e.weekNumber,1,pt(e.weekYear,t,n)),s=nt(e.weekday,1,7);return r?i?!s&&Ne("weekday",e.weekday):Ne("week",e.weekNumber):Ne("weekYear",e.weekYear)}(s,a,c):d?function(e){var t=Ye(e.year),n=nt(e.ordinal,1,ut(e.year));return t?!n&&Ne("ordinal",e.ordinal):Ne("year",e.year)}(s):ze(s),k=T||We(s);if(k)return t.invalid(k);var C=dr(w?$e(s,a,c):d?Ke(s):s,l,r),P=new t({ts:C[0],zone:r,o:C[1],loc:i});return s.weekday&&m&&e.weekday!==P.weekday?t.invalid("mismatched weekday","you can't specify both a weekday of "+s.weekday+" and a date of "+P.toISO()):P.isValid?P:t.invalid(P.invalid)},t.fromISO=function(e,t){void 0===t&&(t={});var n=function(e){return Ft(e,[pn,gn],[fn,bn],[mn,vn],[yn,wn])}(e);return pr(n[0],n[1],t,"ISO 8601",e)},t.fromRFC2822=function(e,t){void 0===t&&(t={});var n=function(e){return Ft(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[on,an])}(e);return pr(n[0],n[1],t,"RFC 2822",e)},t.fromHTTP=function(e,t){void 0===t&&(t={});var n=function(e){return Ft(e,[cn,dn],[un,dn],[ln,hn])}(e);return pr(n[0],n[1],t,"HTTP",t)},t.fromFormat=function(e,n,r){if(void 0===r&&(r={}),qe(e)||qe(n))throw new w("fromFormat requires an input string and a format");var i=r,s=i.locale,o=void 0===s?null:s,a=i.numberingSystem,c=void 0===a?null:a,u=function(e,t,n){var r=tr(e,t,n);return[r.result,r.zone,r.specificOffset,r.invalidReason]}(fe.fromOpts({locale:o,numberingSystem:c,defaultToEN:!0}),e,n),l=u[0],d=u[1],h=u[2],p=u[3];return p?t.invalid(p):pr(l,d,r,"format "+n,e,h)},t.fromString=function(e,n,r){return void 0===r&&(r={}),t.fromFormat(e,n,r)},t.fromSQL=function(e,t){void 0===t&&(t={});var n=function(e){return Ft(e,[En,gn],[Sn,An])}(e);return pr(n[0],n[1],t,"SQL",e)},t.invalid=function(e,n){if(void 0===n&&(n=null),!e)throw new w("need to specify a reason the DateTime is invalid");var r=e instanceof je?e:new je(e,n);if(Me.throwOnInvalid)throw new m(r);return new t({invalid:r})},t.isDateTime=function(e){return e&&e.isLuxonDateTime||!1},t.parseFormatForOpts=function(e,t){void 0===t&&(t={});var n=nr(e,fe.fromObject(t));return n?n.map((function(e){return e?e.val:null})).join(""):null},t.expandFormat=function(e,t){return void 0===t&&(t={}),Qn(Nt.parseFormat(e),fe.fromObject(t)).map((function(e){return e.val})).join("")},t.resetCache=function(){gr=void 0,Cr={}};var n=t.prototype;return n.get=function(e){return this[e]},n.getPossibleOffsets=function(){if(!this.isValid||this.isOffsetFixed)return[this];var e=864e5,t=6e4,n=dt(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),s=this.zone.offset(n-r*t),o=this.zone.offset(n-i*t);if(s===o)return[this];var a=n-s*t,c=n-o*t,u=lr(a,s),l=lr(c,o);return u.hour===l.hour&&u.minute===l.minute&&u.second===l.second&&u.millisecond===l.millisecond?[cr(this,{ts:a}),cr(this,{ts:c})]:[this]},n.resolvedLocaleOptions=function(e){void 0===e&&(e={});var t=Nt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},n.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(ye.instance(e),t)},n.toLocal=function(){return this.setZone(Me.defaultZone)},n.setZone=function(e,n){var r=void 0===n?{}:n,i=r.keepLocalTime,s=void 0!==i&&i,o=r.keepCalendarTime,a=void 0!==o&&o;if((e=be(e,Me.defaultZone)).equals(this.zone))return this;if(e.isValid){var c=this.ts;if(s||a){var u=e.offset(this.ts);c=dr(this.toObject(),u,e)[0]}return cr(this,{ts:c,zone:e})}return t.invalid(sr(e))},n.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.outputCalendar;return cr(this,{loc:this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i})})},n.setLocale=function(e){return this.reconfigure({locale:e})},n.set=function(e){if(!this.isValid)return this;var t,n=bt(e,Ar),r=Ge(n,this.loc),i=r.minDaysInFirstWeek,o=r.startOfWeek,a=!qe(n.weekYear)||!qe(n.weekNumber)||!qe(n.weekday),c=!qe(n.ordinal),u=!qe(n.year),l=!qe(n.month)||!qe(n.day),d=u||l,h=n.weekYear||n.weekNumber;if((d||c)&&h)throw new b("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&c)throw new b("Can't mix ordinal dates with month/day");a?t=$e(s({},He(this.c,i,o),n),i,o):qe(n.ordinal)?(t=s({},this.toObject(),n),qe(n.day)&&(t.day=Math.min(lt(t.year,t.month),t.day))):t=Ke(s({},Ve(this.c),n));var p=dr(t,this.o,this.zone);return cr(this,{ts:p[0],o:p[1]})},n.plus=function(e){return this.isValid?cr(this,hr(this,Nn.fromDurationLike(e))):this},n.minus=function(e){return this.isValid?cr(this,hr(this,Nn.fromDurationLike(e).negate())):this},n.startOf=function(e,t){var n=(void 0===t?{}:t).useLocaleWeeks,r=void 0!==n&&n;if(!this.isValid)return this;var i={},s=Nn.normalizeUnit(e);switch(s){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0}if("weeks"===s)if(r){var o=this.loc.getStartOfWeek();this.weekday<o&&(i.weekNumber=this.weekNumber-1),i.weekday=o}else i.weekday=1;if("quarters"===s){var a=Math.ceil(this.month/3);i.month=3*(a-1)+1}return this.set(i)},n.endOf=function(e,t){var n;return this.isValid?this.plus((n={},n[e]=1,n)).startOf(e,t).minus(1):this},n.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Nt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):rr},n.toLocaleString=function(e,t){return void 0===e&&(e=_),void 0===t&&(t={}),this.isValid?Nt.create(this.loc.clone(t),e).formatDateTime(this):rr},n.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Nt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},n.toISO=function(e){var t=void 0===e?{}:e,n=t.format,r=void 0===n?"extended":n,i=t.suppressSeconds,s=void 0!==i&&i,o=t.suppressMilliseconds,a=void 0!==o&&o,c=t.includeOffset,u=void 0===c||c,l=t.extendedZone,d=void 0!==l&&l;if(!this.isValid)return null;var h="extended"===r,p=mr(this,h);return p+="T",p+=yr(this,h,s,a,u,d)},n.toISODate=function(e){var t=(void 0===e?{}:e).format,n=void 0===t?"extended":t;return this.isValid?mr(this,"extended"===n):null},n.toISOWeekDate=function(){return fr(this,"kkkk-'W'WW-c")},n.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,r=void 0!==n&&n,i=t.suppressSeconds,s=void 0!==i&&i,o=t.includeOffset,a=void 0===o||o,c=t.includePrefix,u=void 0!==c&&c,l=t.extendedZone,d=void 0!==l&&l,h=t.format,p=void 0===h?"extended":h;return this.isValid?(u?"T":"")+yr(this,"extended"===p,s,r,a,d):null},n.toRFC2822=function(){return fr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},n.toHTTP=function(){return fr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},n.toSQLDate=function(){return this.isValid?mr(this,!0):null},n.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,r=void 0===n||n,i=t.includeZone,s=void 0!==i&&i,o=t.includeOffsetSpace,a="HH:mm:ss.SSS";return(s||r)&&((void 0===o||o)&&(a+=" "),s?a+="z":r&&(a+="ZZ")),fr(this,a,!0)},n.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},n.toString=function(){return this.isValid?this.toISO():rr},n[e]=function(){return this.isValid?"DateTime { ts: "+this.toISO()+", zone: "+this.zone.name+", locale: "+this.locale+" }":"DateTime { Invalid, reason: "+this.invalidReason+" }"},n.valueOf=function(){return this.toMillis()},n.toMillis=function(){return this.isValid?this.ts:NaN},n.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},n.toUnixInteger=function(){return this.isValid?Math.floor(this.ts/1e3):NaN},n.toJSON=function(){return this.toISO()},n.toBSON=function(){return this.toJSDate()},n.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=s({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},n.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},n.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return Nn.invalid("created by diffing an invalid DateTime");var r,i=s({locale:this.locale,numberingSystem:this.numberingSystem},n),o=(r=t,Array.isArray(r)?r:[r]).map(Nn.normalizeUnit),a=e.valueOf()>this.valueOf(),c=$n(a?this:e,a?e:this,o,i);return a?c.negate():c},n.diffNow=function(e,n){return void 0===e&&(e="milliseconds"),void 0===n&&(n={}),this.diff(t.now(),e,n)},n.until=function(e){return this.isValid?Dn.fromDateTimes(this,e):this},n.hasSame=function(e,t,n){if(!this.isValid)return!1;var r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)},n.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},n.toRelative=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var n=e.base||t.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(i=e.unit,o=void 0),Tr(n,this.plus(r),s({},e,{numeric:"always",units:i,unit:o}))},n.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?Tr(e.base||t.fromObject({},{zone:this.zone}),this,s({},e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},t.min=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(!n.every(t.isDateTime))throw new w("min requires all arguments be DateTimes");return Qe(n,(function(e){return e.valueOf()}),Math.min)},t.max=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(!n.every(t.isDateTime))throw new w("max requires all arguments be DateTimes");return Qe(n,(function(e){return e.valueOf()}),Math.max)},t.fromFormatExplain=function(e,t,n){void 0===n&&(n={});var r=n,i=r.locale,s=void 0===i?null:i,o=r.numberingSystem,a=void 0===o?null:o;return tr(fe.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0}),e,t)},t.fromStringExplain=function(e,n,r){return void 0===r&&(r={}),t.fromFormatExplain(e,n,r)},t.buildFormatParser=function(e,t){void 0===t&&(t={});var n=t,r=n.locale,i=void 0===r?null:r,s=n.numberingSystem,o=void 0===s?null:s,a=fe.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return new er(a,e)},t.fromFormatParser=function(e,n,r){if(void 0===r&&(r={}),qe(e)||qe(n))throw new w("fromFormatParser requires an input string and a format parser");var i=r,s=i.locale,o=void 0===s?null:s,a=i.numberingSystem,c=void 0===a?null:a,u=fe.fromOpts({locale:o,numberingSystem:c,defaultToEN:!0});if(!u.equals(n.locale))throw new w("fromFormatParser called with a locale of "+u+", but the format parser was created for "+n.locale);var l=n.explainFromTokens(e),d=l.result,h=l.zone,p=l.specificOffset,f=l.invalidReason;return f?t.invalid(f):pr(d,h,r,"format "+n.format,e,p)},i(t,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?or(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?or(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?or(this).weekday:NaN}},{key:"isWeekend",get:function(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}},{key:"localWeekday",get:function(){return this.isValid?ar(this).weekday:NaN}},{key:"localWeekNumber",get:function(){return this.isValid?ar(this).weekNumber:NaN}},{key:"localWeekYear",get:function(){return this.isValid?ar(this).weekYear:NaN}},{key:"ordinal",get:function(){return this.isValid?Ve(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Fn.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Fn.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Fn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Fn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.isUniversal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return ct(this.year)}},{key:"daysInMonth",get:function(){return lt(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?ut(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?pt(this.weekYear):NaN}},{key:"weeksInLocalWeekYear",get:function(){return this.isValid?pt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}}],[{key:"DATE_SHORT",get:function(){return _}},{key:"DATE_MED",get:function(){return T}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return k}},{key:"DATE_FULL",get:function(){return C}},{key:"DATE_HUGE",get:function(){return P}},{key:"TIME_SIMPLE",get:function(){return O}},{key:"TIME_WITH_SECONDS",get:function(){return I}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return M}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return j}},{key:"TIME_24_SIMPLE",get:function(){return R}},{key:"TIME_24_WITH_SECONDS",get:function(){return B}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return N}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return L}},{key:"DATETIME_SHORT",get:function(){return U}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return D}},{key:"DATETIME_MED",get:function(){return F}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return H}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return $}},{key:"DATETIME_FULL",get:function(){return V}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return K}},{key:"DATETIME_HUGE",get:function(){return G}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return z}}]),t}(Symbol.for("nodejs.util.inspect.custom"));function Or(e){if(Pr.isDateTime(e))return e;if(e&&e.valueOf&&Xe(e.valueOf()))return Pr.fromJSDate(e);if(e&&"object"==typeof e)return Pr.fromObject(e);throw new w("Unknown datetime argument: "+e+", of type "+typeof e)}n.DateTime=Pr,n.Duration=Nn,n.FixedOffsetZone=ye,n.IANAZone=Q,n.Info=Fn,n.Interval=Dn,n.InvalidZone=ge,n.Settings=Me,n.SystemZone=X,n.VERSION="3.5.0",n.Zone=W},{}],503:[function(e,t,n){"use strict";function r(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function i(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,r){"object"==typeof n&&void 0!==t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).marked={})}(void 0,(function(e){function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const o=/[&<>"']/,a=new RegExp(o.source,"g"),c=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,u=new RegExp(c.source,"g"),l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},d=e=>l[e];function h(e,t){if(t){if(o.test(e))return e.replace(a,d)}else if(c.test(e))return e.replace(u,d);return e}const p=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function f(e){return e.replace(p,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const m=/(^|[^\[])\^/g;function y(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(m,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}function g(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const b={exec:()=>null};function v(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function w(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const s=e.charAt(r-i-1);if(s!==t||n){if(s===t||!n)break;i++}else i++}return e.slice(0,r-i)}function x(e,t,n,r){const i=t.href,s=t.title?h(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:s,text:h(o)}}class E{constructor(t){s(this,"options",void 0),s(this,"rules",void 0),s(this,"lexer",void 0),this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:w(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=w(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=w(t[0].replace(/^ *>[ \t]?/gm,""),"\n"),n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o="",a="",c=!1;for(;e;){let n=!1;if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;o=t[0],e=e.substring(o.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),u=e.split("\n",1)[0],l=0;this.options.pedantic?(l=2,a=r.trimStart()):(l=t[2].search(/[^ ]/),l=l>4?1:l,a=r.slice(l),l+=t[1].length);let d=!1;if(!r&&/^ *$/.test(u)&&(o+=u+"\n",e=e.substring(u.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,l-1)}}#`);for(;e;){const c=e.split("\n",1)[0];if(u=c,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(u))break;if(s.test(u))break;if(t.test(u))break;if(n.test(e))break;if(u.search(/[^ ]/)>=l||!u.trim())a+="\n"+u.slice(l);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(i.test(r))break;if(s.test(r))break;if(n.test(r))break;a+="\n"+u}d||u.trim()||(d=!0),o+=c+"\n",e=e.substring(c.length+1),r=u.slice(l)}}i.loose||(c?i.loose=!0:/\n *\n *$/.test(o)&&(c=!0));let h,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(a),p&&(h="[ ] "!==p[0],a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:o,task:!!p,checked:h,loose:!1,text:a,tokens:[]}),i.raw+=o}i.items[i.items.length-1].raw=o.trimEnd(),i.items[i.items.length-1].text=a.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){const t=i.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));i.loose=n}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=v(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(const e of n)s.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of i)s.rows.push(v(e,s.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:h(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=w(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),x(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return x(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let i,s,o=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(s=[...i].length,r[3]||r[4]){o+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){a+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o+a);const t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+s);if(Math.min(n,s)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const u=c.slice(2,-2);return{type:"strong",raw:c,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=h(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=h(t[1]),n="mailto:"+e):(e=h(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=h(t[0]),r="mailto:"+e;else{let i;do{var n;i=t[0],t[0]=(null===(n=this.rules.inline._backpedal.exec(t[0]))||void 0===n?void 0:n[0])??""}while(i!==t[0]);e=h(t[0]),r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:h(t[0]),{type:"text",raw:t[0],text:e}}}}const S=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,A=/(?:[*+-]|\d{1,9}[.)])/,_=y(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,A).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),T=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,k=/(?!\s*\])(?:\\.|[^\[\]\\])+/,C=y(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",k).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P=y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,A).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",I=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,M=y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",I).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),j=y(T).replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),R={blockquote:y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",j).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:C,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:S,html:M,lheading:_,list:P,newline:/^(?: *(?:\n|$))+/,paragraph:j,table:b,text:/^[^\n]+/},B=y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),N={...R,table:B,paragraph:y(T).replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",B).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex()},L={...R,html:y("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",I).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:b,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(T).replace("hr",S).replace("heading"," *#{1,6} *[^\n]").replace("lheading",_).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},U=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,D=/^( {2,}|\\)\n(?!\s*$)/,F="\\p{P}\\p{S}",H=y(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,F).getRegex(),$=y(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,F).getRegex(),V=y("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,F).getRegex(),K=y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,F).getRegex(),G=y(/\\([punct])/,"gu").replace(/punct/g,F).getRegex(),z=y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),W=y(I).replace("(?:--\x3e|$)","--\x3e").getRegex(),q=y("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",W).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),X=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Y=y(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",X).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J=y(/^!?\[(label)\]\[(ref)\]/).replace("label",X).replace("ref",k).getRegex(),Z=y(/^!?\[(ref)\](?:\[\])?/).replace("ref",k).getRegex(),Q={_backpedal:b,anyPunctuation:G,autolink:z,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:D,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:b,emStrongLDelim:$,emStrongRDelimAst:V,emStrongRDelimUnd:K,escape:U,link:Y,nolink:Z,punctuation:H,reflink:J,reflinkSearch:y("reflink|nolink(?!\\()","g").replace("reflink",J).replace("nolink",Z).getRegex(),tag:q,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:b},ee={...Q,link:y(/^!?\[(label)\]\((.*?)\)/).replace("label",X).getRegex(),reflink:y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X).getRegex()},te={...Q,escape:y(U).replace("])","~|])").getRegex(),url:y(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},ne={...te,br:y(D).replace("{2,}","*").getRegex(),text:y(te.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},re={normal:R,gfm:N,pedantic:L},ie={normal:Q,gfm:te,breaks:ne,pedantic:ee};class se{constructor(t){s(this,"tokens",void 0),s(this,"options",void 0),s(this,"state",void 0),s(this,"tokenizer",void 0),s(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new E,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:re.normal,inline:ie.normal};this.options.pedantic?(n.block=re.pedantic,n.inline=ie.pedantic):this.options.gfm&&(n.block=re.gfm,this.options.breaks?n.inline=ie.breaks:n.inline=ie.gfm),this.tokenizer.rules=n}static get rules(){return{block:re,inline:ie}}static lex(e,t){return new se(t).lex(e)}static lexInline(e,t){return new se(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){let n,r,i,s;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))r=t[t.length-1],s&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,i,s,o,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),o=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class oe{constructor(t){s(this,"options",void 0),this.options=t||e.defaults}code(e,t,n){var r;const i=null===(r=(t||"").match(/^\S*/))||void 0===r?void 0:r[0];return e=e.replace(/\n$/,"")+"\n",i?'<pre><code class="language-'+h(i)+'">'+(n?e:h(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:h(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e,t,n){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const r=g(e);if(null===r)return n;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>",i}image(e,t,n){const r=g(e);if(null===r)return n;let i=`<img src="${e=r}" alt="${n}"`;return t&&(i+=` title="${t}"`),i+=">",i}text(e){return e}}class ae{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class ce{constructor(t){s(this,"options",void 0),s(this,"renderer",void 0),s(this,"textRenderer",void 0),this.options=t||e.defaults,this.options.renderer=this.options.renderer||new oe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ae}static parse(e,t){return new ce(t).parse(e)}static parseInline(e,t){return new ce(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const i=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}switch(i.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=i;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,f(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=i;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=i;let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(r);let s="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];r="";for(let t=0;t<n.length;t++)r+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});s+=this.renderer.tablerow(r)}n+=this.renderer.table(t,s);continue}case"blockquote":{const e=i,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=i,t=e.ordered,r=e.start,s=e.loose;let o="";for(let t=0;t<e.items.length;t++){const n=e.items[t],r=n.checked,i=n.task;let a="";if(n.task){const e=this.renderer.checkbox(!!r);s?n.tokens.length>0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,s),o+=this.renderer.listitem(a,i,!!r)}n+=this.renderer.list(o,t,r);continue}case"html":{const e=i;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=i;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let s=i,o=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1<e.length&&"text"===e[r+1].type;)s=e[++r],o+="\n"+(s.tokens?this.parseInline(s.tokens):s.text);n+=t?this.renderer.paragraph(o):o;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){const i=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=e||"";continue}}switch(i.type){case"escape":{const e=i;n+=t.text(e.text);break}case"html":{const e=i;n+=t.html(e.text);break}case"link":{const e=i;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=i;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=i;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=i;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=i;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=i;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=i;n+=t.text(e.text);break}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class ue{constructor(t){s(this,"options",void 0),this.options=t||e.defaults}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}s(ue,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var le=new WeakSet;class de{constructor(...e){r(this,le),s(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),s(this,"options",this.setOptions),s(this,"parse",i(le,this,he).call(this,se.lex,ce.parse)),s(this,"parseInline",i(le,this,he).call(this,se.lexInline,ce.parseInline)),s(this,"Parser",ce),s(this,"Renderer",oe),s(this,"TextRenderer",ae),s(this,"Lexer",se),s(this,"Tokenizer",E),s(this,"Hooks",ue),this.use(...e)}walkTokens(e,t){let n=[];for(const i of e)switch(n=n.concat(t.call(this,i)),i.type){case"table":{const e=i;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=i;n=n.concat(this.walkTokens(e.items,t));break}default:{var r;const e=i;null!==(r=this.defaults.extensions)&&void 0!==r&&null!==(r=r.childTokens)&&void 0!==r&&r[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new oe(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,i=e.renderer[r],s=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=s.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new E(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,i=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new ue;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,i=e.hooks[r],s=t[r];ue.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then((e=>s.call(t,e)));const n=i.call(t,e);return s.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return se.lex(e,t??this.defaults)}parser(e,t){return ce.parse(e,t??this.defaults)}}function he(e,t){return(n,r)=>{const s={...r},o={...this.defaults,...s};!0===this.defaults.async&&!1===s.async&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const a=i(le,this,pe).call(this,!!o.silent,!!o.async);if(null==n)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then((t=>e(t,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>t(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(a);try{o.hooks&&(n=o.hooks.preprocess(n));let r=e(n,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=t(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(e){return a(e)}}}function pe(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+h(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}const fe=new de;function me(e,t){return fe.parse(e,t)}me.options=me.setOptions=function(e){return fe.setOptions(e),me.defaults=fe.defaults,n(me.defaults),me},me.getDefaults=t,me.defaults=e.defaults,me.use=function(...e){return fe.use(...e),me.defaults=fe.defaults,n(me.defaults),me},me.walkTokens=function(e,t){return fe.walkTokens(e,t)},me.parseInline=fe.parseInline,me.Parser=ce,me.parser=ce.parse,me.Renderer=oe,me.TextRenderer=ae,me.Lexer=se,me.lexer=se.lex,me.Tokenizer=E,me.Hooks=ue,me.parse=me;const ye=me.options,ge=me.setOptions,be=me.use,ve=me.walkTokens,we=me.parseInline,xe=me,Ee=ce.parse,Se=se.lex;e.Hooks=ue,e.Lexer=se,e.Marked=de,e.Parser=ce,e.Renderer=oe,e.TextRenderer=ae,e.Tokenizer=E,e.getDefaults=t,e.lexer=Se,e.marked=me,e.options=ye,e.parse=xe,e.parseInline=we,e.parser=Ee,e.setOptions=ge,e.use=be,e.walkTokens=ve}))},{}],504:[function(e,t,n){let{urlAlphabet:r}=e("./url-alphabet/index.cjs"),i=e=>crypto.getRandomValues(new Uint8Array(e)),s=(e,t,n)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*r*t/e.length);return(s=t)=>{let o="";for(;;){let t=n(i),a=0|i;for(;a--;)if(o+=e[t[a]&r]||"",o.length===s)return o}}};t.exports={nanoid:(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),""),customAlphabet:(e,t=21)=>s(e,t,i),customRandom:s,urlAlphabet:r,random:i}},{"./url-alphabet/index.cjs":505}],505:[function(e,t,n){t.exports={urlAlphabet:"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"}},{}],506:[function(e,t,n){var r=e("wrappy");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)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}t.exports=r(i),t.exports.strict=r(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})}))},{wrappy:579}],507:[function(e,t,n){"use strict";const{ErrorWithCause:r}=e("./lib/error-with-cause"),{findCauseByReference:i,getErrorCause:s,messageWithCauses:o,stackWithCauses:a}=e("./lib/helpers");t.exports={ErrorWithCause:r,findCauseByReference:i,getErrorCause:s,stackWithCauses:a,messageWithCauses:o}},{"./lib/error-with-cause":508,"./lib/helpers":509}],508:[function(e,t,n){"use strict";class r extends Error{constructor(e,{cause:t}={}){super(e),this.name=r.name,t&&(this.cause=t),this.message=e}}t.exports={ErrorWithCause:r}},{}],509:[function(e,t,n){"use strict";const r=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"==typeof e.cause){const t=e.cause();return t instanceof Error?t:void 0}return e.cause instanceof Error?e.cause:void 0}},i=(e,t)=>{if(!(e instanceof Error))return"";const n=e.stack||"";if(t.has(e))return n+"\ncauses have become circular...";const s=r(e);return s?(t.add(e),n+"\ncaused by: "+i(s,t)):n},s=(e,t,n)=>{if(!(e instanceof Error))return"";const i=n?"":e.message||"";if(t.has(e))return i+": ...";const o=r(e);if(o){t.add(e);const n="cause"in e&&"function"==typeof e.cause;return i+(n?"":": ")+s(o,t,n)}return i};t.exports={findCauseByReference:(e,t)=>{if(!e||!t)return;if(!(e instanceof Error))return;if(!(t.prototype instanceof Error)&&t!==Error)return;const n=new Set;let i=e;for(;i&&!n.has(i);){if(n.add(i),i instanceof t)return i;i=r(i)}},getErrorCause:r,stackWithCauses:e=>i(e,new Set),messageWithCauses:e=>s(e,new Set)}},{}],510:[function(e,t,n){var r,i,s=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var u,l=[],d=!1,h=-1;function p(){d&&u&&(d=!1,u.length?l=u.concat(l):h=-1,l.length&&f())}function f(){if(!d){var e=c(p);d=!0;for(var t=l.length;t;){for(u=l,l=[];++h<t;)u&&u[h].run();h=-1,t=l.length}u=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function y(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new m(e,t)),1!==l.length||d||c(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=y,s.addListener=y,s.once=y,s.off=y,s.removeListener=y,s.removeAllListeners=y,s.emit=y,s.prependListener=y,s.prependOnceListener=y,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],511:[function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function s(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,o,a;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))a="The ".concat(e," ").concat(r," ").concat(s(t,"type"));else{var c=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(r," ").concat(s(t,"type"))}return a+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},{}],512:[function(e,t,n){(function(n){(function(){"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=u;var i=e("./_stream_readable"),s=e("./_stream_writable");e("inherits")(u,i);for(var o=r(s.prototype),a=0;a<o.length;a++){var c=o[a];u.prototype[c]||(u.prototype[c]=s.prototype[c])}function u(e){if(!(this instanceof u))return new u(e);i.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return 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)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":514,"./_stream_writable":516,_process:510,inherits:498}],513:[function(e,t,n){"use strict";t.exports=i;var r=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}e("inherits")(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":515,inherits:498}],514:[function(e,t,n){(function(n,r){(function(){"use strict";var i;t.exports=_,_.ReadableState=A;e("events").EventEmitter;var s=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),a=e("buffer").Buffer,c=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,l=e("util");u=l&&l.debuglog?l.debuglog("stream"):function(){};var d,h,p,f=e("./internal/streams/buffer_list"),m=e("./internal/streams/destroy"),y=e("./internal/streams/state").getHighWaterMark,g=e("../errors").codes,b=g.ERR_INVALID_ARG_TYPE,v=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,x=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(_,o);var E=m.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(t,n,r){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof r&&(r=n instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",r),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=e("string_decoder/").StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function _(t){if(i=i||e("./_stream_duplex"),!(this instanceof _))return new _(t);var n=this instanceof i;this._readableState=new A(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function T(e,t,n,r,i){u("readableAddChunk",t);var s,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,I(e)))}(e,o);else if(i||(s=function(e,t){var n;r=t,a.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(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)),r)o.endEmitted?E(e,new x):k(e,o,t,!0);else if(o.ended)E(e,new v);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?k(e,o,t,!1):M(e,o)):k(e,o,t,!1)}else r||(o.reading=!1,M(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function k(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),M(e,t)}Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=m.destroy,_.prototype._undestroy=m.undestroy,_.prototype._destroy=function(e,t){t(e)},_.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=a.from(e,t),t=""),n=!0),T(this,e,t,!1,n)},_.prototype.unshift=function(e){return T(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(t){d||(d=e("string_decoder/").StringDecoder);var n=new d(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=n.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var C=1073741824;function P(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>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(I,e))}function I(e){var t=e._readableState;u("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,L(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(j,e,t))}function j(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(u("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function R(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 B(e){u("readable nexttick read 0"),e.read(0)}function N(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function U(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function D(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function H(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}_.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):O(this),null;if(0===(e=P(e,t))&&t.ended)return 0===t.length&&D(this),null;var r,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=P(n,t))),null===(r=e>0?U(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),n!==e&&t.ended&&D(this)),null!==r&&this.emit("data",r),r},_.prototype._read=function(e){E(this,new w("_read()"))},_.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:y;function a(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",f),e.removeListener("finish",m),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",a),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",h),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){u("onend"),e.end()}i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,L(e))}}(r);e.on("drain",l);var d=!1;function h(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==H(i.pipes,e))&&!d&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(t){u("onerror",t),y(),e.removeListener("error",p),0===s(e,"error")&&E(e,t)}function f(){e.removeListener("finish",m),y()}function m(){u("onfinish"),e.removeListener("close",f),y()}function y(){u("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",p),e.once("close",f),e.once("finish",m),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,n={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,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)r[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=H(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,n)),this},_.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?O(this):i.reading||n.nextTick(B,this))),r},_.prototype.addListener=_.prototype.on,_.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(R,this),r},_.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(R,this),t},_.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},_.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},_.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.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<S.length;s++)e.on(S[s],this.emit.bind(this,S[s]));return this._read=function(t){u("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(_.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=e("./internal/streams/async_iterator")),h(this)}),Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(_.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(_.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),_._fromList=U,Object.defineProperty(_.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(_.from=function(t,n){return void 0===p&&(p=e("./internal/streams/from")),p(_,t,n)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":511,"./_stream_duplex":512,"./internal/streams/async_iterator":517,"./internal/streams/buffer_list":518,"./internal/streams/destroy":519,"./internal/streams/from":521,"./internal/streams/state":523,"./internal/streams/stream":524,_process:510,buffer:385,events:452,inherits:498,"string_decoder/":573,util:384}],515:[function(e,t,n){"use strict";t.exports=l;var r=e("../errors").codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,s=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,c=e("./_stream_duplex");function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new s);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(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);c.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,n){h(e,t,n)}))}function h(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(l,c),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,n){n(new i("_transform()"))},l.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.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){c.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":511,"./_stream_duplex":512,inherits:498}],516:[function(e,t,n){(function(n,r){(function(){"use strict";function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var s;t.exports=_,_.WritableState=A;var o={deprecate:e("util-deprecate")},a=e("./internal/streams/stream"),c=e("buffer").Buffer,u=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l,d=e("./internal/streams/destroy"),h=e("./internal/streams/state").getHighWaterMark,p=e("../errors").codes,f=p.ERR_INVALID_ARG_TYPE,m=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,g=p.ERR_STREAM_CANNOT_PIPE,b=p.ERR_STREAM_DESTROYED,v=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,x=p.ERR_UNKNOWN_ENCODING,E=d.errorOrDestroy;function S(){}function A(t,r,o){s=s||e("./_stream_duplex"),t=t||{},"boolean"!=typeof o&&(o=r instanceof s),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,s=r.writecb;if("function"!=typeof s)throw new y;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,s){--t.pendingcb,r?(n.nextTick(s,i),n.nextTick(I,e,t),e._writableState.errorEmitted=!0,E(e,i)):(s(i),e._writableState.errorEmitted=!0,E(e,i),I(e,t))}(e,r,i,t,s);else{var o=P(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||C(e,r),i?n.nextTick(k,e,r,o,s):k(e,r,o,s)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function _(t){var n=this instanceof(s=s||e("./_stream_duplex"));if(!n&&!l.call(_,this))return new _(t);this._writableState=new A(t,this,n),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function T(e,t,n,r,i,s,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):n?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function k(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),I(e,t)}function C(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,s=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,c=!0;n;)s[a]=n,n.isBuf||(c=!1),n=n.next,a+=1;s.allBuffers=c,T(e,t,!0,t.length,s,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,d=n.callback;if(T(e,t,!1,t.objectMode?1:u.length,u,l,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(n){t.pendingcb--,n&&E(e,n),t.prefinished=!0,e.emit("prefinish"),I(e,t)}))}function I(e,t){var r=P(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,n.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}e("inherits")(_,a),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.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(_,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===_&&(e&&e._writableState instanceof A)}})):l=function(e){return e instanceof this},_.prototype.pipe=function(){E(this,new g)},_.prototype.write=function(e,t,r){var i,s=this._writableState,o=!1,a=!s.objectMode&&(i=e,c.isBuffer(i)||i instanceof u);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=S),s.ending?function(e,t){var r=new w;E(e,r),n.nextTick(t,r)}(this,r):(a||function(e,t,r,i){var s;return null===r?s=new v:"string"==typeof r||t.objectMode||(s=new f("chunk",["string","Buffer"],r)),!s||(E(e,s),n.nextTick(i,s),!1)}(this,s,e,r))&&(s.pendingcb++,o=function(e,t,n,r,i,s){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,n));return t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:s,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,a,r,i,s);return u}(this,s,a,e,t,r)),o},_.prototype.cork=function(){this._writableState.corked++},_.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||C(this,e))},_.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 x(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(_.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(e,t,n){n(new m("_write()"))},_.prototype._writev=null,_.prototype.end=function(e,t,r){var i=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),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,I(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(_.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),_.prototype.destroy=d.destroy,_.prototype._undestroy=d.undestroy,_.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":511,"./_stream_duplex":512,"./internal/streams/destroy":519,"./internal/streams/state":523,"./internal/streams/stream":524,_process:510,buffer:385,inherits:498,"util-deprecate":576}],517:[function(e,t,n){(function(n){(function(){"use strict";var r;function i(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=e("./end-of-stream"),o=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),d=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function f(e){var t=e[o];if(null!==t){var n=e[h].read();null!==n&&(e[l]=null,e[o]=null,e[a]=null,t(p(n,!1)))}}function m(e){n.nextTick(f,e)}var y=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((i(r={get stream(){return this[h]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){n.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(p(void 0,!0)):t[d](n,r)}),r)}}(i,this));else{var s=this[h].read();if(null!==s)return Promise.resolve(p(s,!1));r=new Promise(this[d])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[h].destroy(null,(function(e){e?n(e):t(p(void 0,!0))}))}))})),r),y);t.exports=function(e){var t,n=Object.create(g,(i(t={},h,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,d,{value:function(e,t){var r=n[h].read();r?(n[l]=null,n[o]=null,n[a]=null,e(p(r,!1))):(n[o]=e,n[a]=t)},writable:!0}),t));return n[l]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[l]=null,n[o]=null,n[a]=null,t(e)),void(n[c]=e)}var r=n[o];null!==r&&(n[l]=null,n[o]=null,n[a]=null,r(p(void 0,!0))),n[u]=!0})),e.on("readable",m.bind(null,n)),n}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":520,_process:510}],518:[function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var c=e("buffer").Buffer,u=e("util").inspect,l=u&&u.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,r;return t=e,(n=[{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,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t,n,r,i=c.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,n=i,r=o,c.prototype.copy.call(t,n,r),o+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?r+=i:r+=i.slice(0,e),0==(e-=s)){s===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(s));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return u(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,n),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:385,util:384}],519:[function(e,t,n){(function(e){(function(){"use strict";function n(e,t){i(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,s){var o=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(s?s(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!s&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(r,o):(o._writableState.errorEmitted=!0,e.nextTick(n,o,t)):e.nextTick(n,o,t):s?(e.nextTick(r,o),s(t)):e.nextTick(r,o)})),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 n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:510}],520:[function(e,t,n){"use strict";var r=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,n,s){if("function"==typeof n)return e(t,null,n);n||(n={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(s||i);var o=n.readable||!1!==n.readable&&t.readable,a=n.writable||!1!==n.writable&&t.writable,c=function(){t.writable||l()},u=t._writableState&&t._writableState.finished,l=function(){a=!1,u=!0,o||s.call(t)},d=t._readableState&&t._readableState.endEmitted,h=function(){o=!1,d=!0,a||s.call(t)},p=function(e){s.call(t,e)},f=function(){var e;return o&&!d?(t._readableState&&t._readableState.ended||(e=new r),s.call(t,e)):a&&!u?(t._writableState&&t._writableState.ended||(e=new r),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",c),t.on("close",c)):(t.on("complete",l),t.on("abort",f),t.req?m():t.on("request",m)),t.on("end",h),t.on("finish",l),!1!==n.error&&t.on("error",p),t.on("close",f),function(){t.removeListener("complete",l),t.removeListener("abort",f),t.removeListener("request",m),t.req&&t.req.removeListener("finish",l),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",l),t.removeListener("end",h),t.removeListener("error",p),t.removeListener("close",f)}}},{"../../../errors":511}],521:[function(e,t,n){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],522:[function(e,t,n){"use strict";var r;var i=e("../../../errors").codes,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e){e()}function u(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var l,d=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(n);if(Array.isArray(n[0])&&(n=n[0]),n.length<2)throw new s("streams");var h=n.map((function(t,i){var s=i<n.length-1;return function(t,n,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;t.on("close",(function(){a=!0})),void 0===r&&(r=e("./end-of-stream")),r(t,{readable:n,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var c=!1;return function(e){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void s(e||new o("pipe"))}}(t,s,i>0,(function(e){l||(l=e),e&&h.forEach(c),s||(h.forEach(c),d(l))}))}));return n.reduce(u)}},{"../../../errors":511,"./end-of-stream":520}],523:[function(e,t,n){"use strict";var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,n,i){var s=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new r(i?n:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},{"../../../errors":511}],524:[function(e,t,n){t.exports=e("events").EventEmitter},{events:452}],525:[function(e,t,n){(n=t.exports=e("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js"),n.finished=e("./lib/internal/streams/end-of-stream.js"),n.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":512,"./lib/_stream_passthrough.js":513,"./lib/_stream_readable.js":514,"./lib/_stream_transform.js":515,"./lib/_stream_writable.js":516,"./lib/internal/streams/end-of-stream.js":520,"./lib/internal/streams/pipeline.js":522}],526:[function(e,t,n){(function(e){(function(){"use strict";function n(t){return t instanceof e?e.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}t.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 i(s,e);if(s instanceof Map)return new Map(i(Array.from(s),e));if(s instanceof Set)return new Set(i(Array.from(s),e));var o={};for(var a in t.push(s),r.push(o),s){var c=s[a];if("object"!=typeof c||null===c)o[a]=c;else if(c instanceof Date)o[a]=new Date(c);else if(c instanceof Map)o[a]=new Map(i(Array.from(c),e));else if(c instanceof Set)o[a]=new Set(i(Array.from(c),e));else if(ArrayBuffer.isView(c))o[a]=n(c);else{var u=t.indexOf(c);o[a]=-1!==u?r[u]:e(c)}}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 i(s,e);if(s instanceof Map)return new Map(i(Array.from(s),e));if(s instanceof Set)return new Set(i(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 c=s[a];if("object"!=typeof c||null===c)o[a]=c;else if(c instanceof Date)o[a]=new Date(c);else if(c instanceof Map)o[a]=new Map(i(Array.from(c),e));else if(c instanceof Set)o[a]=new Set(i(Array.from(c),e));else if(ArrayBuffer.isView(c))o[a]=n(c);else{var u=t.indexOf(c);o[a]=-1!==u?r[u]:e(c)}}return t.pop(),r.pop(),o};function i(e,i){for(var s=Object.keys(e),o=new Array(s.length),a=0;a<s.length;a++){var c=s[a],u=e[c];if("object"!=typeof u||null===u)o[c]=u;else if(u instanceof Date)o[c]=new Date(u);else if(ArrayBuffer.isView(u))o[c]=n(u);else{var l=t.indexOf(u);o[c]=-1!==l?r[l]:i(u)}}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 i={};for(var s in r){var o=r[s];"object"!=typeof o||null===o?i[s]=o:o instanceof Date?i[s]=new Date(o):o instanceof Map?i[s]=new Map(t(Array.from(o),e)):o instanceof Set?i[s]=new Set(t(Array.from(o),e)):ArrayBuffer.isView(o)?i[s]=n(o):i[s]=e(o)}return i}: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 i={};for(var s in r)if(!1!==Object.hasOwnProperty.call(r,s)){var o=r[s];"object"!=typeof o||null===o?i[s]=o:o instanceof Date?i[s]=new Date(o):o instanceof Map?i[s]=new Map(t(Array.from(o),e)):o instanceof Set?i[s]=new Set(t(Array.from(o),e)):ArrayBuffer.isView(o)?i[s]=n(o):i[s]=e(o)}return i};function t(e,t){for(var r=Object.keys(e),i=new Array(r.length),s=0;s<r.length;s++){var o=r[s],a=e[o];"object"!=typeof a||null===a?i[o]=a:a instanceof Date?i[o]=new Date(a):ArrayBuffer.isView(a)?i[o]=n(a):i[o]=t(a)}return i}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:385}],527:[function(e,t,n){
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var r=e("buffer"),i=r.Buffer;function s(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(s(r,n),n.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},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 r.SlowBuffer(e)}},{buffer:385}],528:[function(e,t,n){const r=Symbol("SemVer ANY");class i{static get ANY(){return r}constructor(e,t){if(t=s(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):(!(t=s(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}t.exports=i;const s=e("../internal/parse-options"),{safeRe:o,t:a}=e("../internal/re"),c=e("../functions/cmp"),u=e("../internal/debug"),l=e("./semver"),d=e("./range")},{"../functions/cmp":532,"../internal/debug":557,"../internal/parse-options":560,"../internal/re":561,"./range":529,"./semver":530}],529:[function(e,t,n){const r=/\s+/g;class i{constructor(e,t){if(t=o(t),e instanceof i)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new i(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(r," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&m)|(this.options.loose&&y))+":"+e,n=s.get(t);if(n)return n;const r=this.options.loose,i=r?l[d.HYPHENRANGELOOSE]:l[d.HYPHENRANGE];e=e.replace(i,O(this.options.includePrerelease)),c("hyphen replace",e),e=e.replace(l[d.COMPARATORTRIM],h),c("comparator trim",e),e=e.replace(l[d.TILDETRIM],p),c("tilde trim",e),e=e.replace(l[d.CARETTRIM],f),c("caret trim",e);let o=e.split(" ").map((e=>w(e,this.options))).join(" ").split(/\s+/).map((e=>P(e,this.options)));r&&(o=o.filter((e=>(c("loose invalid filter",e,this.options),!!e.match(l[d.COMPARATORLOOSE]))))),c("range list",o);const u=new Map,b=o.map((e=>new a(e,this.options)));for(const e of b){if(g(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");const v=[...u.values()];return s.set(t,v),v}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Range is required");return this.set.some((n=>v(n,t)&&e.set.some((e=>v(e,t)&&n.every((n=>e.every((e=>n.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(I(this.set[t],e,this.options))return!0;return!1}}t.exports=i;const s=new(e("../internal/lrucache")),o=e("../internal/parse-options"),a=e("./comparator"),c=e("../internal/debug"),u=e("./semver"),{safeRe:l,t:d,comparatorTrimReplace:h,tildeTrimReplace:p,caretTrimReplace:f}=e("../internal/re"),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=e("../internal/constants"),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,v=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},w=(e,t)=>(c("comp",e,t),e=A(e,t),c("caret",e),e=E(e,t),c("tildes",e),e=T(e,t),c("xrange",e),e=C(e,t),c("stars",e),e),x=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const n=t.loose?l[d.TILDELOOSE]:l[d.TILDE];return e.replace(n,((t,n,r,i,s)=>{let o;return c("tilde",e,t,n,r,i,s),x(n)?o="":x(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:x(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(c("replaceTilde pr",s),o=`>=${n}.${r}.${i}-${s} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,c("tilde return",o),o}))},A=(e,t)=>e.trim().split(/\s+/).map((e=>_(e,t))).join(" "),_=(e,t)=>{c("caret",e,t);const n=t.loose?l[d.CARETLOOSE]:l[d.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,s,o)=>{let a;return c("caret",e,t,n,i,s,o),x(n)?a="":x(i)?a=`>=${n}.0.0${r} <${+n+1}.0.0-0`:x(s)?a="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(c("replaceCaret pr",o),a="0"===n?"0"===i?`>=${n}.${i}.${s}-${o} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s}-${o} <${+n+1}.0.0-0`):(c("no pr"),a="0"===n?"0"===i?`>=${n}.${i}.${s}${r} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s} <${+n+1}.0.0-0`),c("caret return",a),a}))},T=(e,t)=>(c("replaceXRanges",e,t),e.split(/\s+/).map((e=>k(e,t))).join(" ")),k=(e,t)=>{e=e.trim();const n=t.loose?l[d.XRANGELOOSE]:l[d.XRANGE];return e.replace(n,((n,r,i,s,o,a)=>{c("xRange",e,n,r,i,s,o,a);const u=x(i),l=u||x(s),d=l||x(o),h=d;return"="===r&&h&&(r=""),a=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&h?(l&&(s=0),o=0,">"===r?(r=">=",l?(i=+i+1,s=0,o=0):(s=+s+1,o=0)):"<="===r&&(r="<",l?i=+i+1:s=+s+1),"<"===r&&(a="-0"),n=`${r+i}.${s}.${o}${a}`):l?n=`>=${i}.0.0${a} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${s}.0${a} <${i}.${+s+1}.0-0`),c("xRange return",n),n}))},C=(e,t)=>(c("replaceStars",e,t),e.trim().replace(l[d.STAR],"")),P=(e,t)=>(c("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),O=e=>(t,n,r,i,s,o,a,c,u,l,d,h)=>`${n=x(r)?"":x(i)?`>=${r}.0.0${e?"-0":""}`:x(s)?`>=${r}.${i}.0${e?"-0":""}`:o?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=x(u)?"":x(l)?`<${+u+1}.0.0-0`:x(d)?`<${u}.${+l+1}.0-0`:h?`<=${u}.${l}.${d}-${h}`:e?`<${u}.${l}.${+d+1}-0`:`<=${c}`}`.trim(),I=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(c(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},{"../internal/constants":556,"../internal/debug":557,"../internal/lrucache":559,"../internal/parse-options":560,"../internal/re":561,"./comparator":528,"./semver":530}],530:[function(e,t,n){const r=e("../internal/debug"),{MAX_LENGTH:i,MAX_SAFE_INTEGER:s}=e("../internal/constants"),{safeRe:o,t:a}=e("../internal/re"),c=e("../internal/parse-options"),{compareIdentifiers:u}=e("../internal/identifiers");class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[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");n[4]?this.prerelease=n[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=n[5]?n[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(r("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],i=e.prerelease[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return u(n,i)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const n=this.build[t],i=e.build[t];if(r("build compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return u(n,i)}while(++t)}inc(e,t,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}t.exports=l},{"../internal/constants":556,"../internal/debug":557,"../internal/identifiers":558,"../internal/parse-options":560,"../internal/re":561}],531:[function(e,t,n){const r=e("./parse");t.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},{"./parse":547}],532:[function(e,t,n){const r=e("./eq"),i=e("./neq"),s=e("./gt"),o=e("./gte"),a=e("./lt"),c=e("./lte");t.exports=(e,t,n,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,u);case"!=":return i(e,n,u);case">":return s(e,n,u);case">=":return o(e,n,u);case"<":return a(e,n,u);case"<=":return c(e,n,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},{"./eq":538,"./gt":539,"./gte":540,"./lt":542,"./lte":543,"./neq":546}],533:[function(e,t,n){const r=e("../classes/semver"),i=e("./parse"),{safeRe:s,t:o}=e("../internal/re");t.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?s[o.COERCERTLFULL]:s[o.COERCERTL];let i;for(;(i=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&i.index+i[0].length===n.index+n[0].length||(n=i),r.lastIndex=i.index+i[1].length+i[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?s[o.COERCEFULL]:s[o.COERCE]);if(null===n)return null;const a=n[2],c=n[3]||"0",u=n[4]||"0",l=t.includePrerelease&&n[5]?`-${n[5]}`:"",d=t.includePrerelease&&n[6]?`+${n[6]}`:"";return i(`${a}.${c}.${u}${l}${d}`,t)}},{"../classes/semver":530,"../internal/re":561,"./parse":547}],534:[function(e,t,n){const r=e("../classes/semver");t.exports=(e,t,n)=>{const i=new r(e,n),s=new r(t,n);return i.compare(s)||i.compareBuild(s)}},{"../classes/semver":530}],535:[function(e,t,n){const r=e("./compare");t.exports=(e,t)=>r(e,t,!0)},{"./compare":536}],536:[function(e,t,n){const r=e("../classes/semver");t.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},{"../classes/semver":530}],537:[function(e,t,n){const r=e("./parse.js");t.exports=(e,t)=>{const n=r(e,null,!0),i=r(t,null,!0),s=n.compare(i);if(0===s)return null;const o=s>0,a=o?n:i,c=o?i:n,u=!!a.prerelease.length;if(!!c.prerelease.length&&!u)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=u?"pre":"";return n.major!==i.major?l+"major":n.minor!==i.minor?l+"minor":n.patch!==i.patch?l+"patch":"prerelease"}},{"./parse.js":547}],538:[function(e,t,n){const r=e("./compare");t.exports=(e,t,n)=>0===r(e,t,n)},{"./compare":536}],539:[function(e,t,n){const r=e("./compare");t.exports=(e,t,n)=>r(e,t,n)>0},{"./compare":536}],540:[function(e,t,n){const r=e("./compare");t.exports=(e,t,n)=>r(e,t,n)>=0},{"./compare":536}],541:[function(e,t,n){const r=e("../classes/semver");t.exports=(e,t,n,i,s)=>{"string"==typeof n&&(s=i,i=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,i,s).version}catch(e){return null}}},{"../classes/semver":530}],542:[function(e,t,n){const r=e("./compare");t.exports=(e,t,n)=>r(e,t,n)<0},{"./compare":536}],543:[function(e,t,n){const r=e("./compare");t.exports=(e,t,n)=>r(e,t,n)<=0},{"./compare":536}],544:[function(e,t,n){const r=e("../classes/semver");t.exports=(e,t)=>new r(e,t).major},{"../classes/semver":530}],545:[function(e,t,n){const r=e("../classes/semver");t.exports=(e,t)=>new r(e,t).minor},{"../classes/semver":530}],546:[function(e,t,n){const r=e("./compare");t.exports=(e,t,n)=>0!==r(e,t,n)},{"./compare":536}],547:[function(e,t,n){const r=e("../classes/semver");t.exports=(e,t,n=!1)=>{if(e instanceof r)return e;try{return new r(e,t)}catch(e){if(!n)return null;throw e}}},{"../classes/semver":530}],548:[function(e,t,n){const r=e("../classes/semver");t.exports=(e,t)=>new r(e,t).patch},{"../classes/semver":530}],549:[function(e,t,n){const r=e("./parse");t.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},{"./parse":547}],550:[function(e,t,n){const r=e("./compare");t.exports=(e,t,n)=>r(t,e,n)},{"./compare":536}],551:[function(e,t,n){const r=e("./compare-build");t.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},{"./compare-build":534}],552:[function(e,t,n){const r=e("../classes/range");t.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},{"../classes/range":529}],553:[function(e,t,n){const r=e("./compare-build");t.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},{"./compare-build":534}],554:[function(e,t,n){const r=e("./parse");t.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},{"./parse":547}],555:[function(e,t,n){const r=e("./internal/re"),i=e("./internal/constants"),s=e("./classes/semver"),o=e("./internal/identifiers"),a=e("./functions/parse"),c=e("./functions/valid"),u=e("./functions/clean"),l=e("./functions/inc"),d=e("./functions/diff"),h=e("./functions/major"),p=e("./functions/minor"),f=e("./functions/patch"),m=e("./functions/prerelease"),y=e("./functions/compare"),g=e("./functions/rcompare"),b=e("./functions/compare-loose"),v=e("./functions/compare-build"),w=e("./functions/sort"),x=e("./functions/rsort"),E=e("./functions/gt"),S=e("./functions/lt"),A=e("./functions/eq"),_=e("./functions/neq"),T=e("./functions/gte"),k=e("./functions/lte"),C=e("./functions/cmp"),P=e("./functions/coerce"),O=e("./classes/comparator"),I=e("./classes/range"),M=e("./functions/satisfies"),j=e("./ranges/to-comparators"),R=e("./ranges/max-satisfying"),B=e("./ranges/min-satisfying"),N=e("./ranges/min-version"),L=e("./ranges/valid"),U=e("./ranges/outside"),D=e("./ranges/gtr"),F=e("./ranges/ltr"),H=e("./ranges/intersects"),$=e("./ranges/simplify"),V=e("./ranges/subset");t.exports={parse:a,valid:c,clean:u,inc:l,diff:d,major:h,minor:p,patch:f,prerelease:m,compare:y,rcompare:g,compareLoose:b,compareBuild:v,sort:w,rsort:x,gt:E,lt:S,eq:A,neq:_,gte:T,lte:k,cmp:C,coerce:P,Comparator:O,Range:I,satisfies:M,toComparators:j,maxSatisfying:R,minSatisfying:B,minVersion:N,validRange:L,outside:U,gtr:D,ltr:F,intersects:H,simplifyRange:$,subset:V,SemVer:s,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}},{"./classes/comparator":528,"./classes/range":529,"./classes/semver":530,"./functions/clean":531,"./functions/cmp":532,"./functions/coerce":533,"./functions/compare":536,"./functions/compare-build":534,"./functions/compare-loose":535,"./functions/diff":537,"./functions/eq":538,"./functions/gt":539,"./functions/gte":540,"./functions/inc":541,"./functions/lt":542,"./functions/lte":543,"./functions/major":544,"./functions/minor":545,"./functions/neq":546,"./functions/parse":547,"./functions/patch":548,"./functions/prerelease":549,"./functions/rcompare":550,"./functions/rsort":551,"./functions/satisfies":552,"./functions/sort":553,"./functions/valid":554,"./internal/constants":556,"./internal/identifiers":558,"./internal/re":561,"./ranges/gtr":562,"./ranges/intersects":563,"./ranges/ltr":564,"./ranges/max-satisfying":565,"./ranges/min-satisfying":566,"./ranges/min-version":567,"./ranges/outside":568,"./ranges/simplify":569,"./ranges/subset":570,"./ranges/to-comparators":571,"./ranges/valid":572}],556:[function(e,t,n){const r=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},{}],557:[function(e,t,n){(function(e){(function(){const n=("object"==typeof e&&e.env,()=>{});t.exports=n}).call(this)}).call(this,e("_process"))},{_process:510}],558:[function(e,t,n){const r=/^[0-9]+$/,i=(e,t)=>{const n=r.test(e),i=r.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:e<t?-1:1};t.exports={compareIdentifiers:i,rcompareIdentifiers:(e,t)=>i(t,e)}},{}],559:[function(e,t,n){t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},{}],560:[function(e,t,n){const r=Object.freeze({loose:!0}),i=Object.freeze({});t.exports=e=>e?"object"!=typeof e?r:e:i},{}],561:[function(e,t,n){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:s}=e("./constants"),o=e("./debug"),a=(n=t.exports={}).re=[],c=n.safeRe=[],u=n.src=[],l=n.t={};let d=0;const h="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",s],[h,i]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=d++;o(e,i,t),l[e]=i,u[i]=t,a[i]=new RegExp(t,n?"g":void 0),c[i]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),f("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${h}+`),f("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),f("FULL",`^${u[l.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),f("LOOSE",`^${u[l.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),f("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),f("COERCE",`${u[l.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",u[l.COERCEPLAIN]+`(?:${u[l.PRERELEASE]})?`+`(?:${u[l.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",u[l.COERCE],!0),f("COERCERTLFULL",u[l.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),n.tildeTrimReplace="$1~",f("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),n.caretTrimReplace="$1^",f("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),n.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},{"./constants":556,"./debug":557}],562:[function(e,t,n){const r=e("./outside");t.exports=(e,t,n)=>r(e,t,">",n)},{"./outside":568}],563:[function(e,t,n){const r=e("../classes/range");t.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t,n))},{"../classes/range":529}],564:[function(e,t,n){const r=e("./outside");t.exports=(e,t,n)=>r(e,t,"<",n)},{"./outside":568}],565:[function(e,t,n){const r=e("../classes/semver"),i=e("../classes/range");t.exports=(e,t,n)=>{let s=null,o=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==o.compare(e)||(s=e,o=new r(s,n)))})),s}},{"../classes/range":529,"../classes/semver":530}],566:[function(e,t,n){const r=e("../classes/semver"),i=e("../classes/range");t.exports=(e,t,n)=>{let s=null,o=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==o.compare(e)||(s=e,o=new r(s,n)))})),s}},{"../classes/range":529,"../classes/semver":530}],567:[function(e,t,n){const r=e("../classes/semver"),i=e("../classes/range"),s=e("../functions/gt");t.exports=(e,t)=>{e=new i(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let o=null;i.forEach((e=>{const t=new r(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||n&&!s(n,o)||(n=o)}return n&&e.test(n)?n:null}},{"../classes/range":529,"../classes/semver":530,"../functions/gt":539}],568:[function(e,t,n){const r=e("../classes/semver"),i=e("../classes/comparator"),{ANY:s}=i,o=e("../classes/range"),a=e("../functions/satisfies"),c=e("../functions/gt"),u=e("../functions/lt"),l=e("../functions/lte"),d=e("../functions/gte");t.exports=(e,t,n,h)=>{let p,f,m,y,g;switch(e=new r(e,h),t=new o(t,h),n){case">":p=c,f=l,m=u,y=">",g=">=";break;case"<":p=u,f=d,m=c,y="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let o=null,a=null;if(r.forEach((e=>{e.semver===s&&(e=new i(">=0.0.0")),o=o||e,a=a||e,p(e.semver,o.semver,h)?o=e:m(e.semver,a.semver,h)&&(a=e)})),o.operator===y||o.operator===g)return!1;if((!a.operator||a.operator===y)&&f(e,a.semver))return!1;if(a.operator===g&&m(e,a.semver))return!1}return!0}},{"../classes/comparator":528,"../classes/range":529,"../classes/semver":530,"../functions/gt":539,"../functions/gte":540,"../functions/lt":542,"../functions/lte":543,"../functions/satisfies":552}],569:[function(e,t,n){const r=e("../functions/satisfies.js"),i=e("../functions/compare.js");t.exports=(e,t,n)=>{const s=[];let o=null,a=null;const c=e.sort(((e,t)=>i(e,t,n)));for(const e of c){r(e,t,n)?(a=e,o||(o=e)):(a&&s.push([o,a]),a=null,o=null)}o&&s.push([o,null]);const u=[];for(const[e,t]of s)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length<d.length?l:t}},{"../functions/compare.js":536,"../functions/satisfies.js":552}],570:[function(e,t,n){const r=e("../classes/range.js"),i=e("../classes/comparator.js"),{ANY:s}=i,o=e("../functions/satisfies.js"),a=e("../functions/compare.js"),c=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=n.includePrerelease?c:u}if(1===t.length&&t[0].semver===s){if(n.includePrerelease)return!0;t=u}const r=new Set;let i,l,p,f,m,y,g;for(const t of e)">"===t.operator||">="===t.operator?i=d(i,t,n):"<"===t.operator||"<="===t.operator?l=h(l,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&l){if(p=a(i.semver,l.semver,n),p>0)return null;if(0===p&&(">="!==i.operator||"<="!==l.operator))return null}for(const e of r){if(i&&!o(e,String(i),n))return null;if(l&&!o(e,String(l),n))return null;for(const r of t)if(!o(e,String(r),n))return!1;return!0}let b=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver,v=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;b&&1===b.prerelease.length&&"<"===l.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,y=y||"<"===e.operator||"<="===e.operator,i)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(f=d(i,e,n),f===e&&f!==i)return!1}else if(">="===i.operator&&!o(i.semver,String(e),n))return!1;if(l)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(m=h(l,e,n),m===e&&m!==l)return!1}else if("<="===l.operator&&!o(l.semver,String(e),n))return!1;if(!e.operator&&(l||i)&&0!==p)return!1}return!(i&&y&&!l&&0!==p)&&(!(l&&g&&!i&&0!==p)&&(!v&&!b))},d=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},h=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};t.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=l(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},{"../classes/comparator.js":528,"../classes/range.js":529,"../functions/compare.js":536,"../functions/satisfies.js":552}],571:[function(e,t,n){const r=e("../classes/range");t.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},{"../classes/range":529}],572:[function(e,t,n){const r=e("../classes/range");t.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},{"../classes/range":529}],573:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=r.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&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.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,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?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-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}n.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},s.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(i=o(t[r]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(i=o(t[r]),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=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},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}},{"safe-buffer":527}],574:[function(e,t,n){var r=e("is-hex-prefixed");t.exports=function(e){return"string"!=typeof e?e:r(e)?e.slice(2):e}},{"is-hex-prefixed":499}],575:[function(e,t,n){const r=/^[-+]?0x[a-fA-F0-9]+$/,i=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const s={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(e,t={}){if(t=Object.assign({},s,t),!e||"string"!=typeof e)return e;let n=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(n))return e;if(t.hex&&r.test(n))return Number.parseInt(n,16);{const r=i.exec(n);if(r){const i=r[1],s=r[2];let o=function(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(r[3]);const a=r[4]||r[6];if(!t.leadingZeros&&s.length>0&&i&&"."!==n[2])return e;if(!t.leadingZeros&&s.length>0&&!i&&"."!==n[1])return e;{const r=Number(n),c=""+r;return-1!==c.search(/[eE]/)||a?t.eNotation?r:e:-1!==n.indexOf(".")?"0"===c&&""===o||c===o||i&&c==="-"+o?r:e:s?o===c||i+o===c?r:e:n===c||n===i+c?r:e}}return e}}},{}],576:[function(e,t,n){(function(e){(function(){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.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)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],577:[function(e,t,n){"use strict";var r=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),i=e("builtins"),s=["node_modules","favicon.ico"];var o=function(e,t){var n={validForNewPackages:0===t.length&&0===e.length,validForOldPackages:0===t.length,warnings:e,errors:t};return n.warnings.length||delete n.warnings,n.errors.length||delete n.errors,n};t.exports=function(e){var t=[],n=[];if(null===e)return n.push("name cannot be null"),o(t,n);if(void 0===e)return n.push("name cannot be undefined"),o(t,n);if("string"!=typeof e)return n.push("name must be a string"),o(t,n);if(e.length||n.push("name length must be greater than zero"),e.match(/^\./)&&n.push("name cannot start with a period"),e.match(/^_/)&&n.push("name cannot start with an underscore"),e.trim()!==e&&n.push("name cannot contain leading or trailing spaces"),s.forEach((function(t){e.toLowerCase()===t&&n.push(t+" is a blacklisted name")})),i({version:"*"}).forEach((function(n){e.toLowerCase()===n&&t.push(n+" 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(r);if(a){var c=a[1],u=a[2];if(encodeURIComponent(c)===c&&encodeURIComponent(u)===u)return o(t,n)}n.push("name can only contain URL-friendly characters")}return o(t,n)}},{builtins:387}],578:[function(e,t,n){!function(e,r){if("function"==typeof define&&define.amd)define("webextension-polyfill",["module"],r);else if(void 0!==n)r(t);else{var i={exports:{}};r(i),e.browser=i.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(e){"use strict";if("undefined"==typeof browser||Object.getPrototypeOf(browser)!==Object.prototype){const t="The message port closed before a response was received.",n="Returning a Promise is the preferred way to send a reply from an onMessage/onMessageExternal listener, as the sendResponse will be removed from the specs (See https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage)",r=e=>{const r={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(r).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class i extends WeakMap{constructor(e,t=void 0){super(t),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}const s=(t,n)=>(...r)=>{e.runtime.lastError?t.reject(new Error(e.runtime.lastError.message)):n.singleCallbackArg||r.length<=1&&!1!==n.singleCallbackArg?t.resolve(r[0]):t.resolve(r)},o=e=>1==e?"argument":"arguments",a=(e,t,n)=>new Proxy(t,{apply:(t,r,i)=>n.call(r,e,...i)});let c=Function.call.bind(Object.prototype.hasOwnProperty);const u=(e,t={},n={})=>{let r=Object.create(null),i={has:(t,n)=>n in e||n in r,get(i,l,d){if(l in r)return r[l];if(!(l in e))return;let h=e[l];if("function"==typeof h)if("function"==typeof t[l])h=a(e,e[l],t[l]);else if(c(n,l)){let t=((e,t)=>function(n,...r){if(r.length<t.minArgs)throw new Error(`Expected at least ${t.minArgs} ${o(t.minArgs)} for ${e}(), got ${r.length}`);if(r.length>t.maxArgs)throw new Error(`Expected at most ${t.maxArgs} ${o(t.maxArgs)} for ${e}(), got ${r.length}`);return new Promise(((i,o)=>{if(t.fallbackToNoCallback)try{n[e](...r,s({resolve:i,reject:o},t))}catch(s){console.warn(`${e} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,s),n[e](...r),t.fallbackToNoCallback=!1,t.noCallback=!0,i()}else t.noCallback?(n[e](...r),i()):n[e](...r,s({resolve:i,reject:o},t))}))})(l,n[l]);h=a(e,e[l],t)}else h=h.bind(e);else if("object"==typeof h&&null!==h&&(c(t,l)||c(n,l)))h=u(h,t[l],n[l]);else{if(!c(n,"*"))return Object.defineProperty(r,l,{configurable:!0,enumerable:!0,get:()=>e[l],set(t){e[l]=t}}),h;h=u(h,t[l],n["*"])}return r[l]=h,h},set:(t,n,i,s)=>(n in r?r[n]=i:e[n]=i,!0),defineProperty:(e,t,n)=>Reflect.defineProperty(r,t,n),deleteProperty:(e,t)=>Reflect.deleteProperty(r,t)},l=Object.create(e);return new Proxy(l,i)},l=e=>({addListener(t,n,...r){t.addListener(e.get(n),...r)},hasListener:(t,n)=>t.hasListener(e.get(n)),removeListener(t,n){t.removeListener(e.get(n))}}),d=new i((e=>"function"!=typeof e?e:function(t){const n=u(t,{},{getContent:{minArgs:0,maxArgs:0}});e(n)}));let h=!1;const p=new i((e=>"function"!=typeof e?e:function(t,r,i){let s,o,a=!1,c=new Promise((e=>{s=function(t){h||(console.warn(n,(new Error).stack),h=!0),a=!0,e(t)}}));try{o=e(t,r,s)}catch(e){o=Promise.reject(e)}const u=!0!==o&&((l=o)&&"object"==typeof l&&"function"==typeof l.then);var l;if(!0!==o&&!u&&!a)return!1;const d=e=>{e.then((e=>{i(e)}),(e=>{let t;t=e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred",i({__mozWebExtensionPolyfillReject__:!0,message:t})})).catch((e=>{console.error("Failed to send onMessage rejected reply",e)}))};return d(u?o:c),!0})),f=({reject:n,resolve:r},i)=>{e.runtime.lastError?e.runtime.lastError.message===t?r():n(new Error(e.runtime.lastError.message)):i&&i.__mozWebExtensionPolyfillReject__?n(new Error(i.message)):r(i)},m=(e,t,n,...r)=>{if(r.length<t.minArgs)throw new Error(`Expected at least ${t.minArgs} ${o(t.minArgs)} for ${e}(), got ${r.length}`);if(r.length>t.maxArgs)throw new Error(`Expected at most ${t.maxArgs} ${o(t.maxArgs)} for ${e}(), got ${r.length}`);return new Promise(((e,t)=>{const i=f.bind(null,{resolve:e,reject:t});r.push(i),n.sendMessage(...r)}))},y={devtools:{network:{onRequestFinished:l(d)}},runtime:{onMessage:l(p),onMessageExternal:l(p),sendMessage:m.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:m.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},g={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return r.privacy={network:{"*":g},services:{"*":g},websites:{"*":g}},u(e,y,r)};if("object"!=typeof chrome||!chrome||!chrome.runtime||!chrome.runtime.id)throw new Error("This script should only be loaded in a browser extension.");e.exports=r(chrome)}else e.exports=browser}))},{}],579:[function(e,t,n){t.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},{}],580:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UNKNOWN_TICKER_SYMBOL=n.TRACE_ENABLED_SIGN_METHODS=n.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES=n.SMART_TRANSACTION_CONFIRMATION_TYPES=n.POLLING_TOKEN_ENVIRONMENT_TYPES=n.PLATFORM_OPERA=n.PLATFORM_FIREFOX=n.PLATFORM_EDGE=n.PLATFORM_CHROME=n.PLATFORM_BRAVE=n.ORIGIN_METAMASK=n.METAMASK_PROD_CHROME_ID=n.METAMASK_MMI_PROD_CHROME_ID=n.METAMASK_MMI_BETA_CHROME_ID=n.METAMASK_FLASK_CHROME_ID=n.METAMASK_BETA_CHROME_ID=n.MESSAGE_TYPE=n.FIREFOX_BUILD_IDS=n.EXTENSION_MESSAGES=n.ENVIRONMENT_TYPE_POPUP=n.ENVIRONMENT_TYPE_NOTIFICATION=n.ENVIRONMENT_TYPE_FULLSCREEN=n.ENVIRONMENT_TYPE_BACKGROUND=n.CHROME_BUILD_IDS=void 0;var r=e("@metamask/snaps-rpc-methods"),i=e("./permissions");const s=n.ENVIRONMENT_TYPE_POPUP="popup",o=n.ENVIRONMENT_TYPE_NOTIFICATION="notification",a=n.ENVIRONMENT_TYPE_FULLSCREEN="fullscreen",c=n.ENVIRONMENT_TYPE_BACKGROUND="background",u=(n.PLATFORM_BRAVE="Brave",n.PLATFORM_CHROME="Chrome",n.PLATFORM_EDGE="Edge",n.PLATFORM_FIREFOX="Firefox",n.PLATFORM_OPERA="Opera",n.MESSAGE_TYPE={ADD_ETHEREUM_CHAIN:"wallet_addEthereumChain",ETH_ACCOUNTS:i.RestrictedMethods.eth_accounts,ETH_DECRYPT:"eth_decrypt",ETH_CHAIN_ID:"eth_chainId",ETH_GET_ENCRYPTION_PUBLIC_KEY:"eth_getEncryptionPublicKey",ETH_GET_BLOCK_BY_NUMBER:"eth_getBlockByNumber",ETH_REQUEST_ACCOUNTS:"eth_requestAccounts",ETH_SEND_TRANSACTION:"eth_sendTransaction",ETH_SEND_RAW_TRANSACTION:"eth_sendRawTransaction",ETH_SIGN_TRANSACTION:"eth_signTransaction",ETH_SIGN_TYPED_DATA:"eth_signTypedData",ETH_SIGN_TYPED_DATA_V1:"eth_signTypedData_v1",ETH_SIGN_TYPED_DATA_V3:"eth_signTypedData_v3",ETH_SIGN_TYPED_DATA_V4:"eth_signTypedData_v4",GET_PROVIDER_STATE:"metamask_getProviderState",LOG_WEB3_SHIM_USAGE:"metamask_logWeb3ShimUsage",PERSONAL_SIGN:"personal_sign",SEND_METADATA:"metamask_sendDomainMetadata",SWITCH_ETHEREUM_CHAIN:"wallet_switchEthereumChain",TRANSACTION:"transaction",WALLET_CREATE_SESSION:"wallet_createSession",WALLET_GET_CALLS_STATUS:"wallet_getCallsStatus",WALLET_GET_CAPABILITIES:"wallet_getCapabilities",WALLET_GET_SESSION:"wallet_getSession",WALLET_INVOKE_METHOD:"wallet_invokeMethod",WALLET_REQUEST_PERMISSIONS:"wallet_requestPermissions",WALLET_REVOKE_SESSION:"wallet_revokeSession",WALLET_SEND_CALLS:"wallet_sendCalls",WALLET_SESSION_CHANGED:"wallet_sessionChanged",WATCH_ASSET:"wallet_watchAsset",WATCH_ASSET_LEGACY:"metamask_watchAsset",SNAP_DIALOG_ALERT:r.DIALOG_APPROVAL_TYPES.alert,SNAP_DIALOG_CONFIRMATION:r.DIALOG_APPROVAL_TYPES.confirmation,SNAP_DIALOG_PROMPT:r.DIALOG_APPROVAL_TYPES.prompt,SNAP_DIALOG_DEFAULT:r.DIALOG_APPROVAL_TYPES.default}),l=(n.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES={confirmAccountCreation:"snap_manageAccounts:confirmAccountCreation",confirmAccountRemoval:"snap_manageAccounts:confirmAccountRemoval",showSnapAccountRedirect:"snap_manageAccounts:showSnapAccountRedirect",showNameSnapAccount:"snap_manageAccounts:showNameSnapAccount"},n.SMART_TRANSACTION_CONFIRMATION_TYPES={showSmartTransactionStatusPage:"smartTransaction:showSmartTransactionStatusPage"},n.EXTENSION_MESSAGES={CONNECTION_READY:"CONNECTION_READY",READY:"METAMASK_EXTENSION_READY"},n.POLLING_TOKEN_ENVIRONMENT_TYPES={[s]:"popupGasPollTokens",[o]:"notificationGasPollTokens",[a]:"fullScreenGasPollTokens",[c]:"none"},n.ORIGIN_METAMASK="metamask",n.METAMASK_BETA_CHROME_ID="pbbkamfgmaedccnfkmjcofcecjhfgldn"),d=n.METAMASK_PROD_CHROME_ID="nkbihfbeogaeaoehlefnkodbefgpgknn",h=n.METAMASK_FLASK_CHROME_ID="ljfoeinjpaedjfecbmggjgodbgkmjkjk",p=n.METAMASK_MMI_BETA_CHROME_ID="kmbhbcbadohhhgdgihejcicbgcehoaeg",f=n.METAMASK_MMI_PROD_CHROME_ID="ikkihjamdhfiojpdbnfllpjigpneipbc";n.CHROME_BUILD_IDS=[l,d,h,p,f],n.FIREFOX_BUILD_IDS=["webextension-beta@metamask.io","webextension@metamask.io","webextension-flask@metamask.io"],n.UNKNOWN_TICKER_SYMBOL="UNKNOWN",n.TRACE_ENABLED_SIGN_METHODS=[u.ETH_SIGN_TYPED_DATA,u.ETH_SIGN_TYPED_DATA_V1,u.ETH_SIGN_TYPED_DATA_V3,u.ETH_SIGN_TYPED_DATA_V4,u.PERSONAL_SIGN]},{"./permissions":581,"@metamask/snaps-rpc-methods":130}],581:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={CaveatTypes:!0,EndowmentTypes:!0,RestrictedEthMethods:!0,RestrictedMethods:!0,ConnectionPermission:!0,PermissionWeightThreshold:!0,MinPermissionAbstractionDisplayCount:!0,PermissionsAbstractionThreshold:!0,PermissionWeight:!0};n.RestrictedMethods=n.RestrictedEthMethods=n.PermissionsAbstractionThreshold=n.PermissionWeightThreshold=n.PermissionWeight=n.MinPermissionAbstractionDisplayCount=n.EndowmentTypes=n.ConnectionPermission=n.CaveatTypes=void 0;var i=e("./snaps/permissions");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))}));n.CaveatTypes=Object.freeze({restrictReturnedAccounts:"restrictReturnedAccounts",restrictNetworkSwitching:"restrictNetworkSwitching"}),n.EndowmentTypes=Object.freeze({permittedChains:"endowment:permitted-chains"}),n.RestrictedEthMethods=Object.freeze({eth_accounts:"eth_accounts"}),n.RestrictedMethods=Object.freeze({eth_accounts:"eth_accounts",snap_dialog:"snap_dialog",snap_notify:"snap_notify",snap_manageState:"snap_manageState",snap_getBip32PublicKey:"snap_getBip32PublicKey",snap_getBip32Entropy:"snap_getBip32Entropy",snap_getBip44Entropy:"snap_getBip44Entropy",snap_getEntropy:"snap_getEntropy",snap_getLocale:"snap_getLocale",snap_getPreferences:"snap_getPreferences",wallet_snap:"wallet_snap",snap_manageAccounts:"snap_manageAccounts"}),n.ConnectionPermission=Object.freeze({connection_permission:"connection_permission"}),n.PermissionWeightThreshold=Object.freeze({snapInstall:3,snapUpdateApprovedPermissions:3}),n.MinPermissionAbstractionDisplayCount=3,n.PermissionsAbstractionThreshold=3,n.PermissionWeight=Object.freeze({eth_accounts:3,permittedChains:3,snap_dialog:4,snap_notify:4,snap_getBip32PublicKey:3,snap_getBip32Entropy:1,snap_getBip44Entropy:1,snap_getEntropy:3,snap_manageState:4,snap_getLocale:4,wallet_snap:4,endowment_networkAccess:3,endowment_assets:3,endowment_protocol:3,endowment_webassembly:4,endowment_transactionInsight:4,endowment_cronjob:4,endowment_ethereumProvider:4,endowment_rpc:4,endowment_lifecycleHooks:4,endowment_pageHome:4,snap_manageAccounts:3,endowment_keyring:4,endowment_nameLookup:3,endowment_signatureInsight:4,connection_permission:3,unknown_permission:3})},{"./snaps/permissions":582}],582:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ExcludedSnapPermissions=n.ExcludedSnapEndowments=n.EndowmentPermissions=n.DynamicSnapPermissions=void 0;n.EndowmentPermissions=Object.freeze({"endowment:network-access":"endowment:network-access","endowment:transaction-insight":"endowment:transaction-insight","endowment:cronjob":"endowment:cronjob","endowment:ethereum-provider":"endowment:ethereum-provider","endowment:rpc":"endowment:rpc","endowment:webassembly":"endowment:webassembly","endowment:lifecycle-hooks":"endowment:lifecycle-hooks","endowment:page-home":"endowment:page-home","endowment:page-settings":"endowment:page-settings","endowment:signature-insight":"endowment:signature-insight","endowment:name-lookup":"endowment:name-lookup","endowment:assets":"endowment:assets","endowment:protocol":"endowment:protocol","endowment:keyring":"endowment:keyring"}),n.ExcludedSnapPermissions=Object.freeze({}),n.ExcludedSnapEndowments=Object.freeze({"endowment:caip25":"eth_accounts is disabled. For more information please see https://github.com/MetaMask/snaps/issues/990."}),n.DynamicSnapPermissions=Object.freeze(["endowment:caip25"])},{}],583:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkForLastError=c,n.checkForLastErrorAndLog=function(){const e=c();e&&s.default.error(e);return e},n.checkForLastErrorAndWarn=function(){const e=c();e&&console.warn(e);return e},n.getIsBrowserPrerenderBroken=function(e=r.default.getParser(window.navigator.userAgent)){return(e.satisfies(o.BROKEN_PRERENDER_BROWSER_VERSIONS)&&!e.satisfies(o.FIXED_PRERENDER_BROWSER_VERSIONS))??!1};var r=a(e("bowser")),i=a(e("webextension-polyfill")),s=a(e("loglevel")),o=e("../../ui/helpers/constants/common");function a(e){return e&&e.__esModule?e:{default:e}}function c(){const{lastError:e}=i.default.runtime;if(e)return e.stack&&e.message?e:new Error(e.message)}},{"../../ui/helpers/constants/common":585,bowser:383,loglevel:501,"webextension-polyfill":578}],584:[function(e,t,n){"use strict";function r(e){return function({pathname:e}){const t=[/\.xml$/u,/\.pdf$/u];for(let n=0;n<t.length;n++)if(t[n].test(e))return!1;return!0}(e)&&!function(e){const t=["execution.consensys.io","execution.metamask.io","uscourts.gov","dropbox.com","webbyawards.com","adyen.com","gravityforms.com","harbourair.com","ani.gamer.com.tw","blueskybooking.com","sharefile.com","battle.net"],n=["cdn.shopify.com/s/javascripts/tricorder/xtld-read-only-frame.html"],{hostname:r,pathname:i}=e,s=e=>e.endsWith("/")?e.slice(0,-1):e;return t.some((e=>e===r||r.endsWith(`.${e}`)))||n.some((e=>s(e)===s(r+i)))}(e)}function i(){return function(){const{doctype:e}=window.document;if(e)return"html"===e.name;return!0}()&&function(){const e=document.documentElement.nodeName;if(e)return"html"===e.toLowerCase();return!0}()}Object.defineProperty(n,"__esModule",{value:!0}),n.checkDocumentForProviderInjection=i,n.checkURLForProviderInjection=r,n.default=function(){return r(new URL(window.location))&&i()}},{}],585:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SUPPORT_REQUEST_LINK=n.SUPPORT_LINK=n.SECONDARY=n.PRIMARY=n.PASSWORD_MIN_LENGTH=n.OUTDATED_BROWSER_VERSIONS=n.METAMETRICS_SETTINGS_LINK=n.FIXED_PRERENDER_BROWSER_VERSIONS=n.CONTRACT_ADDRESS_LINK=n.BROKEN_PRERENDER_BROWSER_VERSIONS=void 0;n.PRIMARY="PRIMARY",n.SECONDARY="SECONDARY",n.METAMETRICS_SETTINGS_LINK="https://support.metamask.io/privacy-and-security/how-to-manage-your-metametrics-settings",n.SUPPORT_REQUEST_LINK="https://support.metamask.io",n.SUPPORT_LINK="https://support.metamask.io",n.CONTRACT_ADDRESS_LINK="https://support.metamask.io/managing-my-tokens/moving-your-tokens/why-am-i-being-warned-about-sending-tokens-to-a-contract/",n.PASSWORD_MIN_LENGTH=8,n.OUTDATED_BROWSER_VERSIONS={chrome:"<109",edge:"<109",firefox:"<102",opera:"<95"},n.BROKEN_PRERENDER_BROWSER_VERSIONS={chrome:">=113",edge:">=113"},n.FIXED_PRERENDER_BROWSER_VERSIONS={windows:{chrome:">=120",edge:">=120"},macos:{chrome:">=120",edge:">=120"},chrome:">=121",edge:">=121"}},{}]},{},[3]);