diff --git a/asset-manifest.json b/asset-manifest.json index f5c0f5c..805adf4 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -10,7 +10,7 @@ "static/js/5.chunk.js": "./static/js/5.chunk.js", "static/js/6.chunk.js": "./static/js/6.chunk.js", "index.html": "./index.html", - "precache-manifest.bd80582397a7ec199b4ba35337cebd55.js": "./precache-manifest.bd80582397a7ec199b4ba35337cebd55.js", + "precache-manifest.44c3df07cfdbffeddbe21eb2480c63b1.js": "./precache-manifest.44c3df07cfdbffeddbe21eb2480c63b1.js", "service-worker.js": "./service-worker.js", "static/js/0.chunk.js.LICENSE.txt": "./static/js/0.chunk.js.LICENSE.txt", "static/js/3.chunk.js.LICENSE.txt": "./static/js/3.chunk.js.LICENSE.txt", @@ -73,6 +73,7 @@ "static/media/spinner.svg": "./static/media/spinner.a9842492.svg", "static/media/tomo.svg": "./static/media/tomo.7cbcd424.svg", "static/media/trustWallet.png": "./static/media/trustWallet.edcc1ab5.png", + "static/media/vsg-vector.png": "./static/media/vsg-vector.d7ccf4e8.png", "static/media/walletConnectIcon.svg": "./static/media/walletConnectIcon.5e81cac2.svg", "static/media/x.svg": "./static/media/x.5b8e2186.svg", "static/media/xdai.png": "./static/media/xdai.573f0f5f.png", diff --git a/networks.json b/networks.json index 736c961..c7030f1 100644 --- a/networks.json +++ b/networks.json @@ -256,6 +256,25 @@ "symbol": "WETH" } }, + "11155111": { + "name": "Sepolia test network", + "rpc": "https://eth-sepolia.g.alchemy.com/v2/eV40AoRwFdzusyW_9htirAoRXSMssQ0E", + "chainId": 11155111, + "explorer": "https://sepolia.etherscan.io", + "color": "#f6c343", + "storage": "0x6F4827A4BFAA9b3860E5b642792cd5B8ff9f981d", + "multicall": "0xCde205aa01922944d2DD6cC673C4B39b3e14C525", + "baseCurrency": { + "decimals": 18, + "name": "ETH", + "symbol": "ETH" + }, + "wrappedToken": { + "address": "0x52dAc337a6373887D57Db93366C980a0E3c967c0", + "name": "Wrapped Ether", + "symbol": "WETH" + } + }, "19845": { "name": "BTCIX Network", "rpc": "https://seed.btcix.org/rpc", @@ -682,5 +701,23 @@ "name": "Wrapped PDY", "symbol": "WPDY" } + }, + "420044": { + "name": "Vector (Testnet)", + "rpc": "https://testnet-rpc.vsgofficial.com", + "chainId": 420044, + "explorer": "https://testnet-scan.vsgofficial.com/", + "color": "#FF9211", + "multicall": "0x8D3185295E7800FB687BA75e8F9685e3D2435676", + "baseCurrency": { + "decimals": 18, + "name": "VSG", + "symbol": "VSG" + }, + "wrappedToken": { + "address": "0xc6807ddc8DfB31c66114eFFaDe883b3C8eABBA83", + "name": "Wrapped VSG", + "symbol": "WVSG" + } } } diff --git a/precache-manifest.44c3df07cfdbffeddbe21eb2480c63b1.js b/precache-manifest.44c3df07cfdbffeddbe21eb2480c63b1.js new file mode 100644 index 0000000..6b7019b --- /dev/null +++ b/precache-manifest.44c3df07cfdbffeddbe21eb2480c63b1.js @@ -0,0 +1,458 @@ +self.__precacheManifest = (self.__precacheManifest || []).concat([ + { + "revision": "56a24f8c28d83da5c3f8a168438dae28", + "url": "./index.html" + }, + { + "revision": "5fb4b1b663d92690530f", + "url": "./static/css/3.chunk.css" + }, + { + "revision": "5a875a5f65641b1726cf", + "url": "./static/css/main.chunk.css" + }, + { + "revision": "4992b9c092bafd8d0d3a", + "url": "./static/js/0.chunk.js" + }, + { + "revision": "4e0e34f265fae8f33b01b27ae29d9d6f", + "url": "./static/js/0.chunk.js.LICENSE.txt" + }, + { + "revision": "5fb4b1b663d92690530f", + "url": "./static/js/3.chunk.js" + }, + { + "revision": "2f9ea98313d895888b2dd96794d197f0", + "url": "./static/js/3.chunk.js.LICENSE.txt" + }, + { + "revision": "1072f773a94805cff78f", + "url": "./static/js/4.chunk.js" + }, + { + "revision": "6e31a0db202a37e424180fec8d0f2d9a", + "url": "./static/js/4.chunk.js.LICENSE.txt" + }, + { + "revision": "2cb547ec9dc74dd4191b", + "url": "./static/js/5.chunk.js" + }, + { + "revision": "d9e36ccbbbfdad3eab57cb8c988c6ace", + "url": "./static/js/5.chunk.js.LICENSE.txt" + }, + { + "revision": "dcfb3019a9e8c2f3cac5", + "url": "./static/js/6.chunk.js" + }, + { + "revision": "5a875a5f65641b1726cf", + "url": "./static/js/main.chunk.js" + }, + { + "revision": "4e0e34f265fae8f33b01b27ae29d9d6f", + "url": "./static/js/main.chunk.js.LICENSE.txt" + }, + { + "revision": "1136412759d985ea667a", + "url": "./static/js/runtime-main.js" + }, + { + "revision": "661569afe57a38e1529a775a465da20b", + "url": "./static/media/Inter-Black.661569af.woff2" + }, + { + "revision": "d0b121f3a9d3d88afdfd6902d31ee9a0", + "url": "./static/media/Inter-Black.d0b121f3.woff" + }, + { + "revision": "a3cc36c89047d530522fc999a22cce54", + "url": "./static/media/Inter-BlackItalic.a3cc36c8.woff2" + }, + { + "revision": "e3329b2b90e1f9bcafd4a36604215dc1", + "url": "./static/media/Inter-BlackItalic.e3329b2b.woff" + }, + { + "revision": "444a7284663a3bc886683eb81450b294", + "url": "./static/media/Inter-Bold.444a7284.woff2" + }, + { + "revision": "99a0d9a7e4c99c17bfdd94a22a5cf94e", + "url": "./static/media/Inter-Bold.99a0d9a7.woff" + }, + { + "revision": "3aa31f7356ea9db132b3b2bd8a65df44", + "url": "./static/media/Inter-BoldItalic.3aa31f73.woff" + }, + { + "revision": "96284e2a02af46d9ffa2d189eaad5483", + "url": "./static/media/Inter-BoldItalic.96284e2a.woff2" + }, + { + "revision": "37da9eecf61ebced804b266b14eef98e", + "url": "./static/media/Inter-ExtraBold.37da9eec.woff2" + }, + { + "revision": "ab70688a1c9d6525584b123575f6c0a5", + "url": "./static/media/Inter-ExtraBold.ab70688a.woff" + }, + { + "revision": "728a4c7df3ed1b2bc077010063f9ef1c", + "url": "./static/media/Inter-ExtraBoldItalic.728a4c7d.woff" + }, + { + "revision": "fcc7d60ef790b43eb520fdc5c7348799", + "url": "./static/media/Inter-ExtraBoldItalic.fcc7d60e.woff2" + }, + { + "revision": "b3b2ed6a20c538e9c809f4df5c04ac2a", + "url": "./static/media/Inter-ExtraLight.b3b2ed6a.woff2" + }, + { + "revision": "dd19efda9c6e88ad83a5b052915899f7", + "url": "./static/media/Inter-ExtraLight.dd19efda.woff" + }, + { + "revision": "079cd1e71cd4f73bef86f72deced6d03", + "url": "./static/media/Inter-ExtraLightItalic.079cd1e7.woff2" + }, + { + "revision": "a6566ae6fa3c58b48f888d7c9c234d52", + "url": "./static/media/Inter-ExtraLightItalic.a6566ae6.woff" + }, + { + "revision": "f137a90d649b6ab032563856df323f40", + "url": "./static/media/Inter-Italic.f137a90d.woff" + }, + { + "revision": "fd26ff23f831db9ae85a805386529385", + "url": "./static/media/Inter-Italic.fd26ff23.woff2" + }, + { + "revision": "5d3776eb78374b0ebbce639adadf73d1", + "url": "./static/media/Inter-Light.5d3776eb.woff" + }, + { + "revision": "780dd2adb71f18d7a357ab7f65e881d6", + "url": "./static/media/Inter-Light.780dd2ad.woff2" + }, + { + "revision": "d0fa7cbcf9ca5edb6ebe41fd8d49e1fb", + "url": "./static/media/Inter-LightItalic.d0fa7cbc.woff" + }, + { + "revision": "df29c53403b2e13dc56df3e291c32f09", + "url": "./static/media/Inter-LightItalic.df29c534.woff2" + }, + { + "revision": "75db5319e7e87c587019a5df08d7272c", + "url": "./static/media/Inter-Medium.75db5319.woff2" + }, + { + "revision": "c0638bea87a05fdfa2bb3bba2efe54e4", + "url": "./static/media/Inter-Medium.c0638bea.woff" + }, + { + "revision": "a1b588627dd12c556a7e3cd81e400ecf", + "url": "./static/media/Inter-MediumItalic.a1b58862.woff" + }, + { + "revision": "f1e11535e56c67698e263673f625103e", + "url": "./static/media/Inter-MediumItalic.f1e11535.woff2" + }, + { + "revision": "3ac83020fe53b617b79b5e2ad66764af", + "url": "./static/media/Inter-Regular.3ac83020.woff" + }, + { + "revision": "dc131113894217b5031000575d9de002", + "url": "./static/media/Inter-Regular.dc131113.woff2" + }, + { + "revision": "007ad31a53f4ab3f58ee74f2308482ce", + "url": "./static/media/Inter-SemiBold.007ad31a.woff2" + }, + { + "revision": "66a68ffab2bf40553e847e8f025f75be", + "url": "./static/media/Inter-SemiBold.66a68ffa.woff" + }, + { + "revision": "3031b683bafcd9ded070c00d784f4626", + "url": "./static/media/Inter-SemiBoldItalic.3031b683.woff2" + }, + { + "revision": "6cd13dbd150ac0c7f337a2939a3d50a8", + "url": "./static/media/Inter-SemiBoldItalic.6cd13dbd.woff" + }, + { + "revision": "b068b7189120a6626e3cfe2a8b917d0f", + "url": "./static/media/Inter-Thin.b068b718.woff" + }, + { + "revision": "d52e5e38715502616522eb3e9963b69b", + "url": "./static/media/Inter-Thin.d52e5e38.woff2" + }, + { + "revision": "97bec98832c92f799aeebf670b83ff6c", + "url": "./static/media/Inter-ThinItalic.97bec988.woff" + }, + { + "revision": "a9780071b7f498c1523602910a5ef242", + "url": "./static/media/Inter-ThinItalic.a9780071.woff2" + }, + { + "revision": "1f7ca6383ea7c74a7f5ddd76c3d3cef2", + "url": "./static/media/Inter-italic.var.1f7ca638.woff2" + }, + { + "revision": "66c6e40883646a7ad993108b2ce2da32", + "url": "./static/media/Inter-roman.var.66c6e408.woff2" + }, + { + "revision": "8dd26c3dd0125fb16ce19b8f5e8273fb", + "url": "./static/media/Inter.var.8dd26c3d.woff2" + }, + { + "revision": "a156dbce5a5218f83e8348c4d318493f", + "url": "./static/media/ame.a156dbce.png" + }, + { + "revision": "fa428345f1550e1de5067f59cfc31e23", + "url": "./static/media/arbitrum.fa428345.png" + }, + { + "revision": "114fab910be089671a355764e2326334", + "url": "./static/media/arrow-down-blue.114fab91.svg" + }, + { + "revision": "4d4a6a99f8bc24af0fcf805146d38a46", + "url": "./static/media/arrow-down-grey.4d4a6a99.svg" + }, + { + "revision": "337ad716bd89163e2a9c3495b7e0f029", + "url": "./static/media/arrow-right-white.337ad716.png" + }, + { + "revision": "e96d8158ff6d3087ab15e43e64fbb47e", + "url": "./static/media/arrow-right.e96d8158.svg" + }, + { + "revision": "d13b261cdb325ca4e59485cc1a2a2c25", + "url": "./static/media/aurora.d13b261c.svg" + }, + { + "revision": "2565884a03843bf5f37bf4a806402acf", + "url": "./static/media/avax.2565884a.png" + }, + { + "revision": "3588ca9784171847f8eda4a6a0ecaac9", + "url": "./static/media/baseEth.3588ca97.svg" + }, + { + "revision": "fd3ae3b35dee65cb967e6c1fb92b2778", + "url": "./static/media/blast.fd3ae3b3.svg" + }, + { + "revision": "e62a99c33b7eafddf701893750cedeb9", + "url": "./static/media/blue-loader.e62a99c3.svg" + }, + { + "revision": "162aaf57c64bd732a87c2d553a12f165", + "url": "./static/media/bnb.162aaf57.png" + }, + { + "revision": "dfd97aa5b03813b995e559a1747258b7", + "url": "./static/media/btcix.dfd97aa5.png" + }, + { + "revision": "5dd950ec66be581e8da4376f49a19d77", + "url": "./static/media/circle-grey.5dd950ec.svg" + }, + { + "revision": "716403ba670c3577abbea8e66f428721", + "url": "./static/media/circle.716403ba.svg" + }, + { + "revision": "a26a777a2f890b16c0f64985f1877629", + "url": "./static/media/cndl.a26a777a.svg" + }, + { + "revision": "aa4c7a7647abc7ede02e017c1a0141b6", + "url": "./static/media/coinbaseWalletIcon.aa4c7a76.svg" + }, + { + "revision": "73b9bf96a6d40089600021dc81e28d85", + "url": "./static/media/cro.73b9bf96.svg" + }, + { + "revision": "4b9a7c8903a172402c43e975cd628062", + "url": "./static/media/de.4b9a7c89.svg" + }, + { + "revision": "80a3ae258c229f3c874a8acdf65adeea", + "url": "./static/media/dropdown-blue.80a3ae25.svg" + }, + { + "revision": "50dbd07d8e7428d04464644f7cf819cf", + "url": "./static/media/dropdown.50dbd07d.svg" + }, + { + "revision": "345dad7494f835eb9ae6c21c2d3a25f4", + "url": "./static/media/dropup-blue.345dad74.svg" + }, + { + "revision": "767311236d51727249c52288892cbd7b", + "url": "./static/media/edg.76731123.svg" + }, + { + "revision": "42219103602e6dd2f02fb005bce546b7", + "url": "./static/media/en.42219103.svg" + }, + { + "revision": "6273c78a6e1df30a937e77571d8a83cd", + "url": "./static/media/es.6273c78a.svg" + }, + { + "revision": "86b356aa4636232f3e200c65d2a8b6b4", + "url": "./static/media/eth.86b356aa.png" + }, + { + "revision": "f0ab208059cc049e7740e8c5f3ac8e58", + "url": "./static/media/fkw.f0ab2080.png" + }, + { + "revision": "3af63018071dc72f01ff1880304ea6ec", + "url": "./static/media/ftm.3af63018.svg" + }, + { + "revision": "306cb394d8f9dcbd17bef4de084406f8", + "url": "./static/media/fuse.306cb394.svg" + }, + { + "revision": "cb9b3252a26b080c4964baeb2b7ff53c", + "url": "./static/media/glmr.cb9b3252.png" + }, + { + "revision": "99e1812218a346bc7b6ce40128f183f8", + "url": "./static/media/guapx.99e18122.png" + }, + { + "revision": "0d242628b316a0661456f0126257d3d1", + "url": "./static/media/ht.0d242628.svg" + }, + { + "revision": "7e79b672265708ee53cf41c32a124bdc", + "url": "./static/media/it.7e79b672.svg" + }, + { + "revision": "01c3fe8adf16309a7847b129f3393f9b", + "url": "./static/media/iw.01c3fe8a.svg" + }, + { + "revision": "50c67f3cdd04281013ef95e92fc7244e", + "url": "./static/media/link.50c67f3c.svg" + }, + { + "revision": "52eac682e8d399b4a8d1d48e38a60535", + "url": "./static/media/magnifying-glass.52eac682.svg" + }, + { + "revision": "1ee4a1ab4dd95100e8d21e67acf53849", + "url": "./static/media/matic.1ee4a1ab.png" + }, + { + "revision": "981ecca4e2e244ff635162cbb11b69ac", + "url": "./static/media/menu.981ecca4.svg" + }, + { + "revision": "023762b6aec2a2249b8fdfb638f00ef3", + "url": "./static/media/metamask.023762b6.png" + }, + { + "revision": "ccc42292cc242adcb9b010eb83140f72", + "url": "./static/media/movr.ccc42292.svg" + }, + { + "revision": "e781dbdcb5a699ae0344c3e5a523b46a", + "url": "./static/media/one.e781dbdc.svg" + }, + { + "revision": "416f1e79f20955c2501fcce739227826", + "url": "./static/media/opbnb.416f1e79.svg" + }, + { + "revision": "0d245621115b2c0453939f631d70aa58", + "url": "./static/media/optimisticEth.0d245621.svg" + }, + { + "revision": "be964fe9615463c2badea3b95d57a7fc", + "url": "./static/media/parody-logo.be964fe9.png" + }, + { + "revision": "899a4aa9bf85aba699112cc7cab6578e", + "url": "./static/media/plus-blue.899a4aa9.svg" + }, + { + "revision": "62281ca8cea976c7f20862db5d12728e", + "url": "./static/media/plus-grey.62281ca8.svg" + }, + { + "revision": "b234b2bfa0417c7e8711c3a8d17afeec", + "url": "./static/media/portisIcon.b234b2bf.png" + }, + { + "revision": "1761ff9cb139a2ba2a3a485172eb094c", + "url": "./static/media/question-mark.1761ff9c.svg" + }, + { + "revision": "63be1e247274b62bc269445bf114d497", + "url": "./static/media/question.63be1e24.svg" + }, + { + "revision": "3f61edb2c675ef535b0847ef14556579", + "url": "./static/media/rbtc.3f61edb2.png" + }, + { + "revision": "5d71cdb2ccd36f145a371fab0548e2d8", + "url": "./static/media/ru.5d71cdb2.svg" + }, + { + "revision": "31b54529a979b55eb9ec618ded64fc68", + "url": "./static/media/shibarium.31b54529.png" + }, + { + "revision": "a98424922149274b8a364358d02da9fe", + "url": "./static/media/spinner.a9842492.svg" + }, + { + "revision": "7cbcd424ca554dd563744b7ddfe7ac92", + "url": "./static/media/tomo.7cbcd424.svg" + }, + { + "revision": "edcc1ab5dde5cb3d5cf134c4aade641b", + "url": "./static/media/trustWallet.edcc1ab5.png" + }, + { + "revision": "d7ccf4e8644785dd40fd30b52b84c07b", + "url": "./static/media/vsg-vector.d7ccf4e8.png" + }, + { + "revision": "5e81cac236fd057cb686399a8fa2ea57", + "url": "./static/media/walletConnectIcon.5e81cac2.svg" + }, + { + "revision": "5b8e218668bfea1d44b887bd042f6a52", + "url": "./static/media/x.5b8e2186.svg" + }, + { + "revision": "573f0f5f8086daf29bbfeea736b3ba39", + "url": "./static/media/xdai.573f0f5f.png" + }, + { + "revision": "1a6fff51c30dea059be5aa4177bde506", + "url": "./static/media/zh.1a6fff51.svg" + } +]); \ No newline at end of file diff --git a/precache-manifest.7cc0539dcf6bcaa2c99846dcb9fea029.js b/precache-manifest.7cc0539dcf6bcaa2c99846dcb9fea029.js new file mode 100644 index 0000000..038267d --- /dev/null +++ b/precache-manifest.7cc0539dcf6bcaa2c99846dcb9fea029.js @@ -0,0 +1,454 @@ +self.__precacheManifest = (self.__precacheManifest || []).concat([ + { + "revision": "56a24f8c28d83da5c3f8a168438dae28", + "url": "./index.html" + }, + { + "revision": "5fb4b1b663d92690530f", + "url": "./static/css/3.chunk.css" + }, + { + "revision": "d949fcf6c1f128157f87", + "url": "./static/css/main.chunk.css" + }, + { + "revision": "4992b9c092bafd8d0d3a", + "url": "./static/js/0.chunk.js" + }, + { + "revision": "4e0e34f265fae8f33b01b27ae29d9d6f", + "url": "./static/js/0.chunk.js.LICENSE.txt" + }, + { + "revision": "5fb4b1b663d92690530f", + "url": "./static/js/3.chunk.js" + }, + { + "revision": "2f9ea98313d895888b2dd96794d197f0", + "url": "./static/js/3.chunk.js.LICENSE.txt" + }, + { + "revision": "1072f773a94805cff78f", + "url": "./static/js/4.chunk.js" + }, + { + "revision": "6e31a0db202a37e424180fec8d0f2d9a", + "url": "./static/js/4.chunk.js.LICENSE.txt" + }, + { + "revision": "2cb547ec9dc74dd4191b", + "url": "./static/js/5.chunk.js" + }, + { + "revision": "d9e36ccbbbfdad3eab57cb8c988c6ace", + "url": "./static/js/5.chunk.js.LICENSE.txt" + }, + { + "revision": "dcfb3019a9e8c2f3cac5", + "url": "./static/js/6.chunk.js" + }, + { + "revision": "d949fcf6c1f128157f87", + "url": "./static/js/main.chunk.js" + }, + { + "revision": "4e0e34f265fae8f33b01b27ae29d9d6f", + "url": "./static/js/main.chunk.js.LICENSE.txt" + }, + { + "revision": "1136412759d985ea667a", + "url": "./static/js/runtime-main.js" + }, + { + "revision": "661569afe57a38e1529a775a465da20b", + "url": "./static/media/Inter-Black.661569af.woff2" + }, + { + "revision": "d0b121f3a9d3d88afdfd6902d31ee9a0", + "url": "./static/media/Inter-Black.d0b121f3.woff" + }, + { + "revision": "a3cc36c89047d530522fc999a22cce54", + "url": "./static/media/Inter-BlackItalic.a3cc36c8.woff2" + }, + { + "revision": "e3329b2b90e1f9bcafd4a36604215dc1", + "url": "./static/media/Inter-BlackItalic.e3329b2b.woff" + }, + { + "revision": "444a7284663a3bc886683eb81450b294", + "url": "./static/media/Inter-Bold.444a7284.woff2" + }, + { + "revision": "99a0d9a7e4c99c17bfdd94a22a5cf94e", + "url": "./static/media/Inter-Bold.99a0d9a7.woff" + }, + { + "revision": "3aa31f7356ea9db132b3b2bd8a65df44", + "url": "./static/media/Inter-BoldItalic.3aa31f73.woff" + }, + { + "revision": "96284e2a02af46d9ffa2d189eaad5483", + "url": "./static/media/Inter-BoldItalic.96284e2a.woff2" + }, + { + "revision": "37da9eecf61ebced804b266b14eef98e", + "url": "./static/media/Inter-ExtraBold.37da9eec.woff2" + }, + { + "revision": "ab70688a1c9d6525584b123575f6c0a5", + "url": "./static/media/Inter-ExtraBold.ab70688a.woff" + }, + { + "revision": "728a4c7df3ed1b2bc077010063f9ef1c", + "url": "./static/media/Inter-ExtraBoldItalic.728a4c7d.woff" + }, + { + "revision": "fcc7d60ef790b43eb520fdc5c7348799", + "url": "./static/media/Inter-ExtraBoldItalic.fcc7d60e.woff2" + }, + { + "revision": "b3b2ed6a20c538e9c809f4df5c04ac2a", + "url": "./static/media/Inter-ExtraLight.b3b2ed6a.woff2" + }, + { + "revision": "dd19efda9c6e88ad83a5b052915899f7", + "url": "./static/media/Inter-ExtraLight.dd19efda.woff" + }, + { + "revision": "079cd1e71cd4f73bef86f72deced6d03", + "url": "./static/media/Inter-ExtraLightItalic.079cd1e7.woff2" + }, + { + "revision": "a6566ae6fa3c58b48f888d7c9c234d52", + "url": "./static/media/Inter-ExtraLightItalic.a6566ae6.woff" + }, + { + "revision": "f137a90d649b6ab032563856df323f40", + "url": "./static/media/Inter-Italic.f137a90d.woff" + }, + { + "revision": "fd26ff23f831db9ae85a805386529385", + "url": "./static/media/Inter-Italic.fd26ff23.woff2" + }, + { + "revision": "5d3776eb78374b0ebbce639adadf73d1", + "url": "./static/media/Inter-Light.5d3776eb.woff" + }, + { + "revision": "780dd2adb71f18d7a357ab7f65e881d6", + "url": "./static/media/Inter-Light.780dd2ad.woff2" + }, + { + "revision": "d0fa7cbcf9ca5edb6ebe41fd8d49e1fb", + "url": "./static/media/Inter-LightItalic.d0fa7cbc.woff" + }, + { + "revision": "df29c53403b2e13dc56df3e291c32f09", + "url": "./static/media/Inter-LightItalic.df29c534.woff2" + }, + { + "revision": "75db5319e7e87c587019a5df08d7272c", + "url": "./static/media/Inter-Medium.75db5319.woff2" + }, + { + "revision": "c0638bea87a05fdfa2bb3bba2efe54e4", + "url": "./static/media/Inter-Medium.c0638bea.woff" + }, + { + "revision": "a1b588627dd12c556a7e3cd81e400ecf", + "url": "./static/media/Inter-MediumItalic.a1b58862.woff" + }, + { + "revision": "f1e11535e56c67698e263673f625103e", + "url": "./static/media/Inter-MediumItalic.f1e11535.woff2" + }, + { + "revision": "3ac83020fe53b617b79b5e2ad66764af", + "url": "./static/media/Inter-Regular.3ac83020.woff" + }, + { + "revision": "dc131113894217b5031000575d9de002", + "url": "./static/media/Inter-Regular.dc131113.woff2" + }, + { + "revision": "007ad31a53f4ab3f58ee74f2308482ce", + "url": "./static/media/Inter-SemiBold.007ad31a.woff2" + }, + { + "revision": "66a68ffab2bf40553e847e8f025f75be", + "url": "./static/media/Inter-SemiBold.66a68ffa.woff" + }, + { + "revision": "3031b683bafcd9ded070c00d784f4626", + "url": "./static/media/Inter-SemiBoldItalic.3031b683.woff2" + }, + { + "revision": "6cd13dbd150ac0c7f337a2939a3d50a8", + "url": "./static/media/Inter-SemiBoldItalic.6cd13dbd.woff" + }, + { + "revision": "b068b7189120a6626e3cfe2a8b917d0f", + "url": "./static/media/Inter-Thin.b068b718.woff" + }, + { + "revision": "d52e5e38715502616522eb3e9963b69b", + "url": "./static/media/Inter-Thin.d52e5e38.woff2" + }, + { + "revision": "97bec98832c92f799aeebf670b83ff6c", + "url": "./static/media/Inter-ThinItalic.97bec988.woff" + }, + { + "revision": "a9780071b7f498c1523602910a5ef242", + "url": "./static/media/Inter-ThinItalic.a9780071.woff2" + }, + { + "revision": "1f7ca6383ea7c74a7f5ddd76c3d3cef2", + "url": "./static/media/Inter-italic.var.1f7ca638.woff2" + }, + { + "revision": "66c6e40883646a7ad993108b2ce2da32", + "url": "./static/media/Inter-roman.var.66c6e408.woff2" + }, + { + "revision": "8dd26c3dd0125fb16ce19b8f5e8273fb", + "url": "./static/media/Inter.var.8dd26c3d.woff2" + }, + { + "revision": "a156dbce5a5218f83e8348c4d318493f", + "url": "./static/media/ame.a156dbce.png" + }, + { + "revision": "fa428345f1550e1de5067f59cfc31e23", + "url": "./static/media/arbitrum.fa428345.png" + }, + { + "revision": "114fab910be089671a355764e2326334", + "url": "./static/media/arrow-down-blue.114fab91.svg" + }, + { + "revision": "4d4a6a99f8bc24af0fcf805146d38a46", + "url": "./static/media/arrow-down-grey.4d4a6a99.svg" + }, + { + "revision": "337ad716bd89163e2a9c3495b7e0f029", + "url": "./static/media/arrow-right-white.337ad716.png" + }, + { + "revision": "e96d8158ff6d3087ab15e43e64fbb47e", + "url": "./static/media/arrow-right.e96d8158.svg" + }, + { + "revision": "d13b261cdb325ca4e59485cc1a2a2c25", + "url": "./static/media/aurora.d13b261c.svg" + }, + { + "revision": "2565884a03843bf5f37bf4a806402acf", + "url": "./static/media/avax.2565884a.png" + }, + { + "revision": "3588ca9784171847f8eda4a6a0ecaac9", + "url": "./static/media/baseEth.3588ca97.svg" + }, + { + "revision": "fd3ae3b35dee65cb967e6c1fb92b2778", + "url": "./static/media/blast.fd3ae3b3.svg" + }, + { + "revision": "e62a99c33b7eafddf701893750cedeb9", + "url": "./static/media/blue-loader.e62a99c3.svg" + }, + { + "revision": "162aaf57c64bd732a87c2d553a12f165", + "url": "./static/media/bnb.162aaf57.png" + }, + { + "revision": "dfd97aa5b03813b995e559a1747258b7", + "url": "./static/media/btcix.dfd97aa5.png" + }, + { + "revision": "5dd950ec66be581e8da4376f49a19d77", + "url": "./static/media/circle-grey.5dd950ec.svg" + }, + { + "revision": "716403ba670c3577abbea8e66f428721", + "url": "./static/media/circle.716403ba.svg" + }, + { + "revision": "a26a777a2f890b16c0f64985f1877629", + "url": "./static/media/cndl.a26a777a.svg" + }, + { + "revision": "aa4c7a7647abc7ede02e017c1a0141b6", + "url": "./static/media/coinbaseWalletIcon.aa4c7a76.svg" + }, + { + "revision": "73b9bf96a6d40089600021dc81e28d85", + "url": "./static/media/cro.73b9bf96.svg" + }, + { + "revision": "4b9a7c8903a172402c43e975cd628062", + "url": "./static/media/de.4b9a7c89.svg" + }, + { + "revision": "80a3ae258c229f3c874a8acdf65adeea", + "url": "./static/media/dropdown-blue.80a3ae25.svg" + }, + { + "revision": "50dbd07d8e7428d04464644f7cf819cf", + "url": "./static/media/dropdown.50dbd07d.svg" + }, + { + "revision": "345dad7494f835eb9ae6c21c2d3a25f4", + "url": "./static/media/dropup-blue.345dad74.svg" + }, + { + "revision": "767311236d51727249c52288892cbd7b", + "url": "./static/media/edg.76731123.svg" + }, + { + "revision": "42219103602e6dd2f02fb005bce546b7", + "url": "./static/media/en.42219103.svg" + }, + { + "revision": "6273c78a6e1df30a937e77571d8a83cd", + "url": "./static/media/es.6273c78a.svg" + }, + { + "revision": "86b356aa4636232f3e200c65d2a8b6b4", + "url": "./static/media/eth.86b356aa.png" + }, + { + "revision": "f0ab208059cc049e7740e8c5f3ac8e58", + "url": "./static/media/fkw.f0ab2080.png" + }, + { + "revision": "3af63018071dc72f01ff1880304ea6ec", + "url": "./static/media/ftm.3af63018.svg" + }, + { + "revision": "306cb394d8f9dcbd17bef4de084406f8", + "url": "./static/media/fuse.306cb394.svg" + }, + { + "revision": "cb9b3252a26b080c4964baeb2b7ff53c", + "url": "./static/media/glmr.cb9b3252.png" + }, + { + "revision": "99e1812218a346bc7b6ce40128f183f8", + "url": "./static/media/guapx.99e18122.png" + }, + { + "revision": "0d242628b316a0661456f0126257d3d1", + "url": "./static/media/ht.0d242628.svg" + }, + { + "revision": "7e79b672265708ee53cf41c32a124bdc", + "url": "./static/media/it.7e79b672.svg" + }, + { + "revision": "01c3fe8adf16309a7847b129f3393f9b", + "url": "./static/media/iw.01c3fe8a.svg" + }, + { + "revision": "50c67f3cdd04281013ef95e92fc7244e", + "url": "./static/media/link.50c67f3c.svg" + }, + { + "revision": "52eac682e8d399b4a8d1d48e38a60535", + "url": "./static/media/magnifying-glass.52eac682.svg" + }, + { + "revision": "1ee4a1ab4dd95100e8d21e67acf53849", + "url": "./static/media/matic.1ee4a1ab.png" + }, + { + "revision": "981ecca4e2e244ff635162cbb11b69ac", + "url": "./static/media/menu.981ecca4.svg" + }, + { + "revision": "023762b6aec2a2249b8fdfb638f00ef3", + "url": "./static/media/metamask.023762b6.png" + }, + { + "revision": "ccc42292cc242adcb9b010eb83140f72", + "url": "./static/media/movr.ccc42292.svg" + }, + { + "revision": "e781dbdcb5a699ae0344c3e5a523b46a", + "url": "./static/media/one.e781dbdc.svg" + }, + { + "revision": "416f1e79f20955c2501fcce739227826", + "url": "./static/media/opbnb.416f1e79.svg" + }, + { + "revision": "0d245621115b2c0453939f631d70aa58", + "url": "./static/media/optimisticEth.0d245621.svg" + }, + { + "revision": "be964fe9615463c2badea3b95d57a7fc", + "url": "./static/media/parody-logo.be964fe9.png" + }, + { + "revision": "899a4aa9bf85aba699112cc7cab6578e", + "url": "./static/media/plus-blue.899a4aa9.svg" + }, + { + "revision": "62281ca8cea976c7f20862db5d12728e", + "url": "./static/media/plus-grey.62281ca8.svg" + }, + { + "revision": "b234b2bfa0417c7e8711c3a8d17afeec", + "url": "./static/media/portisIcon.b234b2bf.png" + }, + { + "revision": "1761ff9cb139a2ba2a3a485172eb094c", + "url": "./static/media/question-mark.1761ff9c.svg" + }, + { + "revision": "63be1e247274b62bc269445bf114d497", + "url": "./static/media/question.63be1e24.svg" + }, + { + "revision": "3f61edb2c675ef535b0847ef14556579", + "url": "./static/media/rbtc.3f61edb2.png" + }, + { + "revision": "5d71cdb2ccd36f145a371fab0548e2d8", + "url": "./static/media/ru.5d71cdb2.svg" + }, + { + "revision": "31b54529a979b55eb9ec618ded64fc68", + "url": "./static/media/shibarium.31b54529.png" + }, + { + "revision": "a98424922149274b8a364358d02da9fe", + "url": "./static/media/spinner.a9842492.svg" + }, + { + "revision": "7cbcd424ca554dd563744b7ddfe7ac92", + "url": "./static/media/tomo.7cbcd424.svg" + }, + { + "revision": "edcc1ab5dde5cb3d5cf134c4aade641b", + "url": "./static/media/trustWallet.edcc1ab5.png" + }, + { + "revision": "5e81cac236fd057cb686399a8fa2ea57", + "url": "./static/media/walletConnectIcon.5e81cac2.svg" + }, + { + "revision": "5b8e218668bfea1d44b887bd042f6a52", + "url": "./static/media/x.5b8e2186.svg" + }, + { + "revision": "573f0f5f8086daf29bbfeea736b3ba39", + "url": "./static/media/xdai.573f0f5f.png" + }, + { + "revision": "1a6fff51c30dea059be5aa4177bde506", + "url": "./static/media/zh.1a6fff51.svg" + } +]); \ No newline at end of file diff --git a/service-worker.js b/service-worker.js index f588a60..98af84b 100644 --- a/service-worker.js +++ b/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "./precache-manifest.bd80582397a7ec199b4ba35337cebd55.js" + "./precache-manifest.44c3df07cfdbffeddbe21eb2480c63b1.js" ); self.addEventListener('message', (event) => { diff --git a/static/js/0.chunk.js b/static/js/0.chunk.js index b10111d..b26f657 100644 --- a/static/js/0.chunk.js +++ b/static/js/0.chunk.js @@ -1,2 +1,2 @@ /*! For license information please see 0.chunk.js.LICENSE.txt */ -(this.webpackJsonpunifactory=this.webpackJsonpunifactory||[]).push([[0],{1015:function(t,e,r){"use strict";var n=r(126),o=r(127),i=r(354),a=r(355),u=r(1085);Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;var c=r(1086),s=function(t){i(r,t);var e=a(r);function r(t,o,i){var a;if(n(this,r),!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!o||"string"!==typeof o)throw new Error('"message" must be a nonempty string.');return(a=e.call(this,o)).code=t,void 0!==i&&(a.data=i),a}return o(r,[{key:"serialize",value:function(){var t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}},{key:"toString",value:function(){return c.default(this.serialize(),f,2)}}]),r}(u(Error));e.EthereumRpcError=s;var l=function(t){i(r,t);var e=a(r);function r(t,o,i){if(n(this,r),!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');return e.call(this,t,o,i)}return o(r)}(s);function f(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=l},1016:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.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}},e.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."}}},1017:function(t,e,r){var n=r(500),o=r(126),i=r(127),a=r(354),u=r(355);function c(){"use strict";c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var s=function(t){"use strict";a(r,t);var e=u(r);function r(){var t;return o(this,r),(t=e.call(this)).updates=[],t}return i(r,[{key:"initialize",value:function(){var t=n(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"update",value:function(){var t=n(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("BaseFilter - no update method specified");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"addResults",value:function(t){var e=this;this.updates=this.updates.concat(t),t.forEach((function(t){return e.emit("update",t)}))}},{key:"addInitialResults",value:function(t){}},{key:"getChangesAndClear",value:function(){var t=this.updates;return this.updates=[],t}}]),r}(r(989).default);t.exports=s},1018:function(t,e,r){var n=r(500);function o(){"use strict";o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,a)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function i(){return(i=n(o().mark((function t(e){var r,n,i,s,l,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.provider,n=e.fromBlock,i=e.toBlock,n||(n=i),s=a(n),l=a(i),f=Array(l-s+1).fill().map((function(t,e){return s+e})).map(u),t.next=8,Promise.all(f.map((function(t){return c(r,"eth_getBlockByNumber",[t,!1])})));case 8:return h=t.sent,t.abrupt("return",h);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function a(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function u(t){return void 0===t||null===t?t:"0x"+t.toString(16)}function c(t,e,r){return new Promise((function(n,o){t.sendAsync({id:1,jsonrpc:"2.0",method:e,params:r},(function(t,e){if(t)return o(t);n(e.result)}))}))}t.exports=function(t){return i.apply(this,arguments)}},1071:function(t,e,r){var n=r(500),o=r(126),i=r(127),a=r(354),u=r(355);function c(){"use strict";c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var s=r(1072),l=r(1165),f=function(t){"use strict";a(r,t);var e=u(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,r),!n.provider)throw new Error("PollingBlockTracker - no provider specified.");var i=n.pollingInterval||2e4,a=n.retryTimeout||i/10,u=void 0===n.keepEventLoopActive||n.keepEventLoopActive,c=n.setSkipCacheFlag||!1;return(t=e.call(this,Object.assign({blockResetDuration:i},n)))._provider=n.provider,t._pollingInterval=i,t._retryTimeout=a,t._keepEventLoopActive=u,t._setSkipCacheFlag=c,t}return i(r,[{key:"checkForLatestBlock",value:function(){var t=n(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._updateLatestBlock();case 2:return t.next=4,this.getLatestBlock();case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_start",value:function(){var t=this;this._performSync().catch((function(e){return t.emit("error",e)}))}},{key:"_performSync",value:function(){var t=n(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._isRunning){t.next=16;break}return t.prev=1,t.next=4,this._updateLatestBlock();case 4:return t.next=6,h(this._pollingInterval,!this._keepEventLoopActive);case 6:t.next=14;break;case 8:t.prev=8,t.t0=t.catch(1),e=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n".concat(t.t0.stack));try{this.emit("error",e)}catch(r){console.error(e)}return t.next=14,h(this._retryTimeout,!this._keepEventLoopActive);case 14:t.next=0;break;case 16:case"end":return t.stop()}}),t,this,[[1,8]])})));return function(){return t.apply(this,arguments)}}()},{key:"_updateLatestBlock",value:function(){var t=n(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._fetchLatestBlock();case 2:e=t.sent,this._newPotentialLatest(e);case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_fetchLatestBlock",value:function(){var t=n(c().mark((function t(){var e,r,n=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]},this._setSkipCacheFlag&&(e.skipCache=!0),t.next=4,s((function(t){return n._provider.sendAsync(e,t)}))();case 4:if(!(r=t.sent).error){t.next=7;break}throw new Error("PollingBlockTracker - encountered error fetching block:\n".concat(r.error));case 7:return t.abrupt("return",r.result);case 8:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),r}(l);function h(t,e){return new Promise((function(r){var n=setTimeout(r,t);n.unref&&e&&n.unref()}))}t.exports=f},1072:function(t,e,r){"use strict";var n=function(t,e){return function(){for(var r=this,n=e.promiseModule,o=new Array(arguments.length),i=0;i=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var i=r(1271).Mutex,a=r(1082).createAsyncMiddleware,u=r(1088),c=r(1201),s=r(1204),l=r(1205),f=r(971),h=f.intToHex,p=f.hexToInt;function d(t){return v(n(o().mark((function e(){var r,n,i=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.apply(void 0,i);case 2:return r=e.sent,n=h(r.id),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)}))))}function v(t){return a(function(){var e=n(o().mark((function e(r,n){var i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.apply(null,r.params);case 2:i=e.sent,n.result=i;case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())}function y(t,e){var r=[];for(var n in t)r.push(t[n]);return r}t.exports=function(t){var e=t.blockTracker,r=t.provider,a=0,f={},g=new i,m=function(t){var e=t.mutex;return function(t){return function(){var r=n(o().mark((function r(n,i,a,u){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.acquire();case 2:(0,r.sent)(),t(n,i,a,u);case 5:case"end":return r.stop()}}),r)})));return function(t,e,n,o){return r.apply(this,arguments)}}()}}({mutex:g}),w=u({eth_newFilter:m(d(x)),eth_newBlockFilter:m(d(L)),eth_newPendingTransactionFilter:m(d(k)),eth_uninstallFilter:m(v(S)),eth_getFilterChanges:m(v(j)),eth_getFilterLogs:m(v(N))}),b=function(){var t=n(o().mark((function t(e){var r,i,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.oldBlock,i=e.newBlock,0!==f.length){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,g.acquire();case 5:return a=t.sent,t.prev=6,t.next=9,Promise.all(y(f).map(function(){var t=n(o().mark((function t(e){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.update({oldBlock:r,newBlock:i});case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),console.error(t.t0);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(6),console.error(t.t0);case 14:a();case 15:case"end":return t.stop()}}),t,null,[[6,11]])})));return function(e){return t.apply(this,arguments)}}();return w.newLogFilter=x,w.newBlockFilter=L,w.newPendingTransactionFilter=k,w.uninstallFilter=S,w.getFilterChanges=j,w.getFilterLogs=N,w.destroy=function(){!function(){G.apply(this,arguments)}()},w;function x(t){return E.apply(this,arguments)}function E(){return(E=n(o().mark((function t(e){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new c({provider:r,params:e}),t.next=3,T(n);case 3:return t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function L(){return _.apply(this,arguments)}function _(){return(_=n(o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new s({provider:r}),t.next=3,T(e);case 3:return t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(){return O.apply(this,arguments)}function O(){return(O=n(o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new l({provider:r}),t.next=3,T(e);case 3:return t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function j(t){return P.apply(this,arguments)}function P(){return(P=n(o().mark((function t(e){var r,n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=p(e),n=f[r]){t.next=4;break}throw new Error('No filter for index "'.concat(r,'"'));case 4:return i=n.getChangesAndClear(),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function N(t){return R.apply(this,arguments)}function R(){return(R=n(o().mark((function t(e){var r,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=p(e),n=f[r]){t.next=4;break}throw new Error('No filter for index "'.concat(r,'"'));case 4:return"log"===n.type?results=n.getAllResults():results=[],t.abrupt("return",results);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(t){return B.apply(this,arguments)}function B(){return(B=n(o().mark((function t(e){var r,n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=p(e),n=f[r],!(i=Boolean(n))){t.next=6;break}return t.next=6,A(r);case 6:return t.abrupt("return",i);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(t){return F.apply(this,arguments)}function F(){return(F=n(o().mark((function t(r){var n,i,u;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=y(f).length,t.next=3,e.getLatestBlock();case 3:return i=t.sent,t.next=6,r.initialize({currentBlock:i});case 6:return a++,f[a]=r,r.id=a,r.idHex=h(a),u=y(f).length,C({prevFilterCount:n,newFilterCount:u}),t.abrupt("return",a);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(t){return I.apply(this,arguments)}function I(){return(I=n(o().mark((function t(e){var r,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=y(f).length,delete f[e],n=y(f).length,C({prevFilterCount:r,newFilterCount:n});case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function G(){return(G=n(o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=y(f).length,f={},C({prevFilterCount:e,newFilterCount:0});case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(t){var r=t.prevFilterCount,n=t.newFilterCount;0===r&&n>0?e.on("sync",b):r>0&&0===n&&e.removeListener("sync",b)}}},1082:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(1192),e),o(r(1193),e),o(r(1194),e),o(r(1083),e),o(r(1084),e),o(r(1199),e)},1083:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;var n=Math.floor(4294967295*Math.random());e.getUniqueId=function(){return n=(n+1)%4294967295}},1084:function(t,e,r){"use strict";var n=r(183),o=r(283),i=r(500),a=r(126),u=r(127),c=r(354),s=r(355);function l(){l=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(N){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=s;var h={};function p(){}function d(){}function v(){}var y={};c(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var f=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;var h=f(r(989)),p=r(1195),d=function(t){c(r,t);var e=s(r);function r(){var t;return a(this,r),(t=e.call(this))._middleware=[],t}return u(r,[{key:"push",value:function(t){this._middleware.push(t)}},{key:"handle",value:function(t,e){if(e&&"function"!==typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}},{key:"asMiddleware",value:function(){var t=this;return function(){var e=i(l().mark((function e(n,a,u,c){var s,f,h,p,d;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r._runAllMiddleware(n,a,t._middleware);case 3:if(s=e.sent,f=o(s,3),h=f[0],p=f[1],d=f[2],!p){e.next=12;break}return e.next=11,r._runReturnHandlers(d);case 11:return e.abrupt("return",c(h));case 12:return e.abrupt("return",u(function(){var t=i(l().mark((function t(e){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r._runReturnHandlers(d);case 3:t.next=8;break;case 5:return t.prev=5,t.t0=t.catch(0),t.abrupt("return",e(t.t0));case 8:return t.abrupt("return",e());case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 15:return e.prev=15,e.t0=e.catch(0),e.abrupt("return",c(e.t0));case 18:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t,r,n,o){return e.apply(this,arguments)}}()}},{key:"_handleBatch",value:function(){var t=i(l().mark((function t(e,r){var n;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.all(e.map(this._promiseHandle.bind(this)));case 3:if(n=t.sent,!r){t.next=6;break}return t.abrupt("return",r(null,n));case 6:return t.abrupt("return",n);case 9:if(t.prev=9,t.t0=t.catch(0),!r){t.next=13;break}return t.abrupt("return",r(t.t0));case 13:throw t.t0;case 14:case"end":return t.stop()}}),t,this,[[0,9]])})));return function(e,r){return t.apply(this,arguments)}}()},{key:"_promiseHandle",value:function(t){var e=this;return new Promise((function(r){e._handle(t,(function(t,e){r(e)}))}))}},{key:"_handle",value:function(){var t=i(l().mark((function t(e,r){var n,o,i,a,u;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&!Array.isArray(e)&&"object"===typeof e){t.next=3;break}return n=new p.EthereumRpcError(p.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: ".concat(typeof e),{request:e}),t.abrupt("return",r(n,{id:void 0,jsonrpc:"2.0",error:n}));case 3:if("string"===typeof e.method){t.next=6;break}return o=new p.EthereumRpcError(p.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: ".concat(typeof e.method),{request:e}),t.abrupt("return",r(o,{id:e.id,jsonrpc:"2.0",error:o}));case 6:return i=Object.assign({},e),a={id:i.id,jsonrpc:i.jsonrpc},u=null,t.prev=9,t.next=12,this._processRequest(i,a);case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(9),u=t.t0;case 17:return u&&(delete a.result,a.error||(a.error=p.serializeError(u))),t.abrupt("return",r(u,a));case 19:case"end":return t.stop()}}),t,this,[[9,14]])})));return function(e,r){return t.apply(this,arguments)}}()},{key:"_processRequest",value:function(){var t=i(l().mark((function t(e,n){var i,a,u,c,s;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r._runAllMiddleware(e,n,this._middleware);case 2:return i=t.sent,a=o(i,3),u=a[0],c=a[1],s=a[2],r._checkForCompletion(e,n,c),t.next=10,r._runReturnHandlers(s);case 10:if(!u){t.next=12;break}throw u;case 12:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}()}],[{key:"_runAllMiddleware",value:function(){var t=i(l().mark((function t(e,i,a){var u,c,s,f,h,p,d,v;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:u=[],c=null,s=!1,f=n(a),t.prev=4,f.s();case 6:if((h=f.n()).done){t.next=18;break}return p=h.value,t.next=10,r._runMiddleware(e,i,p,u);case 10:if(d=t.sent,v=o(d,2),c=v[0],!(s=v[1])){t.next=16;break}return t.abrupt("break",18);case 16:t.next=6;break;case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(4),f.e(t.t0);case 23:return t.prev=23,f.f(),t.finish(23);case 26:return t.abrupt("return",[c,s,u.reverse()]);case 27:case"end":return t.stop()}}),t,null,[[4,20,23,26]])})));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"_runMiddleware",value:function(t,e,r,n){return new Promise((function(o){var i=function(t){var r=t||e.error;r&&(e.error=p.serializeError(r)),o([r,!0])};try{r(t,e,(function(r){e.error?i(e.error):(r&&("function"!==typeof r&&i(new p.EthereumRpcError(p.errorCodes.rpc.internal,'JsonRpcEngine: "next" return handlers must be functions. '+'Received "'.concat(typeof r,'" for request:\n').concat(v(t)),{request:t})),n.push(r)),o([null,!1]))}),i)}catch(a){i(a)}}))}},{key:"_runReturnHandlers",value:function(){var t=i(l().mark((function t(e){var r,o,i;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n(e),t.prev=1,i=l().mark((function t(){var e;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=o.value,t.next=3,new Promise((function(t,r){e((function(e){return e?r(e):t()}))}));case 3:case"end":return t.stop()}}),t)})),r.s();case 4:if((o=r.n()).done){t.next=8;break}return t.delegateYield(i(),"t0",6);case 6:t.next=4;break;case 8:t.next=13;break;case 10:t.prev=10,t.t1=t.catch(1),r.e(t.t1);case 13:return t.prev=13,r.f(),t.finish(13);case 16:case"end":return t.stop()}}),t,null,[[1,10,13,16]])})));return function(e){return t.apply(this,arguments)}}()},{key:"_checkForCompletion",value:function(t,e,r){if(!("result"in e)&&!("error"in e))throw new p.EthereumRpcError(p.errorCodes.rpc.internal,"JsonRpcEngine: Response has no error or result for request:\n".concat(v(t)),{request:t});if(!r)throw new p.EthereumRpcError(p.errorCodes.rpc.internal,"JsonRpcEngine: Nothing ended request:\n".concat(v(t)),{request:t})}}]),r}(h.default);function v(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=d},1085:function(t,e,r){var n=r(503),o=r(508),i=r(1196),a=r(1197);function u(e){var r="function"===typeof Map?new Map:void 0;return t.exports=u=function(t){if(null===t||!i(t))return t;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return a(t,arguments,n(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o(e,t)},u(e)}t.exports=u},1086:function(t,e){t.exports=i,i.default=i,i.stable=c,i.stableStringify=c;var r=[],n=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function i(t,e,i,u){var c;"undefined"===typeof u&&(u=o()),function t(e,r,n,o,i,u,c){var s;if(u+=1,"object"===typeof e&&null!==e){for(s=0;sc.depthLimit)return void a("[...]",e,r,i);if("undefined"!==typeof c.edgesLimit&&n+1>c.edgesLimit)return void a("[...]",e,r,i);if(o.push(e),Array.isArray(e))for(s=0;se?1:0}function c(t,e,i,c){"undefined"===typeof c&&(c=o());var l,f=function t(e,n,o,i,c,s,l){var f;if(s+=1,"object"===typeof e&&null!==e){for(f=0;fl.depthLimit)return void a("[...]",e,n,c);if("undefined"!==typeof l.edgesLimit&&o+1>l.edgesLimit)return void a("[...]",e,n,c);if(i.push(e),Array.isArray(e))for(f=0;f0)for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:a;if(Number.isInteger(t)){var o=t.toString();if(h(n.errorValues,o))return n.errorValues[o].message;if(l(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function s(t){if(!Number.isInteger(t))return!1;var e=t.toString();return!!n.errorValues[e]||!!l(t)}function l(t){return t>=-32099&&t<=-32e3}function f(t){return t&&"object"===typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=c,e.isValidCode=s,e.serializeError=function(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.fallbackError,a=void 0===i?u:i,l=n.shouldIncludeStack,p=void 0!==l&&l;if(!a||!Number.isInteger(a.code)||"string"!==typeof a.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof o.EthereumRpcError)return t.serialize();var d={};if(t&&"object"===typeof t&&!Array.isArray(t)&&h(t,"code")&&s(t.code)){var v=t;d.code=v.code,v.message&&"string"===typeof v.message?(d.message=v.message,h(v,"data")&&(d.data=v.data)):(d.message=c(d.code),d.data={originalError:f(t)})}else{d.code=a.code;var y=null===(e=t)||void 0===e?void 0:e.message;d.message=y&&"string"===typeof y?y:a.message,d.data={originalError:f(t)}}var g=null===(r=t)||void 0===r?void 0:r.stack;return p&&t&&g&&"string"===typeof g&&(d.stack=g),d}},1088:function(t,e,r){t.exports=r(1200)},1090:function(t,e,r){var n=r(500);function o(){"use strict";o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,a)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var i=r(989).default,a=r(1088),u=r(1082).createAsyncMiddleware,c=r(1081),s=r(971),l=s.unsafeRandomBytes,f=s.incrementHexInt,h=r(1018);function p(t){return{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function(t){var e=t.blockTracker,r=t.provider,s={},d=c({blockTracker:e,provider:r}),v=!1,y=new i,g=a({eth_subscribe:u((function(t,e){return m.apply(this,arguments)})),eth_unsubscribe:u((function(t,e){return w.apply(this,arguments)}))});return g.destroy=function(){for(var t in y.removeAllListeners(),s)s[t].destroy(),delete s[t];v=!0},{events:y,middleware:g};function m(){return(m=n(o().mark((function t(i,a){var u,c,y,g,m,w,x;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(x=function(t){var e=t.subId,r=t.filter;return r.on("update",(function(t){return b(e,t)})),{type:u,destroy:function(){var t=n(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.uninstallFilter(r.idHex);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}},w=function(t){var i=t.subId,a={type:u,destroy:function(){var t=n(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.removeListener("sync",a.update);case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),update:function(){var t=n(o().mark((function t(e){var n,a,u,c,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.oldBlock,a=e.newBlock,u=a,c=f(n),t.next=5,h({provider:r,fromBlock:c,toBlock:u});case 5:s=t.sent,s.map(p).forEach((function(t){b(i,t)}));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()};return e.on("sync",a.update),a},!v){t.next=4;break}throw new Error("SubscriptionManager - attempting to use after destroying");case 4:u=i.params[0],c=l(16),t.t0=u,t.next="newHeads"===t.t0?9:"logs"===t.t0?11:17;break;case 9:return y=w({subId:c}),t.abrupt("break",18);case 11:return g=i.params[1],t.next=14,d.newLogFilter(g);case 14:return m=t.sent,y=x({subId:c,filter:m}),t.abrupt("break",18);case 17:throw new Error('SubscriptionManager - unsupported subscription type "'.concat(u,'"'));case 18:return s[c]=y,a.result=c,t.abrupt("return");case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function w(){return(w=n(o().mark((function t(e,r){var n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!v){t.next=2;break}throw new Error("SubscriptionManager - attempting to use after destroying");case 2:if(n=e.params[0],i=s[n]){t.next=7;break}return r.result=!1,t.abrupt("return");case 7:return delete s[n],t.next=10,i.destroy();case 10:r.result=!0;case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(t,e){y.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},1116:function(t,e,r){var n=r(512);t.exports=function(t){if(Array.isArray(t))return n(t)}},1117:function(t,e){t.exports=function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},1118:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},1165:function(t,e,r){var n=r(500),o=r(126),i=r(127),a=r(509),u=r(1073),c=r(503),s=r(354),l=r(355);function f(){"use strict";f=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(N){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=s;var h={};function p(){}function d(){}function v(){}var y={};c(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=l(t[o],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}r(1074),r(1072);var h=r(1168),p=function(t,e){return t+e},d=["sync","latest"],v=function(t){"use strict";s(r,t);var e=l(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,r),(t=e.call(this))._blockResetDuration=n.blockResetDuration||2e4,t._blockResetTimeout,t._currentBlock=null,t._isRunning=!1,t._onNewListener=t._onNewListener.bind(a(t)),t._onRemoveListener=t._onRemoveListener.bind(a(t)),t._resetCurrentBlock=t._resetCurrentBlock.bind(a(t)),t._setupInternalEvents(),t}return i(r,[{key:"isRunning",value:function(){return this._isRunning}},{key:"getCurrentBlock",value:function(){return this._currentBlock}},{key:"getLatestBlock",value:function(){var t=n(f().mark((function t(){var e,r=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._currentBlock){t.next=2;break}return t.abrupt("return",this._currentBlock);case 2:return t.next=4,new Promise((function(t){return r.once("latest",t)}));case 4:return e=t.sent,t.abrupt("return",e);case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"removeAllListeners",value:function(t){t?u(c(r.prototype),"removeAllListeners",this).call(this,t):u(c(r.prototype),"removeAllListeners",this).call(this),this._setupInternalEvents(),this._onRemoveListener()}},{key:"_start",value:function(){}},{key:"_end",value:function(){}},{key:"_setupInternalEvents",value:function(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}},{key:"_onNewListener",value:function(t,e){d.includes(t)&&this._maybeStart()}},{key:"_onRemoveListener",value:function(t,e){this._getBlockTrackerEventCount()>0||this._maybeEnd()}},{key:"_maybeStart",value:function(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}},{key:"_maybeEnd",value:function(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}},{key:"_getBlockTrackerEventCount",value:function(){var t=this;return d.map((function(e){return t.listenerCount(e)})).reduce(p)}},{key:"_newPotentialLatest",value:function(t){var e=this._currentBlock;e&&y(t)<=y(e)||this._setCurrentBlock(t)}},{key:"_setCurrentBlock",value:function(t){var e=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:e,newBlock:t})}},{key:"_setupBlockResetTimeout",value:function(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}},{key:"_cancelBlockResetTimeout",value:function(){clearTimeout(this._blockResetTimeout)}},{key:"_resetCurrentBlock",value:function(){this._currentBlock=null}}]),r}(h);function y(t){return Number.parseInt(t,16)}t.exports=v},1166:function(t,e,r){var n=r(503);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t}},1167:function(t,e){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,r="undefined"!==typeof t.start?t.start:Math.floor(Math.random()*e);return function(){return r%=e,r++}}},1168:function(t,e,r){var n=r(501),o=r(114),i="object"===typeof Reflect?Reflect:null,a=i&&"function"===typeof i.apply?i.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};function u(){o.call(this)}function c(t,e,r){try{a(t,e,r)}catch(n){setTimeout((function(){throw n}))}}function s(t,e){for(var r=new Array(e),n=0;n0&&(i=e[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var u=o[t];if(void 0===u)return!1;if("function"===typeof u)c(u,this,e);else{var l=u.length,f=s(u,l);for(r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return function(){var e=n(o().mark((function e(r,i,a,u){var c,s,l,f,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=new Promise((function(t){c=t})),l=null,f=!1,h=function(){var t=n(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=!0,a((function(t){l=t,c()})),t.next=4,s;case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),e.prev=4,e.next=7,t(r,i,h);case 7:if(!f){e.next=13;break}return e.next=10,s;case 10:l(null),e.next=14;break;case 13:u(null);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),l?l(e.t0):u(e.t0);case 19:case"end":return e.stop()}}),e,null,[[4,16]])})));return function(t,r,n,o){return e.apply(this,arguments)}}()}},1194:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return function(e,r,n,o){var i=t[e.method];return void 0===i?n():"function"===typeof i?i(e,r,n,o):(r.result=i,o())}}},1195:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;var n=r(1015);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});var o=r(1087);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return o.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return o.getMessageFromCode}});var i=r(1198);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return i.ethErrors}});var a=r(1016);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})},1196:function(t,e){t.exports=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}},1197:function(t,e,r){var n=r(508),o=r(514);function i(e,r,a){return o()?t.exports=i=Reflect.construct:t.exports=i=function(t,e,r){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return r&&n(i,r.prototype),i},i.apply(null,arguments)}t.exports=i},1198:function(t,e,r){"use strict";var n=r(283);Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;var o=r(1015),i=r(1087),a=r(1016);function u(t,e){var r=s(e),a=n(r,2),u=a[0],c=a[1];return new o.EthereumRpcError(t,u||i.getMessageFromCode(t),c)}function c(t,e){var r=s(e),a=n(r,2),u=a[0],c=a[1];return new o.EthereumProviderError(t,u||i.getMessageFromCode(t),c)}function s(t){if(t){if("string"===typeof t)return[t];if("object"===typeof t&&!Array.isArray(t)){var e=t.message,r=t.data;if(e&&"string"!==typeof e)throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}e.ethErrors={rpc:{parse:function(t){return u(a.errorCodes.rpc.parse,t)},invalidRequest:function(t){return u(a.errorCodes.rpc.invalidRequest,t)},invalidParams:function(t){return u(a.errorCodes.rpc.invalidParams,t)},methodNotFound:function(t){return u(a.errorCodes.rpc.methodNotFound,t)},internal:function(t){return u(a.errorCodes.rpc.internal,t)},server:function(t){if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");var e=t.code;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return u(e,t)},invalidInput:function(t){return u(a.errorCodes.rpc.invalidInput,t)},resourceNotFound:function(t){return u(a.errorCodes.rpc.resourceNotFound,t)},resourceUnavailable:function(t){return u(a.errorCodes.rpc.resourceUnavailable,t)},transactionRejected:function(t){return u(a.errorCodes.rpc.transactionRejected,t)},methodNotSupported:function(t){return u(a.errorCodes.rpc.methodNotSupported,t)},limitExceeded:function(t){return u(a.errorCodes.rpc.limitExceeded,t)}},provider:{userRejectedRequest:function(t){return c(a.errorCodes.provider.userRejectedRequest,t)},unauthorized:function(t){return c(a.errorCodes.provider.unauthorized,t)},unsupportedMethod:function(t){return c(a.errorCodes.provider.unsupportedMethod,t)},disconnected:function(t){return c(a.errorCodes.provider.disconnected,t)},chainDisconnected:function(t){return c(a.errorCodes.provider.chainDisconnected,t)},custom:function(t){if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");var e=t.code,r=t.message,n=t.data;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new o.EthereumProviderError(e,r,n)}}}},1199:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;var n=r(1084);e.mergeMiddleware=function(t){var e=new n.JsonRpcEngine;return t.forEach((function(t){return e.push(t)})),e.asMiddleware()}},1200:function(t,e){t.exports=function(t){return function(e,r,n,o){var i=t[e.method];return void 0===i?n():"function"===typeof i?i(e,r,n,o):(r.result=i,o())}}},1201:function(t,e,r){var n=r(500),o=r(126),i=r(127),a=r(354),u=r(355);function c(){"use strict";c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var s=r(1074),l=r(1202),f=r(1203),h=r(971),p=(h.bnToHex,h.hexToInt),d=h.incrementHexInt,v=h.minBlockRef,y=h.blockRefIsNumber,g=function(t){"use strict";a(r,t);var e=u(r);function r(t){var n,i=t.provider,a=t.params;return o(this,r),(n=e.call(this)).type="log",n.ethQuery=new s(i),n.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},a),n.params.address&&(Array.isArray(n.params.address)||(n.params.address=[n.params.address]),n.params.address=n.params.address.map((function(t){return t.toLowerCase()}))),n}return i(r,[{key:"initialize",value:function(){var t=n(c().mark((function t(e){var r,n,o,i,a;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.currentBlock,n=this.params.fromBlock,["latest","pending"].includes(n)&&(n=r),"earliest"===n&&(n="0x0"),this.params.fromBlock=n,o=v(this.params.toBlock,r),i=Object.assign({},this.params,{toBlock:o}),t.next=9,this._fetchLogs(i);case 9:a=t.sent,this.addInitialResults(a);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"update",value:function(){var t=n(c().mark((function t(e){var r,n,o,i,a,u,s,l=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.oldBlock,n=e.newBlock,o=n,i=r?d(r):n,a=Object.assign({},this.params,{fromBlock:i,toBlock:o}),t.next=6,this._fetchLogs(a);case 6:u=t.sent,s=u.filter((function(t){return l.matchLog(t)})),this.addResults(s);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_fetchLogs",value:function(){var t=n(c().mark((function t(e){var r,n=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l((function(t){return n.ethQuery.getLogs(e,t)}))();case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"matchLog",value:function(t){if(p(this.params.fromBlock)>=p(t.blockNumber))return!1;if(y(this.params.toBlock)&&p(this.params.toBlock)<=p(t.blockNumber))return!1;var e=t.address&&t.address.toLowerCase();return!(this.params.address&&e&&!this.params.address.includes(e))&&this.params.topics.every((function(e,r){var n=t.topics[r];if(!n)return!1;n=n.toLowerCase();var o=Array.isArray(e)?e:[e];return!!o.includes(null)||(o=o.map((function(t){return t.toLowerCase()}))).includes(n)}))}}]),r}(f);t.exports=g},1202:function(t,e,r){"use strict";var n=r(225),o=function(t,e,r,n){return function(){for(var o=this,i=arguments.length,a=new Array(i),u=0;u=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var f=function(t){"use strict";c(r,t);var e=s(r);function r(){var t;return o(this,r),(t=e.call(this)).allResults=[],t}return i(r,[{key:"update",value:function(){var t=n(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("BaseFilterWithHistory - no update method specified");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"addResults",value:function(t){this.allResults=this.allResults.concat(t),a(u(r.prototype),"addResults",this).call(this,t)}},{key:"addInitialResults",value:function(t){this.allResults=this.allResults.concat(t),a(u(r.prototype),"addInitialResults",this).call(this,t)}},{key:"getAllResults",value:function(){return this.allResults}}]),r}(r(1017));t.exports=f},1204:function(t,e,r){var n=r(500),o=r(126),i=r(127),a=r(354),u=r(355);function c(){"use strict";c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var s=r(1017),l=r(1018),f=r(971).incrementHexInt,h=function(t){"use strict";a(r,t);var e=u(r);function r(t){var n,i=t.provider;t.params;return o(this,r),(n=e.call(this)).type="block",n.provider=i,n}return i(r,[{key:"update",value:function(){var t=n(c().mark((function t(e){var r,n,o,i,a,u;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.oldBlock,n=e.newBlock,o=n,i=f(r),t.next=5,l({provider:this.provider,fromBlock:i,toBlock:o});case 5:a=t.sent,u=a.map((function(t){return t.hash})),this.addResults(u);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),r}(s);t.exports=h},1205:function(t,e,r){var n=r(962),o=r(183),i=r(500),a=r(126),u=r(127),c=r(354),s=r(355);function l(){"use strict";l=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(N){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=s;var h={};function p(){}function d(){}function v(){}var y={};c(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var f=r(1017),h=r(1018),p=r(971).incrementHexInt,d=function(t){"use strict";c(r,t);var e=s(r);function r(t){var n,o=t.provider;return a(this,r),(n=e.call(this)).type="tx",n.provider=o,n}return u(r,[{key:"update",value:function(){var t=i(l().mark((function t(e){var r,i,a,u,c,s,f,d;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.oldBlock,i=r,a=p(r),t.next=5,h({provider:this.provider,fromBlock:a,toBlock:i});case 5:u=t.sent,c=[],s=o(u);try{for(s.s();!(f=s.n()).done;)d=f.value,c.push.apply(c,n(d.transactions))}catch(l){s.e(l)}finally{s.f()}this.addResults(c);case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),r}(f);t.exports=d},1271:function(t,e,r){"use strict";r.r(e),r.d(e,"Mutex",(function(){return i})),r.d(e,"Semaphore",(function(){return o})),r.d(e,"withTimeout",(function(){return a}));var n=r(79),o=function(){function t(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return t.prototype.acquire=function(){var t=this,e=this.isLocked(),r=new Promise((function(e){return t._queue.push(e)}));return e||this._dispatch(),r},t.prototype.runExclusive=function(t){return Object(n.b)(this,void 0,void 0,(function(){var e,r,o;return Object(n.c)(this,(function(n){switch(n.label){case 0:return[4,this.acquire()];case 1:e=n.sent(),r=e[0],o=e[1],n.label=2;case 2:return n.trys.push([2,,4,5]),[4,t(r)];case 3:return[2,n.sent()];case 4:return o(),[7];case 5:return[2]}}))}))},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},t.prototype._dispatch=function(){var t=this,e=this._queue.shift();if(e){var r=!1;this._currentReleaser=function(){r||(r=!0,t._value++,t._dispatch())},e([this._value--,this._currentReleaser])}},t}(),i=function(){function t(){this._semaphore=new o(1)}return t.prototype.acquire=function(){return Object(n.b)(this,void 0,void 0,(function(){var t;return Object(n.c)(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=e.sent(),[2,t[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();function a(t,e,r){var o=this;return void 0===r&&(r=new Error("timeout")),{acquire:function(){return new Promise((function(i,a){return Object(n.b)(o,void 0,void 0,(function(){var o,u;return Object(n.c)(this,(function(n){switch(n.label){case 0:return o=!1,setTimeout((function(){o=!0,a(r)}),e),[4,t.acquire()];case 1:return u=n.sent(),o?(Array.isArray(u)?u[1]:u)():i(u),[2]}}))}))}))},runExclusive:function(t){return Object(n.b)(this,void 0,void 0,(function(){var e,r;return Object(n.c)(this,(function(n){switch(n.label){case 0:e=function(){},n.label=1;case 1:return n.trys.push([1,,7,8]),[4,this.acquire()];case 2:return r=n.sent(),Array.isArray(r)?(e=r[1],[4,t(r[0])]):[3,4];case 3:return[2,n.sent()];case 4:return e=r,[4,t()];case 5:return[2,n.sent()];case 6:return[3,8];case 7:return e(),[7];case 8:return[2]}}))}))},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}},962:function(t,e,r){var n=r(1116),o=r(1117),i=r(358),a=r(1118);t.exports=function(t){return n(t)||o(t)||i(t)||a()}},971:function(t,e){function r(t){return t.sort((function(t,e){return"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:n(t)-n(e)}))}function n(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function o(t){if(void 0===t||null===t)return t;var e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function i(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(){for(var t=arguments.length,e=new Array(t),n=0;n1?n-1:0),i=1;i0&&(a=o[0]),a instanceof Error)throw a;var s=new Error("Unhandled error.".concat(a?" (".concat(a.message,")"):""));throw s.context=a,s}var l=r[t];if(void 0===l)return!1;if("function"===typeof l)u(l,this,o);else for(var f=l.length,h=c(l),p=0;p=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');return e.call(this,t,o,i)}return o(r)}(s);function f(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=l},1017:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.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}},e.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."}}},1018:function(t,e,r){var n=r(501),o=r(126),i=r(127),a=r(355),u=r(356);function c(){"use strict";c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var s=function(t){"use strict";a(r,t);var e=u(r);function r(){var t;return o(this,r),(t=e.call(this)).updates=[],t}return i(r,[{key:"initialize",value:function(){var t=n(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"update",value:function(){var t=n(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("BaseFilter - no update method specified");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"addResults",value:function(t){var e=this;this.updates=this.updates.concat(t),t.forEach((function(t){return e.emit("update",t)}))}},{key:"addInitialResults",value:function(t){}},{key:"getChangesAndClear",value:function(){var t=this.updates;return this.updates=[],t}}]),r}(r(990).default);t.exports=s},1019:function(t,e,r){var n=r(501);function o(){"use strict";o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,a)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function i(){return(i=n(o().mark((function t(e){var r,n,i,s,l,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.provider,n=e.fromBlock,i=e.toBlock,n||(n=i),s=a(n),l=a(i),f=Array(l-s+1).fill().map((function(t,e){return s+e})).map(u),t.next=8,Promise.all(f.map((function(t){return c(r,"eth_getBlockByNumber",[t,!1])})));case 8:return h=t.sent,t.abrupt("return",h);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function a(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function u(t){return void 0===t||null===t?t:"0x"+t.toString(16)}function c(t,e,r){return new Promise((function(n,o){t.sendAsync({id:1,jsonrpc:"2.0",method:e,params:r},(function(t,e){if(t)return o(t);n(e.result)}))}))}t.exports=function(t){return i.apply(this,arguments)}},1072:function(t,e,r){var n=r(501),o=r(126),i=r(127),a=r(355),u=r(356);function c(){"use strict";c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var s=r(1073),l=r(1166),f=function(t){"use strict";a(r,t);var e=u(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,r),!n.provider)throw new Error("PollingBlockTracker - no provider specified.");var i=n.pollingInterval||2e4,a=n.retryTimeout||i/10,u=void 0===n.keepEventLoopActive||n.keepEventLoopActive,c=n.setSkipCacheFlag||!1;return(t=e.call(this,Object.assign({blockResetDuration:i},n)))._provider=n.provider,t._pollingInterval=i,t._retryTimeout=a,t._keepEventLoopActive=u,t._setSkipCacheFlag=c,t}return i(r,[{key:"checkForLatestBlock",value:function(){var t=n(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._updateLatestBlock();case 2:return t.next=4,this.getLatestBlock();case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_start",value:function(){var t=this;this._performSync().catch((function(e){return t.emit("error",e)}))}},{key:"_performSync",value:function(){var t=n(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._isRunning){t.next=16;break}return t.prev=1,t.next=4,this._updateLatestBlock();case 4:return t.next=6,h(this._pollingInterval,!this._keepEventLoopActive);case 6:t.next=14;break;case 8:t.prev=8,t.t0=t.catch(1),e=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n".concat(t.t0.stack));try{this.emit("error",e)}catch(r){console.error(e)}return t.next=14,h(this._retryTimeout,!this._keepEventLoopActive);case 14:t.next=0;break;case 16:case"end":return t.stop()}}),t,this,[[1,8]])})));return function(){return t.apply(this,arguments)}}()},{key:"_updateLatestBlock",value:function(){var t=n(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._fetchLatestBlock();case 2:e=t.sent,this._newPotentialLatest(e);case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_fetchLatestBlock",value:function(){var t=n(c().mark((function t(){var e,r,n=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]},this._setSkipCacheFlag&&(e.skipCache=!0),t.next=4,s((function(t){return n._provider.sendAsync(e,t)}))();case 4:if(!(r=t.sent).error){t.next=7;break}throw new Error("PollingBlockTracker - encountered error fetching block:\n".concat(r.error));case 7:return t.abrupt("return",r.result);case 8:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),r}(l);function h(t,e){return new Promise((function(r){var n=setTimeout(r,t);n.unref&&e&&n.unref()}))}t.exports=f},1073:function(t,e,r){"use strict";var n=function(t,e){return function(){for(var r=this,n=e.promiseModule,o=new Array(arguments.length),i=0;i=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var i=r(1272).Mutex,a=r(1083).createAsyncMiddleware,u=r(1089),c=r(1202),s=r(1205),l=r(1206),f=r(972),h=f.intToHex,p=f.hexToInt;function d(t){return v(n(o().mark((function e(){var r,n,i=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.apply(void 0,i);case 2:return r=e.sent,n=h(r.id),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)}))))}function v(t){return a(function(){var e=n(o().mark((function e(r,n){var i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.apply(null,r.params);case 2:i=e.sent,n.result=i;case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())}function y(t,e){var r=[];for(var n in t)r.push(t[n]);return r}t.exports=function(t){var e=t.blockTracker,r=t.provider,a=0,f={},g=new i,m=function(t){var e=t.mutex;return function(t){return function(){var r=n(o().mark((function r(n,i,a,u){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.acquire();case 2:(0,r.sent)(),t(n,i,a,u);case 5:case"end":return r.stop()}}),r)})));return function(t,e,n,o){return r.apply(this,arguments)}}()}}({mutex:g}),w=u({eth_newFilter:m(d(x)),eth_newBlockFilter:m(d(L)),eth_newPendingTransactionFilter:m(d(k)),eth_uninstallFilter:m(v(S)),eth_getFilterChanges:m(v(j)),eth_getFilterLogs:m(v(N))}),b=function(){var t=n(o().mark((function t(e){var r,i,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.oldBlock,i=e.newBlock,0!==f.length){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,g.acquire();case 5:return a=t.sent,t.prev=6,t.next=9,Promise.all(y(f).map(function(){var t=n(o().mark((function t(e){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.update({oldBlock:r,newBlock:i});case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),console.error(t.t0);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(6),console.error(t.t0);case 14:a();case 15:case"end":return t.stop()}}),t,null,[[6,11]])})));return function(e){return t.apply(this,arguments)}}();return w.newLogFilter=x,w.newBlockFilter=L,w.newPendingTransactionFilter=k,w.uninstallFilter=S,w.getFilterChanges=j,w.getFilterLogs=N,w.destroy=function(){!function(){G.apply(this,arguments)}()},w;function x(t){return E.apply(this,arguments)}function E(){return(E=n(o().mark((function t(e){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new c({provider:r,params:e}),t.next=3,T(n);case 3:return t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function L(){return _.apply(this,arguments)}function _(){return(_=n(o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new s({provider:r}),t.next=3,T(e);case 3:return t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(){return O.apply(this,arguments)}function O(){return(O=n(o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new l({provider:r}),t.next=3,T(e);case 3:return t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function j(t){return P.apply(this,arguments)}function P(){return(P=n(o().mark((function t(e){var r,n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=p(e),n=f[r]){t.next=4;break}throw new Error('No filter for index "'.concat(r,'"'));case 4:return i=n.getChangesAndClear(),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function N(t){return R.apply(this,arguments)}function R(){return(R=n(o().mark((function t(e){var r,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=p(e),n=f[r]){t.next=4;break}throw new Error('No filter for index "'.concat(r,'"'));case 4:return"log"===n.type?results=n.getAllResults():results=[],t.abrupt("return",results);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(t){return B.apply(this,arguments)}function B(){return(B=n(o().mark((function t(e){var r,n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=p(e),n=f[r],!(i=Boolean(n))){t.next=6;break}return t.next=6,A(r);case 6:return t.abrupt("return",i);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(t){return F.apply(this,arguments)}function F(){return(F=n(o().mark((function t(r){var n,i,u;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=y(f).length,t.next=3,e.getLatestBlock();case 3:return i=t.sent,t.next=6,r.initialize({currentBlock:i});case 6:return a++,f[a]=r,r.id=a,r.idHex=h(a),u=y(f).length,C({prevFilterCount:n,newFilterCount:u}),t.abrupt("return",a);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(t){return I.apply(this,arguments)}function I(){return(I=n(o().mark((function t(e){var r,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=y(f).length,delete f[e],n=y(f).length,C({prevFilterCount:r,newFilterCount:n});case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function G(){return(G=n(o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=y(f).length,f={},C({prevFilterCount:e,newFilterCount:0});case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(t){var r=t.prevFilterCount,n=t.newFilterCount;0===r&&n>0?e.on("sync",b):r>0&&0===n&&e.removeListener("sync",b)}}},1083:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(1193),e),o(r(1194),e),o(r(1195),e),o(r(1084),e),o(r(1085),e),o(r(1200),e)},1084:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;var n=Math.floor(4294967295*Math.random());e.getUniqueId=function(){return n=(n+1)%4294967295}},1085:function(t,e,r){"use strict";var n=r(183),o=r(284),i=r(501),a=r(126),u=r(127),c=r(355),s=r(356);function l(){l=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(N){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=s;var h={};function p(){}function d(){}function v(){}var y={};c(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var f=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;var h=f(r(990)),p=r(1196),d=function(t){c(r,t);var e=s(r);function r(){var t;return a(this,r),(t=e.call(this))._middleware=[],t}return u(r,[{key:"push",value:function(t){this._middleware.push(t)}},{key:"handle",value:function(t,e){if(e&&"function"!==typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}},{key:"asMiddleware",value:function(){var t=this;return function(){var e=i(l().mark((function e(n,a,u,c){var s,f,h,p,d;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r._runAllMiddleware(n,a,t._middleware);case 3:if(s=e.sent,f=o(s,3),h=f[0],p=f[1],d=f[2],!p){e.next=12;break}return e.next=11,r._runReturnHandlers(d);case 11:return e.abrupt("return",c(h));case 12:return e.abrupt("return",u(function(){var t=i(l().mark((function t(e){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r._runReturnHandlers(d);case 3:t.next=8;break;case 5:return t.prev=5,t.t0=t.catch(0),t.abrupt("return",e(t.t0));case 8:return t.abrupt("return",e());case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 15:return e.prev=15,e.t0=e.catch(0),e.abrupt("return",c(e.t0));case 18:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t,r,n,o){return e.apply(this,arguments)}}()}},{key:"_handleBatch",value:function(){var t=i(l().mark((function t(e,r){var n;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.all(e.map(this._promiseHandle.bind(this)));case 3:if(n=t.sent,!r){t.next=6;break}return t.abrupt("return",r(null,n));case 6:return t.abrupt("return",n);case 9:if(t.prev=9,t.t0=t.catch(0),!r){t.next=13;break}return t.abrupt("return",r(t.t0));case 13:throw t.t0;case 14:case"end":return t.stop()}}),t,this,[[0,9]])})));return function(e,r){return t.apply(this,arguments)}}()},{key:"_promiseHandle",value:function(t){var e=this;return new Promise((function(r){e._handle(t,(function(t,e){r(e)}))}))}},{key:"_handle",value:function(){var t=i(l().mark((function t(e,r){var n,o,i,a,u;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&!Array.isArray(e)&&"object"===typeof e){t.next=3;break}return n=new p.EthereumRpcError(p.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: ".concat(typeof e),{request:e}),t.abrupt("return",r(n,{id:void 0,jsonrpc:"2.0",error:n}));case 3:if("string"===typeof e.method){t.next=6;break}return o=new p.EthereumRpcError(p.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: ".concat(typeof e.method),{request:e}),t.abrupt("return",r(o,{id:e.id,jsonrpc:"2.0",error:o}));case 6:return i=Object.assign({},e),a={id:i.id,jsonrpc:i.jsonrpc},u=null,t.prev=9,t.next=12,this._processRequest(i,a);case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(9),u=t.t0;case 17:return u&&(delete a.result,a.error||(a.error=p.serializeError(u))),t.abrupt("return",r(u,a));case 19:case"end":return t.stop()}}),t,this,[[9,14]])})));return function(e,r){return t.apply(this,arguments)}}()},{key:"_processRequest",value:function(){var t=i(l().mark((function t(e,n){var i,a,u,c,s;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r._runAllMiddleware(e,n,this._middleware);case 2:return i=t.sent,a=o(i,3),u=a[0],c=a[1],s=a[2],r._checkForCompletion(e,n,c),t.next=10,r._runReturnHandlers(s);case 10:if(!u){t.next=12;break}throw u;case 12:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}()}],[{key:"_runAllMiddleware",value:function(){var t=i(l().mark((function t(e,i,a){var u,c,s,f,h,p,d,v;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:u=[],c=null,s=!1,f=n(a),t.prev=4,f.s();case 6:if((h=f.n()).done){t.next=18;break}return p=h.value,t.next=10,r._runMiddleware(e,i,p,u);case 10:if(d=t.sent,v=o(d,2),c=v[0],!(s=v[1])){t.next=16;break}return t.abrupt("break",18);case 16:t.next=6;break;case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(4),f.e(t.t0);case 23:return t.prev=23,f.f(),t.finish(23);case 26:return t.abrupt("return",[c,s,u.reverse()]);case 27:case"end":return t.stop()}}),t,null,[[4,20,23,26]])})));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"_runMiddleware",value:function(t,e,r,n){return new Promise((function(o){var i=function(t){var r=t||e.error;r&&(e.error=p.serializeError(r)),o([r,!0])};try{r(t,e,(function(r){e.error?i(e.error):(r&&("function"!==typeof r&&i(new p.EthereumRpcError(p.errorCodes.rpc.internal,'JsonRpcEngine: "next" return handlers must be functions. '+'Received "'.concat(typeof r,'" for request:\n').concat(v(t)),{request:t})),n.push(r)),o([null,!1]))}),i)}catch(a){i(a)}}))}},{key:"_runReturnHandlers",value:function(){var t=i(l().mark((function t(e){var r,o,i;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n(e),t.prev=1,i=l().mark((function t(){var e;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=o.value,t.next=3,new Promise((function(t,r){e((function(e){return e?r(e):t()}))}));case 3:case"end":return t.stop()}}),t)})),r.s();case 4:if((o=r.n()).done){t.next=8;break}return t.delegateYield(i(),"t0",6);case 6:t.next=4;break;case 8:t.next=13;break;case 10:t.prev=10,t.t1=t.catch(1),r.e(t.t1);case 13:return t.prev=13,r.f(),t.finish(13);case 16:case"end":return t.stop()}}),t,null,[[1,10,13,16]])})));return function(e){return t.apply(this,arguments)}}()},{key:"_checkForCompletion",value:function(t,e,r){if(!("result"in e)&&!("error"in e))throw new p.EthereumRpcError(p.errorCodes.rpc.internal,"JsonRpcEngine: Response has no error or result for request:\n".concat(v(t)),{request:t});if(!r)throw new p.EthereumRpcError(p.errorCodes.rpc.internal,"JsonRpcEngine: Nothing ended request:\n".concat(v(t)),{request:t})}}]),r}(h.default);function v(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=d},1086:function(t,e,r){var n=r(504),o=r(509),i=r(1197),a=r(1198);function u(e){var r="function"===typeof Map?new Map:void 0;return t.exports=u=function(t){if(null===t||!i(t))return t;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return a(t,arguments,n(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o(e,t)},u(e)}t.exports=u},1087:function(t,e){t.exports=i,i.default=i,i.stable=c,i.stableStringify=c;var r=[],n=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function i(t,e,i,u){var c;"undefined"===typeof u&&(u=o()),function t(e,r,n,o,i,u,c){var s;if(u+=1,"object"===typeof e&&null!==e){for(s=0;sc.depthLimit)return void a("[...]",e,r,i);if("undefined"!==typeof c.edgesLimit&&n+1>c.edgesLimit)return void a("[...]",e,r,i);if(o.push(e),Array.isArray(e))for(s=0;se?1:0}function c(t,e,i,c){"undefined"===typeof c&&(c=o());var l,f=function t(e,n,o,i,c,s,l){var f;if(s+=1,"object"===typeof e&&null!==e){for(f=0;fl.depthLimit)return void a("[...]",e,n,c);if("undefined"!==typeof l.edgesLimit&&o+1>l.edgesLimit)return void a("[...]",e,n,c);if(i.push(e),Array.isArray(e))for(f=0;f0)for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:a;if(Number.isInteger(t)){var o=t.toString();if(h(n.errorValues,o))return n.errorValues[o].message;if(l(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function s(t){if(!Number.isInteger(t))return!1;var e=t.toString();return!!n.errorValues[e]||!!l(t)}function l(t){return t>=-32099&&t<=-32e3}function f(t){return t&&"object"===typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=c,e.isValidCode=s,e.serializeError=function(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.fallbackError,a=void 0===i?u:i,l=n.shouldIncludeStack,p=void 0!==l&&l;if(!a||!Number.isInteger(a.code)||"string"!==typeof a.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof o.EthereumRpcError)return t.serialize();var d={};if(t&&"object"===typeof t&&!Array.isArray(t)&&h(t,"code")&&s(t.code)){var v=t;d.code=v.code,v.message&&"string"===typeof v.message?(d.message=v.message,h(v,"data")&&(d.data=v.data)):(d.message=c(d.code),d.data={originalError:f(t)})}else{d.code=a.code;var y=null===(e=t)||void 0===e?void 0:e.message;d.message=y&&"string"===typeof y?y:a.message,d.data={originalError:f(t)}}var g=null===(r=t)||void 0===r?void 0:r.stack;return p&&t&&g&&"string"===typeof g&&(d.stack=g),d}},1089:function(t,e,r){t.exports=r(1201)},1091:function(t,e,r){var n=r(501);function o(){"use strict";o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,a)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var i=r(990).default,a=r(1089),u=r(1083).createAsyncMiddleware,c=r(1082),s=r(972),l=s.unsafeRandomBytes,f=s.incrementHexInt,h=r(1019);function p(t){return{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function(t){var e=t.blockTracker,r=t.provider,s={},d=c({blockTracker:e,provider:r}),v=!1,y=new i,g=a({eth_subscribe:u((function(t,e){return m.apply(this,arguments)})),eth_unsubscribe:u((function(t,e){return w.apply(this,arguments)}))});return g.destroy=function(){for(var t in y.removeAllListeners(),s)s[t].destroy(),delete s[t];v=!0},{events:y,middleware:g};function m(){return(m=n(o().mark((function t(i,a){var u,c,y,g,m,w,x;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(x=function(t){var e=t.subId,r=t.filter;return r.on("update",(function(t){return b(e,t)})),{type:u,destroy:function(){var t=n(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.uninstallFilter(r.idHex);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}},w=function(t){var i=t.subId,a={type:u,destroy:function(){var t=n(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.removeListener("sync",a.update);case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),update:function(){var t=n(o().mark((function t(e){var n,a,u,c,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.oldBlock,a=e.newBlock,u=a,c=f(n),t.next=5,h({provider:r,fromBlock:c,toBlock:u});case 5:s=t.sent,s.map(p).forEach((function(t){b(i,t)}));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()};return e.on("sync",a.update),a},!v){t.next=4;break}throw new Error("SubscriptionManager - attempting to use after destroying");case 4:u=i.params[0],c=l(16),t.t0=u,t.next="newHeads"===t.t0?9:"logs"===t.t0?11:17;break;case 9:return y=w({subId:c}),t.abrupt("break",18);case 11:return g=i.params[1],t.next=14,d.newLogFilter(g);case 14:return m=t.sent,y=x({subId:c,filter:m}),t.abrupt("break",18);case 17:throw new Error('SubscriptionManager - unsupported subscription type "'.concat(u,'"'));case 18:return s[c]=y,a.result=c,t.abrupt("return");case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function w(){return(w=n(o().mark((function t(e,r){var n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!v){t.next=2;break}throw new Error("SubscriptionManager - attempting to use after destroying");case 2:if(n=e.params[0],i=s[n]){t.next=7;break}return r.result=!1,t.abrupt("return");case 7:return delete s[n],t.next=10,i.destroy();case 10:r.result=!0;case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(t,e){y.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},1117:function(t,e,r){var n=r(513);t.exports=function(t){if(Array.isArray(t))return n(t)}},1118:function(t,e){t.exports=function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},1119:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},1166:function(t,e,r){var n=r(501),o=r(126),i=r(127),a=r(510),u=r(1074),c=r(504),s=r(355),l=r(356);function f(){"use strict";f=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(N){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=s;var h={};function p(){}function d(){}function v(){}var y={};c(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=l(t[o],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}r(1075),r(1073);var h=r(1169),p=function(t,e){return t+e},d=["sync","latest"],v=function(t){"use strict";s(r,t);var e=l(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,r),(t=e.call(this))._blockResetDuration=n.blockResetDuration||2e4,t._blockResetTimeout,t._currentBlock=null,t._isRunning=!1,t._onNewListener=t._onNewListener.bind(a(t)),t._onRemoveListener=t._onRemoveListener.bind(a(t)),t._resetCurrentBlock=t._resetCurrentBlock.bind(a(t)),t._setupInternalEvents(),t}return i(r,[{key:"isRunning",value:function(){return this._isRunning}},{key:"getCurrentBlock",value:function(){return this._currentBlock}},{key:"getLatestBlock",value:function(){var t=n(f().mark((function t(){var e,r=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._currentBlock){t.next=2;break}return t.abrupt("return",this._currentBlock);case 2:return t.next=4,new Promise((function(t){return r.once("latest",t)}));case 4:return e=t.sent,t.abrupt("return",e);case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"removeAllListeners",value:function(t){t?u(c(r.prototype),"removeAllListeners",this).call(this,t):u(c(r.prototype),"removeAllListeners",this).call(this),this._setupInternalEvents(),this._onRemoveListener()}},{key:"_start",value:function(){}},{key:"_end",value:function(){}},{key:"_setupInternalEvents",value:function(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}},{key:"_onNewListener",value:function(t,e){d.includes(t)&&this._maybeStart()}},{key:"_onRemoveListener",value:function(t,e){this._getBlockTrackerEventCount()>0||this._maybeEnd()}},{key:"_maybeStart",value:function(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}},{key:"_maybeEnd",value:function(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}},{key:"_getBlockTrackerEventCount",value:function(){var t=this;return d.map((function(e){return t.listenerCount(e)})).reduce(p)}},{key:"_newPotentialLatest",value:function(t){var e=this._currentBlock;e&&y(t)<=y(e)||this._setCurrentBlock(t)}},{key:"_setCurrentBlock",value:function(t){var e=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:e,newBlock:t})}},{key:"_setupBlockResetTimeout",value:function(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}},{key:"_cancelBlockResetTimeout",value:function(){clearTimeout(this._blockResetTimeout)}},{key:"_resetCurrentBlock",value:function(){this._currentBlock=null}}]),r}(h);function y(t){return Number.parseInt(t,16)}t.exports=v},1167:function(t,e,r){var n=r(504);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t}},1168:function(t,e){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,r="undefined"!==typeof t.start?t.start:Math.floor(Math.random()*e);return function(){return r%=e,r++}}},1169:function(t,e,r){var n=r(502),o=r(114),i="object"===typeof Reflect?Reflect:null,a=i&&"function"===typeof i.apply?i.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};function u(){o.call(this)}function c(t,e,r){try{a(t,e,r)}catch(n){setTimeout((function(){throw n}))}}function s(t,e){for(var r=new Array(e),n=0;n0&&(i=e[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var u=o[t];if(void 0===u)return!1;if("function"===typeof u)c(u,this,e);else{var l=u.length,f=s(u,l);for(r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return function(){var e=n(o().mark((function e(r,i,a,u){var c,s,l,f,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=new Promise((function(t){c=t})),l=null,f=!1,h=function(){var t=n(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=!0,a((function(t){l=t,c()})),t.next=4,s;case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),e.prev=4,e.next=7,t(r,i,h);case 7:if(!f){e.next=13;break}return e.next=10,s;case 10:l(null),e.next=14;break;case 13:u(null);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),l?l(e.t0):u(e.t0);case 19:case"end":return e.stop()}}),e,null,[[4,16]])})));return function(t,r,n,o){return e.apply(this,arguments)}}()}},1195:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return function(e,r,n,o){var i=t[e.method];return void 0===i?n():"function"===typeof i?i(e,r,n,o):(r.result=i,o())}}},1196:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;var n=r(1016);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});var o=r(1088);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return o.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return o.getMessageFromCode}});var i=r(1199);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return i.ethErrors}});var a=r(1017);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})},1197:function(t,e){t.exports=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}},1198:function(t,e,r){var n=r(509),o=r(515);function i(e,r,a){return o()?t.exports=i=Reflect.construct:t.exports=i=function(t,e,r){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return r&&n(i,r.prototype),i},i.apply(null,arguments)}t.exports=i},1199:function(t,e,r){"use strict";var n=r(284);Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;var o=r(1016),i=r(1088),a=r(1017);function u(t,e){var r=s(e),a=n(r,2),u=a[0],c=a[1];return new o.EthereumRpcError(t,u||i.getMessageFromCode(t),c)}function c(t,e){var r=s(e),a=n(r,2),u=a[0],c=a[1];return new o.EthereumProviderError(t,u||i.getMessageFromCode(t),c)}function s(t){if(t){if("string"===typeof t)return[t];if("object"===typeof t&&!Array.isArray(t)){var e=t.message,r=t.data;if(e&&"string"!==typeof e)throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}e.ethErrors={rpc:{parse:function(t){return u(a.errorCodes.rpc.parse,t)},invalidRequest:function(t){return u(a.errorCodes.rpc.invalidRequest,t)},invalidParams:function(t){return u(a.errorCodes.rpc.invalidParams,t)},methodNotFound:function(t){return u(a.errorCodes.rpc.methodNotFound,t)},internal:function(t){return u(a.errorCodes.rpc.internal,t)},server:function(t){if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");var e=t.code;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return u(e,t)},invalidInput:function(t){return u(a.errorCodes.rpc.invalidInput,t)},resourceNotFound:function(t){return u(a.errorCodes.rpc.resourceNotFound,t)},resourceUnavailable:function(t){return u(a.errorCodes.rpc.resourceUnavailable,t)},transactionRejected:function(t){return u(a.errorCodes.rpc.transactionRejected,t)},methodNotSupported:function(t){return u(a.errorCodes.rpc.methodNotSupported,t)},limitExceeded:function(t){return u(a.errorCodes.rpc.limitExceeded,t)}},provider:{userRejectedRequest:function(t){return c(a.errorCodes.provider.userRejectedRequest,t)},unauthorized:function(t){return c(a.errorCodes.provider.unauthorized,t)},unsupportedMethod:function(t){return c(a.errorCodes.provider.unsupportedMethod,t)},disconnected:function(t){return c(a.errorCodes.provider.disconnected,t)},chainDisconnected:function(t){return c(a.errorCodes.provider.chainDisconnected,t)},custom:function(t){if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");var e=t.code,r=t.message,n=t.data;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new o.EthereumProviderError(e,r,n)}}}},1200:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;var n=r(1085);e.mergeMiddleware=function(t){var e=new n.JsonRpcEngine;return t.forEach((function(t){return e.push(t)})),e.asMiddleware()}},1201:function(t,e){t.exports=function(t){return function(e,r,n,o){var i=t[e.method];return void 0===i?n():"function"===typeof i?i(e,r,n,o):(r.result=i,o())}}},1202:function(t,e,r){var n=r(501),o=r(126),i=r(127),a=r(355),u=r(356);function c(){"use strict";c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var s=r(1075),l=r(1203),f=r(1204),h=r(972),p=(h.bnToHex,h.hexToInt),d=h.incrementHexInt,v=h.minBlockRef,y=h.blockRefIsNumber,g=function(t){"use strict";a(r,t);var e=u(r);function r(t){var n,i=t.provider,a=t.params;return o(this,r),(n=e.call(this)).type="log",n.ethQuery=new s(i),n.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},a),n.params.address&&(Array.isArray(n.params.address)||(n.params.address=[n.params.address]),n.params.address=n.params.address.map((function(t){return t.toLowerCase()}))),n}return i(r,[{key:"initialize",value:function(){var t=n(c().mark((function t(e){var r,n,o,i,a;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.currentBlock,n=this.params.fromBlock,["latest","pending"].includes(n)&&(n=r),"earliest"===n&&(n="0x0"),this.params.fromBlock=n,o=v(this.params.toBlock,r),i=Object.assign({},this.params,{toBlock:o}),t.next=9,this._fetchLogs(i);case 9:a=t.sent,this.addInitialResults(a);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"update",value:function(){var t=n(c().mark((function t(e){var r,n,o,i,a,u,s,l=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.oldBlock,n=e.newBlock,o=n,i=r?d(r):n,a=Object.assign({},this.params,{fromBlock:i,toBlock:o}),t.next=6,this._fetchLogs(a);case 6:u=t.sent,s=u.filter((function(t){return l.matchLog(t)})),this.addResults(s);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_fetchLogs",value:function(){var t=n(c().mark((function t(e){var r,n=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l((function(t){return n.ethQuery.getLogs(e,t)}))();case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"matchLog",value:function(t){if(p(this.params.fromBlock)>=p(t.blockNumber))return!1;if(y(this.params.toBlock)&&p(this.params.toBlock)<=p(t.blockNumber))return!1;var e=t.address&&t.address.toLowerCase();return!(this.params.address&&e&&!this.params.address.includes(e))&&this.params.topics.every((function(e,r){var n=t.topics[r];if(!n)return!1;n=n.toLowerCase();var o=Array.isArray(e)?e:[e];return!!o.includes(null)||(o=o.map((function(t){return t.toLowerCase()}))).includes(n)}))}}]),r}(f);t.exports=g},1203:function(t,e,r){"use strict";var n=r(225),o=function(t,e,r,n){return function(){for(var o=this,i=arguments.length,a=new Array(i),u=0;u=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var f=function(t){"use strict";c(r,t);var e=s(r);function r(){var t;return o(this,r),(t=e.call(this)).allResults=[],t}return i(r,[{key:"update",value:function(){var t=n(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("BaseFilterWithHistory - no update method specified");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"addResults",value:function(t){this.allResults=this.allResults.concat(t),a(u(r.prototype),"addResults",this).call(this,t)}},{key:"addInitialResults",value:function(t){this.allResults=this.allResults.concat(t),a(u(r.prototype),"addInitialResults",this).call(this,t)}},{key:"getAllResults",value:function(){return this.allResults}}]),r}(r(1018));t.exports=f},1205:function(t,e,r){var n=r(501),o=r(126),i=r(127),a=r(355),u=r(356);function c(){"use strict";c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var s=r(1018),l=r(1019),f=r(972).incrementHexInt,h=function(t){"use strict";a(r,t);var e=u(r);function r(t){var n,i=t.provider;t.params;return o(this,r),(n=e.call(this)).type="block",n.provider=i,n}return i(r,[{key:"update",value:function(){var t=n(c().mark((function t(e){var r,n,o,i,a,u;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.oldBlock,n=e.newBlock,o=n,i=f(r),t.next=5,l({provider:this.provider,fromBlock:i,toBlock:o});case 5:a=t.sent,u=a.map((function(t){return t.hash})),this.addResults(u);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),r}(s);t.exports=h},1206:function(t,e,r){var n=r(963),o=r(183),i=r(501),a=r(126),u=r(127),c=r(355),s=r(356);function l(){"use strict";l=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(N){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=s;var h={};function p(){}function d(){}function v(){}var y={};c(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&r.call(m,i)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(o,a){!function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var f=r(1018),h=r(1019),p=r(972).incrementHexInt,d=function(t){"use strict";c(r,t);var e=s(r);function r(t){var n,o=t.provider;return a(this,r),(n=e.call(this)).type="tx",n.provider=o,n}return u(r,[{key:"update",value:function(){var t=i(l().mark((function t(e){var r,i,a,u,c,s,f,d;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.oldBlock,i=r,a=p(r),t.next=5,h({provider:this.provider,fromBlock:a,toBlock:i});case 5:u=t.sent,c=[],s=o(u);try{for(s.s();!(f=s.n()).done;)d=f.value,c.push.apply(c,n(d.transactions))}catch(l){s.e(l)}finally{s.f()}this.addResults(c);case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),r}(f);t.exports=d},1272:function(t,e,r){"use strict";r.r(e),r.d(e,"Mutex",(function(){return i})),r.d(e,"Semaphore",(function(){return o})),r.d(e,"withTimeout",(function(){return a}));var n=r(79),o=function(){function t(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return t.prototype.acquire=function(){var t=this,e=this.isLocked(),r=new Promise((function(e){return t._queue.push(e)}));return e||this._dispatch(),r},t.prototype.runExclusive=function(t){return Object(n.b)(this,void 0,void 0,(function(){var e,r,o;return Object(n.c)(this,(function(n){switch(n.label){case 0:return[4,this.acquire()];case 1:e=n.sent(),r=e[0],o=e[1],n.label=2;case 2:return n.trys.push([2,,4,5]),[4,t(r)];case 3:return[2,n.sent()];case 4:return o(),[7];case 5:return[2]}}))}))},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},t.prototype._dispatch=function(){var t=this,e=this._queue.shift();if(e){var r=!1;this._currentReleaser=function(){r||(r=!0,t._value++,t._dispatch())},e([this._value--,this._currentReleaser])}},t}(),i=function(){function t(){this._semaphore=new o(1)}return t.prototype.acquire=function(){return Object(n.b)(this,void 0,void 0,(function(){var t;return Object(n.c)(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=e.sent(),[2,t[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();function a(t,e,r){var o=this;return void 0===r&&(r=new Error("timeout")),{acquire:function(){return new Promise((function(i,a){return Object(n.b)(o,void 0,void 0,(function(){var o,u;return Object(n.c)(this,(function(n){switch(n.label){case 0:return o=!1,setTimeout((function(){o=!0,a(r)}),e),[4,t.acquire()];case 1:return u=n.sent(),o?(Array.isArray(u)?u[1]:u)():i(u),[2]}}))}))}))},runExclusive:function(t){return Object(n.b)(this,void 0,void 0,(function(){var e,r;return Object(n.c)(this,(function(n){switch(n.label){case 0:e=function(){},n.label=1;case 1:return n.trys.push([1,,7,8]),[4,this.acquire()];case 2:return r=n.sent(),Array.isArray(r)?(e=r[1],[4,t(r[0])]):[3,4];case 3:return[2,n.sent()];case 4:return e=r,[4,t()];case 5:return[2,n.sent()];case 6:return[3,8];case 7:return e(),[7];case 8:return[2]}}))}))},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}},963:function(t,e,r){var n=r(1117),o=r(1118),i=r(359),a=r(1119);t.exports=function(t){return n(t)||o(t)||i(t)||a()}},972:function(t,e){function r(t){return t.sort((function(t,e){return"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:n(t)-n(e)}))}function n(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function o(t){if(void 0===t||null===t)return t;var e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function i(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(){for(var t=arguments.length,e=new Array(t),n=0;n1?n-1:0),i=1;i0&&(a=o[0]),a instanceof Error)throw a;var s=new Error("Unhandled error.".concat(a?" (".concat(a.message,")"):""));throw s.context=a,s}var l=r[t];if(void 0===l)return!1;if("function"===typeof l)u(l,this,o);else for(var f=l.length,h=c(l),p=0;p1?t-1:0),n=1;n0?" Args: "+r.join(", "):""))}var O=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;e>=i;)(i<<=1)<0&&S(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),i=n+r,o=n;o=0;r--){var n=t[r];if(n&&1===n.nodeType&&n.hasAttribute(k))return n}}(r),o=void 0!==i?i.nextSibling:null;n.setAttribute(k,"active"),n.setAttribute("data-styled-version","5.3.0");var a=F();return a&&n.setAttribute("nonce",a),r.insertBefore(n,o),n},U=function(){function e(e){var t=this.element=D(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r=0){var r=document.createTextNode(t),n=this.nodes[e];return this.element.insertBefore(r,n||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(c+=e+",")})),n+=""+s+u+'{content:"'+c+'"}/*!sc*/\n'}}}return n}(this)},e}(),V=/(a)(d)/gi,K=function(e){return String.fromCharCode(e+(e>25?39:97))};function X(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=K(t%52)+r;return(K(t%52)+r).replace(V,"$1-$2")}var W=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Z=function(e){return W(5381,e)};function Y(e){for(var t=0;t>>0);if(!t.hasNameForId(n,a)){var s=r(o,"."+a,void 0,n);t.insertRules(n,a,s)}i.push(a),this.staticRulesId=a}else{for(var u=this.rules.length,c=W(this.baseHash,r.hash),f="",l=0;l>>0);if(!t.hasNameForId(n,v)){var m=r(f,"."+v,void 0,n);t.insertRules(n,v,m)}i.push(v)}}return i.join(" ")},e}(),ee=/^\s*\/\/.*$/gm,te=[":","[",".","#"];function re(e){var t,r,n,i,o=void 0===e?g:e,a=o.options,s=void 0===a?g:a,c=o.plugins,f=void 0===c?m:c,l=new u.a(s),h=[],d=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(r,n,i,o,a,s,u,c,f,l){switch(r){case 1:if(0===f&&64===n.charCodeAt(0))return e(n+";"),"";break;case 2:if(0===c)return n+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(i[0]+n),"";default:return n+(0===l?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(t)}}}((function(e){h.push(e)})),p=function(e,n,o){return 0===n&&-1!==te.indexOf(o[r.length])||o.match(i)?e:"."+t};function v(e,o,a,s){void 0===s&&(s="&");var u=e.replace(ee,""),c=o&&a?a+" "+o+" { "+u+" }":u;return t=s,r=o,n=new RegExp("\\"+r+"\\b","g"),i=new RegExp("(\\"+r+"\\b){2,}"),l(a||!o?"":o,c)}return l.use([].concat(f,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(r)>0&&(i[0]=i[0].replace(n,p))},d,function(e){if(-2===e){var t=h;return h=[],t}}])),v.hash=f.length?f.reduce((function(e,t){return t.name||S(15),W(e,t.name)}),5381).toString():"",v}var ne=o.a.createContext(),ie=ne.Consumer,oe=o.a.createContext(),ae=(oe.Consumer,new J),se=re();function ue(){return Object(i.useContext)(ne)||ae}function ce(){return Object(i.useContext)(oe)||se}function fe(e){var t=Object(i.useState)(e.stylisPlugins),r=t[0],n=t[1],a=ue(),u=Object(i.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=Object(i.useMemo)((function(){return re({options:{prefix:!e.disableVendorPrefixes},plugins:r})}),[e.disableVendorPrefixes,r]);return Object(i.useEffect)((function(){s()(r,e.stylisPlugins)||n(e.stylisPlugins)}),[e.stylisPlugins]),o.a.createElement(ne.Provider,{value:u},o.a.createElement(oe.Provider,{value:c},e.children))}var le=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=se);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){return S(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=se),this.name+e.hash},e}(),he=/([A-Z])/,de=/([A-Z])/g,pe=/^ms-/,ve=function(e){return"-"+e.toLowerCase()};function me(e){return he.test(e)?e.replace(de,ve).replace(pe,"-ms-"):e}var ge=function(e){return null==e||!1===e||""===e};function be(e,t,r,n){if(Array.isArray(e)){for(var i,o=[],a=0,s=e.length;a1?t-1:0),n=1;n?@[\\\]^`{|}~-]+/g,xe=/(^-|-$)/g;function _e(e){return e.replace(ke,"-").replace(xe,"")}var Ee=function(e){return X(Z(e)>>>0)};function Ae(e){return"string"==typeof e&&!0}var Se=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Oe=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Me(e,t,r){var n=e[r];Se(t)&&Se(n)?Pe(n,t):e[r]=t}function Pe(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||(i[r]=e[r]);return i}(t,["componentId"]),o=n&&n+"-"+(Ae(e)?e:_e(y(e)));return Le(e,d({},i,{attrs:x,componentId:o}),r)},Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=n?Pe({},e.defaultProps,t):t}}),E.toString=function(){return"."+E.styledComponentId},a&&h()(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),E}var Ne=function(e){return function e(t,r,i){if(void 0===i&&(i=g),!Object(n.isValidElementType)(r))return S(1,String(r));var o=function(){return t(r,i,ye.apply(void 0,arguments))};return o.withConfig=function(n){return e(t,r,d({},i,{},n))},o.attrs=function(n){return e(t,r,d({},i,{attrs:Array.prototype.concat(i.attrs,n).filter(Boolean)}))},o}(Le,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Ne[e]=Ne(e)}));var Ie=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Y(e),J.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,r,n){var i=n(be(this.rules,t,r,n).join(""),""),o=this.componentId+e;r.insertRules(o,o,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,r,n){e>2&&J.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}();function Be(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n"+t+""},this.getStyleTags=function(){return e.sealed?S(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return S(2);var r=((t={})[k]="",t["data-styled-version"]="5.3.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),n=F();return n&&(r.nonce=n),[o.a.createElement("style",d({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new J({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?S(2):o.a.createElement(fe,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return S(3)},e}(),Ue=function(e){var t=o.a.forwardRef((function(t,r){var n=Object(i.useContext)(je),a=e.defaultProps,s=we(t,n,a);return o.a.createElement(e,d({},t,{theme:s,ref:r}))}));return h()(t,e),t.displayName="WithTheme("+y(e)+")",t},ze=function(){return Object(i.useContext)(je)},He={StyleSheet:J,masterSheet:ae};t.default=Ne}.call(this,r(71))},function(e,t,r){"use strict";r.d(t,"j",(function(){return a})),r.d(t,"i",(function(){return u})),r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return f})),r.d(t,"n",(function(){return l})),r.d(t,"o",(function(){return h})),r.d(t,"k",(function(){return d})),r.d(t,"h",(function(){return p})),r.d(t,"d",(function(){return v})),r.d(t,"e",(function(){return m})),r.d(t,"c",(function(){return g})),r.d(t,"f",(function(){return b})),r.d(t,"g",(function(){return y})),r.d(t,"m",(function(){return w})),r.d(t,"l",(function(){return k}));var n=new(r(10).a)("bytes/5.7.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return d(e)&&!(e.length%2)||u(e)}function s(e){return"number"===typeof e&&e==e&&e%1===0}function u(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(!s(e.length)||e.length<0)return!1;for(var t=0;t=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),o(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),d(e)){var a=e.substring(2);a.length%2&&("left"===t.hexPad?a="0"+a:"right"===t.hexPad?a+="0":n.throwArgumentError("hex data is odd-length","value",e));for(var s=[],c=0;ct&&n.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),o(r)}function d(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function p(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r="0123456789abcdef"[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"===typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(d(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(u(e)){for(var o="0x",a=0;a>4]+"0123456789abcdef"[15&s]}return o}return n.throwArgumentError("invalid hexlify value","value",e)}function v(e){if("string"!==typeof e)e=p(e);else if(!d(e)||e.length%2)return null;return(e.length-2)/2}function m(e,t,r){return"string"!==typeof e?e=p(e):(!d(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function g(e){var t="0x";return e.forEach((function(e){t+=p(e).substring(2)})),t}function b(e){var t=function(e){"string"!==typeof e&&(e=p(e));d(e)||n.throwArgumentError("invalid hex string","value",e);e=e.substring(2);var t=0;for(;t2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function w(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(e)){var r=c(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64))):65===r.length?(t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=p(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var i=h(c(t._vs),32);t._vs=p(i);var o=i[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),i[0]&=127;var s=p(i);null==t.s?t.s=s:t.s!==s&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var u=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==u&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&d(t.r)?t.r=y(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&d(t.s)?t.s=y(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);var f=c(t.s);f[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(f[0]|=128);var l=p(f);t._vs&&(d(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=y(t._vs,32)),null==t._vs?t._vs=l:t._vs!==l&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function k(e){return p(f([(e=w(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(174);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(u){i=!0,o=u}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||Object(n.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";function n(e,t){for(var r=0;r=256||r%1)return!1}return!0}function u(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),o(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),h(e)){var a=e.substring(2);a.length%2&&("left"===t.hexPad?a="0x0"+a.substring(2):"right"===t.hexPad?a+="0":n.throwArgumentError("hex data is odd-length","value",e));for(var u=[],c=0;ct&&n.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),o(r)}function h(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function d(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r="0123456789abcdef"[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"===typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(s(e)){for(var o="0x",a=0;a>4]+"0123456789abcdef"[15&u]}return o}return n.throwArgumentError("invalid hexlify value","value",e)}function p(e){if("string"!==typeof e)e=d(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function v(e,t,r){return"string"!==typeof e?e=d(e):(!h(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function m(e){var t="0x";return e.forEach((function(e){t+=d(e).substring(2)})),t}function g(e){var t=b(d(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function b(e){"string"!==typeof e&&(e=d(e)),h(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function w(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(a(e)){var r=u(e);65!==r.length&&n.throwArgumentError("invalid signature string; must be 65 bytes","signature",e),t.r=d(r.slice(0,32)),t.s=d(r.slice(32,64)),t.v=r[64],t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=d(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var i=l(u(t._vs),32);t._vs=d(i);var o=i[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),i[0]&=127;var s=d(i);null==t.s?t.s=s:t.s!==s&&n.throwArgumentError("signature v mismatch _vs","signature",e)}null==t.recoveryParam?null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2:null==t.v?t.v=27+t.recoveryParam:t.recoveryParam!==1-t.v%2&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e),null!=t.r&&h(t.r)?t.r=y(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=y(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);var c=u(t.s);c[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(c[0]|=128);var f=d(c);t._vs&&(h(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=y(t._vs,32)),null==t._vs?t._vs=f:t._vs!==f&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t}function k(e){return d(c([(e=w(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},function(e,t,r){"use strict";r.d(t,"d",(function(){return c})),r.d(t,"e",(function(){return f})),r.d(t,"f",(function(){return l})),r.d(t,"b",(function(){return h})),r.d(t,"g",(function(){return d})),r.d(t,"c",(function(){return m})),r.d(t,"a",(function(){return g}));var n=r(7),i=r(6),o=r(10);function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(P){c=function(e,t,r){return e[t]=r}}function f(e,t,r,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),s=new S(i||[]);return n(a,"_invoke",{value:x(e,r,s)}),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=f;var h={};function d(){}function p(){}function v(){}var m={};c(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(O([])));b&&b!==t&&r.call(b,o)&&(m=b);var y=v.prototype=d.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=l(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}var s=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},u=new o.a("properties/5.7.0");function c(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function f(e,t){for(var r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function l(e){return s(this,void 0,void 0,a().mark((function t(){var r,n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(r);case 3:return n=t.sent,t.abrupt("return",n.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))}function h(e,t){e&&"object"===typeof e||u.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(r){t[r]||u.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function d(e){var t={};for(var r in e)t[r]=e[r];return t}var p={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function v(e){if(function e(t){if(void 0===t||null===t||p[typeof t])return!0;if(Array.isArray(t)||"object"===typeof t){if(!Object.isFrozen(t))return!1;for(var r=Object.keys(t),n=0;ns[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=d[15&t[o]];i.push(e+"=Uint8Array(0x"+r+")")}else i.push(e+"="+JSON.stringify(t))}catch(c){i.push(e+"="+JSON.stringify(n[e].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var o=t,s="";switch(r){case l.NUMERIC_FAULT:s="NUMERIC_FAULT";var u=t;switch(u){case"overflow":case"underflow":case"division-by-zero":s+="-"+u;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case l.CALL_EXCEPTION:case l.INSUFFICIENT_FUNDS:case l.MISSING_NEW:case l.NONCE_EXPIRED:case l.REPLACEMENT_UNDERPRICED:case l.TRANSACTION_REPLACED:case l.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var c=new Error(t);return c.reason=o,c.code=r,Object.keys(n).forEach((function(e){c[e]=n[e]})),c}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),h&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:h})}},{key:"checkSafeUint53",value:function(t,r){"number"===typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return c||(c=new e("logger/5.7.0")),c}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}a=!!t,o=!!r}},{key:"setLogLevel",value:function(t){var r=s[t.toLowerCase()];null!=r?u=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();p.errors=l,p.levels=f},function(e,t,r){e.exports=r(549)()},function(e,t,r){"use strict";r.r(t),r.d(t,"defineReadOnly",(function(){return c})),r.d(t,"getStatic",(function(){return f})),r.d(t,"resolveProperties",(function(){return l})),r.d(t,"checkProperties",(function(){return h})),r.d(t,"shallowCopy",(function(){return d})),r.d(t,"deepCopy",(function(){return m})),r.d(t,"Description",(function(){return g}));var n=r(7),i=r(6),o=r(13);function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(P){c=function(e,t,r){return e[t]=r}}function f(e,t,r,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),s=new S(i||[]);return n(a,"_invoke",{value:x(e,r,s)}),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=f;var h={};function d(){}function p(){}function v(){}var m={};c(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(O([])));b&&b!==t&&r.call(b,o)&&(m=b);var y=v.prototype=d.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=l(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}var s=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},u=new o.Logger("properties/5.3.0");function c(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function f(e,t){for(var r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function l(e){return s(this,void 0,void 0,a().mark((function t(){var r,n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(r);case 3:return n=t.sent,t.abrupt("return",n.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))}function h(e,t){e&&"object"===typeof e||u.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(r){t[r]||u.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function d(e){var t={};for(var r in e)t[r]=e[r];return t}var p={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function v(e){if(function e(t){if(void 0===t||null===t||p[typeof t])return!0;if(Array.isArray(t)||"object"===typeof t){if(!Object.isFrozen(t))return!1;for(var r=Object.keys(t),n=0;ns[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return c||(c=new e("logger/5.3.0")),c}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}a=!!t,o=!!r}},{key:"setLogLevel",value:function(t){var r=s[t.toLowerCase()];null!=r?u=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();d.errors=l,d.levels=f},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(173);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(n.a)(e,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(33),i=r(245),o=r(246);function a(e){return function(){var t,r=Object(n.a)(e);if(Object(i.a)()){var a=Object(n.a)(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return Object(o.a)(this,t)}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(17);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);rs.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return r}o(s,e);var u=d(s);return i(s,[{key:"toDebugString",value:function(){var e,t=["BigInt["],r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=v(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(this);try{for(r.s();!(e=r.n()).done;){var n=e.value;t.push((n?(n>>>0).toString(16):n)+", ")}}catch(e){r.e(e)}finally{r.f()}return t.push("]"),t.join("")}},{key:"toString",value:function(){var e=0e||36this.length&&(r=this.length);for(var n=32767&e,i=e>>>15,o=0,a=t,u=0;u>>15,h=s.__imul(f,n),d=s.__imul(f,i),p=s.__imul(l,n),v=a+h+o;o=v>>>30,v&=1073741823,o+=(v+=((32767&d)<<15)+((32767&p)<<15))>>>30,a=s.__imul(l,i)+(d>>>15)+(p>>>15),this.__setDigit(u,1073741823&v)}if(0!==o||0!==a)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(e,t,r){for(var n,i=0,o=0;o>>15,this.__setHalfDigit(t+o,32767&n);return i}},{key:"__inplaceSub",value:function(e,t,r){var n=0;if(1&t){t>>=1;for(var i=this.__digit(t),o=32767&i,a=0;a>>1;a++){var s=e.__digit(a),u=(i>>>15)-(32767&s)-n;n=1&u>>>15,this.__setDigit(t+a,(32767&u)<<15|32767&o),n=1&(o=(32767&(i=this.__digit(t+a+1)))-(s>>>15)-n)>>>15}var c=e.__digit(a),f=(i>>>15)-(32767&c)-n;if(n=1&f>>>15,this.__setDigit(t+a,(32767&f)<<15|32767&o),t+a+1>=this.length)throw new RangeError("out of bounds");0==(1&r)&&(n=1&(o=(32767&(i=this.__digit(t+a+1)))-(c>>>15)-n)>>>15,this.__setDigit(t+e.length,1073709056&i|32767&o))}else{t>>=1;for(var l=0;l>>15)-(d>>>15)-(n=1&p>>>15);n=1&v>>>15,this.__setDigit(t+l,(32767&v)<<15|32767&p)}var m=this.__digit(t+l),g=e.__digit(l),b=(32767&m)-(32767&g)-n;n=1&b>>>15;var y=0;0==(1&r)&&(n=1&(y=(m>>>15)-(g>>>15)-n)>>>15),this.__setDigit(t+l,(32767&y)<<15|32767&b)}return n}},{key:"__inplaceRightShift",value:function(e){if(0!==e){for(var t,r=this.__digit(0)>>>e,n=this.length-1,i=0;i>>e;this.__setDigit(n,r)}}},{key:"__digit",value:function(e){return this[e]}},{key:"__unsignedDigit",value:function(e){return this[e]>>>0}},{key:"__setDigit",value:function(e,t){this[e]=0|t}},{key:"__setDigitGrow",value:function(e,t){this[e]=0|t}},{key:"__halfDigitLength",value:function(){var e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}},{key:"__halfDigit",value:function(e){return 32767&this[e>>>1]>>>15*(1&e)}},{key:"__setHalfDigit",value:function(e,t){var r=e>>>1,n=this.__digit(r),i=1&e?32767&n|t<<15:1073709056&n|32767&t;this.__setDigit(r,i)}}],[{key:"BigInt",value:function(e){var t=Number.isFinite;if("number"==typeof e){if(0===e)return s.__zero();if(s.__isOneDigitInt(e))return 0>e?s.__oneDigit(-e,!0):s.__oneDigit(e,!1);if(!t(e)||a(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return s.__fromDouble(e)}if("string"==typeof e){var n=s.__fromString(e);if(null===n)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return n}if("boolean"==typeof e)return!0===e?s.__oneDigit(1,!1):s.__zero();if("object"===r(e)){if(e.constructor===s)return e;var i=s.__toPrimitive(e);return s.BigInt(i)}throw new TypeError("Cannot convert "+e+" to a BigInt")}},{key:"toNumber",value:function(e){var t=e.length;if(0===t)return 0;if(1===t){var r=e.__unsignedDigit(0);return e.sign?-r:r}var n=e.__digit(t-1),i=s.__clz30(n),o=30*t-i;if(1024>>=12;var h=f-12,d=12<=f?0:u<<20+f,p=20+f;for(0>>30-h,d=u<>>30-p,p-=30;var v=s.__decideRounding(e,p,c,u);if((1===v||0===v&&1==(1&d))&&0===(d=d+1>>>0)&&0!=++l>>>20&&(l=0,1023<++a))return e.sign?-1/0:1/0;var m=e.sign?-2147483648:0;return a=a+1023<<20,s.__kBitConversionInts[1]=m|a|l,s.__kBitConversionInts[0]=d,s.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(e){if(0===e.length)return e;var t=e.__copy();return t.sign=!e.sign,t}},{key:"bitwiseNot",value:function(e){return e.sign?s.__absoluteSubOne(e).__trim():s.__absoluteAddOne(e,!0)}},{key:"exponentiate",value:function(e,t){if(t.sign)throw new RangeError("Exponent must be positive");if(0===t.length)return s.__oneDigit(1,!1);if(0===e.length)return e;if(1===e.length&&1===e.__digit(0))return e.sign&&0==(1&t.__digit(0))?s.unaryMinus(e):e;if(1=s.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===e.length&&2===e.__digit(0)){var n=1+(0|r/30),i=new s(n,e.sign&&0!=(1&r));i.__initializeDigits();var o=1<>=1;0!==r;r>>=1)u=s.multiply(u,u),0!=(1&r)&&(a=null===a?u:s.multiply(a,u));return a}},{key:"multiply",value:function(e,t){if(0===e.length)return e;if(0===t.length)return t;var r=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&r--;var n=new s(r,e.sign!==t.sign);n.__initializeDigits();for(var i=0;is.__absoluteCompare(e,t))return s.__zero();var r,n=e.sign!==t.sign,i=t.__unsignedDigit(0);if(1===t.length&&32767>=i){if(1===i)return n===e.sign?e:s.unaryMinus(e);r=s.__absoluteDivSmall(e,i,null)}else r=s.__absoluteDivLarge(e,t,!0,!1);return r.sign=n,r.__trim()}},{key:"remainder",value:function(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>s.__absoluteCompare(e,t))return e;var r=t.__unsignedDigit(0);if(1===t.length&&32767>=r){if(1===r)return s.__zero();var n=s.__absoluteModSmall(e,r);return 0===n?s.__zero():s.__oneDigit(n,e.sign)}var i=s.__absoluteDivLarge(e,t,!1,!0);return i.sign=e.sign,i.__trim()}},{key:"add",value:function(e,t){var r=e.sign;return r===t.sign?s.__absoluteAdd(e,t,r):0<=s.__absoluteCompare(e,t)?s.__absoluteSub(e,t,r):s.__absoluteSub(t,e,!r)}},{key:"subtract",value:function(e,t){var r=e.sign;return r===t.sign?0<=s.__absoluteCompare(e,t)?s.__absoluteSub(e,t,r):s.__absoluteSub(t,e,!r):s.__absoluteAdd(e,t,r)}},{key:"leftShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?s.__rightShiftByAbsolute(e,t):s.__leftShiftByAbsolute(e,t)}},{key:"signedRightShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?s.__leftShiftByAbsolute(e,t):s.__rightShiftByAbsolute(e,t)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(e,t){return 0>s.__compareToBigInt(e,t)}},{key:"lessThanOrEqual",value:function(e,t){return 0>=s.__compareToBigInt(e,t)}},{key:"greaterThan",value:function(e,t){return 0(e=a(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return s.__zero();if(e>=s.__kMaxLengthBits)return t;var r=0|(e+29)/30;if(t.length(e=a(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return s.__zero();if(t.sign){if(e>s.__kMaxLengthBits)throw new RangeError("BigInt too big");return s.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=s.__kMaxLengthBits)return t;var r=0|(e+29)/30;if(t.length>>n)return t}return s.__truncateToNBits(e,t)}},{key:"ADD",value:function(e,t){if(e=s.__toPrimitive(e),t=s.__toPrimitive(t),"string"==typeof e)return"string"!=typeof t&&(t=t.toString()),e+t;if("string"==typeof t)return e.toString()+t;if(e=s.__toNumeric(e),t=s.__toNumeric(t),s.__isBigInt(e)&&s.__isBigInt(t))return s.add(e,t);if("number"==typeof e&&"number"==typeof t)return e+t;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(e,t){return s.__compare(e,t,0)}},{key:"LE",value:function(e,t){return s.__compare(e,t,1)}},{key:"GT",value:function(e,t){return s.__compare(e,t,2)}},{key:"GE",value:function(e,t){return s.__compare(e,t,3)}},{key:"EQ",value:function(e,t){for(;;){if(s.__isBigInt(e))return s.__isBigInt(t)?s.equal(e,t):s.EQ(t,e);if("number"==typeof e){if(s.__isBigInt(t))return s.__equalToNumber(t,e);if("object"!==r(t))return e==t;t=s.__toPrimitive(t)}else if("string"==typeof e){if(s.__isBigInt(t))return null!==(e=s.__fromString(e))&&s.equal(e,t);if("object"!==r(t))return e==t;t=s.__toPrimitive(t)}else if("boolean"==typeof e){if(s.__isBigInt(t))return s.__equalToNumber(t,+e);if("object"!==r(t))return e==t;t=s.__toPrimitive(t)}else if("symbol"===r(e)){if(s.__isBigInt(t))return!1;if("object"!==r(t))return e==t;t=s.__toPrimitive(t)}else{if("object"!==r(e))return e==t;if("object"===r(t)&&t.constructor!==s)return e==t;e=s.__toPrimitive(e)}}}},{key:"NE",value:function(e,t){return!s.EQ(e,t)}},{key:"DataViewGetBigInt64",value:function(e,t){var r=!!(2>>30),f.__setDigit(2,u>>>28),f.__trim()}},{key:"DataViewSetBigInt64",value:function(e,t,r){var n=!!(3>>2,2t)i=-t-1;else{if(0===r)return-1;r--,n=e.__digit(r),i=29}var o=1<>>20)-1023,n=1+(0|r/30),i=new s(n,0>e),o=1048575&s.__kBitConversionInts[1]|1048576,a=s.__kBitConversionInts[0],u=r%30,c=0;if(u<20){var f=20-u;c=f+32,t=o>>>f,o=o<<32-f|a>>>f,a<<=32-f}else if(20===u)c=32,t=o,o=a,a=0;else{var l=u-20;c=32-l,t=o<>>32-l,o=a<>>2,o=o<<30|a>>>2,a<<=30):t=0,i.__setDigit(h,t);return i.__trim()}},{key:"__isWhitespace",value:function(e){return!!(13>=e&&9<=e)||(159>=e?32==e:131071>=e?160==e||5760==e:196607>=e?10>=(e&=131071)||40==e||41==e||47==e||95==e||4096==e:65279==e)}},{key:"__fromString",value:function(e){var t=11073741824/u)return null;var f=u*a+c>>>s.__kBitsPerCharTableShift,l=new s(0|(f+29)/30,!1),h=10>t?t:10,d=10>=s.__kBitsPerCharTableShift;var p=[],v=[],m=!1;do{for(var g,b=0,y=0;;){if(g=void 0,o-48>>>0>>0>>0>>0>>s.__kBitsPerCharTableShift)/30;l.__inplaceMultiplyAdd(E,_,S)}while(!w)}if(i!==n){if(!s.__isWhitespace(o))return null;for(i++;i>>u-(o-=30))}if(0!==i){if(n>=e.length)throw new Error("implementation bug");e.__setDigit(n++,i)}for(;n>>1)+(85&n))>>>2)+(51&n))>>>4)+(15&n),o=t-1,a=e.__digit(r-1),u=0|(30*r-s.__clz30(a)+i-1)/i;if(e.sign&&u++,268435456>>m,h=30-m;h>=i;)c[f--]=s.__kConversionChars[l&o],l>>>=i,h-=i}var g=(l|a<>>i-h;0!==l;)c[f--]=s.__kConversionChars[l&o],l>>>=i;if(e.sign&&(c[f--]="-"),-1!==f)throw new Error("implementation bug");return c.join("")}},{key:"__toStringGeneric",value:function(e,t,r){var n=e.length;if(0===n)return"";if(1===n){var i=e.__unsignedDigit(0).toString(t);return!1===r&&e.sign&&(i="-"+i),i}var o,a,u=30*n-s.__clz30(e.__digit(n-1)),c=s.__kMaxBitsPerChar[t]-1,f=u*s.__kBitsPerCharTableMultiplier,l=1+(f=0|(f+=c-1)/c)>>1,h=s.exponentiate(s.__oneDigit(t,!1),s.__oneDigit(l,!1)),d=h.__unsignedDigit(0);if(1===h.length&&32767>=d){(o=new s(e.length,!1)).__initializeDigits();for(var p,v=0,m=2*e.length-1;0<=m;m--)p=v<<15|e.__halfDigit(m),o.__setHalfDigit(m,0|p/d),v=0|p%d;a=v.toString(t)}else{var g=s.__absoluteDivLarge(e,h,!0,!0);o=g.quotient;var b=g.remainder.__trim();a=s.__toStringGeneric(b,t,!0)}o.__trim();for(var y=s.__toStringGeneric(o,t,!0);a.lengthn?s.__absoluteLess(r):0}},{key:"__compareToNumber",value:function(e,r){if(s.__isOneDigitInt(r)){var n=e.sign,i=0>r;if(n!==i)return s.__unequalSign(n);if(0===e.length){if(i)throw new Error("implementation bug");return 0===r?0:-1}if(1o?s.__absoluteGreater(n):at)return s.__unequalSign(r);if(0===t)throw new Error("implementation bug: should be handled elsewhere");if(0===e.length)return-1;s.__kBitConversionDouble[0]=t;var n=2047&s.__kBitConversionInts[1]>>>20;if(2047==n)throw new Error("implementation bug: handled elsewhere");var i=n-1023;if(0>i)return s.__absoluteGreater(r);var o=e.length,a=e.__digit(o-1),u=s.__clz30(a),c=30*o-u,f=i+1;if(cf)return s.__absoluteGreater(r);var l=1048576|1048575&s.__kBitConversionInts[1],h=s.__kBitConversionInts[0],d=29-u;if(d!==(0|(c-1)%30))throw new Error("implementation bug");var p,v=0;if(d<20){var m=20-d;v=m+32,p=l>>>m,l=l<<32-m|h>>>m,h<<=32-m}else if(20===d)v=32,p=l,l=h,h=0;else{var g=d-20;v=32-g,p=l<>>32-g,l=h<>>=0)>(p>>>=0))return s.__absoluteGreater(r);if(a>>2,l=l<<30|h>>>2,h<<=30):p=0;var y=e.__unsignedDigit(b);if(y>p)return s.__absoluteGreater(r);if(yr&&e.__unsignedDigit(0)===t(r):0===s.__compareToDouble(e,r)}},{key:"__comparisonResultToBool",value:function(e,t){return 0===t?0>e:1===t?0>=e:2===t?0t;case 3:return e>=t}if(s.__isBigInt(e)&&"string"==typeof t)return null!==(t=s.__fromString(t))&&s.__comparisonResultToBool(s.__compareToBigInt(e,t),r);if("string"==typeof e&&s.__isBigInt(t))return null!==(e=s.__fromString(e))&&s.__comparisonResultToBool(s.__compareToBigInt(e,t),r);if(e=s.__toNumeric(e),t=s.__toNumeric(t),s.__isBigInt(e)){if(s.__isBigInt(t))return s.__comparisonResultToBool(s.__compareToBigInt(e,t),r);if("number"!=typeof t)throw new Error("implementation bug");return s.__comparisonResultToBool(s.__compareToNumber(e,t),r)}if("number"!=typeof e)throw new Error("implementation bug");if(s.__isBigInt(t))return s.__comparisonResultToBool(s.__compareToNumber(t,e),2^r);if("number"!=typeof t)throw new Error("implementation bug");return 0===r?et:3===r?e>=t:void 0}},{key:"__absoluteAdd",value:function(e,t,r){if(e.length>>30,o.__setDigit(u,1073741823&i);for(;u>>30,o.__setDigit(u,1073741823&c)}return u>>30,i.__setDigit(a,1073741823&n);for(;a>>30,i.__setDigit(a,1073741823&u)}return i.__trim()}},{key:"__absoluteAddOne",value:function(e,t){var r=2>>30,r.__setDigit(a,1073741823&i);return 0!==o&&r.__setDigitGrow(n,1),r}},{key:"__absoluteSubOne",value:function(e,t){for(var r,n=e.length,i=new s(t=t||n,!1),o=1,a=0;a>>30,i.__setDigit(a,1073741823&r);if(0!==o)throw new Error("implementation bug");for(var u=n;un?0:e.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}},{key:"__multiplyAccumulate",value:function(e,t,r,n){if(0!==t){for(var i=32767&t,o=t>>>15,a=0,u=0,c=0;c>>15,p=s.__imul(h,i),v=s.__imul(h,o),m=s.__imul(d,i);a=(f+=u+p+a)>>>30,f&=1073741823,a+=(f+=((32767&v)<<15)+((32767&m)<<15))>>>30,u=s.__imul(d,o)+(v>>>15)+(m>>>15),r.__setDigit(n,1073741823&f)}for(;0!==a||0!==u;n++){var g=r.__digit(n);g+=a+u,u=0,a=g>>>30,r.__setDigit(n,1073741823&g)}}}},{key:"__internalMultiplyAdd",value:function(e,t,r,n,i){for(var o=r,a=0,u=0;u>>15,t),h=f+((32767&l)<<15)+a+o;o=h>>>30,a=l>>>15,i.__setDigit(u,1073741823&h)}if(i.length>n)for(i.__setDigit(n++,o+a);n>>0,a=0|o/t,u=0|(o=((n=0|o%t)<<15|e.__halfDigit(i-1))>>>0)/t;n=0|o%t,r.__setDigit(i>>>1,a<<15|u)}return r}},{key:"__absoluteModSmall",value:function(e,t){for(var r=0,n=2*e.length-1;0<=n;n--)r=0|((r<<15|e.__halfDigit(n))>>>0)%t;return r}},{key:"__absoluteDivLarge",value:function(e,t,r,n){var i=t.__halfDigitLength(),o=t.length,a=e.__halfDigitLength()-i,u=null;r&&(u=new s(a+2>>>1,!1)).__initializeDigits();var c=new s(i+2>>>1,!1);c.__initializeDigits();var f=s.__clz15(t.__halfDigit(i-1));0>>0;v=0|g/h;for(var b=0|g%h,y=t.__halfDigit(i-2),w=l.__halfDigit(p+i-2);s.__imul(v,y)>>>0>(b<<16|w)>>>0&&(v--,!(32767<(b+=h))););}s.__internalMultiplyAdd(t,v,0,o,c);var k=l.__inplaceSub(c,p,i+1);0!==k&&(k=l.__inplaceAdd(t,p,i),l.__setHalfDigit(p+i,32767&l.__halfDigit(p+i)+k),v--),r&&(1&p?d=v<<15:u.__setDigit(p>>>1,d|v))}if(n)return l.__inplaceRightShift(f),r?{quotient:u,remainder:l}:l;if(r)return u;throw new Error("unreachable")}},{key:"__clz15",value:function(e){return s.__clz30(e)-15}},{key:"__specialLeftShift",value:function(e,t,r){var n=e.length,i=new s(n+r,!1);if(0===t){for(var o=0;o>>30-t;return 0r)throw new RangeError("BigInt too big");var n=0|r/30,i=r%30,o=e.length,a=0!==i&&0!=e.__digit(o-1)>>>30-i,u=o+n+(a?1:0),c=new s(u,e.sign);if(0===i){for(var f=0;f>>30-i;if(a)c.__setDigit(o+n,l);else if(0!==l)throw new Error("implementation bug")}return c.__trim()}},{key:"__rightShiftByAbsolute",value:function(e,t){var r=e.length,n=e.sign,i=s.__toShiftAmount(t);if(0>i)return s.__rightShiftByMaximum(n);var o=0|i/30,a=i%30,u=r-o;if(0>=u)return s.__rightShiftByMaximum(n);var c=!1;if(n)if(0!=(e.__digit(o)&(1<>>a,v=r-o-1,m=0;m>>a;l.__setDigit(v,p)}return c&&(l=s.__absoluteAddOne(l,!0,l)),l.__trim()}},{key:"__rightShiftByMaximum",value:function(e){return e?s.__oneDigit(1,!0):s.__zero()}},{key:"__toShiftAmount",value:function(e){if(1s.__kMaxLengthBits?-1:t}},{key:"__toPrimitive",value:function(e){var t=1>>u}return n.__setDigit(i,a),n.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(e,t,r){for(var n,i=Math.min,o=0|(e+29)/30,a=new s(o,r),u=0,c=o-1,f=0,l=i(c,t.length);u>>30,a.__setDigit(u,1073741823&n);for(;u>>v)-f,h&=m-1}return a.__setDigit(c,h),a.__trim()}},{key:"__digitPow",value:function(e,t){for(var r=1;0>>=1,e*=e;return r}},{key:"__isOneDigitInt",value:function(e){return(1073741823&e)===e}}]),s}(f(Array));return g.__kMaxLength=33554432,g.__kMaxLengthBits=g.__kMaxLength<<5,g.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],g.__kBitsPerCharTableShift=5,g.__kBitsPerCharTableMultiplier=1<>>0)/t)},g.__imul=e||function(e,t){return 0|e*t},g}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(278);function i(e,t,r){return(t=Object(n.a)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return x})),r.d(t,"b",(function(){return d}));var n=r(1),i=r.n(n),o=i.a.createContext(null);var a=function(e){e()},s={notify:function(){}};function u(){var e=a,t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],r=t;r;)e.push(r),r=r.next;return e},subscribe:function(e){var n=!0,i=r={callback:e,next:null,prev:r};return i.prev?i.prev.next=i:t=i,function(){n&&null!==t&&(n=!1,i.next?i.next.prev=i.prev:r=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var c=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=s,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=u())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=s)},e}(),f="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?n.useLayoutEffect:n.useEffect;var l=function(e){var t=e.store,r=e.context,a=e.children,s=Object(n.useMemo)((function(){var e=new c(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),u=Object(n.useMemo)((function(){return t.getState()}),[t]);f((function(){var e=s.subscription;return e.trySubscribe(),u!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,u]);var l=r||o;return i.a.createElement(l.Provider,{value:s},a)};r(19),r(47),r(136),r(122);function h(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function d(e,t){if(h(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{};k=b({},k,{},e)}(e.options.react),function(e){y=e}(e)}};function M(){if(console&&console.warn){for(var e,t=arguments.length,r=new Array(t),n=0;n-1)if(r.voidElement)t.push(f.a.createElement(r.name,{key:"".concat(r.name,"-").concat(s)}));else{var g=e(i,r.children);t.push(f.a.createElement(r.name,{key:"".concat(r.name,"-").concat(s)},g))}else if(r.voidElement)t.push("<".concat(r.name," />"));else{var b=e(i,r.children);t.push("<".concat(r.name,">").concat(b,""))}else if("object"!==u()(l)||h)1===r.children.length&&c?t.push(f.a.cloneElement(l,L({},l.props,{key:s}),c)):t.push(f.a.cloneElement(l,L({},l.props,{key:s})));else{var y=r.children[0]?c:null;y&&t.push(y)}}else"text"===r.type&&t.push(r.content);return t}),[])}([{dummy:!0,children:e}],h.a.parse("<0>".concat(c,"")));return I(l[0])}function D(e){var t=e.children,r=e.count,n=e.parent,o=e.i18nKey,a=e.tOptions,s=e.values,l=e.defaults,h=e.components,d=e.ns,p=e.i18n,v=e.t,m=i()(e,["children","count","parent","i18nKey","tOptions","values","defaults","components","ns","i18n","t"]),g=_()&&Object(c.useContext)(x)||{},b=g.i18n,y=g.defaultNS,w=p||b||S();if(!w)return j("You will need pass in an i18next instance by using i18nextReactModule"),t;var k=v||w.t.bind(w)||function(e){return e},A=L({},E(),{},w.options&&w.options.react),O=void 0!==n?n:A.defaultTransParent,P=d||k.ns||y||w.options&&w.options.defaultNS;P="string"===typeof P?[P]:P||["translation"];var T=l||function e(t,r,n,i){if(!r)return"";var o=t,a=B(r),s=i.transKeepBasicHtmlNodesFor||[];return a.forEach((function(t,r){var n="".concat(r);if("string"===typeof t)o="".concat(o).concat(t);else if(N(t)){var a=s.indexOf(t.type)>-1&&1===Object.keys(t.props).length&&"string"===typeof N(t)?t.type:n;o=t.props&&t.props.i18nIsDynamicList?"".concat(o,"<").concat(a,">"):"".concat(o,"<").concat(a,">").concat(e("",I(t),r+1,i),"")}else if(f.a.isValidElement(t))o=s.indexOf(t.type)>-1&&0===Object.keys(t.props).length?"".concat(o,"<").concat(t.type,"/>"):"".concat(o,"<").concat(n,">");else if("object"===u()(t)){var c=L({},t),l=c.format;delete c.format;var h=Object.keys(c);l&&1===h.length?o="".concat(o,"{{").concat(h[0],", ").concat(l,"}}"):1===h.length?o="".concat(o,"{{").concat(h[0],"}}"):M("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",t)}else M("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",t)})),o}("",t,0,A)||A.transEmptyNodeValue,C=A.hashTransKey,R=o||(C?C(T):T),D=L({},a,{count:r},s,{},s?{}:{interpolation:{prefix:"#$?",suffix:"?$#"}},{defaultValue:T,ns:P}),U=R?k(R,D):T;return O?f.a.createElement(O,m,F(h||t,U,w,A,D)):F(h||t,U,w,A,D)}var U=r(177),z=r.n(U);function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=t.i18n,n=Object(c.useContext)(x),i=_()&&n||{},o=i.i18n,a=i.defaultNS,s=r||o||S();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new A),!s){j("You will need pass in an i18next instance by using initReactI18next");var u=[function(e){return e},{},!1];return u.t=function(e){return e},u.i18n={},u.ready=!1,u}var f=q({},E(),{},s.options.react),l=t.useSuspense,h=void 0===l?f.useSuspense:l,d=e||a||s.options&&s.options.defaultNS;d="string"===typeof d?[d]:d||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(d);var p=(s.isInitialized||s.initializedStoreOnce)&&d.every((function(e){return C(e,s)}));function v(){return{t:s.getFixedT(null,"fallback"===f.nsMode?d:d[0])}}var m=Object(c.useState)(v()),g=z()(m,2),b=g[0],y=g[1];Object(c.useEffect)((function(){var e=!0,t=f.bindI18n,r=f.bindI18nStore;function n(){e&&y(v())}return p||h||T(s,d,(function(){e&&y(v())})),t&&s&&s.on(t,n),r&&s&&s.store.on(r,n),function(){e=!1,t&&s&&t.split(" ").forEach((function(e){return s.off(e,n)})),r&&s&&r.split(" ").forEach((function(e){return s.store.off(e,n)}))}}),[d.join()]);var w=[b.t,s,p];if(w.t=b.t,w.i18n=s,w.ready=p,p)return w;if(!p&&!h)return w;throw new Promise((function(e){T(s,d,(function(){y(v()),e()}))}))}r(467)},function(e,t,r){"use strict";function n(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}r.d(t,"a",(function(){return i}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n="Invariant failed";function i(e,t){if(!e)throw new Error(n)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var n=c(r(835)),i=c(r(841)),o=c(r(843)),a=c(r(844)),s=c(r(845)),u=c(r(846));function c(e){return e&&e.__esModule?e:{default:e}}t.hover=a.default,t.handleHover=a.default,t.handleActive=s.default,t.loop=u.default;var f=t.ReactCSS=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:h(e)?2:d(e)?3:0}function u(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===s(e)?e.get(t):e[t]}function f(e,t,r){var n=s(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function l(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e){return H&&e instanceof Map}function d(e){return q&&e instanceof Set}function p(e){return e.o||e.t}function v(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Z(e);delete t[K];for(var r=W(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&a(e,(function(e,t){return m(t,!0)}),!0)),e}function g(){n(2)}function b(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function y(e){var t=Y[e];return t||n(18,e),t}function w(e,t){Y[e]||(Y[e]=t)}function k(){return U}function x(e,t){t&&(y("Patches"),e.u=[],e.s=[],e.v=t)}function _(e){E(e),e.p.forEach(S),e.p=null}function E(e){e===U&&(U=e.l)}function A(e){return U={p:[],l:U,h:e,m:!0,_:0}}function S(e){var t=e[K];0===t.i||1===t.i?t.j():t.g=!0}function O(e,t){t._=t.p.length;var r=t.p[0],i=void 0!==e&&e!==r;return t.h.O||y("ES5").S(t,e,i),i?(r[K].P&&(_(t),n(4)),o(e)&&(e=M(t,e),t.l||j(t,e)),t.u&&y("Patches").M(r[K].t,e,t.u,t.s)):e=M(t,r,[]),_(t),t.u&&t.v(t.u,t.s),e!==J?e:void 0}function M(e,t,r){if(b(t))return t;var n=t[K];if(!n)return a(t,(function(i,o){return P(e,n,t,i,o,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return j(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=4===n.i||5===n.i?n.o=v(n.k):n.o,o=i,s=!1;3===n.i&&(o=new Set(i),i.clear(),s=!0),a(o,(function(t,o){return P(e,n,i,t,o,r,s)})),j(e,i,!1),r&&e.u&&y("Patches").N(n,r,e.u,e.s)}return n.o}function P(e,t,r,n,a,s,c){if(i(a)){var l=M(e,a,s&&t&&3!==t.i&&!u(t.R,n)?s.concat(n):void 0);if(f(r,n,l),!i(l))return;e.m=!1}else c&&r.add(a);if(o(a)&&!b(a)){if(!e.h.D&&e._<1)return;M(e,a),t&&t.A.l||j(e,a)}}function j(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e.m&&m(t,r)}function T(e,t){var r=e[K];return(r?p(r):e)[t]}function C(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function R(e){e.P||(e.P=!0,e.l&&R(e.l))}function L(e){e.o||(e.o=v(e.t))}function N(e,t,r){var n=h(t)?y("MapSet").F(t,r):d(t)?y("MapSet").T(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:k(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=n,o=Q;r&&(i=[n],o=$);var a=Proxy.revocable(i,o),s=a.revoke,u=a.proxy;return n.k=u,n.j=s,u}(t,r):y("ES5").J(t,r);return(r?r.A:k()).p.push(n),n}function I(e){return i(e)||n(22,e),function e(t){if(!o(t))return t;var r,n=t[K],i=s(t);if(n){if(!n.P&&(n.i<4||!y("ES5").K(n)))return n.t;n.I=!0,r=B(t,i),n.I=!1}else r=B(t,i);return a(r,(function(t,i){n&&c(n.t,t)===i||f(r,t,e(i))})),3===i?new Set(r):r}(e)}function B(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return v(e)}function F(){function e(e,t){var r=o[e];return r?r.enumerable=t:o[e]=r={configurable:!0,enumerable:t,get:function(){var t=this[K];return Q.get(t,e)},set:function(t){var r=this[K];Q.set(r,e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][K];if(!i.P)switch(i.i){case 5:n(i)&&R(i);break;case 4:r(i)&&R(i)}}}function r(e){for(var t=e.t,r=e.k,n=W(r),i=n.length-1;i>=0;i--){var o=n[i];if(o!==K){var a=t[o];if(void 0===a&&!u(t,o))return!0;var s=r[o],c=s&&s[K];if(c?c.t!==a:!l(s,a))return!0}}var f=!!t[K];return n.length!==W(t).length+(f?0:1)}function n(e){var t=e.k;if(t.length!==e.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return!0;for(var n=0;n1?n-1:0),o=1;o1?n-1:0),o=1;o=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));var o=y("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}()),te=ee.produce,re=(ee.produceWithPatches.bind(ee),ee.setAutoFreeze.bind(ee),ee.setUseProxies.bind(ee),ee.applyPatches.bind(ee),ee.createDraft.bind(ee),ee.finishDraft.bind(ee),te);var ne=r(28);function ie(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var oe="function"===typeof Symbol&&Symbol.observable||"@@observable",ae=function(){return Math.random().toString(36).substring(7).split("").join(".")},se={INIT:"@@redux/INIT"+ae(),REPLACE:"@@redux/REPLACE"+ae(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ae()}};function ue(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ce(e,t,r){var n;if("function"===typeof t&&"function"===typeof r||"function"===typeof r&&"function"===typeof arguments[3])throw new Error(ie(0));if("function"===typeof t&&"undefined"===typeof r&&(r=t,t=void 0),"undefined"!==typeof r){if("function"!==typeof r)throw new Error(ie(1));return r(ce)(e,t)}if("function"!==typeof e)throw new Error(ie(2));var i=e,o=t,a=[],s=a,u=!1;function c(){s===a&&(s=a.slice())}function f(){if(u)throw new Error(ie(3));return o}function l(e){if("function"!==typeof e)throw new Error(ie(4));if(u)throw new Error(ie(5));var t=!0;return c(),s.push(e),function(){if(t){if(u)throw new Error(ie(6));t=!1,c();var r=s.indexOf(e);s.splice(r,1),a=null}}}function h(e){if(!ue(e))throw new Error(ie(7));if("undefined"===typeof e.type)throw new Error(ie(8));if(u)throw new Error(ie(9));try{u=!0,o=i(o,e)}finally{u=!1}for(var t=a=s,r=0;r=0&&i<1?(s=o,u=a):i>=1&&i<2?(s=a,u=o):i>=2&&i<3?(u=o,c=a):i>=3&&i<4?(u=a,c=o):i>=4&&i<5?(s=a,c=o):i>=5&&i<6&&(s=o,c=a);var f=r-o/2;return n(s+f,u+f,c+f)}var v={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var m=/^#[a-fA-F0-9]{6}$/,g=/^#[a-fA-F0-9]{8}$/,b=/^#[a-fA-F0-9]{3}$/,y=/^#[a-fA-F0-9]{4}$/,w=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,k=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,x=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,_=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function E(e){if("string"!==typeof e)throw new l(3);var t=function(e){if("string"!==typeof e)return e;var t=e.toLowerCase();return v[t]?"#"+v[t]:e}(e);if(t.match(m))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(g)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(b))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(y)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var i=w.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=k.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])>1?parseFloat(""+o[4])/100:parseFloat(""+o[4])};var a=x.exec(t);if(a){var s="rgb("+p(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",u=w.exec(s);if(!u)throw new l(4,t,s);return{red:parseInt(""+u[1],10),green:parseInt(""+u[2],10),blue:parseInt(""+u[3],10)}}var c=_.exec(t.substring(0,50));if(c){var f="rgb("+p(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",h=w.exec(f);if(!h)throw new l(4,t,f);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+c[4])>1?parseFloat(""+c[4])/100:parseFloat(""+c[4])}}throw new l(5)}function A(e){return function(e){var t,r=e.red/255,n=e.green/255,i=e.blue/255,o=Math.max(r,n,i),a=Math.min(r,n,i),s=(o+a)/2;if(o===a)return void 0!==e.alpha?{hue:0,saturation:0,lightness:s,alpha:e.alpha}:{hue:0,saturation:0,lightness:s};var u=o-a,c=s>.5?u/(2-o-a):u/(o+a);switch(o){case r:t=(n-i)/u+(n=1?j(e,t,r):"rgba("+p(e,t,r)+","+n+")";if("object"===typeof e&&void 0===t&&void 0===r&&void 0===n)return e.alpha>=1?j(e.hue,e.saturation,e.lightness):"rgba("+p(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new l(2)}function R(e,t,r){if("number"===typeof e&&"number"===typeof t&&"number"===typeof r)return S("#"+O(e)+O(t)+O(r));if("object"===typeof e&&void 0===t&&void 0===r)return S("#"+O(e.red)+O(e.green)+O(e.blue));throw new l(6)}function L(e,t,r,n){if("string"===typeof e&&"number"===typeof t){var i=E(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"===typeof e&&"number"===typeof t&&"number"===typeof r&&"number"===typeof n)return n>=1?R(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if("object"===typeof e&&void 0===t&&void 0===r&&void 0===n)return e.alpha>=1?R(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new l(7)}function N(e){if("object"!==typeof e)throw new l(8);if(function(e){return"number"===typeof e.red&&"number"===typeof e.green&&"number"===typeof e.blue&&"number"===typeof e.alpha}(e))return L(e);if(function(e){return"number"===typeof e.red&&"number"===typeof e.green&&"number"===typeof e.blue&&("number"!==typeof e.alpha||"undefined"===typeof e.alpha)}(e))return R(e);if(function(e){return"number"===typeof e.hue&&"number"===typeof e.saturation&&"number"===typeof e.lightness&&"number"===typeof e.alpha}(e))return C(e);if(function(e){return"number"===typeof e.hue&&"number"===typeof e.saturation&&"number"===typeof e.lightness&&("number"!==typeof e.alpha||"undefined"===typeof e.alpha)}(e))return T(e);throw new l(8)}function I(e){return function e(t,r,n){return function(){var i=n.concat(Array.prototype.slice.call(arguments));return i.length>=r?t.apply(this,i):e(t,r,i)}}(e,e.length,[])}function B(e,t,r){return Math.max(e,Math.min(t,r))}function F(e,t){if("transparent"===t)return t;var r=A(t);return N(Object(n.a)({},r,{lightness:B(0,1,r.lightness-parseFloat(e))}))}var D=I(F);function U(e,t){if("transparent"===t)return t;var r=A(t);return N(Object(n.a)({},r,{lightness:B(0,1,r.lightness+parseFloat(e))}))}var z=I(U);function H(e,t,r){if("transparent"===t)return r;if("transparent"===r)return t;if(0===e)return r;var i=E(t),o=Object(n.a)({},i,{alpha:"number"===typeof i.alpha?i.alpha:1}),a=E(r),s=Object(n.a)({},a,{alpha:"number"===typeof a.alpha?a.alpha:1}),u=o.alpha-s.alpha,c=2*parseFloat(e)-1,f=((c*u===-1?c:c+u)/(1+c*u)+1)/2,l=1-f;return L({red:Math.floor(o.red*f+s.red*l),green:Math.floor(o.green*f+s.green*l),blue:Math.floor(o.blue*f+s.blue*l),alpha:o.alpha*parseFloat(e)+s.alpha*(1-parseFloat(e))})}var q=I(H);function G(e,t){return"transparent"===t?t:q(parseFloat(e),"rgb(0, 0, 0)",t)}var J=I(G);function V(e,t){if("transparent"===t)return t;var r=E(t),i="number"===typeof r.alpha?r.alpha:1;return L(Object(n.a)({},r,{alpha:B(0,1,+(100*i-100*parseFloat(e)).toFixed(2)/100)}))}var K=I(V)},function(e,t,r){"use strict";function n(e){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,"a",(function(){return n}))},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(531).Buffer}catch(M){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=u(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(M){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?""}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"],d=[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],p=[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];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],f=p[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var v=l.modrn(f).toString(e);r=(l=l.idivn(f)).isZero()?v+r:h[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function v(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,v=d>>>13,m=0|a[2],g=8191&m,b=m>>>13,y=0|a[3],w=8191&y,k=y>>>13,x=0|a[4],_=8191&x,E=x>>>13,A=0|a[5],S=8191&A,O=A>>>13,M=0|a[6],P=8191&M,j=M>>>13,T=0|a[7],C=8191&T,R=T>>>13,L=0|a[8],N=8191&L,I=L>>>13,B=0|a[9],F=8191&B,D=B>>>13,U=0|s[0],z=8191&U,H=U>>>13,q=0|s[1],G=8191&q,J=q>>>13,V=0|s[2],K=8191&V,X=V>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],$=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(l,z))|0)+((8191&(i=(i=Math.imul(l,H))+Math.imul(h,z)|0))<<13)|0;c=((o=Math.imul(h,H))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(v,z)|0,o=Math.imul(v,H);var ge=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,H))+Math.imul(b,z)|0,o=Math.imul(b,H),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,J)|0;var be=(c+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(k,z)|0,o=Math.imul(k,H),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,X)|0;var ye=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,H))+Math.imul(E,z)|0,o=Math.imul(E,H),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Y)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,z),i=(i=Math.imul(S,H))+Math.imul(O,z)|0,o=Math.imul(O,H),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,J)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,J)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0;var ke=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(P,z),i=(i=Math.imul(P,H))+Math.imul(j,z)|0,o=Math.imul(j,H),n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0;var xe=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,H))+Math.imul(R,z)|0,o=Math.imul(R,H),n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var _e=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,H))+Math.imul(I,z)|0,o=Math.imul(I,H),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var Ee=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,z),i=(i=Math.imul(F,H))+Math.imul(D,z)|0,o=Math.imul(D,H),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,J)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var Ae=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,J))+Math.imul(D,G)|0,o=Math.imul(D,J),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,he)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(F,K),i=(i=Math.imul(F,X))+Math.imul(D,K)|0,o=Math.imul(D,X),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0;var Oe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ve)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,Z),i=(i=Math.imul(F,Y))+Math.imul(D,Z)|0,o=Math.imul(D,Y),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,he)|0;var Me=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,ee))+Math.imul(D,$)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(S,le)|0,i=(i=i+Math.imul(S,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Pe=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ve)|0)+Math.imul(E,pe)|0))<<13)|0;c=((o=o+Math.imul(E,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(j,le)|0,o=o+Math.imul(j,he)|0;var je=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ve)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(F,oe),i=(i=Math.imul(F,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,he)|0;var Te=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,ue),i=(i=Math.imul(F,ce))+Math.imul(D,ue)|0,o=Math.imul(D,ce),n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,he)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,he))+Math.imul(D,le)|0,o=Math.imul(D,he);var Re=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ve)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Le=(c+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,ve))+Math.imul(D,pe)|0))<<13)|0;return c=((o=Math.imul(D,ve))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=me,u[1]=ge,u[2]=be,u[3]=ye,u[4]=we,u[5]=ke,u[6]=xe,u[7]=_e,u[8]=Ee,u[9]=Ae,u[10]=Se,u[11]=Oe,u[12]=Me,u[13]=Pe,u[14]=je,u[15]=Te,u[16]=Ce,u[17]=Re,u[18]=Le,0!==c&&(u[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(m=v),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?v(this,e,t):r<1024?g(this,e,t):b(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>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},o.prototype.isubn=function(e){if(n("number"===typeof e),n(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>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0===(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(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 k(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}k.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},k.prototype.split=function(e,t){e.iushrn(this.n,0,t)},k.prototype.imulK=function(e){return e.imul(this.k)},i(x,k),x.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new _;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return w[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var v=d,m=0;0!==v.cmp(s);m++)v=v.redSqr();n(m=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new O(e)},i(O,S),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(93)(e))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(33);function i(e,t,r){return(i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(n.a)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}},,function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(630).Buffer}catch(A){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=u(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","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"],l=[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],h=[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];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=l[e],d=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?v+r:f[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,v=d>>>13,m=0|a[2],g=8191&m,b=m>>>13,y=0|a[3],w=8191&y,k=y>>>13,x=0|a[4],_=8191&x,E=x>>>13,A=0|a[5],S=8191&A,O=A>>>13,M=0|a[6],P=8191&M,j=M>>>13,T=0|a[7],C=8191&T,R=T>>>13,L=0|a[8],N=8191&L,I=L>>>13,B=0|a[9],F=8191&B,D=B>>>13,U=0|s[0],z=8191&U,H=U>>>13,q=0|s[1],G=8191&q,J=q>>>13,V=0|s[2],K=8191&V,X=V>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],$=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(l,z))|0)+((8191&(i=(i=Math.imul(l,H))+Math.imul(h,z)|0))<<13)|0;c=((o=Math.imul(h,H))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(v,z)|0,o=Math.imul(v,H);var ge=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,H))+Math.imul(b,z)|0,o=Math.imul(b,H),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,J)|0;var be=(c+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(k,z)|0,o=Math.imul(k,H),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,X)|0;var ye=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,H))+Math.imul(E,z)|0,o=Math.imul(E,H),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Y)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,z),i=(i=Math.imul(S,H))+Math.imul(O,z)|0,o=Math.imul(O,H),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,J)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,J)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0;var ke=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(P,z),i=(i=Math.imul(P,H))+Math.imul(j,z)|0,o=Math.imul(j,H),n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0;var xe=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,H))+Math.imul(R,z)|0,o=Math.imul(R,H),n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var _e=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,H))+Math.imul(I,z)|0,o=Math.imul(I,H),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var Ee=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,z),i=(i=Math.imul(F,H))+Math.imul(D,z)|0,o=Math.imul(D,H),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,J)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var Ae=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,J))+Math.imul(D,G)|0,o=Math.imul(D,J),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,he)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(F,K),i=(i=Math.imul(F,X))+Math.imul(D,K)|0,o=Math.imul(D,X),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0;var Oe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ve)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,Z),i=(i=Math.imul(F,Y))+Math.imul(D,Z)|0,o=Math.imul(D,Y),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,he)|0;var Me=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,ee))+Math.imul(D,$)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(S,le)|0,i=(i=i+Math.imul(S,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Pe=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ve)|0)+Math.imul(E,pe)|0))<<13)|0;c=((o=o+Math.imul(E,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(j,le)|0,o=o+Math.imul(j,he)|0;var je=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ve)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(F,oe),i=(i=Math.imul(F,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,he)|0;var Te=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,ue),i=(i=Math.imul(F,ce))+Math.imul(D,ue)|0,o=Math.imul(D,ce),n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,he)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,he))+Math.imul(D,le)|0,o=Math.imul(D,he);var Re=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ve)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Le=(c+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,ve))+Math.imul(D,pe)|0))<<13)|0;return c=((o=Math.imul(D,ve))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=me,u[1]=ge,u[2]=be,u[3]=ye,u[4]=we,u[5]=ke,u[6]=xe,u[7]=_e,u[8]=Ee,u[9]=Ae,u[10]=Se,u[11]=Oe,u[12]=Me,u[13]=Pe,u[14]=je,u[15]=Te,u[16]=Ce,u[17]=Re,u[18]=Le,0!==c&&(u[19]=c,r.length++),r};function v(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=d),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):v(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>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},o.prototype.isubn=function(e){if(n("number"===typeof e),n(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>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0===(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}b.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(y,b),y.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var v=d,m=0;0!==v.cmp(s);m++)v=v.redSqr();n(m=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(93)(e))},function(e,t,r){"use strict";r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return m})),r.d(t,"c",(function(){return g}));var n=r(4),i=r(41),o=r(39),a=r(99),s=new(r(10).a)("address/5.7.0");function u(e){Object(n.k)(e,20)||s.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),i=0;i<40;i++)r[i]=t[i].charCodeAt(0);for(var a=Object(n.a)(Object(o.a)(r)),u=0;u<40;u+=2)a[u>>1]>>4>=8&&(t[u]=t[u].toUpperCase()),(15&a[u>>1])>=8&&(t[u+1]=t[u+1].toUpperCase());return"0x"+t.join("")}for(var c={},f=0;f<10;f++)c[String(f)]=String(f);for(var l=0;l<26;l++)c[String.fromCharCode(65+l)]=String(10+l);var h,d=Math.floor((h=9007199254740991,Math.log10?Math.log10(h):Math.log(h)/Math.LN10));function p(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return c[e]})).join("");t.length>=d;){var r=t.substring(0,d);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function v(e){var t=null;if("string"!==typeof e&&s.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=u(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&s.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==p(e)&&s.throwArgumentError("bad icap checksum","address",e),t=Object(i.c)(e.substring(4));t.length<40;)t="0"+t;t=u("0x"+t)}else s.throwArgumentError("invalid address","address",e);return t}function m(e){var t=null;try{t=v(e.from)}catch(u){s.throwArgumentError("missing from address","transaction",e)}var r=Object(n.n)(Object(n.a)(i.a.from(e.nonce).toHexString()));return v(Object(n.e)(Object(o.a)(Object(a.b)([t,r])),12))}function g(e,t,r){return 32!==Object(n.d)(t)&&s.throwArgumentError("salt must be 32 bytes","salt",t),32!==Object(n.d)(r)&&s.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),v(Object(n.e)(Object(o.a)(Object(n.b)(["0xff",v(e),t,r])),12))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(288),i=r.n(n),o=r(4);function a(e){return"0x"+i.a.keccak_256(Object(o.a)(e))}},function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"e",(function(){return a})),r.d(t,"a",(function(){return s})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return c}));var n=r(4),i=r(143);function o(e){return"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Object(n.a)(e)}function a(e,t){for(e=String(e);e.length0&&(10===arguments[0]?p||(p=!0,l.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?l.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",u.a.errors.UNEXPECTED_ARGUMENT,{}):l.throwError("BigNumber.toString does not accept parameters",u.a.errors.UNEXPECTED_ARGUMENT,{})),b(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(h,m(t)):t.match(/^-?[0-9]+$/)?new e(h,m(new f(t))):l.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&y("underflow","BigNumber.from",t),(t>=9007199254740991||t<=-9007199254740991)&&y("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(s.i)(r))return e.from(Object(s.h)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"===typeof i&&(Object(s.k)(i)||"-"===i[0]&&Object(s.k)(i.substring(1))))return e.from(i)}return l.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function m(e){if("string"!==typeof e)return m(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&l.throwArgumentError("invalid hex","value",e),"0x00"===(e=m(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function g(e){return v.from(m(e))}function b(e){var t=v.from(e).toHexString();return"-"===t[0]?new f("-"+t.substring(3),16):new f(t.substring(2),16)}function y(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),l.throwError(e,u.a.errors.NUMERIC_FAULT,n)}function w(e){return new f(e,36).toString(16)}function k(e){return new f(e,16).toString(36)}},function(e,t,r){"use strict";r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return c}));var n=r(6),i=r(7),o=r(341),a=r(9),s=r(10),u=new s.a("wordlists/5.3.0"),c=function(){function e(t){Object(n.a)(this,e),u.checkAbstract(this instanceof e?this.constructor:void 0,e),Object(a.d)(this,"locale",t)}return Object(i.a)(e,[{key:"split",value:function(e){return e.toLowerCase().split(/ +/g)}},{key:"join",value:function(e){return e.join(" ")}}],[{key:"check",value:function(e){for(var t=[],r=0;r<2048;r++){var n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return Object(o.a)(t.join("\n")+"\n")}},{key:"register",value:function(e,t){t||(t=e.locale)}}]),e}()},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,"a",(function(){return n}))},function(e,t,r){var n=t;n.utils=r(100),n.common=r(186),n.sha=r(532),n.ripemd=r(536),n.hmac=r(537),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="providers/5.7.2"},function(e,t,r){"use strict";r.r(t),r.d(t,"keccak256",(function(){return a}));var n=r(472),i=r.n(n),o=r(8);function a(e){return"0x"+i.a.keccak_256(Object(o.arrayify)(e))}},function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"d",(function(){return d})),r.d(t,"a",(function(){return v})),r.d(t,"c",(function(){return w})),r.d(t,"b",(function(){return k}));var n=r(6),i=r(7),o=r(37),a=r.n(o),s=r(8),u=r(13),c=r(254),f=a.a.BN,l=new u.Logger(c.a),h={};function d(e){return null!=e&&(v.isBigNumber(e)||"number"===typeof e&&e%1===0||"string"===typeof e&&!!e.match(/^-?[0-9]+$/)||Object(s.isHexString)(e)||"bigint"===typeof e||Object(s.isBytes)(e))}var p=!1,v=function(){function e(t,r){Object(n.a)(this,e),l.checkNew(this instanceof e?this.constructor:void 0,e),t!==h&&l.throwError("cannot call constructor directly; use BigNumber.from",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return Object(i.a)(e,[{key:"fromTwos",value:function(e){return g(b(this).fromTwos(e))}},{key:"toTwos",value:function(e){return g(b(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return g(b(this).add(b(e)))}},{key:"sub",value:function(e){return g(b(this).sub(b(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&y("division by zero","div"),g(b(this).div(b(t)))}},{key:"mul",value:function(e){return g(b(this).mul(b(e)))}},{key:"mod",value:function(e){var t=b(e);return t.isNeg()&&y("cannot modulo negative values","mod"),g(b(this).umod(t))}},{key:"pow",value:function(e){var t=b(e);return t.isNeg()&&y("cannot raise to negative values","pow"),g(b(this).pow(t))}},{key:"and",value:function(e){var t=b(e);return(this.isNegative()||t.isNeg())&&y("cannot 'and' negative values","and"),g(b(this).and(t))}},{key:"or",value:function(e){var t=b(e);return(this.isNegative()||t.isNeg())&&y("cannot 'or' negative values","or"),g(b(this).or(t))}},{key:"xor",value:function(e){var t=b(e);return(this.isNegative()||t.isNeg())&&y("cannot 'xor' negative values","xor"),g(b(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&y("cannot mask negative values","mask"),g(b(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&y("cannot shift negative values","shl"),g(b(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&y("cannot shift negative values","shr"),g(b(this).shrn(e))}},{key:"eq",value:function(e){return b(this).eq(b(e))}},{key:"lt",value:function(e){return b(this).lt(b(e))}},{key:"lte",value:function(e){return b(this).lte(b(e))}},{key:"gt",value:function(e){return b(this).gt(b(e))}},{key:"gte",value:function(e){return b(this).gte(b(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return b(this).isZero()}},{key:"toNumber",value:function(){try{return b(this).toNumber()}catch(e){y("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return l.throwError("this platform does not support BigInt",u.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?p||(p=!0,l.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?l.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",u.Logger.errors.UNEXPECTED_ARGUMENT,{}):l.throwError("BigNumber.toString does not accept parameters",u.Logger.errors.UNEXPECTED_ARGUMENT,{})),b(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(h,m(t)):t.match(/^-?[0-9]+$/)?new e(h,m(new f(t))):l.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&y("underflow","BigNumber.from",t),(t>=9007199254740991||t<=-9007199254740991)&&y("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(s.isBytes)(r))return e.from(Object(s.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"===typeof i&&(Object(s.isHexString)(i)||"-"===i[0]&&Object(s.isHexString)(i.substring(1))))return e.from(i)}return l.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function m(e){if("string"!==typeof e)return m(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&l.throwArgumentError("invalid hex","value",e),"0x00"===(e=m(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function g(e){return v.from(m(e))}function b(e){var t=v.from(e).toHexString();return"-"===t[0]?new f("-"+t.substring(3),16):new f(t.substring(2),16)}function y(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),l.throwError(e,u.Logger.errors.NUMERIC_FAULT,n)}function w(e){return new f(e,36).toString(16)}function k(e){return new f(e,16).toString(36)}},function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return x})),r.d(t,"b",(function(){return S})),r.d(t,"c",(function(){return A})),r.d(t,"d",(function(){return O}));var n=r(1),i=r.n(n),o=r(26),a=r(98),s=r(4),u=r(39);function c(){return(c=Object.assign||function(e){for(var t=1;t>1]>>4>=8&&(r[c]=r[c].toUpperCase()),(15&a[c>>1])>=8&&(r[c+1]=r[c+1].toUpperCase());var f="0x"+r.join("");return t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==f&&Object(o.a)(!1),f}var y,w=function(e,t){try{var r=function(r){return Promise.resolve(Promise.all([void 0===t.chainId?e.getChainId():t.chainId,void 0===t.account?e.getAccount():t.account])).then((function(t){var n=t[0],i=t[1],o=g(n);if(e.supportedChainIds&&!e.supportedChainIds.includes(o))throw new x(o,e.supportedChainIds);var a=null===i?i:b(i);return{provider:r,chainId:o,account:a}}))},n=void 0===t.provider;return Promise.resolve(n?Promise.resolve(e.getProvider()).then(r):r(t.provider))}catch(i){return Promise.reject(i)}},k=function(e){function t(){var t;return(t=e.call(this)||this).name=t.constructor.name,t}return f(t,e),t}(v(Error)),x=function(e){function t(t,r){var n;return(n=e.call(this)||this).name=n.constructor.name,n.message="Unsupported chain id: "+t+". Supported chain ids are: "+r+".",n}return f(t,e),t}(v(Error));function _(e,t){var r=t.type,n=t.payload;switch(r){case y.ACTIVATE_CONNECTOR:return{connector:n.connector,provider:n.provider,chainId:n.chainId,account:n.account,onError:n.onError};case y.UPDATE:var i=n.provider,o=n.chainId,a=n.account;return c({},e,void 0===i?{}:{provider:i},void 0===o?{}:{chainId:o},void 0===a?{}:{account:a});case y.UPDATE_FROM_ERROR:var s=n.provider,u=n.chainId,f=n.account;return c({},e,void 0===s?{}:{provider:s},void 0===u?{}:{chainId:u},void 0===f?{}:{account:f},{error:void 0});case y.ERROR:var l=n.error;return{connector:e.connector,error:l,onError:e.onError};case y.ERROR_FROM_ACTIVATION:return{connector:n.connector,error:n.error};case y.DEACTIVATE_CONNECTOR:return{}}}!function(e){e[e.ACTIVATE_CONNECTOR=0]="ACTIVATE_CONNECTOR",e[e.UPDATE=1]="UPDATE",e[e.UPDATE_FROM_ERROR=2]="UPDATE_FROM_ERROR",e[e.ERROR=3]="ERROR",e[e.ERROR_FROM_ACTIVATION=4]="ERROR_FROM_ACTIVATION",e[e.DEACTIVATE_CONNECTOR=5]="DEACTIVATE_CONNECTOR"}(y||(y={}));var E={};function A(e){E[e]&&Object(o.a)(!1),E[e]=Object(n.createContext)({activate:function(){try{return Object(o.a)(!1),Promise.resolve()}catch(e){return Promise.reject(e)}},setError:function(){Object(o.a)(!1)},deactivate:function(){Object(o.a)(!1)},active:!1}),E[e].displayName="Web3ReactContext - "+e;var t=E[e].Provider;return function(e){var r=e.getLibrary,o=e.children,s=function(){var e=Object(n.useReducer)(_,{}),t=e[0],r=e[1],i=t.connector,o=t.provider,s=t.chainId,u=t.account,f=t.onError,l=t.error,h=Object(n.useRef)(-1);h.current+=1;var d=Object(n.useCallback)((function(e,t,n){void 0===n&&(n=!1);try{var i=h.current,o=!1;return Promise.resolve(m((function(){return Promise.resolve(e.activate().then((function(e){return o=!0,e}))).then((function(n){return Promise.resolve(w(e,n)).then((function(n){if(h.current>i)throw new k;r({type:y.ACTIVATE_CONNECTOR,payload:c({connector:e},n,{onError:t})})}))}))}),(function(i){if(i instanceof k)o&&e.deactivate();else{if(n)throw o&&e.deactivate(),i;t?(o&&e.deactivate(),t(i)):r({type:y.ERROR_FROM_ACTIVATION,payload:{connector:e,error:i}})}})))}catch(a){return Promise.reject(a)}}),[]),p=Object(n.useCallback)((function(e){r({type:y.ERROR,payload:{error:e}})}),[]),v=Object(n.useCallback)((function(){r({type:y.DEACTIVATE_CONNECTOR})}),[]),E=Object(n.useCallback)((function(e){try{if(!i)throw Error("This should never happen, it's just so Typescript stops complaining");var t=h.current;return Promise.resolve(function(){if(l)return m((function(){return Promise.resolve(w(i,e)).then((function(e){if(h.current>t)throw new k;r({type:y.UPDATE_FROM_ERROR,payload:e})}))}),(function(e){e instanceof k||(f?f(e):r({type:y.ERROR,payload:{error:e}}))}));var n=void 0===e.chainId?void 0:g(e.chainId);if(void 0!==n&&i.supportedChainIds&&!i.supportedChainIds.includes(n)){var o=new x(n,i.supportedChainIds);f?f(o):r({type:y.ERROR,payload:{error:o}})}else{var a="string"===typeof e.account?b(e.account):e.account;r({type:y.UPDATE,payload:{provider:e.provider,chainId:n,account:a}})}}())}catch(n){return Promise.reject(n)}}),[i,l,f]),A=Object(n.useCallback)((function(e){f?f(e):r({type:y.ERROR,payload:{error:e}})}),[f]),S=Object(n.useCallback)((function(){r({type:y.DEACTIVATE_CONNECTOR})}),[]);return Object(n.useEffect)((function(){return function(){i&&i.deactivate()}}),[i]),Object(n.useEffect)((function(){return i&&i.on(a.a.Update,E).on(a.a.Error,A).on(a.a.Deactivate,S),function(){i&&i.off(a.a.Update,E).off(a.a.Error,A).off(a.a.Deactivate,S)}}),[i,E,A,S]),{connector:i,provider:o,chainId:s,account:u,activate:d,setError:p,deactivate:v,error:l}}(),u=s.connector,f=s.provider,l=s.chainId,h=s.account,d=s.activate,p=s.setError,v=s.deactivate,E=s.error,A=void 0!==u&&void 0!==l&&void 0!==h&&!E,S=Object(n.useMemo)((function(){return A&&void 0!==l&&Number.isInteger(l)&&u?r(f,u):void 0}),[A,r,f,u,l]),O={connector:u,library:S,chainId:l,account:h,activate:d,setError:p,deactivate:v,active:A,error:E};return i.a.createElement(t,{value:O},o)}}var S=A("primary");function O(e){return Object(n.useContext)(function(e){return void 0===e&&(e="primary"),Object.keys(E).includes(e)||Object(o.a)(!1),E[e]}(e))}},function(e,t,r){"use strict";(function(e){var n=r(554),i=r(555),o=r(556);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return U(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"===typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128===(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return k(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(e,t,r,n,o){return o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,o){return o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((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),t0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||T(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||T(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||T(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||T(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||T(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||T(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||T(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||T(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||T(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||C(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);C(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);C(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function H(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(58))},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){"use strict";r.r(t),r.d(t,"getAddress",(function(){return v})),r.d(t,"isAddress",(function(){return m})),r.d(t,"getIcapAddress",(function(){return g})),r.d(t,"getContractAddress",(function(){return b})),r.d(t,"getCreate2Address",(function(){return y}));var n=r(8),i=r(48),o=r(46),a=r(89),s=new(r(13).Logger)("address/5.3.0");function u(e){Object(n.isHexString)(e,20)||s.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),i=0;i<40;i++)r[i]=t[i].charCodeAt(0);for(var a=Object(n.arrayify)(Object(o.keccak256)(r)),u=0;u<40;u+=2)a[u>>1]>>4>=8&&(t[u]=t[u].toUpperCase()),(15&a[u>>1])>=8&&(t[u+1]=t[u+1].toUpperCase());return"0x"+t.join("")}for(var c={},f=0;f<10;f++)c[String(f)]=String(f);for(var l=0;l<26;l++)c[String.fromCharCode(65+l)]=String(10+l);var h,d=Math.floor((h=9007199254740991,Math.log10?Math.log10(h):Math.log(h)/Math.LN10));function p(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return c[e]})).join("");t.length>=d;){var r=t.substring(0,d);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function v(e){var t=null;if("string"!==typeof e&&s.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=u(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&s.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==p(e)&&s.throwArgumentError("bad icap checksum","address",e),t=Object(i.c)(e.substring(4));t.length<40;)t="0"+t;t=u("0x"+t)}else s.throwArgumentError("invalid address","address",e);return t}function m(e){try{return v(e),!0}catch(t){}return!1}function g(e){for(var t=Object(i.b)(v(e).substring(2)).toUpperCase();t.length<30;)t="0"+t;return"XE"+p("XE00"+t)+t}function b(e){var t=null;try{t=v(e.from)}catch(u){s.throwArgumentError("missing from address","transaction",e)}var r=Object(n.stripZeros)(Object(n.arrayify)(i.a.from(e.nonce).toHexString()));return v(Object(n.hexDataSlice)(Object(o.keccak256)(Object(a.encode)([t,r])),12))}function y(e,t,r){return 32!==Object(n.hexDataLength)(t)&&s.throwArgumentError("salt must be 32 bytes","salt",t),32!==Object(n.hexDataLength)(r)&&s.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),v(Object(n.hexDataSlice)(Object(o.keccak256)(Object(n.concat)(["0xff",v(e),t,r])),12))}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(278);function i(e,t){for(var r=0;rthis.wordSize&&f.throwError("value out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(o.concat)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}(),p=function(){function e(t,r,i,a){Object(n.a)(this,e),Object(s.defineReadOnly)(this,"_data",Object(o.arrayify)(t)),Object(s.defineReadOnly)(this,"wordSize",r||32),Object(s.defineReadOnly)(this,"_coerceFunc",i),Object(s.defineReadOnly)(this,"allowLoose",a),this._offset=0}return Object(i.a)(e,[{key:"data",get:function(){return Object(o.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:f.throwError("data out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return a.a.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}()},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";r.d(t,"d",(function(){return l})),r.d(t,"a",(function(){return h})),r.d(t,"c",(function(){return d})),r.d(t,"b",(function(){return p}));var n=r(6),i=r(7),o=r(4),a=r(41),s=r(9),u=r(10),c=r(104),f=new u.a(c.a);function l(e){var t=[];return function e(r,n){if(Array.isArray(n))for(var i in n){var o=r.slice();o.push(i);try{e(o,n[i])}catch(a){t.push({path:o,error:a})}}}([],e),t}var h=function(){function e(t,r,i,o){Object(n.a)(this,e),this.name=t,this.type=r,this.localName=i,this.dynamic=o}return Object(i.a)(e,[{key:"_throwError",value:function(e,t){f.throwArgumentError(e,this.localName,t)}}]),e}(),d=function(){function e(t){Object(n.a)(this,e),Object(s.d)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return Object(i.a)(e,[{key:"data",get:function(){return Object(o.c)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData(Object(o.b)(e._data))}},{key:"writeBytes",value:function(e){var t=Object(o.a)(e),r=t.length%this.wordSize;return r&&(t=Object(o.b)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=Object(o.a)(a.a.from(e));return t.length>this.wordSize&&f.throwError("value out-of-bounds",u.a.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(o.b)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}(),p=function(){function e(t,r,i,a){Object(n.a)(this,e),Object(s.d)(this,"_data",Object(o.a)(t)),Object(s.d)(this,"wordSize",r||32),Object(s.d)(this,"_coerceFunc",i),Object(s.d)(this,"allowLoose",a),this._offset=0}return Object(i.a)(e,[{key:"data",get:function(){return Object(o.h)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:f.throwError("data out-of-bounds",u.a.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return a.a.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Flex=t.Box=void 0;u(r(1));var n=u(r(900)),i=r(77),o=function(e){if(e&&e.__esModule)return e;var t=s();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}}r.default=e,t&&t.set(e,r);return r}(r(243)),a=u(r(244));function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}var c=(0,n.default)("div",{shouldForwardProp:a.default})({boxSizing:"border-box",margin:0,minWidth:0},(function(e){return(0,o.default)(e.__css)(e.theme)}),(function(e){var t=e.theme,r=e.variant,n=e.tx,i=void 0===n?"variants":n;return(0,o.default)((0,o.get)(t,i+"."+r,(0,o.get)(t,r)))(t)}),(function(e){return(0,o.default)(e.sx)(e.theme)}),(function(e){return e.css}),(0,i.compose)(i.space,i.layout,i.typography,i.color,i.flexbox));t.Box=c;var f=(0,n.default)(c)({display:"flex"});t.Flex=f},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=256)throw new Error("Depth too large!");return k(Object(a.b)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",Object(a.h)(this.depth),this.parentFingerprint,Object(a.g)(Object(a.h)(this.index),4),this.chainCode,null!=this.privateKey?Object(a.b)(["0x00",this.privateKey]):this.publicKey]))}},{key:"neuter",value:function(){return new e(_,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}},{key:"_derive",value:function(t){if(t>4294967295)throw new Error("invalid index - "+String(t));var r=this.path;r&&(r+="/"+(2147483647&t));var n=new Uint8Array(37);if(2147483648&t){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(Object(a.a)(this.privateKey),1),r&&(r+="'")}else n.set(Object(a.a)(this.publicKey));for(var i=24;i>=0;i-=8)n[33+(i>>3)]=t>>24-i&255;var o=Object(a.a)(Object(h.a)(d.a.sha512,this.chainCode,n)),u=o.slice(0,32),c=o.slice(32),f=null,p=null;this.privateKey?f=w(s.a.from(u).add(this.privateKey).mod(g)):p=new l.a(Object(a.h)(u))._addPoint(this.publicKey);var v=r,m=this.mnemonic;return m&&(v=Object.freeze({phrase:m.phrase,path:r,locale:m.locale||"en"})),new e(_,f,p,this.fingerprint,w(c),t,this.depth+1,v)}},{key:"derivePath",value:function(e){var t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();for(var r=this,n=0;n=2147483648)throw new Error("invalid path index - "+i);r=r._derive(2147483648+o)}else{if(!i.match(/^[0-9]+$/))throw new Error("invalid path component - "+i);var a=parseInt(i);if(a>=2147483648)throw new Error("invalid path index - "+i);r=r._derive(a)}}return r}}],[{key:"_fromSeed",value:function(t,r){var n=Object(a.a)(t);if(n.length<16||n.length>64)throw new Error("invalid seed");var i=Object(a.a)(Object(h.a)(d.a.sha512,b,n));return new e(_,w(i.slice(0,32)),null,"0x00000000",w(i.slice(32)),0,0,r)}},{key:"fromMnemonic",value:function(t,r,n){return t=M(O(t,n=x(n)),n),e._fromSeed(S(t,r),{phrase:t,path:"m",locale:n.locale})}},{key:"fromSeed",value:function(t){return e._fromSeed(t,null)}},{key:"fromExtendedKey",value:function(t){var r=o.a.decode(t);82===r.length&&k(r.slice(0,78))===t||m.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var n=r[4],i=Object(a.h)(r.slice(5,9)),s=parseInt(Object(a.h)(r.slice(9,13)).substring(2),16),u=Object(a.h)(r.slice(13,45)),c=r.slice(45,78);switch(Object(a.h)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new e(_,null,Object(a.h)(c),i,u,s,n,null);case"0x0488ade4":case"0x04358394 ":if(0!==c[0])break;return new e(_,Object(a.h)(c.slice(1)),null,i,u,s,n,null)}return m.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}]),e}();function S(e,t){t||(t="");var r=Object(u.b)("mnemonic"+t,u.a.NFKD);return Object(c.a)(Object(u.b)(e,u.a.NFKD),r,2048,64,"sha512")}function O(e,t){t=x(t),m.checkNormalize();var r=t.split(e);if(r.length%3!==0)throw new Error("invalid mnemonic");for(var n=Object(a.a)(new Uint8Array(Math.ceil(11*r.length/8))),i=0,o=0;o>3]|=1<<7-i%8),i++}var c=32*r.length/3,f=y(r.length/3);if((Object(a.a)(Object(h.c)(n.slice(0,c/8)))[0]&f)!==(n[n.length-1]&f))throw new Error("invalid checksum");return Object(a.h)(n.slice(0,c/8))}function M(e,t){if(t=x(t),(e=Object(a.a)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");for(var r=[0],n=11,i=0;i8?(r[r.length-1]<<=8,r[r.length-1]|=e[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[i]>>8-n,r.push(e[i]&(1<<8-n)-1),n+=3);var o=e.length/4,s=Object(a.a)(Object(h.c)(e))[0]&y(o);return r[r.length-1]<<=o,r[r.length-1]|=s>>8-o,t.join(r.map((function(e){return t.getWord(e)})))}function P(e,t){try{return O(e,t),!0}catch(r){}return!1}function j(e){return("number"!==typeof e||e<0||e>=2147483648||e%1)&&m.throwArgumentError("invalid account index","index",e),"m/44'/60'/".concat(e,"'/0/0")}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return u})),r.d(t,"f",(function(){return f})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return d})),r.d(t,"h",(function(){return p})),r.d(t,"g",(function(){return v}));var n,i,o=r(8),a=new(r(13).Logger)("strings/5.3.0");function s(e,t,r,n,o){if(e===i.BAD_PREFIX||e===i.UNEXPECTED_CONTINUE){for(var a=0,s=t+1;s>6===2;s++)a++;return a}return e===i.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n||(n={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(i||(i={}));var u=Object.freeze({error:function(e,t,r,n,i){return a.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:s,replace:function(e,t,r,n,o){return e===i.OVERLONG?(n.push(o),0):(n.push(65533),s(e,t,r))}});function c(e,t){null==t&&(t=u.error),e=Object(o.arrayify)(e);for(var r=[],n=0;n>7!==0){var s=null,c=null;if(192===(224&a))s=1,c=127;else if(224===(240&a))s=2,c=2047;else{if(240!==(248&a)){n+=t(128===(192&a)?i.UNEXPECTED_CONTINUE:i.BAD_PREFIX,n-1,e,r);continue}s=3,c=65535}if(n-1+s>=e.length)n+=t(i.OVERRUN,n-1,e,r);else{for(var f=a&(1<<8-s-1)-1,l=0;l1114111?n+=t(i.OUT_OF_RANGE,n-1-s,e,r,f):f>=55296&&f<=57343?n+=t(i.UTF16_SURROGATE,n-1-s,e,r,f):f<=c?n+=t(i.OVERLONG,n-1-s,e,r,f):r.push(f))}}else r.push(a)}return r}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;t!=n.current&&(a.checkNormalize(),e=e.normalize(t));for(var r=[],i=0;i>6|192),r.push(63&s|128);else if(55296==(64512&s)){i++;var u=e.charCodeAt(i);if(i>=e.length||56320!==(64512&u))throw new Error("invalid utf-8 string");var c=65536+((1023&s)<<10)+(1023&u);r.push(c>>18|240),r.push(c>>12&63|128),r.push(c>>6&63|128),r.push(63&c|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(63&s|128)}return Object(o.arrayify)(r)}function l(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function h(e,t){return'"'+c(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?l(e):l(55296+((e-=65536)>>10&1023))+l(56320+(1023&e))})).join("")+'"'}function d(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}function p(e,t){return d(c(e,t))}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;return c(f(e,t))}},function(e,t,r){"use strict";var n=r(264),i="object"==typeof self&&self&&self.Object===Object&&self,o=n.a||i||Function("return this")();t.a=o},function(e,t,r){"use strict";r.d(t,"d",(function(){return g})),r.d(t,"g",(function(){return y})),r.d(t,"e",(function(){return k})),r.d(t,"c",(function(){return x})),r.d(t,"a",(function(){return S})),r.d(t,"f",(function(){return O})),r.d(t,"b",(function(){return P}));var n=r(14),i=r(15),o=r(6),a=r(7),s=r(48),u=r(12),c=r(13),f=r(107),l=new c.Logger(f.a),h={},d={calldata:!0,memory:!0,storage:!0},p={calldata:!0,memory:!0};function v(e,t){if("bytes"===e||"string"===e){if(d[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&p[t])return!0;return(d[t]||"payable"===t)&&l.throwArgumentError("invalid modifier","name",t),!1}function m(e,t){for(var r in t)Object(u.defineReadOnly)(e,r,t[r])}var g=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),b=new RegExp(/^(.*)\[([0-9]*)\]$/),y=function(){function e(t,r){Object(o.a)(this,e),t!==h&&l.throwError("use fromString",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),m(this,r);var n=this.type.match(b);m(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return Object(a.a)(e,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||l.throwArgumentError("invalid format type","format",e),e===g.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==g.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===g.full?", ":",")+")"):r+=this.type,e!==g.sighash&&(!0===this.indexed&&(r+=" indexed"),e===g.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"===typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(h,{name:t.name||null,type:j(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return function(t){return e.fromObject({name:t.name,type:t.type,indexed:t.indexed,components:t.components})}(function(e,t){var r=e;function n(t){l.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var o={type:"",name:"",state:{allowType:!0}},a=o,s=0;s2&&l.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||l.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=s.a.from(r[1]),r[0]):e}function E(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function A(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&l.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&l.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||l.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&l.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&l.throwArgumentError("unable to determine stateMutability","value",e),t}var S=function(e){Object(n.a)(r,e);var t=Object(i.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(a.a)(r,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||l.throwArgumentError("invalid format type","format",e),e===g.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===g.sighash&&l.throwError("cannot format a constructor for sighash",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===g.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&l.throwArgumentError("invalid constructor object","value",e);var t=A(e);t.constant&&l.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(y.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?s.a.from(e.gas):null};return new r(h,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=_(e,t)).match(R);return n&&"constructor"===n[1].trim()||l.throwArgumentError("invalid constructor string","value",e),t.inputs=w(n[2].trim(),!1),E(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(k),O=function(e){Object(n.a)(r,e);var t=Object(i.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(a.a)(r,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||l.throwArgumentError("invalid format type","format",e),e===g.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==g.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===g.full?", ":",")+") ",e!==g.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&l.throwArgumentError("invalid function object","value",e);var t=A(e),n={type:e.type,name:C(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(y.fromObject):[],outputs:e.outputs?e.outputs.map(y.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?s.a.from(e.gas):null};return new r(h,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=_(e,t)).split(" returns ");n.length>2&&l.throwArgumentError("invalid function string","value",e);var i=n[0].match(R);if(i||l.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&C(t.name),t.inputs=w(i[2],!1),E(i[3].trim(),t),n.length>1){var o=n[1].match(R);""==o[1].trim()&&""==o[3].trim()||l.throwArgumentError("unexpected tokens","value",e),t.outputs=w(o[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(S);function M(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||l.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}var P=function(e){Object(n.a)(r,e);var t=Object(i.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(a.a)(r,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||l.throwArgumentError("invalid format type","format",e),e===g.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==g.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===g.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&l.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:C(e.name),inputs:e.inputs?e.inputs.map(y.fromObject):[]};return M(new r(h,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(R);return n||l.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&C(t.name),t.inputs=w(n[2],!1),M(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(k);function j(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var T=new RegExp("^[A-Za-z_][A-Za-z0-9_]*$");function C(e){return e&&e.match(T)||l.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var R=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(132);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object(n.a)(e,t)}},function(e,t,r){"use strict";r.d(t,"b",(function(){return b})),r.d(t,"d",(function(){return y})),r.d(t,"a",(function(){return x})),r.d(t,"e",(function(){return S})),r.d(t,"c",(function(){return M}));var n,i=r(38),o=r(41),a=r(4),s=r(911),u=r(39),c=r(9),f=r(99),l=r(111),h=r(10),d=new h.a("transactions/5.7.0");function p(e){return"0x"===e?null:Object(i.a)(e)}function v(e){return"0x"===e?s.d:o.a.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(n||(n={}));var m=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],g={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function b(e){var t=Object(l.b)(e);return Object(i.a)(Object(a.e)(Object(u.a)(Object(a.e)(t,1)),12))}function y(e,t){return b(Object(l.c)(Object(a.a)(e),t))}function w(e,t){var r=Object(a.n)(o.a.from(e).toHexString());return r.length>32&&d.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function k(e,t){return{address:Object(i.a)(e),storageKeys:(t||[]).map((function(t,r){return 32!==Object(a.d)(t)&&d.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function x(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&d.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),k(e[0],e[1])):k(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return k(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function _(e){return x(e).map((function(e){return[e.address,e.storageKeys]}))}function E(e,t){if(null!=e.gasPrice){var r=o.a.from(e.gasPrice),n=o.a.from(e.maxFeePerGas||0);r.eq(n)||d.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var s=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLimit||0,"gasLimit"),null!=e.to?Object(i.a)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){var u=Object(a.m)(t);s.push(w(u.recoveryParam,"recoveryParam")),s.push(Object(a.n)(u.r)),s.push(Object(a.n)(u.s))}return Object(a.c)(["0x02",f.b(s)])}function A(e,t){var r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit||0,"gasLimit"),null!=e.to?Object(i.a)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){var n=Object(a.m)(t);r.push(w(n.recoveryParam,"recoveryParam")),r.push(Object(a.n)(n.r)),r.push(Object(a.n)(n.s))}return Object(a.c)(["0x01",f.b(r)])}function S(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&d.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){Object(c.b)(e,g);var r=[];m.forEach((function(t){var n=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),n=Object(a.a)(Object(a.h)(n,i)),t.length&&n.length!==t.length&&n.length>0&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=Object(a.n)(n)).length>t.maxLength&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push(Object(a.h)(n))}));var n=0;if(null!=e.chainId?"number"!==typeof(n=e.chainId)&&d.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!Object(a.j)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push(Object(a.h)(n)),r.push("0x"),r.push("0x")),!t)return f.b(r);var i=Object(a.m)(t),o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push(Object(a.h)(o)),r.push(Object(a.n)(Object(a.a)(i.r))),r.push(Object(a.n)(Object(a.a)(i.s))),f.b(r)}(e,t);switch(e.type){case 1:return A(e,t);case 2:return E(e,t)}return d.throwError("unsupported transaction type: ".concat(e.type),h.a.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function O(e,t,r){try{var n=v(t[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");e.v=n}catch(o){d.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=Object(a.g)(t[1],32),e.s=Object(a.g)(t[2],32);try{var i=Object(u.a)(r(e));e.from=y(i,{r:e.r,s:e.s,recoveryParam:e.v})}catch(o){}}function M(e){var t=Object(a.a)(e);if(t[0]>127)return function(e){var t=f.a(e);9!==t.length&&6!==t.length&&d.throwArgumentError("invalid raw transaction","rawTransaction",e);var r={nonce:v(t[0]).toNumber(),gasPrice:v(t[1]),gasLimit:v(t[2]),to:p(t[3]),value:v(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=o.a.from(t[6]).toNumber()}catch(c){return r}if(r.r=Object(a.g)(t[7],32),r.s=Object(a.g)(t[8],32),o.a.from(r.r).isZero()&&o.a.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,i=t.slice(0,6);0!==r.chainId&&(i.push(Object(a.h)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);var s=Object(u.a)(f.b(i));try{r.from=y(s,{r:Object(a.h)(r.r),s:Object(a.h)(r.s),recoveryParam:n})}catch(c){}r.hash=Object(u.a)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){var t=f.a(e.slice(1));8!==t.length&&11!==t.length&&d.throwArgumentError("invalid component count for transaction type: 1","payload",Object(a.h)(e));var r={type:1,chainId:v(t[0]).toNumber(),nonce:v(t[1]).toNumber(),gasPrice:v(t[2]),gasLimit:v(t[3]),to:p(t[4]),value:v(t[5]),data:t[6],accessList:x(t[7])};return 8===t.length||(r.hash=Object(u.a)(e),O(r,t.slice(8),A)),r}(t);case 2:return function(e){var t=f.a(e.slice(1));9!==t.length&&12!==t.length&&d.throwArgumentError("invalid component count for transaction type: 2","payload",Object(a.h)(e));var r=v(t[2]),n=v(t[3]),i={type:2,chainId:v(t[0]).toNumber(),nonce:v(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:v(t[4]),to:p(t[5]),value:v(t[6]),data:t[7],accessList:x(t[8])};return 9===t.length||(i.hash=Object(u.a)(e),O(i,t.slice(9),E)),i}(t)}return d.throwError("unsupported transaction type: ".concat(t[0]),h.a.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return O})),r.d(t,"b",(function(){return T})),r.d(t,"c",(function(){return x})),r.d(t,"d",(function(){return B})),r.d(t,"e",(function(){return k})),r.d(t,"f",(function(){return j})),r.d(t,"g",(function(){return D}));var n=r(67),i=r(1),o=r.n(i),a=r(19),s=r(262),u=r(263),c=r(26);function f(e){var t=e.pathname,r=e.search,n=e.hash,i=t||"/";return r&&"?"!==r&&(i+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(i+="#"===n.charAt(0)?n:"#"+n),i}function l(e,t,r,n){var i;"string"===typeof e?(i=function(e){var t=e||"/",r="",n="",i=t.indexOf("#");-1!==i&&(n=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(r=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===r?"":r,hash:"#"===n?"":n}}(e)).state=t:(void 0===(i=Object(a.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(o){throw o instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):o}return r&&(i.key=r),n?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=Object(s.a)(i.pathname,n.pathname)):i.pathname=n.pathname:i.pathname||(i.pathname="/"),i}function h(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,r,n,i){if(null!=e){var o="function"===typeof e?e(t,r):e;"string"===typeof o?"function"===typeof n?n(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var r=!0;function n(){r&&e.apply(void 0,arguments)}return t.push(n),function(){r=!1,t=t.filter((function(e){return e!==n}))}},notifyListeners:function(){for(var e=arguments.length,r=new Array(e),n=0;nt?r.splice(t,r.length-t,n):r.push(n),v({action:"PUSH",location:n,index:t,entries:r})}}))},replace:function(e,t){var n=l(e,t,m(),k.location);p.confirmTransitionTo(n,"REPLACE",r,(function(e){e&&(k.entries[k.index]=n,v({action:"REPLACE",location:n}))}))},go:w,goBack:function(){w(-1)},goForward:function(){w(1)},canGo:function(e){var t=k.index+e;return t>=0&&t1)for(var r=1;r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}var c=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};function f(e,t){return c(this,void 0,void 0,u().mark((function r(){var n,o,a,s;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==t&&(t={}),n={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0,mode:"cors",cache:"no-cache",credentials:"same-origin",redirect:"follow",referrer:"client"},r.next=4,fetch(e,n);case 4:return o=r.sent,r.next=7,o.arrayBuffer();case 7:return a=r.sent,s={},o.headers.forEach?o.headers.forEach((function(e,t){s[t.toLowerCase()]=e})):o.headers.keys().forEach((function(e){s[e.toLowerCase()]=o.headers.get(e)})),r.abrupt("return",{headers:s,statusCode:o.status,statusMessage:o.statusText,body:Object(i.arrayify)(new Uint8Array(a))});case 11:case"end":return r.stop()}}),r)})))}function l(){l=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(P){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),s=new S(i||[]);return n(a,"_invoke",{value:x(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=c;var h={};function d(){}function p(){}function v(){}var m={};u(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(O([])));b&&b!==t&&r.call(b,o)&&(m=b);var y=v.prototype=d.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},d=new s.Logger("web/5.3.0");function p(e){return new Promise((function(t){setTimeout(t,e)}))}function v(e,t){if(null==e)return null;if("string"===typeof e)return e;if(Object(i.isBytesLike)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return Object(a.h)(e)}catch(r){}return Object(i.hexlify)(e)}return e}function m(e,t,r){var i="object"===typeof e&&null!=e.throttleLimit?e.throttleLimit:12;d.assertArgument(i>0&&i%1===0,"invalid connection throttle limit","connection.throttleLimit",i);var o="object"===typeof e?e.throttleCallback:null,u="object"===typeof e&&"number"===typeof e.throttleSlotInterval?e.throttleSlotInterval:100;d.assertArgument(u>0&&u%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",u);var c={},m=null,g={method:"GET"},b=!1,y=12e4;if("string"===typeof e)m=e;else if("object"===typeof e){if(null!=e&&null!=e.url||d.throwArgumentError("missing URL","connection.url",e),m=e.url,"number"===typeof e.timeout&&e.timeout>0&&(y=e.timeout),e.headers)for(var w in e.headers)c[w.toLowerCase()]={key:w,value:String(e.headers[w])},["if-none-match","if-modified-since"].indexOf(w.toLowerCase())>=0&&(b=!0);if(g.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==m.substring(0,6)&&!0!==e.allowInsecureAuthentication&&d.throwError("basic authentication requires a secure https url",s.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:m,user:e.user,password:"[REDACTED]"});var k=e.user+":"+e.password;c.authorization={key:"Authorization",value:"Basic "+Object(n.b)(Object(a.f)(k))}}}t&&(g.method="POST",g.body=t,null==c["content-type"]&&(c["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==c["content-length"]&&(c["content-length"]={key:"Content-Length",value:String(t.length)}));var x={};Object.keys(c).forEach((function(e){var t=c[e];x[t.key]=t.value})),g.headers=x;var _=function(){var e=null;return{promise:new Promise((function(t,r){y&&(e=setTimeout((function(){null!=e&&(e=null,r(d.makeError("timeout",s.Logger.errors.TIMEOUT,{requestBody:v(g.body,x["content-type"]),requestMethod:g.method,timeout:y,url:m})))}),y))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),E=function(){return h(this,void 0,void 0,l().mark((function e(){var t,n,a,c,h,y,w,k,E;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t=300)&&(_.cancel(),d.throwError("bad response",s.Logger.errors.SERVER_ERROR,{status:n.statusCode,headers:n.headers,body:v(y,n.headers?n.headers["content-type"]:null),requestBody:v(g.body,x["content-type"]),requestMethod:g.method,url:m})),!r){e.next=52;break}return e.prev=29,e.next=32,r(y,n);case 32:return w=e.sent,_.cancel(),e.abrupt("return",w);case 37:if(e.prev=37,e.t1=e.catch(29),!(e.t1.throttleRetry&&ts)return void(a()&&n(new Error("retry limit reached")));var c=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));ct.ceiling&&(c=t.ceiling),setTimeout(i,c)}return null}),(function(e){a()&&n(e)}))}()}))}},,function(e,t,r){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=r(527)},function(e,t,r){"use strict";r.r(t),r.d(t,"get",(function(){return c})),r.d(t,"createParser",(function(){return f})),r.d(t,"createStyleFunction",(function(){return d})),r.d(t,"compose",(function(){return v})),r.d(t,"system",(function(){return p})),r.d(t,"margin",(function(){return z})),r.d(t,"padding",(function(){return H})),r.d(t,"space",(function(){return q})),r.d(t,"color",(function(){return y})),r.d(t,"layout",(function(){return m})),r.d(t,"typography",(function(){return k})),r.d(t,"flexbox",(function(){return _})),r.d(t,"border",(function(){return P})),r.d(t,"background",(function(){return C})),r.d(t,"position",(function(){return N})),r.d(t,"grid",(function(){return S})),r.d(t,"shadow",(function(){return G})),r.d(t,"boxShadow",(function(){return J})),r.d(t,"textShadow",(function(){return J})),r.d(t,"variant",(function(){return K})),r.d(t,"buttonStyle",(function(){return X})),r.d(t,"textStyle",(function(){return W})),r.d(t,"colorStyle",(function(){return Z})),r.d(t,"borders",(function(){return j})),r.d(t,"width",(function(){return Y})),r.d(t,"height",(function(){return Q})),r.d(t,"minWidth",(function(){return $})),r.d(t,"minHeight",(function(){return ee})),r.d(t,"maxWidth",(function(){return te})),r.d(t,"maxHeight",(function(){return re})),r.d(t,"size",(function(){return ne})),r.d(t,"verticalAlign",(function(){return ie})),r.d(t,"display",(function(){return oe})),r.d(t,"overflow",(function(){return ae})),r.d(t,"overflowX",(function(){return se})),r.d(t,"overflowY",(function(){return ue})),r.d(t,"opacity",(function(){return ce})),r.d(t,"fontSize",(function(){return fe})),r.d(t,"fontFamily",(function(){return le})),r.d(t,"fontWeight",(function(){return he})),r.d(t,"lineHeight",(function(){return de})),r.d(t,"textAlign",(function(){return pe})),r.d(t,"fontStyle",(function(){return ve})),r.d(t,"letterSpacing",(function(){return me})),r.d(t,"alignItems",(function(){return ge})),r.d(t,"alignContent",(function(){return be})),r.d(t,"justifyItems",(function(){return ye})),r.d(t,"justifyContent",(function(){return we})),r.d(t,"flexWrap",(function(){return ke})),r.d(t,"flexDirection",(function(){return xe})),r.d(t,"flex",(function(){return _e})),r.d(t,"flexGrow",(function(){return Ee})),r.d(t,"flexShrink",(function(){return Ae})),r.d(t,"flexBasis",(function(){return Se})),r.d(t,"justifySelf",(function(){return Oe})),r.d(t,"alignSelf",(function(){return Me})),r.d(t,"order",(function(){return Pe})),r.d(t,"gridGap",(function(){return je})),r.d(t,"gridColumnGap",(function(){return Te})),r.d(t,"gridRowGap",(function(){return Ce})),r.d(t,"gridColumn",(function(){return Re})),r.d(t,"gridRow",(function(){return Le})),r.d(t,"gridAutoFlow",(function(){return Ne})),r.d(t,"gridAutoColumns",(function(){return Ie})),r.d(t,"gridAutoRows",(function(){return Be})),r.d(t,"gridTemplateColumns",(function(){return Fe})),r.d(t,"gridTemplateRows",(function(){return De})),r.d(t,"gridTemplateAreas",(function(){return Ue})),r.d(t,"gridArea",(function(){return ze})),r.d(t,"borderWidth",(function(){return He})),r.d(t,"borderStyle",(function(){return qe})),r.d(t,"borderColor",(function(){return Ge})),r.d(t,"borderTop",(function(){return Je})),r.d(t,"borderRight",(function(){return Ve})),r.d(t,"borderBottom",(function(){return Ke})),r.d(t,"borderLeft",(function(){return Xe})),r.d(t,"borderRadius",(function(){return We})),r.d(t,"backgroundImage",(function(){return Ze})),r.d(t,"backgroundSize",(function(){return Ye})),r.d(t,"backgroundPosition",(function(){return Qe})),r.d(t,"backgroundRepeat",(function(){return $e})),r.d(t,"zIndex",(function(){return et})),r.d(t,"top",(function(){return tt})),r.d(t,"right",(function(){return rt})),r.d(t,"bottom",(function(){return nt})),r.d(t,"left",(function(){return it})),r.d(t,"style",(function(){return ot}));var n=r(82),i=r.n(n),o=function(e,t){var r=i()({},e,t);for(var n in e){var o;e[n]&&"object"===typeof t[n]&&i()(r,((o={})[n]=i()(e[n],t[n]),o))}return r},a={breakpoints:[40,52,64].map((function(e){return e+"em"}))},s=function(e){return"@media screen and (min-width: "+e+")"},u=function(e,t){return c(t,e,e)},c=function(e,t,r,n,i){for(t=t&&t.split?t.split("."):[t],n=0;n1&&u.forEach((function(r){var i;n[r]=e(((i={})[r]=t[r],i))})),n},l=function(e,t,r,n,o){var a={};return n.slice(0,e.length).forEach((function(n,s){var u,c=e[s],f=t(n,r,o);c?i()(a,((u={})[c]=i()({},a[c],f),u)):i()(a,f)})),a},h=function(e,t,r,n,o){var a={};for(var u in n){var c=e[u],f=t(n[u],r,o);if(c){var l,h=s(c);i()(a,((l={})[h]=i()({},a[h],f),l))}else i()(a,f)}return a},d=function(e){var t=e.properties,r=e.property,n=e.scale,i=e.transform,o=void 0===i?u:i,a=e.defaultScale;t=t||[r];var s=function(e,r,n){var i={},a=o(e,r,n);if(null!==a)return t.forEach((function(e){i[e]=a})),i};return s.scale=n,s.defaults=a,s},p=function(e){void 0===e&&(e={});var t={};return Object.keys(e).forEach((function(r){var n=e[r];t[r]=!0!==n?"function"!==typeof n?d(n):n:d({property:r,scale:r})})),f(t)},v=function(){for(var e={},t=arguments.length,r=new Array(t),n=0;n1?e:100*e+"%")}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0}),g=m,b={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},opacity:!0};b.bg=b.backgroundColor;var y=p(b),w=y,k=p({fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes",defaultScale:[12,14,16,20,24,32,48,64,72]},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0}),x=k,_=p({alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0,flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0}),E=_,A={space:[0,4,8,16,32,64,128,256,512]},S=p({gridGap:{property:"gridGap",scale:"space",defaultScale:A.space},gridColumnGap:{property:"gridColumnGap",scale:"space",defaultScale:A.space},gridRowGap:{property:"gridRowGap",scale:"space",defaultScale:A.space},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0}),O=S,M={border:{property:"border",scale:"borders"},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders"},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders"},borderBottom:{property:"borderBottom",scale:"borders"},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders"},borderX:{properties:["borderLeft","borderRight"],scale:"borders"},borderY:{properties:["borderTop","borderBottom"],scale:"borders"},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"}};M.borderTopLeftRadius={property:"borderTopLeftRadius",scale:"radii"},M.borderTopRightRadius={property:"borderTopRightRadius",scale:"radii"},M.borderBottomWidth={property:"borderBottomWidth",scale:"borderWidths"},M.borderBottomColor={property:"borderBottomColor",scale:"colors"},M.borderBottomStyle={property:"borderBottomStyle",scale:"borderStyles"},M.borderBottomLeftRadius={property:"borderBottomLeftRadius",scale:"radii"},M.borderBottomRightRadius={property:"borderBottomRightRadius",scale:"radii"},M.borderLeftWidth={property:"borderLeftWidth",scale:"borderWidths"},M.borderLeftColor={property:"borderLeftColor",scale:"colors"},M.borderLeftStyle={property:"borderLeftStyle",scale:"borderStyles"},M.borderRightWidth={property:"borderRightWidth",scale:"borderWidths"},M.borderRightColor={property:"borderRightColor",scale:"colors"},M.borderRightStyle={property:"borderRightStyle",scale:"borderStyles"};var P=p(M),j=P,T={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};T.bgImage=T.backgroundImage,T.bgSize=T.backgroundSize,T.bgPosition=T.backgroundPosition,T.bgRepeat=T.backgroundRepeat;var C=p(T),R=C,L={space:[0,4,8,16,32,64,128,256,512]},N=p({position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",defaultScale:L.space},right:{property:"right",scale:"space",defaultScale:L.space},bottom:{property:"bottom",scale:"space",defaultScale:L.space},left:{property:"left",scale:"space",defaultScale:L.space}}),I=N,B={space:[0,4,8,16,32,64,128,256,512]},F=function(e){return"number"===typeof e&&!isNaN(e)},D=function(e,t){if(!F(e))return c(t,e,e);var r=e<0,n=Math.abs(e),i=c(t,n,n);return F(i)?i*(r?-1:1):r?"-"+i:i},U={};U.margin={margin:{property:"margin",scale:"space",transform:D,defaultScale:B.space},marginTop:{property:"marginTop",scale:"space",transform:D,defaultScale:B.space},marginRight:{property:"marginRight",scale:"space",transform:D,defaultScale:B.space},marginBottom:{property:"marginBottom",scale:"space",transform:D,defaultScale:B.space},marginLeft:{property:"marginLeft",scale:"space",transform:D,defaultScale:B.space},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:D,defaultScale:B.space},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:D,defaultScale:B.space}},U.margin.m=U.margin.margin,U.margin.mt=U.margin.marginTop,U.margin.mr=U.margin.marginRight,U.margin.mb=U.margin.marginBottom,U.margin.ml=U.margin.marginLeft,U.margin.mx=U.margin.marginX,U.margin.my=U.margin.marginY,U.padding={padding:{property:"padding",scale:"space",defaultScale:B.space},paddingTop:{property:"paddingTop",scale:"space",defaultScale:B.space},paddingRight:{property:"paddingRight",scale:"space",defaultScale:B.space},paddingBottom:{property:"paddingBottom",scale:"space",defaultScale:B.space},paddingLeft:{property:"paddingLeft",scale:"space",defaultScale:B.space},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",defaultScale:B.space},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",defaultScale:B.space}},U.padding.p=U.padding.padding,U.padding.pt=U.padding.paddingTop,U.padding.pr=U.padding.paddingRight,U.padding.pb=U.padding.paddingBottom,U.padding.pl=U.padding.paddingLeft,U.padding.px=U.padding.paddingX,U.padding.py=U.padding.paddingY;var z=p(U.margin),H=p(U.padding),q=v(z,H),G=p({boxShadow:{property:"boxShadow",scale:"shadows"},textShadow:{property:"textShadow",scale:"shadows"}}),J=G,V=r(243),K=function(e){var t,r,n=e.scale,i=e.prop,o=void 0===i?"variant":i,a=e.variants,s=void 0===a?{}:a,u=e.key;(r=Object.keys(s).length?function(e,t,r){return Object(V.default)(c(t,e,null))(r.theme)}:function(e,t){return c(t,e,null)}).scale=n||u,r.defaults=s;var l=((t={})[o]=r,t);return f(l)},X=K({key:"buttons"}),W=K({key:"textStyles",prop:"textStyle"}),Z=K({key:"colorStyles",prop:"colors"}),Y=g.width,Q=g.height,$=g.minWidth,ee=g.minHeight,te=g.maxWidth,re=g.maxHeight,ne=g.size,ie=g.verticalAlign,oe=g.display,ae=g.overflow,se=g.overflowX,ue=g.overflowY,ce=w.opacity,fe=x.fontSize,le=x.fontFamily,he=x.fontWeight,de=x.lineHeight,pe=x.textAlign,ve=x.fontStyle,me=x.letterSpacing,ge=E.alignItems,be=E.alignContent,ye=E.justifyItems,we=E.justifyContent,ke=E.flexWrap,xe=E.flexDirection,_e=E.flex,Ee=E.flexGrow,Ae=E.flexShrink,Se=E.flexBasis,Oe=E.justifySelf,Me=E.alignSelf,Pe=E.order,je=O.gridGap,Te=O.gridColumnGap,Ce=O.gridRowGap,Re=O.gridColumn,Le=O.gridRow,Ne=O.gridAutoFlow,Ie=O.gridAutoColumns,Be=O.gridAutoRows,Fe=O.gridTemplateColumns,De=O.gridTemplateRows,Ue=O.gridTemplateAreas,ze=O.gridArea,He=j.borderWidth,qe=j.borderStyle,Ge=j.borderColor,Je=j.borderTop,Ve=j.borderRight,Ke=j.borderBottom,Xe=j.borderLeft,We=j.borderRadius,Ze=R.backgroundImage,Ye=R.backgroundSize,Qe=R.backgroundPosition,$e=R.backgroundRepeat,et=I.zIndex,tt=I.top,rt=I.right,nt=I.bottom,it=I.left,ot=function(e){var t=e.prop,r=e.cssProperty,n=e.alias,i=e.key,o=e.transformValue,a=e.scale,s=e.properties,u={};return u[t]=d({properties:s,property:r||t,scale:i,defaultScale:a,transform:o}),n&&(u[n]=u[t]),f(u)}},function(e,t,r){"use strict";r.r(t),r.d(t,"computeAddress",(function(){return g})),r.d(t,"recoverAddress",(function(){return b})),r.d(t,"accessListify",(function(){return k})),r.d(t,"serialize",(function(){return _})),r.d(t,"parse",(function(){return E}));var n=r(53),i=r(48),o=r(8),a=r(117),s=r(46),u=r(12),c=r(89),f=r(129),l=r(13),h=new l.Logger("transactions/5.3.0");function d(e){return"0x"===e?null:Object(n.getAddress)(e)}function p(e){return"0x"===e?a.h:i.a.from(e)}var v=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],m={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0};function g(e){var t=Object(f.computePublicKey)(e);return Object(n.getAddress)(Object(o.hexDataSlice)(Object(s.keccak256)(Object(o.hexDataSlice)(t,1)),12))}function b(e,t){return g(Object(f.recoverPublicKey)(Object(o.arrayify)(e),t))}function y(e,t){var r=Object(o.stripZeros)(i.a.from(e).toHexString());return r.length>32&&h.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function w(e,t){return{address:Object(n.getAddress)(e),storageKeys:(t||[]).map((function(t,r){return 32!==Object(o.hexDataLength)(t)&&h.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function k(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&h.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),w(e[0],e[1])):w(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return w(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function x(e,t){var r,i=[y(e.chainId||0,"chainId"),y(e.nonce||0,"nonce"),y(e.gasPrice||0,"gasPrice"),y(e.gasLimit||0,"gasLimit"),null!=e.to?Object(n.getAddress)(e.to):"0x",y(e.value||0,"value"),e.data||"0x",(r=e.accessList||[],k(r).map((function(e){return[e.address,e.storageKeys]})))];if(t){var a=Object(o.splitSignature)(t);i.push(y(a.recoveryParam,"recoveryParam")),i.push(Object(o.stripZeros)(a.r)),i.push(Object(o.stripZeros)(a.s))}return Object(o.hexConcat)(["0x01",c.encode(i)])}function _(e,t){if(null==e.type)return null!=e.accessList&&h.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){Object(u.checkProperties)(e,m);var r=[];v.forEach((function(t){var n=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),n=Object(o.arrayify)(Object(o.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&h.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=Object(o.stripZeros)(n)).length>t.maxLength&&h.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push(Object(o.hexlify)(n))}));var n=0;if(null!=e.chainId?"number"!==typeof(n=e.chainId)&&h.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!Object(o.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push(Object(o.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return c.encode(r);var i=Object(o.splitSignature)(t),a=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),a+=2*n+8,i.v>28&&i.v!==a&&h.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==a&&h.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push(Object(o.hexlify)(a)),r.push(Object(o.stripZeros)(Object(o.arrayify)(i.r))),r.push(Object(o.stripZeros)(Object(o.arrayify)(i.s))),c.encode(r)}(e,t);switch(e.type){case 1:return x(e,t)}return h.throwError("unsupported transaction type: ".concat(e.type),l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function E(e){var t=Object(o.arrayify)(e);if(t[0]>127)return function(e){var t=c.decode(e);9!==t.length&&6!==t.length&&h.throwArgumentError("invalid raw transaction","rawTransaction",e);var r={nonce:p(t[0]).toNumber(),gasPrice:p(t[1]),gasLimit:p(t[2]),to:d(t[3]),value:p(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=i.a.from(t[6]).toNumber()}catch(f){return console.log(f),r}if(r.r=Object(o.hexZeroPad)(t[7],32),r.s=Object(o.hexZeroPad)(t[8],32),i.a.from(r.r).isZero()&&i.a.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,a=t.slice(0,6);0!==r.chainId&&(a.push(Object(o.hexlify)(r.chainId)),a.push("0x"),a.push("0x"),n-=2*r.chainId+8);var u=Object(s.keccak256)(c.encode(a));try{r.from=b(u,{r:Object(o.hexlify)(r.r),s:Object(o.hexlify)(r.s),recoveryParam:n})}catch(f){console.log(f)}r.hash=Object(s.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){var t=c.decode(e.slice(1));8!==t.length&&11!==t.length&&h.throwArgumentError("invalid component count for transaction type: 1","payload",Object(o.hexlify)(e));var r={type:1,chainId:p(t[0]).toNumber(),nonce:p(t[1]).toNumber(),gasPrice:p(t[2]),gasLimit:p(t[3]),to:d(t[4]),value:p(t[5]),data:t[6],accessList:k(t[7])};if(8===t.length)return r;try{var n=p(t[8]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");r.v=n}catch(a){h.throwArgumentError("invalid v for transaction type: 1","v",t[8])}r.r=Object(o.hexZeroPad)(t[9],32),r.s=Object(o.hexZeroPad)(t[10],32);try{var i=Object(s.keccak256)(x(r));r.from=b(i,{r:r.r,s:r.s,recoveryParam:r.v})}catch(a){console.log(a)}return r.hash=Object(s.keccak256)(e),r}(t)}return h.throwError("unsupported transaction type: ".concat(t[0]),l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"d",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"e",(function(){return s}));var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}var c=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};function f(e,t){return c(this,void 0,void 0,u().mark((function r(){var n,o,a,s,c;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==t&&(t={}),n={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0},!0!==t.skipFetchSetup&&(n.mode="cors",n.cache="no-cache",n.credentials="same-origin",n.redirect="follow",n.referrer="client"),null!=t.fetchOptions&&((o=t.fetchOptions).mode&&(n.mode=o.mode),o.cache&&(n.cache=o.cache),o.credentials&&(n.credentials=o.credentials),o.redirect&&(n.redirect=o.redirect),o.referrer&&(n.referrer=o.referrer)),r.next=7,fetch(e,n);case 7:return a=r.sent,r.next=10,a.arrayBuffer();case 10:return s=r.sent,c={},a.headers.forEach?a.headers.forEach((function(e,t){c[t.toLowerCase()]=e})):a.headers.keys().forEach((function(e){c[e.toLowerCase()]=a.headers.get(e)})),r.abrupt("return",{headers:c,statusCode:a.status,statusMessage:a.statusText,body:Object(i.a)(new Uint8Array(s))});case 14:case"end":return r.stop()}}),r)})))}function l(){l=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(P){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),s=new S(i||[]);return n(a,"_invoke",{value:x(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=c;var h={};function d(){}function p(){}function v(){}var m={};u(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(O([])));b&&b!==t&&r.call(b,o)&&(m=b);var y=v.prototype=d.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},d=new s.a("web/5.7.1");function p(e){return new Promise((function(t){setTimeout(t,e)}))}function v(e,t){if(null==e)return null;if("string"===typeof e)return e;if(Object(i.j)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return Object(a.d)(e)}catch(r){}return Object(i.h)(e)}return e}function m(e,t,r){var i=null;if(null!=t){i=Object(a.b)(t);var u="string"===typeof e?{url:e}:Object(o.g)(e);if(u.headers)0!==Object.keys(u.headers).filter((function(e){return"content-type"===e.toLowerCase()})).length||(u.headers=Object(o.g)(u.headers),u.headers["content-type"]="application/json");else u.headers={"content-type":"application/json"};e=u}return function(e,t,r){var i="object"===typeof e&&null!=e.throttleLimit?e.throttleLimit:12;d.assertArgument(i>0&&i%1===0,"invalid connection throttle limit","connection.throttleLimit",i);var u="object"===typeof e?e.throttleCallback:null,c="object"===typeof e&&"number"===typeof e.throttleSlotInterval?e.throttleSlotInterval:100;d.assertArgument(c>0&&c%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",c);var m="object"===typeof e&&!!e.errorPassThrough,g={},b=null,y={method:"GET"},w=!1,k=12e4;if("string"===typeof e)b=e;else if("object"===typeof e){if(null!=e&&null!=e.url||d.throwArgumentError("missing URL","connection.url",e),b=e.url,"number"===typeof e.timeout&&e.timeout>0&&(k=e.timeout),e.headers)for(var x in e.headers)g[x.toLowerCase()]={key:x,value:String(e.headers[x])},["if-none-match","if-modified-since"].indexOf(x.toLowerCase())>=0&&(w=!0);if(y.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==b.substring(0,6)&&!0!==e.allowInsecureAuthentication&&d.throwError("basic authentication requires a secure https url",s.a.errors.INVALID_ARGUMENT,{argument:"url",url:b,user:e.user,password:"[REDACTED]"});var _=e.user+":"+e.password;g.authorization={key:"Authorization",value:"Basic "+Object(n.b)(Object(a.b)(_))}}null!=e.skipFetchSetup&&(y.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(y.fetchOptions=Object(o.g)(e.fetchOptions))}var E,A=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),S=b?b.match(A):null;if(S)try{var O={statusCode:200,statusMessage:"OK",headers:{"content-type":S[1]||"text/plain"},body:S[2]?Object(n.a)(S[3]):(E=S[3],Object(a.b)(E.replace(/%([0-9a-f][0-9a-f])/gi,(function(e,t){return String.fromCharCode(parseInt(t,16))}))))},M=O.body;return r&&(M=r(O.body,O)),Promise.resolve(M)}catch(C){d.throwError("processing response error",s.a.errors.SERVER_ERROR,{body:v(S[1],S[2]),error:C,requestBody:null,requestMethod:"GET",url:b})}t&&(y.method="POST",y.body=t,null==g["content-type"]&&(g["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==g["content-length"]&&(g["content-length"]={key:"Content-Length",value:String(t.length)}));var P={};Object.keys(g).forEach((function(e){var t=g[e];P[t.key]=t.value})),y.headers=P;var j=function(){var e=null;return{promise:new Promise((function(t,r){k&&(e=setTimeout((function(){null!=e&&(e=null,r(d.makeError("timeout",s.a.errors.TIMEOUT,{requestBody:v(y.body,P["content-type"]),requestMethod:y.method,timeout:k,url:b})))}),k))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),T=function(){return h(this,void 0,void 0,l().mark((function e(){var t,n,o,a,h,g,k,x,_,E;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t=300)&&(j.cancel(),d.throwError("bad response",s.a.errors.SERVER_ERROR,{status:n.statusCode,headers:n.headers,body:v(k,n.headers?n.headers["content-type"]:null),requestBody:v(y.body,P["content-type"]),requestMethod:y.method,url:b})),!r){e.next=60;break}return e.prev=37,e.next=40,r(k,n);case 40:return x=e.sent,j.cancel(),e.abrupt("return",x);case 45:if(e.prev=45,e.t1=e.catch(37),!(e.t1.throttleRetry&&ts)return void(a()&&n(new Error("retry limit reached")));var c=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));ct.ceiling&&(c=t.ceiling),setTimeout(i,c)}return null}),(function(e){a()&&n(e)}))}()}))}},function(e,t){var r=Array.isArray;e.exports=r},function(e,t,r){"use strict";var n=t,i=r(116),o=r(145),a=r(376);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0===(1&u)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0===(1&c)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"===typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,r){"use strict";var n=r(419),i=r(693),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function s(e){return null!==e&&"object"===typeof e}function u(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),a(e))for(var r=0,n=e.length;r>=8;return t}function s(e,t,r){for(var n=0,i=0;it+1+n&&o.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:a}}function f(e,t){if(0===e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&o.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});var a=s(e,t+1,r);return t+1+r+a>e.length&&o.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(e,t,t+1+r,r+a)}if(e[t]>=192){var u=e[t]-192;return t+1+u>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(e,t,t+1,u)}if(e[t]>=184){var f=e[t]-183;t+1+f>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});var l=s(e,t+1,f);return t+1+f+l>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+f+l,result:Object(n.hexlify)(e.slice(t+1+f,t+1+f+l))}}if(e[t]>=128){var h=e[t]-128;return t+1+h>e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+h,result:Object(n.hexlify)(e.slice(t+1,t+1+h))}}return{consumed:1,result:Object(n.hexlify)(e[t])}}function l(e){var t=Object(n.arrayify)(e),r=f(t,0);return r.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),r.result}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return a}));var n;function i(e,t){return t.major>e.major?n.MAJOR:t.majore.minor?n.MINOR:t.minore.patch?n.PATCH:n.NONE}function o(e,t){var r=e.reduce((function(e,t){return e[t.chainId]||(e[t.chainId]={}),e[t.chainId][t.address]=t,e}),{}),n=t.reduce((function(e,t){var n,i,o=null==(n=r[t.chainId])?void 0:n[t.address];if(o){var a=Object.keys(t).filter((function(e){return"address"!==e&&"chainId"!==e})).filter((function(e){return r=t[e],n=o[e],!(r===n||typeof r===typeof n&&Array.isArray(r)&&Array.isArray(n)&&r.every((function(e,t){return n[t]===e})));var r,n}));a.length>0&&(e.changed[t.chainId]||(e.changed[t.chainId]={}),e.changed[t.chainId][t.address]=a)}else e.added.push(t);e.index[t.chainId]?e.index[t.chainId][t.address]=!0:e.index[t.chainId]=((i={})[t.address]=!0,i);return e}),{added:[],changed:{},index:{}}),i=e.reduce((function(e,t){return n.index[t.chainId]&&n.index[t.chainId][t.address]||e.push(t),e}),[]);return{added:n.added,changed:n.changed,removed:i}}function a(e,t){var r=o(e,t);return r.removed.length>0?n.MAJOR:r.added.length>0?n.MINOR:Object.keys(r.changed).length>0?n.PATCH:n.NONE}!function(e){e[e.NONE=0]="NONE",e[e.PATCH=1]="PATCH",e[e.MINOR=2]="MINOR",e[e.MAJOR=3]="MAJOR"}(n||(n={}))},function(e,t,r){"use strict";!function(t){function r(e){return parseInt(e)===e}function n(e){if(!r(e.length))return!1;for(var t=0;t255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function a(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var s={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},u=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],r=0;r>4]+e[15&i])}return r.join("")}}}(),c={16:10,24:12,32:14},f=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],l=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],d=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],v=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],m=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],b=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],y=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],k=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],x=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],_=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],E=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function A(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t];for(var a,s=0,u=i;u>16&255]<<24^l[a>>8&255]<<16^l[255&a]<<8^l[a>>24&255]^f[s]<<24,s+=1,8!=i)for(t=1;t>8&255]<<8^l[a>>16&255]<<16^l[a>>24&255]<<24;for(t=i/2+1;t>2,d=u%4,this._Ke[h][d]=o[t],this._Kd[e-h][d]=o[t++],u++}for(var h=1;h>24&255]^x[a>>16&255]^_[a>>8&255]^E[255&a]},S.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=A(e),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var a=1;a>24&255]^p[n[(i+1)%4]>>16&255]^v[n[(i+2)%4]>>8&255]^m[255&n[(i+3)%4]]^this._Ke[a][i];n=r.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Ke[t][i],u[4*i]=255&(l[n[i]>>24&255]^s>>24),u[4*i+1]=255&(l[n[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(l[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(l[255&n[(i+3)%4]]^s);return u},S.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=A(e),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var a=1;a>24&255]^b[n[(i+3)%4]>>16&255]^y[n[(i+2)%4]>>8&255]^w[255&n[(i+1)%4]]^this._Kd[a][i];n=r.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Kd[t][i],u[4*i]=255&(h[n[i]>>24&255]^s>>24),u[4*i+1]=255&(h[n[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(h[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(h[255&n[(i+1)%4]]^s);return u};var O=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new S(t)};O.prototype.encrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n=0;--t)this._counter[t]=e%256,e>>=8},T.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},T.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var C=function e(t,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",r instanceof T||(r=new T(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new S(t)};C.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n=0){if(n&&n.length){if(0!==i.length&&!/^\//.test(i))return}else if(/^\/\//.test(i))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(s.toLowerCase()))return u+=s+":",n&&n.length&&(u+="//"+n),u+=i,o&&o.length&&(u+="?"+o),a&&a.length&&(u+="#"+a),u}}}function n(e,n){if(r(e)){var i,o,a,s,u="",c="",f="",l="";if(u=(i=t(e))[1],c=i[2],o=i[3],a=i[4],s=i[5],u){if(n){if("https"!=u.toLowerCase())return}else if("http"!=u.toLowerCase())return;if(c)return/:(\d+)$/.test(c)&&(f=c.match(/:(\d+)$/)[0],c=c.replace(/:\d+$/,"")),l+=u+":",l+="//"+c,f&&(l+=f),l+=o,a&&a.length&&(l+="?"+a),s&&s.length&&(l+="#"+s),l}}}function i(e){return n(e,!0)}function o(e){return n(e)||i(e)}}(e)}).call(this,r(93)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(51),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return L}));var n=r(35),i=r(33),o=r(6),a=r(7),s=r(20),u=r(14),c=r(15),f=r(140),l=r(41),h=r(4),d=r(498),p=r(9),v=r(143),m=r(68),g=r(83),b=r(10),y=r(45),w=r(121);function k(){k=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(P){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new S(i||[]);return n(a,"_invoke",{value:x(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var x=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},_=new b.a(y.a),E=["call","estimateGas"];function A(e,t){if(null==e)return null;if("string"===typeof e.message&&e.message.match("reverted")){var r=Object(h.k)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"===typeof e){for(var n in e){var i=A(e[n],t);if(i)return i}return null}if("string"===typeof e)try{return A(JSON.parse(e),t)}catch(o){}return null}function S(e,t,r){var n=r.transaction||r.signedTransaction;if("call"===e){var i=A(t,!0);if(i)return i.data;_.throwError("missing revert data in call exception; Transaction reverted without a reason string",b.a.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){var o=A(t.body,!1);null==o&&(o=A(t,!1)),o&&_.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.a.errors.UNPREDICTABLE_GAS_LIMIT,{reason:o.message,method:e,transaction:n,error:t})}var a=t.message;throw t.code===b.a.errors.SERVER_ERROR&&t.error&&"string"===typeof t.error.message?a=t.error.message:"string"===typeof t.body?a=t.body:"string"===typeof t.responseText&&(a=t.responseText),(a=(a||"").toLowerCase()).match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&_.throwError("insufficient funds for intrinsic transaction cost",b.a.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),a.match(/nonce (is )?too low/i)&&_.throwError("nonce has already been used",b.a.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),a.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&_.throwError("replacement fee too low",b.a.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),a.match(/only replay-protected/i)&&_.throwError("legacy pre-eip-155 transactions not supported",b.a.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),E.indexOf(e)>=0&&a.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&_.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.a.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function O(e){return new Promise((function(t){setTimeout(t,e)}))}function M(e){if(e.error){var t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function P(e){return e?e.toLowerCase():e}var j={},T=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(e,n,i){var a;if(Object(o.a)(this,r),a=t.call(this),e!==j)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return Object(p.d)(Object(s.a)(a),"provider",n),null==i&&(i=0),"string"===typeof i?(Object(p.d)(Object(s.a)(a),"_address",a.provider.formatter.address(i)),Object(p.d)(Object(s.a)(a),"_index",null)):"number"===typeof i?(Object(p.d)(Object(s.a)(a),"_index",i),Object(p.d)(Object(s.a)(a),"_address",null)):_.throwArgumentError("invalid address or index","addressOrIndex",i),a}return Object(a.a)(r,[{key:"connect",value:function(e){return _.throwError("cannot alter JSON-RPC Signer connection",b.a.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}},{key:"connectUnchecked",value:function(){return new C(j,this.provider,this._address||this._index)}},{key:"getAddress",value:function(){var e=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(t){return t.length<=e._index&&_.throwError("unknown account #"+e._index,b.a.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),e.provider.formatter.address(t[e._index])}))}},{key:"sendUncheckedTransaction",value:function(e){var t=this;e=Object(p.g)(e);var r=this.getAddress().then((function(e){return e&&(e=e.toLowerCase()),e}));if(null==e.gasLimit){var n=Object(p.g)(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((function(e){return x(t,void 0,void 0,k().mark((function t(){var r;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=e){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this.provider.resolveName(e);case 4:return null==(r=t.sent)&&_.throwArgumentError("provided ENS name resolves to null","tx.to",e),t.abrupt("return",r);case 7:case"end":return t.stop()}}),t,this)})))}))),Object(p.f)({tx:Object(p.f)(e),sender:r}).then((function(r){var n=r.tx,i=r.sender;null!=n.from?n.from.toLowerCase()!==i&&_.throwArgumentError("from address mismatch","transaction",e):n.from=i;var o=t.provider.constructor.hexlifyTransaction(n,{from:!0});return t.provider.send("eth_sendTransaction",[o]).then((function(e){return e}),(function(e){return"string"===typeof e.message&&e.message.match(/user denied/i)&&_.throwError("user rejected transaction",b.a.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),S("sendTransaction",e,o)}))}))}},{key:"signTransaction",value:function(e){return _.throwError("signing transactions is unsupported",b.a.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}},{key:"sendTransaction",value:function(e){return x(this,void 0,void 0,k().mark((function t(){var r,n,i=this;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval);case 2:return r=t.sent,t.next=5,this.sendUncheckedTransaction(e);case 5:return n=t.sent,t.prev=6,t.next=9,Object(g.b)((function(){return x(i,void 0,void 0,k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.getTransaction(n);case 2:if(null!==(t=e.sent)){e.next=5;break}return e.abrupt("return",void 0);case 5:return e.abrupt("return",this.provider._wrapTransaction(t,n,r));case 6:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this.provider});case 9:return t.abrupt("return",t.sent);case 12:throw t.prev=12,t.t0=t.catch(6),t.t0.transactionHash=n,t.t0;case 16:case"end":return t.stop()}}),t,this,[[6,12]])})))}},{key:"signMessage",value:function(e){return x(this,void 0,void 0,k().mark((function t(){var r,n;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="string"===typeof e?Object(v.b)(e):e,t.next=3,this.getAddress();case 3:return n=t.sent,t.prev=4,t.next=7,this.provider.send("personal_sign",[Object(h.h)(r),n.toLowerCase()]);case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),"string"===typeof t.t0.message&&t.t0.message.match(/user denied/i)&&_.throwError("user rejected signing",b.a.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),t.t0;case 14:case"end":return t.stop()}}),t,this,[[4,10]])})))}},{key:"_legacySignMessage",value:function(e){return x(this,void 0,void 0,k().mark((function t(){var r,n;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="string"===typeof e?Object(v.b)(e):e,t.next=3,this.getAddress();case 3:return n=t.sent,t.prev=4,t.next=7,this.provider.send("eth_sign",[n.toLowerCase(),Object(h.h)(r)]);case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),"string"===typeof t.t0.message&&t.t0.message.match(/user denied/i)&&_.throwError("user rejected signing",b.a.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),t.t0;case 14:case"end":return t.stop()}}),t,this,[[4,10]])})))}},{key:"_signTypedData",value:function(e,t,r){return x(this,void 0,void 0,k().mark((function n(){var i,o,a=this;return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,d.a.resolveNames(e,t,r,(function(e){return a.provider.resolveName(e)}));case 2:return i=n.sent,n.next=5,this.getAddress();case 5:return o=n.sent,n.prev=6,n.next=9,this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(d.a.getPayload(i.domain,t,i.value))]);case 9:return n.abrupt("return",n.sent);case 12:throw n.prev=12,n.t0=n.catch(6),"string"===typeof n.t0.message&&n.t0.message.match(/user denied/i)&&_.throwError("user rejected signing",b.a.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,messageData:{domain:i.domain,types:t,value:i.value}}),n.t0;case 16:case"end":return n.stop()}}),n,this,[[6,12]])})))}},{key:"unlock",value:function(e){return x(this,void 0,void 0,k().mark((function t(){var r,n;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.provider,t.next=3,this.getAddress();case 3:return n=t.sent,t.abrupt("return",r.send("personal_unlockAccount",[n.toLowerCase(),e,null]));case 5:case"end":return t.stop()}}),t,this)})))}}]),r}(f.a),C=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(a.a)(r,[{key:"sendTransaction",value:function(e){var t=this;return this.sendUncheckedTransaction(e).then((function(e){return{hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(r){return t.provider.waitForTransaction(e,r)}}}))}}]),r}(T),R={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},L=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(e,n){var i;Object(o.a)(this,r);var a=n;return null==a&&(a=new Promise((function(e,t){setTimeout((function(){i.detectNetwork().then((function(t){e(t)}),(function(e){t(e)}))}),0)}))),i=t.call(this,a),e||(e=Object(p.e)(i.constructor,"defaultUrl")()),"string"===typeof e?Object(p.d)(Object(s.a)(i),"connection",Object.freeze({url:e})):Object(p.d)(Object(s.a)(i),"connection",Object.freeze(Object(p.g)(e))),i._nextId=42,i}return Object(a.a)(r,[{key:"_cache",get:function(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}},{key:"detectNetwork",value:function(){var e=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((function(){e._cache.detectNetwork=null}),0)),this._cache.detectNetwork}},{key:"_uncachedDetectNetwork",value:function(){return x(this,void 0,void 0,k().mark((function e(){var t,r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O(0);case 2:return t=null,e.prev=3,e.next=6,this.send("eth_chainId",[]);case 6:t=e.sent,e.next=19;break;case 9:return e.prev=9,e.t0=e.catch(3),e.prev=11,e.next=14,this.send("net_version",[]);case 14:t=e.sent,e.next=19;break;case 17:e.prev=17,e.t1=e.catch(11);case 19:if(null==t){e.next=28;break}return r=Object(p.e)(this.constructor,"getNetwork"),e.prev=21,e.abrupt("return",r(l.a.from(t).toNumber()));case 25:return e.prev=25,e.t2=e.catch(21),e.abrupt("return",_.throwError("could not detect network",b.a.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e.t2}));case 28:return e.abrupt("return",_.throwError("could not detect network",b.a.errors.NETWORK_ERROR,{event:"noNetwork"}));case 29:case"end":return e.stop()}}),e,this,[[3,9],[11,17],[21,25]])})))}},{key:"getSigner",value:function(e){return new T(j,this,e)}},{key:"getUncheckedSigner",value:function(e){return this.getSigner(e).connectUnchecked()}},{key:"listAccounts",value:function(){var e=this;return this.send("eth_accounts",[]).then((function(t){return t.map((function(t){return e.formatter.address(t)}))}))}},{key:"send",value:function(e,t){var r=this,n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Object(p.c)(n),provider:this});var i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];var o=Object(g.a)(this.connection,JSON.stringify(n),M).then((function(e){return r.emit("debug",{action:"response",request:n,response:e,provider:r}),e}),(function(e){throw r.emit("debug",{action:"response",error:e,request:n,provider:r}),e}));return i&&(this._cache[e]=o,setTimeout((function(){r._cache[e]=null}),0)),o}},{key:"prepareRequest",value:function(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[P(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[P(t.address),t.blockTag]];case"getCode":return["eth_getCode",[P(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[P(t.address),Object(h.g)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[Object(p.e)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[Object(p.e)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=P(t.filter.address)),["eth_getLogs",[t.filter]]}return null}},{key:"perform",value:function(e,t){return x(this,void 0,void 0,k().mark((function r(){var n,i,o;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("call"!==e&&"estimateGas"!==e){r.next=8;break}if(!(n=t.transaction)||null==n.type||!l.a.from(n.type).isZero()){r.next=8;break}if(null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas){r.next=8;break}return r.next=6,this.getFeeData();case 6:null==(i=r.sent).maxFeePerGas&&null==i.maxPriorityFeePerGas&&((t=Object(p.g)(t)).transaction=Object(p.g)(n),delete t.transaction.type);case 8:return null==(o=this.prepareRequest(e,t))&&_.throwError(e+" not implemented",b.a.errors.NOT_IMPLEMENTED,{operation:e}),r.prev=10,r.next=13,this.send(o[0],o[1]);case 13:return r.abrupt("return",r.sent);case 16:return r.prev=16,r.t0=r.catch(10),r.abrupt("return",S(e,r.t0,t));case 19:case"end":return r.stop()}}),r,this,[[10,16]])})))}},{key:"_startEvent",value:function(e){"pending"===e.tag&&this._startPending(),Object(n.a)(Object(i.a)(r.prototype),"_startEvent",this).call(this,e)}},{key:"_startPending",value:function(){if(null==this._pendingFilter){var e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;var n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return O(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((function(e){}))}(),r})).catch((function(e){}))}}},{key:"_stopEvent",value:function(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),Object(n.a)(Object(i.a)(r.prototype),"_stopEvent",this).call(this,e)}}],[{key:"defaultUrl",value:function(){return"http://localhost:8545"}},{key:"hexlifyTransaction",value:function(e,t){var r=Object(p.g)(R);if(t)for(var n in t)t[n]&&(r[n]=!0);Object(p.b)(e,r);var i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null!=e[t]){var r=Object(h.f)(l.a.from(e[t]));"gasLimit"===t&&(t="gas"),i[t]=r}})),["from","to","data"].forEach((function(t){null!=e[t]&&(i[t]=Object(h.h)(e[t]))})),e.accessList&&(i.accessList=Object(m.a)(e.accessList)),i}}]),r}(w.a)},function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return p}));var n=r(6),i=r(7),o=r(14),a=r(15),s=r(41),u=(r(4),r(9)),c=r(10);function f(){f=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(P){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),s=new S(i||[]);return n(a,"_invoke",{value:x(e,r,s)}),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=c;var h={};function d(){}function p(){}function v(){}var m={};u(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(O([])));b&&b!==t&&r.call(b,o)&&(m=b);var y=v.prototype=d.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=l(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}var l=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},h=new c.a("abstract-provider/5.7.0"),d=function(e){Object(o.a)(r,e);var t=Object(a.a)(r);function r(){return Object(n.a)(this,r),t.apply(this,arguments)}return Object(i.a)(r,null,[{key:"isForkEvent",value:function(e){return!(!e||!e._isForkEvent)}}]),r}(u.a),p=function(){function e(){Object(n.a)(this,e),h.checkAbstract(this instanceof e?this.constructor:void 0,e),Object(u.d)(this,"_isProvider",!0)}return Object(i.a)(e,[{key:"getFeeData",value:function(){return l(this,void 0,void 0,f().mark((function e(){var t,r,n,i,o,a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.f)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((function(e){return null}))});case 2:return t=e.sent,r=t.block,n=t.gasPrice,i=null,o=null,a=null,r&&r.baseFeePerGas&&(i=r.baseFeePerGas,a=s.a.from("1500000000"),o=r.baseFeePerGas.mul(2).add(a)),e.abrupt("return",{lastBaseFeePerGas:i,maxFeePerGas:o,maxPriorityFeePerGas:a,gasPrice:n});case 8:case"end":return e.stop()}}),e,this)})))}},{key:"addListener",value:function(e,t){return this.on(e,t)}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"isProvider",value:function(e){return!(!e||!e._isProvider)}}]),e}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(174);function i(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=Object(n.a)(e))){var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f: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.")}var i,o,a=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}},function(e,t,r){"use strict";var n;r.d(t,"a",(function(){return n})),function(e){e.Update="Web3ReactUpdate",e.Error="Web3ReactError",e.Deactivate="Web3ReactDeactivate"}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return l}));var n=r(4),i=r(10),o=new i.a("rlp/5.7.0");function a(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function s(e,t,r){for(var n=0,i=0;it+1+n&&o.throwError("child data too short",i.a.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:a}}function f(e,t){if(0===e.length&&o.throwError("data too short",i.a.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&o.throwError("data short segment too short",i.a.errors.BUFFER_OVERRUN,{});var a=s(e,t+1,r);return t+1+r+a>e.length&&o.throwError("data long segment too short",i.a.errors.BUFFER_OVERRUN,{}),c(e,t,t+1+r,r+a)}if(e[t]>=192){var u=e[t]-192;return t+1+u>e.length&&o.throwError("data array too short",i.a.errors.BUFFER_OVERRUN,{}),c(e,t,t+1,u)}if(e[t]>=184){var f=e[t]-183;t+1+f>e.length&&o.throwError("data array too short",i.a.errors.BUFFER_OVERRUN,{});var l=s(e,t+1,f);return t+1+f+l>e.length&&o.throwError("data array too short",i.a.errors.BUFFER_OVERRUN,{}),{consumed:1+f+l,result:Object(n.h)(e.slice(t+1+f,t+1+f+l))}}if(e[t]>=128){var h=e[t]-128;return t+1+h>e.length&&o.throwError("data too short",i.a.errors.BUFFER_OVERRUN,{}),{consumed:1+h,result:Object(n.h)(e.slice(t+1,t+1+h))}}return{consumed:1,result:Object(n.h)(e[t])}}function l(e){var t=Object(n.a)(e),r=f(t,0);return r.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),r.result}},function(e,t,r){"use strict";var n=r(145),i=r(52);function o(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var f=0,l=t;return f+=(l=l+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){"use strict";var n=r(359),i=r(225),o=r(126),a=r(127);Object.defineProperty(t,"__esModule",{value:!0});var s=r(674),u=r(128),c=function(){function e(t,r,n){o(this,e),this.name=t,this.prefix=r,this.baseEncode=n}return a(e,[{key:"encode",value:function(e){if(e instanceof Uint8Array)return"".concat(this.prefix).concat(this.baseEncode(e));throw Error("Unknown type, must be binary type")}}]),e}(),f=function(){function e(t,r,n){if(o(this,e),this.name=t,this.prefix=r,void 0===r.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}return a(e,[{key:"decode",value:function(e){if("string"===typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error("Unable to decode multibase string ".concat(JSON.stringify(e),", ").concat(this.name," decoder only supports inputs prefixed with ").concat(this.prefix));return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}},{key:"or",value:function(e){return h(this,e)}}]),e}(),l=function(){function e(t){o(this,e),this.decoders=t}return a(e,[{key:"or",value:function(e){return h(this,e)}},{key:"decode",value:function(e){var t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError("Unable to decode multibase string ".concat(JSON.stringify(e),", only inputs prefixed with ").concat(Object.keys(this.decoders)," are supported"))}}]),e}(),h=function(e,t){return new l(i(i({},e.decoders||n({},e.prefix,e)),t.decoders||n({},t.prefix,t)))},d=function(){function e(t,r,n,i){o(this,e),this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new c(t,r,n),this.decoder=new f(t,r,i)}return a(e,[{key:"encode",value:function(e){return this.encoder.encode(e)}},{key:"decode",value:function(e){return this.decoder.decode(e)}}]),e}(),p=function(e){var t=e.name,r=e.prefix,n=e.encode,i=e.decode;return new d(t,r,n,i)};t.Codec=d,t.baseX=function(e){var t=e.prefix,r=e.name,n=e.alphabet,i=s(n,r),o=i.encode,a=i.decode;return p({prefix:t,name:r,encode:o,decode:function(e){return u.coerce(a(e))}})},t.from=p,t.or=h,t.rfc4648=function(e){var t=e.name,r=e.prefix,n=e.bitsPerChar,i=e.alphabet;return p({prefix:r,name:t,encode:function(e){return function(e,t,r){for(var n="="===t[t.length-1],i=(1<r;)o+=t[i&s>>(a-=r)];if(a&&(o+=t[i&s<=8&&(u-=8,s[f++]=255&c>>u)}if(u>=r||255&c<<8-u)throw new SyntaxError("Unexpected end of data");return s}(e,i,n,t)}})}},function(e,t,r){var n=r(432),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="abi/5.7.0"},function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n=r(130);function i(){return(i=Object.assign||function(e){for(var t=1;t0})))}),(function(){return!1}))):Promise.resolve(!1)}catch(e){return Promise.reject(e)}},t}(n.a)},function(e,t,r){var n=r(369);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="abi/5.3.0"},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.parseBytes32String=t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=void 0;var a=r(326);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return a.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return a.checkResultErrors}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return a.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return a.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return a.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return a.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return a.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return a.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return a.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return a.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return a.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return a.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return a.TransactionDescription}});var s=r(53);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return s.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return s.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return s.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return s.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return s.isAddress}});var u=o(r(230));t.base64=u;var c=r(172);Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return c.Base58}});var f=r(8);Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return f.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return f.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return f.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return f.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return f.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return f.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return f.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return f.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return f.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return f.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return f.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return f.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return f.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return f.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return f.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return f.stripZeros}});var l=r(193);Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return l._TypedDataEncoder}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return l.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return l.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return l.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return l.namehash}});var h=r(63);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return h.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return h.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return h.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return h.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return h.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return h.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return h.mnemonicToSeed}});var d=r(199);Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return d.getJsonWalletAddress}});var p=r(46);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return p.keccak256}});var v=r(13);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return v.Logger}});var m=r(168);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return m.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return m.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return m.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return m.sha512}});var g=r(189);Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return g.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return g.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return g.sha256}});var b=r(327);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return b.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return b.shuffled}});var y=r(12);Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return y.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return y.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return y.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return y.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return y.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return y.shallowCopy}});var w=o(r(89));t.RLP=w;var k=r(129);Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return k.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return k.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return k.SigningKey}});var x=r(87);Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return x.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return x.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return x.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return x._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return x.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return x.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return x.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return x.Utf8ErrorFuncs}});var _=r(78);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return _.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return _.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return _.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return _.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return _.serialize}});var E=r(120);Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return E.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return E.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return E.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return E.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return E.parseUnits}});var A=r(169);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return A.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return A.verifyTypedData}});var S=r(74);Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return S._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return S.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return S.poll}});var O=r(168);Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return O.SupportedAlgorithm}});var M=r(87);Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return M.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return M.Utf8ErrorReason}})},function(e,t,r){"use strict";e.exports=function(e){return"number"===typeof e?e-e===0:"string"===typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return N}));var n=r(31),i=r(20),o=r(35),a=r(33),s=r(14),u=r(15),c=r(6),f=r(7),l=r(59),h=r(934),d=r(96),p=r(140),v=r(38),m=r(41),g=r(4),b=r(9),y=r(68),w=r(10);function k(){k=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(P){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new S(i||[]);return n(a,"_invoke",{value:x(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var x=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},_=new w.a("contracts/5.7.0");function E(e,t){return x(this,void 0,void 0,k().mark((function r(){var n,i;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return"string"!==typeof(n=r.sent)&&_.throwArgumentError("invalid address or ENS name","name",n),r.prev=4,r.abrupt("return",Object(v.a)(n));case 8:r.prev=8,r.t0=r.catch(4);case 10:return e||_.throwError("a provider or signer is needed to resolve ENS names",w.a.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),r.next=13,e.resolveName(n);case 13:return null==(i=r.sent)&&_.throwArgumentError("resolver or addr is not configured for ENS name","name",n),r.abrupt("return",i);case 16:case"end":return r.stop()}}),r,null,[[4,8]])})))}function A(e,t,r){return x(this,void 0,void 0,k().mark((function n(){return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!Array.isArray(r)){n.next=4;break}return n.next=3,Promise.all(r.map((function(r,n){return A(e,Array.isArray(t)?t[n]:t[r.name],r)})));case 3:return n.abrupt("return",n.sent);case 4:if("address"!==r.type){n.next=8;break}return n.next=7,E(e,t);case 7:return n.abrupt("return",n.sent);case 8:if("tuple"!==r.type){n.next=12;break}return n.next=11,A(e,t,r.components);case 11:return n.abrupt("return",n.sent);case 12:if("array"!==r.baseType){n.next=18;break}if(Array.isArray(t)){n.next=15;break}return n.abrupt("return",Promise.reject(_.makeError("invalid value for array",w.a.errors.INVALID_ARGUMENT,{argument:"value",value:t})));case 15:return n.next=17,Promise.all(t.map((function(t){return A(e,t,r.arrayChildren)})));case 17:return n.abrupt("return",n.sent);case 18:return n.abrupt("return",t);case 19:case"end":return n.stop()}}),n)})))}function S(e,t,r){return x(this,void 0,void 0,k().mark((function n(){var i,o,a,s,u,c,f,l,h,d,p=this;return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i={},r.length===t.inputs.length+1&&"object"===typeof r[r.length-1]&&(i=Object(b.g)(r.pop())),_.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?i.from?i.from=Object(b.f)({override:E(e.signer,i.from),signer:e.signer.getAddress()}).then((function(e){return x(p,void 0,void 0,k().mark((function t(){return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object(v.a)(e.signer)!==e.override&&_.throwError("Contract with a Signer cannot override from",w.a.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.abrupt("return",e.override);case 2:case"end":return t.stop()}}),t)})))})):i.from=e.signer.getAddress():i.from&&(i.from=E(e.provider,i.from)),n.next=6,Object(b.f)({args:A(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:Object(b.f)(i)||{}});case 6:if(o=n.sent,a=e.interface.encodeFunctionData(t,o.args),s={data:a,to:o.address},null!=(u=o.overrides).nonce&&(s.nonce=m.a.from(u.nonce).toNumber()),null!=u.gasLimit&&(s.gasLimit=m.a.from(u.gasLimit)),null!=u.gasPrice&&(s.gasPrice=m.a.from(u.gasPrice)),null!=u.maxFeePerGas&&(s.maxFeePerGas=m.a.from(u.maxFeePerGas)),null!=u.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=m.a.from(u.maxPriorityFeePerGas)),null!=u.from&&(s.from=u.from),null!=u.type&&(s.type=u.type),null!=u.accessList&&(s.accessList=Object(y.a)(u.accessList)),null==s.gasLimit&&null!=t.gas){for(c=21e3,f=Object(g.a)(a),l=0;l1)){e=e.substring(1);var r=t[0];try{null==i[e]&&Object(b.d)(i,e,i[r])}catch(n){}null==i.functions[e]&&Object(b.d)(i.functions,e,i.functions[r]),null==i.callStatic[e]&&Object(b.d)(i.callStatic,e,i.callStatic[r]),null==i.populateTransaction[e]&&Object(b.d)(i.populateTransaction,e,i.populateTransaction[r]),null==i.estimateGas[e]&&Object(b.d)(i.estimateGas,e,i.estimateGas[r])}}))}return Object(f.a)(e,[{key:"deployed",value:function(){return this._deployed()}},{key:"_deployed",value:function(e){var t=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return t})):this._deployedPromise=this.provider.getCode(this.address,e).then((function(e){return"0x"===e&&_.throwError("contract not deployed",w.a.errors.UNSUPPORTED_OPERATION,{contractAddress:t.address,operation:"getDeployed"}),t}))),this._deployedPromise}},{key:"fallback",value:function(e){var t=this;this.signer||_.throwError("sending a transactions require a signer",w.a.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var r=Object(b.g)(e||{});return["from","to"].forEach((function(e){null!=r[e]&&_.throwError("cannot override "+e,w.a.errors.UNSUPPORTED_OPERATION,{operation:e})})),r.to=this.resolvedAddress,this.deployed().then((function(){return t.signer.sendTransaction(r)}))}},{key:"connect",value:function(e){"string"===typeof e&&(e=new p.b(e,this.provider));var t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&Object(b.d)(t,"deployTransaction",this.deployTransaction),t}},{key:"attach",value:function(e){return new this.constructor(e,this.interface,this.signer||this.provider)}},{key:"_normalizeRunningEvent",value:function(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}},{key:"_getRunningEvent",value:function(e){if("string"===typeof e){if("error"===e)return this._normalizeRunningEvent(new C);if("event"===e)return this._normalizeRunningEvent(new T("event",null));if("*"===e)return this._normalizeRunningEvent(new L(this.address,this.interface));var t=this.interface.getEvent(e);return this._normalizeRunningEvent(new R(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{var r=e.topics[0];if("string"!==typeof r)throw new Error("invalid topic");var n=this.interface.getEvent(r);return this._normalizeRunningEvent(new R(this.address,this.interface,n,e.topics))}catch(o){}var i={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new T(j(i),i))}return this._normalizeRunningEvent(new L(this.address,this.interface))}},{key:"_checkRunningEvents",value:function(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];var t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}},{key:"_wrapEvent",value:function(e,t,r){var n=this,i=Object(b.c)(t);return i.removeListener=function(){r&&(e.removeListener(r),n._checkRunningEvents(e))},i.getBlock=function(){return n.provider.getBlock(t.blockHash)},i.getTransaction=function(){return n.provider.getTransaction(t.transactionHash)},i.getTransactionReceipt=function(){return n.provider.getTransactionReceipt(t.transactionHash)},e.prepareEvent(i),i}},{key:"_addEventListener",value:function(e,t,r){var i=this;if(this.provider||_.throwError("events require a provider or a signer with a provider",w.a.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){var o=function(r){var o=i._wrapEvent(e,r,t);if(null==o.decodeError)try{var a=e.getEmit(o);i.emit.apply(i,[e.filter].concat(Object(n.a)(a)))}catch(s){o.decodeError=s.error}null!=e.filter&&i.emit("event",o),null!=o.decodeError&&i.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=o,null!=e.filter&&this.provider.on(e.filter,o)}}},{key:"queryFilter",value:function(e,t,r){var n=this,i=this._getRunningEvent(e),o=Object(b.g)(i.filter);return"string"===typeof t&&Object(g.k)(t,32)?(null!=r&&_.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),o.blockHash=t):(o.fromBlock=null!=t?t:0,o.toBlock=null!=r?r:"latest"),this.provider.getLogs(o).then((function(e){return e.map((function(e){return n._wrapEvent(i,e,null)}))}))}},{key:"on",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}},{key:"once",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}},{key:"emit",value:function(e){if(!this.provider)return!1;for(var t=this._getRunningEvent(e),r=arguments.length,n=new Array(r>1?r-1:0),i=1;i0;return this._checkRunningEvents(t),o}},{key:"listenerCount",value:function(e){var t=this;return this.provider?null==e?Object.keys(this._runningEvents).reduce((function(e,r){return e+t._runningEvents[r].listenerCount()}),0):this._getRunningEvent(e).listenerCount():0}},{key:"listeners",value:function(e){if(!this.provider)return[];if(null==e){var t=[];for(var r in this._runningEvents)this._runningEvents[r].listeners().forEach((function(e){t.push(e)}));return t}return this._getRunningEvent(e).listeners()}},{key:"removeAllListeners",value:function(e){if(!this.provider)return this;if(null==e){for(var t in this._runningEvents){var r=this._runningEvents[t];r.removeAllListeners(),this._checkRunningEvents(r)}return this}var n=this._getRunningEvent(e);return n.removeAllListeners(),this._checkRunningEvents(n),this}},{key:"off",value:function(e,t){if(!this.provider)return this;var r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"getContractAddress",value:function(e){return Object(v.b)(e)}},{key:"getInterface",value:function(e){return h.b.isInterface(e)?e:new h.b(e)}},{key:"isIndexed",value:function(e){return h.a.isIndexed(e)}}]),e}())},function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"c",(function(){return h})),r.d(t,"b",(function(){return d}));var n=r(6),i=r(7),o=r(461),a=r(4),s=r(9),u=new(r(10).a)("signing-key/5.7.0"),c=null;function f(){return c||(c=new o.a("secp256k1")),c}var l=function(){function e(t){Object(n.a)(this,e),Object(s.d)(this,"curve","secp256k1"),Object(s.d)(this,"privateKey",Object(a.h)(t)),32!==Object(a.d)(this.privateKey)&&u.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=f().keyFromPrivate(Object(a.a)(this.privateKey));Object(s.d)(this,"publicKey","0x"+r.getPublic(!1,"hex")),Object(s.d)(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),Object(s.d)(this,"_isSigningKey",!0)}return Object(i.a)(e,[{key:"_addPoint",value:function(e){var t=f().keyFromPublic(Object(a.a)(this.publicKey)),r=f().keyFromPublic(Object(a.a)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=f().keyFromPrivate(Object(a.a)(this.privateKey)),r=Object(a.a)(e);32!==r.length&&u.throwArgumentError("bad digest length","digest",e);var n=t.sign(r,{canonical:!0});return Object(a.m)({recoveryParam:n.recoveryParam,r:Object(a.g)("0x"+n.r.toString(16),32),s:Object(a.g)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=f().keyFromPrivate(Object(a.a)(this.privateKey)),r=f().keyFromPublic(Object(a.a)(d(e)));return Object(a.g)("0x"+t.derive(r.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function h(e,t){var r=Object(a.m)(t),n={r:Object(a.a)(r.r),s:Object(a.a)(r.s)};return"0x"+f().recoverPubKey(Object(a.a)(e),n,r.recoveryParam).encode("hex",!1)}function d(e,t){var r=Object(a.a)(e);if(32===r.length){var n=new l(r);return t?"0x"+f().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?t?Object(a.h)(r):"0x"+f().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+f().keyFromPublic(r).getPublic(!0,"hex"):Object(a.h)(r):u.throwArgumentError("invalid public or private key","key","[REDACTED]")}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return c})),r.d(t,"g",(function(){return f})),r.d(t,"h",(function(){return l}));var n=r(0);function i(e){return Object(n.a)({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"}}]})(e)}function o(e){return Object(n.a)({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951z"}}]})(e)}function a(e){return Object(n.a)({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"}}]})(e)}function s(e){return Object(n.a)({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M11.251.068a.5.5 0 0 1 .227.58L9.677 6.5H13a.5.5 0 0 1 .364.843l-8 8.5a.5.5 0 0 1-.842-.49L6.323 9.5H3a.5.5 0 0 1-.364-.843l8-8.5a.5.5 0 0 1 .615-.09z"}}]})(e)}function u(e){return Object(n.a)({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854V1.146zm4.943 12.248V6.169H2.542v7.225h2.401zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248-.822 0-1.359.54-1.359 1.248 0 .694.521 1.248 1.327 1.248h.016zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016a5.54 5.54 0 0 1 .016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225h2.4z"}}]})(e)}function c(e){return Object(n.a)({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.025 8c0 2.485-2.02 4.5-4.513 4.5A4.506 4.506 0 0 1 0 8c0-2.486 2.02-4.5 4.512-4.5A4.506 4.506 0 0 1 9.025 8zm4.95 0c0 2.34-1.01 4.236-2.256 4.236-1.246 0-2.256-1.897-2.256-4.236 0-2.34 1.01-4.236 2.256-4.236 1.246 0 2.256 1.897 2.256 4.236zM16 8c0 2.096-.355 3.795-.794 3.795-.438 0-.793-1.7-.793-3.795 0-2.096.355-3.795.794-3.795.438 0 .793 1.699.793 3.795z"}}]})(e)}function f(e){return Object(n.a)({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}},{tag:"path",attr:{d:"M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"}}]})(e)}function l(e){return Object(n.a)({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M6.167 8a.831.831 0 0 0-.83.83c0 .459.372.84.83.831a.831.831 0 0 0 0-1.661zm1.843 3.647c.315 0 1.403-.038 1.976-.611a.232.232 0 0 0 0-.306.213.213 0 0 0-.306 0c-.353.363-1.126.487-1.67.487-.545 0-1.308-.124-1.671-.487a.213.213 0 0 0-.306 0 .213.213 0 0 0 0 .306c.564.563 1.652.61 1.977.61zm.992-2.807c0 .458.373.83.831.83.458 0 .83-.381.83-.83a.831.831 0 0 0-1.66 0z"}},{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.828-1.165c-.315 0-.602.124-.812.325-.801-.573-1.9-.945-3.121-.993l.534-2.501 1.738.372a.83.83 0 1 0 .83-.869.83.83 0 0 0-.744.468l-1.938-.41a.203.203 0 0 0-.153.028.186.186 0 0 0-.086.134l-.592 2.788c-1.24.038-2.358.41-3.17.992-.21-.2-.496-.324-.81-.324a1.163 1.163 0 0 0-.478 2.224c-.02.115-.029.23-.029.353 0 1.795 2.091 3.256 4.669 3.256 2.577 0 4.668-1.451 4.668-3.256 0-.114-.01-.238-.029-.353.401-.181.688-.592.688-1.069 0-.65-.525-1.165-1.165-1.165z"}}]})(e)}},function(e,t,r){"use strict";var n,i="object"===typeof Reflect?Reflect:null,o=i&&"function"===typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=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 a=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"===typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"===typeof e.on&&g(e,"error",t,r)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,a,s;if(c(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"===typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=f(e))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}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 d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"===typeof u)o(u,this,t);else{var c=u.length,f=m(u,c);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var s=a(r(34));t.BN=s.default;var u=o(r(502));t.rlp=u},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(567).Buffer}catch(A){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=u(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","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"],l=[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],h=[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];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=l[e],d=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?v+r:f[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,v=d>>>13,m=0|a[2],g=8191&m,b=m>>>13,y=0|a[3],w=8191&y,k=y>>>13,x=0|a[4],_=8191&x,E=x>>>13,A=0|a[5],S=8191&A,O=A>>>13,M=0|a[6],P=8191&M,j=M>>>13,T=0|a[7],C=8191&T,R=T>>>13,L=0|a[8],N=8191&L,I=L>>>13,B=0|a[9],F=8191&B,D=B>>>13,U=0|s[0],z=8191&U,H=U>>>13,q=0|s[1],G=8191&q,J=q>>>13,V=0|s[2],K=8191&V,X=V>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],$=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(l,z))|0)+((8191&(i=(i=Math.imul(l,H))+Math.imul(h,z)|0))<<13)|0;c=((o=Math.imul(h,H))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(v,z)|0,o=Math.imul(v,H);var ge=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,H))+Math.imul(b,z)|0,o=Math.imul(b,H),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,J)|0;var be=(c+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(k,z)|0,o=Math.imul(k,H),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,X)|0;var ye=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,H))+Math.imul(E,z)|0,o=Math.imul(E,H),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Y)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,z),i=(i=Math.imul(S,H))+Math.imul(O,z)|0,o=Math.imul(O,H),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,J)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,J)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0;var ke=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(P,z),i=(i=Math.imul(P,H))+Math.imul(j,z)|0,o=Math.imul(j,H),n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0;var xe=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,H))+Math.imul(R,z)|0,o=Math.imul(R,H),n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var _e=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,H))+Math.imul(I,z)|0,o=Math.imul(I,H),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var Ee=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,z),i=(i=Math.imul(F,H))+Math.imul(D,z)|0,o=Math.imul(D,H),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,J)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var Ae=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,J))+Math.imul(D,G)|0,o=Math.imul(D,J),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,he)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(F,K),i=(i=Math.imul(F,X))+Math.imul(D,K)|0,o=Math.imul(D,X),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0;var Oe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ve)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,Z),i=(i=Math.imul(F,Y))+Math.imul(D,Z)|0,o=Math.imul(D,Y),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,he)|0;var Me=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,ee))+Math.imul(D,$)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(S,le)|0,i=(i=i+Math.imul(S,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Pe=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ve)|0)+Math.imul(E,pe)|0))<<13)|0;c=((o=o+Math.imul(E,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(j,le)|0,o=o+Math.imul(j,he)|0;var je=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ve)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(F,oe),i=(i=Math.imul(F,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,he)|0;var Te=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,ue),i=(i=Math.imul(F,ce))+Math.imul(D,ue)|0,o=Math.imul(D,ce),n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,he)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,he))+Math.imul(D,le)|0,o=Math.imul(D,he);var Re=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ve)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Le=(c+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,ve))+Math.imul(D,pe)|0))<<13)|0;return c=((o=Math.imul(D,ve))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=me,u[1]=ge,u[2]=be,u[3]=ye,u[4]=we,u[5]=ke,u[6]=xe,u[7]=_e,u[8]=Ee,u[9]=Ae,u[10]=Se,u[11]=Oe,u[12]=Me,u[13]=Pe,u[14]=je,u[15]=Te,u[16]=Ce,u[17]=Re,u[18]=Le,0!==c&&(u[19]=c,r.length++),r};function v(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=d),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):v(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>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},o.prototype.isubn=function(e){if(n("number"===typeof e),n(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>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0===(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}b.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(y,b),y.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var v=d,m=0;0!==v.cmp(s);m++)v=v.redSqr();n(m=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(93)(e))},function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"h",(function(){return o})),r.d(t,"e",(function(){return a})),r.d(t,"f",(function(){return s})),r.d(t,"g",(function(){return u})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return f})),r.d(t,"a",(function(){return l}));var n=r(48),i=n.a.from(-1),o=n.a.from(0),a=n.a.from(1),s=n.a.from(2),u=n.a.from("1000000000000000000"),c=n.a.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),f=n.a.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),l=n.a.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){"use strict";t.a=function(e,t){}},function(e,t,r){"use strict";r.r(t),r.d(t,"commify",(function(){return E})),r.d(t,"formatUnits",(function(){return A})),r.d(t,"parseUnits",(function(){return S})),r.d(t,"formatEther",(function(){return O})),r.d(t,"parseEther",(function(){return M}));var n=r(6),i=r(7),o=r(4),a=r(10),s=r(247),u=r(41),c=new a.a(s.a),f={},l=u.a.from(0),h=u.a.from(-1);function d(e,t,r,n){var i={fault:t,operation:r};return void 0!==n&&(i.value=n),c.throwError(e,a.a.errors.NUMERIC_FAULT,i)}for(var p="0";p.length<256;)p+=p;function v(e){if("number"!==typeof e)try{e=u.a.from(e).toNumber()}catch(t){}return"number"===typeof e&&e>=0&&e<=256&&!(e%1)?"1"+p.substring(0,e):c.throwArgumentError("invalid decimal size","decimals",e)}function m(e,t){null==t&&(t=0);var r=v(t),n=(e=u.a.from(e)).lt(l);n&&(e=e.mul(h));for(var i=e.mod(r).toString();i.length2&&c.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&d("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length80&&c.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new e(f,r,n,i)}}]),e}(),y=function(){function e(t,r,i,o){Object(n.a)(this,e),t!==f&&c.throwError("cannot use FixedNumber constructor; use FixedNumber.from",a.a.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=o,this._hex=r,this._value=i,this._isFixedNumber=!0,Object.freeze(this)}return Object(i.a)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&c.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(w.toFormat(r.format))),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(w.toFormat(r.format))),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&c.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+p.substring(0,t),this.format),i=k.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&c.throwArgumentError("invalid byte width","width",e);var t=u.a.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Object(o.g)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||Object(u.d)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(m(t,r),b.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=b.from(r),i=g(t,n.decimals);!n.signed&&i.lt(l)&&d("unsigned value cannot be negative","overflow","value",t);var a=null;n.signed?a=i.toTwos(n.width).toHexString():(a=i.toHexString(),a=Object(o.g)(a,n.width/8));var s=m(i,n.decimals);return new e(f,a,s,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=b.from(r);if(Object(o.a)(t).length>n.width/8)throw new Error("overflow");var i=u.a.from(t);n.signed&&(i=i.fromTwos(n.width));var a=i.toTwos((n.signed?0:1)+n.width).toHexString(),s=m(i,n.decimals);return new e(f,a,s,n)}},{key:"from",value:function(t,r){if("string"===typeof t)return e.fromString(t,r);if(Object(o.i)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(n){if(n.code!==a.a.errors.INVALID_ARGUMENT)throw n}return c.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}(),w=y.from(1),k=y.from("0.5"),x=new a.a("units/5.3.0"),_=["wei","kwei","mwei","gwei","szabo","finney","ether"];function E(e){var t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&x.throwArgumentError("invalid value","value",e);var r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");var i="";for(2===t.length&&(i="."+(t[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);for(var o=[];r.length;){if(r.length<=3){o.unshift(r);break}var a=r.length-3;o.unshift(r.substring(a)),r=r.substring(0,a)}return n+o.join(",")+i}function A(e,t){if("string"===typeof t){var r=_.indexOf(t);-1!==r&&(t=3*r)}return m(e,null!=t?t:18)}function S(e,t){if("string"!==typeof e&&x.throwArgumentError("value must be a string","value",e),"string"===typeof t){var r=_.indexOf(t);-1!==r&&(t=3*r)}return g(e,null!=t?t:18)}function O(e){return A(e,18)}function M(e){return S(e,18)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return _e}));var n=r(20),i=r(14),o=r(15),a=r(6),s=r(7),u=r(96),c=r(912),f=r(158),l=r(41),h=r(4),d=r(902),p=r(143),v=r(39),m=r(10),g=r(248),b=r(31),y=r(97);function w(e,t){null==t&&(t=1);var r=[],n=r.forEach;return function e(t,i){n.call(t,(function(t){i>0&&Array.isArray(t)?e(t,i-1):r.push(t)}))}(e,t),r}function k(e){return function(e){var t=0;return function(){return e[t++]}}(function(e){var t=0;function r(){return e[t++]<<8|e[t++]}for(var n=r(),i=1,o=[0,1],a=1;a>--c&1}for(var h=Math.pow(2,31),d=h>>>1,p=d>>1,v=h-1,m=0,g=0;g<31;g++)m=m<<1|l();for(var b=[],y=0,w=h;;){for(var k=Math.floor(((m-y+1)*i-1)/w),x=0,_=n;_-x>1;){var E=x+_>>>1;k>>1|l(),A=A<<1^d,S=(S^d)<<1|d|1;y=A,w=1+S-A}var O=n-4;return b.map((function(t){switch(t-O){case 3:return O+65792+(e[u++]<<16|e[u++]<<8|e[u++]);case 2:return O+256+(e[u++]<<8|e[u++]);case 1:return O+e[u++];default:return t-1}}))}(e))}function x(e){return 1&e?~e>>1:e>>1}function _(e,t){for(var r=Array(e),n=0,i=-1;n>=1),check:2==o}}()}(P);function L(e){return Object(p.c)(e)}function N(e){return e.filter((function(e){return 65039!=e}))}function I(e){var t,r=Object(y.a)(e.split("."));try{for(r.s();!(t=r.n()).done;){var n=t.value,i=L(n);try{for(var o=i.lastIndexOf(95)-1;o>=0;o--)if(95!==i[o])throw new Error("underscore only allowed at start");if(i.length>=4&&i.every((function(e){return e<128}))&&45===i[2]&&45===i[3])throw new Error("invalid label extension")}catch(a){throw new Error('Invalid label "'.concat(n,'": ').concat(a.message))}}}catch(a){r.e(a)}finally{r.f()}return e}function B(e){return I(function(e,t){var r=L(e).reverse(),n=[];for(;r.length;){var i=F(r);if(i)n.push.apply(n,Object(b.a)(t(i)));else{var o=r.pop();if(j.has(o))n.push(o);else if(!T.has(o)){var a=C[o];if(!a)throw new Error("Disallowed codepoint: 0x".concat(o.toString(16).toUpperCase()));n.push.apply(n,Object(b.a)(a))}}}return I((s=String.fromCodePoint.apply(String,n),s.normalize("NFC")));var s}(e,N))}function F(e,t){var r,n,i,o=R,a=[],s=e.length;t&&(t.length=0);for(var u=function(){var u=e[--s];if(!(o=null===(r=o.branches.find((function(e){return e.set.has(u)})))||void 0===r?void 0:r.node))return"break";if(o.save)i=u;else if(o.check&&u===i)return"break";a.push(u),o.fe0f&&(a.push(65039),s>0&&65039==e[s-1]&&s--),o.valid&&(n=a.slice(),2==o.valid&&n.splice(1,1),t&&t.push.apply(t,Object(b.a)(e.slice(s).reverse())),e.length=s)};s;){if("break"===u())break}return n}var D=new m.a(g.a),U=new Uint8Array(32);function z(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function H(e){var t=Object(p.b)(B(e)),r=[];if(0===e.length)return r;for(var n=0,i=0;i=t.length)throw new Error("invalid ENS name; empty component");return r.push(z(t.slice(n))),r}function q(e){"string"!==typeof e&&D.throwArgumentError("invalid ENS name; not a string","name",e);for(var t=U,r=H(e);r.length;)t=Object(v.a)(Object(h.b)([t,Object(v.a)(r.pop())]));return Object(h.h)(t)}function G(e){return Object(h.h)(Object(h.b)(H(e).map((function(e){if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}U.fill(0);var J=r(135),V=r(9),K=r(499),X=r(83),W=r(182),Z=r.n(W),Y=r(45),Q=r(73);function $(){$=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new A(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var ee=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},te=new m.a(Y.a);function re(e){return null==e?"null":(32!==Object(h.d)(e)&&te.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function ne(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((function(e){if(Array.isArray(e)){var t={};e.forEach((function(e){t[re(e)]=!0}));var r=Object.keys(t);return r.sort(),r.join("|")}return re(e)})).join("&")}function ie(e){if("string"===typeof e){if(e=e.toLowerCase(),32===Object(h.d)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+ne(e);if(u.a.isForkEvent(e))throw te.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+ne(e.topics||[])}throw new Error("invalid event - "+e)}function oe(){return(new Date).getTime()}function ae(e){return new Promise((function(t){setTimeout(t,e)}))}var se=["block","network","pending","poll"],ue=function(){function e(t,r,n){Object(a.a)(this,e),Object(V.d)(this,"tag",t),Object(V.d)(this,"listener",r),Object(V.d)(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}return Object(s.a)(e,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}},{key:"filter",get:function(){var e=this.tag.split(":");if("filter"!==e[0])return null;var t,r=e[1],n=""===(t=e[2])?[]:t.split(/&/g).map((function(e){if(""===e)return[];var t=e.split("|").map((function(e){return"null"===e?null:e}));return 1===t.length?t[0]:t})),i={};return n.length>0&&(i.topics=n),r&&"*"!==r&&(i.address=r),i}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||se.indexOf(this.tag)>=0}}]),e}(),ce={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function fe(e){return Object(h.g)(l.a.from(e).toHexString(),32)}function le(e){return f.a.encode(Object(h.b)([e,Object(h.e)(Object(K.c)(Object(K.c)(e)),0,4)]))}var he=new RegExp("^(ipfs)://(.*)$","i"),de=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),he,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function pe(e,t){try{return Object(p.d)(ve(e,t))}catch(r){}return null}function ve(e,t){if("0x"===e)return null;var r=l.a.from(Object(h.e)(e,t,t+32)).toNumber(),n=l.a.from(Object(h.e)(e,r,r+32)).toNumber();return Object(h.e)(e,r+32,r+32+n)}function me(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):te.throwArgumentError("unsupported IPFS format","link",e),"https://gateway.ipfs.io/ipfs/".concat(e)}function ge(e){var t=Object(h.a)(e);if(t.length>32)throw new Error("internal; should not happen");var r=new Uint8Array(32);return r.set(t,32-t.length),r}function be(e){if(e.length%32===0)return e;var t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function ye(e){for(var t=[],r=0,n=0;n=1&&o<=75)return le(Object(h.b)([[r.p2pkh],"0x"+i[2]]))}}if(null!=r.p2sh){var a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){var s=parseInt(a[1],16);if(a[2].length===2*s&&s>=1&&s<=75)return le(Object(h.b)([[r.p2sh],"0x"+a[2]]))}}if(null!=r.prefix){var u=n[1],c=n[0];if(0===c?20!==u&&32!==u&&(c=-1):c=-1,c>=0&&n.length===2+u&&u>=1&&u<=75){var f=Z.a.toWords(n.slice(2));return f.unshift(c),Z.a.encode(r.prefix,f)}}return null}},{key:"getAddress",value:function(e){return ee(this,void 0,void 0,$().mark((function t(){var r,n,i;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e&&(e=60),60!==e){t.next=16;break}return t.prev=2,t.next=5,this._fetch("0x3b3b57de");case 5:if("0x"!==(r=t.sent)&&r!==d.a){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",this.provider.formatter.callAddress(r));case 11:if(t.prev=11,t.t0=t.catch(2),t.t0.code!==m.a.errors.CALL_EXCEPTION){t.next=15;break}return t.abrupt("return",null);case 15:throw t.t0;case 16:return t.next=18,this._fetchBytes("0xf1cb7e06",fe(e));case 18:if(null!=(n=t.sent)&&"0x"!==n){t.next=21;break}return t.abrupt("return",null);case 21:return null==(i=this._getAddress(e,n))&&te.throwError("invalid or unsupported coin data",m.a.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")"),coinType:e,data:n}),t.abrupt("return",i);case 24:case"end":return t.stop()}}),t,this,[[2,11]])})))}},{key:"getAvatar",value:function(){return ee(this,void 0,void 0,$().mark((function e(){var t,r,n,i,o,a,s,u,c,f,d,p,v,m,g,b;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[{type:"name",content:this.name}],e.prev=1,e.next=4,this.getText("avatar");case 4:if(null!=(r=e.sent)){e.next=7;break}return e.abrupt("return",null);case 7:n=0;case 8:if(!(n=0?null:JSON.stringify({data:o,sender:i}),n.next=12,Object(X.a)({url:c,errorPassThrough:!0},f,(function(e,t){return e.status=t.statusCode,e}));case 12:if(!(l=n.sent).data){n.next=15;break}return n.abrupt("return",l.data);case 15:if(h=l.message||"unknown error",!(l.status>=400&&l.status<500)){n.next=18;break}return n.abrupt("return",te.throwError("response not found during CCIP fetch: ".concat(h),m.a.errors.SERVER_ERROR,{url:u,errorMessage:h}));case 18:a.push(h);case 19:s++,n.next=6;break;case 22:return n.abrupt("return",te.throwError("error encountered during CCIP fetch: ".concat(a.map((function(e){return JSON.stringify(e)})).join(", ")),m.a.errors.SERVER_ERROR,{urls:r,errorMessages:a}));case 23:case"end":return n.stop()}}),n,this)})))}},{key:"_getInternalBlockNumber",value:function(e){return ee(this,void 0,void 0,$().mark((function t(){var r,n,i,o,a=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:if(!(e>0)){t.next=20;break}case 3:if(!this._internalBlockNumber){t.next=20;break}return r=this._internalBlockNumber,t.prev=5,t.next=8,r;case 8:if(n=t.sent,!(oe()-n.respTime<=e)){t.next=11;break}return t.abrupt("return",n.blockNumber);case 11:return t.abrupt("break",20);case 14:if(t.prev=14,t.t0=t.catch(5),this._internalBlockNumber!==r){t.next=18;break}return t.abrupt("break",20);case 18:t.next=3;break;case 20:return i=oe(),o=Object(V.f)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(e){return null}),(function(e){return e}))}).then((function(e){var t=e.blockNumber,r=e.networkError;if(r)throw a._internalBlockNumber===o&&(a._internalBlockNumber=null),r;var n=oe();return(t=l.a.from(t).toNumber())1e3)te.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(n,")")),this.emit("error",te.makeError("network block skew detected",m.a.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(i=this._emitted.block+1;i<=n;i++)this.emit("block",i);return this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach((function(e){if("block"!==e){var t=o._emitted[e];"pending"!==t&&n-t>12&&delete o._emitted[e]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=n-1),this._events.forEach((function(e){switch(e.type){case"tx":var t=e.hash,i=o.getTransactionReceipt(t).then((function(e){return e&&null!=e.blockNumber?(o._emitted["t:"+t]=e.blockNumber,o.emit(t,e),null):null})).catch((function(e){o.emit("error",e)}));r.push(i);break;case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=n-1);var a=e.filter;a.fromBlock=e._lastBlockNumber+1,a.toBlock=n;var s=a.toBlock-o._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);var u=o.getLogs(a).then((function(t){e._inflight=!1,0!==t.length&&t.forEach((function(t){t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),o._emitted["b:"+t.blockHash]=t.blockNumber,o._emitted["t:"+t.transactionHash]=t.blockNumber,o.emit(a,t)}))})).catch((function(t){o.emit("error",t),e._inflight=!1}));r.push(u)}}})),this._lastBlockNumber=n,Promise.all(r).then((function(){o.emit("didPoll",t)})).catch((function(e){o.emit("error",e)})),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return ee(this,void 0,void 0,$().mark((function e(){return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",te.throwError("provider does not support network detection",m.a.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return e.stop()}}),e)})))}},{key:"getNetwork",value:function(){return ee(this,void 0,void 0,$().mark((function e(){var t,r,n;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:return t=e.sent,e.next=5,this.detectNetwork();case 5:if(r=e.sent,t.chainId===r.chainId){e.next=23;break}if(!this.anyNetwork){e.next=20;break}return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,t),e.next=19,ae(0);case 19:return e.abrupt("return",this._network);case 20:throw n=te.makeError("underlying network changed",m.a.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:r}),this.emit("error",n),n;case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"blockNumber",get:function(){var e=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(t){e._setFastBlockNumber(t)}),(function(e){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(e){var t=this;e&&!this._poller?(this._poller=setInterval((function(){t.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){t.poll(),t._bootstrapPoll=setTimeout((function(){t._poller||t.poll(),t._bootstrapPoll=null}),t.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(e){var t=this;if("number"!==typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){t.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var e=this,t=oe();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}},{key:"waitForTransaction",value:function(e,t,r){return ee(this,void 0,void 0,$().mark((function n(){return $().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this._waitForTransaction(e,null==t?1:t,r||0,null));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"_waitForTransaction",value:function(e,t,r,n){return ee(this,void 0,void 0,$().mark((function i(){var o,a=this;return $().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getTransactionReceipt(e);case 2:if(!(((o=i.sent)?o.confirmations:0)>=t)){i.next=5;break}return i.abrupt("return",o);case 5:return i.abrupt("return",new Promise((function(i,o){var s=[],u=!1,c=function(){return!!u||(u=!0,s.forEach((function(e){e()})),!1)},f=function(e){e.confirmations0){var p=setTimeout((function(){c()||o(te.makeError("timeout exceeded",m.a.errors.TIMEOUT,{timeout:r}))}),r);p.unref&&p.unref(),s.push((function(){clearTimeout(p)}))}})));case 6:case"end":return i.stop()}}),i,this)})))}},{key:"getBlockNumber",value:function(){return ee(this,void 0,void 0,$().mark((function e(){return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return ee(this,void 0,void 0,$().mark((function e(){var t;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,this.perform("getGasPrice",{});case 4:return t=e.sent,e.prev=5,e.abrupt("return",l.a.from(t));case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",te.throwError("bad result from backend",m.a.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e.t0}));case 12:case"end":return e.stop()}}),e,this,[[5,9]])})))}},{key:"getBalance",value:function(e,t){return ee(this,void 0,void 0,$().mark((function r(){var n,i;return $().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,Object(V.f)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getBalance",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",l.a.from(i));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",te.throwError("bad result from backend",m.a.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(e,t){return ee(this,void 0,void 0,$().mark((function r(){var n,i;return $().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,Object(V.f)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getTransactionCount",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",l.a.from(i).toNumber());case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",te.throwError("bad result from backend",m.a.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getCode",value:function(e,t){return ee(this,void 0,void 0,$().mark((function r(){var n,i;return $().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,Object(V.f)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getCode",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",Object(h.h)(i));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",te.throwError("bad result from backend",m.a.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getStorageAt",value:function(e,t,r){return ee(this,void 0,void 0,$().mark((function n(){var i,o;return $().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,Object(V.f)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((function(e){return Object(h.f)(e)}))});case 4:return i=n.sent,n.next=7,this.perform("getStorageAt",i);case 7:return o=n.sent,n.prev=8,n.abrupt("return",Object(h.h)(o));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",te.throwError("bad result from backend",m.a.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(e,t,r){var n=this;if(null!=t&&32!==Object(h.d)(t))throw new Error("invalid response - sendTransaction");var i=e;return null!=t&&e.hash!==t&&te.throwError("Transaction hash mismatch from Provider.sendTransaction.",m.a.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=function(t,i){return ee(n,void 0,void 0,$().mark((function n(){var o,a;return $().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==t&&(t=1),null==i&&(i=0),o=void 0,0!==t&&null!=r&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r}),n.next=6,this._waitForTransaction(e.hash,t,i,o);case 6:if(null!=(a=n.sent)||0!==t){n.next=9;break}return n.abrupt("return",null);case 9:return this._emitted["t:"+e.hash]=a.blockNumber,0===a.status&&te.throwError("transaction failed",m.a.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:a}),n.abrupt("return",a);case 12:case"end":return n.stop()}}),n,this)})))},i}},{key:"sendTransaction",value:function(e){return ee(this,void 0,void 0,$().mark((function t(){var r,n,i,o;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,Promise.resolve(e).then((function(e){return Object(h.h)(e)}));case 4:return r=t.sent,null==(n=this.formatter.transaction(e)).confirmations&&(n.confirmations=0),t.next=9,this._getInternalBlockNumber(100+2*this.pollingInterval);case 9:return i=t.sent,t.prev=10,t.next=13,this.perform("sendTransaction",{signedTransaction:r});case 13:return o=t.sent,t.abrupt("return",this._wrapTransaction(n,o,i));case 17:throw t.prev=17,t.t0=t.catch(10),t.t0.transaction=n,t.t0.transactionHash=n.hash,t.t0;case 22:case"end":return t.stop()}}),t,this,[[10,17]])})))}},{key:"_getTransactionRequest",value:function(e){return ee(this,void 0,void 0,$().mark((function t(){var r,n,i=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return r=t.sent,n={},["from","to"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?i._getAddress(e):null})))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?l.a.from(e):null})))})),["type"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return null!=e?e:null})))})),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?Object(h.h)(e):null})))})),t.t0=this.formatter,t.next=12,Object(V.f)(n);case 12:return t.t1=t.sent,t.abrupt("return",t.t0.transactionRequest.call(t.t0,t.t1));case 14:case"end":return t.stop()}}),t,this)})))}},{key:"_getFilter",value:function(e){return ee(this,void 0,void 0,$().mark((function t(){var r,n=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,r={},null!=e.address&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach((function(t){null!=e[t]&&(r[t]=e[t])})),["fromBlock","toBlock"].forEach((function(t){null!=e[t]&&(r[t]=n._getBlockTag(e[t]))})),t.t0=this.formatter,t.next=10,Object(V.f)(r);case 10:return t.t1=t.sent,t.abrupt("return",t.t0.filter.call(t.t0,t.t1));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"_call",value:function(e,t,r){return ee(this,void 0,void 0,$().mark((function n(){var i,o,a,s,u,c,f,d,p,v,g,b,y,w,k;return $().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r>=10&&te.throwError("CCIP read exceeded maximum redirections",m.a.errors.SERVER_ERROR,{redirects:r,transaction:e}),i=e.to,n.next=4,this.perform("call",{transaction:e,blockTag:t});case 4:if(o=n.sent,!(r>=0&&"latest"===t&&null!=i&&"0x556f1830"===o.substring(0,10)&&Object(h.d)(o)%32===4)){n.next=31;break}for(n.prev=6,a=Object(h.e)(o,4),s=Object(h.e)(a,0,32),l.a.from(s).eq(i)||te.throwError("CCIP Read sender did not match",m.a.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),u=[],c=l.a.from(Object(h.e)(a,32,64)).toNumber(),f=l.a.from(Object(h.e)(a,c,c+32)).toNumber(),d=Object(h.e)(a,c+32),p=0;pthis._emitted.block)){e.next=10;break}return e.abrupt("return",null);case 10:return e.abrupt("return",void 0);case 11:if(!t){e.next=34;break}o=null,a=0;case 14:if(!(a0}},{key:"_stopEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_addEventListener",value:function(e,t,r){var n=new ue(ie(e),t,r);return this._events.push(n),this._startEvent(n),this}},{key:"on",value:function(e,t){return this._addEventListener(e,t,!1)}},{key:"once",value:function(e,t){return this._addEventListener(e,t,!0)}},{key:"emit",value:function(e){for(var t=this,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},d=function(){return!("undefined"===typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},p=function(e){var t=d();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)};function v(e){return(v="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var r=0;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var E="mobile",A="tablet",S="smarttv",O="console",M="wearable",P=void 0,j={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},T={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},C={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},R=function(e,t,r,n){return function(e){for(var t=1;t1)&&!window.MSStream}(),ge=F(),be=p("iPhone"),ye=p("iPod"),we=function(){var e=d(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"===typeof t&&/electron/.test(t)}(),ke=N(),xe=B()&&!N(),_e=f.name===T.Windows,Ee=f.name===T.MAC_OS,Ae=s.name===j.MIUI,Se=s.name===j.SamsungBrowser;t.AndroidView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=x(e,["renderWithFragment","children","viewClassName","style"]);return W?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},s),r):null},t.BrowserTypes=j,t.BrowserView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=x(e,["renderWithFragment","children","viewClassName","style"]);return K?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},s),r):null},t.ConsoleView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=x(e,["renderWithFragment","children","viewClassName","style"]);return U?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},s),r):null},t.CustomView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=e.condition,u=x(e,["renderWithFragment","children","viewClassName","style","condition"]);return s?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},u),r):null},t.IEView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=x(e,["renderWithFragment","children","viewClassName","style"]);return re?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},s),r):null},t.IOSView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=x(e,["renderWithFragment","children","viewClassName","style"]);return Y?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},s),r):null},t.MobileOnlyView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=x(e,["renderWithFragment","children","viewClassName","style"]);return J?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},s),r):null},t.MobileView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=x(e,["renderWithFragment","children","viewClassName","style"]);return G?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},s),r):null},t.OsTypes=T,t.SmartTVView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=x(e,["renderWithFragment","children","viewClassName","style"]);return D?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},s),r):null},t.TabletView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=x(e,["renderWithFragment","children","viewClassName","style"]);return V?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},s),r):null},t.WearableView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=x(e,["renderWithFragment","children","viewClassName","style"]);return z?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},s),r):null},t.WinPhoneView=function(e){var t=e.renderWithFragment,r=e.children,n=e.viewClassName,a=e.style,s=x(e,["renderWithFragment","children","viewClassName","style"]);return Z?t?o.createElement(i.Fragment,null,r):o.createElement("div",b({className:n,style:a},s),r):null},t.browserName=se,t.browserVersion=ae,t.deviceDetect=function(){var e=L.isBrowser,t=L.isMobile,r=L.isTablet,n=L.isSmartTV,i=L.isConsole,o=L.isWearable;return e?function(e,t,r,n,i){return{isBrowser:e,browserMajorVersion:h(t.major),browserFullVersion:h(t.version),browserName:h(t.name),engineName:h(r.name),engineVersion:h(r.version),osName:h(n.name),osVersion:h(n.version),userAgent:h(i)}}(e,s,c,f,l):n?function(e,t,r,n){return{isSmartTV:e,engineName:h(t.name),engineVersion:h(t.version),osName:h(r.name),osVersion:h(r.version),userAgent:h(n)}}(n,c,f,l):i?function(e,t,r,n){return{isConsole:e,engineName:h(t.name),engineVersion:h(t.version),osName:h(r.name),osVersion:h(r.version),userAgent:h(n)}}(i,c,f,l):t||r?R(L,u,f,l):o?function(e,t,r,n){return{isWearable:e,engineName:h(t.name),engineVersion:h(t.version),osName:h(r.name),osVersion:h(r.version),userAgent:h(n)}}(o,c,f,l):void 0},t.deviceType=ve,t.engineName=fe,t.engineVersion=le,t.fullBrowserVersion=oe,t.getUA=he,t.isAndroid=W,t.isBrowser=K,t.isChrome=Q,t.isChromium=q,t.isConsole=U,t.isDesktop=X,t.isEdge=de,t.isEdgeChromium=ke,t.isElectron=we,t.isFirefox=$,t.isIE=re,t.isIOS=Y,t.isIOS13=me,t.isIPad13=ge,t.isIPhone13=be,t.isIPod13=ye,t.isLegacyEdge=xe,t.isMIUI=Ae,t.isMacOs=Ee,t.isMobile=G,t.isMobileOnly=J,t.isMobileSafari=H,t.isOpera=te,t.isSafari=ee,t.isSamsungBrowser=Se,t.isSmartTV=D,t.isTablet=V,t.isWearable=z,t.isWinPhone=Z,t.isWindows=_e,t.isYandex=pe,t.mobileModel=ce,t.mobileVendor=ue,t.osName=ie,t.osVersion=ne,t.withOrientationChange=function(e){return function(t){function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(t=function(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?_(e):t}(this,w(r).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(_(t)),t.onOrientationChange=t.onOrientationChange.bind(_(t)),t.onPageLoad=t.onPageLoad.bind(_(t)),t.state={isLandscape:!1,isPortrait:!1},t}var n,i,a;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(r,t),n=r,(i=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"===typeof window?"undefined":v(window))&&G&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return o.createElement(e,b({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}])&&m(n.prototype,i),a&&m(n,a),r}(o.Component)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(46),i=r(64);function o(e){return Object(n.keccak256)(Object(i.f)(e))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return Me})),r.d(t,"b",(function(){return X})),r.d(t,"c",(function(){return Q}));var n=r(31),i=r(97),o=r(20),a=r(14),s=r(15),u=r(6),c=r(7),f=r(17),l=r(19),h=r(47),d=r(1),p=r.n(d),v={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"===typeof e},str:function(e){return"string"===typeof e},num:function(e){return"number"===typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!==typeof t)return!1;if(v.str(e)||v.num(e))return e===t;if(v.obj(e)&&v.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!v.und(r)||e===t}};function m(){var e=Object(d.useState)(!1)[1];return Object(d.useCallback)((function(){return e((function(e){return!e}))}),[])}function g(e,t){return v.und(e)||v.nul(e)?t:e}function b(e){return v.und(e)?[]:v.arr(e)?e:[e]}function y(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=h.startTime+u.duration;else if(u.decay)v=d+g/(1-.998)*(1-Math.exp(-(1-.998)*(r-h.startTime))),(c=Math.abs(h.lastPosition-v)<.1)&&(p=v);else{f=void 0!==h.lastTime?h.lastTime:r,g=void 0!==h.lastVelocity?h.lastVelocity:u.initialVelocity,r>f+64&&(f=r);for(var b=Math.floor(r-f),y=0;yp:v=e);++r);return r-1}(e,o);return function(e,t,r,n,i,o,a,s,u){var c=u?u(e):e;if(cr){if("identity"===s)return c;"clamp"===s&&(c=r)}if(n===i)return n;if(t===r)return e<=t?n:i;t===-1/0?c=-c:r===1/0?c-=t:c=(c-t)/(r-t);c=o(c),n===-1/0?c=-c:i===1/0?c+=n:c=c*(i-n)+n;return c}(e,o[t],o[t+1],i[t],i[t+1],u,a,s,n.map)}}var H=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(e,n,i,o){var a;return Object(u.a)(this,r),(a=t.call(this)).calc=void 0,a.payload=e instanceof E&&!(e instanceof r)?e.getPayload():Array.isArray(e)?e:[e],a.calc=z(n,i,o),a}return Object(c.a)(r,[{key:"getValue",value:function(){return this.calc.apply(this,Object(n.a)(this.payload.map((function(e){return e.getValue()}))))}},{key:"updateConfig",value:function(e,t,r){this.calc=z(e,t,r)}},{key:"interpolate",value:function(e,t,n){return new r(this,e,t,n)}}]),r}(E);var q=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(e){var n,i;return Object(u.a)(this,r),n=t.call(this),i=Object(o.a)(n),n.animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),i.value=e,t&&i.flush()},n.value=e,n.startPosition=e,n.lastPosition=e,n}return Object(c.a)(r,[{key:"flush",value:function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))}},{key:"clearStyles",value:function(){this.animatedStyles.clear()}},{key:"getValue",value:function(){return this.value}},{key:"interpolate",value:function(e,t,r){return new H(this,e,t,r)}}]),r}(_),G=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(e){var n;return Object(u.a)(this,r),(n=t.call(this)).payload=e.map((function(e){return new q(e)})),n}return Object(c.a)(r,[{key:"setValue",value:function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))}},{key:"getValue",value:function(){return this.payload.map((function(e){return e.getValue()}))}},{key:"interpolate",value:function(e,t){return new H(this,e,t)}}]),r}(E),J=0,V=function(){function e(){var t=this;Object(u.a)(this,e),this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return t.interpolations},this.id=J++}return Object(c.a)(e,[{key:"update",value:function(e){if(!e)return this;var t=w(e),r=t.delay,n=void 0===r?0:r,i=t.to,o=Object(h.a)(t,["delay","to"]);if(v.arr(i)||v.fun(i))this.queue.push(Object(l.a)({},o,{delay:n,to:i}));else if(i){var a={};Object.entries(i).forEach((function(e){var t=e[0],r=e[1],i=Object(l.a)({to:Object(f.a)({},t,r),delay:y(n,t)},o),s=a[i.delay]&&a[i.delay].to;a[i.delay]=Object(l.a)({},a[i.delay],i,{to:Object(l.a)({},s,i.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(o),this}},{key:"start",value:function(e){var t,r=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,n=void 0===t?{}:t,i=e.to,o=void 0===i?{}:i;v.obj(n)&&(r.merged=Object(l.a)({},n,r.merged)),v.obj(o)&&(r.merged=Object(l.a)({},r.merged,o))}));var n=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,s=Object(h.a)(t,["delay"]),u=function(t){o===i.length-1&&n===r.guid&&t&&(r.idle=!0,r.props.onRest&&r.props.onRest(r.merged)),e&&e()},c=v.arr(s.to)||v.fun(s.to);a?setTimeout((function(){n===r.guid&&(c?r.runAsync(s,u):r.diff(s).start(u))}),a):c?r.runAsync(s,u):r.diff(s).start(u)}))}else v.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,D.has(t)||D.add(t),F||(F=!0,P(L||U));return this}},{key:"stop",value:function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this}},{key:"pause",value:function(e){var t;return this.stop(!0),e&&(t=this,D.has(t)&&D.delete(t)),this}},{key:"runAsync",value:function(e,t){var r=this,n=this,i=(e.delay,Object(h.a)(e,["delay"])),o=this.local,a=Promise.resolve(void 0);if(v.arr(i.to))for(var s=function(){var e=u,t=Object(l.a)({},i,w(i.to[e]));v.arr(t.config)&&(t.config=t.config[e]),a=a.then((function(){if(o===r.guid)return new Promise((function(e){return r.diff(t).start(e)}))}))},u=0;u0&&$(_),v&&v(u,t,r))},onStart:g&&function(){return g(u,t)},onFrame:p&&function(e){return p(u,t,e)},delay:o,reset:c&&"enter"===t});h.update(d),_.current.paused||h.start()})),Object(d.useEffect)((function(){return _.current.mounted=x.current=!0,function(){_.current.mounted=x.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:_.current.instances.get(n).getValues()}}))}function $(e,t){var r,n=e.current.deleted,o=Object(i.a)(n);try{var a=function(){var n=r.value.key,i=function(e){return e.key!==n};(v.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))};for(o.s();!(r=o.n()).done;)a()}catch(s){o.e(s)}finally{o.f()}e.current.forceUpdate()}var ee=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(e){var n;return Object(u.a)(this,r),void 0===e&&(e={}),n=t.call(this),!e.transform||e.transform instanceof _||(e=k.transform(e)),n.payload=e,n}return Object(c.a)(r)}(A),te={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},re="[-+]?\\d*\\.?\\d+";function ne(){for(var e=arguments.length,t=new Array(e),r=0;r1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function de(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,i=2*r-n,o=he(i,n,e+1/3),a=he(i,n,e),s=he(i,n,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function pe(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function ve(e){return(parseFloat(e)%360+360)%360/360}function me(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ge(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function be(e){var t=function(e){var t;return"number"===typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=fe.exec(e))?parseInt(t[1]+"ff",16)>>>0:te.hasOwnProperty(e)?te[e]:(t=ie.exec(e))?(pe(t[1])<<24|pe(t[2])<<16|pe(t[3])<<8|255)>>>0:(t=oe.exec(e))?(pe(t[1])<<24|pe(t[2])<<16|pe(t[3])<<8|me(t[4]))>>>0:(t=ue.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=le.exec(e))?parseInt(t[1],16)>>>0:(t=ce.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ae.exec(e))?(255|de(ve(t[1]),ge(t[2]),ge(t[3])))>>>0:(t=se.exec(e))?(de(ve(t[1]),ge(t[2]),ge(t[3]))|me(t[4]))>>>0:null}(e);if(null===t)return e;var r=(16711680&(t=t||0))>>>16,n=(65280&t)>>>8,i=(255&t)/255;return"rgba(".concat((4278190080&t)>>>24,", ").concat(r,", ").concat(n,", ").concat(i,")")}var ye=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,we=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ke=new RegExp("(".concat(Object.keys(te).join("|"),")"),"g"),xe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_e=["Webkit","Ms","Moz","O"];function Ee(e,t,r){return null==t||"boolean"===typeof t||""===t?"":r||"number"!==typeof t||0===t||xe.hasOwnProperty(e)&&xe[e]?(""+t).trim():t+"px"}xe=Object.keys(xe).reduce((function(e,t){return _e.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),xe);var Ae={};I((function(e){return new ee(e)})),C("div"),j((function(e){var t=e.output.map((function(e){return e.replace(we,be)})).map((function(e){return e.replace(ke,be)})),r=t[0].match(ye).map((function(){return[]}));t.forEach((function(e){e.match(ye).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(ye).map((function(t,n){return z(Object(l.a)({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(ye,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,i){return"rgba(".concat(Math.round(t),", ").concat(Math.round(r),", ").concat(Math.round(n),", ").concat(i,")")}))}})),O(te),S((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,i=t.scrollTop,o=t.scrollLeft,a=Object(h.a)(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var u in void 0!==i&&(e.scrollTop=i),void 0!==o&&(e.scrollLeft=o),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(u)){var c=0===u.indexOf("--"),f=Ee(u,r[u],c);"float"===u&&(u="cssFloat"),c?e.style.setProperty(u,f):e.style[u]=f}for(var l in a){var d=s?l:Ae[l]||(Ae[l]=l.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));"undefined"!==typeof e.getAttribute(d)&&e.setAttribute(d,a[l])}}),(function(e){return e}));var Se,Oe,Me=(Se=function(e){return Object(d.forwardRef)((function(t,r){var n=m(),i=Object(d.useRef)(!0),o=Object(d.useRef)(null),a=Object(d.useRef)(null),s=Object(d.useCallback)((function(e){var t=o.current;o.current=new B(e,(function(){var e=!1;a.current&&(e=k.fn(a.current,o.current.getAnimatedValue())),a.current&&!1!==e||n()})),t&&t.detach()}),[]);Object(d.useEffect)((function(){return function(){i.current=!1,o.current&&o.current.detach()}}),[]),Object(d.useImperativeHandle)(r,(function(){return N(a,i,n)})),s(t);var u,c=o.current.getValue(),f=(c.scrollTop,c.scrollLeft,Object(h.a)(c,["scrollTop","scrollLeft"])),g=(u=e,!v.fun(u)||u.prototype instanceof p.a.Component?function(e){return a.current=function(e,t){return t&&(v.fun(t)?t(e):v.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return p.a.createElement(e,Object(l.a)({},f,{ref:g}))}))},void 0===(Oe=!1)&&(Oe=!0),function(e){return(v.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=Oe?t[0].toLowerCase()+t.substring(1):t;return e[r]=Se(r),e}),Se)})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"])},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function r(e,t){for(var r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return a}));var n=r(38);function i(e){var t=null;try{t=JSON.parse(e)}catch(r){return!1}return t.encseed&&t.ethaddr}function o(e){var t=null;try{t=JSON.parse(e)}catch(r){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}function a(e){if(i(e))try{return Object(n.a)(JSON.parse(e).ethaddr)}catch(t){return null}if(o(e))try{return Object(n.a)(JSON.parse(e).address)}catch(t){return null}return null}},function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=new(r(10).a)("networks/5.7.1");function i(e){var t=function(t,r){null==r&&(r={});var n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(s){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(s){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(s){}if(t.PocketProvider&&"-"!==r.pocket){try{var i=new t.PocketProvider(e,r.pocket);i.network&&-1===["goerli","ropsten","rinkeby","sepolia"].indexOf(i.network.name)&&n.push(i)}catch(s){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(s){}if(t.AnkrProvider&&"-"!==r.ankr)try{var o=new t.AnkrProvider(e,r.ankr);o.network&&-1===["ropsten"].indexOf(o.network.name)&&n.push(o)}catch(s){}if(0===n.length)return null;if(t.FallbackProvider){var a=1;return null!=r.quorum?a=r.quorum:"homestead"===e&&(a=2),new t.FallbackProvider(n,a)}return n[0]};return t.renetwork=function(e){return i(e)},t}function o(e,t){var r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return o(e,t)},r}var a={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:i("homestead")},s={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:i("ropsten")},u={chainId:63,name:"classicMordor",_defaultProvider:o("https://www.ethercluster.com/mordor","classicMordor")},c={unspecified:{chainId:0,name:"unspecified"},homestead:a,mainnet:a,morden:{chainId:2,name:"morden"},ropsten:s,testnet:s,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:i("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:i("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:i("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:i("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:o("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:u,classicTestnet:u,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:o("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:i("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:i("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function f(e){if(null==e)return null;if("number"===typeof e){for(var t in c){var r=c[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"===typeof e){var i=c[e];return null==i?null:{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress,_defaultProvider:i._defaultProvider||null}}var o=c[e.name];if(!o)return"number"!==typeof e.chainId&&n.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==o.chainId&&n.throwArgumentError("network chainId mismatch","network",e);var a,s=e._defaultProvider||null;return null==s&&o._defaultProvider&&(s=(a=o._defaultProvider)&&"function"===typeof a.renetwork?o._defaultProvider.renetwork(e):o._defaultProvider),{name:e.name,chainId:o.chainId,ensAddress:e.ensAddress||o.ensAddress||null,_defaultProvider:s}}},function(e,t,r){"use strict";var n=r(122),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,n){if("string"!==typeof r){if(p){var i=d(r);i&&i!==p&&e(t,i,n)}var a=f(r);l&&(a=a.concat(l(r)));for(var s=u(t),v=u(r),m=0;m=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var c,f=[].concat(function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}var l=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},h=new c.a("abstract-signer/5.7.0"),d=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],p=[c.a.errors.INSUFFICIENT_FUNDS,c.a.errors.NONCE_EXPIRED,c.a.errors.REPLACEMENT_UNDERPRICED],v=function(){function e(){Object(a.a)(this,e),h.checkAbstract(this instanceof e?this.constructor:void 0,e),Object(u.d)(this,"_isSigner",!0)}return Object(s.a)(e,[{key:"getBalance",value:function(e){return l(this,void 0,void 0,f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getBalance"),t.next=3,this.provider.getBalance(this.getAddress(),e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getTransactionCount",value:function(e){return l(this,void 0,void 0,f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getTransactionCount"),t.next=3,this.provider.getTransactionCount(this.getAddress(),e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"estimateGas",value:function(e){return l(this,void 0,void 0,f().mark((function t(){var r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("estimateGas"),t.next=3,Object(u.f)(this.checkTransaction(e));case 3:return r=t.sent,t.next=6,this.provider.estimateGas(r);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"call",value:function(e,t){return l(this,void 0,void 0,f().mark((function r(){var n;return f().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this._checkProvider("call"),r.next=3,Object(u.f)(this.checkTransaction(e));case 3:return n=r.sent,r.next=6,this.provider.call(n,t);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"sendTransaction",value:function(e){return l(this,void 0,void 0,f().mark((function t(){var r,n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("sendTransaction"),t.next=3,this.populateTransaction(e);case 3:return r=t.sent,t.next=6,this.signTransaction(r);case 6:return n=t.sent,t.next=9,this.provider.sendTransaction(n);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"getChainId",value:function(){return l(this,void 0,void 0,f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getChainId"),e.next=3,this.provider.getNetwork();case 3:return t=e.sent,e.abrupt("return",t.chainId);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return l(this,void 0,void 0,f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getGasPrice"),e.next=3,this.provider.getGasPrice();case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"getFeeData",value:function(){return l(this,void 0,void 0,f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getFeeData"),e.next=3,this.provider.getFeeData();case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"resolveName",value:function(e){return l(this,void 0,void 0,f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("resolveName"),t.next=3,this.provider.resolveName(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"checkTransaction",value:function(e){for(var t in e)-1===d.indexOf(t)&&h.throwArgumentError("invalid transaction key: "+t,"transaction",e);var r=Object(u.g)(e);return null==r.from?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then((function(t){return t[0].toLowerCase()!==t[1].toLowerCase()&&h.throwArgumentError("from address mismatch","transaction",e),t[0]})),r}},{key:"populateTransaction",value:function(e){return l(this,void 0,void 0,f().mark((function t(){var r,n,i,o,a=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.f)(this.checkTransaction(e));case 2:if(null!=(r=t.sent).to&&(r.to=Promise.resolve(r.to).then((function(e){return l(a,void 0,void 0,f().mark((function t(){var r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=e){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this.resolveName(e);case 4:return null==(r=t.sent)&&h.throwArgumentError("provided ENS name resolves to null","tx.to",e),t.abrupt("return",r);case 7:case"end":return t.stop()}}),t,this)})))})),r.to.catch((function(e){}))),n=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas,null==r.gasPrice||2!==r.type&&!n?0!==r.type&&1!==r.type||!n||h.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):h.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas){t.next=10;break}r.type=2,t.next=18;break;case 10:if(0!==r.type&&1!==r.type){t.next=14;break}null==r.gasPrice&&(r.gasPrice=this.getGasPrice()),t.next=18;break;case 14:return t.next=16,this.getFeeData();case 16:i=t.sent,null==r.type?null!=i.maxFeePerGas&&null!=i.maxPriorityFeePerGas?(r.type=2,null!=r.gasPrice?(o=r.gasPrice,delete r.gasPrice,r.maxFeePerGas=o,r.maxPriorityFeePerGas=o):(null==r.maxFeePerGas&&(r.maxFeePerGas=i.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))):null!=i.gasPrice?(n&&h.throwError("network does not support EIP-1559",c.a.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=i.gasPrice),r.type=0):h.throwError("failed to get consistent fee data",c.a.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"}):2===r.type&&(null==r.maxFeePerGas&&(r.maxFeePerGas=i.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas));case 18:return null==r.nonce&&(r.nonce=this.getTransactionCount("pending")),null==r.gasLimit&&(r.gasLimit=this.estimateGas(r).catch((function(e){if(p.indexOf(e.code)>=0)throw e;return h.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",c.a.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:r})}))),null==r.chainId?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then((function(t){return 0!==t[1]&&t[0]!==t[1]&&h.throwArgumentError("chainId address mismatch","transaction",e),t[0]})),t.next=23,Object(u.f)(r);case 23:return t.abrupt("return",t.sent);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"_checkProvider",value:function(e){this.provider||h.throwError("missing provider",c.a.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}}],[{key:"isSigner",value:function(e){return!(!e||!e._isSigner)}}]),e}(),m=function(e){Object(i.a)(r,e);var t=Object(o.a)(r);function r(e,i){var o;return Object(a.a)(this,r),o=t.call(this),Object(u.d)(Object(n.a)(o),"address",e),Object(u.d)(Object(n.a)(o),"provider",i||null),o}return Object(s.a)(r,[{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"_fail",value:function(e,t){return Promise.resolve().then((function(){h.throwError(e,c.a.errors.UNSUPPORTED_OPERATION,{operation:t})}))}},{key:"signMessage",value:function(e){return this._fail("VoidSigner cannot sign messages","signMessage")}},{key:"signTransaction",value:function(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}},{key:"_signTypedData",value:function(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}},{key:"connect",value:function(e){return new r(this.address,e)}}]),r}(v)},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(43),i=r(30);function o(e,t){if(t&&("object"===Object(n.a)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Object(i.a)(e)}},function(e,t,r){var n;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,c="[BigNumber Error] ",f=c+"Number primitive has more than 15 significant digits: ",l=1e14,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function v(e){for(var t,r,n=1,i=e.length,o=e[0]+"";nc^r?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;ao[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function g(e,t,r,n){if(er||e!==u(e))throw Error(c+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function b(e){var t=e.c.length-1;return p(e.e/14)==t&&e.c[t]%2!=0}function y(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function w(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else tO?v.c=v.e=null:e.e=10;l/=10,c++);return void(c>O?v.c=v.e=null:(v.e=c,v.c=[e]))}p=String(e)}else{if(!a.test(p=String(e)))return i(v,p,h);v.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(c=p.indexOf("."))>-1&&(p=p.replace(".","")),(l=p.search(/e/i))>0?(c<0&&(c=l),c+=+p.slice(l+1),p=p.substring(0,l)):c<0&&(c=p.length)}else{if(g(t,2,C.length,"Base"),10==t&&R)return F(v=new L(e),x+v.e+1,_);if(p=String(e),h="number"==typeof e){if(0*e!=0)return i(v,p,h,t);if(v.s=1/e<0?(p=p.slice(1),-1):1,L.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else v.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(r=C.slice(0,t),c=l=0,d=p.length;lc){c=d;continue}}else if(!s&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){s=!0,l=-1,c=0;continue}return i(v,String(e),h,t)}h=!1,(c=(p=n(p,t,10,v.s)).indexOf("."))>-1?p=p.replace(".",""):c=p.length}for(l=0;48===p.charCodeAt(l);l++);for(d=p.length;48===p.charCodeAt(--d););if(p=p.slice(l,++d)){if(d-=l,h&&L.DEBUG&&d>15&&(e>9007199254740991||e!==u(e)))throw Error(f+v.s*e);if((c=c-l-1)>O)v.c=v.e=null;else if(c=A)?y(u,a):w(u,a,"0");else if(o=(e=F(new L(e),t,r)).e,s=(u=v(e.c)).length,1==n||2==n&&(t<=o||o<=E)){for(;ss){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-s)>0)for(o+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function I(e,t){for(var r,n=1,i=new L(e[0]);n=10;i/=10,n++);return(r=n+14*r-1)>O?e.c=e.e=null:r=10;c/=10,i++);if((o=t-i)<0)o+=14,a=t,p=(f=v[d=0])/m[i-a-1]%10|0;else if((d=s((o+1)/14))>=v.length){if(!n)break e;for(;v.length<=d;v.push(0));f=p=0,i=1,a=(o%=14)-14+1}else{for(f=c=v[d],i=1;c>=10;c/=10,i++);p=(a=(o%=14)-14+i)<0?0:f/m[i-a-1]%10|0}if(n=n||t<0||null!=v[d+1]||(a<0?f:f%m[i-a-1]),n=r<4?(p||n)&&(0==r||r==(e.s<0?3:2)):p>5||5==p&&(4==r||n||6==r&&(o>0?a>0?f/m[i-a]:0:v[d-1])%10&1||r==(e.s<0?8:7)),t<1||!v[0])return v.length=0,n?(t-=e.e+1,v[0]=m[(14-t%14)%14],e.e=-t||0):v[0]=e.e=0,e;if(0==o?(v.length=d,c=1,d--):(v.length=d+1,c=m[14-o],v[d]=a>0?u(f/m[i-a]%m[a])*c:0),n)for(;;){if(0==d){for(o=1,a=v[0];a>=10;a/=10,o++);for(a=v[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(e.e++,v[0]==l&&(v[0]=1));break}if(v[d]+=c,v[d]!=l)break;v[d--]=0,c=1}for(o=v.length;0===v[--o];v.pop());}e.e>O?e.c=e.e=null:e.e=A?y(t,r):w(t,r,"0"),e.s<0?"-"+t:t)}return L.clone=e,L.ROUND_UP=0,L.ROUND_DOWN=1,L.ROUND_CEIL=2,L.ROUND_FLOOR=3,L.ROUND_HALF_UP=4,L.ROUND_HALF_DOWN=5,L.ROUND_HALF_EVEN=6,L.ROUND_HALF_CEIL=7,L.ROUND_HALF_FLOOR=8,L.EUCLID=9,L.config=L.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(g(r=e[t],0,d,t),x=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(g(r=e[t],0,8,t),_=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(g(r[0],-d,0,t),g(r[1],0,d,t),E=r[0],A=r[1]):(g(r,-d,d,t),E=-(A=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)g(r[0],-d,-1,t),g(r[1],1,d,t),S=r[0],O=r[1];else{if(g(r,-d,d,t),!r)throw Error(c+t+" cannot be zero: "+r);S=-(O=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(c+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw M=!r,Error(c+"crypto unavailable");M=r}else M=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(g(r=e[t],0,9,t),P=r),e.hasOwnProperty(t="POW_PRECISION")&&(g(r=e[t],0,d,t),j=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(c+t+" not an object: "+r);T=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(c+t+" invalid: "+r);R="0123456789"==r.slice(0,10),C=r}}return{DECIMAL_PLACES:x,ROUNDING_MODE:_,EXPONENTIAL_AT:[E,A],RANGE:[S,O],CRYPTO:M,MODULO_MODE:P,POW_PRECISION:j,FORMAT:T,ALPHABET:C}},L.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!L.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-d&&i<=d&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%14)<1&&(t+=14),String(n[0]).length==t){for(t=0;t=l||r!==u(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},L.maximum=L.max=function(){return I(arguments,o.lt)},L.minimum=L.min=function(){return I(arguments,o.gt)},L.random=function(){var e=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,n,i,o,a,f=0,l=[],p=new L(k);if(null==t?t=x:g(t,0,d),o=s(t/14),M)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(o*=2));f>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[f]=n[0],r[f+1]=n[1]):(l.push(a%1e14),f+=2);f=o/2}else{if(!crypto.randomBytes)throw M=!1,Error(c+"crypto unavailable");for(r=crypto.randomBytes(o*=7);f=9e15?crypto.randomBytes(7).copy(r,f):(l.push(a%1e14),f+=7);f=o/7}if(!M)for(;f=10;a/=10,f++);f<14&&(i-=14-f)}return p.e=i,p.c=l,p}}(),L.sum=function(){for(var e=1,t=arguments,r=new L(t[0]);er-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(t,n,i,o,a){var s,u,c,f,l,h,d,p,m=t.indexOf("."),g=x,b=_;for(m>=0&&(f=j,j=0,t=t.replace(".",""),h=(p=new L(n)).pow(t.length-m),j=f,p.c=e(w(v(h.c),h.e,"0"),10,i,"0123456789"),p.e=p.c.length),c=f=(d=e(t,n,i,a?(s=C,"0123456789"):(s="0123456789",C))).length;0==d[--f];d.pop());if(!d[0])return s.charAt(0);if(m<0?--c:(h.c=d,h.e=c,h.s=o,d=(h=r(h,p,g,b,i)).c,l=h.r,c=h.e),m=d[u=c+g+1],f=i/2,l=l||u<0||null!=d[u+1],l=b<4?(null!=m||l)&&(0==b||b==(h.s<0?3:2)):m>f||m==f&&(4==b||l||6==b&&1&d[u-1]||b==(h.s<0?8:7)),u<1||!d[0])t=l?w(s.charAt(1),-g,s.charAt(0)):s.charAt(0);else{if(d.length=u,l)for(--i;++d[--u]>i;)d[u]=0,u||(++c,d=[1].concat(d));for(f=d.length;!d[--f];);for(m=0,t="";m<=f;t+=s.charAt(d[m++]));t=w(t,c,s.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,i,o,a,s=0,u=e.length,c=t%1e7,f=t/1e7|0;for(e=e.slice();u--;)s=((i=c*(o=e[u]%1e7)+(n=f*o+(a=e[u]/1e7|0)*c)%1e7*1e7+s)/r|0)+(n/1e7|0)+f*a,e[u]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,o,a,s){var c,f,h,d,v,m,g,b,y,w,k,x,_,E,A,S,O,M=n.s==i.s?1:-1,P=n.c,j=i.c;if(!P||!P[0]||!j||!j[0])return new L(n.s&&i.s&&(P?!j||P[0]!=j[0]:j)?P&&0==P[0]||!j?0*M:M/0:NaN);for(y=(b=new L(M)).c=[],M=o+(f=n.e-i.e)+1,s||(s=l,f=p(n.e/14)-p(i.e/14),M=M/14|0),h=0;j[h]==(P[h]||0);h++);if(j[h]>(P[h]||0)&&f--,M<0)y.push(1),d=!0;else{for(E=P.length,S=j.length,h=0,M+=2,(v=u(s/(j[0]+1)))>1&&(j=e(j,v,s),P=e(P,v,s),S=j.length,E=P.length),_=S,k=(w=P.slice(0,S)).length;k=s/2&&A++;do{if(v=0,(c=t(j,w,S,k))<0){if(x=w[0],S!=k&&(x=x*s+(w[1]||0)),(v=u(x/A))>1)for(v>=s&&(v=s-1),g=(m=e(j,v,s)).length,k=w.length;1==t(m,w,g,k);)v--,r(m,S=10;M/=10,h++);F(b,o+(b.e=h+14*f-1)+1,a,d)}else b.e=f,b.r=+d;return b}}(),i=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,u){var f,l=s?a:a.replace(i,"");if(n.test(l))o.s=isNaN(l)?null:l<0?-1:1;else{if(!s&&(l=l.replace(e,(function(e,t,r){return f="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=f?e:t})),u&&(f=u,l=l.replace(t,"$1").replace(r,"0.$1")),a!=l))return new L(l,f);if(L.DEBUG)throw Error(c+"Not a"+(u?" base "+u:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var e=new L(this);return e.s<0&&(e.s=1),e},o.comparedTo=function(e,t){return m(this,new L(e,t))},o.decimalPlaces=o.dp=function(e,t){var r,n,i,o=this;if(null!=e)return g(e,0,d),null==t?t=_:g(t,0,8),F(new L(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=14*((i=r.length-1)-p(this.e/14)),i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},o.dividedBy=o.div=function(e,t){return r(this,new L(e,t),x,_)},o.dividedToIntegerBy=o.idiv=function(e,t){return r(this,new L(e,t),0,1)},o.exponentiatedBy=o.pow=function(e,t){var r,n,i,o,a,f,l,h,d=this;if((e=new L(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+D(e));if(null!=t&&(t=new L(t)),a=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return h=new L(Math.pow(+D(d),a?e.s*(2-b(e)):+D(e))),t?h.mod(t):h;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new L(NaN);(n=!f&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||a&&d.c[1]>=24e7:d.c[0]<8e13||a&&d.c[0]<=9999975e7)))return o=d.s<0&&b(e)?-0:0,d.e>-1&&(o=1/o),new L(f?1/o:o);j&&(o=s(j/14+2))}for(a?(r=new L(.5),f&&(e.s=1),l=b(e)):l=(i=Math.abs(+D(e)))%2,h=new L(k);;){if(l){if(!(h=h.times(d)).c)break;o?h.c.length>o&&(h.c.length=o):n&&(h=h.mod(t))}if(i){if(0===(i=u(i/2)))break;l=i%2}else if(F(e=e.times(r),e.e+1,1),e.e>14)l=b(e);else{if(0===(i=+D(e)))break;l=i%2}d=d.times(d),o?d.c&&d.c.length>o&&(d.c.length=o):n&&(d=d.mod(t))}return n?h:(f&&(h=k.div(h)),t?h.mod(t):o?F(h,j,_,void 0):h)},o.integerValue=function(e){var t=new L(this);return null==e?e=_:g(e,0,8),F(t,t.e+1,e)},o.isEqualTo=o.eq=function(e,t){return 0===m(this,new L(e,t))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(e,t){return m(this,new L(e,t))>0},o.isGreaterThanOrEqualTo=o.gte=function(e,t){return 1===(t=m(this,new L(e,t)))||0===t},o.isInteger=function(){return!!this.c&&p(this.e/14)>this.c.length-2},o.isLessThan=o.lt=function(e,t){return m(this,new L(e,t))<0},o.isLessThanOrEqualTo=o.lte=function(e,t){return-1===(t=m(this,new L(e,t)))||0===t},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(e,t){var r,n,i,o,a=this,s=a.s;if(t=(e=new L(e,t)).s,!s||!t)return new L(NaN);if(s!=t)return e.s=-t,a.plus(e);var u=a.e/14,c=e.e/14,f=a.c,h=e.c;if(!u||!c){if(!f||!h)return f?(e.s=-t,e):new L(h?a:NaN);if(!f[0]||!h[0])return h[0]?(e.s=-t,e):new L(f[0]?a:3==_?-0:0)}if(u=p(u),c=p(c),f=f.slice(),s=u-c){for((o=s<0)?(s=-s,i=f):(c=u,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(o=(s=f.length)<(t=h.length))?s:t,s=t=0;t0)for(;t--;f[r++]=0);for(t=l-1;n>s;){if(f[--n]=0;){for(r=0,d=w[i]%1e7,v=w[i]/1e7|0,o=i+(a=u);o>i;)r=((c=d*(c=y[--a]%1e7)+(s=v*c+(f=y[a]/1e7|0)*d)%1e7*1e7+m[o]+r)/g|0)+(s/1e7|0)+v*f,m[o--]=c%g;m[o]=r}return r?++n:m.splice(0,1),B(e,m,n)},o.negated=function(){var e=new L(this);return e.s=-e.s||null,e},o.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new L(e,t)).s,!i||!t)return new L(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/14,a=e.e/14,s=n.c,u=e.c;if(!o||!a){if(!s||!u)return new L(i/0);if(!s[0]||!u[0])return u[0]?e:new L(s[0]?n:0*i)}if(o=p(o),a=p(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=u.length)<0&&(r=u,u=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+u[t]+i)/l|0,s[t]=l===s[t]?0:s[t]%l;return i&&(s=[i].concat(s),++a),B(e,s,a)},o.precision=o.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return g(e,1,d),null==t?t=_:g(t,0,8),F(new L(o),e,t);if(!(r=o.c))return null;if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},o.shiftedBy=function(e){return g(e,-9007199254740991,9007199254740991),this.times("1e"+e)},o.squareRoot=o.sqrt=function(){var e,t,n,i,o,a=this,s=a.c,u=a.s,c=a.e,f=x+4,l=new L("0.5");if(1!==u||!s||!s[0])return new L(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+D(a)))||u==1/0?(((t=v(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=p((c+1)/2)-(c<0||c%2),n=new L(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new L(u+""),n.c[0])for((u=(c=n.e)+f)<3&&(u=0);;)if(o=n,n=l.times(o.plus(r(a,o,f,1))),v(o.c).slice(0,u)===(t=v(n.c)).slice(0,u)){if(n.e0&&v>0){for(o=v%s||s,l=p.substr(0,o);o0&&(l+=f+p.slice(o)),d&&(l="-"+l)}n=h?l+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):l}return(r.prefix||"")+n+(r.suffix||"")},o.toFraction=function(e){var t,n,i,o,a,s,u,f,l,d,p,m,g=this,b=g.c;if(null!=e&&(!(u=new L(e)).isInteger()&&(u.c||1!==u.s)||u.lt(k)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+D(u));if(!b)return new L(g);for(t=new L(k),l=n=new L(k),i=f=new L(k),m=v(b),a=t.e=m.length-g.e-1,t.c[0]=h[(s=a%14)<0?14+s:s],e=!e||u.comparedTo(t)>0?a>0?t:l:u,s=O,O=1/0,u=new L(m),f.c[0]=0;d=r(u,t,0,1),1!=(o=n.plus(d.times(i))).comparedTo(e);)n=i,i=o,l=f.plus(d.times(o=l)),f=o,t=u.minus(d.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),f=f.plus(o.times(l)),n=n.plus(o.times(i)),f.s=l.s=g.s,p=r(l,i,a*=2,_).minus(g).abs().comparedTo(r(f,n,a,_).minus(g).abs())<1?[l,i]:[f,n],O=s,p},o.toNumber=function(){return+D(this)},o.toPrecision=function(e,t){return null!=e&&g(e,1,d),N(this,e,t,2)},o.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=E||o>=A?y(v(r.c),o):w(v(r.c),o,"0"):10===e&&R?t=w(v((r=F(new L(r),x+o+1,_)).c),r.e,"0"):(g(e,2,C.length,"Base"),t=n(w(v(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},o.valueOf=o.toJSON=function(){return D(this)},o._isBigNumber=!0,null!=t&&L.set(t),L}()).default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return f})),r.d(t,"d",(function(){return l})),r.d(t,"c",(function(){return h}));var n,i,o=r(4),a=new(r(10).a)("strings/5.7.0");function s(e,t,r,n,o){if(e===i.BAD_PREFIX||e===i.UNEXPECTED_CONTINUE){for(var a=0,s=t+1;s>6===2;s++)a++;return a}return e===i.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n||(n={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(i||(i={}));var u=Object.freeze({error:function(e,t,r,n,i){return a.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:s,replace:function(e,t,r,n,o){return e===i.OVERLONG?(n.push(o),0):(n.push(65533),s(e,t,r))}});function c(e,t){null==t&&(t=u.error),e=Object(o.a)(e);for(var r=[],n=0;n>7!==0){var s=null,c=null;if(192===(224&a))s=1,c=127;else if(224===(240&a))s=2,c=2047;else{if(240!==(248&a)){n+=t(128===(192&a)?i.UNEXPECTED_CONTINUE:i.BAD_PREFIX,n-1,e,r);continue}s=3,c=65535}if(n-1+s>=e.length)n+=t(i.OVERRUN,n-1,e,r);else{for(var f=a&(1<<8-s-1)-1,l=0;l1114111?n+=t(i.OUT_OF_RANGE,n-1-s,e,r,f):f>=55296&&f<=57343?n+=t(i.UTF16_SURROGATE,n-1-s,e,r,f):f<=c?n+=t(i.OVERLONG,n-1-s,e,r,f):r.push(f))}}else r.push(a)}return r}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;t!=n.current&&(a.checkNormalize(),e=e.normalize(t));for(var r=[],i=0;i>6|192),r.push(63&s|128);else if(55296==(64512&s)){i++;var u=e.charCodeAt(i);if(i>=e.length||56320!==(64512&u))throw new Error("invalid utf-8 string");var c=65536+((1023&s)<<10)+(1023&u);r.push(c>>18|240),r.push(c>>12&63|128),r.push(c>>6&63|128),r.push(63&c|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(63&s|128)}return Object(o.a)(r)}function l(e,t){return c(e,t).map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;return c(f(e,t))}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";(function(e){var n=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var o=r(115),a=r(161),s=r(228);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))};t.intToBuffer=function(r){var n=(0,t.intToHex)(r);return e.from((0,a.padToEven)(n.slice(2)),"hex")};t.zeros=function(t){return e.allocUnsafe(t).fill(0)};var u=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,s.assertIsBuffer)(e),c(e)};t.unpadArray=function(e){return(0,s.assertIsArray)(e),c(e)};t.unpadHexString=function(e){return(0,s.assertIsHexString)(e),e=(0,a.stripHexPrefix)(e),c(e)};t.toBuffer=function(r){if(null===r||void 0===r)return e.allocUnsafe(0);if(e.isBuffer(r))return e.from(r);if(Array.isArray(r)||r instanceof Uint8Array)return e.from(r);if("string"===typeof r){if(!(0,a.isHexString)(r))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(r));return e.from((0,a.padToEven)((0,a.stripHexPrefix)(r)),"hex")}if("number"===typeof r)return(0,t.intToBuffer)(r);if(o.BN.isBN(r)){if(r.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(r));return r.toArrayLike(e)}if(r.toArray)return e.from(r.toArray());if(r.toBuffer)return e.from(r.toBuffer());throw new Error("invalid type")};t.bufferToInt=function(e){return new o.BN((0,t.toBuffer)(e)).toNumber()};t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")};t.fromSigned=function(e){return new o.BN(e).fromTwos(256)};t.toUnsigned=function(t){return e.from(t.toTwos(256).toArray())};t.addHexPrefix=function(e){return"string"!==typeof e||(0,a.isHexPrefixed)(e)?e:"0x"+e};t.toUtf8=function(t){if((t=(0,a.stripHexPrefix)(t)).length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return e.from(t.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};t.baToJSON=function(r){if(e.isBuffer(r))return"0x".concat(r.toString("hex"));if(r instanceof Array){for(var n=[],i=0;i0&&0===c[0])throw new Error("".concat(u," cannot have leading zeroes, received: ").concat(c.toString("hex")))}}catch(f){t={error:f}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},t.arrToBufArr=function t(r){return Array.isArray(r)?r.map((function(e){return t(e)})):e.from(r)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!==t&&void 0!==t?t:[])}}).call(this,r(51).Buffer)},function(e,t,r){"use strict";var n=r(589).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(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 d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.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}},function(e,t,r){"use strict";var n=r(229),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=Object.create(r(187));o.inherits=r(52);var a=r(396),s=r(295);o.inherits(l,a);for(var u=i(s.prototype),c=0;c0;)r.push(i%this.base),i=i/this.base|0}for(var s="",u=0;0===t[u]&&u=0;--c)s+=this.alphabet[r[c]];return s}},{key:"decode",value:function(e){if("string"!==typeof e)throw new TypeError("Expected String");var t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(var r=0;r>=8;for(;i>0;)t.push(255&i),i>>=8}for(var s=0;e[s]===this._leader&&s1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.init(t,r)}return Object(s.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||h,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r1?t-1:0),n=1;n-1?e.replace(/###/g,"."):e}function i(){return!e||"string"===typeof e}for(var o="string"!==typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function y(e,t,r){var n=b(e,t,Object);n.obj[n.k]=r}function w(e,t){var r=b(e,t),n=r.obj,i=r.k;if(n)return n[i]}function k(e,t,r){var n=w(e,r);return void 0!==n?n:w(t,r)}function x(e,t,r){for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"===typeof e[n]||e[n]instanceof String||"string"===typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):x(e[n],t[n],r):e[n]=t[n]);return e}function _(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var E={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function A(e){return"string"===typeof e?e.replace(/[&<>"'\/]/g,(function(e){return E[e]})):e}var S="undefined"!==typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;function O(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),i=e,o=0;oo+a;)a++,u=i[s=n.slice(o,o+a).join(r)];if(void 0===u)return;if("string"===typeof u)return u;if(s&&"string"===typeof u[s])return u[s];var c=n.slice(o+a).join(r);return c?O(u,c,r):void 0}i=i[n[o]]}return i}}var M=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Object(a.a)(this,t),r=Object(u.a)(this,Object(c.a)(t).call(this)),S&&p.call(Object(f.a)(r)),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return Object(l.a)(t,e),Object(s.a)(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!==typeof r&&(a=a.concat(r)),r&&"string"===typeof r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."));var s=w(this.data,a);return s||!o||"string"!==typeof r?s:O(this.data&&this.data[e]&&this.data[e][t],r,i)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(a=e.split("."))[1]),this.addNamespaces(t),y(this.data,a,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!==typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var u=w(this.data,s)||{};n?x(u,r,i):u=o({},u,r),y(this.data,s,u),a.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?o({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(p),P={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}},j={},T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(this,t),r=Object(u.a)(this,Object(c.a)(t).call(this)),S&&p.call(Object(f.a)(r)),g(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,Object(f.a)(r)),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=d.create("translator"),r}return Object(l.a)(t,e),Object(s.a)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:i};var a=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(n)}return"string"===typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,r,i){var a=this;if("object"!==Object(n.a)(r)&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),r||(r={}),void 0===e||null===e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],r),c=u.key,f=u.namespaces,l=f[f.length-1],h=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(d){var p=r.nsSeparator||this.options.nsSeparator;return l+p+c}return c}var v=this.resolve(e,r),m=v&&v.res,g=v&&v.usedKey||c,b=v&&v.exactUsedKey||c,y=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],k=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!==typeof m&&"boolean"!==typeof m&&"number"!==typeof m;if(x&&m&&_&&w.indexOf(y)<0&&("string"!==typeof k||"[object Array]"!==y)){if(!r.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,o({},r,{ns:f})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var E="[object Array]"===y,A=E?[]:{},S=E?b:g;for(var O in m)if(Object.prototype.hasOwnProperty.call(m,O)){var M="".concat(S).concat(s).concat(O);A[O]=this.translate(M,o({},r,{joinArrays:!1,ns:f})),A[O]===M&&(A[O]=m[O])}m=A}}else if(x&&"string"===typeof k&&"[object Array]"===y)(m=m.join(k))&&(m=this.extendTranslation(m,e,r,i));else{var P=!1,j=!1,T=void 0!==r.count&&"string"!==typeof r.count,C=t.hasDefaultValue(r),R=T?this.pluralResolver.getSuffix(h,r.count):"",L=r["defaultValue".concat(R)]||r.defaultValue;!this.isValidLookup(m)&&C&&(P=!0,m=L),this.isValidLookup(m)||(j=!0,m=c);var N=C&&L!==m&&this.options.updateMissing;if(j||P||N){if(this.logger.log(N?"updateKey":"missingKey",h,l,c,N?L:m),s){var I=this.resolve(c,o({},r,{keySeparator:!1}));I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var B=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var D=0;D1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;r=c;var f=u.namespaces;a.options.fallbackNS&&(f=f.concat(a.options.fallbackNS));var l=void 0!==s.count&&"string"!==typeof s.count,h=void 0!==s.context&&"string"===typeof s.context&&""!==s.context,d=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);f.forEach((function(e){a.isValidLookup(t)||(o=e,!j["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(j["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(r){if(!a.isValidLookup(t)){i=r;var o,u,f=c,d=[f];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(d,c,r,e,s);else l&&(o=a.pluralResolver.getSuffix(r,s.count)),l&&h&&d.push(f+o),h&&d.push(f+="".concat(a.options.contextSeparator).concat(s.context)),l&&d.push(f+=o);for(;u=d.pop();)a.isValidLookup(t)||(n=u,t=a.getResource(r,e,u,s))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}]),t}(p);function C(e){return e.charAt(0).toUpperCase()+e.slice(1)}var R=function(){function e(t){Object(a.a)(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=d.create("languageUtils")}return Object(s.a)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"===typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=C(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=C(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=C(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach((function(e){if(!t){var n=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(n)||(t=n)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find((function(e){if(0===e.indexOf(n))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"===typeof e&&(e=e(t)),"string"===typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isSupportedCode(e)?i.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"===typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"===typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),L=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],N={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function I(){var e={};return L.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:N[t.fc]}}))})),e}var B=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.languageUtils=t,this.options=r,this.logger=d.create("pluralResolver"),this.rules=I()}return Object(s.a)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,r=this.getRule(e);return r?r.numbers.map((function(r){return t.getSuffix(e,r)})):[]}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"===typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),F=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,e),this.logger=d.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Object(s.a)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:A,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?_(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?_(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?_(t.nestingPrefix):t.nestingPrefixEscaped||_("$t("),this.nestingSuffix=t.nestingSuffix?_(t.nestingSuffix):t.nestingSuffixEscaped||_(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,a,s,u=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(u.formatSeparator)<0){var i=k(t,c,e);return u.alwaysFormat?u.format(i,void 0,r,o({},n,t,{interpolationkey:e})):i}var a=e.split(u.formatSeparator),s=a.shift().trim(),f=a.join(u.formatSeparator).trim();return u.format(k(t,c,s),f,r,o({},n,t,{interpolationkey:s}))};this.resetRegExp();var h=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,d=n&&n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return f(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?f(u.escape(e)):f(e)}}].forEach((function(t){for(s=0;i=t.regex.exec(e);){if(void 0===(a=l(i[1].trim())))if("function"===typeof h){var r=h(e,i,n);a="string"===typeof r?r:""}else{if(d){a=i[0];continue}u.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),a=""}else"string"===typeof a||u.useRawValueToEscape||(a=m(a));var o=t.safeValue(a);if(e=e.replace(i[0],o),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++s>=u.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var r,n,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=o({},a);function u(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0],i=(i=this.interpolate(i,s)).replace(/'/g,'"');try{s=JSON.parse(i),t&&(s=o({},t,s))}catch(a){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),a),"".concat(e).concat(r).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;r=this.nestingRegexp.exec(e);){var c=[],f=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var l=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=l.shift(),c=l,f=!0}if((n=t(u.call(this,r[1].trim(),s),s))&&r[0]===e&&"string"!==typeof n)return n;"string"!==typeof n&&(n=m(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),f&&(n=c.reduce((function(e,t){return i.format(e,t,a.lng,o({},a,{interpolationkey:r[1].trim()}))}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();var D=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.a)(this,t),i=Object(u.a)(this,Object(c.a)(t).call(this)),S&&p.call(Object(f.a)(i)),i.backend=e,i.store=r,i.services=n,i.languageUtils=n.languageUtils,i.options=o,i.logger=d.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return Object(l.a)(t,e),Object(s.a)(t,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],a=[],s=[],u=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?a.indexOf(s)<0&&a.push(s):(i.state[s]=1,n=!1,a.indexOf(s)<0&&a.push(s),o.indexOf(s)<0&&o.push(s),u.indexOf(t)<0&&u.push(t)))})),n||s.push(e)})),(o.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:n}),{toLoad:o,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=n[0],o=n[1];t&&this.emit("failedLoading",i,o,t),r&&this.store.addResourceBundle(i,o,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){!function(e,t,r,n){var i=b(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],n&&(o[a]=o[a].concat(r)),n||o[a].push(r)}(r.loaded,[i],o),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(s,u){s&&u&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,a)}),o):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"===typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"===typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,(function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(o," for language ").concat(i," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,n,a)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):void 0!==r&&null!==r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,o({},a,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),t}(p);function U(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Object(n.a)(e[1])&&(t=e[1]),"string"===typeof e[1]&&(t.defaultValue=e[1]),"string"===typeof e[2]&&(t.tDescription=e[2]),"object"===Object(n.a)(e[2])||"object"===Object(n.a)(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function z(e){return"string"===typeof e.ns&&(e.ns=[e.ns]),"string"===typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"===typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function H(){}var q=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(Object(a.a)(this,t),e=Object(u.a)(this,Object(c.a)(t).call(this)),S&&p.call(Object(f.a)(e)),e.options=z(r),e.services={},e.logger=d,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),Object(u.a)(e,Object(f.a)(e));setTimeout((function(){e.init(r,n)}),0)}return e}return Object(l.a)(t,e),Object(s.a)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"===typeof e?new e:e:null}if("function"===typeof t&&(r=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=o({},U(),this.options,z(t)),this.format=this.options.interpolation.format,r||(r=H),!this.options.isClone){this.modules.logger?d.init(n(this.modules.logger),this.options):d.init(null,this.options);var i=new R(this.options);this.store=new M(this.options.resources,this.options);var a=this.services;a.logger=d,a.resourceStore=this.store,a.languageUtils=i,a.pluralResolver=new B(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new F(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new D(n(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var u=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];u.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}}));var f=v(),l=function(){var t=function(t,n){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),f.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),f}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,n=r,i="string"===typeof e?e:this.language;if("function"===typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return n();var o=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)a(i);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(o,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=v();return e||(e=this.languages),t||(t=this.options.ns),r||(r=H),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&P.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=v();this.emit("languageChanging",e);var i=function(i){e||i||!r.services.languageDetector||(i=[]);var o="string"===typeof i?i:r.services.languageUtils.getBestMatchFromCodes(i);o&&(r.language||(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o)),r.translator.language||r.translator.changeLanguage(o),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(o)),r.loadResources(o,(function(e){!function(e,i){i?(r.language=i,r.languages=r.services.languageUtils.toResolveHierarchy(i),r.translator.changeLanguage(i),r.isLanguageChangingTo=void 0,r.emit("languageChanged",i),r.logger.log("languageChanged",i)):r.isLanguageChangingTo=void 0,n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,i=function e(t,i){var a;if("object"!==Object(n.a)(i)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(n,e)||(!this.services.backendConnector.backend||!(!a(n,e)||i&&!a(o,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=v();return this.options.ns?("string"===typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=v();"string"===typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,i=o({},this.options,r,{isClone:!0}),a=new t(i),s=["store","services","language"];return s.forEach((function(t){a[t]=e[t]})),a.services=o({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new T(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}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,r){var n,i,a,s;if("string"===typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var u=function(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(n," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof r)}),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"),e.exports.codes=n},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var i=r(381),o=r(385);r(52)(c,i);for(var a=n(o.prototype),s=0;s2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}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,r){var n,i,a,s;if("string"===typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var u=function(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(n," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof r)}),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"),e.exports.codes=n},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var i=r(388),o=r(392);r(52)(c,i);for(var a=n(o.prototype),s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";function n(e,t,r,n){var i=n?" !== ":" === ",o=n?" || ":" && ",a=n?"!":"",s=n?"":"!";switch(e){case"null":return t+i+"null";case"array":return a+"Array.isArray("+t+")";case"object":return"("+a+t+o+"typeof "+t+i+'"object"'+o+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+o+s+"("+t+" % 1)"+o+t+i+t+(r?o+a+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(r?o+a+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}e.exports={copy:function(e,t){for(var r in t=t||{},e)t[r]=e[r];return t},checkDataType:n,checkDataTypes:function(e,t,r){switch(e.length){case 1:return n(e[0],t,r,!0);default:var i="",a=o(e);for(var s in a.array&&a.object&&(i=a.null?"(":"(!"+t+" || ",i+="typeof "+t+' !== "object")',delete a.null,delete a.array,delete a.object),a.number&&delete a.integer,a)i+=(i?" && ":"")+n(s,t,r,!0);return i}},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var r=[],n=0;n=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(o="data"+(t-n||""),!i)return o}for(var s=o,c=i.split("/"),f=0;f=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var A=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},S=new _.a("wallet/5.3.0");var O=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(e,i){var a,s;if(Object(n.a)(this,r),S.checkNew(this instanceof r?this.constructor:void 0,r),a=t.call(this),null!=(s=e)&&Object(l.k)(s.privateKey,32)&&null!=s.address){var f=new y.a(e.privateKey);if(Object(g.d)(Object(o.a)(a),"_signingKey",(function(){return f})),Object(g.d)(Object(o.a)(a),"address",Object(x.b)(a.publicKey)),a.address!==Object(u.a)(e.address)&&S.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){var t=e.mnemonic;return t&&t.phrase}(e)){var h=e.mnemonic;Object(g.d)(Object(o.a)(a),"_mnemonic",(function(){return{phrase:h.phrase,path:h.path||m.defaultPath,locale:h.locale||"en"}}));var d=a.mnemonic,p=m.HDNode.fromMnemonic(d.phrase,null,d.locale).derivePath(d.path);Object(x.b)(p.privateKey)!==a.address&&S.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else Object(g.d)(Object(o.a)(a),"_mnemonic",(function(){return null}))}else{if(y.a.isSigningKey(e))"secp256k1"!==e.curve&&S.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),Object(g.d)(Object(o.a)(a),"_signingKey",(function(){return e}));else{"string"===typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);var v=new y.a(e);Object(g.d)(Object(o.a)(a),"_signingKey",(function(){return v}))}Object(g.d)(Object(o.a)(a),"_mnemonic",(function(){return null})),Object(g.d)(Object(o.a)(a),"address",Object(x.b)(a.publicKey))}return i&&!c.b.isProvider(i)&&S.throwArgumentError("invalid provider","provider",i),Object(g.d)(Object(o.a)(a),"provider",i||null),a}return Object(i.a)(r,[{key:"mnemonic",get:function(){return this._mnemonic()}},{key:"privateKey",get:function(){return this._signingKey().privateKey}},{key:"publicKey",get:function(){return this._signingKey().publicKey}},{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"connect",value:function(e){return new r(this,e)}},{key:"signTransaction",value:function(e){var t=this;return Object(g.f)(e).then((function(r){null!=r.from&&(Object(u.a)(r.from)!==t.address&&S.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);var n=t._signingKey().signDigest(Object(h.a)(Object(x.e)(r)));return Object(x.e)(r,n)}))}},{key:"signMessage",value:function(e){return A(this,void 0,void 0,E().mark((function t(){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(l.l)(this._signingKey().signDigest(p(e))));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"_signTypedData",value:function(e,t,r){return A(this,void 0,void 0,E().mark((function n(){var i,o=this;return E().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,v.a.resolveNames(e,t,r,(function(e){return null==o.provider&&S.throwError("cannot resolve ENS names without a provider",_.a.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),o.provider.resolveName(e)}));case 2:return i=n.sent,n.abrupt("return",Object(l.l)(this._signingKey().signDigest(v.a.hash(i.domain,t,i.value))));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"encrypt",value:function(e,t,r){if("function"!==typeof t||r||(r=t,t={}),r&&"function"!==typeof r)throw new Error("invalid callback");return t||(t={}),Object(w.c)(this,e,t,r)}}],[{key:"createRandom",value:function(e){var t=Object(b.a)(16);e||(e={}),e.extraEntropy&&(t=Object(l.a)(Object(l.e)(Object(h.a)(Object(l.b)([t,e.extraEntropy])),0,16)));var n=Object(m.entropyToMnemonic)(t,e.locale);return r.fromMnemonic(n,e.path,e.locale)}},{key:"fromEncryptedJson",value:function(e,t,n){return Object(k.decryptJsonWallet)(e,t,n).then((function(e){return new r(e)}))}},{key:"fromEncryptedJsonSync",value:function(e,t){return new r(Object(k.decryptJsonWalletSync)(e,t))}},{key:"fromMnemonic",value:function(e,t,n){return t||(t=m.defaultPath),new r(m.HDNode.fromMnemonic(e,null,n).derivePath(t))}}]),r}(f.a);function M(e,t){return Object(x.d)(p(e),t)}function P(e,t,r,n){return Object(x.d)(v.a.hash(e,t,r),n)}},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return f})),r.d(t,"d",(function(){return l})),r.d(t,"a",(function(){return h}));var n=r(44),i=r.n(n),o=r(8),a=r(242),s=r(13),u=new s.Logger("sha2/5.3.0");function c(e){return"0x"+i.a.ripemd160().update(Object(o.arrayify)(e)).digest("hex")}function f(e){return"0x"+i.a.sha256().update(Object(o.arrayify)(e)).digest("hex")}function l(e){return"0x"+i.a.sha512().update(Object(o.arrayify)(e)).digest("hex")}function h(e,t,r){return a.a[e]||u.throwError("unsupported algorithm "+e,s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+i.a.hmac(i.a[e],Object(o.arrayify)(t)).update(Object(o.arrayify)(r)).digest("hex")}},function(e,t,r){"use strict";r.d(t,"b",(function(){return T})),r.d(t,"a",(function(){return C})),r.d(t,"c",(function(){return R}));var n=r(6),i=r(7),o=r(14),a=r(15),s=r(91),u=r.n(s),c=r(279),f=r.n(c),l=r(38),h=r(4),d=r(63),p=r(39),v=r(903),m=r(282),g=r(9),b=r(68),y=r(40),w=r(10),k=r(252);function x(){x=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(P){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new S(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var _=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},E=new w.a(k.a);function A(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}var S=function(e){Object(o.a)(r,e);var t=Object(a.a)(r);function r(){return Object(n.a)(this,r),t.apply(this,arguments)}return Object(i.a)(r,[{key:"isKeystoreAccount",value:function(e){return!(!e||!e._isKeystoreAccount)}}]),r}(g.a);function O(e,t){var r=Object(y.b)(Object(y.c)(e,"crypto/ciphertext"));if(Object(h.h)(Object(p.a)(Object(h.b)([t.slice(16,32),r]))).substring(2)!==Object(y.c)(e,"crypto/mac").toLowerCase())throw new Error("invalid password");var n=function(e,t,r){if("aes-128-ctr"===Object(y.c)(e,"crypto/cipher")){var n=Object(y.b)(Object(y.c)(e,"crypto/cipherparams/iv")),i=new u.a.Counter(n),o=new u.a.ModeOfOperation.ctr(t,i);return Object(h.a)(o.decrypt(r))}return null}(e,t.slice(0,16),r);n||E.throwError("unsupported cipher",w.a.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});var i=t.slice(32,64),o=Object(b.b)(n);if(e.address){var a=e.address.toLowerCase();if("0x"!==a.substring(0,2)&&(a="0x"+a),Object(l.a)(a)!==o)throw new Error("address mismatch")}var s={_isKeystoreAccount:!0,address:o,privateKey:Object(h.h)(n)};if("0.1"===Object(y.c)(e,"x-ethers/version")){var c=Object(y.b)(Object(y.c)(e,"x-ethers/mnemonicCiphertext")),f=Object(y.b)(Object(y.c)(e,"x-ethers/mnemonicCounter")),v=new u.a.Counter(f),m=new u.a.ModeOfOperation.ctr(i,v),g=Object(y.c)(e,"x-ethers/path")||d.defaultPath,k=Object(y.c)(e,"x-ethers/locale")||"en",x=Object(h.a)(m.decrypt(c));try{var _=Object(d.entropyToMnemonic)(x,k),A=d.HDNode.fromMnemonic(_,null,k).derivePath(g);if(A.privateKey!=s.privateKey)throw new Error("mnemonic mismatch");s.mnemonic=A.mnemonic}catch(O){if(O.code!==w.a.errors.INVALID_ARGUMENT||"wordlist"!==O.argument)throw O}}return new S(s)}function M(e,t,r,n,i){return Object(h.a)(Object(v.a)(e,t,r,n,i))}function P(e,t,r,n,i){return Promise.resolve(M(e,t,r,n,i))}function j(e,t,r,n,i){var o=Object(y.a)(t),a=Object(y.c)(e,"crypto/kdf");if(a&&"string"===typeof a){var s=function(e,t){return E.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===a.toLowerCase()){var u=Object(y.b)(Object(y.c)(e,"crypto/kdfparams/salt")),c=parseInt(Object(y.c)(e,"crypto/kdfparams/n")),f=parseInt(Object(y.c)(e,"crypto/kdfparams/r")),l=parseInt(Object(y.c)(e,"crypto/kdfparams/p"));c&&f&&l||s("kdf",a),0!==(c&c-1)&&s("N",c);var h=parseInt(Object(y.c)(e,"crypto/kdfparams/dklen"));return 32!==h&&s("dklen",h),n(o,u,c,f,l,64,i)}if("pbkdf2"===a.toLowerCase()){var d=Object(y.b)(Object(y.c)(e,"crypto/kdfparams/salt")),p=null,v=Object(y.c)(e,"crypto/kdfparams/prf");"hmac-sha256"===v?p="sha256":"hmac-sha512"===v?p="sha512":s("prf",v);var m=parseInt(Object(y.c)(e,"crypto/kdfparams/c")),g=parseInt(Object(y.c)(e,"crypto/kdfparams/dklen"));return 32!==g&&s("dklen",g),r(o,d,m,g,p)}}return E.throwArgumentError("unsupported key-derivation function","kdf",a)}function T(e,t){var r=JSON.parse(e);return O(r,j(r,t,M,f.a.syncScrypt))}function C(e,t,r){return _(this,void 0,void 0,x().mark((function n(){var i,o;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=JSON.parse(e),n.next=3,j(i,t,P,f.a.scrypt,r);case 3:return o=n.sent,n.abrupt("return",O(i,o));case 5:case"end":return n.stop()}}),n)})))}function R(e,t,r,n){try{if(Object(l.a)(e.address)!==Object(b.b)(e.privateKey))throw new Error("address/privateKey mismatch");if(A(e)){var i=e.mnemonic;if(d.HDNode.fromMnemonic(i.phrase,null,i.locale).derivePath(i.path||d.defaultPath).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(M){return Promise.reject(M)}"function"!==typeof r||n||(n=r,r={}),r||(r={});var o=Object(h.a)(e.privateKey),a=Object(y.a)(t),s=null,c=null,v=null;if(A(e)){var g=e.mnemonic;s=Object(h.a)(Object(d.mnemonicToEntropy)(g.phrase,g.locale||"en")),c=g.path||d.defaultPath,v=g.locale||"en"}var w=r.client;w||(w="ethers.js");var k=null;k=r.salt?Object(h.a)(r.salt):Object(m.a)(32);var x=null;if(r.iv){if(16!==(x=Object(h.a)(r.iv)).length)throw new Error("invalid iv")}else x=Object(m.a)(16);var _=null;if(r.uuid){if(16!==(_=Object(h.a)(r.uuid)).length)throw new Error("invalid uuid")}else _=Object(m.a)(16);var E=1<<17,S=8,O=1;return r.scrypt&&(r.scrypt.N&&(E=r.scrypt.N),r.scrypt.r&&(S=r.scrypt.r),r.scrypt.p&&(O=r.scrypt.p)),f.a.scrypt(a,k,E,S,O,64,n).then((function(t){var r=(t=Object(h.a)(t)).slice(0,16),n=t.slice(16,32),i=t.slice(32,64),a=new u.a.Counter(x),f=new u.a.ModeOfOperation.ctr(r,a),l=Object(h.a)(f.encrypt(o)),d=Object(p.a)(Object(h.b)([n,l])),g={address:e.address.substring(2).toLowerCase(),id:Object(y.d)(_),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Object(h.h)(x).substring(2)},ciphertext:Object(h.h)(l).substring(2),kdf:"scrypt",kdfparams:{salt:Object(h.h)(k).substring(2),n:E,dklen:32,p:O,r:S},mac:d.substring(2)}};if(s){var b=Object(m.a)(16),A=new u.a.Counter(b),M=new u.a.ModeOfOperation.ctr(i,A),P=Object(h.a)(M.encrypt(s)),j=new Date,T=j.getUTCFullYear()+"-"+Object(y.e)(j.getUTCMonth()+1,2)+"-"+Object(y.e)(j.getUTCDate(),2)+"T"+Object(y.e)(j.getUTCHours(),2)+"-"+Object(y.e)(j.getUTCMinutes(),2)+"-"+Object(y.e)(j.getUTCSeconds(),2)+".0Z";g["x-ethers"]={client:w,gethFilename:"UTC--"+T+"--"+g.address,mnemonicCounter:Object(h.h)(b).substring(2),mnemonicCiphertext:Object(h.h)(P).substring(2),path:c,locale:v,version:"0.1"}}return JSON.stringify(g)}))}},function(e,t,r){"use strict";r.r(t),r.d(t,"BaseX",(function(){return s})),r.d(t,"Base32",(function(){return u})),r.d(t,"Base58",(function(){return c}));var n=r(6),i=r(7),o=r(8),a=r(12),s=function(){function e(t){Object(n.a)(this,e),Object(a.defineReadOnly)(this,"alphabet",t),Object(a.defineReadOnly)(this,"base",t.length),Object(a.defineReadOnly)(this,"_alphabetMap",{}),Object(a.defineReadOnly)(this,"_leader",t.charAt(0));for(var r=0;r0;)r.push(i%this.base),i=i/this.base|0}for(var s="",u=0;0===t[u]&&u=0;--c)s+=this.alphabet[r[c]];return s}},{key:"decode",value:function(e){if("string"!==typeof e)throw new TypeError("Expected String");var t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(var r=0;r>=8;for(;i>0;)t.push(255&i),i>>=8}for(var s=0;e[s]===this._leader&&s=5||2===r&&(i[0]>5||5===i[0]&&(n||void 0!==i[1]))),i.length=1,n?(e.e=e.e-t+1,i[0]=1):i[0]=e.e=0;else if(t=5||2===r&&(i[t]>5||5===i[t]&&(n||void 0!==i[t+1]||1&i[t-1]))||3===r&&(n||!!i[0]),i.length=t,n)for(;++i[--t]>9;)if(i[t]=0,0===t){++e.e,i.unshift(1);break}for(t=i.length;!i[--t];)i.pop()}return e}function h(e,t,r){var n=e.e,i=e.c.join(""),o=i.length;if(t)i=i.charAt(0)+(o>1?"."+i.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)i="0"+i;i="0."+i}else if(n>0)if(++n>o)for(n-=o;n--;)i+="0";else n1&&(i=i.charAt(0)+"."+i.slice(1));return e.s<0&&r?"-"+i:i}c.abs=function(){var e=new this.constructor(this);return e.s=1,e},c.cmp=function(e){var t,r=this,n=r.c,i=(e=new r.constructor(e)).c,o=r.s,a=e.s,s=r.e,u=e.e;if(!n[0]||!i[0])return n[0]?o:i[0]?-a:0;if(o!=a)return o;if(t=o<0,s!=u)return s>u^t?1:-1;for(a=(s=n.length)<(u=i.length)?s:u,o=-1;++oi[o]^t?1:-1;return s==u?0:s>u^t?1:-1},c.div=function(e){var t=this,r=t.constructor,n=t.c,i=(e=new r(e)).c,o=t.s==e.s?1:-1,a=r.DP;if(a!==~~a||a<0||a>1e6)throw Error(u);if(!i[0])throw Error("[big.js] Division by zero");if(!n[0])return e.s=o,e.c=[e.e=0],e;var s,c,f,h,d,p=i.slice(),v=s=i.length,m=n.length,g=n.slice(0,s),b=g.length,y=e,w=y.c=[],k=0,x=a+(y.e=t.e-e.e)+1;for(y.s=o,o=x<0?0:x,p.unshift(0);b++b?1:-1;else for(d=-1,h=0;++dg[d]?1:-1;break}if(!(h<0))break;for(c=b==s?i:p;b;){if(g[--b]x&&l(y,x,r.RM,void 0!==g[0]),y},c.eq=function(e){return 0===this.cmp(e)},c.gt=function(e){return this.cmp(e)>0},c.gte=function(e){return this.cmp(e)>-1},c.lt=function(e){return this.cmp(e)<0},c.lte=function(e){return this.cmp(e)<1},c.minus=c.sub=function(e){var t,r,n,i,o=this,a=o.constructor,s=o.s,u=(e=new a(e)).s;if(s!=u)return e.s=-u,o.plus(e);var c=o.c.slice(),f=o.e,l=e.c,h=e.e;if(!c[0]||!l[0])return l[0]?e.s=-u:c[0]?e=new a(o):e.s=1,e;if(s=f-h){for((i=s<0)?(s=-s,n=c):(h=f,n=l),n.reverse(),u=s;u--;)n.push(0);n.reverse()}else for(r=((i=c.length0)for(;u--;)c[t++]=0;for(u=t;r>s;){if(c[--r]0?(u=a,n=c):(t=-t,n=s),n.reverse();t--;)n.push(0);n.reverse()}for(s.length-c.length<0&&(n=c,c=s,s=n),t=c.length,r=0;t;s[t]%=10)r=(s[--t]=s[t]+c[t]+r)/10|0;for(r&&(s.unshift(r),++u),t=s.length;0===s[--t];)s.pop();return e.c=s,e.e=u,e},c.pow=function(e){var t=this,r=new t.constructor("1"),n=r,i=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(s+"exponent");for(i&&(e=-e);1&e&&(n=n.times(t)),e>>=1;)t=t.times(t);return i?r.div(n):n},c.prec=function(e,t){if(e!==~~e||e<1||e>1e6)throw Error(s+"precision");return l(new this.constructor(this),e,t)},c.round=function(e,t){if(void 0===e)e=0;else if(e!==~~e||e<-1e6||e>1e6)throw Error(u);return l(new this.constructor(this),e+this.e+1,t)},c.sqrt=function(){var e,t,r,n=this,i=n.constructor,o=n.s,s=n.e,u=new i("0.5");if(!n.c[0])return new i(n);if(o<0)throw Error(a+"No square root");0===(o=Math.sqrt(n+""))||o===1/0?((t=n.c.join("")).length+s&1||(t+="0"),s=((s+1)/2|0)-(s<0||1&s),e=new i(((o=Math.sqrt(t))==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+s)):e=new i(o+""),s=e.e+(i.DP+=4);do{r=e,e=u.times(r.plus(n.div(r)))}while(r.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return l(e,(i.DP-=4)+e.e+1,i.RM)},c.times=c.mul=function(e){var t,r=this,n=r.constructor,i=r.c,o=(e=new n(e)).c,a=i.length,s=o.length,u=r.e,c=e.e;if(e.s=r.s==e.s?1:-1,!i[0]||!o[0])return e.c=[e.e=0],e;for(e.e=u+c,au;)s=t[c]+o[u]*i[c-u-1]+s,t[c--]=s%10,s=s/10|0;t[c]=s}for(s?++e.e:t.shift(),u=t.length;!t[--u];)t.pop();return e.c=t,e},c.toExponential=function(e,t){var r=this,n=r.c[0];if(void 0!==e){if(e!==~~e||e<0||e>1e6)throw Error(u);for(r=l(new r.constructor(r),++e,t);r.c.length1e6)throw Error(u);for(e=e+(r=l(new r.constructor(r),e+r.e+1,t)).e+1;r.c.length=t.PE,!!e.c[0])},c.toNumber=function(){var e=Number(h(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(a+"Imprecise conversion");return e},c.toPrecision=function(e,t){var r=this,n=r.constructor,i=r.c[0];if(void 0!==e){if(e!==~~e||e<1||e>1e6)throw Error(s+"precision");for(r=l(new n(r),e,t);r.c.length=n.PE,!!i)},c.valueOf=function(){var e=this,t=e.constructor;if(!0===t.strict)throw Error(a+"valueOf disallowed");return h(e,e.e<=t.NE||e.e>=t.PE,!0)},(o=function e(){function t(r){var n=this;if(!(n instanceof t))return void 0===r?e():new t(r);if(r instanceof t)n.s=r.s,n.e=r.e,n.c=r.c.slice();else{if("string"!==typeof r){if(!0===t.strict&&"bigint"!==typeof r)throw TypeError(s+"value");r=0===r&&1/r<0?"-0":String(r)}!function(e,t){var r,n,i;if(!f.test(t))throw Error(s+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(r=t.indexOf("."))>-1&&(t=t.replace(".",""));(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length);for(i=t.length,n=0;n0&&"0"==t.charAt(--i););for(e.e=r-n-1,e.c=[],r=0;n<=i;)e.c[r++]=+t.charAt(n++)}}(n,r)}n.constructor=t}return t.prototype=c,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=!1,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}()).default=o.Big=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},function(e){e.exports=JSON.parse('{"abi":[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"reserve0","type":"uint112"},{"internalType":"uint112","name":"reserve1","type":"uint112"},{"internalType":"uint32","name":"blockTimestampLast","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"evm":{"bytecode":{"linkReferences":{},"object":"","opcodes":"","sourceMap":""},"deployedBytecode":{"linkReferences":{},"object":"","opcodes":"","sourceMap":""}},"metadata":"{\\"compiler\\":{\\"version\\":\\"0.5.16+commit.9c3226ce\\"},\\"language\\":\\"Solidity\\",\\"output\\":{\\"abi\\":[{\\"anonymous\\":false,\\"inputs\\":[{\\"indexed\\":true,\\"internalType\\":\\"address\\",\\"name\\":\\"owner\\",\\"type\\":\\"address\\"},{\\"indexed\\":true,\\"internalType\\":\\"address\\",\\"name\\":\\"spender\\",\\"type\\":\\"address\\"},{\\"indexed\\":false,\\"internalType\\":\\"uint256\\",\\"name\\":\\"value\\",\\"type\\":\\"uint256\\"}],\\"name\\":\\"Approval\\",\\"type\\":\\"event\\"},{\\"anonymous\\":false,\\"inputs\\":[{\\"indexed\\":true,\\"internalType\\":\\"address\\",\\"name\\":\\"sender\\",\\"type\\":\\"address\\"},{\\"indexed\\":false,\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount0\\",\\"type\\":\\"uint256\\"},{\\"indexed\\":false,\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount1\\",\\"type\\":\\"uint256\\"},{\\"indexed\\":true,\\"internalType\\":\\"address\\",\\"name\\":\\"to\\",\\"type\\":\\"address\\"}],\\"name\\":\\"Burn\\",\\"type\\":\\"event\\"},{\\"anonymous\\":false,\\"inputs\\":[{\\"indexed\\":true,\\"internalType\\":\\"address\\",\\"name\\":\\"sender\\",\\"type\\":\\"address\\"},{\\"indexed\\":false,\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount0\\",\\"type\\":\\"uint256\\"},{\\"indexed\\":false,\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount1\\",\\"type\\":\\"uint256\\"}],\\"name\\":\\"Mint\\",\\"type\\":\\"event\\"},{\\"anonymous\\":false,\\"inputs\\":[{\\"indexed\\":true,\\"internalType\\":\\"address\\",\\"name\\":\\"sender\\",\\"type\\":\\"address\\"},{\\"indexed\\":false,\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount0In\\",\\"type\\":\\"uint256\\"},{\\"indexed\\":false,\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount1In\\",\\"type\\":\\"uint256\\"},{\\"indexed\\":false,\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount0Out\\",\\"type\\":\\"uint256\\"},{\\"indexed\\":false,\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount1Out\\",\\"type\\":\\"uint256\\"},{\\"indexed\\":true,\\"internalType\\":\\"address\\",\\"name\\":\\"to\\",\\"type\\":\\"address\\"}],\\"name\\":\\"Swap\\",\\"type\\":\\"event\\"},{\\"anonymous\\":false,\\"inputs\\":[{\\"indexed\\":false,\\"internalType\\":\\"uint112\\",\\"name\\":\\"reserve0\\",\\"type\\":\\"uint112\\"},{\\"indexed\\":false,\\"internalType\\":\\"uint112\\",\\"name\\":\\"reserve1\\",\\"type\\":\\"uint112\\"}],\\"name\\":\\"Sync\\",\\"type\\":\\"event\\"},{\\"anonymous\\":false,\\"inputs\\":[{\\"indexed\\":true,\\"internalType\\":\\"address\\",\\"name\\":\\"from\\",\\"type\\":\\"address\\"},{\\"indexed\\":true,\\"internalType\\":\\"address\\",\\"name\\":\\"to\\",\\"type\\":\\"address\\"},{\\"indexed\\":false,\\"internalType\\":\\"uint256\\",\\"name\\":\\"value\\",\\"type\\":\\"uint256\\"}],\\"name\\":\\"Transfer\\",\\"type\\":\\"event\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"DOMAIN_SEPARATOR\\",\\"outputs\\":[{\\"internalType\\":\\"bytes32\\",\\"name\\":\\"\\",\\"type\\":\\"bytes32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"MINIMUM_LIQUIDITY\\",\\"outputs\\":[{\\"internalType\\":\\"uint256\\",\\"name\\":\\"\\",\\"type\\":\\"uint256\\"}],\\"payable\\":false,\\"stateMutability\\":\\"pure\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"PERMIT_TYPEHASH\\",\\"outputs\\":[{\\"internalType\\":\\"bytes32\\",\\"name\\":\\"\\",\\"type\\":\\"bytes32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"pure\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"owner\\",\\"type\\":\\"address\\"},{\\"internalType\\":\\"address\\",\\"name\\":\\"spender\\",\\"type\\":\\"address\\"}],\\"name\\":\\"allowance\\",\\"outputs\\":[{\\"internalType\\":\\"uint256\\",\\"name\\":\\"\\",\\"type\\":\\"uint256\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"spender\\",\\"type\\":\\"address\\"},{\\"internalType\\":\\"uint256\\",\\"name\\":\\"value\\",\\"type\\":\\"uint256\\"}],\\"name\\":\\"approve\\",\\"outputs\\":[{\\"internalType\\":\\"bool\\",\\"name\\":\\"\\",\\"type\\":\\"bool\\"}],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"owner\\",\\"type\\":\\"address\\"}],\\"name\\":\\"balanceOf\\",\\"outputs\\":[{\\"internalType\\":\\"uint256\\",\\"name\\":\\"\\",\\"type\\":\\"uint256\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"to\\",\\"type\\":\\"address\\"}],\\"name\\":\\"burn\\",\\"outputs\\":[{\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount0\\",\\"type\\":\\"uint256\\"},{\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount1\\",\\"type\\":\\"uint256\\"}],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"decimals\\",\\"outputs\\":[{\\"internalType\\":\\"uint8\\",\\"name\\":\\"\\",\\"type\\":\\"uint8\\"}],\\"payable\\":false,\\"stateMutability\\":\\"pure\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"factory\\",\\"outputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"\\",\\"type\\":\\"address\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"getReserves\\",\\"outputs\\":[{\\"internalType\\":\\"uint112\\",\\"name\\":\\"reserve0\\",\\"type\\":\\"uint112\\"},{\\"internalType\\":\\"uint112\\",\\"name\\":\\"reserve1\\",\\"type\\":\\"uint112\\"},{\\"internalType\\":\\"uint32\\",\\"name\\":\\"blockTimestampLast\\",\\"type\\":\\"uint32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"\\",\\"type\\":\\"address\\"},{\\"internalType\\":\\"address\\",\\"name\\":\\"\\",\\"type\\":\\"address\\"}],\\"name\\":\\"initialize\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"kLast\\",\\"outputs\\":[{\\"internalType\\":\\"uint256\\",\\"name\\":\\"\\",\\"type\\":\\"uint256\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"to\\",\\"type\\":\\"address\\"}],\\"name\\":\\"mint\\",\\"outputs\\":[{\\"internalType\\":\\"uint256\\",\\"name\\":\\"liquidity\\",\\"type\\":\\"uint256\\"}],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"name\\",\\"outputs\\":[{\\"internalType\\":\\"string\\",\\"name\\":\\"\\",\\"type\\":\\"string\\"}],\\"payable\\":false,\\"stateMutability\\":\\"pure\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"owner\\",\\"type\\":\\"address\\"}],\\"name\\":\\"nonces\\",\\"outputs\\":[{\\"internalType\\":\\"uint256\\",\\"name\\":\\"\\",\\"type\\":\\"uint256\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"owner\\",\\"type\\":\\"address\\"},{\\"internalType\\":\\"address\\",\\"name\\":\\"spender\\",\\"type\\":\\"address\\"},{\\"internalType\\":\\"uint256\\",\\"name\\":\\"value\\",\\"type\\":\\"uint256\\"},{\\"internalType\\":\\"uint256\\",\\"name\\":\\"deadline\\",\\"type\\":\\"uint256\\"},{\\"internalType\\":\\"uint8\\",\\"name\\":\\"v\\",\\"type\\":\\"uint8\\"},{\\"internalType\\":\\"bytes32\\",\\"name\\":\\"r\\",\\"type\\":\\"bytes32\\"},{\\"internalType\\":\\"bytes32\\",\\"name\\":\\"s\\",\\"type\\":\\"bytes32\\"}],\\"name\\":\\"permit\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"price0CumulativeLast\\",\\"outputs\\":[{\\"internalType\\":\\"uint256\\",\\"name\\":\\"\\",\\"type\\":\\"uint256\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"price1CumulativeLast\\",\\"outputs\\":[{\\"internalType\\":\\"uint256\\",\\"name\\":\\"\\",\\"type\\":\\"uint256\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"to\\",\\"type\\":\\"address\\"}],\\"name\\":\\"skim\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount0Out\\",\\"type\\":\\"uint256\\"},{\\"internalType\\":\\"uint256\\",\\"name\\":\\"amount1Out\\",\\"type\\":\\"uint256\\"},{\\"internalType\\":\\"address\\",\\"name\\":\\"to\\",\\"type\\":\\"address\\"},{\\"internalType\\":\\"bytes\\",\\"name\\":\\"data\\",\\"type\\":\\"bytes\\"}],\\"name\\":\\"swap\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"symbol\\",\\"outputs\\":[{\\"internalType\\":\\"string\\",\\"name\\":\\"\\",\\"type\\":\\"string\\"}],\\"payable\\":false,\\"stateMutability\\":\\"pure\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[],\\"name\\":\\"sync\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"token0\\",\\"outputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"\\",\\"type\\":\\"address\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"token1\\",\\"outputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"\\",\\"type\\":\\"address\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"totalSupply\\",\\"outputs\\":[{\\"internalType\\":\\"uint256\\",\\"name\\":\\"\\",\\"type\\":\\"uint256\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"to\\",\\"type\\":\\"address\\"},{\\"internalType\\":\\"uint256\\",\\"name\\":\\"value\\",\\"type\\":\\"uint256\\"}],\\"name\\":\\"transfer\\",\\"outputs\\":[{\\"internalType\\":\\"bool\\",\\"name\\":\\"\\",\\"type\\":\\"bool\\"}],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"from\\",\\"type\\":\\"address\\"},{\\"internalType\\":\\"address\\",\\"name\\":\\"to\\",\\"type\\":\\"address\\"},{\\"internalType\\":\\"uint256\\",\\"name\\":\\"value\\",\\"type\\":\\"uint256\\"}],\\"name\\":\\"transferFrom\\",\\"outputs\\":[{\\"internalType\\":\\"bool\\",\\"name\\":\\"\\",\\"type\\":\\"bool\\"}],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"}],\\"devdoc\\":{\\"methods\\":{}},\\"userdoc\\":{\\"methods\\":{}}},\\"settings\\":{\\"compilationTarget\\":{\\"contracts/interfaces/IUniswapV2Pair.sol\\":\\"IUniswapV2Pair\\"},\\"evmVersion\\":\\"istanbul\\",\\"libraries\\":{},\\"optimizer\\":{\\"enabled\\":true,\\"runs\\":999999},\\"remappings\\":[]},\\"sources\\":{\\"contracts/interfaces/IUniswapV2Pair.sol\\":{\\"keccak256\\":\\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\\",\\"urls\\":[\\"bzz-raw://85d5ad2dd23ee127f40907a12865a1e8cb5828814f6f2480285e1827dd72dedf\\",\\"dweb:/ipfs/QmayKQWJgWmr46DqWseADyUanmqxh662hPNdAkdHRjiQQH\\"]}},\\"version\\":1}","interface":[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"reserve0","type":"uint112"},{"internalType":"uint112","name":"reserve1","type":"uint112"},{"internalType":"uint32","name":"blockTimestampLast","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":""}')},function(e,t,r){var n=r(544),i=r(545),o=r(546),a=r(548);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){(function(t){self,e.exports=function(){var e={1645:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.chains=t._getInitializedChains=void 0;var i=n(r(7295)),o=n(r(1227)),a=n(r(439)),s=n(r(7098)),u=n(r(7687));function c(e){var t,r,n={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli"},c={mainnet:i.default,ropsten:o.default,rinkeby:a.default,kovan:s.default,goerli:u.default};if(e)try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),l=f.next();!l.done;l=f.next()){var h=l.value,d=h.name;n[h.chainId.toString()]=d,c[d]=h}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}return c.names=n,c}t._getInitializedChains=c,t.chains=c()},425:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIPs=void 0,t.EIPs={1559:r(7523),2315:r(3339),2537:r(6769),2565:r(7897),2718:r(2170),2929:r(8436),2930:r(6213),3198:r(5491),3529:r(7852),3541:r(1871),3554:r(7225),3675:r(8571)}},7002:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",r(114)],["homestead",r(2800)],["dao",r(7197)],["tangerineWhistle",r(2302)],["spuriousDragon",r(716)],["byzantium",r(6985)],["constantinople",r(5993)],["petersburg",r(4064)],["istanbul",r(3166)],["muirGlacier",r(2946)],["berlin",r(15)],["london",r(1250)],["shanghai",r(5553)],["merge",r(8648)]]},3863:function(e,t,r){"use strict";var n,i=r(9033).Buffer,o=r(8847)(r(3355)),a=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsensusAlgorithm=t.ConsensusType=t.Hardfork=t.Chain=t.CustomChain=void 0;var c,f,l,h,d,p=r(8291),v=r(4628),m=r(3062),g=r(1645),b=r(7002),y=r(425);!function(e){e.PolygonMainnet="polygon-mainnet",e.PolygonMumbai="polygon-mumbai",e.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",e.xDaiChain="x-dai-chain"}(c=t.CustomChain||(t.CustomChain={})),(d=t.Chain||(t.Chain={}))[d.Mainnet=1]="Mainnet",d[d.Ropsten=3]="Ropsten",d[d.Rinkeby=4]="Rinkeby",d[d.Kovan=42]="Kovan",d[d.Goerli=5]="Goerli",function(e){e.Chainstart="chainstart",e.Homestead="homestead",e.Dao="dao",e.TangerineWhistle="tangerineWhistle",e.SpuriousDragon="spuriousDragon",e.Byzantium="byzantium",e.Constantinople="constantinople",e.Petersburg="petersburg",e.Istanbul="istanbul",e.MuirGlacier="muirGlacier",e.Berlin="berlin",e.London="london",e.Shanghai="shanghai",e.Merge="merge"}(f=t.Hardfork||(t.Hardfork={})),(h=t.ConsensusType||(t.ConsensusType={})).ProofOfStake="pos",h.ProofOfWork="pow",h.ProofOfAuthority="poa",(l=t.ConsensusAlgorithm||(t.ConsensusAlgorithm={})).Ethash="ethash",l.Clique="clique",l.Casper="casper";var w=function(e){function t(t){var r,n,i,o,a=e.call(this)||this;a._supportedHardforks=[],a._eips=[],a._customChains=null!==(i=t.customChains)&&void 0!==i?i:[],a._chainParams=a.setChain(t.chain),a.DEFAULT_HARDFORK=null!==(o=a._chainParams.defaultHardfork)&&void 0!==o?o:f.Istanbul;try{for(var s=u(a._chainParams.hardforks),c=s.next();!c.done;c=s.next()){var l=c.value;l.forkHash||(l.forkHash=a._calcForkHash(l.name))}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return a._hardfork=a.DEFAULT_HARDFORK,t.supportedHardforks&&(a._supportedHardforks=t.supportedHardforks),t.hardfork&&a.setHardfork(t.hardfork),t.eips&&a.setEIPs(t.eips),a}return a(t,e),t.custom=function(e,r){var n;void 0===r&&(r={});var i=null!==(n=r.baseChain)&&void 0!==n?n:"mainnet",o=s({},t._getChainParams(i));if(o.name="custom-chain","string"!=typeof e)return new t(s({chain:s(s({},o),e)},r));if(e===c.PolygonMainnet)return t.custom({name:c.PolygonMainnet,chainId:137,networkId:137});if(e===c.PolygonMumbai)return t.custom({name:c.PolygonMumbai,chainId:80001,networkId:80001});if(e===c.ArbitrumRinkebyTestnet)return t.custom({name:c.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611});if(e===c.xDaiChain)return t.custom({name:c.xDaiChain,chainId:100,networkId:100});throw new Error("Custom chain "+e+" not supported")},t.forCustomChain=function(e,r,n,i){var o=t._getChainParams(e);return new t({chain:s(s({},o),r),hardfork:n,supportedHardforks:i})},t.isSupportedChainId=function(e){var t=(0,g._getInitializedChains)();return Boolean(t.names[e.toString()])},t._getChainParams=function(e,t){var r=(0,g._getInitializedChains)(t);if("number"==typeof e||m.BN.isBN(e)){if(e=e.toString(),r.names[e])return r[r.names[e]];throw new Error("Chain with ID "+e+" not supported")}if(r[e])return r[e];throw new Error("Chain with name "+e+" not supported")},t.prototype.setChain=function(e){var r,n;if("number"==typeof e||"string"==typeof e||m.BN.isBN(e)){var i;i=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map((function(e){return e[0]})):this._customChains,this._chainParams=t._getChainParams(e,i)}else{if("object"!==(0,o.default)(e))throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var a=u(["networkId","genesis","hardforks","bootstrapNodes"]),s=a.next();!s.done;s=a.next()){var c=s.value;if(void 0===e[c])throw new Error("Missing required chain parameter: "+c)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}this._chainParams=e}return this._chainParams},t.prototype.setHardfork=function(e){var t,r;if(!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks");var n=!1;try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next())o.value[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),n=!0)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}if(!n)throw new Error("Hardfork with name "+e+" not supported")},t.prototype.getHardforkByBlockNumber=function(e,t){var r,n;e=(0,m.toType)(e,m.TypeOutput.BN),t=t?(0,m.toType)(t,m.TypeOutput.BN):void 0;var i,o,a,s=f.Chainstart;try{for(var c=u(this.hardforks()),l=c.next();!l.done;l=c.next()){var h=l.value;if(null!==h.block)e.gte(new m.BN(h.block))&&(s=h.name),t&&h.td&&(t.gten(h.td)?i=h.name:o=a),a=h.name;else if(t&&h.td&&t.gten(h.td))return h.name}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}if(t){var d="block number: "+e+" (-> "+s+"), ";if(i&&!this.hardforkGteHardfork(s,i)){var p="HF determined by block number is lower than the minimum total difficulty HF";throw d+="total difficulty: "+t+" (-> "+i+")",new Error(p+": "+d)}if(o&&!this.hardforkGteHardfork(o,s))throw p="Maximum HF determined by total difficulty is lower than the block number HF",d+="total difficulty: "+t+" (-> "+o+")",new Error(p+": "+d)}return s},t.prototype.setHardforkByBlockNumber=function(e,t){var r=this.getHardforkByBlockNumber(e,t);return this.setHardfork(r),r},t.prototype._chooseHardfork=function(e,t){if(void 0===t&&(t=!0),e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks")}else e=this._hardfork;return e},t.prototype._getHardfork=function(e){var t,r,n=this.hardforks();try{for(var i=u(n),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.name===e)return a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}throw new Error("Hardfork "+e+" not defined for chain "+this.chainName())},t.prototype._isSupportedHardfork=function(e){var t,r;if(!(this._supportedHardforks.length>0))return!0;try{for(var n=u(this._supportedHardforks),i=n.next();!i.done;i=n.next())if(e===i.value)return!0}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.setEIPs=function(e){var t,r,n=this;void 0===e&&(e=[]);var i=function(t){if(!(t in y.EIPs))throw new Error(t+" not supported");var r=o.gteHardfork(y.EIPs[t].minimumHardfork);if(!r)throw new Error(t+" cannot be activated on hardfork "+o.hardfork()+", minimumHardfork: "+r);y.EIPs[t].requiredEIPs&&y.EIPs[t].requiredEIPs.forEach((function(r){if(!e.includes(r)&&!n.isActivatedEIP(r))throw new Error(t+" requires EIP "+r+", but is not included in the EIP list")}))},o=this;try{for(var a=u(e),s=a.next();!s.done;s=a.next())i(s.value)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}this._eips=e},t.prototype.param=function(e,t){var r,n,i=null;try{for(var o=u(this._eips),a=o.next();!a.done;a=o.next()){var s=a.value;if(null!==(i=this.paramByEIP(e,t,s)))return i}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this.paramByHardfork(e,t,this._hardfork)},t.prototype.paramByHardfork=function(e,t,r){var n,i,o,a;r=this._chooseHardfork(r);var s=null;try{for(var c=u(b.hardforks),f=c.next();!f.done;f=c.next()){var l=f.value;if("eips"in l[1]){var h=l[1].eips;try{for(var d=(o=void 0,u(h)),p=d.next();!p.done;p=d.next()){var v=p.value,m=this.paramByEIP(e,t,v);s=null!==m?m:s}}catch(e){o={error:e}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(o)throw o.error}}}else{if(!l[1][e])throw new Error("Topic "+e+" not defined");void 0!==l[1][e][t]&&(s=l[1][e][t].v)}if(l[0]===r)break}}catch(e){n={error:e}}finally{try{f&&!f.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return s},t.prototype.paramByEIP=function(e,t,r){if(!(r in y.EIPs))throw new Error(r+" not supported");var n=y.EIPs[r];if(!(e in n))throw new Error("Topic "+e+" not defined");return void 0===n[e][t]?null:n[e][t].v},t.prototype.paramByBlock=function(e,t,r){var n=this.activeHardforks(r),i=n[n.length-1].name;return this.paramByHardfork(e,t,i)},t.prototype.isActivatedEIP=function(e){var t,r;if(this.eips().includes(e))return!0;try{for(var n=u(b.hardforks),i=n.next();!i.done;i=n.next()){var o=i.value[1];if(this.gteHardfork(o.name)&&"eips"in o&&o.eips.includes(e))return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.hardforkIsActiveOnBlock=function(e,t,r){var n;void 0===r&&(r={}),t=(0,m.toType)(t,m.TypeOutput.BN);var i=null!==(n=r.onlySupported)&&void 0!==n&&n;e=this._chooseHardfork(e,i);var o=this.hardforkBlockBN(e);return!(!o||!t.gte(o))},t.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},t.prototype.hardforkGteHardfork=function(e,t,r){var n,i;void 0===r&&(r={});var o,a=void 0!==r.onlyActive&&r.onlyActive;e=this._chooseHardfork(e,r.onlySupported),o=a?this.activeHardforks(null,r):this.hardforks();var s=-1,c=-1,f=0;try{for(var l=u(o),h=l.next();!h.done;h=l.next()){var d=h.value;d.name===e&&(s=f),d.name===t&&(c=f),f+=1}}catch(e){n={error:e}}finally{try{h&&!h.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return s>=c&&-1!==c},t.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},t.prototype.hardforkIsActiveOnChain=function(e,t){var r,n,i;void 0===t&&(t={});var o=null!==(i=t.onlySupported)&&void 0!==i&&i;e=this._chooseHardfork(e,o);try{for(var a=u(this.hardforks()),s=a.next();!s.done;s=a.next()){var c=s.value;if(c.name===e&&null!==c.block)return!0}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!1},t.prototype.activeHardforks=function(e,t){var r,n;void 0===t&&(t={});var i=[],o=this.hardforks();try{for(var a=u(o),s=a.next();!s.done;s=a.next()){var c=s.value;if(null!==c.block){if(null!=e&&e0)return r[r.length-1].name;throw new Error("No (supported) active hardfork found")},t.prototype.hardforkBlock=function(e){var t=this.hardforkBlockBN(e);return t?(0,m.toType)(t,m.TypeOutput.Number):null},t.prototype.hardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).block;return null==t?null:new m.BN(t)},t.prototype.hardforkTD=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).td;return null==t?null:new m.BN(t)},t.prototype.isHardforkBlock=function(e,t){e=(0,m.toType)(e,m.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.hardforkBlockBN(t);return!!r&&r.eq(e)},t.prototype.nextHardforkBlock=function(e){var t=this.nextHardforkBlockBN(e);return null===t?null:(0,m.toType)(t,m.TypeOutput.Number)},t.prototype.nextHardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this.hardforkBlockBN(e);return null===t?null:this.hardforks().reduce((function(e,r){var n=new m.BN(r.block);return n.gt(t)&&null===e?n:e}),null)},t.prototype.isNextHardforkBlock=function(e,t){e=(0,m.toType)(e,m.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.nextHardforkBlockBN(t);return null!==r&&r.eq(e)},t.prototype._calcForkHash=function(e){var t,r,n=i.from(this.genesis().hash.substr(2),"hex"),o=i.alloc(0),a=0;try{for(var s=u(this.hardforks()),c=s.next();!c.done;c=s.next()){var f=c.value,l=f.block;if(0!==l&&null!==l&&l!==a){var h=i.from(l.toString(16).padStart(16,"0"),"hex");o=i.concat([o,h])}if(f.name===e)break;null!==l&&(a=l)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}var d=i.concat([n,o]);return"0x"+(0,m.intToBuffer)((0,v.buf)(d)>>>0).toString("hex")},t.prototype.forkHash=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e);if(null===t.block)throw new Error("No fork hash calculation possible for non-applied or future hardfork");return void 0!==t.forkHash?t.forkHash:this._calcForkHash(e)},t.prototype.hardforkForForkHash=function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null},t.prototype.genesis=function(){return this._chainParams.genesis},t.prototype.genesisState=function(){var e,t;switch(this.chainName()){case"mainnet":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/mainnet.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"ropsten":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/ropsten.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"rinkeby":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/rinkeby.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"kovan":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/kovan.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"goerli":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/goerli.json'");throw e.code="MODULE_NOT_FOUND",e}()))}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var n=u(this._customChains),i=n.next();!i.done;i=n.next()){var o=i.value;if(o[0].name===this.chainName())return o[1]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return{}},t.prototype.hardforks=function(){return this._chainParams.hardforks},t.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},t.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},t.prototype.hardfork=function(){return this._hardfork},t.prototype.chainId=function(){return(0,m.toType)(this.chainIdBN(),m.TypeOutput.Number)},t.prototype.chainIdBN=function(){return new m.BN(this._chainParams.chainId)},t.prototype.chainName=function(){return this._chainParams.name},t.prototype.networkId=function(){return(0,m.toType)(this.networkIdBN(),m.TypeOutput.Number)},t.prototype.networkIdBN=function(){return new m.BN(this._chainParams.networkId)},t.prototype.eips=function(){return this._eips},t.prototype.consensusType=function(){var e,t,r,n=this.hardfork();try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.type),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.type},t.prototype.consensusAlgorithm=function(){var e,t,r,n=this.hardfork();try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.algorithm),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.algorithm},t.prototype.consensusConfig=function(){var e,t,r,n=this.hardfork();try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus[a[1].consensus.algorithm]),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}if(r)return r;var s=this.consensusAlgorithm();return this._chainParams.consensus[s]},t.prototype.copy=function(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)},t}(p.EventEmitter);t.default=w},4383:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTransaction=void 0;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t}(r(3863)),s=r(3062),u=r(7325),c=function(){function e(e){this.cache={hash:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=a.Chain.Mainnet,this.DEFAULT_HARDFORK=a.Hardfork.Istanbul;var t=e.nonce,r=e.gasLimit,n=e.to,i=e.value,o=e.data,u=e.v,c=e.r,f=e.s,l=e.type;this._type=new s.BN((0,s.toBuffer)(l)).toNumber();var h=(0,s.toBuffer)(""===n?"0x":n),d=(0,s.toBuffer)(""===u?"0x":u),p=(0,s.toBuffer)(""===c?"0x":c),v=(0,s.toBuffer)(""===f?"0x":f);this.nonce=new s.BN((0,s.toBuffer)(""===t?"0x":t)),this.gasLimit=new s.BN((0,s.toBuffer)(""===r?"0x":r)),this.to=h.length>0?new s.Address(h):void 0,this.value=new s.BN((0,s.toBuffer)(""===i?"0x":i)),this.data=(0,s.toBuffer)(""===o?"0x":o),this.v=d.length>0?new s.BN(d):void 0,this.r=p.length>0?new s.BN(p):void 0,this.s=v.length>0?new s.BN(v):void 0,this._validateCannotExceedMaxInteger({nonce:this.nonce,gasLimit:this.gasLimit,value:this.value,r:this.r,s:this.s})}return Object.defineProperty(e.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.supports=function(e){return this.activeCapabilities.includes(e)},e.prototype.validate=function(e){void 0===e&&(e=!1);var t=[];return this.getBaseFee().gt(this.gasLimit)&&t.push("gasLimit is too low. given "+this.gasLimit+", need at least "+this.getBaseFee()),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length},e.prototype.getBaseFee=function(){var e=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&e.iaddn(this.common.param("gasPrices","txCreation")),e},e.prototype.getDataFee=function(){for(var e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero"),r=0,n=0;n-1&&this.activeCapabilities.splice(f,1)}return c},e.prototype._getCommon=function(e,t){var r;if(t){var n=new s.BN((0,s.toBuffer)(t));if(e){if(!e.chainIdBN().eq(n))throw new Error("The chain ID does not match the chain ID of Common");return e.copy()}return a.default.isSupportedChainId(n)?new a.default({chain:n,hardfork:this.DEFAULT_HARDFORK}):a.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:n,chainId:n},this.DEFAULT_HARDFORK)}return null!==(r=null==e?void 0:e.copy())&&void 0!==r?r:new a.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},e.prototype._validateCannotExceedMaxInteger=function(e,t){var r,n;void 0===t&&(t=53);try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),a=i.next();!a.done;a=i.next()){var u=o(a.value,2),c=u[0],f=u[1];if(53===t){if(null==f?void 0:f.gt(s.MAX_INTEGER))throw new Error(c+" cannot exceed MAX_INTEGER, given "+f)}else{if(256!==t)throw new Error("unimplemented bits value");if(null==f?void 0:f.gte(s.TWO_POW256))throw new Error(c+" must be less than 2^256, given "+f)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e}();t.BaseTransaction=c},660:function(e,t,r){"use strict";var n,i=r(9033).Buffer,o=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,12),i=n[0],o=n[1],a=n[2],u=n[3],c=n[4],f=n[5],l=n[6],h=n[7],d=n[8],p=n[9],v=n[10],m=n[11];return new t({chainId:new s.BN(i),nonce:o,maxPriorityFeePerGas:a,maxFeePerGas:u,gasLimit:c,to:f,value:l,data:h,accessList:null!=d?d:[],v:void 0!==p?new s.BN(p):void 0,r:v,s:m},r)},t.prototype.getDataFee=function(){var t=e.prototype.getDataFee.call(this);return t.iaddn(f.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),t},t.prototype.getUpfrontCost=function(e){void 0===e&&(e=new s.BN(0));var t=s.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(e)).add(e);return this.gasLimit.mul(t).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,s.bnToUnpaddedBuffer)(this.maxFeePerGas),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){var e=this.raw();return i.concat([l,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,9),r=i.concat([l,s.rlp.encode(t)]);return e?(0,s.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(c.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this,n=r.v,i=r.r,o=r.s;try{return(0,s.ecrecover)(t,n.addn(27),(0,s.bnToUnpaddedBuffer)(i),(0,s.bnToUnpaddedBuffer)(o))}catch(e){throw new Error("Invalid Signature")}},t.prototype._processSignature=function(e,r,n){var i={common:this.common};return t.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(r),s:new s.BN(n)},i)},t.prototype.toJSON=function(){var e=f.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),maxPriorityFeePerGas:(0,s.bnToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,s.bnToHex)(this.maxFeePerGas),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t}(u.BaseTransaction);t.default=h},7613:function(e,t,r){"use strict";var n,i=r(9033).Buffer,o=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,11),i=n[0],o=n[1],a=n[2],u=n[3],c=n[4],f=n[5],l=n[6],h=n[7],d=n[8],p=n[9],v=n[10];return new t({chainId:new s.BN(i),nonce:o,gasPrice:a,gasLimit:u,to:c,value:f,data:l,accessList:null!=h?h:[],v:void 0!==d?new s.BN(d):void 0,r:p,s:v},r)},t.prototype.getDataFee=function(){var t=e.prototype.getDataFee.call(this);return t.iaddn(f.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),t},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){var e=this.raw();return i.concat([l,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,8),r=i.concat([l,s.rlp.encode(t)]);return e?(0,s.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(c.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this,n=r.yParity,i=r.r,o=r.s;try{return(0,s.ecrecover)(t,n.addn(27),(0,s.bnToUnpaddedBuffer)(i),(0,s.bnToUnpaddedBuffer)(o))}catch(e){throw new Error("Invalid Signature")}},t.prototype._processSignature=function(e,r,n){var i={common:this.common};return t.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(r),s:new s.BN(n)},i)},t.prototype.toJSON=function(){var e=f.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t}(u.BaseTransaction);t.default=h},2339:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FeeMarketEIP1559Transaction=t.TransactionFactory=t.AccessListEIP2930Transaction=t.Transaction=void 0;var o=r(3088);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return i(o).default}});var a=r(7613);Object.defineProperty(t,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return i(a).default}});var s=r(9562);Object.defineProperty(t,"TransactionFactory",{enumerable:!0,get:function(){return i(s).default}});var u=r(660);Object.defineProperty(t,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return i(u).default}}),function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)}(r(7325),t)},3088:function(e,t,r){"use strict";var n,i=r(9033).Buffer,o=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,9);return new t({nonce:n[0],gasPrice:n[1],gasLimit:n[2],to:n[3],value:n[4],data:n[5],v:n[6],r:n[7],s:n[8]},r)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){return s.rlp.encode(this.raw())},t.prototype._getMessageToSign=function(){var e=[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data];return this.supports(u.Capability.EIP155ReplayProtection)&&(e.push((0,s.toBuffer)(this.common.chainIdBN())),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0))),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0)))),e},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this._getMessageToSign();return e?(0,s.rlphash)(t):t},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.hash=function(){return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.rlphash)(this.raw())),this.cache.hash):(0,s.rlphash)(this.raw())},t.prototype.getMessageToVerifySignature=function(){if(!this.isSigned())throw Error("This transaction is not signed");var e=this._getMessageToSign();return(0,s.rlphash)(e)},t.prototype.getSenderPublicKey=function(){var e,t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this,n=r.v,i=r.r,o=r.s;try{return(0,s.ecrecover)(t,n,(0,s.bnToUnpaddedBuffer)(i),(0,s.bnToUnpaddedBuffer)(o),this.supports(u.Capability.EIP155ReplayProtection)?this.common.chainIdBN():void 0)}catch(e){throw new Error("Invalid Signature")}},t.prototype._processSignature=function(e,r,n){var i=new s.BN(e);this.supports(u.Capability.EIP155ReplayProtection)&&i.iadd(this.common.chainIdBN().muln(2).addn(8));var o={common:this.common};return t.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:i,r:new s.BN(r),s:new s.BN(n)},o)},t.prototype.toJSON=function(){return{nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype._validateTxV=function(e,t){var r;if(void 0!==e&&!e.eqn(0)&&(!t||t.gteHardfork("spuriousDragon"))&&!e.eqn(27)&&!e.eqn(28))if(t){var n=t.chainIdBN().muln(2);if(!e.eq(n.addn(35))&&!e.eq(n.addn(36)))throw new Error("Incompatible EIP155-based V "+e.toString()+" and chain id "+t.chainIdBN().toString()+". See the Common parameter of the Transaction constructor to set the chain id.")}else{var i;i=e.subn(35).isEven()?35:36,r=e.subn(i).divn(2)}return this._getCommon(t,r)},t.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},t.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned())throw Error("This transaction is not signed");var e=this.common.gteHardfork("spuriousDragon"),t=this.v,r=this.common.chainIdBN().muln(2);return(t.eq(r.addn(35))||t.eq(r.addn(36)))&&e},t}(r(4383).BaseTransaction);t.default=c},9562:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var i=r(3062),o=r(2339),a=function(){function e(){}return e.fromTxData=function(e,t){if(void 0===t&&(t={}),"type"in e&&void 0!==e.type){var r=new i.BN((0,i.toBuffer)(e.type)).toNumber();if(0===r)return o.Transaction.fromTxData(e,t);if(1===r)return o.AccessListEIP2930Transaction.fromTxData(e,t);if(2===r)return o.FeeMarketEIP1559Transaction.fromTxData(e,t);throw new Error("Tx instantiation with type "+r+" not supported")}return o.Transaction.fromTxData(e,t)},e.fromSerializedData=function(e,t){if(void 0===t&&(t={}),e[0]<=127){var r=void 0;switch(e[0]){case 1:r=2930;break;case 2:r=1559;break;default:throw new Error("TypedTransaction with ID "+e[0]+" unknown")}return 1559===r?o.FeeMarketEIP1559Transaction.fromSerializedTx(e,t):o.AccessListEIP2930Transaction.fromSerializedTx(e,t)}return o.Transaction.fromSerializedTx(e,t)},e.fromBlockBodyData=function(e,t){if(void 0===t&&(t={}),n.isBuffer(e))return this.fromSerializedData(e,t);if(Array.isArray(e))return o.Transaction.fromValuesArray(e,t);throw new Error("Cannot decode transaction: unknown type input")},e.getTransactionClass=function(e,t){if(void 0===e&&(e=0),0==e||e>=128&&e<=255)return o.Transaction;switch(e){case 1:return o.AccessListEIP2930Transaction;case 2:return o.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID "+e+" unknown")}},e}();t.default=a},7325:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.N_DIV_2=t.isAccessList=t.isAccessListBuffer=t.Capability=void 0;var n,i=r(3062);function o(e){if(0===e.length)return!0;var t=e[0];return!!Array.isArray(t)}(n=t.Capability||(t.Capability={}))[n.EIP155ReplayProtection=155]="EIP155ReplayProtection",n[n.EIP1559FeeMarket=1559]="EIP1559FeeMarket",n[n.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",n[n.EIP2930AccessLists=2930]="EIP2930AccessLists",t.isAccessListBuffer=o,t.isAccessList=function(e){return!o(e)},t.N_DIV_2=new i.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16)},3789:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessLists=void 0;var n=r(3062),i=r(7325),o=function(){function e(){}return e.getAccessListData=function(e){var t,r;if(e&&(0,i.isAccessList)(e)){t=e;for(var o=[],a=0;a256||n%8!=0)&&k.throwArgumentError("invalid "+r[1]+" bit length","param",e),new g.NumberCoder(n/8,"int"===r[1],e.name)}if(r=e.type.match(x)){var i=parseInt(r[1]);return(0===i||i>32)&&k.throwArgumentError("invalid bytes length","param",e),new v.FixedBytesCoder(i,e.name)}return k.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new f.Reader(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new f.Writer(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(w.ParamType.from(e))}));return new y.TupleCoder(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&k.throwError("types/values length mismatch",u.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(w.ParamType.from(e))})),i=new y.TupleCoder(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}},{key:"decode",value:function(e,t,r){var n=this,i=e.map((function(e){return n._getCoder(w.ParamType.from(e))}));return new y.TupleCoder(i,"_").decode(this._getReader((0,a.arrayify)(t),r))}}]),e}();t.AbiCoder=E;var A=new E;t.defaultAbiCoder=A},7316:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.Writer=t.Reader=t.Coder=void 0,t.checkResultErrors=function(e){var t=[];return function e(r,n){if(Array.isArray(n))for(var i in n){var o=r.slice();o.push(i);try{e(o,n[i])}catch(e){t.push({path:o,error:e})}}}([],e),t};var i=n(r(9721)),o=n(r(8985)),a=r(908),s=r(4952),u=r(3694),c=r(4327),f=r(8067),l=new c.Logger(f.version),h=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.type=r,this.localName=n,this.dynamic=o}return(0,o.default)(e,[{key:"_throwError",value:function(e,t){l.throwArgumentError(e,this.localName,t)}}]),e}();t.Coder=h;var d=function(){function e(t){(0,i.default)(this,e),(0,u.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexConcat)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData((0,a.concat)(e._data))}},{key:"writeBytes",value:function(e){var t=(0,a.arrayify)(e),r=t.length%this.wordSize;return r&&(t=(0,a.concat)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=(0,a.arrayify)(s.BigNumber.from(e));return t.length>this.wordSize&&l.throwError("value out-of-bounds",c.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,a.concat)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}();t.Writer=d;var p=function(){function e(t,r,n,o){(0,i.default)(this,e),(0,u.defineReadOnly)(this,"_data",(0,a.arrayify)(t)),(0,u.defineReadOnly)(this,"wordSize",r||32),(0,u.defineReadOnly)(this,"_coerceFunc",n),(0,u.defineReadOnly)(this,"allowLoose",o),this._offset=0}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:l.throwError("data out-of-bounds",c.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return s.BigNumber.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}();t.Reader=p},9146:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;var i=n(r(9721)),o=n(r(8985)),a=n(r(5163)),s=n(r(4650)),u=n(r(1949)),c=r(7921),f=r(908),l=function(e){(0,a.default)(l,e);var t,r,n=(t=l,r=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}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function l(e){return(0,i.default)(this,l),n.call(this,"address","address",e,!1)}return(0,o.default)(l,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=(0,c.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return(0,c.getAddress)((0,f.hexZeroPad)(e.readValue().toHexString(),20))}}]),l}(r(7316).Coder);t.AddressCoder=l},8090:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;var i=n(r(9721)),o=n(r(8985)),a=n(r(5163)),s=n(r(4650)),u=n(r(1949)),c=function(e){(0,a.default)(c,e);var t,r,n=(t=c,r=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}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function c(e){var t;return(0,i.default)(this,c),(t=n.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,t}return(0,o.default)(c,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),c}(r(7316).Coder);t.AnonymousCoder=c},4341:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=void 0,t.pack=v,t.unpack=m;var i=n(r(9721)),o=n(r(8985)),a=n(r(5163)),s=n(r(4650)),u=n(r(1949)),c=n(r(3355)),f=r(4327),l=r(8067),h=r(7316),d=r(8090),p=new f.Logger(l.version);function v(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===(0,c.default)(r)){var i={};n=t.map((function(e){var t=e.localName;return t||p.throwError("cannot encode object for signature with missing names",f.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]&&p.throwError("cannot encode object for signature with duplicate names",f.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]=!0,r[t]}))}else p.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&p.throwArgumentError("types/value length mismatch","tuple",r);var o=new h.Writer(e.wordSize),a=new h.Writer(e.wordSize),s=[];return t.forEach((function(e,t){var r=n[t];if(e.dynamic){var i=a.length;e.encode(a,r);var u=o.writeUpdatableValue();s.push((function(e){u(e+i)}))}else e.encode(o,r)})),s.forEach((function(e){e(o.length)})),e.appendWriter(o)+e.appendWriter(a)}function m(e,t){var r=[],n=e.subReader(0);t.forEach((function(t){var i=null;if(t.dynamic){var o=e.readValue(),a=n.subReader(o.toNumber());try{i=t.decode(a)}catch(e){if(e.code===f.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===f.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));var i=t.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach((function(e,t){var n=e.localName;if(n&&1===i[n]&&("length"===n&&(n="_length"),null==r[n])){var o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw o}}):r[n]=o}}));for(var o=function(e){var t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:function(){throw t}})},a=0;a=0?t:"")+"]",s=-1===t||e.dynamic;return(o=n.call(this,"array",a,r,s)).coder=e,o.length=t,o}return(0,o.default)(c,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&p.throwError("insufficient data length",f.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n=0||"tuple"===e)&&g[t])return!0;return(m[t]||"payable"===t)&&p.throwArgumentError("invalid modifier","name",t),!1}function y(e,t){for(var r in t)(0,f.defineReadOnly)(e,r,t[r])}var w=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});t.FormatTypes=w;var k=new RegExp(/^(.*)\[([0-9]*)\]$/),x=function(){function e(t,r){(0,s.default)(this,e),t!==v&&p.throwError("use fromString",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),y(this,r);var n=this.type.match(k);y(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return(0,u.default)(e,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==w.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+")"):r+=this.type,e!==w.sighash&&(!0===this.indexed&&(r+=" indexed"),e===w.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"==typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(v,{name:t.name||null,type:R(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return n=function(e,t){var r=e;function n(t){p.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var o={type:"",name:"",state:{allowType:!0}},a=o,s=0;s2&&p.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||p.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=c.BigNumber.from(r[1]),r[0]):e}function O(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function M(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&p.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&p.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||p.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&p.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&p.throwArgumentError("unable to determine stateMutability","value",e),t}t.EventFragment=A;var P=function(e){(0,i.default)(r,e);var t=d(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,u.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===w.sighash&&p.throwError("cannot format a constructor for sighash",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&p.throwArgumentError("invalid constructor object","value",e);var t=M(e);t.constant&&p.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(x.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?c.BigNumber.from(e.gas):null};return new r(v,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=S(e,t)).match(I);return n&&"constructor"===n[1].trim()||p.throwArgumentError("invalid constructor string","value",e),t.inputs=_(n[2].trim(),!1),O(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(E);t.ConstructorFragment=P;var j=function(e){(0,i.default)(r,e);var t=d(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,u.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ",e!==w.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&p.throwArgumentError("invalid function object","value",e);var t=M(e),n={type:e.type,name:N(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(x.fromObject):[],outputs:e.outputs?e.outputs.map(x.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?c.BigNumber.from(e.gas):null};return new r(v,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=S(e,t)).split(" returns ");n.length>2&&p.throwArgumentError("invalid function string","value",e);var i=n[0].match(I);if(i||p.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&N(t.name),t.inputs=_(i[2],!1),O(i[3].trim(),t),n.length>1){var o=n[1].match(I);""==o[1].trim()&&""==o[3].trim()||p.throwArgumentError("unexpected tokens","value",e),t.outputs=_(o[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(P);function T(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||p.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}t.FunctionFragment=j;var C=function(e){(0,i.default)(r,e);var t=d(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,u.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&p.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:N(e.name),inputs:e.inputs?e.inputs.map(x.fromObject):[]};return T(new r(v,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(I);return n||p.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&N(t.name),t.inputs=_(n[2],!1),T(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(E);function R(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}t.ErrorFragment=C;var L=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function N(e){return e&&e.match(L)||p.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var I=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},2914:function(e,t,r){"use strict";Object.defineProperty(t,"RQ",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"_R",{enumerable:!0,get:function(){return n.ParamType}});var n=r(800),i=r(4937);r(9044)},9044:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDescription=t.LogDescription=t.Interface=t.Indexed=t.ErrorDescription=void 0,Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return m.checkResultErrors}});var i=n(r(8985)),o=n(r(9721)),a=n(r(5163)),s=n(r(4650)),u=n(r(1949)),c=r(7921),f=r(4952),l=r(908),h=r(7515),d=r(4642),p=r(3694),v=r(4937),m=r(7316),g=r(800),b=r(4327),y=r(8067);function w(e){var t=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}}();return function(){var r,n=(0,u.default)(e);if(t){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var k=new b.Logger(y.version),x=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.LogDescription=x;var _=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.TransactionDescription=_;var E=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.ErrorDescription=E;var A=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),r}(p.Description);t.Indexed=A;var S={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function O(e,t){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return r.error=t,r}var M=function(){function e(t){var r=this;(0,o.default)(this,e);var n=[];n="string"==typeof t?JSON.parse(t):t,(0,p.defineReadOnly)(this,"fragments",n.map((function(e){return g.Fragment.from(e)})).filter((function(e){return null!=e}))),(0,p.defineReadOnly)(this,"_abiCoder",(0,p.getStatic)(this instanceof e?this.constructor:void 0,"getAbiCoder")()),(0,p.defineReadOnly)(this,"functions",{}),(0,p.defineReadOnly)(this,"errors",{}),(0,p.defineReadOnly)(this,"events",{}),(0,p.defineReadOnly)(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return r.deploy?void k.warn("duplicate definition - constructor"):void(0,p.defineReadOnly)(r,"deploy",e);case"function":t=r.functions;break;case"event":t=r.events;break;case"error":t=r.errors;break;default:return}var n=e.format();t[n]?k.warn("duplicate definition - "+n):t[n]=e})),this.deploy||(0,p.defineReadOnly)(this,"deploy",g.ConstructorFragment.from({payable:!1,type:"constructor"})),(0,p.defineReadOnly)(this,"_isInterface",!0)}return(0,i.default)(e,[{key:"format",value:function(e){e||(e=g.FormatTypes.full),e===g.FormatTypes.sighash&&k.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===g.FormatTypes.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if((0,l.isHexString)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];k.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){var r=e.trim(),n=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===r}));return 0===n.length?k.throwArgumentError("no matching function","name",r):n.length>1&&k.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var i=this.functions[g.FunctionFragment.fromString(e).format()];return i||k.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if((0,l.isHexString)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];k.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?k.throwArgumentError("no matching event","name",n):i.length>1&&k.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}var o=this.events[g.EventFragment.fromString(e).format()];return o||k.throwArgumentError("no matching event","signature",e),o}},{key:"getError",value:function(e){if((0,l.isHexString)(e)){var t=(0,p.getStatic)(this.constructor,"getSighash");for(var r in this.errors)if(e===t(this.errors[r]))return this.errors[r];k.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?k.throwArgumentError("no matching error","name",n):i.length>1&&k.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}var o=this.errors[g.FunctionFragment.fromString(e).format()];return o||k.throwArgumentError("no matching error","signature",e),o}},{key:"getSighash",value:function(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,p.getStatic)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,p.getStatic)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"==typeof e&&(e=this.getError(e));var r=(0,l.arrayify)(t);return(0,l.hexlify)(r.slice(0,4))!==this.getSighash(e)&&k.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,l.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,l.hexlify)((0,l.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,l.arrayify)(t);return(0,l.hexlify)(r.slice(0,4))!==this.getSighash(e)&&k.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,l.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,l.hexlify)((0,l.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,l.arrayify)(t),n=null,i="",o=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(f){}break;case 4:var u=(0,l.hexlify)(r.slice(0,4)),c=S[u];if(c)o=this._abiCoder.decode(c.inputs,r.slice(4)),a=c.name,s=c.signature,c.reason&&(n=o[0]),"Error"===a?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(o[0])):"Panic"===a&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(o[0]));else try{var f=this.getError(u);o=this._abiCoder.decode(f.inputs,r.slice(4)),a=f.name,s=f.format()}catch(f){}}return k.throwError("call revert exception"+i,b.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,l.hexlify)(t),errorArgs:o,errorName:a,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,l.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&k.throwError("too many arguments for "+e.format(),b.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var n=[];e.anonymous||n.push(this.getEventTopic(e));var i=function(e,t){return"string"===e.type?(0,h.id)(t):"bytes"===e.type?(0,d.keccak256)((0,l.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=f.BigNumber.from(t).toHexString()),"address"===e.type&&r._abiCoder.encode(["address"],[t]),(0,l.hexZeroPad)((0,l.hexlify)(t),32))};for(t.forEach((function(t,r){var o=e.inputs[r];o.indexed?null==t?n.push(null):"array"===o.baseType||"tuple"===o.baseType?k.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?n.push(t.map((function(e){return i(o,e)}))):n.push(i(o,t)):null!=t&&k.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e));var n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&k.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var s=t[a];if(e.indexed)if("string"===e.type)n.push((0,h.id)(s));else if("bytes"===e.type)n.push((0,d.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[s]))}else i.push(e),o.push(s)})),{data:this._abiCoder.encode(i,o),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);(0,l.isHexString)(r[0],32)&&r[0].toLowerCase()===n||k.throwError("fragment/topic mismatch",b.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var i=[],o=[],a=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(g.ParamType.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var s=null!=r?this._abiCoder.decode(i,(0,l.concat)(r)):null,u=this._abiCoder.decode(o,t,!0),c=[],f=0,h=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)c[t]=new A({_isIndexed:!0,hash:null});else if(a[t])c[t]=new A({_isIndexed:!0,hash:s[h++]});else try{c[t]=s[h++]}catch(e){c[t]=e}else try{c[t]=u[f++]}catch(e){c[t]=e}if(e.name&&null==c[e.name]){var r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:function(){throw O("property ".concat(JSON.stringify(e.name)),r)}}):c[e.name]=r}}));for(var d=function(e){var t=c[e];t instanceof Error&&Object.defineProperty(c,e,{enumerable:!0,get:function(){throw O("index ".concat(e),t)}})},p=0;p>1]>>4>=8&&(t[s]=t[s].toUpperCase()),(15&a[s>>1])>=8&&(t[s+1]=t[s+1].toUpperCase());return"0x"+t.join("")}for(var l={},h=0;h<10;h++)l[String(h)]=String(h);for(var d=0;d<26;d++)l[String.fromCharCode(65+d)]=String(10+d);var p,v=Math.floor((p=9007199254740991,Math.log10?Math.log10(p):Math.log(p)/Math.LN10));function m(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return l[e]})).join("");t.length>=v;){var r=t.substring(0,v);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function g(e){var t=null;if("string"!=typeof e&&c.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=f(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&c.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==m(e)&&c.throwArgumentError("bad icap checksum","address",e),t=(0,i._base36To16)(e.substring(4));t.length<40;)t="0"+t;t=f("0x"+t)}else c.throwArgumentError("invalid address","address",e);return t}},5798:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){e=atob(e);for(var t=[],r=0;r0&&(10===arguments[0]?p||(p=!0,l.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?l.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",u.Logger.errors.UNEXPECTED_ARGUMENT,{}):l.throwError("BigNumber.toString does not accept parameters",u.Logger.errors.UNEXPECTED_ARGUMENT,{})),b(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(h,m(t)):t.match(/^-?[0-9]+$/)?new e(h,m(new f(t))):l.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&y("underflow","BigNumber.from",t),(t>=d||t<=-d)&&y("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"==typeof r)return e.from(r.toString());if((0,s.isBytes)(r))return e.from((0,s.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return e.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"==typeof i&&((0,s.isHexString)(i)||"-"===i[0]&&(0,s.isHexString)(i.substring(1))))return e.from(i)}return l.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function m(e){if("string"!=typeof e)return m(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&l.throwArgumentError("invalid hex","value",e),"0x00"===(e=m(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function g(e){return v.from(m(e))}function b(e){var t=v.from(e).toHexString();return"-"===t[0]?new f("-"+t.substring(3),16):new f(t.substring(2),16)}function y(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),l.throwError(e,u.Logger.errors.NUMERIC_FAULT,n)}t.BigNumber=v},8390:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=t.FixedFormat=void 0,t.formatFixed=b,t.parseFixed=y;var i=n(r(3355)),o=n(r(9721)),a=n(r(8985)),s=r(908),u=r(4327),c=r(3042),f=r(1872),l=new u.Logger(c.version),h={},d=f.BigNumber.from(0),p=f.BigNumber.from(-1);function v(e,t,r,n){var i={fault:t,operation:r};return void 0!==n&&(i.value=n),l.throwError(e,u.Logger.errors.NUMERIC_FAULT,i)}for(var m="0";m.length<256;)m+=m;function g(e){if("number"!=typeof e)try{e=f.BigNumber.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+m.substring(0,e):l.throwArgumentError("invalid decimal size","decimals",e)}function b(e,t){null==t&&(t=0);var r=g(t),n=(e=f.BigNumber.from(e)).lt(d);n&&(e=e.mul(p));for(var i=e.mod(r).toString();i.length2&&l.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&v("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length80&&l.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",o),new e(h,r,n,o)}}]),e}();t.FixedFormat=w;var k=function(){function e(t,r,n,i){(0,o.default)(this,e),t!==h&&l.throwError("cannot use FixedNumber constructor; use FixedNumber.from",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return(0,a.default)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&l.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=y(this._value,this.format.decimals),n=y(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=y(this._value,this.format.decimals),n=y(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=y(this._value,this.format.decimals),n=y(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=y(this._value,this.format.decimals),n=y(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(x.toFormat(r.format))),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(x.toFormat(r.format))),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&l.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+m.substring(0,t),this.format),i=_.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&l.throwArgumentError("invalid byte width","width",e);var t=f.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,s.hexZeroPad)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||(0,f.isBigNumberish)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(b(t,r),w.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=w.from(r),i=y(t,n.decimals);!n.signed&&i.lt(d)&&v("unsigned value cannot be negative","overflow","value",t);var o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=(0,s.hexZeroPad)(o,n.width/8));var a=b(i,n.decimals);return new e(h,o,a,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=w.from(r);if((0,s.arrayify)(t).length>n.width/8)throw new Error("overflow");var i=f.BigNumber.from(t);n.signed&&(i=i.fromTwos(n.width));var o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=b(i,n.decimals);return new e(h,o,a,n)}},{key:"from",value:function(t,r){if("string"==typeof t)return e.fromString(t,r);if((0,s.isBytes)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(e){if(e.code!==u.Logger.errors.INVALID_ARGUMENT)throw e}return l.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}();t.FixedNumber=k;var x=k.from(1),_=k.from("0.5")},4952:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BigNumber",{enumerable:!0,get:function(){return n.BigNumber}}),Object.defineProperty(t,"FixedFormat",{enumerable:!0,get:function(){return i.FixedFormat}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return i.FixedNumber}}),Object.defineProperty(t,"_base16To36",{enumerable:!0,get:function(){return n._base16To36}}),Object.defineProperty(t,"_base36To16",{enumerable:!0,get:function(){return n._base36To16}}),Object.defineProperty(t,"formatFixed",{enumerable:!0,get:function(){return i.formatFixed}}),Object.defineProperty(t,"parseFixed",{enumerable:!0,get:function(){return i.parseFixed}});var n=r(1872),i=r(8390)},8729:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="bytes/5.7.0"},908:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayify=l,t.concat=h,t.hexConcat=function(e){var t="0x";return e.forEach((function(e){t+=m(e).substring(2)})),t},t.hexDataLength=function(e){if("string"!=typeof e)e=m(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2},t.hexDataSlice=function(e,t,r){return"string"!=typeof e?e=m(e):(!p(e)||e.length%2)&&o.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)},t.hexStripZeros=g,t.hexValue=function(e){var t=g(m(e,{hexPad:"left"}));return"0x"===t?"0x0":t},t.hexZeroPad=b,t.hexlify=m,t.isBytes=f,t.isBytesLike=u,t.isHexString=p,t.joinSignature=function(e){return m(h([(e=y(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))},t.splitSignature=y,t.stripZeros=function(e){var t=l(e);if(0===t.length)return t;for(var r=0;r=256)return!1}return!0}function l(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),s(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),p(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":o.throwArgumentError("hex data is odd-length","value",e));for(var i=[],u=0;ut&&o.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}var v="0123456789abcdef";function m(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r=v[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":o.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(f(e)){for(var n="0x",i=0;i>4]+v[15&s]}return n}return o.throwArgumentError("invalid hexlify value","value",e)}function g(e){"string"!=typeof e&&(e=m(e)),p(e)||o.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&o.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function y(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(u(e)){var r=l(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64))):65===r.length?(t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64)),t.v=r[64]):o.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:o.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=m(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var n=d(l(t._vs),32);t._vs=m(n);var i=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&o.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;var a=m(n);null==t.s?t.s=a:t.s!==a&&o.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?o.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var s=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==s&&o.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=b(t.r,32):o.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=b(t.s,32):o.throwArgumentError("signature missing or invalid s","signature",e);var c=l(t.s);c[0]>=128&&o.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(c[0]|=128);var f=m(c);t._vs&&(p(t._vs)||o.throwArgumentError("signature invalid _vs","signature",e),t._vs=b(t._vs,32)),null==t._vs?t._vs=f:t._vs!==f&&o.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},8721:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressZero=void 0,t.AddressZero="0x0000000000000000000000000000000000000000"},2997:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Zero=t.WeiPerEther=t.Two=t.One=t.NegativeOne=t.MinInt256=t.MaxUint256=t.MaxInt256=void 0;var n=r(4952),i=n.BigNumber.from(-1);t.NegativeOne=i;var o=n.BigNumber.from(0);t.Zero=o;var a=n.BigNumber.from(1);t.One=a;var s=n.BigNumber.from(2);t.Two=s;var u=n.BigNumber.from("1000000000000000000");t.WeiPerEther=u;var c=n.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxUint256=c;var f=n.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");t.MinInt256=f;var l=n.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxInt256=l},396:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashZero=void 0,t.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"},5465:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AddressZero",{enumerable:!0,get:function(){return n.AddressZero}}),Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return a.EtherSymbol}}),Object.defineProperty(t,"HashZero",{enumerable:!0,get:function(){return o.HashZero}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return i.MaxInt256}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return i.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return i.MinInt256}}),Object.defineProperty(t,"NegativeOne",{enumerable:!0,get:function(){return i.NegativeOne}}),Object.defineProperty(t,"One",{enumerable:!0,get:function(){return i.One}}),Object.defineProperty(t,"Two",{enumerable:!0,get:function(){return i.Two}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return i.WeiPerEther}}),Object.defineProperty(t,"Zero",{enumerable:!0,get:function(){return i.Zero}});var n=r(8721),i=r(2997),o=r(396),a=r(8347)},8347:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherSymbol=void 0,t.EtherSymbol="\u039e"},3989:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="hash/5.7.0"},3731:function(e,t){"use strict";function r(e,t){null==t&&(t=1);var r=[],n=r.forEach;return function e(t,i){n.call(t,(function(t){i>0&&Array.isArray(t)?e(t,i-1):r.push(t)}))}(e,t),r}function n(e){var t=0;function r(){return e[t++]<<8|e[t++]}for(var n=r(),i=1,o=[0,1],a=1;a>--c&1}for(var h=Math.pow(2,31),d=h>>>1,p=d>>1,v=h-1,m=0,g=0;g<31;g++)m=m<<1|l();for(var b=[],y=0,w=h;;){for(var k=Math.floor(((m-y+1)*i-1)/w),x=0,_=n;_-x>1;){var E=x+_>>>1;k>>1|l(),A=A<<1^d,S=(S^d)<<1|d|1;y=A,w=1+S-A}var O=n-4;return b.map((function(t){switch(t-O){case 3:return O+65792+(e[u++]<<16|e[u++]<<8|e[u++]);case 2:return O+256+(e[u++]<<8|e[u++]);case 1:return O+e[u++];default:return t-1}}))}function i(e){var t=0;return function(){return e[t++]}}function o(e){return 1&e?~e>>1:e>>1}function a(e,t){for(var r=Array(e),n=0,i=-1;n>=1),check:2==o}}()},t.read_mapped_map=function(e){for(var t=[];;){var n=e();if(0==n)break;t.push(l(n,e))}for(;;){var i=e()-1;if(i<0)break;t.push(h(i,e))}return function(e){for(var t={},r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(e.split("."));try{for(r.s();!(t=r.n()).done;){var n=t.value,i=p(n);try{for(var o=i.lastIndexOf(95)-1;o>=0;o--)if(95!==i[o])throw new Error("underscore only allowed at start");if(i.length>=4&&i.every((function(e){return e<128}))&&45===i[2]&&45===i[3])throw new Error("invalid label extension")}catch(e){throw new Error('Invalid label "'.concat(n,'": ').concat(e.message))}}}catch(e){r.e(e)}finally{r.f()}return e}function g(e,t){var r,n,o,a=d,s=[],u=e.length;t&&(t.length=0);for(var c=function(){var c=e[--u];if(!(a=null===(r=a.branches.find((function(e){return e.set.has(c)})))||void 0===r?void 0:r.node))return"break";if(a.save)o=c;else if(a.check&&c===o)return"break";s.push(c),a.fe0f&&(s.push(65039),u>0&&65039==e[u-1]&&u--),a.valid&&(n=s.slice(),2==a.valid&&n.splice(1,1),t&&t.push.apply(t,(0,i.default)(e.slice(u).reverse())),e.length=u)};u&&"break"!==c(););return n}},7901:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=function(e){return(0,n.keccak256)((0,i.toUtf8Bytes)(e))};var n=r(4642),i=r(8627)},7515:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return a.TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return i.dnsEncode}}),Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return i.ensNormalize}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return o.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return n.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return i.isValidName}}),Object.defineProperty(t,"messagePrefix",{enumerable:!0,get:function(){return o.messagePrefix}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return i.namehash}});var n=r(7901),i=r(4898),o=r(4443),a=r(2171)},4443:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=function(e){return"string"==typeof e&&(e=(0,o.toUtf8Bytes)(e)),(0,i.keccak256)((0,n.concat)([(0,o.toUtf8Bytes)(a),(0,o.toUtf8Bytes)(String(e.length)),e]))},t.messagePrefix=void 0;var n=r(908),i=r(4642),o=r(8627),a="\x19Ethereum Signed Message:\n";t.messagePrefix=a},4898:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsEncode=function(e){return(0,n.hexlify)((0,n.concat)(h(e).map((function(e){if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"},t.ensNormalize=function(e){return h(e).map((function(e){return(0,i.toUtf8String)(e)})).join(".")},t.isValidName=function(e){try{return 0!==h(e).length}catch(e){}return!1},t.namehash=function(e){"string"!=typeof e&&c.throwArgumentError("invalid ENS name; not a string","name",e);for(var t=f,r=h(e);r.length;)t=(0,o.keccak256)((0,n.concat)([t,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(t)};var n=r(908),i=r(8627),o=r(4642),a=r(4327),s=r(3989),u=r(7032),c=new a.Logger(s.version),f=new Uint8Array(32);function l(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function h(e){var t=(0,i.toUtf8Bytes)((0,u.ens_normalize)(e)),r=[];if(0===e.length)return r;for(var n=0,o=0;o=t.length)throw new Error("invalid ENS name; empty component");return r.push(l(t.slice(n))),r}f.fill(0)},2171:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.TypedDataEncoder=void 0;var i=n(r(2247)),o=n(r(9721)),a=n(r(8985)),s=r(7921),u=r(4952),c=r(908),f=r(4642),l=r(3694),h=r(4327),d=r(3989),p=r(7901),v=new h.Logger(d.version),m=new Uint8Array(32);m.fill(0);var g=u.BigNumber.from(-1),b=u.BigNumber.from(0),y=u.BigNumber.from(1),w=u.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),k=(0,c.hexZeroPad)(y.toHexString(),32),x=(0,c.hexZeroPad)(b.toHexString(),32),_={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},E=["name","version","chainId","verifyingContract","salt"];function A(e){return function(t){return"string"!=typeof t&&v.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var S={name:A("name"),version:A("version"),chainId:function(e){try{return u.BigNumber.from(e).toString()}catch(e){}return v.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,s.getAddress)(e).toLowerCase()}catch(e){}return v.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=(0,c.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,c.hexlify)(t)}catch(e){}return v.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function O(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&v.throwArgumentError("invalid numeric width","type",e);var i=w.mask(r?n-1:n),o=r?i.add(y).mul(g):b;return function(t){var r=u.BigNumber.from(t);return(r.lt(o)||r.gt(i))&&v.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,c.hexZeroPad)(r.toTwos(256).toHexString(),32)}}var a=e.match(/^bytes(\d+)$/);if(a){var l=parseInt(a[1]);return(0===l||l>32||a[1]!==String(l))&&v.throwArgumentError("invalid bytes width","type",e),function(t){return(0,c.arrayify)(t).length!==l&&v.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=(0,c.arrayify)(e),r=t.length%32;return r?(0,c.hexConcat)([t,m.slice(r)]):(0,c.hexlify)(t)}(t)}}switch(e){case"address":return function(e){return(0,c.hexZeroPad)((0,s.getAddress)(e),32)};case"bool":return function(e){return e?k:x};case"bytes":return function(e){return(0,f.keccak256)(e)};case"string":return function(e){return(0,p.id)(e)}}return null}function M(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var P=function(){function e(t){(0,o.default)(this,e),(0,l.defineReadOnly)(this,"types",Object.freeze((0,l.deepCopy)(t))),(0,l.defineReadOnly)(this,"_encoderCache",{}),(0,l.defineReadOnly)(this,"_types",{});var r={},n={},i={};Object.keys(t).forEach((function(e){r[e]={},n[e]=[],i[e]={}}));var a=function(e){var i={};t[e].forEach((function(o){i[o.name]&&v.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),i[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&v.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),O(a)||(n[a]||v.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),n[a].push(e),r[e][a]=!0)}))};for(var s in t)a(s);var u=Object.keys(n).filter((function(e){return 0===n[e].length}));for(var c in 0===u.length?v.throwArgumentError("missing primary type","types",t):u.length>1&&v.throwArgumentError("ambiguous primary types or unused types: ".concat(u.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),(0,l.defineReadOnly)(this,"primaryType",u[0]),function e(o,a){a[o]&&v.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),a[o]=!0,Object.keys(r[o]).forEach((function(t){n[t]&&(e(t,a),Object.keys(a).forEach((function(e){i[e][t]=!0})))})),delete a[o]}(this.primaryType,{}),i){var f=Object.keys(i[c]);f.sort(),this._types[c]=M(c,t[c])+f.map((function(e){return M(e,t[e])})).join("")}}return(0,a.default)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,r=O(e);if(r)return r;var n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var i=n[1],o=this.getEncoder(i),a=parseInt(n[3]);return function(e){a>=0&&e.length!==a&&v.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var r=e.map(o);return t._types[i]&&(r=r.map(f.keccak256)),(0,f.keccak256)((0,c.hexConcat)(r))}}var s=this.types[e];if(s){var u=(0,p.id)(this._types[e]);return function(e){var r=s.map((function(r){var n=r.name,i=r.type,o=t.getEncoder(i)(e[n]);return t._types[i]?(0,f.keccak256)(o):o}));return r.unshift(u),(0,c.hexConcat)(r)}}return v.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||v.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return(0,f.keccak256)(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,r){var n=this;if(O(e))return r(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&v.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(o,e,r)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=n._visit(a,t[o],r),e}),{}):v.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,r,n){return e.from(r).hashStruct(t,n)}},{key:"hashDomain",value:function(t){var r=[];for(var n in t){var i=_[n];i||v.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",t),r.push({name:n,type:i})}return r.sort((function(e,t){return E.indexOf(e.name)-E.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return(0,c.hexConcat)(["0x1901",e.hashDomain(t),e.from(r).hash(n)])}},{key:"hash",value:function(t,r,n){return(0,f.keccak256)(e.encode(t,r,n))}},{key:"resolveNames",value:function(t,r,n,o){return a=this,s=void 0,u=i.default.mark((function a(){var s,u,f;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:t=(0,l.shallowCopy)(t),s={},t.verifyingContract&&!(0,c.isHexString)(t.verifyingContract,20)&&(s[t.verifyingContract]="0x"),(u=e.from(r)).visit(n,(function(e,t){return"address"!==e||(0,c.isHexString)(t,20)||(s[t]="0x"),t})),a.t0=i.default.keys(s);case 6:if((a.t1=a.t0()).done){a.next=13;break}return f=a.t1.value,a.next=10,o(f);case 10:s[f]=a.sent,a.next=6;break;case 13:return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),n=u.visit(n,(function(e,t){return"address"===e&&s[t]?s[t]:t})),a.abrupt("return",{domain:t,value:n});case 16:case"end":return a.stop()}}),a)})),new(s||(s=Promise))((function(e,t){function r(e){try{i(u.next(e))}catch(e){t(e)}}function n(e){try{i(u.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(r,n)}i((u=u.apply(a,[])).next())}));var a,s,u}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var i={},o=[];E.forEach((function(e){var r=t[e];null!=r&&(i[e]=S[e](r),o.push({name:e,type:_[e]}))}));var a=e.from(r),s=(0,l.shallowCopy)(r);return s.EIP712Domain?v.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):s.EIP712Domain=o,a.encode(n),{types:s,domain:i,primaryType:a.primaryType,message:a.visit(n,(function(e,t){if(e.match(/^bytes(\d*)/))return(0,c.hexlify)((0,c.arrayify)(t));if(e.match(/^u?int/))return u.BigNumber.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&v.throwArgumentError("invalid string","value",t),t}return v.throwArgumentError("unsupported type","type",e)}))}}}]),e}();t.TypedDataEncoder=P},4642:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e){return"0x"+i.default.keccak_256((0,o.arrayify)(e))};var i=n(r(5975)),o=r(908)},5975:function(e,t,r){"use strict";e=r.nmd(e);var n,i=r(9142),o=r(8847)(r(3355));!function(){var a="input is invalid type",s="object"===("undefined"==typeof window?"undefined":(0,o.default)(window)),u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"===("undefined"==typeof self?"undefined":(0,o.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===i?"undefined":(0,o.default)(i))&&i.versions&&i.versions.node?u=r.g:c&&(u=self);var f=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,o.default)(e)&&e.exports,l=r.amdO,h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),p=[4,1024,262144,67108864],v=[0,8,16,24],m=[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],g=[224,256,384,512],b=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,o.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var k=function(e,t,r){return function(n){return new I(e,t,e).update(n)[r]()}},x=function(e,t,r){return function(n,i){return new I(e,t,i).update(n)[r]()}},_=function(e,t,r){return function(t,n,i,o){return M["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return M["kmac"+e].update(t,n,i,o)[r]()}},A=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function B(e,t,r){I.call(this,e,t,r)}I.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var n,i,s=this.blocks,u=this.byteCount,c=e.length,f=this.blockCount,l=0,d=this.s;l>2]|=e[l]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=u){for(this.start=n-u,this.block=s[f],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},I.prototype.encodeString=function(e){var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}var n=0,i=e.length;if(t)n=i;else for(var s=0;s=57344?n+=3:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},I.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t==0&&(F(r),o=0)}return i&&(e=r[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},I.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&F(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},B.prototype=new I,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),I.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,s,u,c,f,l,h,d,p,v,g,b,y,w,k,x,_,E,A,S,O,M,P,j,T,C,R,L,N,I,B,F,D,U,z,H,q,G,J,V,K,X,W,Z,Y,Q,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(f<<1|l>>>31),r=s^(l<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|d>>>31),r=c^(d<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],v=e[1],K=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,j=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,J=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,O=e[18]<<20|e[19]>>>12,M=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=p^~g&y,e[1]=v^~b&w,e[10]=A^~O&P,e[11]=S^~M&j,e[20]=N^~B&D,e[21]=I^~F&U,e[30]=J^~K&W,e[31]=V^~X&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~y&k,e[3]=b^~w&x,e[12]=O^~P&T,e[13]=M^~j&C,e[22]=B^~D&z,e[23]=F^~U&H,e[32]=K^~W&Y,e[33]=X^~Z&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=y^~k&_,e[5]=w^~x&E,e[14]=P^~T&R,e[15]=j^~C&L,e[24]=D^~z&q,e[25]=U^~H&G,e[34]=W^~Y&$,e[35]=Z^~Q&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=k^~_&p,e[7]=x^~E&v,e[16]=T^~R&A,e[17]=C^~L&S,e[26]=z^~q&N,e[27]=H^~G&I,e[36]=Y^~$&J,e[37]=Q^~ee&V,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=_^~p&g,e[9]=E^~v&b,e[18]=R^~A&O,e[19]=L^~S&M,e[28]=q^~N&B,e[29]=G^~I&F,e[38]=$^~J&K,e[39]=ee^~V&X,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(f)e.exports=M;else{for(j=0;jl[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=v[15&t[o]];i.push(e+"=Uint8Array(0x"+r+")")}else i.push(e+"="+JSON.stringify(t))}catch(t){i.push(e+"="+JSON.stringify(n[e].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var a=t,s="";switch(r){case o.NUMERIC_FAULT:s="NUMERIC_FAULT";var u=t;switch(u){case"overflow":case"underflow":case"division-by-zero":s+="-"+u;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case o.CALL_EXCEPTION:case o.INSUFFICIENT_FUNDS:case o.MISSING_NEW:case o.NONCE_EXPIRED:case o.REPLACEMENT_UNDERPRICED:case o.TRANSACTION_REPLACED:case o.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var c=new Error(t);return c.reason=a,c.code=r,Object.keys(n).forEach((function(e){c[e]=n[e]})),c}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}},{key:"checkSafeUint53",value:function(t,r){"number"==typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return d||(d=new e(u.version)),d}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),c){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}f=!!t,c=!!r}},{key:"setLogLevel",value:function(t){var r=l[t.toLowerCase()];null!=r?h=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();t.Logger=m,m.errors=o,m.levels=i},4071:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="properties/5.7.0"},3694:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.Description=void 0,t.checkProperties=function(e,t){e&&"object"===(0,s.default)(e)||l.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(r){t[r]||l.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))},t.deepCopy=v,t.defineReadOnly=h,t.getStatic=function(e,t){for(var r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==(0,s.default)(e.prototype))break;e=Object.getPrototypeOf(e.prototype).constructor}return null},t.resolveProperties=function(e){return f(this,void 0,void 0,i.default.mark((function t(){var r,n;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(r);case 3:return n=t.sent,t.abrupt("return",n.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))},t.shallowCopy=function(e){var t={};for(var r in e)t[r]=e[r];return t};var i=n(r(2247)),o=n(r(8985)),a=n(r(9721)),s=n(r(3355)),u=r(4327),c=r(4071),f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},l=new u.Logger(c.version);function h(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}var d={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function p(e){if(function e(t){if(null==t||d[(0,s.default)(t)])return!0;if(Array.isArray(t)||"object"===(0,s.default)(t)){if(!Object.isFrozen(t))return!1;for(var r=Object.keys(t),n=0;n>=8;return t}function u(e,t,r){for(var n=0,i=0;it+1+n&&a.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function f(e,t){if(0===e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&a.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});var o=u(e,t+1,r);return t+1+r+o>e.length&&a.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(e,t,t+1+r,r+o)}if(e[t]>=192){var s=e[t]-192;return t+1+s>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(e,t,t+1,s)}if(e[t]>=184){var f=e[t]-183;t+1+f>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});var l=u(e,t+1,f);return t+1+f+l>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+f+l,result:(0,n.hexlify)(e.slice(t+1+f,t+1+f+l))}}if(e[t]>=128){var h=e[t]-128;return t+1+h>e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+h,result:(0,n.hexlify)(e.slice(t+1,t+1+h))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}},8100:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="signing-key/5.7.0"},6918:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.EC=void 0;var i=n(r(3355)),o=n(r(1734)),a=n(r(7198));function s(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var u=c;function c(e,t){if(!e)throw new Error(t||"Assertion failed")}c.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var f=s((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),l=s((function(e,t){var r=t;r.assert=u,r.toArray=f.toArray,r.zero2=f.zero2,r.toHex=f.toHex,r.encode=f.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0==(1&u)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0==(1&c)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new o.default(e,"hex","le")}})),h=l.getNAF,d=l.getJSF,p=l.assert;function v(e,t){this.type=e,this.p=new o.default(t.p,16),this.red=t.prime?o.default.red(t.prime):o.default.mont(this.p),this.zero=new o.default(0).toRed(this.red),this.one=new o.default(1).toRed(this.red),this.two=new o.default(2).toRed(this.red),this.n=t.n&&new o.default(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var m=v;function g(e,t){this.curve=e,this.type=t,this.precomputed=null}v.prototype.point=function(){throw new Error("Not implemented")},v.prototype.validate=function(){throw new Error("Not implemented")},v.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=h(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+n[u];s.push(a)}for(var c=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=i;l>0;l--){for(o=0;o=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=o[s];p(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},v.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,u=this._wnafT1,c=this._wnafT2,f=this._wnafT3,l=0;for(o=0;o=1;o-=2){var v=o-1,m=o;if(1===u[v]&&1===u[m]){var g=[t[v],null,null,t[m]];0===t[v].y.cmp(t[m].y)?(g[1]=t[v].add(t[m]),g[2]=t[v].toJ().mixedAdd(t[m].neg())):0===t[v].y.cmp(t[m].y.redNeg())?(g[1]=t[v].toJ().mixedAdd(t[m]),g[2]=t[v].add(t[m].neg())):(g[1]=t[v].toJ().mixedAdd(t[m]),g[2]=t[v].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=d(r[v],r[m]);for(l=Math.max(y[0].length,l),f[v]=new Array(l),f[m]=new Array(l),a=0;a=0;o--){for(var E=0;o>=0;){var A=!0;for(a=0;a=0&&E++,x=x.dblp(E),o<0)break;for(a=0;a0?s=c[a][S-1>>1]:S<0&&(s=c[a][-S-1>>1].neg()),x="affine"===s.type?x.mixedAdd(s):x.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},g.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(a=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a:a,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},w.prototype.pointFromX=function(e,t){(e=new o.default(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},x.prototype.isInfinity=function(){return this.inf},x.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},x.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},x.prototype.getX=function(){return this.x.fromRed()},x.prototype.getY=function(){return this.y.fromRed()},x.prototype.mul=function(e){return e=new o.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},x.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},x.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},x.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},x.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},x.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},b(_,m.BasePoint),w.prototype.jpoint=function(e,t,r){return new _(this,e,t,r)},_.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},_.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},_.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},_.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},_.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},_.prototype.inspect=function(){return this.isInfinity()?"":""},_.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var E=s((function(e,t){var r=t;r.base=m,r.short=k,r.mont=null,r.edwards=null})),A=s((function(e,t){var r,n=t,i=l.assert;function o(e){"short"===e.type?this.curve=new E.short(e):"edwards"===e.type?this.curve=new E.edwards(e):this.curve=new E.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.default.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function S(e){if(!(this instanceof S))return new S(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=f.toArray(e.entropy,e.entropyEnc||"hex"),r=f.toArray(e.nonce,e.nonceEnc||"hex"),n=f.toArray(e.pers,e.persEnc||"hex");u(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var O=S;S.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},S.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=f.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var T=l.assert;function C(e,t){if(e instanceof C)return e;this._importDER(e,t)||(T(e.r&&e.s,"Signature without r or s"),this.r=new o.default(e.r,16),this.s=new o.default(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var R=C;function L(){this.place=0}function N(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function I(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}C.prototype._importDER=function(e,t){e=l.toArray(e,t);var r=new L;if(48!==e[r.place++])return!1;var n=N(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=N(e,r);if(!1===i)return!1;var a=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var s=N(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var u=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new o.default(a),this.s=new o.default(u),this.recoveryParam=null,!0},C.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=I(t),r=I(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];B(n,t.length),(n=n.concat(t)).push(2),B(n,r.length);var i=n.concat(r),o=[48];return B(o,i.length),o=o.concat(i),l.encode(o,e)};var F=function(){throw new Error("unsupported")},D=l.assert;function U(e){if(!(this instanceof U))return new U(e);"string"==typeof e&&(D(Object.prototype.hasOwnProperty.call(A,e),"Unknown curve "+e),e=A[e]),e instanceof A.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var z=U;U.prototype.keyPair=function(e){return new j(this,e)},U.prototype.keyFromPrivate=function(e,t){return j.fromPrivate(this,e,t)},U.prototype.keyFromPublic=function(e,t){return j.fromPublic(this,e,t)},U.prototype.genKeyPair=function(e){e||(e={});for(var t=new O({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||F(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new o.default(2));;){var i=new o.default(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},U.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},U.prototype.sign=function(e,t,r,n){"object"===(0,i.default)(r)&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new o.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new O({hash:this.hash,entropy:s,nonce:u,pers:n.pers,persEnc:n.persEnc||"utf8"}),f=this.n.sub(new o.default(1)),l=0;;l++){var h=n.k?n.k(l):new o.default(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(f)>=0)){var d=this.g.mul(h);if(!d.isInfinity()){var p=d.getX(),v=p.umod(this.n);if(0!==v.cmpn(0)){var m=h.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(d.getY().isOdd()?1:0)|(0!==p.cmp(v)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new R({r:v,s:m,recoveryParam:g})}}}}}},U.prototype.verify=function(e,t,r,n){e=this._truncateToN(new o.default(e,16)),r=this.keyFromPublic(r,n);var i=(t=new R(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),f=u.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),f)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(c,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},U.prototype.recoverPubKey=function(e,t,r,n){D((3&r)===r,"The recovery param is more than two bits"),t=new R(t,n);var i=this.n,a=new o.default(e),s=t.r,u=t.s,c=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var l=t.r.invm(i),h=i.sub(a).mul(l).umod(i),d=u.mul(l).umod(i);return this.g.mulAdd(h,s,d)},U.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new R(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var H=s((function(e,t){var r=t;r.version="6.5.4",r.utils=l,r.rand=function(){throw new Error("unsupported")},r.curve=E,r.curves=A,r.ec=z,r.eddsa=null})).ec;t.EC=H},7612:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKey=void 0,t.computePublicKey=v,t.recoverPublicKey=function(e,t){var r=(0,s.splitSignature)(t),n={r:(0,s.arrayify)(r.r),s:(0,s.arrayify)(r.s)};return"0x"+d().recoverPubKey((0,s.arrayify)(e),n,r.recoveryParam).encode("hex",!1)};var i=n(r(9721)),o=n(r(8985)),a=r(6918),s=r(908),u=r(3694),c=r(4327),f=r(8100),l=new c.Logger(f.version),h=null;function d(){return h||(h=new a.EC("secp256k1")),h}var p=function(){function e(t){(0,i.default)(this,e),(0,u.defineReadOnly)(this,"curve","secp256k1"),(0,u.defineReadOnly)(this,"privateKey",(0,s.hexlify)(t)),32!==(0,s.hexDataLength)(this.privateKey)&&l.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=d().keyFromPrivate((0,s.arrayify)(this.privateKey));(0,u.defineReadOnly)(this,"publicKey","0x"+r.getPublic(!1,"hex")),(0,u.defineReadOnly)(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),(0,u.defineReadOnly)(this,"_isSigningKey",!0)}return(0,o.default)(e,[{key:"_addPoint",value:function(e){var t=d().keyFromPublic((0,s.arrayify)(this.publicKey)),r=d().keyFromPublic((0,s.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=d().keyFromPrivate((0,s.arrayify)(this.privateKey)),r=(0,s.arrayify)(e);32!==r.length&&l.throwArgumentError("bad digest length","digest",e);var n=t.sign(r,{canonical:!0});return(0,s.splitSignature)({recoveryParam:n.recoveryParam,r:(0,s.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,s.hexZeroPad)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=d().keyFromPrivate((0,s.arrayify)(this.privateKey)),r=d().keyFromPublic((0,s.arrayify)(v(e)));return(0,s.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function v(e,t){var r=(0,s.arrayify)(e);if(32===r.length){var n=new p(r);return t?"0x"+d().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?t?(0,s.hexlify)(r):"0x"+d().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+d().keyFromPublic(r).getPublic(!0,"hex"):(0,s.hexlify)(r):l.throwArgumentError("invalid public or private key","key","[REDACTED]")}t.SigningKey=p},6518:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="strings/5.7.0"},5856:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=function(e){var t=(0,o.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([t,n.HashZero]).slice(0,32))},t.parseBytes32String=function(e){var t=(0,i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===t[r-1];)r--;return(0,o.toUtf8String)(t.slice(0,r))};var n=r(5465),i=r(908),o=r(4997)},8645:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._nameprepTableA1=p,t._nameprepTableB2=v,t._nameprepTableC=m,t.nameprep=function(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();var t,r=(0,n.toUtf8CodePoints)(e);t=r.map((function(e){return u.indexOf(e)>=0||e>=65024&&e<=65039?[]:v(e)||[e]})),r=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(r=(0,n.toUtf8CodePoints)((0,n._toUtf8String)(r),n.UnicodeNormalizationForm.NFKC)).forEach((function(e){if(m(e))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(e){if(p(e))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var i=(0,n._toUtf8String)(r);if("-"===i.substring(0,1)||"--"===i.substring(2,4)||"-"===i.substring(i.length-1))throw new Error("invalid hyphen");return i};var n=r(4997);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});var r=0,n={};return e.split(",").forEach((function(e){var i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function o(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}}))}function a(e,t){for(var r=0,n=0;n=(r+=i.l)&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}var s=o("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),u="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),c=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],f=i("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),l=i("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),h=i("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");for(var t=[],r=0;r=32&&e<127)return String.fromCharCode(e)}return e<=65535?d(e):d(55296+((e-=65536)>>10&1023))+d(56320+(1023&e))})).join("")+'"'},t._toUtf8String=p,t.toUtf8Bytes=h,t.toUtf8CodePoints=function(e){return l(h(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current))},t.toUtf8String=function(e,t){return p(l(e,t))};var n,i,o=r(908),a=r(4327),s=r(6518),u=new a.Logger(s.version);function c(e,t,r,n,o){if(e===i.BAD_PREFIX||e===i.UNEXPECTED_CONTINUE){for(var a=0,s=t+1;s>6==2;s++)a++;return a}return e===i.OVERRUN?r.length-t-1:0}t.UnicodeNormalizationForm=n,function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n||(t.UnicodeNormalizationForm=n={})),t.Utf8ErrorReason=i,function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(i||(t.Utf8ErrorReason=i={}));var f=Object.freeze({error:function(e,t,r,n,i){return u.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:c,replace:function(e,t,r,n,o){return e===i.OVERLONG?(n.push(o),0):(n.push(65533),c(e,t,r))}});function l(e,t){null==t&&(t=f.error),e=(0,o.arrayify)(e);for(var r=[],n=0;n>7!=0){var s=null,u=null;if(192==(224&a))s=1,u=127;else if(224==(240&a))s=2,u=2047;else{if(240!=(248&a)){n+=t(128==(192&a)?i.UNEXPECTED_CONTINUE:i.BAD_PREFIX,n-1,e,r);continue}s=3,u=65535}if(n-1+s>=e.length)n+=t(i.OVERRUN,n-1,e,r);else{for(var c=a&(1<<8-s-1)-1,l=0;l1114111?n+=t(i.OUT_OF_RANGE,n-1-s,e,r,c):c>=55296&&c<=57343?n+=t(i.UTF16_SURROGATE,n-1-s,e,r,c):c<=u?n+=t(i.OVERLONG,n-1-s,e,r,c):r.push(c))}}else r.push(a)}return r}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;t!=n.current&&(u.checkNormalize(),e=e.normalize(t));for(var r=[],i=0;i>6|192),r.push(63&a|128);else if(55296==(64512&a)){i++;var s=e.charCodeAt(i);if(i>=e.length||56320!=(64512&s))throw new Error("invalid utf-8 string");var c=65536+((1023&a)<<10)+(1023&s);r.push(c>>18|240),r.push(c>>12&63|128),r.push(c>>6&63|128),r.push(63&c|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return(0,o.arrayify)(r)}function d(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function p(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}t.Utf8ErrorFuncs=f},6783:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="transactions/5.7.0"},1936:function(e,t,r){"use strict";var n=r(3355);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionTypes=void 0,t.accessListify=E,t.computeAddress=w,t.parse=function(e){var t=(0,s.arrayify)(e);if(t[0]>127)return function(e){var t=l.decode(e);9!==t.length&&6!==t.length&&v.throwArgumentError("invalid raw transaction","rawTransaction",e);var r={nonce:g(t[0]).toNumber(),gasPrice:g(t[1]),gasLimit:g(t[2]),to:m(t[3]),value:g(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=a.BigNumber.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,s.hexZeroPad)(t[7],32),r.s=(0,s.hexZeroPad)(t[8],32),a.BigNumber.from(r.r).isZero()&&a.BigNumber.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,i=t.slice(0,6);0!==r.chainId&&(i.push((0,s.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);var o=(0,c.keccak256)(l.encode(i));try{r.from=k(o,{r:(0,s.hexlify)(r.r),s:(0,s.hexlify)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,c.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){var t=l.decode(e.slice(1));8!==t.length&&11!==t.length&&v.throwArgumentError("invalid component count for transaction type: 1","payload",(0,s.hexlify)(e));var r={type:1,chainId:g(t[0]).toNumber(),nonce:g(t[1]).toNumber(),gasPrice:g(t[2]),gasLimit:g(t[3]),to:m(t[4]),value:g(t[5]),data:t[6],accessList:E(t[7])};return 8===t.length||(r.hash=(0,c.keccak256)(e),M(r,t.slice(8),O)),r}(t);case 2:return function(e){var t=l.decode(e.slice(1));9!==t.length&&12!==t.length&&v.throwArgumentError("invalid component count for transaction type: 2","payload",(0,s.hexlify)(e));var r=g(t[2]),n=g(t[3]),i={type:2,chainId:g(t[0]).toNumber(),nonce:g(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:g(t[4]),to:m(t[5]),value:g(t[6]),data:t[7],accessList:E(t[8])};return 9===t.length||(i.hash=(0,c.keccak256)(e),M(i,t.slice(9),S)),i}(t)}return v.throwError("unsupported transaction type: ".concat(t[0]),d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})},t.recoverAddress=k,t.serialize=function(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&v.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,f.checkProperties)(e,y);var r=[];b.forEach((function(t){var n=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),n=(0,s.arrayify)((0,s.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&v.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,s.stripZeros)(n)).length>t.maxLength&&v.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push((0,s.hexlify)(n))}));var n=0;if(null!=e.chainId?"number"!=typeof(n=e.chainId)&&v.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!(0,s.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,s.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return l.encode(r);var i=(0,s.splitSignature)(t),o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&v.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&v.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,s.hexlify)(o)),r.push((0,s.stripZeros)((0,s.arrayify)(i.r))),r.push((0,s.stripZeros)((0,s.arrayify)(i.s))),l.encode(r)}(e,t);switch(e.type){case 1:return O(e,t);case 2:return S(e,t)}return v.throwError("unsupported transaction type: ".concat(e.type),d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})};var i,o=r(7921),a=r(4952),s=r(908),u=r(5465),c=r(4642),f=r(3694),l=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=function(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return function(e){return e?r:t}(e)}(void 0);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}return i.default=e,r&&r.set(e,i),i}(r(5265)),h=r(7612),d=r(4327),p=r(6783),v=new d.Logger(p.version);function m(e){return"0x"===e?null:(0,o.getAddress)(e)}function g(e){return"0x"===e?u.Zero:a.BigNumber.from(e)}t.TransactionTypes=i,function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(i||(t.TransactionTypes=i={}));var b=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],y={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function w(e){var t=(0,h.computePublicKey)(e);return(0,o.getAddress)((0,s.hexDataSlice)((0,c.keccak256)((0,s.hexDataSlice)(t,1)),12))}function k(e,t){return w((0,h.recoverPublicKey)((0,s.arrayify)(e),t))}function x(e,t){var r=(0,s.stripZeros)(a.BigNumber.from(e).toHexString());return r.length>32&&v.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function _(e,t){return{address:(0,o.getAddress)(e),storageKeys:(t||[]).map((function(t,r){return 32!==(0,s.hexDataLength)(t)&&v.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function E(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&v.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),_(e[0],e[1])):_(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return _(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function A(e){return E(e).map((function(e){return[e.address,e.storageKeys]}))}function S(e,t){if(null!=e.gasPrice){var r=a.BigNumber.from(e.gasPrice),n=a.BigNumber.from(e.maxFeePerGas||0);r.eq(n)||v.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var i=[x(e.chainId||0,"chainId"),x(e.nonce||0,"nonce"),x(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),x(e.maxFeePerGas||0,"maxFeePerGas"),x(e.gasLimit||0,"gasLimit"),null!=e.to?(0,o.getAddress)(e.to):"0x",x(e.value||0,"value"),e.data||"0x",A(e.accessList||[])];if(t){var u=(0,s.splitSignature)(t);i.push(x(u.recoveryParam,"recoveryParam")),i.push((0,s.stripZeros)(u.r)),i.push((0,s.stripZeros)(u.s))}return(0,s.hexConcat)(["0x02",l.encode(i)])}function O(e,t){var r=[x(e.chainId||0,"chainId"),x(e.nonce||0,"nonce"),x(e.gasPrice||0,"gasPrice"),x(e.gasLimit||0,"gasLimit"),null!=e.to?(0,o.getAddress)(e.to):"0x",x(e.value||0,"value"),e.data||"0x",A(e.accessList||[])];if(t){var n=(0,s.splitSignature)(t);r.push(x(n.recoveryParam,"recoveryParam")),r.push((0,s.stripZeros)(n.r)),r.push((0,s.stripZeros)(n.s))}return(0,s.hexConcat)(["0x01",l.encode(r)])}function M(e,t,r){try{var n=g(t[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");e.v=n}catch(e){v.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,s.hexZeroPad)(t[1],32),e.s=(0,s.hexZeroPad)(t[2],32);try{var i=(0,c.keccak256)(r(e));e.from=k(i,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}},3368:function(e,t,r){"use strict";var n,i,o=r(8847)(r(3355));void 0===(i="function"==typeof(n=function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function l(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[r||"universal"]<<6)}(e,t,r,this.reporter);if(n.length<128){var s=i.alloc(2);return s[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var u=1,c=n.length;c>=256;c>>=8)u++;var f=i.alloc(2+u);f[0]=o,f[1]=128|u;for(var l=1+u,h=n.length;h>0;l--,h>>=8)f[l]=255&h;return this._createEncoderBuffer([f,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=i.alloc(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,s=0;s=128;u>>=7)a++}for(var c=i.alloc(a),f=c.length-1,l=e.length-1;l>=0;l--){var h=e[l];for(c[f--]=127&h;(h>>=7)>0;)c[f--]=128|127&h}return this._createEncoderBuffer(c)},u.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=i.from(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=i.alloc(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var a=1,s=e;s>=256;s>>=8)a++;for(var u=new Array(a),c=u.length-1;c>=0;c--)u[c]=255&e,e>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(i.from(u))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n=0;u--)if(f[u]!==l[u])return!1;for(u=f.length-1;u>=0;u--)if(!w(e[a=f[u]],t[a],r,n))return!1;return!0}(e,t,r,i))}return r?e===t:e==t}function k(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function x(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function _(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&b(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!e&&i&&!r;if((!e&&s.isError(i)&&o&&x(i,r)||a)&&b(i,r,"Got unwanted exception"+n),e&&i&&r&&!x(i,r)||!e&&i)throw i}d.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=v(t),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},s.inherits(d.AssertionError,Error),d.fail=b,d.ok=y,d.equal=function(e,t,r){e!=t&&b(e,t,r,"==",d.equal)},d.notEqual=function(e,t,r){e==t&&b(e,t,r,"!=",d.notEqual)},d.deepEqual=function(e,t,r){w(e,t,!1)||b(e,t,r,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(e,t,r){w(e,t,!0)||b(e,t,r,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(e,t,r){w(e,t,!1)&&b(e,t,r,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function e(t,r,n){w(t,r,!0)&&b(t,r,n,"notDeepStrictEqual",e)},d.strictEqual=function(e,t,r){e!==t&&b(e,t,r,"===",d.strictEqual)},d.notStrictEqual=function(e,t,r){e===t&&b(e,t,r,"!==",d.notStrictEqual)},d.throws=function(e,t,r){_(!0,e,t,r)},d.doesNotThrow=function(e,t,r){_(!1,e,t,r)},d.ifError=function(e){if(e)throw e},d.strict=i((function e(t,r){t||b(t,!0,r,"==",e)}),d,{equal:d.strictEqual,deepEqual:d.deepStrictEqual,notEqual:d.notStrictEqual,notDeepEqual:d.notDeepStrictEqual}),d.strict.strict=d.strict;var E=Object.keys||function(e){var t=[];for(var r in e)u.call(e,r)&&t.push(r);return t}},4074:function(e){"use strict";"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},6732:function(e,t,r){"use strict";var n=r(8847)(r(3355));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},9954:function(e,t,r){"use strict";var n=r(9142),i=r(8847)(r(3355)),o=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(r)?n.showHidden=r:r&&t._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),l(n,e,n.depth)}function c(e,t){var r=u.styles[t];return r?"\x1b["+u.colors[r][0]+"m"+e+"\x1b["+u.colors[r][1]+"m":e}function f(e,t){return e}function l(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return b(i)||(i=l(e,i,n)),i}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):v(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),_(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(r);if(0===a.length){if(E(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return e.stylize(Date.prototype.toString.call(r),"date");if(_(r))return h(r)}var c,f="",k=!1,A=["{","}"];return p(r)&&(k=!0,A=["[","]"]),E(r)&&(f=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(f=" "+RegExp.prototype.toString.call(r)),x(r)&&(f=" "+Date.prototype.toUTCString.call(r)),_(r)&&(f=" "+h(r)),0!==a.length||k&&0!=r.length?n<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=k?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,f,A)):A[0]+f+A[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),M(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=m(r)?l(e,u.value,null):l(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),y(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function y(e){return void 0===e}function w(e){return k(e)&&"[object RegExp]"===A(e)}function k(e){return"object"===(0,i.default)(e)&&null!==e}function x(e){return k(e)&&"[object Date]"===A(e)}function _(e){return k(e)&&("[object Error]"===A(e)||e instanceof Error)}function E(e){return"function"==typeof e}function A(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(y(a)&&(a=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=v,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=b,t.isSymbol=function(e){return"symbol"===(0,i.default)(e)},t.isUndefined=y,t.isRegExp=w,t.isObject=k,t.isDate=x,t.isError=_,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,i.default)(e)||void 0===e},t.isBuffer=r(6732);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[S((e=new Date).getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":"),[e.getDate(),O[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(4074),t._extend=function(e,t){if(!t||!k(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},7548:function(e,t,r){"use strict";var n=r(8850).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,f=new Uint8Array(a);e[r];){var l=t[e.charCodeAt(r)];if(255===l)return;for(var h=0,d=a-1;(0!==l||h>>0,f[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");o=h,r++}for(var p=a-o;p!==a&&0===f[p];)p++;var v=n.allocUnsafe(i+(a-p));v.fill(0,0,i);for(var m=i;p!==a;)v[m++]=f[p++];return v}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,a=t.length;o!==a&&0===t[o];)o++,r++;for(var c=(a-o)*f+1>>>0,l=new Uint8Array(c);o!==a;){for(var h=t[o],d=0,p=c-1;(0!==h||d>>0,l[p]=h%s>>>0,h=h/s>>>0;if(0!==h)throw new Error("Non-zero carry");i=d,o++}for(var v=c-i;v!==c&&0===l[v];)v++;for(var m=u.repeat(r);v0?a-4:a;for(r=0;r>16&255,c[f++]=t>>8&255,c[f++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[f++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;su?u:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},1734:function(e,t,r){"use strict";e=r.nmd(e);var n=r(8847)(r(3355));!function(e,t){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"===(0,n.default)(e)?e.exports=a:(void 0).BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(9033).Buffer}catch(e){}function u(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+e)}function c(e,t,r){var n=u(e,r);return r-1>=t&&(n|=u(e,r-1)<<4),n}function f(e,t,r,n){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u=49?c-49+10:c>=17?c-17+10:c,i(c>=0&&a0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"===(0,n.default)(e))return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){a.prototype.inspect=h}else a.prototype.inspect=h;function h(){return(this.red?""}var d=["","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],v=[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];function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,a=0;a>>24-n&16777215,(n+=2)>=26&&(n-=26,a--),r=0!==o||a!==this.length-1?d[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=p[e],f=v[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var h=l.modrn(f).toString(e);r=(l=l.idivn(f)).isZero()?h+r:d[c-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.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&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,n),a},a.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},a.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 r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,v=d>>>13,m=0|a[2],g=8191&m,b=m>>>13,y=0|a[3],w=8191&y,k=y>>>13,x=0|a[4],_=8191&x,E=x>>>13,A=0|a[5],S=8191&A,O=A>>>13,M=0|a[6],P=8191&M,j=M>>>13,T=0|a[7],C=8191&T,R=T>>>13,L=0|a[8],N=8191&L,I=L>>>13,B=0|a[9],F=8191&B,D=B>>>13,U=0|s[0],z=8191&U,H=U>>>13,q=0|s[1],G=8191&q,J=q>>>13,V=0|s[2],K=8191&V,X=V>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],$=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(l,z))|0)+((8191&(i=(i=Math.imul(l,H))+Math.imul(h,z)|0))<<13)|0;c=((o=Math.imul(h,H))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(v,z)|0,o=Math.imul(v,H);var ge=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,H))+Math.imul(b,z)|0,o=Math.imul(b,H),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,J)|0;var be=(c+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(k,z)|0,o=Math.imul(k,H),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,X)|0;var ye=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,H))+Math.imul(E,z)|0,o=Math.imul(E,H),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Y)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,z),i=(i=Math.imul(S,H))+Math.imul(O,z)|0,o=Math.imul(O,H),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,J)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,J)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0;var ke=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(P,z),i=(i=Math.imul(P,H))+Math.imul(j,z)|0,o=Math.imul(j,H),n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0;var xe=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,H))+Math.imul(R,z)|0,o=Math.imul(R,H),n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var _e=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,H))+Math.imul(I,z)|0,o=Math.imul(I,H),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var Ee=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,z),i=(i=Math.imul(F,H))+Math.imul(D,z)|0,o=Math.imul(D,H),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,J)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var Ae=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,J))+Math.imul(D,G)|0,o=Math.imul(D,J),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,he)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(F,K),i=(i=Math.imul(F,X))+Math.imul(D,K)|0,o=Math.imul(D,X),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0;var Oe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ve)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,Z),i=(i=Math.imul(F,Y))+Math.imul(D,Z)|0,o=Math.imul(D,Y),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,he)|0;var Me=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,ee))+Math.imul(D,$)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(S,le)|0,i=(i=i+Math.imul(S,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Pe=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ve)|0)+Math.imul(E,pe)|0))<<13)|0;c=((o=o+Math.imul(E,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(j,le)|0,o=o+Math.imul(j,he)|0;var je=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ve)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(F,oe),i=(i=Math.imul(F,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,he)|0;var Te=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,ue),i=(i=Math.imul(F,ce))+Math.imul(D,ue)|0,o=Math.imul(D,ce),n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,he)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,he))+Math.imul(D,le)|0,o=Math.imul(D,he);var Re=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ve)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Le=(c+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,ve))+Math.imul(D,pe)|0))<<13)|0;return c=((o=Math.imul(D,ve))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=me,u[1]=ge,u[2]=be,u[3]=ye,u[4]=we,u[5]=ke,u[6]=xe,u[7]=_e,u[8]=Ee,u[9]=Ae,u[10]=Se,u[11]=Oe,u[12]=Me,u[13]=Pe,u[14]=je,u[15]=Te,u[16]=Ce,u[17]=Re,u[18]=Le,0!==c&&(u[19]=c,r.length++),r};function b(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function y(e,t,r){return b(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(g=m),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?m(this,e,t):r<1024?b(this,e,t):y(this,e,t)},w.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},w.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),t?this.ineg():this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=n);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>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},a.prototype.isubn=function(e){if(i("number"==typeof e),i(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>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this._strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new a(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%e;return t?-n:n},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(f),o.isub(l)),n.iushrn(1),o.iushrn(1);for(var p=0,v=1;0==(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(s),o.isub(u)):(r.isub(t),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,o=new a(1),s=new a(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(n=0===t.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new O(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var k={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function O(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){O.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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 a(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},o(_,x),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(k[e])return k[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return k[e]=t,t},O.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},O.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},O.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},O.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},O.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},O.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},O.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},O.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},O.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},O.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},O.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},O.prototype.isqr=function(e){return this.imul(e,e.clone())},O.prototype.sqr=function(e){return this.mul(e,e)},O.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);i(!n.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,n),h=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),p=o;0!==d.cmp(s);){for(var v=d,m=0;0!==v.cmp(s);m++)v=v.redSqr();i(m=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==o?(o<<=1,o|=l,(4==++s||0===n&&0===f)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}u=26}return i},O.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},O.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new M(e)},o(M,O),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e)},2202:function(e,t,r){"use strict";var n,i=r(8847)(r(3355));function o(e){this.rand=e}if(e.exports=function(e){return n||(n=new o(null)),n.generate(e)},e.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^f[p>>>16&255]^l[v>>>8&255]^h[255&m]^t[g++],a=c[p>>>24]^f[v>>>16&255]^l[m>>>8&255]^h[255&d]^t[g++],s=c[v>>>24]^f[m>>>16&255]^l[d>>>8&255]^h[255&p]^t[g++],u=c[m>>>24]^f[d>>>16&255]^l[p>>>8&255]^h[255&v]^t[g++],d=o,p=a,v=s,m=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[v>>>8&255]<<8|n[255&m])^t[g++],a=(n[p>>>24]<<24|n[v>>>16&255]<<16|n[m>>>8&255]<<8|n[255&d])^t[g++],s=(n[v>>>24]<<24|n[m>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[g++],u=(n[m>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&v])^t[g++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var f=e[a],l=e[f],h=e[l],d=257*e[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*h^65537*l^257*f^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=f^e[e[e[h^f]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},426:function(e,t,r){"use strict";var n=r(7494),i=r(8850).Buffer,o=r(3013),a=r(1736),s=r(6626),u=r(6316),c=r(7557);function f(e,t,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var f=this._cipher.encryptBlock(u);this._ghash=new s(f),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var u=8*o,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),e._finID=n.state;var l=i.from(e._finID);return c(l),l}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(f,o),f.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i16)throw new Error("unable to decrypt data");for(var r=-1;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return h(e,n.key,n.iv)},t.createDecipheriv=h},5478:function(e,t,r){"use strict";var n=r(8408),i=r(426),o=r(8850).Buffer,a=r(1408),s=r(3013),u=r(7494),c=r(7085);function f(e,t,r){s.call(this),this._cache=new h,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(1736)(f,s),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var l=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function d(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new f(s.module,t,r)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=o.concat([this.cache,e])},h.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},7557:function(e){"use strict";e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},7427:function(e,t,r){"use strict";var n=r(6316);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},4030:function(e,t,r){"use strict";var n=r(8850).Buffer,i=r(6316);function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}t.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},3206:function(e,t,r){"use strict";var n=r(8850).Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var r=function(e){var t=a(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),o=t.modulus.byteLength(),s=new i(e).mul(r.blinder).umod(t.modulus),u=s.toRed(i.mont(t.prime1)),c=s.toRed(i.mont(t.prime2)),f=t.coefficient,l=t.prime1,h=t.prime2,d=u.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),v=d.isub(p).imul(f).umod(l).imul(h);return p.iadd(v).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",o)}s.getr=a,e.exports=s},6561:function(e,t,r){"use strict";e.exports=r(5207)},9527:function(e,t,r){"use strict";var n=r(8850).Buffer,i=r(5866),o=r(6505),a=r(1736),s=r(1628),u=r(5410),c=r(5207);function f(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new f(e)}function d(e){return new l(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),a(f,o.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},f.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=s(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},a(l,o.Writable),l.prototype._write=function(e,t,r){this._hash.update(e),r()},l.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},l.prototype.verify=function(e,t,r){"string"==typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return u(t,i,e,this._signType,this._tag)},e.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},1628:function(e,t,r){"use strict";var n=r(8850).Buffer,i=r(4424),o=r(9782),a=r(6597).ec,s=r(1734),u=r(7552),c=r(1308);function f(e,t,r,o){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function h(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length=t)throw new Error("invalid sig")}e.exports=function(e,t,r,c,f){var l=a(r);if("ec"===l.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,l)}if("dsa"===l.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,s=r.data.g,c=r.data.pub_key,f=a.signature.decode(e,"der"),l=f.s,h=f.r;u(l,o),u(h,o);var d=i.mont(n),p=l.invm(o);return 0===s.toRed(d).redPow(new i(t).mul(p).mod(o)).fromRed().mul(c.toRed(d).redPow(h.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(h)}(e,t,l)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([f,t]);for(var h=l.modulus.byteLength(),d=[1],p=0;t.length+d.length+2=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return U(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return M(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);for(var r="",n=0;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return k(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function M(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;ii)&&(r=i);for(var o="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function L(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function N(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function I(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,o){return o||I(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return o||I(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((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),t0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}},3675:function(e){"use strict";e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},593:function(e,t,r){"use strict";var n=r(7701),i=r(4373),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},4373:function(e,t,r){"use strict";var n=r(3767),i=r(7701),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,a,arguments);return u&&c&&u(t,"length").configurable&&c(t,"length",{value:1+f(0,e.length-(arguments.length-1))}),t};var l=function(){return s(n,o,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l},7759:function(e,t,r){"use strict";for(var n=r(8847)(r(4519)),i=r(3630),o={},a=0,s=Object.entries(i);a0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&e===this.multibaseName)return this.string;var t=null;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");t=s.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");t=u.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}},{key:e,value:function(){return"CID("+this.toString()+")"}},{key:"toString",value:function(e){return this.toBaseEncodedString(e)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}}],[{key:"validateCID",value:function(e){var t=l.checkCIDComponents(e);if(t)throw new Error(t)}}]),t}(Symbol.for("nodejs.util.inspect.custom")),{className:"CID",symbolName:"@ipld/js-cid/CID"});h.codecs=f,e.exports=h},3013:function(e,t,r){"use strict";var n=r(8850).Buffer,i=r(7245).Transform,o=r(3462).s;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(1736)(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},3162:function(e,t,r){"use strict";var n=r(8847),i=n(r(4727)),o=n(r(775)),a=n(r(9721)),s=n(r(8985)),u=n(r(8975)),c=n(r(5163)),f=n(r(4650)),l=n(r(1949));e.exports=function(e,t){var r=t.className,n=t.symbolName,i=Symbol.for(n),h=(0,o.default)({},r,function(e,t){(0,c.default)(d,e);var n,o,h=(n=d,o=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}}(),function(){var e,t=(0,l.default)(n);if(o){var r=(0,l.default)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,f.default)(this,e)});function d(){var e;(0,a.default)(this,d);for(var t=arguments.length,r=new Array(t),n=0;n>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=function(e){var t=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=e[n];for(n=0;256!=n;++n)for(r=e[n],t=256+n;t<4096;t+=256)r=i[t]=r>>>8^e[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(t),n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],c=r[6],f=r[7],l=r[8],h=r[9],d=r[10],p=r[11],v=r[12],m=r[13],g=r[14];e.table=t,e.bstr=function(e,r){for(var n=-1^r,i=0,o=e.length;i>>8^t[255&(n^e.charCodeAt(i++))];return~n},e.buf=function(e,r){for(var b=-1^r,y=e.length-15,w=0;w>8&255]^v[e[w++]^b>>16&255]^p[e[w++]^b>>>24]^d[e[w++]]^h[e[w++]]^l[e[w++]]^f[e[w++]]^c[e[w++]]^u[e[w++]]^s[e[w++]]^a[e[w++]]^o[e[w++]]^i[e[w++]]^n[e[w++]]^t[e[w++]];for(y+=15;w>>8^t[255&(b^e[w++])];return~b},e.str=function(e,r){for(var n=-1^r,i=0,o=e.length,a=0,s=0;i>>8^t[255&(n^a)]:a<2048?n=(n=n>>>8^t[255&(n^(192|a>>6&31))])>>>8^t[255&(n^(128|63&a))]:a>=55296&&a<57344?(a=64+(1023&a),s=1023&e.charCodeAt(i++),n=(n=(n=(n=n>>>8^t[255&(n^(240|a>>8&7))])>>>8^t[255&(n^(128|a>>2&63))])>>>8^t[255&(n^(128|s>>6&15|(3&a)<<4))])>>>8^t[255&(n^(128|63&s))]):n=(n=(n=n>>>8^t[255&(n^(224|a>>12&15))])>>>8^t[255&(n^(128|a>>6&63))])>>>8^t[255&(n^(128|63&a))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"===(0,o.default)(t)?i(t):void 0===(n=function(){var e={};return i(e),e}.call(t,r,t,e))||(e.exports=n):i({})},5102:function(e,t,r){"use strict";var n=r(9033).Buffer,i=r(6597),o=r(1734);e.exports=function(e){return new s(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.lengthr?t=("rmd160"===e?new u:c(e)).update(t).digest():t.lengths?t=e(t):t.length-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function f(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function v(e){var t=new FileReader,r=p(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e,t,r,n=d(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=p(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function k(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},g.call(y.prototype),g.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},k.error=function(){var e=new k(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];k.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new k(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function _(e,r){return new Promise((function(n,o){var a=new y(e,r);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new k(i,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}_.polyfill=!0,e.fetch||(e.fetch=_,e.Headers=h,e.Request=y,e.Response=k),t.Headers=h,t.Request=y,t.Response=k,t.fetch=_,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:void 0)},4293:function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(5010),t.createHash=t.Hash=r(5866),t.createHmac=t.Hmac=r(4424);var n=r(6561),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(4192);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(6805);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var u=r(8333);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var c=r(9527);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=r(5102);var f=r(6991);t.publicEncrypt=f.publicEncrypt,t.privateEncrypt=f.privateEncrypt,t.publicDecrypt=f.publicDecrypt,t.privateDecrypt=f.privateDecrypt;var l=r(6509);t.randomFill=l.randomFill,t.randomFillSync=l.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},34:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i="%[a-f0-9]{2}",o=new RegExp("("+i+")|([^%]+?)","gi"),a=new RegExp("("+i+")+","gi");function s(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],s(r),s(n))}function u(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(o)||[],r=1;r0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},u.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=h}o.rip(s,a,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],f=e.keys[u+1];o.expand(a,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var l=o.substitute(c,f),h=a;a=(s^o.permute(l))>>>0,s=h}o.rip(a,s,n,i)}},9413:function(e,t,r){"use strict";var n=r(4504),i=r(1736),o=r(9591),a=r(3049);function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function u(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(u,o),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},319:function(e,t){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u>>r[u]&1;for(u=s;u>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(e>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)];return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(f).cmp(l);)r.iadd(d)}else for(;r.mod(o).cmp(h);)r.iadd(d);if(v(p=r.shrn(1))&&v(r)&&m(p)&&m(r)&&a.test(p)&&a.test(r))return r}}},6597:function(e,t,r){"use strict";var n=t;n.version=r(8597).i8,n.utils=r(7528),n.rand=r(2202),n.curve=r(6063),n.curves=r(506),n.ec=r(8320),n.eddsa=r(8027)},1249:function(e,t,r){"use strict";var n=r(1734),i=r(7528),o=i.getNAF,a=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;f--)u=(u<<1)+n[f];c.push(u)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,u=u.dblp(f),c<0)break;var l=a[c];s(0!==l),u="affine"===e.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var s,u,c,f=this._wnafT1,l=this._wnafT2,h=this._wnafT3,d=0;for(s=0;s=1;s-=2){var v=s-1,m=s;if(1===f[v]&&1===f[m]){var g=[t[v],null,null,t[m]];0===t[v].y.cmp(t[m].y)?(g[1]=t[v].add(t[m]),g[2]=t[v].toJ().mixedAdd(t[m].neg())):0===t[v].y.cmp(t[m].y.redNeg())?(g[1]=t[v].toJ().mixedAdd(t[m]),g[2]=t[v].add(t[m].neg())):(g[1]=t[v].toJ().mixedAdd(t[m]),g[2]=t[v].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=a(r[v],r[m]);for(d=Math.max(y[0].length,d),h[v]=new Array(d),h[m]=new Array(d),u=0;u=0;s--){for(var E=0;s>=0;){var A=!0;for(u=0;u=0&&E++,x=x.dblp(E),s<0)break;for(u=0;u0?c=l[u][S-1>>1]:S<0&&(c=l[u][-S-1>>1].neg()),x="affine"===c.type?x.mixedAdd(c):x.add(c))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),l=a.redMul(o);return this.curve.point(u,c,l,f)},c.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(e=a.redSub(s).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=a.redSub(s).redISub(u).redMul(o),t=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(u)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),f=s.redMul(u),l=o.redMul(u),h=a.redMul(s);return this.curve.point(c,f,h,l)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),l=n.redMul(u).redMul(f);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(l,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},6063:function(e,t,r){"use strict";var n=t;n.base=r(1249),n.short=r(3148),n.mont=r(1105),n.edwards=r(1123)},1105:function(e,t,r){"use strict";var n=r(1734),i=r(1736),o=r(1249),a=r(7528);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},3148:function(e,t,r){"use strict";var n=r(7528),i=r(1734),o=r(1736),a=r(1249),s=n.assert;function u(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,u,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new i(1),v=new i(0),m=new i(0),g=new i(1),b=0;0!==h.cmpn(0);){var y=d.div(h);c=d.sub(y.mul(h)),f=m.sub(y.mul(p));var w=g.sub(y.mul(v));if(!n&&c.cmp(l)<0)t=u.neg(),r=p,n=c.neg(),o=f;else if(n&&2==++b)break;u=c,d=h,h=c,m=p,p=f,g=v,v=w}a=c.neg(),s=f;var k=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(k)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new f(this,e,t,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},f.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},506:function(e,t,r){"use strict";var n,i=t,o=r(7198),a=r(6063),s=r(7528).assert;function u(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(6401)}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},8320:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(1734),o=r(9410),a=r(7528),s=r(506),u=r(2202),c=a.assert,f=r(7791),l=r(488);function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(c(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=h,h.prototype.keyPair=function(e){return new f(this,e)},h.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||u(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var a=new i(t.generate(r));if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}},h.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,r,a){"object"===(0,n.default)(r)&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),u=t.getPrivate().toArray("be",s),c=e.toArray("be",s),f=new o({hash:this.hash,entropy:u,nonce:c,pers:a.pers,persEnc:a.persEnc||"utf8"}),h=this.n.sub(new i(1)),d=0;;d++){var p=a.k?a.k(d):new i(f.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(h)>=0)){var v=this.g.mul(p);if(!v.isInfinity()){var m=v.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var b=p.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var y=(v.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),y^=1),new l({r:g,s:b,recoveryParam:y})}}}}}},h.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var o=(t=new l(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),f)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(e,t,r,n){c((3&r)===r,"The recovery param is more than two bits"),t=new l(t,n);var o=this.n,a=new i(e),s=t.r,u=t.s,f=1&r,h=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");s=h?this.curve.pointFromX(s.add(this.curve.n),f):this.curve.pointFromX(s,f);var d=t.r.invm(o),p=o.sub(a).mul(d).umod(o),v=u.mul(d).umod(o);return this.g.mulAdd(p,s,v)},h.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new l(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},7791:function(e,t,r){"use strict";var n=r(1734),i=r(7528).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},488:function(e,t,r){"use strict";var n=r(1734),i=r(7528),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=u(e,r);if(!1===a)return!1;var c=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=u(e,r);if(!1===f)return!1;if(e.length!==f+r.place)return!1;var l=e.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new n(c),this.s=new n(l),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,t.length),(n=n.concat(t)).push(2),f(n,r.length);var o=n.concat(r),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,e)}},8027:function(e,t,r){"use strict";var n=r(7198),i=r(506),o=r(7528),a=o.assert,s=o.parseBytes,u=r(7303),c=r(6646);function f(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=f,f.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0==(1&u)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0==(1&c)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},6464:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=function(){if("object"===("undefined"==typeof self?"undefined":(0,n.default)(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":(0,n.default)(window))&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return i()}try{return __global__||i()}finally{delete Object.prototype.__global__}}()},4258:function(e,t,r){"use strict";var n,i,o,a=r(9142),s=r(8847)(r(3355));o=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,i=void 0,o=void 0,u=function(e,t){v[n]=e,v[n+1]=t,2===(n+=2)&&(o?o(m):k())},c="undefined"!=typeof window?window:void 0,f=c||{},l=f.MutationObserver||f.WebKitMutationObserver,h="undefined"==typeof self&&void 0!==a&&"[object process]"==={}.toString.call(a),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(m,1)}}var v=new Array(1e3);function m(){for(var e=0;e=0;r--){var s=i(o[r]);t=i(new n(t+s,"hex"))}}return"0x"+t},t.normalize=a},3058:function(e,t,r){"use strict";var n=r(9033).Buffer,i=r(8847)(r(4519)),o=r(6851),a=r(9733),s=r(6597),u=(r(6740),new s.ec("secp256k1")),c=r(2922),f=c.keccak256,l=c.keccak256s,h=function(e){for(var t=l(e.slice(2)),r="0x",n=0;n<40;n++)r+=parseInt(t[n+2],16)>7?e[n+2].toUpperCase():e[n+2];return r},d=function(e){var t=new n(e.slice(2),"hex"),r="0x"+u.keyFromPrivate(t).getPublic(!1,"hex").slice(2),i=f(r);return{address:h("0x"+i.slice(-40)),privateKey:e}},p=function(e){var t=(0,i.default)(e,3),r=t[0],n=t[1],a=t[2];return o.flatten([n,a,r])},v=function(e){return[o.slice(64,o.length(e),e),o.slice(0,32,e),o.slice(32,64,e)]},m=function(e){return function(t,r){var i=u.keyFromPrivate(new n(r.slice(2),"hex")).sign(new n(t.slice(2),"hex"),{canonical:!0});return p([a.fromString(o.fromNumber(e+i.recoveryParam)),o.pad(32,o.fromNat("0x"+i.r.toString(16))),o.pad(32,o.fromNat("0x"+i.s.toString(16)))])}},g=m(27);e.exports={create:function(e){var t=f(o.concat(o.random(32),e||o.random(32))),r=o.concat(o.concat(o.random(32),t),o.random(32)),n=f(r);return d(n)},toChecksum:h,fromPrivate:d,sign:g,makeSigner:m,recover:function(e,t){var r=v(t),i={v:o.toNumber(r[0]),r:r[1].slice(2),s:r[2].slice(2)},a="0x"+u.recoverPubKey(new n(e.slice(2),"hex"),i,i.v<2?i.v:1-i.v%2).encode("hex",!1).slice(2),s=f(a);return h("0x"+s.slice(-40))},encodeSignature:p,decodeSignature:v}},1376:function(e){"use strict";var t=function(e,t){for(var r=[],n=0;n>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},2922:function(e){"use strict";var t="0123456789abcdef".split(""),r=[1,256,65536,16777216],n=[0,8,16,24],i=[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],o=function(e){var t,r,n,o,a,s,u,c,f,l,h,d,p,v,m,g,b,y,w,k,x,_,E,A,S,O,M,P,j,T,C,R,L,N,I,B,F,D,U,z,H,q,G,J,V,K,X,W,Z,Y,Q,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(c<<1|f>>>31),r=a^(f<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|p>>>31),r=f^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(o<<1|a>>>31),r=h^(a<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,v=e[0],m=e[1],K=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,j=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,J=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,O=e[18]<<20|e[19]>>>12,M=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=v^~g&y,e[1]=m^~b&w,e[10]=A^~O&P,e[11]=S^~M&j,e[20]=N^~B&D,e[21]=I^~F&U,e[30]=J^~K&W,e[31]=V^~X&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~y&k,e[3]=b^~w&x,e[12]=O^~P&T,e[13]=M^~j&C,e[22]=B^~D&z,e[23]=F^~U&H,e[32]=K^~W&Y,e[33]=X^~Z&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=y^~k&_,e[5]=w^~x&E,e[14]=P^~T&R,e[15]=j^~C&L,e[24]=D^~z&q,e[25]=U^~H&G,e[34]=W^~Y&$,e[35]=Z^~Q&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=k^~_&v,e[7]=x^~E&m,e[16]=T^~R&A,e[17]=C^~L&S,e[26]=z^~q&N,e[27]=H^~G&I,e[36]=Y^~$&J,e[37]=Q^~ee&V,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=_^~v&g,e[9]=E^~m&b,e[18]=R^~A&O,e[19]=L^~S&M,e[28]=q^~N&B,e[29]=G^~I&F,e[38]=$^~J&K,e[39]=ee^~V&X,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=i[n],e[1]^=i[n+1]},a=function(e){return function(i){var a;if("0x"===i.slice(0,2)){a=[];for(var s=2,u=i.length;s>2]|=i[d]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(u[m>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=c){for(e.start=m-c,e.block=u[f],m=0;m>2]|=r[3&m],e.lastByteIndex===c)for(u[0]=u[f],m=1;m>4&15]+t[15&p]+t[p>>12&15]+t[p>>8&15]+t[p>>20&15]+t[p>>16&15]+t[p>>28&15]+t[p>>24&15];g%f==0&&(o(h),m=0)}return"0x"+v}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),a)}};e.exports={keccak256:a(256),keccak512:a(512),keccak256s:a(256),keccak512s:a(512)}},9733:function(e,t,r){"use strict";var n=r(1734),i=r(6851),o=function(e){return new n(e.slice(2),16)},a=function(e){var t="0x"+("0x"===e.slice(0,2)?new n(e.slice(2),16):new n(e,10)).toString("hex");return"0x0"===t?"0x":t},s=function(e){return"string"==typeof e?/^0x/.test(e)?e:"0x"+e:"0x"+new n(e).toString("hex")},u=function(e){return o(e).toNumber()},c=function(e){return function(t,r){return"0x"+o(t)[e](o(r)).toString("hex")}},f=c("add"),l=c("mul"),h=c("div"),d=c("sub");e.exports={toString:function(e){return o(e).toString(10)},fromString:a,toNumber:u,fromNumber:s,toEther:function(e){return u(h(e,a("10000000000")))/1e8},fromEther:function(e){return l(s(Math.floor(1e8*e)),a("10000000000"))},toUint256:function(e){return i.pad(32,e)},add:f,mul:l,div:h,sub:d}},6740:function(e){"use strict";e.exports={encode:function(e){var t=function(e){return(t=e.toString(16)).length%2==0?t:"0"+t;var t},r=function(e,r){return e<56?t(r+e):t(r+t(e).length/2+55)+t(e)};return"0x"+function e(t){if("string"==typeof t){var n=t.slice(2);return(2!=n.length||n>="80"?r(n.length/2,128):"")+n}var i=t.map(e).join("");return r(i.length/2,192)+i}(e)},decode:function(e){var t=2,r=function(){if(t>=e.length)throw"";var r=e.slice(t,t+2);return r<"80"?(t+=2,"0x"+r):r<"c0"?i():o()},n=function(){var r=parseInt(e.slice(t,t+=2),16)%64;return r<56?r:parseInt(e.slice(t,t+=2*(r-55)),16)},i=function(){var r=n();return"0x"+e.slice(t,t+=2*r)},o=function(){for(var e=2*n()+t,i=[];t=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error("invalid bloom")}function u(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{64}$/i.test(e)||!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))}function c(e){return!("string"!=typeof e||!e.match(/^(0x)?[0-9a-fA-F]{40}$/)&&!e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}t.isBloom=o,t.isInBloom=a,t.isUserEthereumAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!c(t))throw new Error('Invalid ethereum address given: "'.concat(t,'"'));return a(e,i.padLeft(t,64))},t.isContractAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!c(t))throw new Error('Invalid contract address given: "'.concat(t,'"'));return a(e,t)},t.isTopicInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error("Invalid topic");return a(e,t)},t.isTopic=u,t.isAddress=c},8179:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7286);function i(e){if(null==e)throw new Error("cannot convert null value to array");if("string"==typeof e){var t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw new Error("invalid hexidecimal string");if("0x"!==t[1])throw new Error("hex string must have 0x prefix");(e=e.substring(2)).length%2&&(e="0"+e);for(var r=[],n=0;n=256||parseInt(String(r))!=r)return!1}return!0}(e))return o(new Uint8Array(e));throw new Error("invalid arrayify value")}function o(e){var t=arguments;return void 0!==e.slice||(e.slice=function(){var r=Array.prototype.slice.call(t);return o(new Uint8Array(Array.prototype.slice.apply(e,r)))}),e}t.keccak256=function(e){return"0x"+n.keccak_256(i(e))},t.padLeft=function(e,t){var r=/^0x/i.test(e)||"number"==typeof e,n=t-(e=e.toString().replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(r?"0x":"")+new Array(n).join("0")+e},t.bytesToHex=function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x".concat(t.join("").replace(/^0+/,""))},t.toByteArray=i},7286:function(e,t,r){"use strict";e=r.nmd(e);var n,i=r(9142),o=r(8847)(r(3355));!function(){var a="input is invalid type",s="object"===("undefined"==typeof window?"undefined":(0,o.default)(window)),u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"===("undefined"==typeof self?"undefined":(0,o.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===i?"undefined":(0,o.default)(i))&&i.versions&&i.versions.node?u=r.g:c&&(u=self);var f=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,o.default)(e)&&e.exports,l=r.amdO,h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),p=[4,1024,262144,67108864],v=[0,8,16,24],m=[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],g=[224,256,384,512],b=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,o.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var k=function(e,t,r){return function(n){return new I(e,t,e).update(n)[r]()}},x=function(e,t,r){return function(n,i){return new I(e,t,i).update(n)[r]()}},_=function(e,t,r){return function(t,n,i,o){return M["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return M["kmac"+e].update(t,n,i,o)[r]()}},A=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function B(e,t,r){I.call(this,e,t,r)}I.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var n,i,s=this.blocks,u=this.byteCount,c=e.length,f=this.blockCount,l=0,d=this.s;l>2]|=e[l]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=u){for(this.start=n-u,this.block=s[f],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},I.prototype.encodeString=function(e){var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}var n=0,i=e.length;if(t)n=i;else for(var s=0;s=57344?n+=3:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},I.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t==0&&(F(r),o=0)}return i&&(e=r[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},I.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&F(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},B.prototype=new I,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),I.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,s,u,c,f,l,h,d,p,v,g,b,y,w,k,x,_,E,A,S,O,M,P,j,T,C,R,L,N,I,B,F,D,U,z,H,q,G,J,V,K,X,W,Z,Y,Q,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(f<<1|l>>>31),r=s^(l<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|d>>>31),r=c^(d<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],v=e[1],K=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,j=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,J=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,O=e[18]<<20|e[19]>>>12,M=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=p^~g&y,e[1]=v^~b&w,e[10]=A^~O&P,e[11]=S^~M&j,e[20]=N^~B&D,e[21]=I^~F&U,e[30]=J^~K&W,e[31]=V^~X&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~y&k,e[3]=b^~w&x,e[12]=O^~P&T,e[13]=M^~j&C,e[22]=B^~D&z,e[23]=F^~U&H,e[32]=K^~W&Y,e[33]=X^~Z&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=y^~k&_,e[5]=w^~x&E,e[14]=P^~T&R,e[15]=j^~C&L,e[24]=D^~z&q,e[25]=U^~H&G,e[34]=W^~Y&$,e[35]=Z^~Q&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=k^~_&p,e[7]=x^~E&v,e[16]=T^~R&A,e[17]=C^~L&S,e[26]=z^~q&N,e[27]=H^~G&I,e[36]=Y^~$&J,e[37]=Q^~ee&V,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=_^~p&g,e[9]=E^~v&b,e[18]=R^~A&O,e[19]=L^~S&M,e[28]=q^~N&B,e[29]=G^~I&F,e[38]=$^~J&K,e[39]=ee^~V&X,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(f)e.exports=M;else{for(j=0;j0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(t,4),n=r[0],i=r[1],o=r[2],s=r[3];return new e(new a.BN(n),new a.BN(i),o,s)},e.prototype._validate=function(){if(this.nonce.lt(new a.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new a.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,d.bnToUnpaddedBuffer)(this.nonce),(0,d.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return a.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(c.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(c.KECCAK256_NULL)},e}();t.Account=p,t.isValidAddress=function(e){try{(0,h.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,h.assertIsHexString)(e);var r=(0,u.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,d.toType)(t,d.TypeOutput.BN).toString()+"0x");for(var i=(0,l.keccakFromString)(n+r).toString("hex"),o="0x",a=0;a=8?o+=r[a].toUpperCase():o+=r[a];return o},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){(0,h.assertIsBuffer)(e),(0,h.assertIsBuffer)(t);var r=new a.BN(t);return r.isZero()?(0,l.rlphash)([e,null]).slice(-20):(0,l.rlphash)([e,n.from(r.toArray())]).slice(-20)},t.generateAddress2=function(e,t,r){return(0,h.assertIsBuffer)(e),(0,h.assertIsBuffer)(t),(0,h.assertIsBuffer)(r),(0,o.default)(20===e.length),(0,o.default)(32===t.length),(0,l.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,l.keccak256)(r)])).slice(-20)},t.isValidPrivate=function(e){return(0,s.privateKeyVerify)(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),(0,h.assertIsBuffer)(e),64===e.length?(0,s.publicKeyVerify)(n.concat([n.from([4]),e])):!!t&&(0,s.publicKeyVerify)(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),(0,h.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),(0,o.default)(64===e.length),(0,l.keccak)(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,h.assertIsBuffer)(e),n.from((0,s.publicKeyCreate)(e,!1)).slice(1)},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,h.assertIsBuffer)(e),64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),e},t.zeroAddress=function(){var e=(0,f.zeros)(20);return(0,f.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,h.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}},1984:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var i,o=(i=r(3894))&&i.__esModule?i:{default:i},a=r(9100),s=r(3464),u=r(1968),c=function(){function e(e){(0,o.default)(20===e.length,"Invalid address length"),this.buf=e}return e.zero=function(){return new e((0,s.zeros)(20))},e.fromString=function(t){return(0,o.default)((0,u.isValidAddress)(t),"Invalid address"),new e((0,s.toBuffer)(t))},e.fromPublicKey=function(t){return(0,o.default)(n.isBuffer(t),"Public key should be Buffer"),new e((0,u.pubToAddress)(t))},e.fromPrivateKey=function(t){return(0,o.default)(n.isBuffer(t),"Private key should be Buffer"),new e((0,u.privateToAddress)(t))},e.generate=function(t,r){return(0,o.default)(a.BN.isBN(r)),new e((0,u.generateAddress)(t.buf,r.toArrayLike(n)))},e.generate2=function(t,r,i){return(0,o.default)(n.isBuffer(r)),(0,o.default)(n.isBuffer(i)),new e((0,u.generateAddress2)(t.buf,r,i))},e.prototype.equals=function(e){return this.buf.equals(e.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var e=new a.BN(this.buf),t=new a.BN(0),r=new a.BN("ffff","hex");return e.gte(t)&&e.lte(r)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return n.from(this.buf)},e}();t.Address=c},3464:function(e,t,r){"use strict";var n=r(9033).Buffer,i=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var o=r(9100),a=r(3271),s=r(5725);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))},t.intToBuffer=function(e){var r=(0,t.intToHex)(e);return n.from((0,a.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};var u=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,s.assertIsBuffer)(e),c(e)},t.unpadArray=function(e){return(0,s.assertIsArray)(e),c(e)},t.unpadHexString=function(e){return(0,s.assertIsHexString)(e),e=(0,a.stripHexPrefix)(e),c(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,a.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,a.padToEven)((0,a.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if(o.BN.isBN(e)){if(e.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(e));return e.toArrayLike(n)}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")},t.bufferToInt=function(e){return new o.BN((0,t.toBuffer)(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.fromSigned=function(e){return new o.BN(e).fromTwos(256)},t.toUnsigned=function(e){return n.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e||(0,a.isHexPrefixed)(e)?e:"0x"+e},t.toUtf8=function(e){if((e=(0,a.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var r=[],i=0;i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),o=n.next();!o.done;o=n.next()){var a=i(o.value,2),s=a[0],u=a[1];if(void 0!==u&&u.length>0&&0===u[0])throw new Error("".concat(s," cannot have leading zeroes, received: ").concat(u.toString("hex")))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!=t?t:[])}},986:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(9033),i=r(9100);t.MAX_UINT64=new i.BN("ffffffffffffffff",16),t.MAX_INTEGER=new i.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new i.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},9100:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var o,a=(o=r(1734))&&o.__esModule?o:{default:o};t.BN=a.default;var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t}(r(6905));t.rlp=s},9808:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var i=r(1243),o=r(5866),a=r(9100),s=r(3464),u=r(5725);t.keccak=function(e,t){switch(void 0===t&&(t=256),(0,u.assertIsBuffer)(e),t){case 224:return(0,i.keccak224)(e);case 256:return(0,i.keccak256)(e);case 384:return(0,i.keccak384)(e);case 512:return(0,i.keccak512)(e);default:throw new Error("Invald algorithm: keccak".concat(t))}},t.keccak256=function(e){return(0,t.keccak)(e)},t.keccakFromString=function(e,r){void 0===r&&(r=256),(0,u.assertIsString)(e);var i=n.from(e,"utf8");return(0,t.keccak)(i,r)},t.keccakFromHexString=function(e,r){return void 0===r&&(r=256),(0,u.assertIsHexString)(e),(0,t.keccak)((0,s.toBuffer)(e),r)},t.keccakFromArray=function(e,r){return void 0===r&&(r=256),(0,u.assertIsArray)(e),(0,t.keccak)((0,s.toBuffer)(e),r)};var c=function(e){return e=(0,s.toBuffer)(e),o("sha256").update(e).digest()};t.sha256=function(e){return(0,u.assertIsBuffer)(e),c(e)},t.sha256FromString=function(e){return(0,u.assertIsString)(e),c(e)},t.sha256FromArray=function(e){return(0,u.assertIsArray)(e),c(e)};var f=function(e,t){e=(0,s.toBuffer)(e);var r=o("rmd160").update(e).digest();return!0===t?(0,s.setLengthLeft)(r,32):r};t.ripemd160=function(e,t){return(0,u.assertIsBuffer)(e),f(e,t)},t.ripemd160FromString=function(e,t){return(0,u.assertIsString)(e),f(e,t)},t.ripemd160FromArray=function(e,t){return(0,u.assertIsArray)(e),f(e,t)},t.rlphash=function(e){return(0,t.keccak)(a.rlp.encode(e))}},5725:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var i=r(3271);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}},t.assertIsBuffer=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}},t.assertIsArray=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}},t.assertIsString=function(e){if("string"!=typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}}},3062:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,i(r(986),t),i(r(1968),t),i(r(1984),t),i(r(9808),t),i(r(6081),t),i(r(3464),t),i(r(1677),t),i(r(9100),t),i(r(5513),t);var o=r(3271);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}})},3271:function(e,t,r){"use strict";var n=r(9033).Buffer,i=r(8847)(r(3355));function o(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,i.default)(e)));return"0"===e[0]&&"x"===e[1]}function a(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat((0,i.default)(t)));return t.length%2&&(t="0".concat(t)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=o,t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,i.default)(e)));return o(e)?e.slice(2):e},t.padToEven=a,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat((0,i.default)(e)));return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,i.default)(e),"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,i.default)(t),"'"));return t[r?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r=i.length,"The field ".concat(t.name," must not have more ").concat(t.length," bytes"))):t.allowZero&&0===i.length||!t.length||(0,a.default)(t.length===i.length,"The field ".concat(t.name," must have byte length of ").concat(t.length)),e.raw[r]=i}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:i,set:o}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),r)if("string"==typeof r&&(r=n.from((0,s.stripHexPrefix)(r),"hex")),n.isBuffer(r)&&(r=u.rlp.decode(r)),Array.isArray(r)){if(r.length>e._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(t,r){e[e._fields[r]]=(0,c.toBuffer)(t)}))}else{if("object"!==(0,i.default)(r))throw new Error("invalid data");var o=Object.keys(r);t.forEach((function(t){-1!==o.indexOf(t.name)&&(e[t.name]=r[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=r[t.alias])}))}}},6081:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var i=r(6992),o=r(9100),a=r(3464),s=r(9808),u=r(5725),c=r(5513);function f(e,t){var r=(0,c.toType)(e,c.TypeOutput.BN);if(r.eqn(0)||r.eqn(1))return(0,c.toType)(e,c.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,c.toType)(t,c.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function l(e){var t=new o.BN(e);return t.eqn(0)||t.eqn(1)}t.ecsign=function(e,t,r){var o=(0,i.ecdsaSign)(e,t),a=o.signature,s=o.recid,u=n.from(a.slice(0,32)),f=n.from(a.slice(32,64));if(!r||"number"==typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:u,s:f,v:r?s+(2*r+35):s+27}}return{r:u,s:f,v:(0,c.toType)(r,c.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(n)}},t.ecrecover=function(e,t,r,o,s){var u=n.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(o,32)],64),c=f(t,s);if(!l(c))throw new Error("Invalid signature v value");var h=(0,i.ecdsaRecover)(u,c.toNumber(),e);return n.from((0,i.publicKeyConvert)(h,!1).slice(1))},t.toRpcSig=function(e,t,r,i){if(!l(f(e,i)))throw new Error("Invalid signature v value");return(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(r,32),(0,a.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!l(f(e,i)))throw new Error("Invalid signature v value");var o=(0,c.toType)(e,c.TypeOutput.Number),s=r;return(o>28&&o%2==1||1===o||28===o)&&((s=n.from(r))[0]|=128),(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(s,32)]))},t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}},t.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var a=new o.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new o.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!l(f(e,i)))return!1;var u=new o.BN(t),c=new o.BN(r);return!(u.isZero()||u.gt(s)||c.isZero()||c.gt(s)||n&&1===c.cmp(a))},t.hashPersonalMessage=function(e){(0,u.assertIsBuffer)(e);var t=n.from("\x19Ethereum Signed Message:\n".concat(e.length),"utf-8");return(0,s.keccak)(n.concat([t,e]))}},5513:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var i,o=r(9100),a=r(3271),s=r(3464);function u(e){return(0,s.unpadBuffer)(e.toArrayLike(n))}t.bnToHex=function(e){return"0x".concat(e.toString(16))},t.bnToUnpaddedBuffer=u,t.bnToRlp=function(e){return u(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(i=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,a.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(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)");var r=(0,s.toBuffer)(e);if(t===i.Buffer)return r;if(t===i.BN)return new o.BN(r);if(t===i.Number){var n=new o.BN(r),u=new o.BN(Number.MAX_SAFE_INTEGER.toString());if(n.gt(u))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return n.toNumber()}return"0x".concat(r.toString("hex"))}}},7130:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(1734),o=r(7277),a=new i(0),s=new i(-1),u={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",r=u[t];if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(u,null,2));return new i(r,10)}function f(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"===(0,n.default)(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 "+(0,n.default)(e)+".")}e.exports={unitMap:u,numberToString:f,getValueOfUnit:c,fromWei:function(e,t,r){var n=o(e),i=n.lt(a),f=c(t),l=u[t].length-1||1,h=r||{};i&&(n=n.mul(s));for(var d=n.mod(f).toString(10);d.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var h=l[0],d=l[1];if(h||(h="0"),d||(d="0"),d.length>o)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;d.length0&&u.length>a){u.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+u.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=u.length,"object"===("undefined"==typeof console?"undefined":(0,n.default)(console))&&console.warn&&console.warn("%s: %s",c.name,c.message)}}else u=s[t]=r,++e._eventsCount;return e}function d(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(r=a[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=g(e,n),o=0;o=0;a--)if(r[a]===t||r[a].listener===t){s=r[a].listener,o=a;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var r=t,n=r+1,i=e.length;n=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return v(this,e,!0)},s.prototype.rawListeners=function(e){return v(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},7085:function(e,t,r){"use strict";var n=r(8850).Buffer,i=r(807);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var f=new i;f.update(c),f.update(e),t&&f.update(t),c=f.digest();var l=0;if(a>0){var h=s.length-a;l=Math.min(a,c.length),c.copy(s,h,0,l),a-=l}if(l0){var d=u.length-o,p=Math.min(o,c.length-l);c.copy(u,d,l,l+p),o-=p}}return c.fill(0),{key:s,iv:u}}},8184:function(e,t,r){"use strict";var n=r(1493),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===E(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=_(e,0,1),r=_(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return x(e,A,(function(e,t,r,i){n[n.length]=r?x(i,S,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=O("%"+n+"%",t),a=i.name,u=i.value,f=!1,l=i.alias;l&&(n=l[0],k(r,w([0,1],l)));for(var h=1,d=!0;h=r.length){var b=c(u,p);u=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[p]}else d=y(u,p),u=u[p];d&&!f&&(m[a]=u)}}return u}},2948:function(e,t,r){"use strict";var n;n="undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},e.exports=n},3820:function(e,t,r){"use strict";var n=r(7701)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8489:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i="undefined"!=typeof Symbol&&Symbol,o=r(7027);e.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"===(0,n.default)(i("foo"))&&"symbol"===(0,n.default)(Symbol("bar"))&&o()}},7027:function(e,t,r){"use strict";var n=r(8847)(r(3355));e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===(0,n.default)(Symbol.iterator))return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},1191:function(e,t,r){"use strict";var n=r(7027);e.exports=function(){return n()&&!!Symbol.toStringTag}},1888:function(e,t,r){"use strict";var n=r(3767);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},2353:function(e,t,r){"use strict";var n=r(8850).Buffer,i=r(6505).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1736)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},7198:function(e,t,r){"use strict";var n=t;n.utils=r(4268),n.common=r(4696),n.sha=r(9310),n.ripemd=r(9294),n.hmac=r(3201),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},4696:function(e,t,r){"use strict";var n=r(4268),i=r(4504);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},4268:function(e,t,r){"use strict";var n=r(4504),i=r(1736);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var f=0,l=t;return f+=(l=l+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},9410:function(e,t,r){"use strict";var n=r(7198),i=r(6580),o=r(4504);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length\\$%@\u0621\u0624\u0629\"'^|~\u2985\u2986\u30fb\u30a5\u30e3\xa2\xa3\xac\xa6\xa5\u20a9\u2502\u2190\u2191\u2192\u2193\u25a0\u25cb\ud801\udc28\ud801\udc29\ud801\udc2a\ud801\udc2b\ud801\udc2c\ud801\udc2d\ud801\udc2e\ud801\udc2f\ud801\udc30\ud801\udc31\ud801\udc32\ud801\udc33\ud801\udc34\ud801\udc35\ud801\udc36\ud801\udc37\ud801\udc38\ud801\udc39\ud801\udc3a\ud801\udc3b\ud801\udc3c\ud801\udc3d\ud801\udc3e\ud801\udc3f\ud801\udc40\ud801\udc41\ud801\udc42\ud801\udc43\ud801\udc44\ud801\udc45\ud801\udc46\ud801\udc47\ud801\udc48\ud801\udc49\ud801\udc4a\ud801\udc4b\ud801\udc4c\ud801\udc4d\ud801\udc4e\ud801\udc4f\ud801\udcd8\ud801\udcd9\ud801\udcda\ud801\udcdb\ud801\udcdc\ud801\udcdd\ud801\udcde\ud801\udcdf\ud801\udce0\ud801\udce1\ud801\udce2\ud801\udce3\ud801\udce4\ud801\udce5\ud801\udce6\ud801\udce7\ud801\udce8\ud801\udce9\ud801\udcea\ud801\udceb\ud801\udcec\ud801\udced\ud801\udcee\ud801\udcef\ud801\udcf0\ud801\udcf1\ud801\udcf2\ud801\udcf3\ud801\udcf4\ud801\udcf5\ud801\udcf6\ud801\udcf7\ud801\udcf8\ud801\udcf9\ud801\udcfa\ud801\udcfb\ud803\udcc0\ud803\udcc1\ud803\udcc2\ud803\udcc3\ud803\udcc4\ud803\udcc5\ud803\udcc6\ud803\udcc7\ud803\udcc8\ud803\udcc9\ud803\udcca\ud803\udccb\ud803\udccc\ud803\udccd\ud803\udcce\ud803\udccf\ud803\udcd0\ud803\udcd1\ud803\udcd2\ud803\udcd3\ud803\udcd4\ud803\udcd5\ud803\udcd6\ud803\udcd7\ud803\udcd8\ud803\udcd9\ud803\udcda\ud803\udcdb\ud803\udcdc\ud803\udcdd\ud803\udcde\ud803\udcdf\ud803\udce0\ud803\udce1\ud803\udce2\ud803\udce3\ud803\udce4\ud803\udce5\ud803\udce6\ud803\udce7\ud803\udce8\ud803\udce9\ud803\udcea\ud803\udceb\ud803\udcec\ud803\udced\ud803\udcee\ud803\udcef\ud803\udcf0\ud803\udcf1\ud803\udcf2\ud806\udcc0\ud806\udcc1\ud806\udcc2\ud806\udcc3\ud806\udcc4\ud806\udcc5\ud806\udcc6\ud806\udcc7\ud806\udcc8\ud806\udcc9\ud806\udcca\ud806\udccb\ud806\udccc\ud806\udccd\ud806\udcce\ud806\udccf\ud806\udcd0\ud806\udcd1\ud806\udcd2\ud806\udcd3\ud806\udcd4\ud806\udcd5\ud806\udcd6\ud806\udcd7\ud806\udcd8\ud806\udcd9\ud806\udcda\ud806\udcdb\ud806\udcdc\ud806\udcdd\ud806\udcde\ud806\udcdf\u0131\u0237\u2207\u2202\ud83a\udd22\ud83a\udd23\ud83a\udd24\ud83a\udd25\ud83a\udd26\ud83a\udd27\ud83a\udd28\ud83a\udd29\ud83a\udd2a\ud83a\udd2b\ud83a\udd2c\ud83a\udd2d\ud83a\udd2e\ud83a\udd2f\ud83a\udd30\ud83a\udd31\ud83a\udd32\ud83a\udd33\ud83a\udd34\ud83a\udd35\ud83a\udd36\ud83a\udd37\ud83a\udd38\ud83a\udd39\ud83a\udd3a\ud83a\udd3b\ud83a\udd3c\ud83a\udd3d\ud83a\udd3e\ud83a\udd3f\ud83a\udd40\ud83a\udd41\ud83a\udd42\ud83a\udd43\u066e\u06a1\u066f\u5b57\u53cc\u591a\u89e3\u4ea4\u6620\u7121\u524d\u5f8c\u518d\u65b0\u521d\u7d42\u8ca9\u58f0\u5439\u6f14\u6295\u6355\u904a\u6307\u7981\u7a7a\u5408\u6e80\u7533\u5272\u55b6\u914d\u5f97\u53ef\u4e3d\u4e38\u4e41\ud840\udd22\u4f60\u4fbb\u5002\u507a\u5099\u50cf\u349e\ud841\ude3a\u5154\u5164\u5177\ud841\udd1c\u34b9\u5167\ud841\udd4b\u5197\u51a4\u4ecc\u51ac\ud864\udddf\u5203\u34df\u523b\u5246\u5277\u3515\u5305\u5306\u5349\u535a\u5373\u537d\u537f\ud842\ude2c\u7070\u53ca\u53df\ud842\udf63\u53eb\u53f1\u5406\u549e\u5438\u5448\u5468\u54a2\u54f6\u5510\u5553\u5563\u5584\u55ab\u55b3\u55c2\u5716\u5717\u5651\u5674\u58ee\u57ce\u57f4\u580d\u578b\u5832\u5831\u58ac\ud845\udce4\u58f2\u58f7\u5906\u5922\u5962\ud845\udea8\ud845\udeea\u59ec\u5a1b\u5a27\u59d8\u5a66\u36ee\u5b08\u5b3e\ud846\uddc8\u5bc3\u5bd8\u5bf3\ud846\udf18\u5bff\u5c06\u3781\u5c60\u5cc0\u5c8d\ud847\udde4\u5d43\ud847\udde6\u5d6e\u5d6b\u5d7c\u5de1\u5de2\u382f\u5dfd\u5e28\u5e3d\u5e69\u3862\ud848\udd83\u387c\u5eb0\u5eb3\u5eb6\ud868\udf92\ud848\udf31\u8201\u5f22\u38c7\ud84c\udeb8\ud858\uddda\u5f62\u5f6b\u38e3\u5f9a\u5fcd\u5fd7\u5ff9\u6081\u393a\u391c\ud849\uded4\u60c7\u6148\u614c\u617a\u61b2\u61a4\u61af\u61de\u621b\u625d\u62b1\u62d4\u6350\ud84a\udf0c\u633d\u62fc\u6368\u6383\u63e4\ud84a\udff1\u6422\u63c5\u63a9\u3a2e\u6469\u647e\u649d\u6477\u3a6c\u656c\ud84c\udc0a\u65e3\u66f8\u6649\u3b19\u3b08\u3ae4\u5192\u5195\u6700\u669c\u80ad\u43d9\u6721\u675e\u6753\ud84c\udfc3\u3b49\u67fa\u6785\u6852\ud84d\udc6d\u688e\u681f\u6914\u6942\u69a3\u69ea\u6aa8\ud84d\udea3\u6adb\u3c18\u6b21\ud84e\udca7\u6b54\u3c4e\u6b72\u6b9f\u6bbb\ud84e\ude8d\ud847\udd0b\ud84e\udefa\u6c4e\ud84f\udcbc\u6cbf\u6ccd\u6c67\u6d16\u6d3e\u6d69\u6d78\u6d85\ud84f\udd1e\u6d34\u6e2f\u6e6e\u3d33\u6ec7\ud84f\uded1\u6df9\u6f6e\ud84f\udf5e\ud84f\udf8e\u6fc6\u7039\u701b\u3d96\u704a\u707d\u7077\u70ad\ud841\udd25\u7145\ud850\ude63\u719c\u7228\u7250\ud851\ude08\u7280\u7295\ud851\udf35\ud852\udc14\u737a\u738b\u3eac\u73a5\u3eb8\u7447\u745c\u7485\u74ca\u3f1b\u7524\ud853\udc36\u753e\ud853\udc92\ud848\udd9f\u7610\ud853\udfa1\ud853\udfb8\ud854\udc44\u3ffc\u4008\ud854\udcf3\ud854\udcf2\ud854\udd19\ud854\udd33\u771e\u771f\u778b\u4046\u4096\ud855\udc1d\u784e\u40e3\ud855\ude26\ud855\ude9a\ud855\udec5\u79eb\u412f\u7a4a\u7a4f\ud856\udd7c\ud856\udea7\u4202\ud856\udfab\u7bc6\u7bc9\u4227\ud857\udc80\u7cd2\u42a0\u7ce8\u7ce3\u7d00\ud857\udf86\u7d63\u4301\u7dc7\u7e02\u7e45\u4334\ud858\ude28\ud858\ude47\u4359\ud858\uded9\u7f7a\ud858\udf3e\u7f95\u7ffa\ud859\udcda\ud859\udd23\u8060\ud859\udda8\u8070\ud84c\udf5f\u43d5\u80b2\u8103\u440b\u813e\u5ab5\ud859\udfa7\ud859\udfb5\ud84c\udf93\ud84c\udf9c\u8204\u8f9e\u446b\u8291\u828b\u829d\u52b3\u82b1\u82b3\u82bd\u82e6\ud85a\udf3c\u831d\u8363\u83ad\u8323\u83bd\u83e7\u8353\u83ca\u83cc\u83dc\ud85b\udc36\ud85b\udd6b\ud85b\udcd5\u452b\u84f1\u84f3\u8516\ud85c\udfca\u8564\ud85b\udf2c\u455d\u4561\ud85b\udfb1\ud85c\udcd2\u456b\u8650\u8667\u8669\u86a9\u8688\u870e\u86e2\u8728\u876b\u8786\u87e1\u8801\u45f9\u8860\ud85d\ude67\u88d7\u88de\u4635\u88fa\u34bb\ud85e\udcae\ud85e\udd66\u46be\u46c7\u8aa0\ud85f\udca8\u8cab\u8cc1\u8d1b\u8d77\ud85f\udf2f\ud842\udc04\u8dcb\u8dbc\u8df0\ud842\udcde\u8ed4\ud861\uddd2\ud861\udded\u9094\u90f1\u9111\ud861\udf2e\u911b\u9238\u92d7\u92d8\u927c\u93f9\u9415\ud862\udffa\u958b\u4995\u95b7\ud863\udd77\u49e6\u96c3\u5db2\u9723\ud864\udd45\ud864\ude1a\u4a6e\u4a76\u97e0\ud865\udc0a\u4ab2\ud865\udc96\u9829\ud865\uddb6\u98e2\u4b33\u9929\u99a7\u99c2\u99fe\u4bce\ud866\udf30\u9c40\u9cfd\u4cce\u4ced\u9d67\ud868\udcce\u4cf8\ud868\udd05\ud868\ude0e\ud868\ude91\u4d56\u9efe\u9f05\u9f0f\u9f16\ud869\ude00",mapChar:function(r){return r>=196608?r>=917760&&r<=917999?18874368:0:e[t[r>>4]][15&r]}};var e,t}.apply(t,[]))||(e.exports=n)},4489:function(e,t,r){"use strict";var n=r(8847)(r(3106));function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,d=String.fromCharCode;function p(e){throw new RangeError(l[e])}function v(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]);var i=function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(f,".")).split("."),t).join(".");return n+i}function m(e){for(var t=[],r=0,n=e.length;r=55296&&i<=56319&&r>1,e+=h(e/t);e>455;n+=s)e=h(e/35);return h(n+36*e/(e+38))},y=function(e){var t,r=[],n=e.length,i=0,o=128,u=72,c=e.lastIndexOf("-");c<0&&(c=0);for(var f=0;f=128&&p("not-basic"),r.push(e.charCodeAt(f));for(var l=c>0?c+1:0;l=n&&p("invalid-input");var g=(t=e.charCodeAt(l++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:s;(g>=s||g>h((a-i)/v))&&p("overflow"),i+=g*v;var y=m<=u?1:m>=u+26?26:m-u;if(gh(a/w)&&p("overflow"),v*=w}var k=r.length+1;u=b(i-d,k,0==d),h(i/k)>a-o&&p("overflow"),o+=h(i/k),i%=k,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},w=function(e){var t,r=[],n=(e=m(e)).length,o=128,u=0,c=72,f=i(e);try{for(f.s();!(t=f.n()).done;){var l=t.value;l<128&&r.push(d(l))}}catch(e){f.e(e)}finally{f.f()}var v=r.length,y=v;for(v&&r.push("-");y=o&&_h((a-u)/E)&&p("overflow"),u+=(k-o)*E,o=k;var A,S=i(e);try{for(S.s();!(A=S.n()).done;){var O=A.value;if(Oa&&p("overflow"),O==o){for(var M=u,P=s;;P+=s){var j=P<=c?1:P>=c+26?26:P-c;if(M>23,h=f>>21&3,d=f>>5&65535,p=31&f,v=t.mapStr.substr(d,p);if(0===h||n&&1&l)throw new Error("Illegal char "+c);1===h?o.push(v):2===h?o.push(i?v:c):3===h&&o.push(c)}return o.join("").normalize("NFC")}function n(t,n,o){void 0===o&&(o=!1);var a=r(t,o,n).split(".");return(a=a.map((function(t){return t.startsWith("xn--")?i(t=e.decode(t.substring(4)),o,!1):i(t,o,n),t}))).join(".")}function i(e,n,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(r(e,n,i)!==e)throw new Error("Failed to validate "+e);var o=e.codePointAt(0);if(t.mapChar(o)&2<<23)throw new Error("Label contains illegal character: "+o)}return{toUnicode:function(e,t){return void 0===t&&(t={}),n(e,!1,"useStd3ASCII"in t&&t.useStd3ASCII)},toAscii:function(t,r){void 0===r&&(r={});var i,o=!("transitional"in r)||r.transitional,a="useStd3ASCII"in r&&r.useStd3ASCII,s="verifyDnsLength"in r&&r.verifyDnsLength,u=n(t,o,a).split(".").map(e.toASCII),c=u.join(".");if(s){if(c.length<1||c.length>253)throw new Error("DNS name has wrong length: "+c);for(i=0;i63)throw new Error("DNS label has wrong length: "+f)}}return c}}}(e,t)}.apply(t,n))||(e.exports=i)},3226:function(e,t){"use strict";t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,f=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*v}},1736:function(e){"use strict";"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},9446:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(1191)(),o=r(593)("Object.prototype.toString"),a=function(e){return!(i&&e&&"object"===(0,n.default)(e)&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},s=function(e){return!!a(e)||null!==e&&"object"===(0,n.default)(e)&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},u=function(){return a(arguments)}();a.isLegacyArguments=s,e.exports=u?a:s},1493:function(e,t,r){"use strict";var n,i,o=r(8847)(r(3355)),a=Function.prototype.toString,s="object"===("undefined"==typeof Reflect?"undefined":(0,o.default)(Reflect))&&null!==Reflect&&Reflect.apply;if("function"==typeof s&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw i}}),i={},s((function(){throw 42}),null,n)}catch(e){e!==i&&(s=null)}else s=null;var u=/^\s*class\b/,c=function(e){try{var t=a.call(e);return u.test(t)}catch(e){return!1}},f=function(e){try{return!c(e)&&(a.call(e),!0)}catch(e){return!1}},l=Object.prototype.toString,h="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),p=function(){return!1};if("object"===("undefined"==typeof document?"undefined":(0,o.default)(document))){var v=document.all;l.call(v)===l.call(document.all)&&(p=function(e){if((d||!e)&&(void 0===e||"object"===(0,o.default)(e)))try{var t=l.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=s?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!==(0,o.default)(e))return!1;try{s(e,null,n)}catch(e){if(e!==i)return!1}return!c(e)&&f(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!==(0,o.default)(e))return!1;if(h)return f(e);if(c(e))return!1;var t=l.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&f(e)}},4339:function(e){"use strict";e.exports=function(e){if(!e)return!1;var r=t.call(e);return"[object Function]"===r||"function"==typeof e&&"[object RegExp]"!==r||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},4477:function(e,t,r){"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(1191)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(o.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},8619:function(e,t,r){"use strict";var n=r(8847)(r(3355));e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+(0,n.default)(e)+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},8915:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(8184),o=r(3604),a=r(593),s=a("Object.prototype.toString"),u=r(1191)(),c=r(3820),f="undefined"==typeof globalThis?r.g:globalThis,l=o(),h=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1}return!!c&&function(e){var t=!1;return i(p,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},9484:function(e){"use strict";var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},4858:function(e,t,r){"use strict";e=r.nmd(e);var n=r(9142),i=r(8847)(r(3355));!function(){var t="object"===("undefined"==typeof window?"undefined":(0,i.default)(window))?window:{};!t.JS_SHA3_NO_NODE_JS&&"object"===(void 0===n?"undefined":(0,i.default)(n))&&n.versions&&n.versions.node&&(t=r.g);for(var o=!t.JS_SHA3_NO_COMMON_JS&&"object"===(0,i.default)(e)&&e.exports,a="0123456789abcdef".split(""),s=[0,8,16,24],u=[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],c=[224,256,384,512],f=["hex","buffer","arrayBuffer","array"],l=function(e,t,r){return function(n){return new x(e,t,e).update(n)[r]()}},h=function(e,t,r){return function(n,i){return new x(e,t,i).update(n)[r]()}},d=function(e,t){var r=l(e,t,"hex");r.create=function(){return new x(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}x.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,o=this.blocks,a=this.byteCount,u=this.blockCount,c=0,f=this.s;c>2]|=e[c]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(o[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=a){for(this.start=r-a,this.block=o[u],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];s%t==0&&(_(r),o=0)}return i&&(e=r[o],i>0&&(u+=a[e>>4&15]+a[15&e]),i>1&&(u+=a[e>>12&15]+a[e>>8&15]),i>2&&(u+=a[e>>20&15]+a[e>>16&15])),u},x.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&_(n)}return o&&(e=s<<2,t=n[a],o>0&&(u[e]=255&t),o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u};var _=function(e){var t,r,n,i,o,a,s,c,f,l,h,d,p,v,m,g,b,y,w,k,x,_,E,A,S,O,M,P,j,T,C,R,L,N,I,B,F,D,U,z,H,q,G,J,V,K,X,W,Z,Y,Q,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|f>>>31),r=o^(f<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|h>>>31),r=s^(h<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|p>>>31),r=f^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=h^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,v=e[0],m=e[1],K=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,j=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,J=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,O=e[18]<<20|e[19]>>>12,M=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=v^~g&y,e[1]=m^~b&w,e[10]=A^~O&P,e[11]=S^~M&j,e[20]=N^~B&D,e[21]=I^~F&U,e[30]=J^~K&W,e[31]=V^~X&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~y&k,e[3]=b^~w&x,e[12]=O^~P&T,e[13]=M^~j&C,e[22]=B^~D&z,e[23]=F^~U&H,e[32]=K^~W&Y,e[33]=X^~Z&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=y^~k&_,e[5]=w^~x&E,e[14]=P^~T&R,e[15]=j^~C&L,e[24]=D^~z&q,e[25]=U^~H&G,e[34]=W^~Y&$,e[35]=Z^~Q&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=k^~_&v,e[7]=x^~E&m,e[16]=T^~R&A,e[17]=C^~L&S,e[26]=z^~q&N,e[27]=H^~G&I,e[36]=Y^~$&J,e[37]=Q^~ee&V,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=_^~v&g,e[9]=E^~m&b,e[18]=R^~A&O,e[19]=L^~S&M,e[28]=q^~N&B,e[29]=G^~I&F,e[38]=$^~J&K,e[39]=ee^~V&X,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=u[n],e[1]^=u[n+1]};if(o)e.exports=v;else for(g=0;g>>31),p=h^(a<<1|o>>>31),v=e[0]^d,m=e[1]^p,g=e[10]^d,b=e[11]^p,y=e[20]^d,w=e[21]^p,k=e[30]^d,x=e[31]^p,_=e[40]^d,E=e[41]^p;d=n^(s<<1|u>>>31),p=i^(u<<1|s>>>31);var A=e[2]^d,S=e[3]^p,O=e[12]^d,M=e[13]^p,P=e[22]^d,j=e[23]^p,T=e[32]^d,C=e[33]^p,R=e[42]^d,L=e[43]^p;d=o^(c<<1|f>>>31),p=a^(f<<1|c>>>31);var N=e[4]^d,I=e[5]^p,B=e[14]^d,F=e[15]^p,D=e[24]^d,U=e[25]^p,z=e[34]^d,H=e[35]^p,q=e[44]^d,G=e[45]^p;d=s^(l<<1|h>>>31),p=u^(h<<1|l>>>31);var J=e[6]^d,V=e[7]^p,K=e[16]^d,X=e[17]^p,W=e[26]^d,Z=e[27]^p,Y=e[36]^d,Q=e[37]^p,$=e[46]^d,ee=e[47]^p;d=c^(n<<1|i>>>31),p=f^(i<<1|n>>>31);var te=e[8]^d,re=e[9]^p,ne=e[18]^d,ie=e[19]^p,oe=e[28]^d,ae=e[29]^p,se=e[38]^d,ue=e[39]^p,ce=e[48]^d,fe=e[49]^p,le=v,he=m,de=b<<4|g>>>28,pe=g<<4|b>>>28,ve=y<<3|w>>>29,me=w<<3|y>>>29,ge=x<<9|k>>>23,be=k<<9|x>>>23,ye=_<<18|E>>>14,we=E<<18|_>>>14,ke=A<<1|S>>>31,xe=S<<1|A>>>31,_e=M<<12|O>>>20,Ee=O<<12|M>>>20,Ae=P<<10|j>>>22,Se=j<<10|P>>>22,Oe=C<<13|T>>>19,Me=T<<13|C>>>19,Pe=R<<2|L>>>30,je=L<<2|R>>>30,Te=I<<30|N>>>2,Ce=N<<30|I>>>2,Re=B<<6|F>>>26,Le=F<<6|B>>>26,Ne=U<<11|D>>>21,Ie=D<<11|U>>>21,Be=z<<15|H>>>17,Fe=H<<15|z>>>17,De=G<<29|q>>>3,Ue=q<<29|G>>>3,ze=J<<28|V>>>4,He=V<<28|J>>>4,qe=X<<23|K>>>9,Ge=K<<23|X>>>9,Je=W<<25|Z>>>7,Ve=Z<<25|W>>>7,Ke=Y<<21|Q>>>11,Xe=Q<<21|Y>>>11,We=ee<<24|$>>>8,Ze=$<<24|ee>>>8,Ye=te<<27|re>>>5,Qe=re<<27|te>>>5,$e=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|ue>>>24,it=ue<<8|se>>>24,ot=ce<<14|fe>>>18,at=fe<<14|ce>>>18;e[0]=le^~_e&Ne,e[1]=he^~Ee&Ie,e[10]=ze^~$e&ve,e[11]=He^~et&me,e[20]=ke^~Re&Je,e[21]=xe^~Le&Ve,e[30]=Ye^~de&Ae,e[31]=Qe^~pe&Se,e[40]=Te^~qe&tt,e[41]=Ce^~Ge&rt,e[2]=_e^~Ne&Ke,e[3]=Ee^~Ie&Xe,e[12]=$e^~ve&Oe,e[13]=et^~me&Me,e[22]=Re^~Je&nt,e[23]=Le^~Ve&it,e[32]=de^~Ae&Be,e[33]=pe^~Se&Fe,e[42]=qe^~tt&ge,e[43]=Ge^~rt&be,e[4]=Ne^~Ke&ot,e[5]=Ie^~Xe&at,e[14]=ve^~Oe&De,e[15]=me^~Me&Ue,e[24]=Je^~nt&ye,e[25]=Ve^~it&we,e[34]=Ae^~Be&We,e[35]=Se^~Fe&Ze,e[44]=tt^~ge&Pe,e[45]=rt^~be&je,e[6]=Ke^~ot&le,e[7]=Xe^~at&he,e[16]=Oe^~De&ze,e[17]=Me^~Ue&He,e[26]=nt^~ye&ke,e[27]=it^~we&xe,e[36]=Be^~We&Ye,e[37]=Fe^~Ze&Qe,e[46]=ge^~Pe&Te,e[47]=be^~je&Ce,e[8]=ot^~le&_e,e[9]=at^~he&Ee,e[18]=De^~ze&$e,e[19]=Ue^~He&et,e[28]=ye^~ke&Re,e[29]=we^~xe&Le,e[38]=We^~Ye&de,e[39]=Ze^~Qe&pe,e[48]=Pe^~Te&qe,e[49]=je^~Ce&Ge,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},801:function(e,t,r){"use strict";var n=r(9033).Buffer,i=r(5612);function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return t},o.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=o},807:function(e,t,r){"use strict";var n=r(1736),i=r(2353),o=r(8850).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<>>32-t}function c(e,t,r,n,i,o,a){return u(e+(t&r|~t&n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return u(e+(t&n|r&~n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return u(e+(t^r^n)+i+o|0,a)+t|0}function h(e,t,r,n,i,o,a){return u(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=f(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=f(o,r,n,i,e[6],3225465664,9),i=f(i,o,r,n,e[11],643717713,14),n=f(n,i,o,r,e[0],3921069994,20),r=f(r,n,i,o,e[5],3593408605,5),o=f(o,r,n,i,e[10],38016083,9),i=f(i,o,r,n,e[15],3634488961,14),n=f(n,i,o,r,e[4],3889429448,20),r=f(r,n,i,o,e[9],568446438,5),o=f(o,r,n,i,e[14],3275163606,9),i=f(i,o,r,n,e[3],4107603335,14),n=f(n,i,o,r,e[8],1163531501,20),r=f(r,n,i,o,e[13],2850285829,5),o=f(o,r,n,i,e[2],4243563512,9),i=f(i,o,r,n,e[7],1735328473,14),r=l(r,n=f(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=l(o,r,n,i,e[8],2272392833,11),i=l(i,o,r,n,e[11],1839030562,16),n=l(n,i,o,r,e[14],4259657740,23),r=l(r,n,i,o,e[1],2763975236,4),o=l(o,r,n,i,e[4],1272893353,11),i=l(i,o,r,n,e[7],4139469664,16),n=l(n,i,o,r,e[10],3200236656,23),r=l(r,n,i,o,e[13],681279174,4),o=l(o,r,n,i,e[0],3936430074,11),i=l(i,o,r,n,e[3],3572445317,16),n=l(n,i,o,r,e[6],76029189,23),r=l(r,n,i,o,e[9],3654602809,4),o=l(o,r,n,i,e[12],3873151461,11),i=l(i,o,r,n,e[15],530742520,16),r=h(r,n=l(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=h(o,r,n,i,e[7],1126891415,10),i=h(i,o,r,n,e[14],2878612391,15),n=h(n,i,o,r,e[5],4237533241,21),r=h(r,n,i,o,e[12],1700485571,6),o=h(o,r,n,i,e[3],2399980690,10),i=h(i,o,r,n,e[10],4293915773,15),n=h(n,i,o,r,e[1],2240044497,21),r=h(r,n,i,o,e[8],1873313359,6),o=h(o,r,n,i,e[15],4264355552,10),i=h(i,o,r,n,e[6],2734768916,15),n=h(n,i,o,r,e[13],1309151649,21),r=h(r,n,i,o,e[4],4149444226,6),o=h(o,r,n,i,e[11],3174756917,10),i=h(i,o,r,n,e[2],718787259,15),n=h(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},137:function(e,t,r){"use strict";var n=r(1734),i=r(2202);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),f=s.toRed(o);t>0;t--){var l=this._randrange(new n(2),s);r&&r(l);var h=l.toRed(o).redPow(c);if(0!==h.cmp(a)&&0!==h.cmp(f)){for(var d=1;d0;t--){var f=this._randrange(new n(2),a),l=e.gcd(f);if(0!==l.cmpn(1))return l;var h=f.toRed(i).redPow(u);if(0!==h.cmp(o)&&0!==h.cmp(c)){for(var d=1;d>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},6565:function(e,t,r){"use strict";var n=r(8847),i=n(r(9721)),o=n(r(8985)),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.code=r,this.alphabet=o,n&&o&&(this.engine=n(o))}return(0,o.default)(e,[{key:"encode",value:function(e){return this.engine.encode(e)}},{key:"decode",value:function(e){return this.engine.decode(e)}},{key:"isImplemented",value:function(){return this.engine}}]),e}();e.exports=a},2642:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base16 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"hex")}}}},6494:function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(r){var n,i=function(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return t(e,r);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)?t(e,r):void 0}}(e))){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(r,e)}}}},6627:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?i.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var o=n.indexOf("=");return o>0&&!t&&(n=n.substring(0,o)),n},decode:function(t){var r,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"base64")}}}},7905:function(e,t,r){"use strict";var n=r(6565),i=r(7548),o=r(2642),a=r(6494),s=r(6627),u=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],c=u.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),f=u.reduce((function(e,t){return e[t[1]]=c[t[0]],e}),{});e.exports={names:c,codes:f}},6086:function(e,t,r){"use strict";var n=r(9033).Buffer,i=r(7905);(t=e.exports=a).encode=function(e,t){var r=s(e);return a(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=s(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return s(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));var o=new Error("Unsupported encoding");function a(e,t){if(!t)throw new Error("requires an encoded buffer");var r=s(e),i=n.from(r.code);return function(e,t){s(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function s(e){var t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw o;t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}},4093:function(e,t,r){"use strict";for(var n=r(8847)(r(4519)),i=r(4070),o={},a=0,s=Object.entries(i);ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base16 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"hex")}}}},976:function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(r){var n,i=function(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return t(e,r);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)?t(e,r):void 0}}(e))){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(r,e)}}}},8504:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?i.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var o=n.indexOf("=");return o>0&&!t&&(n=n.substring(0,o)),n},decode:function(t){var r,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"base64")}}}},2263:function(e,t,r){"use strict";var n=r(1786),i=r(7548),o=r(7739),a=r(976),s=r(8504),u=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],c=u.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),f=u.reduce((function(e,t){return e[t[1]]=c[t[0]],e}),{});e.exports={names:c,codes:f}},2592:function(e,t,r){"use strict";var n=r(9033).Buffer,i=r(2263);function o(e,t){if(!t)throw new Error("requires an encoded buffer");var r=a(e),i=n.from(r.code);return function(e,t){a(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function a(e){var t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw new Error("Unsupported encoding");t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}(t=e.exports=o).encode=function(e,t){var r=a(e);return o(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=a(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return a(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes))},1269:function(e,t){"use strict";t.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,md4:212,md5:213,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),t.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",212:"md4",213:"md5",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46e3:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),t.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},7748:function(e,t,r){"use strict";var n=r(9033).Buffer,i=r(2592),o=r(6657),a=r(1269);function s(e){t.decode(e)}t.names=a.names,t.codes=a.codes,t.defaultLengths=a.defaultLengths,t.toHexString=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return e.toString("hex")},t.fromHexString=function(e){return n.from(e,"hex")},t.toB58String=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return i.encode("base58btc",e).toString().slice(1)},t.fromB58String=function(e){var t=e;return n.isBuffer(e)&&(t=e.toString()),i.decode("z"+t)},t.decode=function(e){if(!n.isBuffer(e))throw new Error("multihash must be a Buffer");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");var r=o.decode(e);if(!t.isValidCode(r))throw new Error("multihash unknown function code: 0x".concat(r.toString(16)));e=e.slice(o.decode.bytes);var i=o.decode(e);if(i<0)throw new Error("multihash invalid length: ".concat(i));if((e=e.slice(o.decode.bytes)).length!==i)throw new Error("multihash length inconsistent: 0x".concat(e.toString("hex")));return{code:r,name:a.codes[r],length:i,digest:e}},t.encode=function(e,r,i){if(!e||void 0===r)throw new Error("multihash encode requires at least two args: digest, code");var a=t.coerceCode(r);if(!n.isBuffer(e))throw new Error("digest should be a Buffer");if(null==i&&(i=e.length),i&&e.length!==i)throw new Error("digest length should be equal to specified length.");return n.concat([n.from(o.encode(a)),n.from(o.encode(i)),e])},t.coerceCode=function(e){var r=e;if("string"==typeof e){if(void 0===a.names[e])throw new Error("Unrecognized hash function named: ".concat(e));r=a.names[e]}if("number"!=typeof r)throw new Error("Hash function code should be a number. Got: ".concat(r));if(void 0===a.codes[r]&&!t.isAppCode(r))throw new Error("Unrecognized function code: ".concat(r));return r},t.isAppCode=function(e){return e>0&&e<16},t.isValidCode=function(e){return!!t.isAppCode(e)||!!a.codes[e]},t.validate=s,t.prefix=function(e){return s(e),e.slice(0,2)}},7277:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(1734),o=r(6931);e.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new i(1),r=String(e).toLowerCase().trim(),a="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),s=o(r);if("-"===s.substr(0,1)&&(s=o(s.slice(1)),t=new i(-1,10)),!(s=""===s?"0":s).match(/^-?[0-9]+$/)&&s.match(/^[0-9A-Fa-f]+$/)||s.match(/^[a-fA-F]+$/)||!0===a&&s.match(/^[0-9A-Fa-f]+$/))return new i(s,16).mul(t);if((s.match(/^-?[0-9]+$/)||""===s)&&!1===a)return new i(s,10).mul(t)}else if("object"===(0,n.default)(e)&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new i(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.")}},3103:function(e){"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u0&&(i=r),r=e[c++]);)switch(H++,"\n"===r?(G++,q=0):q++,B){case d:if("{"===r)B=v;else if("["===r)B=g;else if(!V(r))return J("Non-whitespace before {[.");continue;case w:case v:if(V(r))continue;if(B===w)F.push(k);else{if("}"===r){s({}),u(),B=F.pop()||p;continue}F.push(m)}if('"'!==r)return J('Malformed object key should start with " ');B=y;continue;case k:case m:if(V(r))continue;if(":"===r)B===m?(F.push(m),void 0!==o&&(s({}),a(o),o=void 0),z++):void 0!==o&&(a(o),o=void 0),B=p;else if("}"===r)void 0!==o&&(s(o),u(),o=void 0),u(),z--,B=F.pop()||p;else{if(","!==r)return J("Bad object");B===m&&F.push(m),void 0!==o&&(s(o),u(),o=void 0),B=w}continue;case g:case p:if(V(r))continue;if(B===g){if(s([]),z++,B=p,"]"===r){u(),z--,B=F.pop()||p;continue}F.push(b)}if('"'===r)B=y;else if("{"===r)B=v;else if("["===r)B=g;else if("t"===r)B=x;else if("f"===r)B=A;else if("n"===r)B=P;else if("-"===r)L+=r;else if("0"===r)L+=r,B=20;else{if(-1==="123456789".indexOf(r))return J("Bad value");L+=r,B=20}continue;case b:if(","===r)F.push(b),void 0!==o&&(s(o),u(),o=void 0),B=p;else{if("]"!==r){if(V(r))continue;return J("Bad array")}void 0!==o&&(s(o),u(),o=void 0),u(),z--,B=F.pop()||p}continue;case y:void 0===o&&(o="");var h=c-1;e:for(;;){for(;U>0;)if(D+=r,r=e.charAt(c++),4===U?(o+=String.fromCharCode(parseInt(D,16)),U=0,h=c-1):U++,!r)break e;if('"'===r&&!N){B=F.pop()||p,o+=e.substring(h,c-1);break}if(!("\\"!==r||N||(N=!0,o+=e.substring(h,c-1),r=e.charAt(c++))))break;if(N){if(N=!1,"n"===r?o+="\n":"r"===r?o+="\r":"t"===r?o+="\t":"f"===r?o+="\f":"b"===r?o+="\b":"u"===r?(U=1,D=""):o+=r,r=e.charAt(c++),h=c-1,r)continue;break}l.lastIndex=c;var K=l.exec(e);if(!K){c=e.length+1,o+=e.substring(h,c-1);break}if(c=K.index+1,!(r=e.charAt(K.index))){o+=e.substring(h,c-1);break}}continue;case x:if(!r)continue;if("r"!==r)return J("Invalid true started with t"+r);B=_;continue;case _:if(!r)continue;if("u"!==r)return J("Invalid true started with tr"+r);B=E;continue;case E:if(!r)continue;if("e"!==r)return J("Invalid true started with tru"+r);s(!0),u(),B=F.pop()||p;continue;case A:if(!r)continue;if("a"!==r)return J("Invalid false started with f"+r);B=S;continue;case S:if(!r)continue;if("l"!==r)return J("Invalid false started with fa"+r);B=O;continue;case O:if(!r)continue;if("s"!==r)return J("Invalid false started with fal"+r);B=M;continue;case M:if(!r)continue;if("e"!==r)return J("Invalid false started with fals"+r);s(!1),u(),B=F.pop()||p;continue;case P:if(!r)continue;if("u"!==r)return J("Invalid null started with n"+r);B=j;continue;case j:if(!r)continue;if("l"!==r)return J("Invalid null started with nu"+r);B=T;continue;case T:if(!r)continue;if("l"!==r)return J("Invalid null started with nul"+r);s(null),u(),B=F.pop()||p;continue;case C:if("."!==r)return J("Leading zero not followed by .");L+=r,B=20;continue;case 20:if(-1!=="0123456789".indexOf(r))L+=r;else if("."===r){if(-1!==L.indexOf("."))return J("Invalid number has two dots");L+=r}else if("e"===r||"E"===r){if(-1!==L.indexOf("e")||-1!==L.indexOf("E"))return J("Invalid number has two exponential");L+=r}else if("+"===r||"-"===r){if("e"!==i&&"E"!==i)return J("Invalid symbol in number");L+=r}else L&&(s(parseFloat(L)),u(),L=""),c--,B=F.pop()||p;continue;default:return J("Unknown state: "+B)}H>=R&&(n=0,void 0!==o&&o.length>f&&(J("Max buffer length exceeded: textNode"),n=Math.max(n,o.length)),L.length>f&&(J("Max buffer length exceeded: numberNode"),n=Math.max(n,L.length)),R=f-n+H)}})),e(n.n).on((function(){if(B===d)return s({}),u(),void(I=!0);B===p&&0===z||J("Unexpected end"),void 0!==o&&(s(o),u(),o=void 0),I=!0}))}},function(e,t,r){r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return c}));var n=r(19),i=r(3),o=r(2),a=r(20),s=r(0);function u(){return new XMLHttpRequest}function c(e,t,r,u,c,f,l){var h=e(i.m).emit,d=e(i.b).emit,p=0,v=!0;function m(){if("2"===String(t.status)[0]){var e=t.responseText,r=(" "+e.substr(p)).substr(1);r&&h(r),p=Object(o.e)(e)}}function g(t){try{v&&e(i.c).emit(t.status,Object(a.a)(t.getAllResponseHeaders())),v=!1}catch(e){}}e(i.a).on((function(){t.onreadystatechange=null,t.abort()})),"onprogress"in t&&(t.onprogress=m),t.onreadystatechange=function(){switch(t.readyState){case 2:case 3:return g(t);case 4:g(t),"2"===String(t.status)[0]?(m(),e(i.n).emit()):d(Object(i.o)(t.status,t.responseText))}};try{for(var b in t.open(r,u,!0),f)t.setRequestHeader(b,f[b]);Object(n.a)(window.location,Object(n.b)(u))||t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.withCredentials=l,t.send(c)}catch(e){window.setTimeout(Object(s.j)(d,Object(i.o)(void 0,void 0,e)),0)}}},function(e,t,r){function n(e,t){function r(t){return String(t.port||{"http:":80,"https:":443}[t.protocol||e.protocol])}return!!(t.protocol&&t.protocol!==e.protocol||t.host&&t.host!==e.host||t.host&&r(t)!==r(e))}function i(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e)||[];return{protocol:t[1]||"",host:t[2]||"",port:t[3]||""}}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}))},function(e,t,r){function n(e){var t={};return e&&e.split("\r\n").forEach((function(e){var r=e.indexOf(": ");t[e.substring(0,r)]=e.substring(r+2)})),t}r.d(t,"a",(function(){return n}))}]).default},"object"===(0,s.default)(t)&&"object"===(0,s.default)(e)?e.exports=a():(i=[],void 0===(o="function"==typeof(n=a)?n.apply(t,i):n)||(e.exports=o))},1823:function(e,t,r){"use strict";var n=r(8357);t.certificate=r(1320);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=c;var f=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=f,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var l=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=l;var h=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1320:function(e,t,r){"use strict";var n=r(8357),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),f=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),l=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),h=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=p},4988:function(e,t,r){"use strict";var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=r(7085),s=r(8073),u=r(8850).Buffer;e.exports=function(e,t){var r,c=e.toString(),f=c.match(n);if(f){var l="aes"+f[1],h=u.from(f[2],"hex"),d=u.from(f[3].replace(/[\r\n]/g,""),"base64"),p=a(t,h.slice(0,8),parseInt(f[1],10)).key,v=[],m=s.createDecipheriv(l,p,h);v.push(m.update(d)),v.push(m.final()),r=u.concat(v)}else{var g=c.match(o);r=u.from(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},7552:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(1823),o=r(2562),a=r(4988),s=r(8073),u=r(4192),c=r(8850).Buffer;function f(e){var t;"object"!==(0,n.default)(e)||c.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=c.from(e));var r,f,l=a(e,t),h=l.tag,d=l.data;switch(h){case"CERTIFICATE":f=i.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=i.PublicKey.decode(d,"der")),r=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=i.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":d=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=o[e.algorithm.decrypt.cipher.algo.join(".")],a=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,l=parseInt(i.split("-")[1],10)/8,h=u.pbkdf2Sync(t,r,n,l,"sha1"),d=s.createDecipheriv(i,h,a),p=[];return p.push(d.update(f)),p.push(d.final()),c.concat(p)}(d=i.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(r=(f=i.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:i.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=i.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=i.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+h)}}e.exports=f,f.signature=i.signature},8209:function(e){"use strict";var t=function(e){return e.replace(/^\s+|\s+$/g,"")};e.exports=function(e){if(!e)return{};for(var r,n={},i=t(e).split("\n"),o=0;o=6?"utf-8":"binary":"utf-8",e.exports=n},3127:function(e){"use strict";var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!=r)throw new TypeError("Bad key length")}},1658:function(e,t,r){"use strict";var n=r(5349),i=r(6707),o=r(1708),a=r(8850).Buffer,s=r(3127),u=r(7401),c=r(8398),f=a.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,r){var s=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=s(t):t.length1)for(var r=1;rp||new a(t).cmp(d.modulus)>=0)throw new Error("decryption error");h=r?c(new a(t),d):s(t,d);var v=f.alloc(p-h.length);if(h=f.concat([v,h],p),4===l)return function(e,t){var r=e.modulus.byteLength(),n=u("sha1").update(f.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),c=t.slice(a+1),l=o(s,i(c,a)),h=o(c,i(l,r-a-1));if(function(e,t){e=f.from(e),t=f.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i=t.length){o++;break}var a=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,h,r);if(3===l)return h;throw new Error("unknown padding")}},2466:function(e,t,r){"use strict";var n=r(7552),i=r(5010),o=r(5866),a=r(6873),s=r(817),u=r(1734),c=r(2561),f=r(9782),l=r(8850).Buffer;e.exports=function(e,t,r){var h;h=e.padding?e.padding:r?1:4;var d,p=n(e);if(4===h)d=function(e,t){var r=e.modulus.byteLength(),n=t.length,c=o("sha1").update(l.alloc(0)).digest(),f=c.length,h=2*f;if(n>r-h-2)throw new Error("message too long");var d=l.alloc(r-n-h-2),p=r-f-1,v=i(f),m=s(l.concat([c,d,l.alloc(1,1),t],p),a(v,p)),g=s(v,a(m,f));return new u(l.concat([l.alloc(1),g,m],r))}(p,t);else if(1===h)d=function(e,t,r){var n,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");return n=r?l.alloc(a-o-3,255):function(e){for(var t,r=l.allocUnsafe(e),n=0,o=i(2*e),a=0;n=0)throw new Error("data too long for modulus")}return r?f(d,p):c(d,p)}},2561:function(e,t,r){"use strict";var n=r(1734),i=r(8850).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},817:function(e){"use strict";e.exports=function(e,t){for(var r=e.length,n=-1;++n4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>i)for(var s=0;sf||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function h(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function d(e,t,r,i){if(n.browser){var o=e.buffer,s=new Uint8Array(o,t,r);return c.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return a(r).copy(e,t),e;a(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}c&&c.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,i){if(!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return l(t,e.length),h(n,t,e.length),d(e,t,n,i)},t.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return l(t,e.length),void 0===n&&(n=e.length-t),h(n,t,e.length),d(e,t,n)}):(t.randomFill=i,t.randomFillSync=i)},9024:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i={};function o(e,t,r){r||(r=Error);var n=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);n.prototype.name=r.name,n.prototype.code=e,i[e]=n}function a(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,u,c;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var f=("number"!=typeof c&&(c=0),c+".".length>(u=e).length||-1===u.indexOf(".",c)?"argument":"property");s='The "'.concat(e,'" ').concat(f," ").concat(i," ").concat(a(t,"type"))}return s+". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=i},6884:function(e,t,r){"use strict";var n=r(9142),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var o=r(6297),a=r(1471);r(1736)(f,o);for(var s=i(a.prototype),u=0;u0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)s.endEmitted?x(e,new k):O(e,s,t,!0);else if(s.ended)x(e,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?O(e,s,t,!1):C(e,s)):O(e,s,t,!1)}else n||(s.reading=!1,C(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(T,e))}function T(e){var t=e._readableState;o("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,B(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){o("readable nexttick read 0"),e.read(0)}function I(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),B(e),t.flowing&&!t.reading&&e.read(0)}function B(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(U,t,e))}function U(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function z(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):j(this),null;if(0===(e=P(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){x(this,new w("_read()"))},A.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===i.stdout||e===i.stderr?v:u;function u(){o("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",(function t(i,a){o("onunpipe"),i===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",v),r.removeListener("data",l),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,B(e))}}(r);e.on("drain",c);var f=!1;function l(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==z(n.pipes,e))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){o("onerror",t),v(),e.removeListener("error",h),0===a(e,"error")&&x(e,t)}function d(){e.removeListener("finish",p),v()}function p(){o("onfinish"),e.removeListener("close",d),v()}function v(){o("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?j(this):n.reading||i.nextTick(N,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(L,this),r},A.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(L,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(I,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<_.length;a++)e.on(_[a],this.emit.bind(this,_[a]));return this._read=function(t){o("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(2317)),h(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=F,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===d&&(d=r(6218)),d(A,e,t)})},9154:function(e,t,r){"use strict";e.exports=f;var n=r(9024).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6884);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length-1))throw new k(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new v("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,T(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(e,t){t(e)}},2317:function(e,t,r){"use strict";var n,i=r(9142);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(5831),s=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function v(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[l]=null,e[s]=null,e[u]=null,t(p(r,!1)))}}function m(e){i.nextTick(v,e)}var g=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((o(n={get stream(){return this[d]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[f]?r(p(void 0,!0)):t[h](r,n)}),n)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[h])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),g);e.exports=function(e){var t,r=Object.create(b,(o(t={},d,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,f,{value:e._readableState.endEmitted,writable:!0}),o(t,h,{value:function(e,t){var n=r[d].read();n?(r[l]=null,r[s]=null,r[u]=null,e(p(n,!1))):(r[s]=e,r[u]=t)},writable:!0}),t));return r[l]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[l]=null,r[s]=null,r[u]=null,t(e)),void(r[c]=e)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[f]=!0})),e.on("readable",m.bind(null,r)),r}},5392:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(9033).Buffer,a=r(2361).inspect,s=a&&a.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t;return(t=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,r,n,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=i,n=s,o.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:s,value:function(e,t){return a(this,function(e){for(var t=1;t0,(function(e){f||(f=e),e&&h.forEach(u),o||(h.forEach(u),l(f))}))}));return t.reduce(c)}},6756:function(e,t,r){"use strict";var n=r(9024).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},7144:function(e,t,r){"use strict";e.exports=r(8291).EventEmitter},6505:function(e,t,r){"use strict";(t=e.exports=r(6297)).Stream=t,t.Readable=t,t.Writable=r(1471),t.Duplex=r(6884),t.Transform=r(9154),t.PassThrough=r(3582),t.finished=r(5831),t.pipeline=r(384)},6707:function(e,t,r){"use strict";var n=r(9033).Buffer,i=r(1736),o=r(2353),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function v(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,k=0|this._b,x=0|this._c,_=0|this._d,E=0|this._e,A=0;A<80;A+=1){var S,O;A<16?(S=v(r,n,i,o,d,e[s[A]],l[0],c[A]),O=y(w,k,x,_,E,e[u[A]],h[0],f[A])):A<32?(S=m(r,n,i,o,d,e[s[A]],l[1],c[A]),O=b(w,k,x,_,E,e[u[A]],h[1],f[A])):A<48?(S=g(r,n,i,o,d,e[s[A]],l[2],c[A]),O=g(w,k,x,_,E,e[u[A]],h[2],f[A])):A<64?(S=b(r,n,i,o,d,e[s[A]],l[3],c[A]),O=m(w,k,x,_,E,e[u[A]],h[3],f[A])):(S=y(r,n,i,o,d,e[s[A]],l[4],c[A]),O=v(w,k,x,_,E,e[u[A]],h[4],f[A])),r=d,d=o,o=p(i,10),i=n,n=S,w=E,E=_,_=p(x,10),x=k,k=O}var M=this._b+i+_|0;this._b=this._c+o+E|0,this._c=this._d+d+w|0,this._d=this._e+r+k|0,this._e=this._a+n+x|0,this._a=M},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=d},6905:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var i,o=(i=r(1734))&&i.__esModule?i:{default:i};function a(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function s(e,t){if(e<56)return n.from([e+t]);var r=c(e),i=c(t+55+r.length/2);return n.from(i+r,"hex")}function u(e){return"0x"===e.slice(0,2)}function c(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function f(e){if(!n.isBuffer(e)){if("string"==typeof e)return u(e)?n.from((r="string"!=typeof(i=e)?i:u(i)?i.slice(2):i).length%2?"0"+r:r,"hex"):n.from(e);if("number"==typeof e||"bigint"==typeof e)return e?(t=c(e),n.from(t,"hex")):n.from([]);if(null==e)return n.from([]);if(e instanceof Uint8Array)return n.from(e);if(o.default.isBN(e))return n.from(e.toArray());throw new Error("invalid type")}var t,r,i;return e}t.encode=function e(t){if(Array.isArray(t)){for(var r=[],i=0;it.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(s=t.slice(i,l)).length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)u=e(s),c.push(u.data),s=u.remainder;return{data:c,remainder:t.slice(l)}}(f(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid remainder");return r.data},t.getLength=function(e){if(!e||0===e.length)return n.from([]);var t=f(e),r=t[0];if(r<=127)return t.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;var i=r-246;return i+a(t.slice(1,i).toString("hex"),16)}},8850:function(e,t,r){"use strict";var n=r(9033),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},1755:function(e,t,r){"use strict";var n,i=r(9142),o=r(8847)(r(3355)),a=r(9033),s=a.Buffer,u={};for(n in a)a.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(u[n]=a[n]);var c=u.Buffer={};for(n in s)s.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(c[n]=s[n]);if(u.Buffer.prototype=s.prototype,c.from&&c.from!==Uint8Array.from||(c.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+(0,o.default)(e));if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,o.default)(e));return s(e,t,r)}),c.alloc||(c.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+(0,o.default)(e));if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=s(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!u.kStringMaxLength)try{u.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}u.constants||(u.constants={MAX_LENGTH:u.kMaxLength},u.kStringMaxLength&&(u.constants.MAX_STRING_LENGTH=u.kStringMaxLength)),e.exports=u},7799:function(e){"use strict";!function(r){var n=2147483647;function i(e){var t=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]),r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,u=528734635,c=1541459225,f=new Uint32Array(64);function l(e){for(var l=0,h=e.length;h>=64;){var d=r,p=n,v=i,m=o,g=a,b=s,y=u,w=c,k=void 0,x=void 0,_=void 0,E=void 0,A=void 0;for(x=0;x<16;x++)_=l+4*x,f[x]=(255&e[_])<<24|(255&e[_+1])<<16|(255&e[_+2])<<8|255&e[_+3];for(x=16;x<64;x++)E=((k=f[x-2])>>>17|k<<15)^(k>>>19|k<<13)^k>>>10,A=((k=f[x-15])>>>7|k<<25)^(k>>>18|k<<14)^k>>>3,f[x]=(E+f[x-7]|0)+(A+f[x-16]|0)|0;for(x=0;x<64;x++)E=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&b^~g&y)|0)+(w+(t[x]+f[x]|0)|0)|0,A=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&p^d&v^p&v)|0,w=y,y=b,b=g,g=m+E|0,m=v,v=p,p=d,d=E+A|0;r=r+d|0,n=n+p|0,i=i+v|0,o=o+m|0,a=a+g|0,s=s+b|0,u=u+y|0,c=c+w|0,l+=64,h-=64}}l(e);var h,d=e.length%64,p=e.length/536870912|0,v=e.length<<3,m=d<56?56:120,g=e.slice(e.length-d,e.length);for(g.push(128),h=d+1;h>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(v>>>24&255),g.push(v>>>16&255),g.push(v>>>8&255),g.push(v>>>0&255),l(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function o(e,t,r){e=e.length<=64?e:i(e);var n,o=64+t.length+4,a=new Array(o),s=new Array(64),u=[];for(n=0;n<64;n++)a[n]=54;for(n=0;n=o-4;e--){if(a[e]++,a[e]<=255)return;a[e]=0}}for(;r>=32;)c(),u=u.concat(i(s.concat(i(a)))),r-=32;return r>0&&(c(),u=u.concat(i(s.concat(i(a))).slice(0,r))),u}function a(e,t,r,n,i){var o;for(f(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)c(e,16*o,i,16),u(i,n),f(i,0,e,t+16*o,16);for(o=0;o>>32-t}function u(e,t){f(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9),t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18);for(var n=0;n<16;++n)e[n]+=t[n]}function c(e,t,r,n){for(var i=0;i=256)return!1}return!0}function h(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function d(e,r,i,s,u,d,p){if(i=h(i,"N"),s=h(s,"r"),u=h(u,"p"),d=h(d,"dkLen"),0===i||0!=(i&i-1))throw new Error("N must be power of 2");if(i>n/128/s)throw new Error("N too large");if(s>n/128/u)throw new Error("r too large");if(!l(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!l(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var v=o(e,r,128*u*s),m=new Uint32Array(32*u*s),g=0;gC&&(r=C);for(var n=0;nC&&(r=C);for(var h=0;h>0&255),v.push(m[L]>>8&255),v.push(m[L]>>16&255),v.push(m[L]>>24&255);var N=o(e,v,d);return p&&p(null,1,N),N}p&&R(t)};if(!p)for(;;){var N=L();if(null!=N)return N}L()}var p={scrypt:function(e,t,r,n,i,o,a){return new Promise((function(s,u){var c=0;a&&a(0),d(e,t,r,n,i,o,(function(e,t,r){if(e)u(e);else if(r)a&&1!==c&&a(1),s(new Uint8Array(r));else if(a&&t!==c)return c=t,a(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(d(e,t,r,n,i,o))}};e.exports=p}()},7902:function(e,t,r){"use strict";e.exports=r(6922)(r(8123))},8123:function(e,t,r){"use strict";var n=new(0,r(6597).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(i.p)>=0)return null;var a=(r=r.toRed(i.red)).redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var a=new o(t),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var u=a.redSqr().redIMul(a);return s.redSqr().redISub(u.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n=0)return 1;if(r.iadd(new o(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===a(e)?1:0},publicKeyCreate:function(e,t){var r=new o(t);return r.cmp(i.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=a(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=a(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n=0)return 2;var u=n.getPublic().add(i.g.mul(r));return u.isInfinity()?2:(s(e,u),0)},publicKeyTweakMul:function(e,t,r){var n=a(t);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new o(e.subarray(0,32)),r=new o(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;var a=e.output,s=a.subarray(4,37);s[0]=0,s.set(r,1);for(var u=33,c=0;u>1&&0===s[c]&&!(128&s[c+1]);--u,++c);if(128&(s=s.subarray(c))[0])return 1;if(u>1&&0===s[0]&&!(128&s[1]))return 1;var f=a.subarray(39,72);f[0]=0,f.set(n,1);for(var l=33,h=0;l>1&&0===f[h]&&!(128&f[h+1]);--l,++h);return 128&(f=f.subarray(h))[0]||l>1&&0===f[0]&&!(128&f[1])?1:(e.outputlen=6+u+l,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+u]=2,a[5+u]=f.length,a.set(f,6+u),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;var s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var u=new o(a);u.cmp(i.n)>=0&&(u=new o(0));var c=new o(t.subarray(6+r));return c.cmp(i.n)>=0&&(c=new o(0)),e.set(u.toArrayLike(Uint8Array,"be",32),0),e.set(c.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,a,s){if(s){var u=s;s=function(e){var n=u(t,r,null,a,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new o(n)}}var c,f=new o(r);if(f.cmp(i.n)>=0||f.isZero())return 1;try{c=n.sign(t,r,{canonical:!0,k:s,pers:a})}catch(e){return 1}return e.signature.set(c.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(c.s.toArrayLike(Uint8Array,"be",32),32),e.recid=c.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},u=new o(s.r),c=new o(s.s);if(u.cmp(i.n)>=0||c.cmp(i.n)>=0)return 1;if(1===c.cmp(n.nh)||u.isZero()||c.isZero())return 3;var f=a(r);if(null===f)return 2;var l=f.getPublic();return n.verify(t,s,l)?0:3},ecdsaRecover:function(e,t,r,a){var u,c={r:t.slice(0,32),s:t.slice(32,64)},f=new o(c.r),l=new o(c.s);if(f.cmp(i.n)>=0||l.cmp(i.n)>=0)return 1;if(f.isZero()||l.isZero())return 2;try{u=n.recoverPubKey(a,c,r)}catch(e){return 2}return s(e,u),0},ecdh:function(e,t,r,s,u,c,f){var l=a(t);if(null===l)return 1;var h=new o(r);if(h.cmp(i.n)>=0||h.isZero())return 2;var d=l.getPublic().mul(h);if(void 0===u)for(var p=d.encode(null,!0),v=n.hash().update(p).digest(),m=0;m<32;++m)e[m]=v[m];else{c||(c=new Uint8Array(32));for(var g=d.getX().toArray("be",32),b=0;b<32;++b)c[b]=g[b];f||(f=new Uint8Array(32));for(var y=d.getY().toArray("be",32),w=0;w<32;++w)f[w]=y[w];var k=u(c,f,s);if(!(k instanceof Uint8Array&&k.length===e.length))return 2;e.set(k)}return 0}}},6922:function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"==typeof e&&(e=e(t)),c("output",e,t),e}function h(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){if(u(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&c("seed",t,32),1===e.contextRandomize(t))throw new Error("Unknow error on context randomization")},privateKeyVerify:function(t){return c("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(c("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(r)}},privateKeyTweakAdd:function(t,r){switch(c("private key",t,32),c("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(n)}},privateKeyTweakMul:function(t,r){switch(c("private key",t,32),c("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(i)}},publicKeyVerify:function(t){return c("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(c("private key",t,32),f(r),n=l(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(a)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(c("public key",t,[33,65]),f(r),n=l(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(o);case 2:throw new Error(a)}},publicKeyNegate:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;switch(c("public key",t,[33,65]),f(n),i=l(i,n?33:65),e.publicKeyNegate(i,t)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error(r);case 3:throw new Error(a)}},publicKeyCombine:function(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;u(Array.isArray(r),"Expected public keys to be an Array"),u(r.length>0,"Expected public keys array will have more than zero items");var s,h=function(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return t(e,r);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)?t(e,r):void 0}}(e))){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(r);try{for(h.s();!(s=h.n()).done;)c("public key",s.value,[33,65])}catch(e){h.e(e)}finally{h.f()}switch(f(n),i=l(i,n?33:65),e.publicKeyCombine(i,r)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(a)}},publicKeyTweakAdd:function(t,r){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;switch(c("public key",t,[33,65]),c("tweak",r,32),f(i),a=l(a,i?33:65),e.publicKeyTweakAdd(a,t,r)){case 0:return a;case 1:throw new Error(o);case 2:throw new Error(n)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;switch(c("public key",t,[33,65]),c("tweak",r,32),f(n),a=l(a,n?33:65),e.publicKeyTweakMul(a,t,r)){case 0:return a;case 1:throw new Error(o);case 2:throw new Error(i)}},signatureNormalize:function(t){switch(c("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(s)}},signatureExport:function(t,n){c("signature",t,64);var i={output:n=l(n,72),outputlen:72};switch(e.signatureExport(i,t)){case 0:return n.slice(0,i.outputlen);case 1:throw new Error(s);case 2:throw new Error(r)}},signatureImport:function(t,n){switch(c("signature",t),n=l(n,64),e.signatureImport(n,t)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(r)}},ecdsaSign:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;c("message",t,32),c("private key",n,32),u("Object"===h(i),"Expected options to be an Object"),void 0!==i.data&&c("options.data",i.data),void 0!==i.noncefn&&u("Function"===h(i.noncefn),"Expected options.noncefn to be a Function");var a={signature:o=l(o,64),recid:null};switch(e.ecdsaSign(a,t,n,i.data,i.noncefn)){case 0:return a;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(r)}},ecdsaVerify:function(t,r,n){switch(c("signature",t,64),c("message",r,32),c("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(s);case 2:throw new Error(o)}},ecdsaRecover:function(t,n,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(c("signature",t,64),u("Number"===h(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),c("message",i,32),f(o),a=l(a,o?33:65),e.ecdsaRecover(a,t,n,i)){case 0:return a;case 1:throw new Error(s);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(r)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(c("public key",t,[33,65]),c("private key",r,32),u("Object"===h(n),"Expected options to be an Object"),void 0!==n.data&&c("options.data",n.data),void 0!==n.hashfn?(u("Function"===h(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&c("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&c("options.ybuf",n.ybuf,32),c("output",i)):i=l(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}}}},6003:function(e,t,r){"use strict";var n=r(8850).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},1708:function(e,t,r){"use strict";var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(8210),n.sha1=r(544),n.sha224=r(6288),n.sha256=r(4571),n.sha384=r(6959),n.sha512=r(4515)},8210:function(e,t,r){"use strict";var n=r(1736),i=r(6003),o=r(8850).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var h=0;h<80;++h){var d=~~(h/20),p=0|((t=n)<<5|t>>>27)+f(d,i,o,s)+u+r[h]+a[d];u=s,s=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},544:function(e,t,r){"use strict";var n=r(1736),i=r(6003),o=r(8850).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31;for(var d=0;d<80;++d){var p=~~(d/20),v=c(n)+l(p,i,o,s)+u+r[d]+a[p]|0;u=s,s=o,o=f(i),i=n,n=v}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},6288:function(e,t,r){"use strict";var n=r(1736),i=r(4571),o=r(6003),a=r(8850).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},4571:function(e,t,r){"use strict";var n=r(1736),i=r(6003),o=r(8850).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,v=0|this._g,m=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+d(r[g-15])+r[g-16];for(var b=0;b<64;++b){var y=m+h(u)+c(u,p,v)+a[b]+r[b]|0,w=l(n)+f(n,i,o)|0;m=v,v=p,p=u,u=s+y|0,s=o,o=i,i=n,n=y+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=v+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},6959:function(e,t,r){"use strict";var n=r(1736),i=r(4515),o=r(6003),a=r(8850).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},4515:function(e,t,r){"use strict";var n=r(1736),i=r(6003),o=r(8850).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,b=0|this._gh,y=0|this._hh,w=0|this._al,k=0|this._bl,x=0|this._cl,_=0|this._dl,E=0|this._el,A=0|this._fl,S=0|this._gl,O=0|this._hl,M=0;M<32;M+=2)t[M]=e.readInt32BE(4*M),t[M+1]=e.readInt32BE(4*M+4);for(;M<160;M+=2){var P=t[M-30],j=t[M-30+1],T=d(P,j),C=p(j,P),R=v(P=t[M-4],j=t[M-4+1]),L=m(j,P),N=t[M-14],I=t[M-14+1],B=t[M-32],F=t[M-32+1],D=C+I|0,U=T+N+g(D,C)|0;U=(U=U+R+g(D=D+L|0,L)|0)+B+g(D=D+F|0,F)|0,t[M]=U,t[M+1]=D}for(var z=0;z<160;z+=2){U=t[z],D=t[z+1];var H=f(r,n,i),q=f(w,k,x),G=l(r,w),J=l(w,r),V=h(s,E),K=h(E,s),X=a[z],W=a[z+1],Z=c(s,u,b),Y=c(E,A,S),Q=O+K|0,$=y+V+g(Q,O)|0;$=($=($=$+Z+g(Q=Q+Y|0,Y)|0)+X+g(Q=Q+W|0,W)|0)+U+g(Q=Q+D|0,D)|0;var ee=J+q|0,te=G+H+g(ee,J)|0;y=b,O=S,b=u,S=A,u=s,A=E,s=o+$+g(E=_+Q|0,_)|0,o=i,_=x,i=n,x=k,n=r,k=w,r=$+te+g(w=Q+ee|0,Q)|0}this._al=this._al+w|0,this._bl=this._bl+k|0,this._cl=this._cl+x|0,this._dl=this._dl+_|0,this._el=this._el+E|0,this._fl=this._fl+A|0,this._gl=this._gl+S|0,this._hl=this._hl+O|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,k)|0,this._ch=this._ch+i+g(this._cl,x)|0,this._dh=this._dh+o+g(this._dl,_)|0,this._eh=this._eh+s+g(this._el,E)|0,this._fh=this._fh+u+g(this._fl,A)|0,this._gh=this._gh+b+g(this._gl,S)|0,this._hh=this._hh+y+g(this._hl,O)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},7245:function(e,t,r){"use strict";e.exports=i;var n=r(8291).EventEmitter;function i(){n.call(this)}r(1736)(i,n),i.Readable=r(6297),i.Writable=r(1471),i.Duplex=r(6884),i.Transform=r(9154),i.PassThrough=r(3582),i.finished=r(5831),i.pipeline=r(384),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",c),e.on("error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},9519:function(e,t,r){"use strict";var n=r(8844),i=r(3319),o=r(7705),a=r(3675),s=r(1143),u=t;u.request=function(e,t){e="string"==typeof e?s.parse(e):o(e);var i=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,c=e.port,f=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+f,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var l=new n(e);return t&&l.on("response",t),l},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},3928:function(e,t,r){"use strict";var n;function i(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),t.writableStream=a(r.g.WritableStream),t.abortController=a(r.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&a(i().overrideMimeType),n=null},8844:function(e,t,r){"use strict";var n=r(9033).Buffer,i=r(9142),o=r(3928),a=r(1736),s=r(3319),u=r(6505),c=s.IncomingMessage,f=s.readyStates,l=e.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+n.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};a(l,u.Writable),l.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===h.indexOf(r)&&(this._headers[r]={name:e,value:t})},l.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},l.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},l.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach((function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach((function(e){s.push([t,e])})):s.push([t,r])})),"fetch"===e._mode){var u=null;if(o.abortController){var c=new AbortController;u=c.signal,e._fetchAbortController=c,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var l=e._xhr=new r.g.XMLHttpRequest;try{l.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in l&&(l.responseType=e._mode),"withCredentials"in l&&(l.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in l&&l.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(l.timeout=t.requestTimeout,l.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){l.setRequestHeader(e[0],e[1])})),e._response=null,l.onreadystatechange=function(){switch(l.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(l.onprogress=function(){e._onXHRProgress()}),l.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{l.send(a)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},l.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},l.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},l.prototype._write=function(e,t,r){this._body.push(e),r()},l.prototype._resetTimers=function(e){var t=this;r.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(r.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=r.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},l.prototype.abort=l.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},l.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},l.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},l.prototype.flushHeaders=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var h=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},3319:function(e,t,r){"use strict";var n=r(9142),i=r(9033).Buffer,o=r(3928),a=r(1736),s=r(6505),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(e,t,r,a){var u=this;if(s.Readable.call(u),u._mode=r,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){n.nextTick((function(){u.emit("close")}))})),"fetch"===r){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),o.writableStream){var c=new WritableStream({write:function(e){return a(!1),new Promise((function(t,r){u._destroyed?r():u.push(i.from(e))?t():u._resumeFetch=t}))},close:function(){a(!0),u._destroyed||u.push(null)},abort:function(e){a(!0),u._destroyed||u.emit("error",e)}});try{return void t.body.pipeTo(c).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var f=t.body.getReader();!function e(){f.read().then((function(t){u._destroyed||(a(t.done),t.done?u.push(null):(u.push(i.from(t.value)),e()))})).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}()}else if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var l=u.rawHeaders["mime-type"];if(l){var h=l.match(/;\s*charset=([^;])(;|$)/);h&&(u._charset=h[1].toLowerCase())}u._charset||(u._charset="utf-8")}};a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(e){var t=this,n=t._xhr,o=null;switch(t._mode){case"text":if((o=n.responseText).length>t._pos){var a=o.substr(t._pos);if("x-user-defined"===t._charset){for(var s=i.alloc(a.length),c=0;ct._pos&&(t.push(i.from(new Uint8Array(f.result.slice(t._pos)))),t._pos=f.result.byteLength)},f.onload=function(){e(!0),t.push(null)},f.readAsArrayBuffer(o)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},10:function(e){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}},3462:function(e,t,r){"use strict";var n=r(8850).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(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 d(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.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}},6931:function(e,t,r){"use strict";var n=r(8619);e.exports=function(e){return"string"!=typeof e?e:n(e)?e.slice(2):e}},6427:function(e,t,r){"use strict";var n=function(){throw"This swarm.js function isn't available on the browser."},i={readFile:n},o={download:n,safeDownloadArchived:n,directoryTree:n},a={platform:n,arch:n},s={join:n,slice:n},u={spawn:n},c={lookup:n},f=r(1357),l=r(631),h=r(2733),d=r(2510),p=r(3094);e.exports=p({fs:i,files:o,os:a,path:s,child_process:u,defaultArchives:{},mimetype:c,request:f,downloadUrl:null,bytes:l,hash:h,pick:d})},2510:function(e){"use strict";var t=function(e){return function(){return new Promise((function(t,r){var n,i=function(r){var n={},i=r.target.files.length,o=0;[].map.call(r.target.files,(function(r){var a=new FileReader;a.onload=function(a){var s=new Uint8Array(a.target.result);if("directory"===e){var u=r.webkitRelativePath;n[u.slice(u.indexOf("/")+1)]={type:"text/plain",data:s},++o===i&&t(n)}else if("file"===e){var c=r.webkitRelativePath;t({type:mimetype.lookup(c),data:s})}else t(s)},a.readAsArrayBuffer(r)}))};"directory"===e?((n=document.createElement("input")).addEventListener("change",i),n.type="file",n.webkitdirectory=!0,n.mozdirectory=!0,n.msdirectory=!0,n.odirectory=!0,n.directory=!0):((n=document.createElement("input")).addEventListener("change",i),n.type="file");var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),n.dispatchEvent(o)}))}};e.exports={data:t("data"),file:t("file"),directory:t("directory")}},2733:function(e,t,r){"use strict";var n=r(9574).keccak256,i=r(631),o=function(e,t){var r=i.reverse(i.pad(6,i.fromNumber(e))),o=i.flatten([r,"0x0000",t]);return n(o).slice(2)};e.exports=function e(t){"string"==typeof t&&"0x"!==t.slice(0,2)?t=i.fromString(t):"string"!=typeof t&&void 0!==t.length&&(t=i.fromUint8Array(t));var r=i.length(t);if(r<=4096)return o(r,t);for(var n=4096;128*n=400?n(new Error("Error ".concat(i.statusCode,"."))):r(new Uint8Array(t))}))}))}},m=function(e){return function(t){return function t(r){return function(n){return function(i){var o=function(e){return void 0===e.path?Promise.resolve():"application/bzz-manifest+json"===e.contentType?t(e.hash)(n+e.path)(i):Promise.resolve((r=n+e.path,function(e){return function(t){return t[r]=e,t}})(function(e){return{type:e.contentType,hash:e.hash}}(e))(i));var r};return v(e)(r).then((function(e){return JSON.parse(I(e)).entries})).then((function(e){return Promise.all(e.map(o))})).then((function(){return i}))}}}(t)("")({})}},g=function(e){return function(t){return m(e)(t).then((function(e){return d(Object.keys(e))(Object.keys(e).map((function(t){return e[t].hash})))}))}},b=function(e){return function(t){return m(e)(t).then((function(t){var r=Object.keys(t),n=r.map((function(e){return t[e].hash})),i=r.map((function(e){return t[e].type})),o=n.map(v(e));return Promise.all(o).then((function(e){return d(r)(function(e){return e.map((function(e,t){return{type:i[t],data:e}}))}(e))}))}))}},y=function(e){return function(t){return function(n){return r.download(p(e)(t))(n)}}},w=function(e){return function(t){return function(r){return g(e)(t).then((function(t){var n=[];for(var o in t)if(o.length>0){var a=i.join(r,o);n.push(y(e)(t[o])(a))}return Promise.all(n).then((function(){return r}))}))}}},k=function(e){return function(t){return new Promise((function(r,n){var i={body:"string"==typeof t?B(t):t,method:"POST"};u("".concat(e,"/bzz-raw:/"),i,(function(e,t){return e?n(e):r(t)}))}))}},x=function(e){return function(t){return function(r){return function(n){return function i(o){var a="/"===r[0]?r:"/"+r,s="".concat(e,"/bzz:/").concat(t).concat(a),c={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return new Promise((function(e,t){u(s,c,(function(r,n){return r?t(r):-1!==n.indexOf("error")?t(n):e(n)}))})).catch((function(e){return o>0&&i(o-1)}))}(3)}}}},_=function(e){return function(t){return A(e)({"":t})}},E=function(e){return function(r){return t.readFile(r).then((function(t){return _(e)({type:a.lookup(r),data:t})}))}},A=function(e){return function(t){return k(e)("{}").then((function(r){return Object.keys(t).reduce((function(r,n){return r.then(function(r){return function(n){return x(e)(n)(r)(t[r])}}(n))}),Promise.resolve(r))}))}},S=function(e){return function(r){return t.readFile(r).then(k(e))}},O=function(e){return function(n){return function(i){return r.directoryTree(i).then((function(e){return Promise.all(e.map((function(e){return t.readFile(e)}))).then((function(t){var r=e.map((function(e){return e.slice(i.length)})),n=e.map((function(e){return a.lookup(e)||"text/plain"}));return d(r)(t.map((function(e,t){return{type:n[t],data:e}})))}))})).then((function(e){return(t=n?{"":e[n]}:{},function(e){var r={};for(var n in t)r[n]=t[n];for(var i in e)r[i]=e[i];return r})(e);var t})).then(A(e))}}},M=function(e){return function(t){if("data"===t.pick)return h.data().then(k(e));if("file"===t.pick)return h.file().then(_(e));if("directory"===t.pick)return h.directory().then(A(e));if(t.path)switch(t.kind){case"data":return S(e)(t.path);case"file":return E(e)(t.path);case"directory":return O(e)(t.defaultFile)(t.path)}else{if(t.length||"string"==typeof t)return k(e)(t);if(t instanceof Object)return A(e)(t)}return Promise.reject(new Error("Bad arguments"))}},P=function(e){return function(t){return function(r){return L(e)(t).then((function(n){return n?r?w(e)(t)(r):b(e)(t):r?y(e)(t)(r):v(e)(t)}))}}},j=function(e,t){var i=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),o=(t||s)[i],a=c+o.archive+".tar.gz",u=o.archiveMD5,f=o.binaryMD5;return r.safeDownloadArchived(a)(u)(f)(e)},T=function(e){return new Promise((function(t,r){var n=o.spawn,i=function(e){return function(t){return-1!==(""+t).indexOf(e)}},a=e.account,s=e.password,u=e.dataDir,c=e.ensApi,f=e.privateKey,l=0,h=n(e.binPath,["--bzzaccount",a||f,"--datadir",u,"--ens-api",c]),d=function(e){0===l&&i("Passphrase")(e)?setTimeout((function(){l=1,h.stdin.write(s+"\n")}),500):i("Swarm http proxy started")(e)&&(l=2,clearTimeout(p),t(h))};h.stdout.on("data",d),h.stderr.on("data",d);var p=setTimeout((function(){return r(new Error("Couldn't start swarm process."))}),2e4)}))},C=function(e){return new Promise((function(t,r){e.stderr.removeAllListeners("data"),e.stdout.removeAllListeners("data"),e.stdin.removeAllListeners("error"),e.removeAllListeners("error"),e.removeAllListeners("exit"),e.kill("SIGINT");var n=setTimeout((function(){return e.kill("SIGKILL")}),8e3);e.once("close",(function(){clearTimeout(n),t()}))}))},R=function(e){return k(e)("test").then((function(e){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===e})).catch((function(){return!1}))},L=function(e){return function(t){return v(e)(t).then((function(e){try{return!!JSON.parse(I(e)).entries}catch(e){return!1}}))}},N=function(e){return function(t,r,n,i,o){var a;return void 0!==t&&(a=e(t)),void 0!==r&&(a=e(r)),void 0!==n&&(a=e(n)),void 0!==i&&(a=e(i)),void 0!==o&&(a=e(o)),a}},I=function(e){return f.toString(f.fromUint8Array(e))},B=function(e){return f.toUint8Array(f.fromString(e))},F=function(e){return{download:function(t,r){return P(e)(t)(r)},downloadData:N(v(e)),downloadDataToDisk:N(y(e)),downloadDirectory:N(b(e)),downloadDirectoryToDisk:N(w(e)),downloadEntries:N(m(e)),downloadRoutes:N(g(e)),isAvailable:function(){return R(e)},upload:function(t){return M(e)(t)},uploadData:N(k(e)),uploadFile:N(_(e)),uploadFileFromDisk:N(_(e)),uploadDataFromDisk:N(S(e)),uploadDirectory:N(A(e)),uploadDirectoryFromDisk:N(O(e)),uploadToManifest:N(x(e)),pick:h,hash:l,fromString:B,toString:I}};return{at:F,local:function(e){return function(t){return R("http://localhost:8500").then((function(r){return r?t(F("http://localhost:8500")).then((function(){})):j(e.binPath,e.archives).onData((function(t){return(e.onProgress||function(){})(t.length)})).then((function(){return T(e)})).then((function(e){return t(F("http://localhost:8500")).then((function(){return e}))})).then(C)}))}},download:P,downloadBinary:j,downloadData:v,downloadDataToDisk:y,downloadDirectory:b,downloadDirectoryToDisk:w,downloadEntries:m,downloadRoutes:g,isAvailable:R,startProcess:T,stopProcess:C,upload:M,uploadData:k,uploadDataFromDisk:S,uploadFile:_,uploadFileFromDisk:E,uploadDirectory:A,uploadDirectoryFromDisk:O,uploadToManifest:x,pick:h,hash:l,fromString:B,toString:I}}},7380:function(e){"use strict";var t=function(e,t){for(var r=[],n=0;n>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},9574:function(e){"use strict";var t="0123456789abcdef".split(""),r=[1,256,65536,16777216],n=[0,8,16,24],i=[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],o=function(e){var t,r,n,o,a,s,u,c,f,l,h,d,p,v,m,g,b,y,w,k,x,_,E,A,S,O,M,P,j,T,C,R,L,N,I,B,F,D,U,z,H,q,G,J,V,K,X,W,Z,Y,Q,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(c<<1|f>>>31),r=a^(f<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|p>>>31),r=f^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(o<<1|a>>>31),r=h^(a<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,v=e[0],m=e[1],K=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,j=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,J=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,O=e[18]<<20|e[19]>>>12,M=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=v^~g&y,e[1]=m^~b&w,e[10]=A^~O&P,e[11]=S^~M&j,e[20]=N^~B&D,e[21]=I^~F&U,e[30]=J^~K&W,e[31]=V^~X&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~y&k,e[3]=b^~w&x,e[12]=O^~P&T,e[13]=M^~j&C,e[22]=B^~D&z,e[23]=F^~U&H,e[32]=K^~W&Y,e[33]=X^~Z&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=y^~k&_,e[5]=w^~x&E,e[14]=P^~T&R,e[15]=j^~C&L,e[24]=D^~z&q,e[25]=U^~H&G,e[34]=W^~Y&$,e[35]=Z^~Q&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=k^~_&v,e[7]=x^~E&m,e[16]=T^~R&A,e[17]=C^~L&S,e[26]=z^~q&N,e[27]=H^~G&I,e[36]=Y^~$&J,e[37]=Q^~ee&V,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=_^~v&g,e[9]=E^~m&b,e[18]=R^~A&O,e[19]=L^~S&M,e[28]=q^~N&B,e[29]=G^~I&F,e[38]=$^~J&K,e[39]=ee^~V&X,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=i[n],e[1]^=i[n+1]},a=function(e){return function(i){var a;if("0x"===i.slice(0,2)){a=[];for(var s=2,u=i.length;s>2]|=i[d]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(u[m>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=c){for(e.start=m-c,e.block=u[f],m=0;m>2]|=r[3&m],e.lastByteIndex===c)for(u[0]=u[f],m=1;m>4&15]+t[15&p]+t[p>>12&15]+t[p>>8&15]+t[p>>20&15]+t[p>>16&15]+t[p>>28&15]+t[p>>24&15];g%f==0&&(o(h),m=0)}return"0x"+v}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),a)}};e.exports={keccak256:a(256),keccak512:a(512),keccak256s:a(256),keccak512s:a(512)}},8419:function(e){"use strict";e.exports=function(e,t){if(t){t=(t=t.trim().replace(/^(\?|#|&)/,""))?"?"+t:t;var r=e.split(/[\?\#]/)[0];t&&/\:\/\/[^\/]*$/.test(r)&&(r+="/");var n=e.match(/(\#.*)$/);e=r+t,n&&(e+=n[0])}return e}},8677:function(e,t,r){"use strict";var n;e=r.nmd(e);var i=r(8847)(r(3355));!function(o){var a="object"==(0,i.default)(t)&&t&&!t.nodeType&&t,s="object"==(0,i.default)(e)&&e&&!e.nodeType&&e,u="object"==(void 0===r.g?"undefined":(0,i.default)(r.g))&&r.g;u.global!==u&&u.window!==u&&u.self!==u||(o=u);var c,f,l=2147483647,h=36,d=/^xn--/,p=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,b=String.fromCharCode;function y(e){throw RangeError(m[e])}function w(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function k(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+w((e=e.replace(v,".")).split("."),t).join(".")}function x(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+b(e)})).join("")}function E(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function A(e,t,r){var n=0;for(e=r?g(e/700):e>>1,e+=g(e/t);e>455;n+=h)e=g(e/35);return g(n+36*e/(e+38))}function S(e){var t,r,n,i,o,a,s,u,c,f,d,p=[],v=e.length,m=0,b=128,w=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&y("not-basic"),p.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=v&&y("invalid-input"),((u=(d=e.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:h)>=h||u>g((l-m)/a))&&y("overflow"),m+=u*a,!(u<(c=s<=w?1:s>=w+26?26:s-w));s+=h)a>g(l/(f=h-c))&&y("overflow"),a*=f;w=A(m-o,t=p.length+1,0==o),g(m/t)>l-b&&y("overflow"),b+=g(m/t),m%=t,p.splice(m++,0,b)}return _(p)}function O(e){var t,r,n,i,o,a,s,u,c,f,d,p,v,m,w,k=[];for(p=(e=x(e)).length,t=128,r=0,o=72,a=0;a=t&&dg((l-r)/(v=n+1))&&y("overflow"),r+=(s-t)*v,t=s,a=0;al&&y("overflow"),d==t){for(u=r,c=h;!(u<(f=c<=o?1:c>=o+26?26:c-o));c+=h)w=u-f,m=h-f,k.push(b(E(f+w%m,0))),u=g(w/m);k.push(b(E(u,0))),o=A(r,v,n==i),r=0,++n}++r,++t}return k.join("")}if(c={version:"1.3.2",ucs2:{decode:x,encode:_},decode:S,encode:O,toASCII:function(e){return k(e,(function(e){return p.test(e)?"xn--"+O(e):e}))},toUnicode:function(e){return k(e,(function(e){return d.test(e)?S(e.slice(4).toLowerCase()):e}))}},"object"==(0,i.default)(r.amdO)&&r.amdO)void 0===(n=function(){return c}.call(t,r,t,e))||(e.exports=n);else if(a&&s)if(e.exports==a)s.exports=c;else for(f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);else o.punycode=c}(void 0)},8983:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(r);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var c=0;c=0?(f=p.substr(0,v),l=p.substr(v+1)):(f=p,l=""),h=decodeURIComponent(f),d=decodeURIComponent(l),t(o,h)?Array.isArray(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o}},4031:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=function(e){switch((0,n.default)(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,o){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===(0,n.default)(e)?Object.keys(e).map((function(n){var o=encodeURIComponent(i(n))+r;return Array.isArray(e[n])?e[n].map((function(e){return o+encodeURIComponent(i(e))})).join(t):o+encodeURIComponent(i(e[n]))})).join(t):o?encodeURIComponent(i(o))+r+encodeURIComponent(i(e)):""}},845:function(e,t,r){"use strict";t.decode=t.parse=r(8983),t.encode=t.stringify=r(4031)},1143:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(8677),o=r(5751);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=w,t.resolve=function(e,t){return w(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?w(e,!1,!0).resolveObject(t):t},t.format=function(e){return o.isString(e)&&(e=w(e)),e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var s=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,f=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(f),h=["%","/","?",";","#"].concat(l),d=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(845);function w(e,t,r){if(e&&o.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}a.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(0,n.default)(e));var a=e.indexOf("?"),u=-1!==a&&a127?L+="x":L+=R[N];if(!L.match(p)){var B=T.slice(0,M),F=T.slice(M+1),D=R.match(v);D&&(B.push(D[1]),F.unshift(D[2])),F.length&&(w="/"+F.join(".")+w),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=i.toASCII(this.hostname));var U=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+U,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!m[_])for(M=0,C=l.length;M0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift())),r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=_.slice(-1)[0],S=(r.host||e.host||_.length>1)&&("."===A||".."===A)||""===A,O=0,M=_.length;M>=0;M--)"."===(A=_[M])?_.splice(M,1):".."===A?(_.splice(M,1),O++):O&&(_.splice(M,1),O--);if(!k&&!x)for(;O--;O)_.unshift("..");!k||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),S&&"/"!==_.join("/").substr(-1)&&_.push("");var P,j=""===_[0]||_[0]&&"/"===_[0].charAt(0);return E&&(r.hostname=r.host=j?"":_.length?_.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift())),(k=k||r.host&&_.length)&&!j&&_.unshift(""),_.length?r.pathname=_.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=u.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},5751:function(e,t,r){"use strict";var n=r(8847)(r(3355));e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===(0,n.default)(e)&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},8632:function(e,t){"use strict";!function(e){var t,r,n,i=String.fromCharCode;function o(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return i(e>>t&63|128)}function u(e){if(0==(4294967168&e))return i(e);var t="";return 0==(4294965248&e)?t=i(e>>6&31|192):0==(4294901760&e)?(a(e),t=i(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=i(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+i(63&e|128)}function c(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function f(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|c())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|c()<<6|c())>=2048)return a(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|c()<<12|c()<<6|c())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),r=t.length,n=-1,i="";++n65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(s)}}(t)},6219:function(e,t,r){"use strict";function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},6248:function(e,t,r){"use strict";var n=r(8847)(r(3355));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},7092:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(9446),o=r(4477),a=r(2337),s=r(8915);function u(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,f="undefined"!=typeof Symbol,l=u(Object.prototype.toString),h=u(Number.prototype.valueOf),d=u(String.prototype.valueOf),p=u(Boolean.prototype.valueOf);if(c)var v=u(BigInt.prototype.valueOf);if(f)var m=u(Symbol.prototype.valueOf);function g(e,t){if("object"!==(0,n.default)(e))return!1;try{return t(e),!0}catch(e){return!1}}function b(e){return"[object Map]"===l(e)}function y(e){return"[object Set]"===l(e)}function w(e){return"[object WeakMap]"===l(e)}function k(e){return"[object WeakSet]"===l(e)}function x(e){return"[object ArrayBuffer]"===l(e)}function _(e){return"undefined"!=typeof ArrayBuffer&&(x.working?x(e):e instanceof ArrayBuffer)}function E(e){return"[object DataView]"===l(e)}function A(e){return"undefined"!=typeof DataView&&(E.working?E(e):e instanceof DataView)}t.isArgumentsObject=i,t.isGeneratorFunction=o,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"===(0,n.default)(e)&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===a(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===a(e)},t.isUint16Array=function(e){return"Uint16Array"===a(e)},t.isUint32Array=function(e){return"Uint32Array"===a(e)},t.isInt8Array=function(e){return"Int8Array"===a(e)},t.isInt16Array=function(e){return"Int16Array"===a(e)},t.isInt32Array=function(e){return"Int32Array"===a(e)},t.isFloat32Array=function(e){return"Float32Array"===a(e)},t.isFloat64Array=function(e){return"Float64Array"===a(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===a(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===a(e)},b.working="undefined"!=typeof Map&&b(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(b.working?b(e):e instanceof Map)},y.working="undefined"!=typeof Set&&y(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(y.working?y(e):e instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(w.working?w(e):e instanceof WeakMap)},k.working="undefined"!=typeof WeakSet&&k(new WeakSet),t.isWeakSet=function(e){return k(e)},x.working="undefined"!=typeof ArrayBuffer&&x(new ArrayBuffer),t.isArrayBuffer=_,E.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var S="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function O(e){return"[object SharedArrayBuffer]"===l(e)}function M(e){return void 0!==S&&(void 0===O.working&&(O.working=O(new S)),O.working?O(e):e instanceof S)}function P(e){return g(e,h)}function j(e){return g(e,d)}function T(e){return g(e,p)}function C(e){return c&&g(e,v)}function R(e){return f&&g(e,m)}t.isSharedArrayBuffer=M,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=P,t.isStringObject=j,t.isBooleanObject=T,t.isBigIntObject=C,t.isSymbolObject=R,t.isBoxedPrimitive=function(e){return P(e)||j(e)||T(e)||C(e)||R(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(_(e)||M(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},5058:function(e,t,r){"use strict";var n=r(9142),i=r(8847)(r(3355)),o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),k(n.showHidden)&&(n.showHidden=!1),k(n.depth)&&(n.depth=2),k(n.colors)&&(n.colors=!1),k(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),d(n,e,n.depth)}function l(e,t){var r=f.styles[t];return r?"\x1b["+f.colors[r][0]+"m"+e+"\x1b["+f.colors[r][1]+"m":e}function h(e,t){return e}function d(e,r,n){if(e.customInspect&&r&&S(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return w(i)||(i=d(e,i,n)),i}var o=function(e,t){if(k(t))return e.stylize("undefined","undefined");if(w(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):b(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),A(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(r);if(0===a.length){if(S(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(x(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return e.stylize(Date.prototype.toString.call(r),"date");if(A(r))return p(r)}var c,f="",l=!1,h=["{","}"];return m(r)&&(l=!0,h=["[","]"]),S(r)&&(f=" [Function"+(r.name?": "+r.name:"")+"]"),x(r)&&(f=" "+RegExp.prototype.toString.call(r)),E(r)&&(f=" "+Date.prototype.toUTCString.call(r)),A(r)&&(f=" "+p(r)),0!==a.length||l&&0!=r.length?n<0?x(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=l?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,f,h)):h[0]+f+h[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function v(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),j(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=b(r)?d(e,u.value,null):d(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),k(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function b(e){return null===e}function y(e){return"number"==typeof e}function w(e){return"string"==typeof e}function k(e){return void 0===e}function x(e){return _(e)&&"[object RegExp]"===O(e)}function _(e){return"object"===(0,i.default)(e)&&null!==e}function E(e){return _(e)&&"[object Date]"===O(e)}function A(e){return _(e)&&("[object Error]"===O(e)||e instanceof Error)}function S(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function M(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(u.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(7092),t.isArray=m,t.isBoolean=g,t.isNull=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=w,t.isSymbol=function(e){return"symbol"===(0,i.default)(e)},t.isUndefined=k,t.isRegExp=x,t.types.isRegExp=x,t.isObject=_,t.isDate=E,t.types.isDate=E,t.isError=A,t.types.isNativeError=A,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,i.default)(e)||void 0===e},t.isBuffer=r(6248);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[M((e=new Date).getHours()),M(e.getMinutes()),M(e.getSeconds())].join(":"),[e.getDate(),P[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(1736),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(T&&e[T]){var t;if("function"!=typeof(t=e[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o>>9<<4)+1}function n(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t,r,i,o,a){return n((s=n(n(t,e),n(i,a)))<<(u=o)|s>>>32-u,r);var s,u}function o(e,t,r,n,o,a,s){return i(t&r|~t&n,e,t,o,a,s)}function a(e,t,r,n,o,a,s){return i(t&n|r&~n,e,t,o,a,s)}function s(e,t,r,n,o,a,s){return i(t^r^n,e,t,o,a,s)}function u(e,t,r,n,o,a,s){return i(r^(t|~n),e,t,o,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var i=0;i>5]>>>i%32&255,a=parseInt(n.charAt(o>>>4&15)+n.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[i/8])<>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},7300:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},4402:function(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};var n=new Uint8Array(16)},2702:function(e,t){"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=[];for(var a=0;a>>0;k=w,w=y,y=n(b,30)>>>0,b=g,g=E}i[0]=i[0]+g>>>0,i[1]=i[1]+b>>>0,i[2]=i[2]+y>>>0,i[3]=i[3]+w>>>0,i[4]=i[4]+k>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},2982:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=s;for(var n,i=(n=r(6163))&&n.__esModule?n:{default:n},o=[],a=0;a<256;++a)o.push((a+256).toString(16).slice(1));function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}t.default=function(e){var t=s(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0);if(!(0,i.default)(t))throw TypeError("Stringified UUID is invalid");return t}},5999:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,o,a=(n=r(4402))&&n.__esModule?n:{default:n},s=r(2982),u=0,c=0;t.default=function(e,t,r){var n=t&&r||0,f=t||new Array(16),l=(e=e||{}).node||i,h=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==h){var d=e.random||(e.rng||a.default)();null==l&&(l=i=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==h&&(h=o=16383&(d[6]<<8|d[7]))}var p=void 0!==e.msecs?e.msecs:Date.now(),v=void 0!==e.nsecs?e.nsecs:c+1,m=p-u+(v-c)/1e4;if(m<0&&void 0===e.clockseq&&(h=h+1&16383),(m<0||p>u)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=p,c=v,o=h;var g=(1e4*(268435455&(p+=122192928e5))+v)%4294967296;f[n++]=g>>>24&255,f[n++]=g>>>16&255,f[n++]=g>>>8&255,f[n++]=255&g;var b=p/4294967296*1e4&268435455;f[n++]=b>>>8&255,f[n++]=255&b,f[n++]=b>>>24&15|16,f[n++]=b>>>16&255,f[n++]=h>>>8|128,f[n++]=255&h;for(var y=0;y<6;++y)f[n+y]=l[y];return t||(0,s.unsafeStringify)(f)}},8231:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(6125)),i=o(r(6792));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v3",48,i.default);t.default=a},6125:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,a,s){var u;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r=c)throw e.bytes=0,new RangeError("Could not decode varint");o=n[u++],a+=s<28?(o&r)<=t);return e.bytes=u-i,a};var t=128,r=127},2699:function(e){"use strict";e.exports=function e(i,o,a){o=o||[];for(var s=a=a||0;i>=n;)o[a++]=255&i|t,i/=128;for(;i&r;)o[a++]=255&i|t,i>>>=7;return o[a]=0|i,e.bytes=a-s+1,o};var t=128,r=-128,n=Math.pow(2,31)},6657:function(e,t,r){"use strict";e.exports={encode:r(2699),decode:r(8325),encodingLength:r(7490)}},7490:function(e){"use strict";var t=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),a=Math.pow(2,42),s=Math.pow(2,49),u=Math.pow(2,56),c=Math.pow(2,63);e.exports=function(e){return e0&&(l=setTimeout((function(){if(!c){c=!0,f.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),f.setRequestHeader)for(s in v)v.hasOwnProperty(s)&&f.setRequestHeader(s,v[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(f.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(f),f.send(p||null),f}e.exports=u,e.exports.default=u,u.XMLHttpRequest=n.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var r=0;r1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},g.prototype.getCall=function(e){return"function"==typeof this.call?this.call(e):this.call},g.prototype.extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},g.prototype.validateArgs=function(e){if(e.length!==this.params)throw l.InvalidNumberOfParams(e.length,this.params,this.name)},g.prototype.formatInput=function(e){var t=this;return this.inputFormatter?this.inputFormatter.map((function(r,n){return r?r.call(t,e[n]):e[n]})):e},g.prototype.formatOutput=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.outputFormatter&&e?t.outputFormatter(e,null==this?void 0:this.hexFormat):e})):this.outputFormatter&&e?this.outputFormatter(e,null==this?void 0:this.hexFormat):e},g.prototype.toPayload=function(e){var t=this.getCall(e),r=this.extractCallback(e),n=this.formatInput(e);this.validateArgs(n);var i={method:t,params:n,callback:r};return this.transformPayload&&(i=this.transformPayload(i)),i},g.prototype._confirmTransaction=function(e,t,r){var n=this,o=!1,a=!0,c=0,f=0,b=null,y=null,w=null,k=r.params[0]&&"object"===(0,u.default)(r.params[0])&&r.params[0].gas?r.params[0].gas:null,x=!!r.params[0]&&"object"===(0,u.default)(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,_=x&&r.params[0].data.length>2,E=[new g({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[h.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:h.outputBlockFormatter}),new g({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:h.outputTransactionReceiptFormatter}),new g({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[h.inputAddressFormatter,h.inputDefaultBlockNumberFormatter]}),new g({name:"getTransactionByHash",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:h.outputTransactionFormatter}),new v({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:h.outputBlockFormatter}}})],A={};E.forEach((function(e){e.attachToObject(A),e.requestManager=n.requestManager}));var S=function(u,v,g,E,S){if(!g)return S||(S={unsubscribe:function(){clearInterval(b),clearTimeout(y)}}),(u?p.resolve(u):A.getTransactionReceipt(t)).catch((function(t){S.unsubscribe(),o=!0,d._fireError({message:"Failed to check for transaction receipt:",data:t},e.eventEmitter,e.reject)})).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var o,s,c;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r&&r.blockHash){t.next=2;break}throw new Error("Receipt missing or blockHash null");case 2:if(n.extraFormatters&&n.extraFormatters.receiptFormatter&&(r=n.extraFormatters.receiptFormatter(r)),!(e.eventEmitter.listeners("confirmation").length>0)){t.next=28;break}if(void 0!==u&&0===f){t.next=25;break}return t.next=7,A.getBlockByNumber("latest");case 7:if(s=t.sent,c=s?s.hash:null,!v){t.next=24;break}if(!w){t.next=17;break}return t.next=13,A.getBlockByNumber(w.number+1);case 13:(o=t.sent)&&(w=o,e.eventEmitter.emit("confirmation",f,r,c)),t.next=22;break;case 17:return t.next=19,A.getBlockByNumber(r.blockNumber);case 19:o=t.sent,w=o,e.eventEmitter.emit("confirmation",f,r,c);case 22:t.next=25;break;case 24:e.eventEmitter.emit("confirmation",f,r,c);case 25:(v&&o||!v)&&f++,a=!1,f===n.transactionConfirmationBlocks+1&&(S.unsubscribe(),e.eventEmitter.removeAllListeners());case 28:return t.abrupt("return",r);case 29:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var s;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!x||o){t.next=19;break}if(r.contractAddress){t.next=5;break}return a&&(S.unsubscribe(),o=!0),d._fireError(l.NoContractAddressFoundError(r),e.eventEmitter,e.reject,null,r),t.abrupt("return");case 5:return t.prev=5,t.next=8,A.getCode(r.contractAddress);case 8:s=t.sent,t.next=13;break;case 11:t.prev=11,t.t0=t.catch(5);case 13:if(s){t.next=15;break}return t.abrupt("return");case 15:!0===r.status&&_||s.length>2?(e.eventEmitter.emit("receipt",r),n.extraFormatters&&n.extraFormatters.contractDeployFormatter?e.resolve(n.extraFormatters.contractDeployFormatter(r)):e.resolve(r),a&&e.eventEmitter.removeAllListeners()):d._fireError(l.ContractCodeNotStoredError(r),e.eventEmitter,e.reject,null,r),a&&S.unsubscribe(),o=!0;case 19:return t.abrupt("return",r);case 20:case"end":return t.stop()}}),t,null,[[5,11]])})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(s){var u,c,f,p;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(x||o){t.next=35;break}if(s.outOfGas||k&&k===s.gasUsed||!0!==s.status&&"0x1"!==s.status&&void 0!==s.status){t.next=7;break}e.eventEmitter.emit("receipt",s),e.resolve(s),a&&e.eventEmitter.removeAllListeners(),t.next=33;break;case 7:if(JSON.stringify(s,null,2),!1!==s.status&&"0x0"!==s.status){t.next=32;break}if(t.prev=9,u=null,!n.handleRevert||"eth_sendTransaction"!==n.call&&"eth_sendRawTransaction"!==n.call){t.next=24;break}return c=r.params[0],"eth_sendRawTransaction"===n.call&&(f=r.params[0],p=m.parse(f),c=h.inputTransactionFormatter({data:p.data,to:p.to,from:p.from,gas:p.gasLimit.toHexString(),gasPrice:p.gasPrice?p.gasPrice.toHexString():void 0,value:p.value.toHexString()})),t.next=16,n.getRevertReason(c,s.blockNumber);case 16:if(!(u=t.sent)){t.next=21;break}d._fireError(l.TransactionRevertInstructionError(u.reason,u.signature,s),e.eventEmitter,e.reject,null,s),t.next=22;break;case 21:throw!1;case 22:t.next=25;break;case 24:throw!1;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(9),d._fireError(l.TransactionRevertedWithoutReasonError(s),e.eventEmitter,e.reject,null,s);case 30:t.next=33;break;case 32:d._fireError(l.TransactionOutOfGasError(s),e.eventEmitter,e.reject,null,s);case 33:a&&S.unsubscribe(),o=!0;case 35:case"end":return t.stop()}}),t,null,[[9,27]])})));return function(e){return t.apply(this,arguments)}}()).catch((function(){c++,v?c-1>=n.transactionPollingTimeout&&(S.unsubscribe(),o=!0,d._fireError(l.TransactionError("Transaction was not mined within "+n.transactionPollingTimeout+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject)):c-1>=n.transactionBlockTimeout&&(S.unsubscribe(),o=!0,d._fireError(l.TransactionError("Transaction was not mined within "+n.transactionBlockTimeout+" blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject))}));S.unsubscribe(),o=!0,d._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:g},e.eventEmitter,e.reject)},O=function(e){var t=!1,r=function(){b=setInterval(S.bind(null,e,!0),n.transactionPollingInterval)};if(!this.requestManager.provider.on)return r();A.subscribe("newBlockHeaders",(function(n,i,o){if(t=!0,n||!i)return r();S(e,!1,n,0,o)})),y=setTimeout((function(){t||r()}),1e3*this.blockHeaderTimeout)}.bind(this);A.getTransactionReceipt(t).then((function(t){t&&t.blockHash?(e.eventEmitter.listeners("confirmation").length>0&&O(t),S(t,!1)):o||O()})).catch((function(){o||O()}))};var b=function(e,t){return"number"==typeof e?t.wallet[e]:e&&"object"===(0,u.default)(e)&&e.address&&e.privateKey?e:t.wallet[e.toLowerCase()]};g.prototype.buildCall=function(){var e=this,t="eth_sendTransaction"===e.call||"eth_sendRawTransaction"===e.call,r="eth_call"===e.call,n=function(){var n=Array.prototype.slice.call(arguments),i=p(!t),a=e.toPayload(n);e.hexFormat=!1,"eth_getTransactionReceipt"!==e.call&&"eth_getTransactionByHash"!==e.call&&"getBlock"!==e.name||(e.hexFormat=a.params.length0&&this.subscriptions.forEach((function(r,n){e&&"syncing"===r.name||t.removeSubscription(n)})),this.provider.reset&&this.provider.reset(),!0}catch(e){throw new Error("Error while clearing subscriptions: ".concat(e))}},c.prototype._isCleanCloseEvent=function(e){return"object"===(0,n.default)(e)&&([1e3].includes(e.code)||!0===e.wasClean)},c.prototype._isIpcCloseError=function(e){return"boolean"==typeof e&&e},c.prototype._jsonrpcResultCallback=function(e,t){return function(r,n){return n&&n.id&&t.id!==n.id?e(new Error("Wrong response id ".concat(n.id," (expected: ").concat(t.id,") in ").concat(JSON.stringify(t)))):r?e(r):n&&n.error?e(o.ErrorResponse(n)):a.isValidResponse(n)?void e(null,n.result):e(o.InvalidResponse(n))}},e.exports={Manager:c,BatchManager:s}},8155:function(e){"use strict";var t={messageId:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),toPayload:function(e,r){if(!e)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(r)+'"!');return t.messageId===Number.MAX_SAFE_INTEGER?t.messageId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER):t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:e,params:r||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!(!e||e.error||"2.0"!==e.jsonrpc||"number"!=typeof e.id&&"string"!=typeof e.id||void 0===e.result)}},toBatchPayload:function(e){return e.map((function(e){return t.toPayload(e.method,e.params)}))}};e.exports=t},4178:function(e,t,r){"use strict";var n=r(2929),i=function(e){this.name=e.name,this.type=e.type,this.subscriptions=e.subscriptions||{},this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.attachToObject=function(e){var t=this.buildCall(),r=this.name.split(".");r.length>1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},i.prototype.buildCall=function(){var e=this;return function(){e.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var t=new n({subscription:e.subscriptions[arguments[0]]||{},requestManager:e.requestManager,type:e.type});return t.subscribe.apply(t,arguments)}},e.exports={subscriptions:i,subscription:n}},2929:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(1314).errors,o=r(8008),a=r(1314).formatters;function s(e){return e}function u(e){o.call(this),this.id=null,this.callback=s,this.arguments=null,this.lastBlock=null,this.options={subscription:e.subscription,type:e.type,requestManager:e.requestManager}}u.prototype=Object.create(o.prototype),u.prototype.constructor=u,u.prototype._extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},u.prototype._validateArgs=function(e){var t=this.options.subscription;if(t||(t={}),t.params||(t.params=0),e.length!==t.params)throw i.InvalidNumberOfParams(e.length,t.params,t.subscriptionName)},u.prototype._formatInput=function(e){var t=this.options.subscription;return t&&t.inputFormatter?t.inputFormatter.map((function(t,r){return t?t(e[r]):e[r]})):e},u.prototype._formatOutput=function(e){var t=this.options.subscription;return t&&t.outputFormatter&&e?t.outputFormatter(e):e},u.prototype._toPayload=function(e){var t=[];if(this.callback=this._extractCallback(e)||s,this.subscriptionMethod||(this.subscriptionMethod=e.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(e),this._validateArgs(this.arguments),e=[]),t.push(this.subscriptionMethod),t=t.concat(this.arguments),e.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:t}},u.prototype.unsubscribe=function(e){this.options.requestManager.removeSubscription(this.id,e),this.id=null,this.lastBlock=null,this.removeAllListeners()},u.prototype.subscribe=function(){var e=this,t=Array.prototype.slice.call(arguments),r=this._toPayload(t);if(!r)return this;if(!this.options.requestManager.provider)return setTimeout((function(){var t=new Error("No provider set.");e.callback(t,null,e),e.emit("error",t)}),0),this;if(!this.options.requestManager.provider.on)return setTimeout((function(){var t=new Error("The current provider doesn't support subscriptions: "+e.options.requestManager.provider.constructor.name);e.callback(t,null,e),e.emit("error",t)}),0),this;if(this.lastBlock&&this.options.params&&"object"===(0,n.default)(this.options.params)&&(r.params[1]=this.options.params,r.params[1].fromBlock=a.inputBlockNumberFormatter(this.lastBlock+1)),this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&r.params[1]&&"object"===(0,n.default)(r.params[1])&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)){var i=Object.assign({},r.params[1]);this.options.requestManager.send({method:"eth_getLogs",params:[i]},(function(t,r){t?setTimeout((function(){e.callback(t,null,e),e.emit("error",t)}),0):r.forEach((function(t){var r=e._formatOutput(t);e.callback(null,r,e),e.emit("data",r)}))}))}return"object"===(0,n.default)(r.params[1])&&delete r.params[1].fromBlock,this.options.requestManager.send(r,(function(t,i){!t&&i?(e.id=i,e.method=r.params[0],e.options.requestManager.addSubscription(e,(function(t,r){t?(e.callback(t,!1,e),e.emit("error",t)):(Array.isArray(r)||(r=[r]),r.forEach((function(t){var r=e._formatOutput(t);if(e.lastBlock=r&&"object"===(0,n.default)(r)?r.blockNumber:null,"function"==typeof e.options.subscription.subscriptionHandler)return e.options.subscription.subscriptionHandler.call(e,r);e.emit("data",r),e.callback(null,r,e)})))})),e.emit("connected",i)):setTimeout((function(){e.callback(t,!1,e),e.emit("error",t)}),0)})),this},u.prototype.resubscribe=function(){this.options.requestManager.removeSubscription(this.id),this.id=null,this.subscribe(this.callback)},e.exports=u},9907:function(e,t,r){"use strict";var n=r(1314).formatters,i=r(3349),o=r(8161);e.exports=function(e){var t=function(t){var r;return t.property?(e[t.property]||(e[t.property]={}),r=e[t.property]):r=e,t.methods&&t.methods.forEach((function(t){t instanceof i||(t=new i(t)),t.attachToObject(r),t.setRequestManager(e._requestManager)})),e};return t.formatters=n,t.utils=o,t.Method=i,t}},606:function(e,t,r){"use strict";var n=r(2033),i=r(9907);e.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=t[0]._requestManager:e._requestManager=new n.Manager(t[0],t[1]),e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,r){return e._requestManager.setProvider(t,r),e._provider=e._requestManager.provider,!0}),e.setRequestManager=function(t){e._requestManager=t,e._provider=t.provider},e.BatchRequest=n.BatchManager.bind(null,e._requestManager),e.extend=i(e)},addProviders:function(e){e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers}}},9901:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(9033).Buffer,o=r(8161),a=r(2914).RQ,s=r(2914)._R,u=new a((function(e,t){return!e.match(/^u?int/)||Array.isArray(t)||t&&"object"===(0,n.default)(t)&&"BN"===t.constructor.name?t:t.toString()}));function c(){}var f=function(){};f.prototype.encodeFunctionSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e).slice(0,10)},f.prototype.encodeEventSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e)},f.prototype.encodeParameter=function(e,t){return this.encodeParameters([e],[t])},f.prototype.encodeParameters=function(e,t){var r=this;return e=r.mapTypes(e),t=t.map((function(t,i){var o=e[i];return"object"===(0,n.default)(o)&&o.type&&(o=o.type),t=r.formatParam(o,t),"string"==typeof o&&o.includes("tuple")&&function e(t,n){if("array"===t.name){if(!t.type.match(/\[(\d+)\]/))return n.map((function(r){return e(u._getCoder(s.from(t.type.replace("[]",""))),r)}));var i=parseInt(t.type.match(/\[(\d+)\]/)[1]);if(n.length!==i)throw new Error("Array length does not matches with the given input");return n.map((function(r){return e(u._getCoder(s.from(t.type.replace(/\[\d+\]/,""))),r)}))}t.coders.forEach((function(t,i){"tuple"===t.name?e(t,n[i]):n[i]=r.formatParam(t.name,n[i])}))}(u._getCoder(s.from(o)),t),t})),u.encode(e,t)},f.prototype.mapTypes=function(e){var t=this,r=[];return e.forEach((function(e){if("object"===(0,n.default)(e)&&"function"===e.type&&(e=Object.assign({},e,{type:"bytes24"})),t.isSimplifiedStructFormat(e)){var i=Object.keys(e)[0];r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))}else r.push(e)})),r},f.prototype.isSimplifiedStructFormat=function(e){return"object"===(0,n.default)(e)&&void 0===e.components&&void 0===e.name},f.prototype.mapStructNameAndType=function(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}},f.prototype.mapStructToCoderFormat=function(e){var t=this,r=[];return Object.keys(e).forEach((function(i){"object"!==(0,n.default)(e[i])?r.push({name:i,type:e[i]}):r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))})),r},f.prototype.formatParam=function(e,t){var r=this,n=new RegExp(/^bytes([0-9]*)$/),a=new RegExp(/^bytes([0-9]*)\[\]$/),s=new RegExp(/^(u?int)([0-9]*)$/),u=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(o.isBN(t)||o.isBigNumber(t))return t.toString(10);if(e.match(a)||e.match(u))return t.map((function(t){return r.formatParam(e.replace("[]",""),t)}));var c=e.match(s);if(c){var f=parseInt(c[2]||"256");f/80&&(!t||"0x"===t||"0X"===t))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var i=u.decode(this.mapTypes(e),"0x"+t.replace(/0x/i,""),r),o=new c;return o.__length__=0,e.forEach((function(e,t){var r=i[o.__length__],a="object"===(0,n.default)(e)&&e.type&&"string"===e.type;r="0x"!==r||a||"string"==typeof e&&"string"===e?r:null,o[t]=r,("function"==typeof e||e&&"object"===(0,n.default)(e))&&e.name&&(o[e.name]=r),o.__length__++})),o},f.prototype.decodeLog=function(e,t,r){var n=this;r=Array.isArray(r)?r:[r],t=t||"";var i=[],o=[],a=0;e.forEach((function(e,t){e.indexed?(o[t]=["bool","int","uint","address","fixed","ufixed"].find((function(t){return-1!==e.type.indexOf(t)}))?n.decodeParameter(e.type,r[a]):r[a],a++):i[t]=e}));var s=t,u=s?this.decodeParametersWith(i,s,!0):[],f=new c;return f.__length__=0,e.forEach((function(e,t){f[t]="string"===e.type?"":null,void 0!==u[t]&&(f[t]=u[t]),void 0!==o[t]&&(f[t]=o[t]),e.name&&(f[e.name]=f[t]),f.__length__++})),f};var l=new f;e.exports=l},9819:function(e,t,r){"use strict";var n=r(9033).Buffer,i=r(8847),o=i(r(3106)),a=i(r(3355)),s=i(r(775)),u=i(r(4519));function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var f,h="Signer Error: ",d=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(c);try{for(d.s();!(f=d.n()).done;){var p=f.value;h+="".concat(h," ").concat(p,".")}}catch(e){d.e(e)}finally{d.f()}throw new Error(h)}var v="0x"+u.serialize().toString("hex"),m=b.keccak256(v),g={messageHash:"0x"+n.from(u.getMessageToSign(!0)).toString("hex"),v:"0x"+u.v.toString("hex"),r:"0x"+u.r.toString("hex"),s:"0x"+u.s.toString("hex"),rawTransaction:v,transactionHash:m};return r(null,g),g}catch(e){return r(e),Promise.reject(e)}}return e.type=function(e){var t,r=void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas;if(void 0!==e.type?t=b.toHex(e.type):void 0===e.type&&r&&(t="0x2"),void 0!==e.gasPrice&&("0x2"===t||r))throw Error("eip-1559 transactions don't support gasPrice");if(("0x1"===t||"0x0"===t)&&r)throw Error("pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas");return r||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===x.London||e.hardfork&&e.hardfork.toLowerCase()===x.London?t="0x2":(e.accessList||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===x.Berlin||e.hardfork&&e.hardfork.toLowerCase()===x.Berlin)&&(t="0x1"),t}(e),void 0!==e.nonce&&void 0!==e.chainId&&(void 0!==e.gasPrice||void 0!==e.maxFeePerGas&&void 0!==e.maxPriorityFeePerGas)&&s?Promise.resolve(c(e)):Promise.all([E(e.common)||E(e.common.customChain.chainId)?E(e.chainId)?i._ethereumCall.getChainId():e.chainId:void 0,E(e.nonce)?i._ethereumCall.getTransactionCount(i.privateKeyToAccount(t).address):e.nonce,E(s)?i._ethereumCall.getNetworkId():1,O(i,e)]).then((function(t){var r=(0,u.default)(t,4),n=r[0],i=r[1],o=r[2],a=r[3];if(E(n)&&E(e.common)&&E(e.common.customChain.chainId)||E(i)||E(o)||E(a))throw new Error('One of the values "chainId", "networkId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(t));return c(f(f(f({},e),E(e.common)||E(e.common.customChain.chainId)?{chainId:n}:{}),{},{nonce:i,networkId:o},a))}))},S.prototype.recoverTransaction=function(e){var t=n.from(e.slice(2),"hex"),r=w.fromSerializedData(t);return b.toChecksumAddress(r.getSenderAddress().toString("hex"))},S.prototype.hashMessage=function(e){var t=b.isHexStrict(e)?e:b.utf8ToHex(e),r=b.hexToBytes(t),i=n.from(r),o="\x19Ethereum Signed Message:\n"+r.length,a=n.from(o),s=n.concat([a,i]);return _.bufferToHex(_.keccak256(s))},S.prototype.sign=function(e,t){if(t.startsWith("0x")||(t="0x"+t),66!==t.length)throw new Error("Private key must be 32 bytes long");var r=this.hashMessage(e),n=p.sign(r,t),i=p.decodeSignature(n);return{message:e,messageHash:r,v:i[0],r:i[1],s:i[2],signature:n}},S.prototype.recover=function(e,t,r){var n=[].slice.apply(arguments);return e&&"object"===(0,a.default)(e)?this.recover(e.messageHash,p.encodeSignature([e.v,e.r,e.s]),!0):(r||(e=this.hashMessage(e)),n.length>=4?(r="boolean"==typeof(r=n.slice(-1)[0])&&!!r,this.recover(e,p.encodeSignature(n.slice(1,4)),r)):p.recover(e,t))},S.prototype.decrypt=function(e,t,r){if("string"!=typeof t)throw new Error("No password given.");var i,s,u=e&&"object"===(0,a.default)(e)?e:JSON.parse(r?e.toLowerCase():e);if(3!==u.version)throw new Error("Not a valid V3 wallet");if("scrypt"===u.crypto.kdf)s=u.crypto.kdfparams,i=m.syncScrypt(n.from(t),n.from(s.salt,"hex"),s.n,s.r,s.p,s.dklen);else{if("pbkdf2"!==u.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(s=u.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");i=v.pbkdf2Sync(n.from(t),n.from(s.salt,"hex"),s.c,s.dklen,"sha256")}var c=n.from(u.crypto.ciphertext,"hex");if(b.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(c)))).replace("0x","")!==u.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var f=v.createDecipheriv(u.crypto.cipher,i.slice(0,16),n.from(u.crypto.cipherparams.iv,"hex")),l="0x"+n.from([].concat((0,o.default)(f.update(c)),(0,o.default)(f.final()))).toString("hex");return this.privateKeyToAccount(l,!0)},S.prototype.encrypt=function(e,t,r){var i,a=this.privateKeyToAccount(e,!0),s=(r=r||{}).salt||v.randomBytes(32),u=r.iv||v.randomBytes(16),c=r.kdf||"scrypt",f={dklen:r.dklen||32,salt:s.toString("hex")};if("pbkdf2"===c)f.c=r.c||262144,f.prf="hmac-sha256",i=v.pbkdf2Sync(n.from(t),n.from(f.salt,"hex"),f.c,f.dklen,"sha256");else{if("scrypt"!==c)throw new Error("Unsupported kdf");f.n=r.n||8192,f.r=r.r||8,f.p=r.p||1,i=m.syncScrypt(n.from(t),n.from(f.salt,"hex"),f.n,f.r,f.p,f.dklen)}var l=v.createCipheriv(r.cipher||"aes-128-ctr",i.slice(0,16),u);if(!l)throw new Error("Unsupported cipher");var h=n.from([].concat((0,o.default)(l.update(n.from(a.privateKey.replace("0x",""),"hex"))),(0,o.default)(l.final()))),d=b.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(h)))).replace("0x","");return{version:3,id:g.v4({random:r.uuid||v.randomBytes(16)}),address:a.address.toLowerCase().replace("0x",""),crypto:{ciphertext:h.toString("hex"),cipherparams:{iv:u.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:c,kdfparams:f,mac:d.toString("hex")}}},M.prototype._findSafeIndex=function(e){return e=e||0,this.hasOwnProperty(e)?this._findSafeIndex(e+1):e},M.prototype._currentIndexes=function(){return Object.keys(this).map((function(e){return parseInt(e)})).filter((function(e){return e<9e20}))},M.prototype.create=function(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}(e.inputs);try{var c=function(){var e=a.value;if(!e.indexed)return"continue";var t=r[e.name];if(!t)return o.push(null),"continue";Array.isArray(t)?o.push(t.map((function(t){return g.encodeParameter(e.type,t)}))):o.push(g.encodeParameter(e.type,t))};for(u.s();!(a=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}return o.length&&(n.topics=o),this.options.address&&(n.address=this.options.address.toLowerCase()),n},b.prototype._decodeEventABI=function(e){var t=this;e.data=e.data||"",e.topics=e.topics||[];var r=p.outputLogFormatter(e);if("ALLEVENTS"===t.name&&(t=t.jsonInterface.find((function(t){return t.signature===e.topics[0]}))||{anonymous:!0}),t.inputs=t.inputs||[],!t.anonymous){var n=0;t.inputs.forEach((function(e){return e.indexed?n++:null})),n>0&&e.topics.length!==n+1&&(t={anonymous:!0,inputs:[]})}var i=t.anonymous?e.topics:e.topics.slice(1);return r.returnValues=g.decodeLog(t.inputs,e.data,i),delete r.returnValues.__length__,r.event=t.name,r.signature=t.anonymous||!e.topics[0]?null:e.topics[0],r.raw={data:r.data,topics:r.topics},delete r.data,delete r.topics,r},b.prototype._encodeMethodABI=function(){var e=this._method.signature,t=this.arguments||[],r=!1,n=this._parent.options.jsonInterface.filter((function(t){return"constructor"===e&&t.type===e||(t.signature===e||t.signature===e.replace("0x","")||t.name===e)&&"function"===t.type})).map((function(e){var n=Array.isArray(e.inputs)?e.inputs.length:0;if(n!==t.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+n+" arguments.");return"function"===e.type&&(r=e.signature),Array.isArray(e.inputs)?e.inputs:[]})).map((function(e){return g.encodeParameters(e,t).replace("0x","")}))[0]||"";if("constructor"===e){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData.startsWith("0x")||(this._deployData="0x"+this._deployData),this._deployData+n}var i=r?r+n:n;if(!i)throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".');return i},b.prototype._decodeMethodReturn=function(e,t){if(!t)return null;t=t.length>=2?t.slice(2):t;var r=g.decodeParameters(e,t);return 1===r.__length__?r[0]:(delete r.__length__,r)},b.prototype.deploy=function(e,t){if((e=e||{}).arguments=e.arguments||[],!(e=this._getOrSetDefaultOptions(e)).data){if("function"==typeof t)return t(v.ContractMissingDeployDataError());throw v.ContractMissingDeployDataError()}var r=this.options.jsonInterface.find((function(e){return"constructor"===e.type}))||{};return r.signature="constructor",this._createTxObject.apply({method:r,parent:this,deployData:e.data,_ethAccounts:this.constructor._ethAccounts},e.arguments)},b.prototype._generateEventOptions=function(){var e=Array.prototype.slice.call(arguments),t=this._getCallback(e),r="object"===(!!e[e.length-1]&&(0,a.default)(e[e.length-1]))?e.pop():{},n="string"==typeof e[0]?e[0]:"allevents",i="allevents"===n.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find((function(e){return"event"===e.type&&(e.name===n||e.signature==="0x"+n.replace("0x",""))}));if(!i)throw v.ContractEventDoesNotExistError(n);if(!h.isAddress(this.options.address))throw v.ContractNoAddressDefinedError();return{params:this._encodeEventABI(i,r),event:i,filter:r.filter||{},callback:t}},b.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},b.prototype.once=function(e,t,r){var n=Array.prototype.slice.call(arguments);if(!(r=this._getCallback(n)))throw v.ContractOnceRequiresCallbackError();t&&delete t.fromBlock,this._on(e,t,(function(e,t,n){n.unsubscribe(),"function"==typeof r&&r(e,t,n)}))},b.prototype._on=function(){var e=this._generateEventOptions.apply(this,arguments);e.params&&e.params.toBlock&&(delete e.params.toBlock,console.warn("Invalid option: toBlock. Use getPastEvents for specific range.")),this._checkListener("newListener",e.event.name),this._checkListener("removeListener",e.event.name);var t=new d({subscription:{params:1,inputFormatter:[p.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event),subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},type:"eth",requestManager:this._requestManager});return t.subscribe("logs",e.params,e.callback||function(){}),t};var y=function(e,t){if(e.event&&"ALLEVENTS"===e.event.name&&Array.isArray(t)){var r=e.filter||{},n=Object.keys(r);return n.length>0?t.filter((function(e){return"string"==typeof e||n.every((function(t){return Array.isArray(r[t])?r[t].some((function(r){return String(e.returnValues[t]).toUpperCase()===String(r).toUpperCase()})):String(e.returnValues[t]).toUpperCase()===String(r[t]).toUpperCase()}))})):t}return t};b.prototype.getPastEvents=function(){var e=this._generateEventOptions.apply(this,arguments),t=new l({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[p.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event)});t.setRequestManager(this._requestManager);var r=t.buildCall();return t=null,r(e.params,(function(t,r){"function"==typeof e.callback&&e.callback(t,y(e,r))})).then(y.bind(this,e))},b.prototype._createTxObject=function(){var e=Array.prototype.slice.call(arguments),t={};if("function"===this.method.type&&(t.call=this.parent._executeMethod.bind(t,"call"),t.call.request=this.parent._executeMethod.bind(t,"call",!0)),t.send=this.parent._executeMethod.bind(t,"send"),t.send.request=this.parent._executeMethod.bind(t,"send",!0),t.encodeABI=this.parent._encodeMethodABI.bind(t),t.estimateGas=this.parent._executeMethod.bind(t,"estimate"),t.createAccessList=this.parent._executeMethod.bind(t,"createAccessList"),e&&this.method.inputs&&e.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,e);throw v.InvalidNumberOfParams(e.length,this.method.inputs.length,this.method.name)}return t.arguments=e||[],t._method=this.method,t._parent=this.parent,t._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(t._deployData=this.deployData),t},b.prototype._processExecuteArguments=function(e,t){var r={};if(r.type=e.shift(),r.callback=this._parent._getCallback(e),"call"!==r.type||!0===e[e.length-1]||"string"!=typeof e[e.length-1]&&!isFinite(e[e.length-1])||(r.defaultBlock=e.pop()),r.options="object"===(!!e[e.length-1]&&(0,a.default)(e[e.length-1]))?e.pop():{},r.generateRequest=!0===e[e.length-1]&&e.pop(),r.options=this._parent._getOrSetDefaultOptions(r.options),r.options.data=this.encodeABI(),!this._deployData&&!h.isAddress(this._parent.options.address))throw v.ContractNoAddressDefinedError();return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:h._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),t.eventEmitter,t.reject,r.callback)},b.prototype._executeMethod=function(){var e=this,t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=m("send"!==t.type),n=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){var i={params:[p.inputCallFormatter.call(this._parent,t.options)],callback:t.callback};return"call"===t.type?(i.params.push(p.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),i.method="eth_call",i.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):i.method="eth_sendTransaction",i}switch(t.type){case"createAccessList":return h.isAddress(t.options.from)?new l({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[p.inputTransactionFormatter,p.inputDefaultBlockNumberFormatter],requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback):h._fireError(v.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);case"estimate":return new l({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[p.inputCallFormatter],outputFormatter:h.hexToNumber,requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback);case"call":return new l({name:"call",call:"eth_call",params:2,inputFormatter:[p.inputCallFormatter,p.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,handleRevert:e._parent.handleRevert,abiCoder:g}).createFunction()(t.options,t.defaultBlock,t.callback);case"send":if(!h.isAddress(t.options.from))return h._fireError(v.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);if("boolean"==typeof this._method.payable&&!this._method.payable&&t.options.value&&t.options.value>0)return h._fireError(new Error("Can not send value to non-payable contract method or constructor"),r.eventEmitter,r.reject,t.callback);var o={receiptFormatter:function(t){if(Array.isArray(t.logs)){var r=t.logs.map((function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)}));t.events={};var n=0;r.forEach((function(e){e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[n]=e,n++)})),delete t.logs}return t},contractDeployFormatter:function(t){var r=e._parent.clone();return r.options.address=t.contractAddress,r}};return new l({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[p.inputTransactionFormatter],requestManager:e._parent._requestManager,accounts:e.constructor._ethAccounts||e._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,transactionBlockTimeout:e._parent.transactionBlockTimeout,transactionConfirmationBlocks:e._parent.transactionConfirmationBlocks,transactionPollingTimeout:e._parent.transactionPollingTimeout,transactionPollingInterval:e._parent.transactionPollingInterval,defaultCommon:e._parent.defaultCommon,defaultChain:e._parent.defaultChain,defaultHardfork:e._parent.defaultHardfork,handleRevert:e._parent.handleRevert,extraFormatters:o,abiCoder:g}).createFunction()(t.options,t.callback);default:throw new Error('Method "'+t.type+'" not implemented.')}},e.exports=b},6764:function(e,t,r){"use strict";var n=r(8847),i=n(r(2247)),o=n(r(5698)),a=r(5160),s=r(1314).formatters,u=r(8161),c=r(1841),f=r(2867),l=r(2689);function h(e){this.eth=e;var t=null;this._detectedAddress=null,this._lastSyncCheck=null,Object.defineProperty(this,"registry",{get:function(){return new c(this)},enumerable:!0}),Object.defineProperty(this,"resolverMethodHandler",{get:function(){return new f(this.registry)},enumerable:!0}),Object.defineProperty(this,"registryAddress",{get:function(){return t},set:function(e){t=null!==e?s.inputAddressFormatter(e):e},enumerable:!0})}h.prototype.supportsInterface=function(e,t,r){return this.getResolver(e).then((function(e){return u.isHexStrict(t)||(t=u.sha3(t).slice(0,10)),e.methods.supportsInterface(t).call(r)})).catch((function(e){if("function"!=typeof r)throw e;r(e,null)}))},h.prototype.resolver=function(e,t){return this.registry.resolver(e,t)},h.prototype.getResolver=function(e,t){return this.registry.getResolver(e,t)},h.prototype.setResolver=function(e,t,r,n){return this.registry.setResolver(e,t,r,n)},h.prototype.setRecord=function(e,t,r,n,i,o){return this.registry.setRecord(e,t,r,n,i,o)},h.prototype.setSubnodeRecord=function(e,t,r,n,i,o,a){return this.registry.setSubnodeRecord(e,t,r,n,i,o,a)},h.prototype.setApprovalForAll=function(e,t,r,n){return this.registry.setApprovalForAll(e,t,r,n)},h.prototype.isApprovedForAll=function(e,t,r){return this.registry.isApprovedForAll(e,t,r)},h.prototype.recordExists=function(e,t){return this.registry.recordExists(e,t)},h.prototype.setSubnodeOwner=function(e,t,r,n,i){return this.registry.setSubnodeOwner(e,t,r,n,i)},h.prototype.getTTL=function(e,t){return this.registry.getTTL(e,t)},h.prototype.setTTL=function(e,t,r,n){return this.registry.setTTL(e,t,r,n)},h.prototype.getOwner=function(e,t){return this.registry.getOwner(e,t)},h.prototype.setOwner=function(e,t,r,n){return this.registry.setOwner(e,t,r,n)},h.prototype.getAddress=function(e,t){return this.resolverMethodHandler.method(e,"addr",[]).call(t)},h.prototype.setAddress=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setAddr",[t]).send(r,n)},h.prototype.getPubkey=function(e,t){return this.resolverMethodHandler.method(e,"pubkey",[],null,t).call(t)},h.prototype.setPubkey=function(e,t,r,n,i){return this.resolverMethodHandler.method(e,"setPubkey",[t,r]).send(n,i)},h.prototype.getContent=function(e,t){return this.resolverMethodHandler.method(e,"content",[]).call(t)},h.prototype.setContent=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setContent",[t]).send(r,n)},h.prototype.getContenthash=function(e,t){return this.resolverMethodHandler.method(e,"contenthash",[],l.decode).call(t)},h.prototype.setContenthash=function(e,t,r,n){var i;try{i=l.encode(t)}catch(e){var o=new Error("Could not encode "+t+". See docs for supported hash protocols.");if("function"==typeof n)return void n(o,null);throw o}return this.resolverMethodHandler.method(e,"setContenthash",[i]).send(r,n)},h.prototype.getMultihash=function(e,t){return this.resolverMethodHandler.method(e,"multihash",[]).call(t)},h.prototype.setMultihash=function(e,t,r,n){return this.resolverMethodHandler.method(e,"multihash",[t]).send(r,n)},h.prototype.checkNetwork=(0,o.default)(i.default.mark((function e(){var t,r,n,o,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=new Date/1e3,this._lastSyncCheck&&!(t-this._lastSyncCheck>3600)){e.next=9;break}return e.next=4,this.eth.getBlock("latest");case 4:if(r=e.sent,!((n=t-r.timestamp)>3600)){e.next=8;break}throw new Error("Network not synced; last block was "+n+" seconds ago");case 8:this._lastSyncCheck=t;case 9:if(!this.registryAddress){e.next=11;break}return e.abrupt("return",this.registryAddress);case 11:if(this._detectedAddress){e.next=20;break}return e.next=14,this.eth.net.getNetworkType();case 14:if(o=e.sent,void 0!==(s=a.addresses[o])){e.next=18;break}throw new Error("ENS is not supported on network "+o);case 18:return this._detectedAddress=s,e.abrupt("return",this._detectedAddress);case 20:return e.abrupt("return",this._detectedAddress);case 21:case"end":return e.stop()}}),e,this)}))),e.exports=h},5160:function(e){"use strict";e.exports={addresses:{main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",ropsten:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",rinkeby:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},interfaceIds:{addr:"0x3b3b57de",setAddr:"0x3b3b57de",pubkey:"0xc8690233",setPubkey:"0xc8690233",contenthash:"0xbc1c58d1",setContenthash:"0xbc1c58d1",content:"0xd8389dc5",setContent:"0xd8389dc5"}}},1841:function(e,t,r){"use strict";var n=r(8164),i=r(1006),o=r(282),a=r(1314).formatters,s=r(8161),u=r(3205),c=r(8384);function f(e){var t=this;this.ens=e,this.contract=e.checkNetwork().then((function(e){var r=new n(u,e);return r.setProvider(t.ens.eth.currentProvider),r}))}f.prototype.owner=function(e,t){return console.warn('Deprecated: Please use the "getOwner" method instead of "owner".'),this.getOwner(e,t)},f.prototype.getOwner=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.owner(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},f.prototype.setOwner=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setOwner(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},f.prototype.getTTL=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.ttl(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},f.prototype.setTTL=function(e,t,r,n){var a=new o(!0);return this.contract.then((function(n){return n.methods.setTTL(i.hash(e),t).send(r)})).then((function(e){"function"!=typeof n?a.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?a.reject(e):n(e,null)})),a.eventEmitter},f.prototype.setSubnodeOwner=function(e,t,r,n,u){var c=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeOwner(i.hash(e),t,a.inputAddressFormatter(r)).send(n)})).then((function(e){"function"!=typeof u?c.resolve(e):u(e,e)})).catch((function(e){"function"!=typeof u?c.reject(e):u(e,null)})),c.eventEmitter},f.prototype.setRecord=function(e,t,r,n,s,u){var c=new o(!0);return this.contract.then((function(o){return o.methods.setRecord(i.hash(e),a.inputAddressFormatter(t),a.inputAddressFormatter(r),n).send(s)})).then((function(e){"function"!=typeof u?c.resolve(e):u(e,e)})).catch((function(e){"function"!=typeof u?c.reject(e):u(e,null)})),c.eventEmitter},f.prototype.setSubnodeRecord=function(e,t,r,n,u,c,f){var l=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeRecord(i.hash(e),t,a.inputAddressFormatter(r),a.inputAddressFormatter(n),u).send(c)})).then((function(e){"function"!=typeof f?l.resolve(e):f(e,e)})).catch((function(e){"function"!=typeof f?l.reject(e):f(e,null)})),l.eventEmitter},f.prototype.setApprovalForAll=function(e,t,r,n){var i=new o(!0);return this.contract.then((function(n){return n.methods.setApprovalForAll(a.inputAddressFormatter(e),t).send(r)})).then((function(e){"function"!=typeof n?i.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?i.reject(e):n(e,null)})),i.eventEmitter},f.prototype.isApprovedForAll=function(e,t,r){var n=new o(!0);return this.contract.then((function(r){return r.methods.isApprovedForAll(a.inputAddressFormatter(e),a.inputAddressFormatter(t)).call()})).then((function(e){"function"!=typeof r?n.resolve(e):r(e,e)})).catch((function(e){"function"!=typeof r?n.reject(e):r(e,null)})),n.eventEmitter},f.prototype.recordExists=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.recordExists(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},f.prototype.resolver=function(e,t){return console.warn('Deprecated: Please use the "getResolver" method instead of "resolver".'),this.getResolver(e,t)},f.prototype.getResolver=function(e,t){var r=this;return this.contract.then((function(t){return t.methods.resolver(i.hash(e)).call()})).then((function(e){var i=new n(c,e);if(i.setProvider(r.ens.eth.currentProvider),"function"!=typeof t)return i;t(i,i)})).catch((function(e){if("function"!=typeof t)throw e;t(e,null)}))},f.prototype.setResolver=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setResolver(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},e.exports=f},715:function(e,t,r){"use strict";var n=r(6764);e.exports=n},2867:function(e,t,r){"use strict";var n=r(8847),i=n(r(2247)),o=n(r(5698)),a=r(282),s=r(1006),u=r(1314).errors,c=r(5160).interfaceIds;function f(e){this.registry=e}f.prototype.method=function(e,t,r,n,i){return{call:this.call.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this,outputFormatter:n}),send:this.send.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this})}},f.prototype.call=function(e){var t=this,r=new a,n=this.parent.prepareArguments(this.ensName,this.methodArguments),s=this.outputFormatter||null;return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,t.parent.checkInterfaceSupport(a,t.methodName);case 2:t.parent.handleCall(r,a.methods[t.methodName],n,s,e);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(t){"function"!=typeof e?r.reject(t):e(t,null)})),r.eventEmitter},f.prototype.send=function(e,t){var r=this,n=new a,s=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,r.parent.checkInterfaceSupport(a,r.methodName);case 2:r.parent.handleSend(n,a.methods[r.methodName],s,e,t);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(e){"function"!=typeof t?n.reject(e):t(e,null)})),n.eventEmitter},f.prototype.handleCall=function(e,t,r,n,i){return t.apply(this,r).call().then((function(t){n&&(t=n(t)),"function"!=typeof i?e.resolve(t):i(t,t)})).catch((function(t){"function"!=typeof i?e.reject(t):i(t,null)})),e},f.prototype.handleSend=function(e,t,r,n,i){return t.apply(this,r).send(n).on("sending",(function(){e.eventEmitter.emit("sending")})).on("sent",(function(){e.eventEmitter.emit("sent")})).on("transactionHash",(function(t){e.eventEmitter.emit("transactionHash",t)})).on("confirmation",(function(t,r){e.eventEmitter.emit("confirmation",t,r)})).on("receipt",(function(t){e.eventEmitter.emit("receipt",t),e.resolve(t),"function"==typeof i&&i(t,t)})).on("error",(function(t){e.eventEmitter.emit("error",t),"function"!=typeof i?e.reject(t):i(t,null)})),e},f.prototype.prepareArguments=function(e,t){var r=s.hash(e);return t.length>0?(t.unshift(r),t):[r]},f.prototype.checkInterfaceSupport=function(){var e=(0,o.default)(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c[r]){e.next=2;break}return e.abrupt("return");case 2:return n=!1,e.prev=3,e.next=6,t.methods.supportsInterface(c[r]).call();case 6:n=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.warn('Could not verify interface of resolver contract at "'+t.options.address+'". ');case 12:if(n){e.next=14;break}throw u.ResolverMethodMissingError(t.options.address,r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,r){return e.apply(this,arguments)}}(),e.exports=f},2689:function(e,t,r){"use strict";var n=r(4308);e.exports={decode:function(e){var t=null,r=null,i=null;if(e&&e.error)return{protocolType:null,decoded:e.error};if(e)try{t=n.decode(e);var o=n.getCodec(e);"ipfs-ns"===o?r="ipfs":"swarm-ns"===o?r="bzz":"onion"===o?r="onion":"onion3"===o?r="onion3":t=e}catch(e){i=e.message}return{protocolType:r,decoded:t,error:i}},encode:function(e){var t,r,i=!1;if(e){var o=e.match(/^(ipfs|bzz|onion|onion3):\/\/(.*)/)||e.match(/\/(ipfs)\/(.*)/);o&&(r=o[1],t=o[2]);try{if("ipfs"===r)t.length>=4&&(i="0x"+n.fromIpfs(t));else if("bzz"===r)t.length>=4&&(i="0x"+n.fromSwarm(t));else if("onion"===r)16===t.length&&(i="0x"+n.encode("onion",t));else{if("onion3"!==r)throw new Error("Could not encode content hash: unsupported content type");56===t.length&&(i="0x"+n.encode("onion3",t))}}catch(e){throw e}}return i}}},3205:function(e){"use strict";e.exports=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setSubnodeRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},8384:function(e){"use strict";e.exports=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setMultihash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"multihash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"contenthash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},6:function(e,t,r){"use strict";var n=r(8847),i=n(r(9721)),o=n(r(8985)),a=r(8161),s=r(1734),u=function(e){var t="A".charCodeAt(0),r="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).slice(4)+e.slice(0,4)).split("").map((function(e){var n=e.charCodeAt(0);return n>=t&&n<=r?n-t+10:e})).join("")},c=function(e){for(var t,r=e;r.length>2;)t=r.slice(0,9),r=parseInt(t,10)%97+r.slice(t.length);return parseInt(r,10)%97},f=function(){function e(t){(0,i.default)(this,e),this._iban=t}return(0,o.default)(e,[{key:"isValid",value:function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===c(u(this._iban))}},{key:"isDirect",value:function(){return 34===this._iban.length||35===this._iban.length}},{key:"isIndirect",value:function(){return 20===this._iban.length}},{key:"checksum",value:function(){return this._iban.slice(2,4)}},{key:"institution",value:function(){return this.isIndirect()?this._iban.slice(7,11):""}},{key:"client",value:function(){return this.isIndirect()?this._iban.slice(11):""}},{key:"toAddress",value:function(){if(this.isDirect()){var e=this._iban.slice(4),t=new s(e,36);return a.toChecksumAddress(t.toString(16,20))}return""}},{key:"toString",value:function(){return this._iban}}],[{key:"toAddress",value:function(t){if(!(t=new e(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()}},{key:"toIban",value:function(t){return e.fromAddress(t).toString()}},{key:"fromAddress",value:function(t){if(!a.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");var r=function(e,t){for(var r=e;r.length<30;)r="0"+r;return r}(new s(t,16).toString(36));return e.fromBban(r.toUpperCase())}},{key:"fromBban",value:function(t){return new e("XE"+("0"+(98-c(u("XE00"+t)))).slice(-2)+t)}},{key:"createIndirect",value:function(t){return e.fromBban("ETH"+t.institution+t.identifier)}},{key:"isValid",value:function(t){return new e(t).isValid()}}]),e}();e.exports=f},6306:function(e,t,r){"use strict";var n=r(606),i=r(3349),o=r(8161),a=r(473),s=r(1314).formatters,u=function(){var e=this;n.packageInit(this,arguments),this.net=new a(this);var t=null,r="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return t},set:function(e){return e&&(t=o.toChecksumAddress(s.inputAddressFormatter(e))),u.forEach((function(e){e.defaultAccount=t})),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return r},set:function(e){return r=e,u.forEach((function(e){e.defaultBlock=r})),e},enumerable:!0});var u=[new i({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:o.toChecksumAddress}),new i({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:o.toChecksumAddress}),new i({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[s.inputAddressFormatter,null,null]}),new i({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[s.inputAddressFormatter]}),new i({name:"importRawKey",call:"personal_importRawKey",params:2}),new i({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"sign",call:"personal_sign",params:3,inputFormatter:[s.inputSignFormatter,s.inputAddressFormatter,null]}),new i({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[s.inputSignFormatter,null]})];u.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount}))};n.addProviders(u),e.exports=u},8130:function(e){"use strict";e.exports=function(e){var t,r=this;return this.net.getId().then((function(e){return t=e,r.getBlock(0)})).then((function(r){var n="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===r.hash&&1===t&&(n="main"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===r.hash&&3===t&&(n="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===r.hash&&4===t&&(n="rinkeby"),"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a"===r.hash&&5===t&&(n="goerli"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===r.hash&&42===t&&(n="kovan"),"function"==typeof e&&e(null,n),n})).catch((function(t){if("function"!=typeof e)throw t;e(t)}))}},6748:function(e,t,r){"use strict";var n=r(606),i=r(1314),o=r(4178).subscriptions,a=r(3349),s=r(8161),u=r(473),c=r(715),f=r(6306),l=r(8164),h=r(6),d=r(9819),p=r(9901),v=r(8130),m=i.formatters,g=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},b=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},y=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},w=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},k=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},x=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),e.personal.setRequestManager(r),e.accounts.setRequestManager(r),e.Contract._requestManager=e._requestManager,e.Contract.currentProvider=e._provider,!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager),e.ens._detectedAddress=null,e.ens._lastSyncCheck=null};var i,x,_,E=!1,A=null,S="latest",O=50,M=24,P=750,j=1e3,T=10,C=100;Object.defineProperty(this,"handleRevert",{get:function(){return E},set:function(t){E=t,e.Contract.handleRevert=E,N.forEach((function(e){e.handleRevert=E}))},enumerable:!0}),Object.defineProperty(this,"defaultCommon",{get:function(){return _},set:function(t){_=t,e.Contract.defaultCommon=_,N.forEach((function(e){e.defaultCommon=_}))},enumerable:!0}),Object.defineProperty(this,"defaultHardfork",{get:function(){return x},set:function(t){x=t,e.Contract.defaultHardfork=x,N.forEach((function(e){e.defaultHardfork=x}))},enumerable:!0}),Object.defineProperty(this,"defaultChain",{get:function(){return i},set:function(t){i=t,e.Contract.defaultChain=i,N.forEach((function(e){e.defaultChain=i}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingTimeout",{get:function(){return P},set:function(t){P=t,e.Contract.transactionPollingTimeout=P,N.forEach((function(e){e.transactionPollingTimeout=P}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingInterval",{get:function(){return j},set:function(t){j=t,e.Contract.transactionPollingInterval=j,N.forEach((function(e){e.transactionPollingInterval=j}))},enumerable:!0}),Object.defineProperty(this,"transactionConfirmationBlocks",{get:function(){return M},set:function(t){M=t,e.Contract.transactionConfirmationBlocks=M,N.forEach((function(e){e.transactionConfirmationBlocks=M}))},enumerable:!0}),Object.defineProperty(this,"transactionBlockTimeout",{get:function(){return O},set:function(t){O=t,e.Contract.transactionBlockTimeout=O,N.forEach((function(e){e.transactionBlockTimeout=O}))},enumerable:!0}),Object.defineProperty(this,"blockHeaderTimeout",{get:function(){return T},set:function(t){T=t,e.Contract.blockHeaderTimeout=T,N.forEach((function(e){e.blockHeaderTimeout=T}))},enumerable:!0}),Object.defineProperty(this,"defaultAccount",{get:function(){return A},set:function(t){return t&&(A=s.toChecksumAddress(m.inputAddressFormatter(t))),e.Contract.defaultAccount=A,e.personal.defaultAccount=A,N.forEach((function(e){e.defaultAccount=A})),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return S},set:function(t){return S=t,e.Contract.defaultBlock=S,e.personal.defaultBlock=S,N.forEach((function(e){e.defaultBlock=S})),t},enumerable:!0}),Object.defineProperty(this,"maxListenersWarningThreshold",{get:function(){return C},set:function(t){e.currentProvider&&e.currentProvider.setMaxListeners&&(C=t,e.currentProvider.setMaxListeners(t))},enumerable:!0}),this.clearSubscriptions=e._requestManager.clearSubscriptions.bind(e._requestManager),this.removeSubscriptionById=e._requestManager.removeSubscription.bind(e._requestManager),this.net=new u(this),this.net.getNetworkType=v.bind(this),this.accounts=new d(this),this.personal=new f(this),this.personal.defaultAccount=this.defaultAccount,this.maxListenersWarningThreshold=C;var R=this,L=function(){l.apply(this,arguments);var e=this,t=R.setProvider;R.setProvider=function(){t.apply(R,arguments),n.packageInit(e,[R])}};L.setProvider=function(){l.setProvider.apply(this,arguments)},(L.prototype=Object.create(l.prototype)).constructor=L,this.Contract=L,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.transactionBlockTimeout=this.transactionBlockTimeout,this.Contract.transactionConfirmationBlocks=this.transactionConfirmationBlocks,this.Contract.transactionPollingTimeout=this.transactionPollingTimeout,this.Contract.transactionPollingInterval=this.transactionPollingInterval,this.Contract.blockHeaderTimeout=this.blockHeaderTimeout,this.Contract.handleRevert=this.handleRevert,this.Contract._requestManager=this._requestManager,this.Contract._ethAccounts=this.accounts,this.Contract.currentProvider=this._requestManager.provider,this.Iban=h,this.abi=p,this.ens=new c(this);var N=[new a({name:"getNodeInfo",call:"web3_clientVersion"}),new a({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new a({name:"getCoinbase",call:"eth_coinbase",params:0}),new a({name:"isMining",call:"eth_mining",params:0}),new a({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:s.hexToNumber}),new a({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:m.outputSyncingFormatter}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:m.outputBigNumberFormatter}),new a({name:"getFeeHistory",call:"eth_feeHistory",params:3,inputFormatter:[s.numberToHex,m.inputBlockNumberFormatter,null]}),new a({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:s.hexToNumber}),new a({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputBigNumberFormatter}),new a({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[m.inputAddressFormatter,s.numberToHex,m.inputDefaultBlockNumberFormatter]}),new a({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter]}),new a({name:"getBlock",call:g,params:2,inputFormatter:[m.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:m.outputBlockFormatter}),new a({name:"getUncle",call:y,params:2,inputFormatter:[m.inputBlockNumberFormatter,s.numberToHex],outputFormatter:m.outputBlockFormatter}),new a({name:"getBlockTransactionCount",call:w,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getBlockUncleCount",call:k,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionFormatter}),new a({name:"getTransactionFromBlock",call:b,params:2,inputFormatter:[m.inputBlockNumberFormatter,s.numberToHex],outputFormatter:m.outputTransactionFormatter}),new a({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionReceiptFormatter}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null],abiCoder:p}),new a({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[m.inputTransactionFormatter]}),new a({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[m.inputTransactionFormatter],abiCoder:p}),new a({name:"sign",call:"eth_sign",params:2,inputFormatter:[m.inputSignFormatter,m.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}}),new a({name:"call",call:"eth_call",params:2,inputFormatter:[m.inputCallFormatter,m.inputDefaultBlockNumberFormatter],abiCoder:p}),new a({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[m.inputCallFormatter],outputFormatter:s.hexToNumber}),new a({name:"submitWork",call:"eth_submitWork",params:3}),new a({name:"getWork",call:"eth_getWork",params:0}),new a({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter}),new a({name:"getChainId",call:"eth_chainId",params:0,outputFormatter:s.hexToNumber}),new a({name:"requestAccounts",call:"eth_requestAccounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getProof",call:"eth_getProof",params:3,inputFormatter:[m.inputAddressFormatter,m.inputStorageKeysFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputProofFormatter}),new a({name:"getPendingTransactions",call:"eth_pendingTransactions",params:0,outputFormatter:m.outputTransactionFormatter}),new a({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[m.inputTransactionFormatter,m.inputDefaultBlockNumberFormatter]}),new o({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:m.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter,subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},syncing:{params:0,outputFormatter:m.outputSyncingFormatter,subscriptionHandler:function(e){var t=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",t._isSyncing),"function"==typeof this.callback&&this.callback(null,t._isSyncing,this),setTimeout((function(){t.emit("data",e),"function"==typeof t.callback&&t.callback(null,e,t)}),0)):(this.emit("data",e),"function"==typeof t.callback&&this.callback(null,e,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout((function(){e.currentBlock>e.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),"function"==typeof t.callback&&t.callback(null,t._isSyncing,t))}),500))}}}})];N.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount,t.transactionBlockTimeout=e.transactionBlockTimeout,t.transactionConfirmationBlocks=e.transactionConfirmationBlocks,t.transactionPollingTimeout=e.transactionPollingTimeout,t.transactionPollingInterval=e.transactionPollingInterval,t.handleRevert=e.handleRevert}))};n.addProviders(x),e.exports=x},473:function(e,t,r){"use strict";var n=r(606),i=r(3349),o=r(8161),a=function(){var e=this;n.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:parseInt}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};n.addProviders(a),e.exports=a},4565:function(e,t,r){"use strict";var n=r(1314).errors,i=r(9519),o=r(912);r(2439),r(4258).polyfill(),void 0===r.g||r.g.AbortController||r(3368);var a=function(e,t){t=t||{},this.withCredentials=t.withCredentials,this.timeout=t.timeout||0,this.headers=t.headers,this.agent=t.agent,this.connected=!1;var r=!1!==t.keepAlive;this.host=e||"http://localhost:8545",this.agent||("https"===this.host.substring(0,5)?this.httpsAgent=new o.Agent({keepAlive:r}):this.httpAgent=new i.Agent({keepAlive:r}))};a.prototype.send=function(e,t){var r,i={method:"POST",body:JSON.stringify(e)},o={};if("undefined"!=typeof AbortController?r=new AbortController:"undefined"!=typeof window&&void 0!==window.AbortController&&(r=new window.AbortController),void 0!==r&&(i.signal=r.signal),"undefined"==typeof XMLHttpRequest){var a={httpsAgent:this.httpsAgent,httpAgent:this.httpAgent};this.agent&&(a.httpsAgent=this.agent.https,a.httpAgent=this.agent.http),"https"===this.host.substring(0,5)?i.agent=a.httpsAgent:i.agent=a.httpAgent}this.headers&&this.headers.forEach((function(e){o[e.name]=e.value})),o["Content-Type"]||(o["Content-Type"]="application/json"),this.withCredentials?i.credentials="include":i.credentials="omit",i.headers=o,this.timeout>0&&void 0!==r&&(this.timeoutId=setTimeout((function(){r.abort()}),this.timeout)),fetch(this.host,i).then(function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),e.json().then((function(e){t(null,e)})).catch((function(r){t(n.InvalidResponse(e))}))}.bind(this)).catch(function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),"AbortError"===e.name&&t(n.ConnectionTimeout(this.timeout)),t(n.InvalidConnection(this.host,e))}.bind(this))},a.prototype.disconnect=function(){},a.prototype.supportsSubscriptions=function(){return!1},e.exports=a},2683:function(e,t,r){"use strict";var n=r(1314).errors,i=r(3150),o=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=e,this.connected=!1,this.connection=t.connect({path:this.path}),this.addDefaultEvents();var n=function(e){var t=null;Array.isArray(e)?e.forEach((function(e){r.responseCallbacks[e.id]&&(t=e.id)})):t=e.id,t||-1===e.method.indexOf("_subscription")?r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t]):r.notificationCallbacks.forEach((function(t){"function"==typeof t&&t(e)}))};"Socket"===t.constructor.name?i(this.connection).done(n):this.connection.on("data",(function(e){r._parseResponse(e.toString()).forEach(n)}))};o.prototype.addDefaultEvents=function(){var e=this;this.connection.on("connect",(function(){e.connected=!0})),this.connection.on("close",(function(){e.connected=!1})),this.connection.on("error",(function(){e._timeout()})),this.connection.on("end",(function(){e._timeout()})),this.connection.on("timeout",(function(){e._timeout()}))},o.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var i=null;try{i=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){throw t._timeout(),n.InvalidResponse(e)}),15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,i&&r.push(i)})),r},o.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,n=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=n},o.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](n.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},o.prototype.reconnect=function(){this.connection.connect({path:this.path})},o.prototype.send=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},o.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");"data"===e?this.notificationCallbacks.push(t):this.connection.on(e,t)},o.prototype.once=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");this.connection.once(e,t)},o.prototype.removeListener=function(e,t){var r=this;"data"===e?this.notificationCallbacks.forEach((function(e,n){e===t&&r.notificationCallbacks.splice(n,1)})):this.connection.removeListener(e,t)},o.prototype.removeAllListeners=function(e){"data"===e?this.notificationCallbacks=[]:this.connection.removeAllListeners(e)},o.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},o.prototype.supportsSubscriptions=function(){return!0},e.exports=o},360:function(e,t,r){"use strict";var n=r(9142),i=r(9033).Buffer,o=r(8847)(r(3355)),a="[object process]"===Object.prototype.toString.call(void 0!==n?n:0),s="undefined"!=typeof navigator&&"ReactNative"===navigator.product,u=null,c=null;if(a||s){u=function(e){return i.from(e).toString("base64")};var f=r(1143);if(f.URL){var l=f.URL;c=function(e){return new l(e)}}else c=r(1143).parse}else u=btoa.bind("object"===("undefined"==typeof globalThis?"undefined":(0,o.default)(globalThis))?globalThis:self),c=function(e){return new URL(e)};e.exports={parseURL:c,btoa:u}},7651:function(e,t,r){"use strict";var n=r(8008),i=r(360),o=r(1314).errors,a=r(1158).w3cwebsocket,s=function(e,t){n.call(this),t=t||{},this.url=e,this._customTimeout=t.timeout||15e3,this.headers=t.headers||{},this.protocol=t.protocol||void 0,this.reconnectOptions=Object.assign({auto:!1,delay:5e3,maxAttempts:!1,onTimeout:!1},t.reconnect),this.clientConfig=t.clientConfig||void 0,this.requestOptions=t.requestOptions||void 0,this.DATA="data",this.CLOSE="close",this.ERROR="error",this.CONNECT="connect",this.RECONNECT="reconnect",this.connection=null,this.requestQueue=new Map,this.responseQueue=new Map,this.reconnectAttempts=0,this.reconnecting=!1,this.connectFailedDescription=null;var r=i.parseURL(e);r.username&&r.password&&(this.headers.authorization="Basic "+i.btoa(r.username+":"+r.password)),r.auth&&(this.headers.authorization="Basic "+i.btoa(r.auth)),Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0}),this.connect()};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype.connect=function(){this.connection=new a(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig),this._addSocketListeners()},s.prototype._onMessage=function(e){var t=this;this._parseResponse("string"==typeof e.data?e.data:"").forEach((function(e){if(e.method&&-1!==e.method.indexOf("_subscription"))t.emit(t.DATA,e);else{var r=e.id;Array.isArray(e)&&(r=e[0].id),t.responseQueue.has(r)&&(void 0!==t.responseQueue.get(r).callback&&t.responseQueue.get(r).callback(!1,e),t.responseQueue.delete(r))}}))},s.prototype._onConnect=function(){if(this.emit(this.CONNECT),this.reconnectAttempts=0,this.reconnecting=!1,this.requestQueue.size>0){var e=this;this.requestQueue.forEach((function(t,r){e.send(t.payload,t.callback),e.requestQueue.delete(r)}))}},s.prototype._onConnectFailed=function(e){this.connectFailedDescription=e.toString().split("\n")[0];var t=this;this.connectFailedDescription&&(e.description=this.connectFailedDescription,this.connectFailedDescription=null),e.code=1006,e.reason="connection failed",!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.ERROR,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(o.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(o.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this.connection._connection&&this.connection._connection.removeAllListeners(),this.connection._client.removeAllListeners(),this.connection._readyState=3,this.emit(this.CLOSE,e)):this.reconnect()},s.prototype._onClose=function(e){var t=this;!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.CLOSE,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(o.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(o.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()},s.prototype._addSocketListeners=function(){this.connection.addEventListener("message",this._onMessage.bind(this)),this.connection.addEventListener("open",this._onConnect.bind(this)),this.connection.addEventListener("close",this._onClose.bind(this)),this.connection._client&&(this.connection._client.removeAllListeners("connectFailed"),this.connection._client.on("connectFailed",this._onConnectFailed.bind(this)))},s.prototype._removeSocketListeners=function(){this.connection.removeEventListener("message",this._onMessage),this.connection.removeEventListener("open",this._onConnect),this.connection.removeEventListener("close",this._onClose),this.connection._connection&&this.connection._client.removeListener("connectFailed",this._onConnectFailed)},s.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){t.reconnectOptions.auto&&t.reconnectOptions.onTimeout?t.reconnect():(t.emit(t.ERROR,o.ConnectionTimeout(t._customTimeout)),t.requestQueue.size>0&&t.requestQueue.forEach((function(e,r){e.callback(o.ConnectionTimeout(t._customTimeout)),t.requestQueue.delete(r)})))}),t._customTimeout))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)})),r},s.prototype.send=function(e,t){var r=e.id,n={payload:e,callback:t};if(Array.isArray(e)&&(r=e[0].id),this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(r,n);else{if(this.connection.readyState!==this.connection.OPEN)return this.requestQueue.delete(r),this.emit(this.ERROR,o.ConnectionNotOpenError()),void n.callback(o.ConnectionNotOpenError());this.responseQueue.set(r,n),this.requestQueue.delete(r);try{this.connection.send(JSON.stringify(n.payload))}catch(e){n.callback(e),this.responseQueue.delete(r)}}},s.prototype.reset=function(){this.responseQueue.clear(),this.requestQueue.clear(),this.removeAllListeners(),this._removeSocketListeners(),this._addSocketListeners()},s.prototype.disconnect=function(e,t){this._removeSocketListeners(),this.connection.close(e||1e3,t)},s.prototype.supportsSubscriptions=function(){return!0},s.prototype.reconnect=function(){var e=this;this.reconnecting=!0,this.responseQueue.size>0&&this.responseQueue.forEach((function(t,r){try{e.responseQueue.delete(r),t.callback(o.PendingRequestsOnReconnectingError())}catch(e){console.error("Error encountered in reconnect: ",e)}})),!this.reconnectOptions.maxAttempts||this.reconnectAttempts0&&this.requestQueue.forEach((function(t,r){t.callback(o.MaxAttemptsReachedOnReconnectingError()),e.requestQueue.delete(r)})))},e.exports=s},2565:function(e,t,r){"use strict";var n=r(606),i=r(4178).subscriptions,o=r(3349),a=r(473),s=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager)},this.net=new a(this),[new i({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new o({name:"getVersion",call:"shh_version",params:0}),new o({name:"getInfo",call:"shh_info",params:0}),new o({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new o({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new o({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new o({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new o({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new o({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new o({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new o({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new o({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new o({name:"newSymKey",call:"shh_newSymKey",params:0}),new o({name:"addSymKey",call:"shh_addSymKey",params:1}),new o({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new o({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new o({name:"getSymKey",call:"shh_getSymKey",params:1}),new o({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new o({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new o({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new o({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new o({name:"post",call:"shh_post",params:1,inputFormatter:[null]}),new o({name:"unsubscribe",call:"shh_unsubscribe",params:1})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};s.prototype.clearSubscriptions=function(){this._requestManager.clearSubscriptions()},n.addProviders(s),e.exports=s},8161:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(7130),o=r(323),a=r(747),s=r(5010),u=r(1734),c=function e(t,r){var i=[];return r.forEach((function(r){if("object"===(0,n.default)(r.components)){if("tuple"!==r.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var o="",a=r.type.indexOf("[");a>=0&&(o=r.type.substring(a));var s=e(t,r.components);Array.isArray(s)&&t?i.push("tuple("+s.join(",")+")"+o):t?i.push("("+s+")"):i.push("("+s.join(",")+")"+o)}else i.push(r.type)})),i},f=function(e){if(!o.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n];return r},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,stripHexPrefix:o.stripHexPrefix,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:f,toAscii:f,asciiToHex:l,fromAscii:l,unitMap:i.unitMap,toWei:function(e,t){if(t=h(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.toWei(e,t):i.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=h(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.fromWei(e,t):i.fromWei(e,t).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement,isBloom:o.isBloom,isUserEthereumAddressInBloom:o.isUserEthereumAddressInBloom,isContractAddressInBloom:o.isContractAddressInBloom,isTopic:o.isTopic,isTopicInBloom:o.isTopicInBloom,isInBloom:o.isInBloom,compareBlockNumbers:function(e,t){if(e===t)return 0;if("genesis"!==e&&"earliest"!==e&&0!==e||"genesis"!==t&&"earliest"!==t&&0!==t){if("genesis"===e||"earliest"===e||0===e)return-1;if("genesis"===t||"earliest"===t||0===t)return 1;if("latest"===e||"finalized"===e)return"pending"===t?-1:1;if("latest"===t||"finalized"===t)return"pending"===e?1:-1;if("pending"===e)return 1;if("pending"===t)return-1;if("safe"===e||"safe"===t)return;var r=new u(e),n=new u(t);return r.lt(n)?-1:r.eq(n)?0:1}return 0},toNumber:o.toNumber}},747:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(1734),o=r(323),a=function(e){var t=(0,n.default)(e);if("string"===t)return o.isHexStrict(e)?new i(e.replace(/0x/i,""),16):new i(e,10);if("number"===t)return new i(e);if(o.isBigNumber(e))return new i(e.toString(10));if(o.isBN(e))return e;throw new Error(e+" is not a number")},s=function(e,t,r){var n,s;if("bytes"===(e=function(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}(e))){if(t.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+t.length);return t}if("string"===e)return o.utf8ToHex(t);if("bool"===e)return t?"01":"00";if(e.startsWith("address")){if(n=r?64:40,!o.isAddress(t))throw new Error(t+" is not a valid address, or the checksum is invalid.");return o.leftPad(t.toLowerCase(),n)}if(n=function(e){var t=/^\D+(\d+).*$/.exec(e);return t?parseInt(t[1],10):null}(e),e.startsWith("bytes")){if(!n)throw new Error("bytes[] not yet supported in solidity");if(r&&(n=32),n<1||n>32||n256)throw new Error("Invalid uint"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s.lt(new i(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return n?o.leftPad(s.toString("hex"),n/8*2):s}if(e.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.lt(new i(0))?s.toTwos(n).toString("hex"):n?o.leftPad(s.toString("hex"),n/8*2):s}throw new Error("Unsupported or invalid type: "+e)},u=function(e){if(Array.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r,a="";if(e&&"object"===(0,n.default)(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,a=e.hasOwnProperty("v")?e.v:e.value):(t=o.toHex(e,!0),a=o.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof a||/^(-)?0x/i.test(a)||(a=new i(a)),Array.isArray(a)){if((r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null}(t))&&a.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(a));r=a.length}return Array.isArray(a)?a.map((function(e){return s(t,e,r).toString("hex").replace("0x","")})).join(""):s(t,a,r).toString("hex").replace("0x","")};e.exports={soliditySha3:function(){var e=Array.prototype.slice.call(arguments).map(u);return o.sha3("0x"+e.join(""))},soliditySha3Raw:function(){return o.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(u).join(""))},encodePacked:function(){return"0x"+Array.prototype.slice.call(arguments).map(u).join("").toLowerCase()}}},323:function(e,t,r){"use strict";var n=r(9033).Buffer,i=r(8847),o=i(r(4519)),a=i(r(3355)),s=r(1734),u=r(7277),c=r(8632),f=r(3062),l=r(9313),h=function(e){return s.isBN(e)},d=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},p=function(e){try{return u.apply(null,arguments)}catch(t){throw new Error(t+' Given value: "'+e+'"')}},v=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(e)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(e))||m(e))},m=function(e){e=e.replace(/^0x/i,"");for(var t=E(e.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(t[r],16)>7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0},g=function(e){var t="";e=(e=(e=(e=(e=c.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r1&&void 0!==arguments[1]&&arguments[1];if(!e)return e;if("string"==typeof e&&!k(e))throw new Error('Given value "'+e+'" is not a valid hex string.');var r=p(e);return t&&(r>Number.MAX_SAFE_INTEGER||r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:x,isHexStrict:k,stripHexPrefix:function(e){return 0!==e&&x(e)?e.replace(/^(-)?0x/i,"$1"):e},leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+e},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(i).join(r||"0")},toTwosComplement:function(e){return"0x"+p(e).toTwos(256).toString(16,64)},sha3:E,sha3Raw:function(e){return null===(e=E(e))?_:e},toNumber:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"number"==typeof e?e:b(w(e),t)}}},7001:function(e,t,r){"use strict";var n=r(8920).i8,i=r(606),o=r(6748),a=r(473),s=r(6306),u=r(2565),c=r(2463),f=r(8161),l=function(){var e=this;i.packageInit(this,arguments),this.version=n,this.utils=f,this.eth=new o(this),this.shh=new u(this),this.bzz=new c(this);var t=this.setProvider;this.setProvider=function(r,n){return t.apply(e,arguments),e.eth.setRequestManager(e._requestManager),e.shh.setRequestManager(e._requestManager),e.bzz.setProvider(r),!0}};l.version=n,l.utils=f,l.modules={Eth:o,Net:a,Personal:s,Shh:u,Bzz:c},i.addProviders(l),e.exports=l},9214:function(){},2361:function(){},4616:function(){},8768:function(e){"use strict";e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},8746:function(e){"use strict";function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4519:function(e,t,r){"use strict";var n=r(2338),i=r(1436),o=r(6906),a=r(2966);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},7460:function(e,t,r){"use strict";var n=r(1949);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},3106:function(e,t,r){"use strict";var n=r(7907),i=r(1642),o=r(6906),a=r(2344);e.exports=function(e){return n(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},9662:function(e,t,r){"use strict";var n=r(3355).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},2310:function(e,t,r){"use strict";var n=r(3355).default,i=r(9662);e.exports=function(e){var t=i(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},3355:function(e){"use strict";function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},6906:function(e,t,r){"use strict";var n=r(8768);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},2247:function(e,t,r){"use strict";var n=r(8847)(r(3355)),i=r(2028)();e.exports=i;try{regeneratorRuntime=i}catch(e){"object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},3604:function(e,t,r){"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t 2 bytes.");var t=i.decode(e);if(!v(t))throw new Error("multihash unknown function code: 0x".concat(t.toString(16)));e=e.slice(i.decode.bytes);var r=i.decode(e);if(r<0)throw new Error("multihash invalid length: ".concat(r));if((e=e.slice(i.decode.bytes)).length!==r)throw new Error("multihash length inconsistent: 0x".concat(a(e,"base16")));return{code:t,name:c[t],length:r,digest:e}}function d(e){var t=e;if("string"===typeof e){if(void 0===o[e])throw new Error("Unrecognized hash function named: ".concat(e));t=o[e]}if("number"!==typeof t)throw new Error("Hash function code should be a number. Got: ".concat(t));if(void 0===c[t]&&!p(t))throw new Error("Unrecognized function code: ".concat(t));return t}function p(e){return e>0&&e<16}function v(e){return!!p(e)||!!c[e]}function m(e){h(e)}Object.freeze(c),e.exports={names:o,codes:c,toHexString:function(e){if(!(e instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return a(e,"base16")},fromHexString:function(e){return s(e,"base16")},toB58String:function(e){if(!(e instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return a(n.encode("base58btc",e)).slice(1)},fromB58String:function(e){var t=e instanceof Uint8Array?a(e):e;return n.decode("z"+t)},decode:h,encode:function(e,t,r){if(!e||void 0===t)throw new Error("multihash encode requires at least two args: digest, code");var n=d(t);if(!(e instanceof Uint8Array))throw new Error("digest should be a Uint8Array");if(null==r&&(r=e.length),r&&e.length!==r)throw new Error("digest length should be equal to specified length.");var o=i.encode(n),a=i.encode(r);return u([o,a,e],o.length+a.length+e.length)},coerceCode:d,isAppCode:p,validate:m,prefix:function(e){return m(e),e.subarray(0,2)},isValidCode:v}},function(e,t,r){"use strict";t.a=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Box",{enumerable:!0,get:function(){return i.Box}}),Object.defineProperty(t,"Flex",{enumerable:!0,get:function(){return i.Flex}}),t.Card=t.Image=t.Button=t.Link=t.Heading=t.Text=void 0;var n=function(e){if(e&&e.__esModule)return e;var t=o();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=n?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}}r.default=e,t&&t.set(e,r);return r}(r(1)),i=r(709);function o(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function a(){return(a=Object.assign||function(e){for(var t=1;t>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function u(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=s(t)^n>>5}for(t=s(t),r=0;rt)return"Exceeds length limit";var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)return"Mixed-case string "+e;var o=(e=r).lastIndexOf("1");if(-1===o)return"No separator character for "+e;if(0===o)return"Missing prefix for "+e;var a=e.slice(0,o),c=e.slice(o+1);if(c.length<6)return"Data too short";var f=u(a);if("string"===typeof f)return f;for(var l=[],h=0;h=c.length||l.push(p)}return 1!==f?"Invalid checksum for "+e:{prefix:a,words:l}}function f(e,t,r,n){for(var i=0,o=0,a=(1<=r;)o-=r,s.push(i>>o&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<r)throw new TypeError("Exceeds length limit");var i=u(e=e.toLowerCase());if("string"===typeof i)throw new Error(i);for(var o=e+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");i=s(i)^c,o+=n.charAt(c)}for(a=0;a<6;++a)i=s(i);for(i^=1,a=0;a<6;++a){o+=n.charAt(i>>5*(5-a)&31)}return o},toWordsUnsafe:function(e){var t=f(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=f(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=f(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=f(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},function(e,t,r){var n=r(358);e.exports=function(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=n(e))){var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f: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.")}var i,o,a=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}},function(e,t,r){var n=r(435),i=r(314);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},function(e,t,r){var n=r(430),i=r(727),o=r(184);e.exports=function(e){return o(e)?n(e):i(e)}},function(e,t,r){"use strict";var n=r(100),i=r(145);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o1&&g.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var i=this.functions[p.f.fromString(e).format()];return i||g.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if(Object(c.isHexString)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];g.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?g.throwArgumentError("no matching event","name",n):i.length>1&&g.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}var o=this.events[p.c.fromString(e).format()];return o||g.throwArgumentError("no matching event","signature",e),o}},{key:"getError",value:function(e){if(Object(c.isHexString)(e)){var t=Object(h.getStatic)(this.constructor,"getSighash");for(var r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}g.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?g.throwArgumentError("no matching error","name",n):i.length>1&&g.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}var o=this.errors[p.f.fromString(e).format()];return o||g.throwArgumentError("no matching error","signature",e),o}},{key:"getSighash",value:function(e){return"string"===typeof e&&(e=this.getFunction(e)),Object(h.getStatic)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"===typeof e&&(e=this.getEvent(e)),Object(h.getStatic)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeFunctionData",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var r=Object(c.arrayify)(t);return Object(c.hexlify)(r.slice(0,4))!==this.getSighash(e)&&g.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",Object(c.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(c.hexlify)(Object(c.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var r=Object(c.arrayify)(t),n=null,i=null,o=null,a=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(f){}break;case 4:var s=Object(c.hexlify)(r.slice(0,4)),u=k[s];if(u)i=this._abiCoder.decode(u.inputs,r.slice(4)),o=u.name,a=u.signature,u.reason&&(n=i[0]);else try{var f=this.getError(s);i=this._abiCoder.decode(f.inputs,r.slice(4)),o=f.name,a=f.format()}catch(f){console.log(f)}}return g.throwError("call revert exception",v.Logger.errors.CALL_EXCEPTION,{method:e.format(),errorArgs:i,errorName:o,errorSignature:a,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(c.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"===typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&g.throwError("too many arguments for "+e.format(),v.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var n=[];e.anonymous||n.push(this.getEventTopic(e));var i=function(e,t){return"string"===e.type?Object(f.a)(t):"bytes"===e.type?Object(l.keccak256)(Object(c.hexlify)(t)):("address"===e.type&&r._abiCoder.encode(["address"],[t]),Object(c.hexZeroPad)(Object(c.hexlify)(t),32))};for(t.forEach((function(t,r){var o=e.inputs[r];o.indexed?null==t?n.push(null):"array"===o.baseType||"tuple"===o.baseType?g.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?n.push(t.map((function(e){return i(o,e)}))):n.push(i(o,t)):null!=t&&g.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"===typeof e&&(e=this.getEvent(e));var n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&g.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var s=t[a];if(e.indexed)if("string"===e.type)n.push(Object(f.a)(s));else if("bytes"===e.type)n.push(Object(l.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[s]))}else i.push(e),o.push(s)})),{data:this._abiCoder.encode(i,o),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"===typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);Object(c.isHexString)(r[0],32)&&r[0].toLowerCase()===n||g.throwError("fragment/topic mismatch",v.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var i=[],o=[],a=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(p.g.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var s=null!=r?this._abiCoder.decode(i,Object(c.concat)(r)):null,u=this._abiCoder.decode(o,t,!0),f=[],l=0,h=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)f[t]=new w({_isIndexed:!0,hash:null});else if(a[t])f[t]=new w({_isIndexed:!0,hash:s[h++]});else try{f[t]=s[h++]}catch(n){f[t]=n}else try{f[t]=u[l++]}catch(n){f[t]=n}if(e.name&&null==f[e.name]){var r=f[t];r instanceof Error?Object.defineProperty(f,e.name,{get:function(){throw x("property ".concat(JSON.stringify(e.name)),r)}}):f[e.name]=r}}));for(var d=function(e){var t=f[e];t instanceof Error&&Object.defineProperty(f,e,{get:function(){throw x("index ".concat(e),t)}})},m=0;m256)throw new Error("invalid number type - "+t);return o&&(l=256),r=n.a.from(r).toTwos(l),Object(i.zeroPad)(r,l/8)}if(a=t.match(u)){var h=parseInt(a[1]);if(String(h)!==a[1]||0===h||h>32)throw new Error("invalid bytes type - "+t);if(Object(i.arrayify)(r).byteLength!==h)throw new Error("invalid value for "+t);return o?Object(i.arrayify)((r+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):r}if((a=t.match(f))&&Array.isArray(r)){var d=a[1];if(parseInt(a[2]||String(r.length))!=r.length)throw new Error("invalid value for "+t);var p=[];return r.forEach((function(t){p.push(e(d,t,!0))})),Object(i.concat)(p)}throw new Error("invalid type - "+t)}(e,t[o]))})),Object(i.hexlify)(Object(i.concat)(r))}function h(e,t){return Object(o.keccak256)(l(e,t))}function d(e,t){return Object(a.c)(l(e,t))}},function(e,t,r){"use strict";var n=r(127),i=r(126),o=r(283);Object.defineProperty(t,"__esModule",{value:!0});var a=r(128),s=r(231),u=n((function e(t,r,n,o){i(this,e),this.code=t,this.size=r,this.digest=n,this.bytes=o}));t.Digest=u,t.create=function(e,t){var r=t.byteLength,n=s.encodingLength(e),i=n+s.encodingLength(r),o=new Uint8Array(i+r);return s.encodeTo(e,o,0),s.encodeTo(r,o,n),o.set(t,i),new u(e,r,t,o)},t.decode=function(e){var t=a.coerce(e),r=s.decode(t),n=o(r,2),i=n[0],c=n[1],f=s.decode(t.subarray(c)),l=o(f,2),h=l[0],d=l[1],p=t.subarray(c+d);if(p.byteLength!==h)throw new Error("Incorrect length");return new u(i,h,p,t)},t.equals=function(e,t){return e===t||e.code===t.code&&e.size===t.size&&a.equals(e.bytes,t.bytes)}},function(e,t,r){var n=r(102).Symbol;e.exports=n},function(e,t){e.exports=function(e,t){return e===t||e!==e&&t!==t}},function(e,t,r){"use strict";r.r(t);var n=r(124);r.d(t,"id",(function(){return n.a}));var i=r(298);r.d(t,"namehash",(function(){return i.b})),r.d(t,"isValidName",(function(){return i.a}));var o=r(300);r.d(t,"messagePrefix",(function(){return o.b})),r.d(t,"hashMessage",(function(){return o.a}));var a=r(400);r.d(t,"_TypedDataEncoder",(function(){return a.a}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return I})),r.d(t,"b",(function(){return B}));var n=r(6),i=r(7),o=r(8),a=r(12),s=r(13),u=r(107),c=r(57),f=r(14),l=r(15),h=r(53),d=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(e){return Object(n.a)(this,r),t.call(this,"address","address",e,!1)}return Object(i.a)(r,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{Object(h.getAddress)(t)}catch(r){this._throwError(r.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return Object(h.getAddress)(Object(o.hexZeroPad)(e.readValue().toHexString(),20))}}]),r}(c.a),p=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(e){var i;return Object(n.a)(this,r),(i=t.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,i}return Object(i.a)(r,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),r}(c.a),v=new s.Logger(u.a);function m(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){var i={};n=t.map((function(e){var t=e.localName;return t||v.throwError("cannot encode object for signature with missing names",s.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]&&v.throwError("cannot encode object for signature with duplicate names",s.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]=!0,r[t]}))}else v.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&v.throwArgumentError("types/value length mismatch","tuple",r);var o=new c.c(e.wordSize),a=new c.c(e.wordSize),u=[];t.forEach((function(e,t){var r=n[t];if(e.dynamic){var i=a.length;e.encode(a,r);var s=o.writeUpdatableValue();u.push((function(e){s(e+i)}))}else e.encode(o,r)})),u.forEach((function(e){e(o.length)}));var f=e.appendWriter(o);return f+=e.appendWriter(a)}function g(e,t){var r=[],n=e.subReader(0);t.forEach((function(t){var i=null;if(t.dynamic){var o=e.readValue(),a=n.subReader(o.toNumber());try{i=t.decode(a)}catch(u){if(u.code===s.Logger.errors.BUFFER_OVERRUN)throw u;(i=u).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(u){if(u.code===s.Logger.errors.BUFFER_OVERRUN)throw u;(i=u).baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=i&&r.push(i)}));var i=t.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach((function(e,t){var n=e.localName;if(n&&1===i[n]&&("length"===n&&(n="_length"),null==r[n])){var o=r[t];o instanceof Error?Object.defineProperty(r,n,{get:function(){throw o}}):r[n]=o}}));for(var o=function(){var e=r[a];e instanceof Error&&Object.defineProperty(r,a,{get:function(){throw e}})},a=0;a=0?i:"")+"]",u=-1===i||e.dynamic;return(a=t.call(this,"array",s,o,u)).coder=e,a.length=i,a}return Object(i.a)(r,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&v.throwError("insufficient data length",s.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n256||n%8!==0)&&R.throwArgumentError("invalid "+r[1]+" bit length","param",e),new M(n/8,"int"===r[1],e.name)}if(r=e.type.match(L)){var i=parseInt(r[1]);return(0===i||i>32)&&R.throwArgumentError("invalid bytes length","param",e),new E(i,e.name)}return R.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new c.b(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new c.c(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(C.g.from(e))}));return new T(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&R.throwError("types/values length mismatch",s.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(C.g.from(e))})),i=new T(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}},{key:"decode",value:function(e,t,r){var n=this,i=e.map((function(e){return n._getCoder(C.g.from(e))}));return new T(i,"_").decode(this._getReader(Object(o.arrayify)(t),r))}}]),e}(),B=new I},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return Me}));var n=r(135),i=r(6),o=r(7),a=r(20),s=r(14),u=r(15),c=r(9),f=r(73),l=r(246),h=r(35),d=r(33),p=r(41),v=r(95),m=r(10),g=r(45),b=null;try{if(null==(b=WebSocket))throw new Error("inject please")}catch(Pe){var y=new m.a(g.a);b=function(){y.throwError("WebSockets not supported in this environment",m.a.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}function w(){w=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(P){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new S(i||[]);return n(a,"_invoke",{value:x(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var k=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},x=new m.a(g.a),_=1,E=function(e){Object(s.a)(r,e);var t=Object(u.a)(r);function r(e,n){var o,s;Object(i.a)(this,r),"any"===n&&x.throwError("WebSocketProvider does not support 'any' network yet",m.a.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),(s="string"===typeof e?t.call(this,e,n):t.call(this,"_websocket",n))._pollingInterval=-1,s._wsReady=!1,"string"===typeof e?Object(c.d)(Object(a.a)(s),"_websocket",new b(s.connection.url)):Object(c.d)(Object(a.a)(s),"_websocket",e),Object(c.d)(Object(a.a)(s),"_requests",{}),Object(c.d)(Object(a.a)(s),"_subs",{}),Object(c.d)(Object(a.a)(s),"_subIds",{}),Object(c.d)(Object(a.a)(s),"_detectNetwork",Object(h.a)((o=Object(a.a)(s),Object(d.a)(r.prototype)),"detectNetwork",o).call(o)),s.websocket.onopen=function(){s._wsReady=!0,Object.keys(s._requests).forEach((function(e){s.websocket.send(s._requests[e].payload)}))},s.websocket.onmessage=function(e){var t=e.data,r=JSON.parse(t);if(null!=r.id){var n=String(r.id),i=s._requests[n];if(delete s._requests[n],void 0!==r.result)i.callback(null,r.result),s.emit("debug",{action:"response",request:JSON.parse(i.payload),response:r.result,provider:Object(a.a)(s)});else{var o=null;r.error?(o=new Error(r.error.message||"unknown error"),Object(c.d)(o,"code",r.error.code||null),Object(c.d)(o,"response",t)):o=new Error("unknown error"),i.callback(o,void 0),s.emit("debug",{action:"response",error:o,request:JSON.parse(i.payload),provider:Object(a.a)(s)})}}else if("eth_subscription"===r.method){var u=s._subs[r.params.subscription];u&&u.processFunc(r.params.result)}else console.warn("this should not happen")};var u=setInterval((function(){s.emit("poll")}),1e3);return u.unref&&u.unref(),Object(l.a)(s)}return Object(o.a)(r,[{key:"websocket",get:function(){return this._websocket}},{key:"detectNetwork",value:function(){return this._detectNetwork}},{key:"pollingInterval",get:function(){return 0},set:function(e){x.throwError("cannot set polling interval on WebSocketProvider",m.a.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}},{key:"resetEventsBlock",value:function(e){x.throwError("cannot reset events block on WebSocketProvider",m.a.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}},{key:"poll",value:function(){return k(this,void 0,void 0,w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}}),e)})))}},{key:"polling",set:function(e){e&&x.throwError("cannot set polling on WebSocketProvider",m.a.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}},{key:"send",value:function(e,t){var r=this,n=_++;return new Promise((function(i,o){var a=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});r.emit("debug",{action:"request",request:JSON.parse(a),provider:r}),r._requests[String(n)]={callback:function(e,t){return e?o(e):i(t)},payload:a},r._wsReady&&r.websocket.send(a)}))}},{key:"_subscribe",value:function(e,t,r){return k(this,void 0,void 0,w().mark((function n(){var i,o,a=this;return w().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==(i=this._subIds[e])&&(i=Promise.all(t).then((function(e){return a.send("eth_subscribe",e)})),this._subIds[e]=i),n.next=4,i;case 4:o=n.sent,this._subs[o]={tag:e,processFunc:r};case 6:case"end":return n.stop()}}),n,this)})))}},{key:"_startEvent",value:function(e){var t=this;switch(e.type){case"block":this._subscribe("block",["newHeads"],(function(e){var r=p.a.from(e.number).toNumber();t._emitted.block=r,t.emit("block",r)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(function(e){t.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(function(r){null==r.removed&&(r.removed=!1),t.emit(e.filter,t.formatter.filterLog(r))}));break;case"tx":var r=function(e){var r=e.hash;t.getTransactionReceipt(r).then((function(e){e&&t.emit(r,e)}))};r(e),this._subscribe("tx",["newHeads"],(function(e){t._events.filter((function(e){return"tx"===e.type})).forEach(r)}));break;case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}},{key:"_stopEvent",value:function(e){var t=this,r=e.tag;if("tx"===e.type){if(this._events.filter((function(e){return"tx"===e.type})).length)return;r="tx"}else if(this.listenerCount(e.event))return;var n=this._subIds[r];n&&(delete this._subIds[r],n.then((function(e){t._subs[e]&&(delete t._subs[e],t.send("eth_unsubscribe",[e]))})))}},{key:"destroy",value:function(){return k(this,void 0,void 0,w().mark((function e(){var t=this;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.websocket.readyState!==b.CONNECTING){e.next=3;break}return e.next=3,new Promise((function(e){t.websocket.onopen=function(){e(!0)},t.websocket.onerror=function(){e(!1)}}));case 3:this.websocket.close(1e3);case 4:case"end":return e.stop()}}),e,this)})))}}],[{key:"defaultUrl",value:function(){return"ws://localhost:8546"}}]),r}(v.a);function A(){A=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(P){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new S(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var S=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},O=new m.a(g.a),M=function(e){Object(s.a)(r,e);var t=Object(u.a)(r);function r(e,n){var o;Object(i.a)(this,r),O.checkAbstract(this instanceof r?this.constructor:void 0,r),e=Object(c.e)(this instanceof r?this.constructor:void 0,"getNetwork")(e),n=Object(c.e)(this instanceof r?this.constructor:void 0,"getApiKey")(n);var s=Object(c.e)(this instanceof r?this.constructor:void 0,"getUrl")(e,n);return o=t.call(this,s,e),"string"===typeof n?Object(c.d)(Object(a.a)(o),"apiKey",n):null!=n&&Object.keys(n).forEach((function(e){Object(c.d)(Object(a.a)(o),e,n[e])})),o}return Object(o.a)(r,[{key:"_startPending",value:function(){O.warn("WARNING: API provider does not support pending filters")}},{key:"isCommunityResource",value:function(){return!1}},{key:"getSigner",value:function(e){return O.throwError("API provider does not support signing",m.a.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}},{key:"listAccounts",value:function(){return Promise.resolve([])}}],[{key:"getApiKey",value:function(e){return e}},{key:"getUrl",value:function(e,t){return O.throwError("not implemented; sub-classes must override getUrl",m.a.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}]),r}(function(e){Object(s.a)(r,e);var t=Object(u.a)(r);function r(){return Object(i.a)(this,r),t.apply(this,arguments)}return Object(o.a)(r,[{key:"detectNetwork",value:function(){var e=this,t=Object.create(null,{detectNetwork:{get:function(){return Object(h.a)(Object(d.a)(r.prototype),"detectNetwork",e)}}});return S(this,void 0,void 0,A().mark((function e(){var r;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(r=this.network)){e.next=7;break}return e.next=4,t.detectNetwork.call(this);case 4:(r=e.sent)||O.throwError("no network detected",m.a.errors.UNKNOWN_ERROR,{}),null==this._network&&(Object(c.d)(this,"_network",r),this.emit("network",r,null));case 7:return e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})))}}]),r}(v.a)),P=new m.a(g.a),j="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",T=function(e){Object(s.a)(r,e);var t=Object(u.a)(r);function r(e,n){var o;Object(i.a)(this,r);var s=new C(e,n),u=s.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");return o=t.call(this,u,s.network),Object(c.d)(Object(a.a)(o),"apiKey",s.apiKey),o}return Object(o.a)(r,[{key:"isCommunityResource",value:function(){return this.apiKey===j}}]),r}(E),C=function(e){Object(s.a)(r,e);var t=Object(u.a)(r);function r(){return Object(i.a)(this,r),t.apply(this,arguments)}return Object(o.a)(r,[{key:"isCommunityResource",value:function(){return this.apiKey===j}}],[{key:"getWebSocketProvider",value:function(e,t){return new T(e,t)}},{key:"getApiKey",value:function(e){return null==e?j:(e&&"string"!==typeof e&&P.throwArgumentError("invalid apiKey","apiKey",e),e)}},{key:"getUrl",value:function(e,t){var r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:P.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:function(e,r){return t===j&&Object(f.c)(),Promise.resolve(!0)}}}}]),r}(M),R=new m.a(g.a),L="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function N(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return R.throwArgumentError("unsupported network","name",e)}var I=function(e){Object(s.a)(r,e);var t=Object(u.a)(r);function r(){return Object(i.a)(this,r),t.apply(this,arguments)}return Object(o.a)(r,[{key:"isCommunityResource",value:function(){return this.apiKey===L}}],[{key:"getApiKey",value:function(e){return null==e?L:e}},{key:"getUrl",value:function(e,t){null==t&&(t=L);var r={allowGzip:!0,url:"https://"+N(e.name)+t,throttleCallback:function(e,r){return t.apiKey===L&&Object(f.c)(),Promise.resolve(!0)}};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}]),r}(M);function B(){B=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new A(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var F=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},D=new m.a(g.a),U=function(e){Object(s.a)(r,e);var t=Object(u.a)(r);function r(){return Object(i.a)(this,r),t.apply(this,arguments)}return Object(o.a)(r,[{key:"perform",value:function(e,t){var n=this,i=Object.create(null,{perform:{get:function(){return Object(h.a)(Object(d.a)(r.prototype),"perform",n)}}});return F(this,void 0,void 0,B().mark((function r(){var n;return B().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("getBlockNumber"!==e){r.next=5;break}return r.next=3,i.perform.call(this,"getBlock",{blockTag:"latest"});case 3:return n=r.sent,r.abrupt("return",n.number);case 5:return r.abrupt("return",i.perform.call(this,e,t));case 6:case"end":return r.stop()}}),r,this)})))}}],[{key:"getApiKey",value:function(e){return null!=e&&D.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}},{key:"getUrl",value:function(e,t){var r=null;switch(e.name){case"homestead":r="https://cloudflare-eth.com/";break;default:D.throwArgumentError("unsupported network","network",arguments[0])}return r}}]),r}(M),z=r(4),H=r(68),q=r(83),G=r(121);function J(){J=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new A(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var V=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},K=new m.a(g.a);function X(e){var t={};for(var r in e)if(null!=e[r]){var n=e[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?Object(z.f)(Object(z.h)(n)):"accessList"===r?"["+Object(H.a)(n).map((function(e){return'{address:"'.concat(e.address,'",storageKeys:["').concat(e.storageKeys.join('","'),'"]}')})).join(",")+"]":Object(z.h)(n),t[r]=n)}return t}function W(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!==typeof e.message||!e.message.match(/^OK/)){var t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function Z(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){var t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){var r=new Error("invalid response");throw r.result=JSON.stringify(e),r}if(e.error){var n=new Error(e.error.message||"unknown error");throw e.error.code&&(n.code=e.error.code),e.error.data&&(n.data=e.error.data),n}return e.result}function Y(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function Q(e,t,r){if("call"===e&&t.code===m.a.errors.SERVER_ERROR){var n=t.error;if(n&&(n.message.match(/reverted/i)||n.message.match(/VM execution error/i))){var i=n.data;if(i&&(i="0x"+i.replace(/^.*0x/i,"")),Object(z.k)(i))return i;K.throwError("missing revert data in call exception",m.a.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}var o=t.message;throw t.code===m.a.errors.SERVER_ERROR&&(t.error&&"string"===typeof t.error.message?o=t.error.message:"string"===typeof t.body?o=t.body:"string"===typeof t.responseText&&(o=t.responseText)),(o=(o||"").toLowerCase()).match(/insufficient funds/)&&K.throwError("insufficient funds for intrinsic transaction cost",m.a.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),o.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&K.throwError("nonce has already been used",m.a.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),o.match(/another transaction with same nonce/)&&K.throwError("replacement fee too low",m.a.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),o.match(/execution failed due to an exception|execution reverted/)&&K.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",m.a.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}var $=function(e){Object(s.a)(r,e);var t=Object(u.a)(r);function r(e,n){var o;return Object(i.a)(this,r),o=t.call(this,e),Object(c.d)(Object(a.a)(o),"baseUrl",o.getBaseUrl()),Object(c.d)(Object(a.a)(o),"apiKey",n||null),o}return Object(o.a)(r,[{key:"getBaseUrl",value:function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return K.throwArgumentError("unsupported network","network",this.network.name)}},{key:"getUrl",value:function(e,t){var r=Object.keys(t).reduce((function(e,r){var n=t[r];return null!=n&&(e+="&".concat(r,"=").concat(n)),e}),""),n=this.apiKey?"&apikey=".concat(this.apiKey):"";return"".concat(this.baseUrl,"/api?module=").concat(e).concat(r).concat(n)}},{key:"getPostUrl",value:function(){return"".concat(this.baseUrl,"/api")}},{key:"getPostData",value:function(e,t){return t.module=e,t.apikey=this.apiKey,t}},{key:"fetch",value:function(e,t,r){return V(this,void 0,void 0,J().mark((function n(){var i,o,a,s,u,l,h=this;return J().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=r?this.getPostUrl():this.getUrl(e,t),o=r?this.getPostData(e,t):null,a="proxy"===e?Z:W,this.emit("debug",{action:"request",request:i,provider:this}),s={url:i,throttleSlotInterval:1e3,throttleCallback:function(e,t){return h.isCommunityResource()&&Object(f.c)(),Promise.resolve(!0)}},u=null,o&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},u=Object.keys(o).map((function(e){return"".concat(e,"=").concat(o[e])})).join("&")),n.next=9,Object(q.a)(s,u,a||Z);case 9:return l=n.sent,this.emit("debug",{action:"response",request:i,response:Object(c.c)(l),provider:this}),n.abrupt("return",l);case 12:case"end":return n.stop()}}),n,this)})))}},{key:"detectNetwork",value:function(){return V(this,void 0,void 0,J().mark((function e(){return J().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.network);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){var n=this,i=Object.create(null,{perform:{get:function(){return Object(h.a)(Object(d.a)(r.prototype),"perform",n)}}});return V(this,void 0,void 0,J().mark((function r(){var n,o,a,s,u,c,f,l,h;return J().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=e,r.next="getBlockNumber"===r.t0?3:"getGasPrice"===r.t0?4:"getBalance"===r.t0?5:"getTransactionCount"===r.t0?6:"getCode"===r.t0?7:"getStorageAt"===r.t0?8:"sendTransaction"===r.t0?9:"getBlock"===r.t0?10:"getTransaction"===r.t0?13:"getTransactionReceipt"===r.t0?14:"call"===r.t0?15:"estimateGas"===r.t0?29:"getLogs"===r.t0?41:"getEtherPrice"===r.t0?65:72;break;case 3:return r.abrupt("return",this.fetch("proxy",{action:"eth_blockNumber"}));case 4:return r.abrupt("return",this.fetch("proxy",{action:"eth_gasPrice"}));case 5:return r.abrupt("return",this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag}));case 6:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag}));case 7:return r.abrupt("return",this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag}));case 8:return r.abrupt("return",this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag}));case 9:return r.abrupt("return",this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((function(e){return Q("sendTransaction",e,t.signedTransaction)})));case 10:if(!t.blockTag){r.next=12;break}return r.abrupt("return",this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"}));case 12:throw new Error("getBlock by blockHash not implemented");case 13:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash}));case 14:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash}));case 15:if("latest"===t.blockTag){r.next=17;break}throw new Error("EtherscanProvider does not support blockTag for call");case 17:return(n=X(t.transaction)).module="proxy",n.action="eth_call",r.prev=20,r.next=23,this.fetch("proxy",n,!0);case 23:return r.abrupt("return",r.sent);case 26:return r.prev=26,r.t1=r.catch(20),r.abrupt("return",Q("call",r.t1,t.transaction));case 29:return(o=X(t.transaction)).module="proxy",o.action="eth_estimateGas",r.prev=32,r.next=35,this.fetch("proxy",o,!0);case 35:return r.abrupt("return",r.sent);case 38:return r.prev=38,r.t2=r.catch(32),r.abrupt("return",Q("estimateGas",r.t2,t.transaction));case 41:return a={action:"getLogs"},t.filter.fromBlock&&(a.fromBlock=Y(t.filter.fromBlock)),t.filter.toBlock&&(a.toBlock=Y(t.filter.toBlock)),t.filter.address&&(a.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&K.throwError("unsupported topic count",m.a.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length&&("string"===typeof(s=t.filter.topics[0])&&66===s.length||K.throwError("unsupported topic format",m.a.errors.UNSUPPORTED_OPERATION,{topic0:s}),a.topic0=s)),r.next=48,this.fetch("logs",a);case 48:u=r.sent,c={},f=0;case 51:if(!(f0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function re(){re=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new A(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var ne=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},ie=new m.a(g.a);function oe(){return(new Date).getTime()}function ae(e){for(var t=null,r=0;rt?null:(n+i)/2}function ue(e){if(null===e)return"null";if("number"===typeof e||"boolean"===typeof e)return JSON.stringify(e);if("string"===typeof e)return e;if(p.a.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((function(e){return ue(e)})));if("object"===typeof e){var t=Object.keys(e);return t.sort(),"{"+t.map((function(t){var r=e[t];return r="function"===typeof r?"[function]":ue(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}var ce=1;function fe(e){var t=null,r=null,n=new Promise((function(n){t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:function(e){return n=n.then(e)}}}var le=[m.a.errors.CALL_EXCEPTION,m.a.errors.INSUFFICIENT_FUNDS,m.a.errors.NONCE_EXPIRED,m.a.errors.REPLACEMENT_UNDERPRICED,m.a.errors.UNPREDICTABLE_GAS_LIMIT],he=["address","args","errorArgs","errorSignature","method","transaction"];function de(e,t){var r={weight:e.weight};return Object.defineProperty(r,"provider",{get:function(){return e.provider}}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function pe(e,t,r){var n=ue;switch(t){case"getBlockNumber":return function(t){var r=t.map((function(e){return e.result})),n=se(t.map((function(e){return e.result})),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber};case"getGasPrice":return function(e){var t=e.map((function(e){return e.result}));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return se(e.map((function(e){return e.result})))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=Object(c.g)(e)).confirmations=-1,ue(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=Object(c.g)(e)).transactions=e.transactions.map((function(e){return(e=Object(c.g)(e)).confirmations=-1,e})),ue(e))}:function(e){return null==e?null:ue(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){var n={};r.forEach((function(t){var r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));for(var i=Object.keys(n),o=0;o=t)return a.result}}}(n,e.quorum)}function ve(e,t){return ne(this,void 0,void 0,re().mark((function r(){var n;return re().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(null!=(n=e.provider).blockNumber&&n.blockNumber>=t||-1===t)){r.next=3;break}return r.abrupt("return",n);case 3:return r.abrupt("return",Object(q.b)((function(){return new Promise((function(r,i){setTimeout((function(){return n.blockNumber>=t?r(n):e.cancelled?r(null):r(void 0)}),0)}))}),{oncePoll:n}));case 4:case"end":return r.stop()}}),r)})))}function me(e,t,r,n){return ne(this,void 0,void 0,re().mark((function i(){var o,a;return re().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:o=e.provider,i.t0=r,i.next="getBlockNumber"===i.t0||"getGasPrice"===i.t0?4:"getEtherPrice"===i.t0?5:"getBalance"===i.t0||"getTransactionCount"===i.t0||"getCode"===i.t0?8:"getStorageAt"===i.t0?13:"getBlock"===i.t0?18:"call"===i.t0||"estimateGas"===i.t0?23:"getTransaction"===i.t0||"getTransactionReceipt"===i.t0?30:"getLogs"===i.t0?31:37;break;case 4:return i.abrupt("return",o[r]());case 5:if(!o.getEtherPrice){i.next=7;break}return i.abrupt("return",o.getEtherPrice());case 7:return i.abrupt("break",37);case 8:if(!n.blockTag||!Object(z.k)(n.blockTag)){i.next=12;break}return i.next=11,ve(e,t);case 11:o=i.sent;case 12:return i.abrupt("return",o[r](n.address,n.blockTag||"latest"));case 13:if(!n.blockTag||!Object(z.k)(n.blockTag)){i.next=17;break}return i.next=16,ve(e,t);case 16:o=i.sent;case 17:return i.abrupt("return",o.getStorageAt(n.address,n.position,n.blockTag||"latest"));case 18:if(!n.blockTag||!Object(z.k)(n.blockTag)){i.next=22;break}return i.next=21,ve(e,t);case 21:o=i.sent;case 22:return i.abrupt("return",o[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash));case 23:if(!n.blockTag||!Object(z.k)(n.blockTag)){i.next=27;break}return i.next=26,ve(e,t);case 26:o=i.sent;case 27:if("call"!==r||!n.blockTag){i.next=29;break}return i.abrupt("return",o[r](n.transaction,n.blockTag));case 29:return i.abrupt("return",o[r](n.transaction));case 30:return i.abrupt("return",o[r](n.transactionHash));case 31:if(!((a=n.filter).fromBlock&&Object(z.k)(a.fromBlock)||a.toBlock&&Object(z.k)(a.toBlock))){i.next=36;break}return i.next=35,ve(e,t);case 35:o=i.sent;case 36:return i.abrupt("return",o.getLogs(a));case 37:return i.abrupt("return",ie.throwError("unknown method error",m.a.errors.UNKNOWN_ERROR,{method:r,params:n}));case 38:case"end":return i.stop()}}),i)})))}var ge=function(e){Object(s.a)(r,e);var t=Object(u.a)(r);function r(e,n){var o;Object(i.a)(this,r),0===e.length&&ie.throwArgumentError("missing providers","providers",e);var s=e.map((function(e,t){if(ee.b.isProvider(e)){var r=Object(f.b)(e)?2e3:750;return Object.freeze({provider:e,weight:1,stallTimeout:r,priority:1})}var n=Object(c.g)(e);null==n.priority&&(n.priority=1),null==n.stallTimeout&&(n.stallTimeout=Object(f.b)(e)?2e3:750),null==n.weight&&(n.weight=1);var i=n.weight;return(i%1||i>512||i<1)&&ie.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(t,"].weight"),i),Object.freeze(n)})),u=s.reduce((function(e,t){return e+t.weight}),0);null==n?n=u/2:n>u&&ie.throwArgumentError("quorum will always fail; larger than total weight","quorum",n);var l=ae(s.map((function(e){return e.provider.network})));return null==l&&(l=new Promise((function(e,t){setTimeout((function(){o.detectNetwork().then(e,t)}),0)}))),o=t.call(this,l),Object(c.d)(Object(a.a)(o),"providerConfigs",Object.freeze(s)),Object(c.d)(Object(a.a)(o),"quorum",n),o._highestBlockNumber=-1,o}return Object(o.a)(r,[{key:"detectNetwork",value:function(){return ne(this,void 0,void 0,re().mark((function e(){var t;return re().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.providerConfigs.map((function(e){return e.provider.getNetwork()})));case 2:return t=e.sent,e.abrupt("return",ae(t));case 4:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){return ne(this,void 0,void 0,re().mark((function r(){var n,i,o,a,s,u,f,l,h,d,p=this;return re().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("sendTransaction"!==e){r.next=13;break}return r.next=3,Promise.all(this.providerConfigs.map((function(e){return e.provider.sendTransaction(t.signedTransaction).then((function(e){return e.hash}),(function(e){return e}))})));case 3:n=r.sent,i=0;case 5:if(!(i=p.quorum)){r.next=22;break}if(void 0===(v=a(d))){r.next=18;break}return s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0})),r.abrupt("return",{v:v});case 18:if(l){r.next=21;break}return r.next=21,fe(100).getPromise();case 21:l=!1;case 22:if(m=s.reduce((function(e,t){if(!t.done||null==t.error)return e;var r=t.error.code;return le.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{}),Object.keys(m).forEach((function(e){var t=m[e];if(!(t.weighte.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&u>0)){for(a=u%i||i,f=c.substr(0,a);a0&&(f+=d+c.slice(a)),this.s<0&&(f="-"+f)}return l?((m=r.fractionGroupSeparator)==s&&(m=b.fractionGroupSeparator)==s&&(m=y.fractionGroupSeparator),m&&((g=r.fractionGroupSize)==s&&(g=b.fractionGroupSize)==s&&(g=y.fractionGroupSize)==s&&(g=0),(g=+g)&&(l=l.replace(new RegExp("\\d{"+g+"}\\B","g"),"$&"+m))),f+h+l):f},e.format={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"",fractionGroupSize:0},e})},function(e,t,r){"use strict";var n=r(225),i=r(305),o=r(308),a=r(418),s=r(688),u=s.nameToVarint,c=s.constantToCode,f=s.nameToCode,l=s.codeToName;function h(e){var t=i.decode(e),r=l[t];if(void 0===r)throw new Error('Code "'.concat(t,'" not found'));return r}function d(e){return l[e]}function p(e){var t=f[e];if(void 0===t)throw new Error('Codec "'.concat(e,'" not found'));return t}function v(e){return i.decode(e)}function m(e){var t=u[e];if(void 0===t)throw new Error('Codec "'.concat(e,'" not found'));return t}function g(e){return a.varintEncode(e)}e.exports=n(n({addPrefix:function(e,t){var r;if(e instanceof Uint8Array)r=a.varintUint8ArrayEncode(e);else{if(!u[e])throw new Error("multicodec not recognized");r=u[e]}return o([r,t],r.length+t.length)},rmPrefix:function(e){return i.decode(e),e.slice(i.decode.bytes)},getNameFromData:h,getNameFromCode:d,getCodeFromName:p,getCodeFromData:v,getVarintFromName:m,getVarintFromCode:g,getCodec:function(e){return h(e)},getName:function(e){return d(e)},getNumber:function(e){return p(e)},getCode:function(e){return v(e)},getCodeVarint:function(e){return m(e)},getVarint:function(e){return Array.from(g(e))}},c),{},{nameToVarint:u,nameToCode:f,codeToName:l})},,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=/^\s+/,r=/\s+$/;function n(i,o){if(o=o||{},(i=i||"")instanceof n)return i;if(!(this instanceof n))return new n(i,o);var a=function(n){var i,o,a,s={r:0,g:0,b:0},u=1,c=null,f=null,l=null,h=!1,d=!1;return"string"==typeof n&&(n=function(e){e=e.replace(t,"").replace(r,"").toLowerCase();var n,i=!1;if(w[e])e=w[e],i=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(n=j.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=j.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=j.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=j.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=j.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=j.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=j.hex8.exec(e))?{r:A(n[1]),g:A(n[2]),b:A(n[3]),a:P(n[4]),format:i?"name":"hex8"}:(n=j.hex6.exec(e))?{r:A(n[1]),g:A(n[2]),b:A(n[3]),format:i?"name":"hex"}:(n=j.hex4.exec(e))?{r:A(n[1]+""+n[1]),g:A(n[2]+""+n[2]),b:A(n[3]+""+n[3]),a:P(n[4]+""+n[4]),format:i?"name":"hex8"}:!!(n=j.hex3.exec(e))&&{r:A(n[1]+""+n[1]),g:A(n[2]+""+n[2]),b:A(n[3]+""+n[3]),format:i?"name":"hex"}}(n)),"object"==e(n)&&(T(n.r)&&T(n.g)&&T(n.b)?(i=n.r,o=n.g,a=n.b,s={r:255*_(i,255),g:255*_(o,255),b:255*_(a,255)},h=!0,d="%"===String(n.r).substr(-1)?"prgb":"rgb"):T(n.h)&&T(n.s)&&T(n.v)?(c=O(n.s),f=O(n.v),s=function(e,t,r){e=6*_(e,360),t=_(t,100),r=_(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),s=r*(1-(1-i)*t),u=n%6;return{r:255*[r,a,o,o,s,r][u],g:255*[s,r,r,a,o,o][u],b:255*[o,o,s,r,r,a][u]}}(n.h,c,f),h=!0,d="hsv"):T(n.h)&&T(n.s)&&T(n.l)&&(c=O(n.s),l=O(n.l),s=function(e,t,r){var n,i,o;function a(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=_(e,360),t=_(t,100),r=_(r,100),0===t)n=i=o=r;else{var s=r<.5?r*(1+t):r+t-r*t,u=2*r-s;n=a(u,s,e+1/3),i=a(u,s,e),o=a(u,s,e-1/3)}return{r:255*n,g:255*i,b:255*o}}(n.h,c,l),h=!0,d="hsl"),n.hasOwnProperty("a")&&(u=n.a)),u=x(u),{ok:h,format:n.format||d,r:Math.min(255,Math.max(s.r,0)),g:Math.min(255,Math.max(s.g,0)),b:Math.min(255,Math.max(s.b,0)),a:u}}(i);this._originalInput=i,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=Math.round(100*this._a)/100,this._format=o.format||a.format,this._gradientType=o.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=a.ok}function i(e,t,r){e=_(e,255),t=_(t,255),r=_(r,255);var n,i,o=Math.max(e,t,r),a=Math.min(e,t,r),s=(o+a)/2;if(o==a)n=i=0;else{var u=o-a;switch(i=s>.5?u/(2-o-a):u/(o+a),o){case e:n=(t-r)/u+(t>1)+720)%360;--t;)i.h=(i.h+o)%360,a.push(n(i));return a}function y(e,t){t=t||6;for(var r=n(e).toHsv(),i=r.h,o=r.s,a=r.v,s=[],u=1/t;t--;)s.push(n({h:i,s:o,v:a})),a=(a+u)%1;return s}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=x(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=o(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=o(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=i(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return a(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,i){var o=[S(Math.round(e).toString(16)),S(Math.round(t).toString(16)),S(Math.round(r).toString(16)),S(M(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*_(this._r,255))+"%",g:Math.round(100*_(this._g,255))+"%",b:Math.round(100*_(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*_(this._r,255))+"%, "+Math.round(100*_(this._g,255))+"%, "+Math.round(100*_(this._b,255))+"%)":"rgba("+Math.round(100*_(this._r,255))+"%, "+Math.round(100*_(this._g,255))+"%, "+Math.round(100*_(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[a(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+s(this._r,this._g,this._b,this._a),r=t,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=n(e);r="#"+s(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(h,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(u,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(f,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(b,arguments)},complement:function(){return this._applyCombination(v,arguments)},monochromatic:function(){return this._applyCombination(y,arguments)},splitcomplement:function(){return this._applyCombination(g,arguments)},triad:function(){return this._applyCombination(m,[3])},tetrad:function(){return this._applyCombination(m,[4])}},n.fromRatio=function(t,r){if("object"==e(t)){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]="a"===o?t[o]:O(t[o]));t=i}return n(t,r)},n.equals=function(e,t){return!(!e||!t)&&n(e).toRgbString()==n(t).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},n.mix=function(e,t,r){r=0===r?0:r||50;var i=n(e).toRgb(),o=n(t).toRgb(),a=r/100;return n({r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a})},n.readability=function(e,t){var r=n(e),i=n(t);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},n.isReadable=function(e,t,r){var i,o,a=n.readability(e,t);switch(o=!1,(i=function(e){var t,r;return t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:t,size:r}}(r)).level+i.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},n.mostReadable=function(e,t,r){var i,o,a,s,u=null,c=0;o=(r=r||{}).includeFallbackColors,a=r.level,s=r.size;for(var f=0;fc&&(c=i,u=n(t[f]));return n.isReadable(e,u,{level:a,size:s})||!o?u:(r.includeFallbackColors=!1,n.mostReadable(e,["#fff","#000"],r))};var w=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=n.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(w);function x(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function _(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function E(e){return Math.min(1,Math.max(0,e))}function A(e){return parseInt(e,16)}function S(e){return 1==e.length?"0"+e:""+e}function O(e){return e<=1&&(e=100*e+"%"),e}function M(e){return Math.round(255*parseFloat(e)).toString(16)}function P(e){return A(e)/255}var j=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",r="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function T(e){return!!j.CSS_UNIT.exec(e)}return n}()},function(e,t,r){var n=r(359);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;f--)u=(u<<1)+n[f];c.push(u)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,u=u.dblp(f),c<0)break;var l=a[c];s(0!==l),u="affine"===e.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var s,u,c,f=this._wnafT1,l=this._wnafT2,h=this._wnafT3,d=0;for(s=0;s=1;s-=2){var v=s-1,m=s;if(1===f[v]&&1===f[m]){var g=[t[v],null,null,t[m]];0===t[v].y.cmp(t[m].y)?(g[1]=t[v].add(t[m]),g[2]=t[v].toJ().mixedAdd(t[m].neg())):0===t[v].y.cmp(t[m].y.redNeg())?(g[1]=t[v].toJ().mixedAdd(t[m]),g[2]=t[v].add(t[m].neg())):(g[1]=t[v].toJ().mixedAdd(t[m]),g[2]=t[v].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=a(r[v],r[m]);for(d=Math.max(y[0].length,d),h[v]=new Array(d),h[m]=new Array(d),u=0;u=0;s--){for(var E=0;s>=0;){var A=!0;for(u=0;u=0&&E++,x=x.dblp(E),s<0)break;for(u=0;u0?c=l[u][S-1>>1]:S<0&&(c=l[u][-S-1>>1].neg()),x="affine"===c.type?x.mixedAdd(c):x.add(c))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i1&&void 0!==arguments[1]?arguments[1]:0,r=n.decode(e,t);return[r,n.decode.bytes]},t.encodeTo=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return n.encode(e,t,r),t},t.encodingLength=function(e){return n.encodingLength(e)}},function(e,t,r){"use strict";function n(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return null===t?null:[t[1],t[2],t[3]].map((function(e){return parseInt(e,16)}))}function i(e,t,r){return t/=255,r/=255,e=(e/=255)>.04045?Math.pow((e+.005)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.005)/1.055,2.4):t/12.92,r=r>.04045?Math.pow((r+.005)/1.055,2.4):r/12.92,[.4124*(e*=100)+.3576*(t*=100)+.1805*(r*=100),.2126*e+.7152*t+.0722*r,.0193*e+.1192*t+.9505*r]}function o(e,t,r){return t/=100,r/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(t=t>.008856?Math.pow(t,1/3):7.787*t+16/116)-16,500*(e-t),200*(t-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]}function a(e,t,r){var n=i(e,t,r);return o(n[0],n[1],n[2])}function s(e,t){var r=e[0],n=e[1],i=e[2],o=t[0],a=t[1],s=t[2],u=r-o,c=n-a,f=i-s,l=Math.sqrt(n*n+i*i),h=o-r,d=Math.sqrt(a*a+s*s)-l,p=Math.sqrt(u*u+c*c+f*f),v=Math.sqrt(p)>Math.sqrt(Math.abs(h))+Math.sqrt(Math.abs(d))?Math.sqrt(p*p-h*h-d*d):0;return h/=1,d/=1*(1+.045*l),v/=1*(1+.015*l),Math.sqrt(h*h+d*d+v*v)}function u(e,t){return s(a.apply(void 0,e),a.apply(void 0,t))}Object.defineProperty(t,"__esModule",{value:!0}),t.getColorIndex=t.getColorDiffStatus=t.hexDiff=t.rgbDiff=t.deltaE94=t.rgbToCIELab=t.xyzToCIELab=t.rgbToXyz=t.hslToRgb=t.rgbToHsl=t.rgbToHex=t.hexToRgb=t.defer=t.RSHIFT=t.SIGBITS=t.DELTAE94_DIFF_STATUS=void 0,t.DELTAE94_DIFF_STATUS={NA:0,PERFECT:1,CLOSE:2,GOOD:10,SIMILAR:50},t.SIGBITS=5,t.RSHIFT=8-t.SIGBITS,t.defer=function(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return{resolve:e,reject:t,promise:r}},t.hexToRgb=n,t.rgbToHex=function(e,t,r){return"#"+((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1,7)},t.rgbToHsl=function(e,t,r){e/=255,t/=255,r/=255;var n,i,o=Math.max(e,t,r),a=Math.min(e,t,r),s=(o+a)/2;if(o===a)n=i=0;else{var u=o-a;switch(i=s>.5?u/(2-o-a):u/(o+a),o){case e:n=(t-r)/u+(t1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(0===t)n=i=o=r;else{var s=r<.5?r*(1+t):r+t-r*t,u=2*r-s;n=a(u,s,e+1/3),i=a(u,s,e),o=a(u,s,e-1/3)}return[255*n,255*i,255*o]},t.rgbToXyz=i,t.xyzToCIELab=o,t.rgbToCIELab=a,t.deltaE94=s,t.rgbDiff=u,t.hexDiff=function(e,t){return u(n(e),n(t))},t.getColorDiffStatus=function(e){return e=0)return i(e,t,t);var r=Math.abs(t),n=i(e,r,r);return"string"===typeof n?"-"+n:-1*n},l=["margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","top","bottom","left","right"].reduce((function(e,t){var r;return n({},e,((r={})[t]=f,r))}),{}),h=function(e){return function(t){var r={},n=i(t,"breakpoints",o),a=[null].concat(n.map((function(e){return"@media screen and (min-width: "+e+")"})));for(var s in e){var u="function"===typeof e[s]?e[s](t):e[s];if(null!=u)if(Array.isArray(u))for(var c=0;c=0&&(i=r.type.substring(o));var a=e(t,r.components);Array.isArray(a)&&t?n.push("tuple("+a.join(",")+")"+i):t?n.push("("+a+")"):n.push("("+a.join(",")+")"+i)}else n.push(r.type)})),n},c=function(e){if(!i.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n];return r},toHex:i.toHex,toBN:i.toBN,bytesToHex:i.bytesToHex,hexToBytes:i.hexToBytes,hexToNumberString:i.hexToNumberString,hexToNumber:i.hexToNumber,toDecimal:i.hexToNumber,numberToHex:i.numberToHex,fromDecimal:i.numberToHex,hexToUtf8:i.hexToUtf8,hexToString:i.hexToUtf8,toUtf8:i.hexToUtf8,stripHexPrefix:i.stripHexPrefix,utf8ToHex:i.utf8ToHex,stringToHex:i.utf8ToHex,fromUtf8:i.utf8ToHex,hexToAscii:c,toAscii:c,asciiToHex:f,fromAscii:f,unitMap:n.unitMap,toWei:function(e,t){if(t=l(t),!i.isBN(e)&&"string"!==typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return i.isBN(e)?n.toWei(e,t):n.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=l(t),!i.isBN(e)&&"string"!==typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return i.isBN(e)?n.fromWei(e,t):n.fromWei(e,t).toString(10)},padLeft:i.leftPad,leftPad:i.leftPad,padRight:i.rightPad,rightPad:i.rightPad,toTwosComplement:i.toTwosComplement,isBloom:i.isBloom,isUserEthereumAddressInBloom:i.isUserEthereumAddressInBloom,isContractAddressInBloom:i.isContractAddressInBloom,isTopic:i.isTopic,isTopicInBloom:i.isTopicInBloom,isInBloom:i.isInBloom,compareBlockNumbers:function(e,t){if(e===t)return 0;if("genesis"!==e&&"earliest"!==e&&0!==e||"genesis"!==t&&"earliest"!==t&&0!==t){if("genesis"===e||"earliest"===e||0===e)return-1;if("genesis"===t||"earliest"===t||0===t)return 1;if("latest"===e||"finalized"===e)return"pending"===t?-1:1;if("latest"===t||"finalized"===t)return"pending"===e?1:-1;if("pending"===e)return 1;if("pending"===t)return-1;if("safe"===e||"safe"===t)return;var r=new s(e),n=new s(t);return r.lt(n)?-1:r.eq(n)?0:1}return 0},toNumber:i.toNumber}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="json-wallets/5.3.0"},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="hash/5.3.0"},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="bignumber/5.3.0"},function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(64);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});var r=0,n={};return e.split(",").forEach((function(e){var i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function o(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}}))}function a(e,t){for(var r=0,n=0;n=(r+=i.l)&&e<=r+i.h&&(e-r)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}var s=o("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),u="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),c=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],f=i("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),l=i("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),h=i("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!==0)throw new Error("bad data");for(var t=[],r=0;r=0)return[];if(e>=65024&&e<=65039)return[];var t=function(e){var t=a(e,c);if(t)return[e+t.s];var r=f[e];if(r)return r;var n=l[e];if(n)return[e+n[0]];var i=h[e];return i||null}(e);return t||[e]})),r=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(r=Object(n.g)(Object(n.e)(r),n.a.NFKC)).forEach((function(e){if(a(e,d))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(e){if(a(e,s))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var i=Object(n.e)(r);if("-"===i.substring(0,1)||"--"===i.substring(2,4)||"-"===i.substring(i.length-1))throw new Error("invalid hyphen");if(i.length>63)throw new Error("too long");return i}},,function(e,t,r){"use strict";t.a=function(e){function t(e,t,n){var i=t.trim().split(p);t=i;var o=i.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";sn&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*r&&0u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0d)&&(D=(H=H.replace(" ",":")).length),0-1},se.prototype.set=function(e,t){var r=this.__data__,n=he(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},ue.prototype.clear=function(){this.__data__={hash:new ae,map:new(K||se),string:new ae}},ue.prototype.delete=function(e){return Se(this,e).delete(e)},ue.prototype.get=function(e){return Se(this,e).get(e)},ue.prototype.has=function(e){return Se(this,e).has(e)},ue.prototype.set=function(e,t){return Se(this,e).set(e,t),this},ce.prototype.add=ce.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ce.prototype.has=function(e){return this.__data__.has(e)},fe.prototype.clear=function(){this.__data__=new se},fe.prototype.delete=function(e){return this.__data__.delete(e)},fe.prototype.get=function(e){return this.__data__.get(e)},fe.prototype.has=function(e){return this.__data__.has(e)},fe.prototype.set=function(e,t){var r=this.__data__;if(r instanceof se){var n=r.__data__;if(!K||n.length<199)return n.push([e,t]),this;r=this.__data__=new ue(n)}return r.set(e,t),this};var de,pe,ve=(de=function(e,t){return e&&me(e,t,Xe)},function(e,t){if(null==e)return e;if(!ze(e))return de(e,t);for(var r=e.length,n=pe?r:-1,i=Object(e);(pe?n--:++ns))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var f=-1,l=!0,h=1&i?new ce:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function Ge(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Je(e){return!!e&&"object"==typeof e}function Ve(e){return"symbol"==typeof e||Je(e)&&"[object Symbol]"==F.call(e)}var Ke=x?function(e){return function(t){return e(t)}}(x):function(e){return Je(e)&&qe(e.length)&&!!p[F.call(e)]};function Xe(e){return ze(e)?le(e):xe(e)}function We(e){return e}r.exports=function(e,t){return function e(t,r,n,i,o){var a=-1,s=t.length;for(n||(n=Pe),o||(o=[]);++a0&&n(u)?r>1?e(u,r-1,n,i,o):E(o,u):i||(o[o.length]=u)}return o}(function(e,t){return(Ue(e)?_:_e)(e,ke(t))}(e,t),1)}}).call(this,r(58),r(93)(e))},function(e,t,r){"use strict";function n(e){return"/"===e.charAt(0)}function i(e,t){for(var r=t,n=r+1,i=e.length;n=0;h--){var d=a[h];"."===d?i(a,h):".."===d?(i(a,h),l++):l&&(i(a,h),l--)}if(!c)for(;l--;l)a.unshift("..");!c||""===a[0]||a[0]&&n(a[0])||a.unshift("");var p=a.join("/");return r&&"/"!==p.substr(-1)&&(p+="/"),p}},function(e,t,r){"use strict";function n(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}t.a=function e(t,r){if(t===r)return!0;if(null==t||null==r)return!1;if(Array.isArray(t))return Array.isArray(r)&&t.length===r.length&&t.every((function(t,n){return e(t,r[n])}));if("object"===typeof t||"object"===typeof r){var i=n(t),o=n(r);return i!==t||o!==r?e(i,o):Object.keys(Object.assign({},t,r)).every((function(n){return e(t[n],r[n])}))}return!1}},function(e,t,r){"use strict";(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.a=r}).call(this,r(58))},,,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return o}));var n=r(0);function i(e){return Object(n.a)({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M446.7 98.6l-67.6 318.8c-5.1 22.5-18.4 28.1-37.3 17.5l-103-75.9-49.7 47.8c-5.5 5.5-10.1 10.1-20.7 10.1l7.4-104.9 190.9-172.5c8.3-7.4-1.8-11.5-12.9-4.1L117.8 284 16.2 252.2c-22.1-6.9-22.5-22.1 4.6-32.7L418.2 66.4c18.4-6.9 34.5 4.1 28.5 32.2z"}}]})(e)}function o(e){return Object(n.a)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"}}]})(e)}},function(e,t,r){"use strict";var n=r(886),i=r(897),o=r(333);e.exports={formats:o,parse:i,stringify:n}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n={};r.r(n),r.d(n,"Provider",(function(){return k})),r.d(n,"BaseProvider",(function(){return Ze})),r.d(n,"Resolver",(function(){return Ke})),r.d(n,"UrlJsonRpcProvider",(function(){return xt})),r.d(n,"FallbackProvider",(function(){return rr})),r.d(n,"AlchemyProvider",(function(){return St})),r.d(n,"AlchemyWebSocketProvider",(function(){return At})),r.d(n,"CloudflareProvider",(function(){return jt})),r.d(n,"EtherscanProvider",(function(){return Dt})),r.d(n,"InfuraProvider",(function(){return sr})),r.d(n,"InfuraWebSocketProvider",(function(){return ar})),r.d(n,"JsonRpcProvider",(function(){return ft})),r.d(n,"JsonRpcBatchProvider",(function(){return ur})),r.d(n,"NodesmithProvider",(function(){return fr})),r.d(n,"PocketProvider",(function(){return dr})),r.d(n,"StaticJsonRpcProvider",(function(){return kt})),r.d(n,"Web3Provider",(function(){return gr})),r.d(n,"WebSocketProvider",(function(){return gt})),r.d(n,"IpcProvider",(function(){return nr})),r.d(n,"JsonRpcSigner",(function(){return st})),r.d(n,"getDefaultProvider",(function(){return yr})),r.d(n,"getNetwork",(function(){return be})),r.d(n,"isCommunityResource",(function(){return Te})),r.d(n,"isCommunityResourcable",(function(){return je})),r.d(n,"showThrottleMessage",(function(){return Re})),r.d(n,"Formatter",(function(){return Pe}));var i={};r.r(i),r.d(i,"AbiCoder",(function(){return xr.a})),r.d(i,"defaultAbiCoder",(function(){return xr.b})),r.d(i,"Fragment",(function(){return _r.e})),r.d(i,"ErrorFragment",(function(){return _r.b})),r.d(i,"EventFragment",(function(){return _r.c})),r.d(i,"FunctionFragment",(function(){return _r.f})),r.d(i,"ParamType",(function(){return _r.g})),r.d(i,"FormatTypes",(function(){return _r.d})),r.d(i,"checkResultErrors",(function(){return p.d})),r.d(i,"Logger",(function(){return b.Logger})),r.d(i,"RLP",(function(){return Cr})),r.d(i,"_fetchData",(function(){return Ee._fetchData})),r.d(i,"fetchJson",(function(){return Ee.fetchJson})),r.d(i,"poll",(function(){return Ee.poll})),r.d(i,"checkProperties",(function(){return g.checkProperties})),r.d(i,"deepCopy",(function(){return g.deepCopy})),r.d(i,"defineReadOnly",(function(){return g.defineReadOnly})),r.d(i,"getStatic",(function(){return g.getStatic})),r.d(i,"resolveProperties",(function(){return g.resolveProperties})),r.d(i,"shallowCopy",(function(){return g.shallowCopy})),r.d(i,"arrayify",(function(){return m.arrayify})),r.d(i,"concat",(function(){return m.concat})),r.d(i,"stripZeros",(function(){return m.stripZeros})),r.d(i,"zeroPad",(function(){return m.zeroPad})),r.d(i,"isBytes",(function(){return m.isBytes})),r.d(i,"isBytesLike",(function(){return m.isBytesLike})),r.d(i,"defaultPath",(function(){return Or.defaultPath})),r.d(i,"HDNode",(function(){return Or.HDNode})),r.d(i,"SigningKey",(function(){return Rr.SigningKey})),r.d(i,"Interface",(function(){return v.b})),r.d(i,"LogDescription",(function(){return v.c})),r.d(i,"TransactionDescription",(function(){return v.d})),r.d(i,"base58",(function(){return ye.Base58})),r.d(i,"base64",(function(){return Er})),r.d(i,"hexlify",(function(){return m.hexlify})),r.d(i,"isHexString",(function(){return m.isHexString})),r.d(i,"hexConcat",(function(){return m.hexConcat})),r.d(i,"hexStripZeros",(function(){return m.hexStripZeros})),r.d(i,"hexValue",(function(){return m.hexValue})),r.d(i,"hexZeroPad",(function(){return m.hexZeroPad})),r.d(i,"hexDataLength",(function(){return m.hexDataLength})),r.d(i,"hexDataSlice",(function(){return m.hexDataSlice})),r.d(i,"nameprep",(function(){return Lr.a})),r.d(i,"_toEscapedUtf8String",(function(){return _e.d})),r.d(i,"toUtf8Bytes",(function(){return _e.f})),r.d(i,"toUtf8CodePoints",(function(){return _e.g})),r.d(i,"toUtf8String",(function(){return _e.h})),r.d(i,"Utf8ErrorFuncs",(function(){return _e.b})),r.d(i,"formatBytes32String",(function(){return Nr.a})),r.d(i,"parseBytes32String",(function(){return Nr.b})),r.d(i,"hashMessage",(function(){return Ar.a})),r.d(i,"namehash",(function(){return ke.b})),r.d(i,"isValidName",(function(){return ke.a})),r.d(i,"id",(function(){return Sr.a})),r.d(i,"_TypedDataEncoder",(function(){return Ye.a})),r.d(i,"getAddress",(function(){return P.getAddress})),r.d(i,"getIcapAddress",(function(){return P.getIcapAddress})),r.d(i,"getContractAddress",(function(){return P.getContractAddress})),r.d(i,"getCreate2Address",(function(){return P.getCreate2Address})),r.d(i,"isAddress",(function(){return P.isAddress})),r.d(i,"formatEther",(function(){return Ir.formatEther})),r.d(i,"parseEther",(function(){return Ir.parseEther})),r.d(i,"formatUnits",(function(){return Ir.formatUnits})),r.d(i,"parseUnits",(function(){return Ir.parseUnits})),r.d(i,"commify",(function(){return Ir.commify})),r.d(i,"computeHmac",(function(){return xe.a})),r.d(i,"keccak256",(function(){return Pr.keccak256})),r.d(i,"ripemd160",(function(){return xe.b})),r.d(i,"sha256",(function(){return xe.c})),r.d(i,"sha512",(function(){return xe.d})),r.d(i,"randomBytes",(function(){return Tr.a})),r.d(i,"shuffled",(function(){return Ut.a})),r.d(i,"solidityPack",(function(){return jr.pack})),r.d(i,"solidityKeccak256",(function(){return jr.keccak256})),r.d(i,"soliditySha256",(function(){return jr.sha256})),r.d(i,"splitSignature",(function(){return m.splitSignature})),r.d(i,"joinSignature",(function(){return m.joinSignature})),r.d(i,"accessListify",(function(){return T.accessListify})),r.d(i,"parseTransaction",(function(){return T.parse})),r.d(i,"serializeTransaction",(function(){return T.serialize})),r.d(i,"getJsonWalletAddress",(function(){return Mr.a})),r.d(i,"computeAddress",(function(){return T.computeAddress})),r.d(i,"recoverAddress",(function(){return T.recoverAddress})),r.d(i,"computePublicKey",(function(){return Rr.computePublicKey})),r.d(i,"recoverPublicKey",(function(){return Rr.recoverPublicKey})),r.d(i,"verifyMessage",(function(){return ce.verifyMessage})),r.d(i,"verifyTypedData",(function(){return ce.verifyTypedData})),r.d(i,"getAccountPath",(function(){return Or.getAccountPath})),r.d(i,"mnemonicToEntropy",(function(){return Or.mnemonicToEntropy})),r.d(i,"entropyToMnemonic",(function(){return Or.entropyToMnemonic})),r.d(i,"isValidMnemonic",(function(){return Or.isValidMnemonic})),r.d(i,"mnemonicToSeed",(function(){return Or.mnemonicToSeed})),r.d(i,"SupportedAlgorithm",(function(){return Br.a})),r.d(i,"UnicodeNormalizationForm",(function(){return _e.a})),r.d(i,"Utf8ErrorReason",(function(){return _e.c})),r.d(i,"Indexed",(function(){return v.a}));var o={};r.r(o),r.d(o,"Signer",(function(){return O})),r.d(o,"Wallet",(function(){return ce.Wallet})),r.d(o,"VoidSigner",(function(){return M})),r.d(o,"getDefaultProvider",(function(){return yr})),r.d(o,"providers",(function(){return n})),r.d(o,"BaseContract",(function(){return V})),r.d(o,"Contract",(function(){return K})),r.d(o,"ContractFactory",(function(){return X})),r.d(o,"BigNumber",(function(){return j.a})),r.d(o,"FixedNumber",(function(){return ae})),r.d(o,"constants",(function(){return fe})),r.d(o,"errors",(function(){return b.ErrorCode})),r.d(o,"logger",(function(){return Dr})),r.d(o,"utils",(function(){return i})),r.d(o,"wordlists",(function(){return wr.a})),r.d(o,"version",(function(){return Fr})),r.d(o,"Wordlist",(function(){return kr.a}));var a=r(31),s=r(20),u=r(35),c=r(33),f=r(14),l=r(15),h=r(6),d=r(7),p=r(57),v=r(188),m=r(8),g=r(12),b=r(13),y=new b.Logger("abstract-provider/5.3.0"),w=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(){return Object(h.a)(this,r),t.apply(this,arguments)}return Object(d.a)(r,null,[{key:"isForkEvent",value:function(e){return!(!e||!e._isForkEvent)}}]),r}(g.Description),k=function(){function e(){Object(h.a)(this,e),y.checkAbstract(this instanceof e?this.constructor:void 0,e),Object(g.defineReadOnly)(this,"_isProvider",!0)}return Object(d.a)(e,[{key:"addListener",value:function(e,t){return this.on(e,t)}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"isProvider",value:function(e){return!(!e||!e._isProvider)}}]),e}();function x(){x=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(P){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new S(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var _=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},E=new b.Logger("abstract-signer/5.3.0"),A=["accessList","chainId","data","from","gasLimit","gasPrice","nonce","to","type","value"],S=[b.Logger.errors.INSUFFICIENT_FUNDS,b.Logger.errors.NONCE_EXPIRED,b.Logger.errors.REPLACEMENT_UNDERPRICED],O=function(){function e(){Object(h.a)(this,e),E.checkAbstract(this instanceof e?this.constructor:void 0,e),Object(g.defineReadOnly)(this,"_isSigner",!0)}return Object(d.a)(e,[{key:"getBalance",value:function(e){return _(this,void 0,void 0,x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getBalance"),t.next=3,this.provider.getBalance(this.getAddress(),e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getTransactionCount",value:function(e){return _(this,void 0,void 0,x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getTransactionCount"),t.next=3,this.provider.getTransactionCount(this.getAddress(),e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"estimateGas",value:function(e){return _(this,void 0,void 0,x().mark((function t(){var r;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("estimateGas"),t.next=3,Object(g.resolveProperties)(this.checkTransaction(e));case 3:return r=t.sent,t.next=6,this.provider.estimateGas(r);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"call",value:function(e,t){return _(this,void 0,void 0,x().mark((function r(){var n;return x().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this._checkProvider("call"),r.next=3,Object(g.resolveProperties)(this.checkTransaction(e));case 3:return n=r.sent,r.next=6,this.provider.call(n,t);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"sendTransaction",value:function(e){var t=this;return this._checkProvider("sendTransaction"),this.populateTransaction(e).then((function(e){return t.signTransaction(e).then((function(e){return t.provider.sendTransaction(e)}))}))}},{key:"getChainId",value:function(){return _(this,void 0,void 0,x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getChainId"),e.next=3,this.provider.getNetwork();case 3:return t=e.sent,e.abrupt("return",t.chainId);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return _(this,void 0,void 0,x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getGasPrice"),e.next=3,this.provider.getGasPrice();case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"resolveName",value:function(e){return _(this,void 0,void 0,x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("resolveName"),t.next=3,this.provider.resolveName(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"checkTransaction",value:function(e){for(var t in e)-1===A.indexOf(t)&&E.throwArgumentError("invalid transaction key: "+t,"transaction",e);var r=Object(g.shallowCopy)(e);return null==r.from?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then((function(t){return t[0].toLowerCase()!==t[1].toLowerCase()&&E.throwArgumentError("from address mismatch","transaction",e),t[0]})),r}},{key:"populateTransaction",value:function(e){return _(this,void 0,void 0,x().mark((function t(){var r,n=this;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(g.resolveProperties)(this.checkTransaction(e));case 2:return null!=(r=t.sent).to&&(r.to=Promise.resolve(r.to).then((function(e){return _(n,void 0,void 0,x().mark((function t(){var r;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=e){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this.resolveName(e);case 4:return null==(r=t.sent)&&E.throwArgumentError("provided ENS name resolves to null","tx.to",e),t.abrupt("return",r);case 7:case"end":return t.stop()}}),t,this)})))}))),null==r.gasPrice&&(r.gasPrice=this.getGasPrice()),null==r.nonce&&(r.nonce=this.getTransactionCount("pending")),null==r.gasLimit&&(r.gasLimit=this.estimateGas(r).catch((function(e){if(S.indexOf(e.code)>=0)throw e;return E.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:r})}))),null==r.chainId?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then((function(t){return 0!==t[1]&&t[0]!==t[1]&&E.throwArgumentError("chainId address mismatch","transaction",e),t[0]})),t.next=10,Object(g.resolveProperties)(r);case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"_checkProvider",value:function(e){this.provider||E.throwError("missing provider",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}}],[{key:"isSigner",value:function(e){return!(!e||!e._isSigner)}}]),e}(),M=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(e,n){var i;return Object(h.a)(this,r),E.checkNew(this instanceof r?this.constructor:void 0,r),i=t.call(this),Object(g.defineReadOnly)(Object(s.a)(i),"address",e),Object(g.defineReadOnly)(Object(s.a)(i),"provider",n||null),i}return Object(d.a)(r,[{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"_fail",value:function(e,t){return Promise.resolve().then((function(){E.throwError(e,b.Logger.errors.UNSUPPORTED_OPERATION,{operation:t})}))}},{key:"signMessage",value:function(e){return this._fail("VoidSigner cannot sign messages","signMessage")}},{key:"signTransaction",value:function(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}},{key:"_signTypedData",value:function(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}},{key:"connect",value:function(e){return new r(this.address,e)}}]),r}(O),P=r(53),j=r(48),T=r(78);function C(){C=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new A(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var R=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},L=new b.Logger("contracts/5.3.0"),N={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0};function I(e,t){return R(this,void 0,void 0,C().mark((function r(){var n,i;return C().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return n=r.sent,r.prev=3,r.abrupt("return",Object(P.getAddress)(n));case 7:r.prev=7,r.t0=r.catch(3);case 9:return e||L.throwError("a provider or signer is needed to resolve ENS names",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),r.next=12,e.resolveName(n);case 12:return null==(i=r.sent)&&L.throwArgumentError("resolver or addr is not configured for ENS name","name",n),r.abrupt("return",i);case 15:case"end":return r.stop()}}),r,null,[[3,7]])})))}function B(e,t,r){return R(this,void 0,void 0,C().mark((function n(){return C().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!Array.isArray(r)){n.next=4;break}return n.next=3,Promise.all(r.map((function(r,n){return B(e,Array.isArray(t)?t[n]:t[r.name],r)})));case 3:return n.abrupt("return",n.sent);case 4:if("address"!==r.type){n.next=8;break}return n.next=7,I(e,t);case 7:return n.abrupt("return",n.sent);case 8:if("tuple"!==r.type){n.next=12;break}return n.next=11,B(e,t,r.components);case 11:return n.abrupt("return",n.sent);case 12:if("array"!==r.baseType){n.next=18;break}if(Array.isArray(t)){n.next=15;break}return n.abrupt("return",Promise.reject(new Error("invalid value for array")));case 15:return n.next=17,Promise.all(t.map((function(t){return B(e,t,r.arrayChildren)})));case 17:return n.abrupt("return",n.sent);case 18:return n.abrupt("return",t);case 19:case"end":return n.stop()}}),n)})))}function F(e,t,r){return R(this,void 0,void 0,C().mark((function n(){var i,o,a,s,u,c,f,l,h,d,p=this;return C().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i={},r.length===t.inputs.length+1&&"object"===typeof r[r.length-1]&&(i=Object(g.shallowCopy)(r.pop())),L.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?i.from?i.from=Object(g.resolveProperties)({override:I(e.signer,i.from),signer:e.signer.getAddress()}).then((function(e){return R(p,void 0,void 0,C().mark((function t(){return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object(P.getAddress)(e.signer)!==e.override&&L.throwError("Contract with a Signer cannot override from",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.abrupt("return",e.override);case 2:case"end":return t.stop()}}),t)})))})):i.from=e.signer.getAddress():i.from&&(i.from=I(e.provider,i.from)),n.next=6,Object(g.resolveProperties)({args:B(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:Object(g.resolveProperties)(i)||{}});case 6:if(o=n.sent,a=e.interface.encodeFunctionData(t,o.args),s={data:a,to:o.address},null!=(u=o.overrides).nonce&&(s.nonce=j.a.from(u.nonce).toNumber()),null!=u.gasLimit&&(s.gasLimit=j.a.from(u.gasLimit)),null!=u.gasPrice&&(s.gasPrice=j.a.from(u.gasPrice)),null!=u.from&&(s.from=u.from),null!=u.type&&(s.type=u.type),null!=u.accessList&&(s.accessList=Object(T.accessListify)(u.accessList)),null==s.gasLimit&&null!=t.gas){for(c=21e3,f=Object(m.arrayify)(a),l=0;l1)){var r=t[0];try{null==i[e]&&Object(g.defineReadOnly)(i,e,i[r])}catch(n){}null==i.functions[e]&&Object(g.defineReadOnly)(i.functions,e,i.functions[r]),null==i.callStatic[e]&&Object(g.defineReadOnly)(i.callStatic,e,i.callStatic[r]),null==i.populateTransaction[e]&&Object(g.defineReadOnly)(i.populateTransaction,e,i.populateTransaction[r]),null==i.estimateGas[e]&&Object(g.defineReadOnly)(i.estimateGas,e,i.estimateGas[r])}}))}return Object(d.a)(e,[{key:"deployed",value:function(){return this._deployed()}},{key:"_deployed",value:function(e){var t=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return t})):this._deployedPromise=this.provider.getCode(this.address,e).then((function(e){return"0x"===e&&L.throwError("contract not deployed",b.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:t.address,operation:"getDeployed"}),t}))),this._deployedPromise}},{key:"fallback",value:function(e){var t=this;this.signer||L.throwError("sending a transactions require a signer",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var r=Object(g.shallowCopy)(e||{});return["from","to"].forEach((function(e){null!=r[e]&&L.throwError("cannot override "+e,b.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})})),r.to=this.resolvedAddress,this.deployed().then((function(){return t.signer.sendTransaction(r)}))}},{key:"connect",value:function(e){"string"===typeof e&&(e=new M(e,this.provider));var t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&Object(g.defineReadOnly)(t,"deployTransaction",this.deployTransaction),t}},{key:"attach",value:function(e){return new this.constructor(e,this.interface,this.signer||this.provider)}},{key:"_normalizeRunningEvent",value:function(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}},{key:"_getRunningEvent",value:function(e){if("string"===typeof e){if("error"===e)return this._normalizeRunningEvent(new q);if("event"===e)return this._normalizeRunningEvent(new H("event",null));if("*"===e)return this._normalizeRunningEvent(new J(this.address,this.interface));var t=this.interface.getEvent(e);return this._normalizeRunningEvent(new G(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{var r=e.topics[0];if("string"!==typeof r)throw new Error("invalid topic");var n=this.interface.getEvent(r);return this._normalizeRunningEvent(new G(this.address,this.interface,n,e.topics))}catch(o){}var i={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new H(z(i),i))}return this._normalizeRunningEvent(new J(this.address,this.interface))}},{key:"_checkRunningEvents",value:function(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];var t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}},{key:"_wrapEvent",value:function(e,t,r){var n=this,i=Object(g.deepCopy)(t);return i.removeListener=function(){r&&(e.removeListener(r),n._checkRunningEvents(e))},i.getBlock=function(){return n.provider.getBlock(t.blockHash)},i.getTransaction=function(){return n.provider.getTransaction(t.transactionHash)},i.getTransactionReceipt=function(){return n.provider.getTransactionReceipt(t.transactionHash)},e.prepareEvent(i),i}},{key:"_addEventListener",value:function(e,t,r){var n=this;if(this.provider||L.throwError("events require a provider or a signer with a provider",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){var i=function(r){var i=n._wrapEvent(e,r,t);if(null==i.decodeError)try{var o=e.getEmit(i);n.emit.apply(n,[e.filter].concat(Object(a.a)(o)))}catch(s){i.decodeError=s.error}null!=e.filter&&n.emit("event",i),null!=i.decodeError&&n.emit("error",i.decodeError,i)};this._wrappedEmits[e.tag]=i,null!=e.filter&&this.provider.on(e.filter,i)}}},{key:"queryFilter",value:function(e,t,r){var n=this,i=this._getRunningEvent(e),o=Object(g.shallowCopy)(i.filter);return"string"===typeof t&&Object(m.isHexString)(t,32)?(null!=r&&L.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),o.blockHash=t):(o.fromBlock=null!=t?t:0,o.toBlock=null!=r?r:"latest"),this.provider.getLogs(o).then((function(e){return e.map((function(e){return n._wrapEvent(i,e,null)}))}))}},{key:"on",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}},{key:"once",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}},{key:"emit",value:function(e){if(!this.provider)return!1;for(var t=this._getRunningEvent(e),r=arguments.length,n=new Array(r>1?r-1:0),i=1;i0;return this._checkRunningEvents(t),o}},{key:"listenerCount",value:function(e){var t=this;return this.provider?null==e?Object.keys(this._runningEvents).reduce((function(e,r){return e+t._runningEvents[r].listenerCount()}),0):this._getRunningEvent(e).listenerCount():0}},{key:"listeners",value:function(e){if(!this.provider)return[];if(null==e){var t=[];for(var r in this._runningEvents)this._runningEvents[r].listeners().forEach((function(e){t.push(e)}));return t}return this._getRunningEvent(e).listeners()}},{key:"removeAllListeners",value:function(e){if(!this.provider)return this;if(null==e){for(var t in this._runningEvents){var r=this._runningEvents[t];r.removeAllListeners(),this._checkRunningEvents(r)}return this}var n=this._getRunningEvent(e);return n.removeAllListeners(),this._checkRunningEvents(n),this}},{key:"off",value:function(e,t){if(!this.provider)return this;var r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"getContractAddress",value:function(e){return Object(P.getContractAddress)(e)}},{key:"getInterface",value:function(e){return v.b.isInterface(e)?e:new v.b(e)}},{key:"isIndexed",value:function(e){return v.a.isIndexed(e)}}]),e}(),K=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(){return Object(h.a)(this,r),t.apply(this,arguments)}return Object(d.a)(r)}(V),X=function(){function e(t,r,n){Object(h.a)(this,e);var i=null;"0x"!==(i="string"===typeof r?r:Object(m.isBytes)(r)?Object(m.hexlify)(r):r&&"string"===typeof r.object?r.object:"!").substring(0,2)&&(i="0x"+i),(!Object(m.isHexString)(i)||i.length%2)&&L.throwArgumentError("invalid bytecode","bytecode",r),n&&!O.isSigner(n)&&L.throwArgumentError("invalid signer","signer",n),Object(g.defineReadOnly)(this,"bytecode",i),Object(g.defineReadOnly)(this,"interface",Object(g.getStatic)(this instanceof e?this.constructor:void 0,"getInterface")(t)),Object(g.defineReadOnly)(this,"signer",n||null)}return Object(d.a)(e,[{key:"getDeployTransaction",value:function(){for(var e={},t=arguments.length,r=new Array(t),n=0;n=0&&e<=256&&!(e%1)?"1"+te.substring(0,e):Z.throwArgumentError("invalid decimal size","decimals",e)}function ne(e,t){null==t&&(t=0);var r=re(t),n=(e=j.a.from(e)).lt(Q);n&&(e=e.mul($));for(var i=e.mod(r).toString();i.length2&&Z.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0"),a.replace(/^([0-9]*?)(0*)$/,(function(e,t,r){return t})).length>r.length-1&&ee("fractional component exceeds decimals","underflow","parseFixed");a.length80&&Z.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new e(Y,r,n,i)}}]),e}(),ae=function(){function e(t,r,n,i){Object(h.a)(this,e),Z.checkNew(this instanceof e?this.constructor:void 0,e),t!==Y&&Z.throwError("cannot use FixedNumber constructor; use FixedNumber.from",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return Object(d.a)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&Z.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=ie(this._value,this.format.decimals),n=ie(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=ie(this._value,this.format.decimals),n=ie(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=ie(this._value,this.format.decimals),n=ie(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=ie(this._value,this.format.decimals),n=ie(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(se)),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(se)),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&Z.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+te.substring(0,t),this.format),i=ue.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&Z.throwArgumentError("invalid byte width","width",e);var t=j.a.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Object(m.hexZeroPad)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||Object(j.d)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(ne(t,r),oe.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=oe.from(r),i=ie(t,n.decimals);!n.signed&&i.lt(Q)&&ee("unsigned value cannot be negative","overflow","value",t);var o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=Object(m.hexZeroPad)(o,n.width/8));var a=ne(i,n.decimals);return new e(Y,o,a,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=oe.from(r);if(Object(m.arrayify)(t).length>n.width/8)throw new Error("overflow");var i=j.a.from(t);n.signed&&(i=i.fromTwos(n.width));var o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=ne(i,n.decimals);return new e(Y,o,a,n)}},{key:"from",value:function(t,r){if("string"===typeof t)return e.fromString(t,r);if(Object(m.isBytes)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(n){if(n.code!==b.Logger.errors.INVALID_ARGUMENT)throw n}return Z.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}(),se=ae.from(1),ue=ae.from("0.5"),ce=r(169),fe=r(151),le=new b.Logger("networks/5.3.0");function he(e){var t=function(t,r){null==r&&(r={});var n=[];if(t.InfuraProvider)try{n.push(new t.InfuraProvider(e,r.infura))}catch(o){}if(t.EtherscanProvider)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(o){}if(t.AlchemyProvider)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(o){}if(t.CloudflareProvider)try{n.push(new t.CloudflareProvider(e))}catch(o){}if(0===n.length)return null;if(t.FallbackProvider){var i=1;return null!=r.quorum?i=r.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(n,i)}return n[0]};return t.renetwork=function(e){return he(e)},t}function de(e,t){var r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return de(e,t)},r}var pe={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:he("homestead")},ve={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:he("ropsten")},me={chainId:63,name:"classicMordor",_defaultProvider:de("https://www.ethercluster.com/mordor","classicMordor")},ge={unspecified:{chainId:0,name:"unspecified"},homestead:pe,mainnet:pe,morden:{chainId:2,name:"morden"},ropsten:ve,testnet:ve,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:he("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:he("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:he("goerli")},classic:{chainId:61,name:"classic",_defaultProvider:de("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:me,classicTestnet:me,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:de("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function be(e){if(null==e)return null;if("number"===typeof e){for(var t in ge){var r=ge[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"===typeof e){var n=ge[e];return null==n?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}var i=ge[e.name];if(!i)return"number"!==typeof e.chainId&&le.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==i.chainId&&le.throwArgumentError("network chainId mismatch","network",e);var o,a=e._defaultProvider||null;return null==a&&i._defaultProvider&&(a=(o=i._defaultProvider)&&"function"===typeof o.renetwork?i._defaultProvider.renetwork(e):i._defaultProvider),{name:e.name,chainId:i.chainId,ensAddress:e.ensAddress||i.ensAddress||null,_defaultProvider:a}}var ye=r(172),we=r(335),ke=r(298),xe=r(170),_e=r(64),Ee=r(74),Ae=r(182),Se=r.n(Ae),Oe=r(401),Me=new b.Logger("providers/5.3.0"),Pe=function(){function e(){Object(h.a)(this,e),Me.checkNew(this instanceof e?this.constructor:void 0,e),this.formats=this.getDefaultFormats()}return Object(d.a)(e,[{key:"getDefaultFormats",value:function(){var t=this,r={},n=this.address.bind(this),i=this.bigNumber.bind(this),o=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),u=this.hex.bind(this),c=this.number.bind(this);return r.transaction={hash:s,type:e.allowNull(c,null),accessList:e.allowNull(this.accessList.bind(this),null),blockHash:e.allowNull(s,null),blockNumber:e.allowNull(c,null),transactionIndex:e.allowNull(c,null),confirmations:e.allowNull(c,null),from:n,gasPrice:i,gasLimit:i,to:e.allowNull(n,null),value:i,nonce:c,data:a,r:e.allowNull(this.uint256),s:e.allowNull(this.uint256),v:e.allowNull(c),creates:e.allowNull(n,null),raw:e.allowNull(a)},r.transactionRequest={from:e.allowNull(n),nonce:e.allowNull(c),gasLimit:e.allowNull(i),gasPrice:e.allowNull(i),to:e.allowNull(n),value:e.allowNull(i),data:e.allowNull((function(e){return t.data(e,!0)})),type:e.allowNull(c),accessList:e.allowNull(this.accessList.bind(this),null)},r.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:s,address:n,topics:e.arrayOf(s),data:a,logIndex:c,blockHash:s},r.receipt={to:e.allowNull(this.address,null),from:e.allowNull(this.address,null),contractAddress:e.allowNull(n,null),transactionIndex:c,root:e.allowNull(u),gasUsed:i,logsBloom:e.allowNull(a),blockHash:s,transactionHash:s,logs:e.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:e.allowNull(c,null),cumulativeGasUsed:i,status:e.allowNull(c)},r.block={hash:s,parentHash:s,number:c,timestamp:c,nonce:e.allowNull(u),difficulty:this.difficulty.bind(this),gasLimit:i,gasUsed:i,miner:n,extraData:a,transactions:e.allowNull(e.arrayOf(s))},r.blockWithTransactions=Object(g.shallowCopy)(r.block),r.blockWithTransactions.transactions=e.allowNull(e.arrayOf(this.transactionResponse.bind(this))),r.filter={fromBlock:e.allowNull(o,void 0),toBlock:e.allowNull(o,void 0),blockHash:e.allowNull(s,void 0),address:e.allowNull(n,void 0),topics:e.allowNull(this.topics.bind(this),void 0)},r.filterLog={blockNumber:e.allowNull(c),blockHash:e.allowNull(s),transactionIndex:c,removed:e.allowNull(this.boolean.bind(this)),address:n,data:e.allowFalsish(a,"0x"),topics:e.arrayOf(s),transactionHash:s,logIndex:c},r}},{key:"accessList",value:function(e){return Object(T.accessListify)(e||[])}},{key:"number",value:function(e){return"0x"===e?0:j.a.from(e).toNumber()}},{key:"bigNumber",value:function(e){return j.a.from(e)}},{key:"boolean",value:function(e){if("boolean"===typeof e)return e;if("string"===typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}},{key:"hex",value:function(e,t){return"string"===typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),Object(m.isHexString)(e))?e.toLowerCase():Me.throwArgumentError("invalid hash","value",e)}},{key:"data",value:function(e,t){var r=this.hex(e,t);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+e);return r}},{key:"address",value:function(e){return Object(P.getAddress)(e)}},{key:"callAddress",value:function(e){if(!Object(m.isHexString)(e,32))return null;var t=Object(P.getAddress)(Object(m.hexDataSlice)(e,12));return t===Oe.a?null:t}},{key:"contractAddress",value:function(e){return Object(P.getContractAddress)(e)}},{key:"blockTag",value:function(e){if(null==e)return"latest";if("earliest"===e)return"0x0";if("latest"===e||"pending"===e)return e;if("number"===typeof e||Object(m.isHexString)(e))return Object(m.hexValue)(e);throw new Error("invalid blockTag")}},{key:"hash",value:function(e,t){var r=this.hex(e,t);return 32!==Object(m.hexDataLength)(r)?Me.throwArgumentError("invalid hash","value",e):r}},{key:"difficulty",value:function(e){if(null==e)return null;var t=j.a.from(e);try{return t.toNumber()}catch(r){}return null}},{key:"uint256",value:function(e){if(!Object(m.isHexString)(e))throw new Error("invalid uint256");return Object(m.hexZeroPad)(e,32)}},{key:"_block",value:function(t,r){return null!=t.author&&null==t.miner&&(t.miner=t.author),e.check(r,t)}},{key:"block",value:function(e){return this._block(e,this.formats.block)}},{key:"blockWithTransactions",value:function(e){return this._block(e,this.formats.blockWithTransactions)}},{key:"transactionRequest",value:function(t){return e.check(this.formats.transactionRequest,t)}},{key:"transactionResponse",value:function(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&j.a.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1===t.type&&null==t.accessList&&(t.accessList=[]);var r=e.check(this.formats.transaction,t);if(null!=t.chainId){var n=t.chainId;Object(m.isHexString)(n)&&(n=j.a.from(n).toNumber()),r.chainId=n}else{var i=t.networkId;null==i&&null==r.v&&(i=t.chainId),Object(m.isHexString)(i)&&(i=j.a.from(i).toNumber()),"number"!==typeof i&&null!=r.v&&((i=(r.v-35)/2)<0&&(i=0),i=parseInt(i)),"number"!==typeof i&&(i=0),r.chainId=i}return r.blockHash&&"x"===r.blockHash.replace(/0/g,"")&&(r.blockHash=null),r}},{key:"transaction",value:function(e){return Object(T.parse)(e)}},{key:"receiptLog",value:function(t){return e.check(this.formats.receiptLog,t)}},{key:"receipt",value:function(t){var r=e.check(this.formats.receipt,t);if(null!=r.root)if(r.root.length<=4){var n=j.a.from(r.root).toNumber();0===n||1===n?(null!=r.status&&r.status!==n&&Me.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Me.throwArgumentError("invalid alt-root-status","value.root",r.root)}else 66!==r.root.length&&Me.throwArgumentError("invalid root hash","value.root",r.root);return null!=r.status&&(r.byzantium=!0),r}},{key:"topics",value:function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.topics(e)})):null!=e?this.hash(e,!0):null}},{key:"filter",value:function(t){return e.check(this.formats.filter,t)}},{key:"filterLog",value:function(t){return e.check(this.formats.filterLog,t)}}],[{key:"check",value:function(e,t){var r={};for(var n in e)try{var i=e[n](t[n]);void 0!==i&&(r[n]=i)}catch(o){throw o.checkKey=n,o.checkValue=t[n],o}return r}},{key:"allowNull",value:function(e,t){return function(r){return null==r?t:e(r)}}},{key:"allowFalsish",value:function(e,t){return function(r){return r?e(r):t}}},{key:"arrayOf",value:function(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");var r=[];return t.forEach((function(t){r.push(e(t))})),r}}}]),e}();function je(e){return e&&"function"===typeof e.isCommunityResource}function Te(e){return je(e)&&e.isCommunityResource()}var Ce=!1;function Re(){Ce||(Ce=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}function Le(){Le=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new A(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var Ne=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ie=new b.Logger("providers/5.3.0");function Be(e){return null==e?"null":(32!==Object(m.hexDataLength)(e)&&Ie.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function Fe(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((function(e){if(Array.isArray(e)){var t={};e.forEach((function(e){t[Be(e)]=!0}));var r=Object.keys(t);return r.sort(),r.join("|")}return Be(e)})).join("&")}function De(e){if("string"===typeof e){if(e=e.toLowerCase(),32===Object(m.hexDataLength)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+Fe(e);if(w.isForkEvent(e))throw Ie.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+Fe(e.topics||[])}throw new Error("invalid event - "+e)}function Ue(){return(new Date).getTime()}function ze(e){return new Promise((function(t){setTimeout(t,e)}))}var He=["block","network","pending","poll"],qe=function(){function e(t,r,n){Object(h.a)(this,e),Object(g.defineReadOnly)(this,"tag",t),Object(g.defineReadOnly)(this,"listener",r),Object(g.defineReadOnly)(this,"once",n)}return Object(d.a)(e,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}},{key:"filter",get:function(){var e=this.tag.split(":");if("filter"!==e[0])return null;var t,r=e[1],n=""===(t=e[2])?[]:t.split(/&/g).map((function(e){if(""===e)return[];var t=e.split("|").map((function(e){return"null"===e?null:e}));return 1===t.length?t[0]:t})),i={};return n.length>0&&(i.topics=n),r&&"*"!==r&&(i.address=r),i}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||He.indexOf(this.tag)>=0}}]),e}(),Ge={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Je(e){return Object(m.hexZeroPad)(j.a.from(e).toHexString(),32)}function Ve(e){return ye.Base58.encode(Object(m.concat)([e,Object(m.hexDataSlice)(Object(xe.c)(Object(xe.c)(e)),0,4)]))}var Ke=function(){function e(t,r,n){Object(h.a)(this,e),Object(g.defineReadOnly)(this,"provider",t),Object(g.defineReadOnly)(this,"name",n),Object(g.defineReadOnly)(this,"address",t.formatter.address(r))}return Object(d.a)(e,[{key:"_fetchBytes",value:function(e,t){return Ne(this,void 0,void 0,Le().mark((function r(){var n,i,o,a;return Le().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n={to:this.address,data:Object(m.hexConcat)([e,Object(ke.b)(this.name),t||"0x"])},r.next=3,this.provider.call(n);case 3:if("0x"!==(i=r.sent)){r.next=6;break}return r.abrupt("return",null);case 6:return o=j.a.from(Object(m.hexDataSlice)(i,0,32)).toNumber(),a=j.a.from(Object(m.hexDataSlice)(i,o,o+32)).toNumber(),r.abrupt("return",Object(m.hexDataSlice)(i,o+32,o+32+a));case 9:case"end":return r.stop()}}),r,this)})))}},{key:"_getAddress",value:function(e,t){var r=Ge[String(e)];if(null==r&&Ie.throwError("unsupported coin type: ".concat(e),b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")")}),"eth"===r.ilk)return this.provider.formatter.address(t);var n=Object(m.arrayify)(t);if(null!=r.p2pkh){var i=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){var o=parseInt(i[1],16);if(i[2].length===2*o&&o>=1&&o<=75)return Ve(Object(m.concat)([[r.p2pkh],"0x"+i[2]]))}}if(null!=r.p2sh){var a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){var s=parseInt(a[1],16);if(a[2].length===2*s&&s>=1&&s<=75)return Ve(Object(m.concat)([[r.p2sh],"0x"+a[2]]))}}if(null!=r.prefix){var u=n[1],c=n[0];if(0===c?20!==u&&32!==u&&(c=-1):c=-1,c>=0&&n.length===2+u&&u>=1&&u<=75){var f=Se.a.toWords(n.slice(2));return f.unshift(c),Se.a.encode(r.prefix,f)}}return null}},{key:"getAddress",value:function(e){return Ne(this,void 0,void 0,Le().mark((function t(){var r,n,i,o;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e&&(e=60),60!==e){t.next=9;break}return r={to:this.address,data:"0x3b3b57de"+Object(ke.b)(this.name).substring(2)},t.next=5,this.provider.call(r);case 5:if("0x"!==(n=t.sent)&&n!==we.a){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",this.provider.formatter.callAddress(n));case 9:return t.next=11,this._fetchBytes("0xf1cb7e06",Je(e));case 11:if(null!=(i=t.sent)&&"0x"!==i){t.next=14;break}return t.abrupt("return",null);case 14:return null==(o=this._getAddress(e,i))&&Ie.throwError("invalid or unsupported coin data",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")"),coinType:e,data:i}),t.abrupt("return",o);case 17:case"end":return t.stop()}}),t,this)})))}},{key:"getContentHash",value:function(){return Ne(this,void 0,void 0,Le().mark((function e(){var t,r,n,i;return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._fetchBytes("0xbc1c58d1");case 2:if(null!=(t=e.sent)&&"0x"!==t){e.next=5;break}return e.abrupt("return",null);case 5:if(!(r=t.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){e.next=10;break}if(n=parseInt(r[3],16),r[4].length!==2*n){e.next=10;break}return e.abrupt("return","ipfs://"+ye.Base58.encode("0x"+r[1]));case 10:if(!(i=t.match(/^0xe40101fa011b20([0-9a-f]*)$/))){e.next=14;break}if(64!==i[1].length){e.next=14;break}return e.abrupt("return","bzz://"+i[1]);case 14:return e.abrupt("return",Ie.throwError("invalid or unsupported content hash data",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t}));case 15:case"end":return e.stop()}}),e,this)})))}},{key:"getText",value:function(e){return Ne(this,void 0,void 0,Le().mark((function t(){var r,n;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(_e.f)(e),(r=Object(m.concat)([Je(64),Je(r.length),r])).length%32!==0&&(r=Object(m.concat)([r,Object(m.hexZeroPad)("0x",32-e.length%32)])),t.next=5,this._fetchBytes("0x59d1d43c",Object(m.hexlify)(r));case 5:if(null!=(n=t.sent)&&"0x"!==n){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",Object(_e.h)(n));case 9:case"end":return t.stop()}}),t,this)})))}}]),e}(),Xe=null,We=1,Ze=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(e){var n;if(Object(h.a)(this,r),Ie.checkNew(this instanceof r?this.constructor:void 0,k),(n=t.call(this))._events=[],n._emitted={block:-2},n.formatter=(this instanceof r?this.constructor:void 0).getFormatter(),Object(g.defineReadOnly)(Object(s.a)(n),"anyNetwork","any"===e),n.anyNetwork&&(e=n.detectNetwork()),e instanceof Promise)n._networkPromise=e,e.catch((function(e){})),n._ready().catch((function(e){}));else{var i=Object(g.getStatic)(this instanceof r?this.constructor:void 0,"getNetwork")(e);i?(Object(g.defineReadOnly)(Object(s.a)(n),"_network",i),n.emit("network",i,null)):Ie.throwArgumentError("invalid network","network",e)}return n._maxInternalBlockNumber=-1024,n._lastBlockNumber=-2,n._pollingInterval=4e3,n._fastQueryDate=0,n}return Object(d.a)(r,[{key:"_ready",value:function(){return Ne(this,void 0,void 0,Le().mark((function e(){var t;return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=this._network){e.next=17;break}if(t=null,!this._networkPromise){e.next=11;break}return e.prev=3,e.next=6,this._networkPromise;case 6:t=e.sent,e.next=11;break;case 9:e.prev=9,e.t0=e.catch(3);case 11:if(null!=t){e.next=15;break}return e.next=14,this.detectNetwork();case 14:t=e.sent;case 15:t||Ie.throwError("no network detected",b.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=t:Object(g.defineReadOnly)(this,"_network",t),this.emit("network",t,null));case 17:return e.abrupt("return",this._network);case 18:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"ready",get:function(){var e=this;return Object(Ee.poll)((function(){return e._ready().then((function(e){return e}),(function(e){if(e.code!==b.Logger.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}))}},{key:"_getInternalBlockNumber",value:function(e){return Ne(this,void 0,void 0,Le().mark((function t(){var r,n,i,o,a=this;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:if(!(e>0)){t.next=20;break}case 3:if(!this._internalBlockNumber){t.next=20;break}return r=this._internalBlockNumber,t.prev=5,t.next=8,r;case 8:if(n=t.sent,!(Ue()-n.respTime<=e)){t.next=11;break}return t.abrupt("return",n.blockNumber);case 11:return t.abrupt("break",20);case 14:if(t.prev=14,t.t0=t.catch(5),this._internalBlockNumber!==r){t.next=18;break}return t.abrupt("break",20);case 18:t.next=3;break;case 20:return i=Ue(),o=Object(g.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(e){return null}),(function(e){return e}))}).then((function(e){var t=e.blockNumber,r=e.networkError;if(r)throw a._internalBlockNumber===o&&(a._internalBlockNumber=null),r;var n=Ue();return(t=j.a.from(t).toNumber())1e3)Ie.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(n,")")),this.emit("error",Ie.makeError("network block skew detected",b.Logger.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(i=this._emitted.block+1;i<=n;i++)this.emit("block",i);return this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach((function(e){if("block"!==e){var t=o._emitted[e];"pending"!==t&&n-t>12&&delete o._emitted[e]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=n-1),this._events.forEach((function(e){switch(e.type){case"tx":var t=e.hash,i=o.getTransactionReceipt(t).then((function(e){return e&&null!=e.blockNumber?(o._emitted["t:"+t]=e.blockNumber,o.emit(t,e),null):null})).catch((function(e){o.emit("error",e)}));r.push(i);break;case"filter":var a=e.filter;a.fromBlock=o._lastBlockNumber+1,a.toBlock=n;var s=o.getLogs(a).then((function(e){0!==e.length&&e.forEach((function(e){o._emitted["b:"+e.blockHash]=e.blockNumber,o._emitted["t:"+e.transactionHash]=e.blockNumber,o.emit(a,e)}))})).catch((function(e){o.emit("error",e)}));r.push(s)}})),this._lastBlockNumber=n,Promise.all(r).then((function(){o.emit("didPoll",t)})).catch((function(e){o.emit("error",e)})),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return Ne(this,void 0,void 0,Le().mark((function e(){return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ie.throwError("provider does not support network detection",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return e.stop()}}),e)})))}},{key:"getNetwork",value:function(){return Ne(this,void 0,void 0,Le().mark((function e(){var t,r,n;return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:return t=e.sent,e.next=5,this.detectNetwork();case 5:if(r=e.sent,t.chainId===r.chainId){e.next=23;break}if(!this.anyNetwork){e.next=20;break}return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,t),e.next=19,ze(0);case 19:return e.abrupt("return",this._network);case 20:throw n=Ie.makeError("underlying network changed",b.Logger.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:r}),this.emit("error",n),n;case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"blockNumber",get:function(){var e=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(t){e._setFastBlockNumber(t)}),(function(e){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(e){var t=this;e&&!this._poller?(this._poller=setInterval((function(){t.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){t.poll(),t._bootstrapPoll=setTimeout((function(){t._poller||t.poll(),t._bootstrapPoll=null}),t.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(e){var t=this;if("number"!==typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){t.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var e=this,t=Ue();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}},{key:"waitForTransaction",value:function(e,t,r){return Ne(this,void 0,void 0,Le().mark((function n(){return Le().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this._waitForTransaction(e,null==t?1:t,r||0,null));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"_waitForTransaction",value:function(e,t,r,n){return Ne(this,void 0,void 0,Le().mark((function i(){var o,a=this;return Le().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getTransactionReceipt(e);case 2:if(!(((o=i.sent)?o.confirmations:0)>=t)){i.next=5;break}return i.abrupt("return",o);case 5:return i.abrupt("return",new Promise((function(i,o){var s=[],u=!1,c=function(){return!!u||(u=!0,s.forEach((function(e){e()})),!1)},f=function(e){e.confirmations0){var p=setTimeout((function(){c()||o(Ie.makeError("timeout exceeded",b.Logger.errors.TIMEOUT,{timeout:r}))}),r);p.unref&&p.unref(),s.push((function(){clearTimeout(p)}))}})));case 6:case"end":return i.stop()}}),i,this)})))}},{key:"getBlockNumber",value:function(){return Ne(this,void 0,void 0,Le().mark((function e(){return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return Ne(this,void 0,void 0,Le().mark((function e(){var t;return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,this.perform("getGasPrice",{});case 4:return t=e.sent,e.prev=5,e.abrupt("return",j.a.from(t));case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",Ie.throwError("bad result from backend",b.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e.t0}));case 12:case"end":return e.stop()}}),e,this,[[5,9]])})))}},{key:"getBalance",value:function(e,t){return Ne(this,void 0,void 0,Le().mark((function r(){var n,i;return Le().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,Object(g.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getBalance",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",j.a.from(i));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Ie.throwError("bad result from backend",b.Logger.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(e,t){return Ne(this,void 0,void 0,Le().mark((function r(){var n,i;return Le().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,Object(g.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getTransactionCount",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",j.a.from(i).toNumber());case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Ie.throwError("bad result from backend",b.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getCode",value:function(e,t){return Ne(this,void 0,void 0,Le().mark((function r(){var n,i;return Le().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,Object(g.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getCode",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",Object(m.hexlify)(i));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Ie.throwError("bad result from backend",b.Logger.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getStorageAt",value:function(e,t,r){return Ne(this,void 0,void 0,Le().mark((function n(){var i,o;return Le().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,Object(g.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((function(e){return Object(m.hexValue)(e)}))});case 4:return i=n.sent,n.next=7,this.perform("getStorageAt",i);case 7:return o=n.sent,n.prev=8,n.abrupt("return",Object(m.hexlify)(o));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",Ie.throwError("bad result from backend",b.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(e,t,r){var n=this;if(null!=t&&32!==Object(m.hexDataLength)(t))throw new Error("invalid response - sendTransaction");var i=e;return null!=t&&e.hash!==t&&Ie.throwError("Transaction hash mismatch from Provider.sendTransaction.",b.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=function(t,i){return Ne(n,void 0,void 0,Le().mark((function n(){var o,a;return Le().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==t&&(t=1),null==i&&(i=0),o=void 0,0!==t&&null!=r&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r}),n.next=6,this._waitForTransaction(e.hash,t,i,o);case 6:if(null!=(a=n.sent)||0!==t){n.next=9;break}return n.abrupt("return",null);case 9:return this._emitted["t:"+e.hash]=a.blockNumber,0===a.status&&Ie.throwError("transaction failed",b.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:a}),n.abrupt("return",a);case 12:case"end":return n.stop()}}),n,this)})))},i}},{key:"sendTransaction",value:function(e){return Ne(this,void 0,void 0,Le().mark((function t(){var r,n,i,o;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,Promise.resolve(e).then((function(e){return Object(m.hexlify)(e)}));case 4:return r=t.sent,n=this.formatter.transaction(e),t.next=8,this._getInternalBlockNumber(100+2*this.pollingInterval);case 8:return i=t.sent,t.prev=9,t.next=12,this.perform("sendTransaction",{signedTransaction:r});case 12:return o=t.sent,t.abrupt("return",this._wrapTransaction(n,o,i));case 16:throw t.prev=16,t.t0=t.catch(9),t.t0.transaction=n,t.t0.transactionHash=n.hash,t.t0;case 21:case"end":return t.stop()}}),t,this,[[9,16]])})))}},{key:"_getTransactionRequest",value:function(e){return Ne(this,void 0,void 0,Le().mark((function t(){var r,n,i=this;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return r=t.sent,n={},["from","to"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?i._getAddress(e):null})))})),["gasLimit","gasPrice","value"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?j.a.from(e):null})))})),["type"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return null!=e?e:null})))})),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?Object(m.hexlify)(e):null})))})),t.t0=this.formatter,t.next=12,Object(g.resolveProperties)(n);case 12:return t.t1=t.sent,t.abrupt("return",t.t0.transactionRequest.call(t.t0,t.t1));case 14:case"end":return t.stop()}}),t,this)})))}},{key:"_getFilter",value:function(e){return Ne(this,void 0,void 0,Le().mark((function t(){var r,n=this;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,r={},null!=e.address&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach((function(t){null!=e[t]&&(r[t]=e[t])})),["fromBlock","toBlock"].forEach((function(t){null!=e[t]&&(r[t]=n._getBlockTag(e[t]))})),t.t0=this.formatter,t.next=10,Object(g.resolveProperties)(r);case 10:return t.t1=t.sent,t.abrupt("return",t.t0.filter.call(t.t0,t.t1));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"call",value:function(e,t){return Ne(this,void 0,void 0,Le().mark((function r(){var n,i;return Le().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,Object(g.resolveProperties)({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("call",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",Object(m.hexlify)(i));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Ie.throwError("bad result from backend",b.Logger.errors.SERVER_ERROR,{method:"call",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"estimateGas",value:function(e){return Ne(this,void 0,void 0,Le().mark((function t(){var r,n;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,Object(g.resolveProperties)({transaction:this._getTransactionRequest(e)});case 4:return r=t.sent,t.next=7,this.perform("estimateGas",r);case 7:return n=t.sent,t.prev=8,t.abrupt("return",j.a.from(n));case 12:return t.prev=12,t.t0=t.catch(8),t.abrupt("return",Ie.throwError("bad result from backend",b.Logger.errors.SERVER_ERROR,{method:"estimateGas",params:r,result:n,error:t.t0}));case 15:case"end":return t.stop()}}),t,this,[[8,12]])})))}},{key:"_getAddress",value:function(e){return Ne(this,void 0,void 0,Le().mark((function t(){var r;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.resolveName(e);case 2:return null==(r=t.sent)&&Ie.throwError("ENS name not configured",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName(".concat(JSON.stringify(e),")")}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"_getBlock",value:function(e,t){return Ne(this,void 0,void 0,Le().mark((function r(){var n,i,o=this;return Le().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,e;case 4:if(e=r.sent,n=-128,i={includeTransactions:!!t},!Object(m.isHexString)(e,32)){r.next=11;break}i.blockHash=e,r.next=23;break;case 11:return r.prev=11,r.t0=this.formatter,r.next=15,this._getBlockTag(e);case 15:r.t1=r.sent,i.blockTag=r.t0.blockTag.call(r.t0,r.t1),Object(m.isHexString)(i.blockTag)&&(n=parseInt(i.blockTag.substring(2),16)),r.next=23;break;case 20:r.prev=20,r.t2=r.catch(11),Ie.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e);case 23:return r.abrupt("return",Object(Ee.poll)((function(){return Ne(o,void 0,void 0,Le().mark((function e(){var r,o,a,s,u;return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.perform("getBlock",i);case 2:if(null!=(r=e.sent)){e.next=11;break}if(null==i.blockHash){e.next=7;break}if(null!=this._emitted["b:"+i.blockHash]){e.next=7;break}return e.abrupt("return",null);case 7:if(null==i.blockTag){e.next=10;break}if(!(n>this._emitted.block)){e.next=10;break}return e.abrupt("return",null);case 10:return e.abrupt("return",void 0);case 11:if(!t){e.next=32;break}o=null,a=0;case 14:if(!(ai.length)){t.next=24;break}return t.abrupt("return",null);case 24:return a=Object(_e.h)(i.slice(0,o)),t.next=27,this.resolveName(a);case 27:if(t.sent==e){t.next=30;break}return t.abrupt("return",null);case 30:return t.abrupt("return",a);case 31:case"end":return t.stop()}}),t,this)})))}},{key:"perform",value:function(e,t){return Ie.throwError(e+" not implemented",b.Logger.errors.NOT_IMPLEMENTED,{operation:e})}},{key:"_startEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_stopEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_addEventListener",value:function(e,t,r){var n=new qe(De(e),t,r);return this._events.push(n),this._startEvent(n),this}},{key:"on",value:function(e,t){return this._addEventListener(e,t,!1)}},{key:"once",value:function(e,t){return this._addEventListener(e,t,!0)}},{key:"emit",value:function(e){for(var t=this,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var $e=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},et=new b.Logger("providers/5.3.0"),tt=["call","estimateGas"];function rt(e,t,r){if("call"===e&&t.code===b.Logger.errors.SERVER_ERROR){var n=t.error;if(n&&n.message.match("reverted")&&Object(m.isHexString)(n.data))return n.data}var i=t.message;t.code===b.Logger.errors.SERVER_ERROR&&t.error&&"string"===typeof t.error.message?i=t.error.message:"string"===typeof t.body?i=t.body:"string"===typeof t.responseText&&(i=t.responseText),i=(i||"").toLowerCase();var o=r.transaction||r.signedTransaction;throw i.match(/insufficient funds/)&&et.throwError("insufficient funds for intrinsic transaction cost",b.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:o}),i.match(/nonce too low/)&&et.throwError("nonce has already been used",b.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:o}),i.match(/replacement transaction underpriced/)&&et.throwError("replacement fee too low",b.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:o}),i.match(/only replay-protected/)&&et.throwError("legacy pre-eip-155 transactions not supported",b.Logger.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:o}),tt.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted/)&&et.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:o}),t}function nt(e){return new Promise((function(t){setTimeout(t,e)}))}function it(e){if(e.error){var t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function ot(e){return e?e.toLowerCase():e}var at={},st=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(e,n,i){var o;if(Object(h.a)(this,r),et.checkNew(this instanceof r?this.constructor:void 0,r),o=t.call(this),e!==at)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return Object(g.defineReadOnly)(Object(s.a)(o),"provider",n),null==i&&(i=0),"string"===typeof i?(Object(g.defineReadOnly)(Object(s.a)(o),"_address",o.provider.formatter.address(i)),Object(g.defineReadOnly)(Object(s.a)(o),"_index",null)):"number"===typeof i?(Object(g.defineReadOnly)(Object(s.a)(o),"_index",i),Object(g.defineReadOnly)(Object(s.a)(o),"_address",null)):et.throwArgumentError("invalid address or index","addressOrIndex",i),o}return Object(d.a)(r,[{key:"connect",value:function(e){return et.throwError("cannot alter JSON-RPC Signer connection",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}},{key:"connectUnchecked",value:function(){return new ut(at,this.provider,this._address||this._index)}},{key:"getAddress",value:function(){var e=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(t){return t.length<=e._index&&et.throwError("unknown account #"+e._index,b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),e.provider.formatter.address(t[e._index])}))}},{key:"sendUncheckedTransaction",value:function(e){var t=this;e=Object(g.shallowCopy)(e);var r=this.getAddress().then((function(e){return e&&(e=e.toLowerCase()),e}));if(null==e.gasLimit){var n=Object(g.shallowCopy)(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return Object(g.resolveProperties)({tx:Object(g.resolveProperties)(e),sender:r}).then((function(r){var n=r.tx,i=r.sender;null!=n.from?n.from.toLowerCase()!==i&&et.throwArgumentError("from address mismatch","transaction",e):n.from=i;var o=t.provider.constructor.hexlifyTransaction(n,{from:!0});return t.provider.send("eth_sendTransaction",[o]).then((function(e){return e}),(function(e){return rt("sendTransaction",e,o)}))}))}},{key:"signTransaction",value:function(e){return et.throwError("signing transactions is unsupported",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}},{key:"sendTransaction",value:function(e){var t=this;return this.sendUncheckedTransaction(e).then((function(e){return Object(Ee.poll)((function(){return t.provider.getTransaction(e).then((function(r){if(null!==r)return t.provider._wrapTransaction(r,e)}))}),{oncePoll:t.provider}).catch((function(t){throw t.transactionHash=e,t}))}))}},{key:"signMessage",value:function(e){return $e(this,void 0,void 0,Qe().mark((function t(){var r,n;return Qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="string"===typeof e?Object(_e.f)(e):e,t.next=3,this.getAddress();case 3:return n=t.sent,t.next=6,this.provider.send("eth_sign",[n.toLowerCase(),Object(m.hexlify)(r)]);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"_signTypedData",value:function(e,t,r){return $e(this,void 0,void 0,Qe().mark((function n(){var i,o,a=this;return Qe().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Ye.a.resolveNames(e,t,r,(function(e){return a.provider.resolveName(e)}));case 2:return i=n.sent,n.next=5,this.getAddress();case 5:return o=n.sent,n.next=8,this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(Ye.a.getPayload(i.domain,t,i.value))]);case 8:return n.abrupt("return",n.sent);case 9:case"end":return n.stop()}}),n,this)})))}},{key:"unlock",value:function(e){return $e(this,void 0,void 0,Qe().mark((function t(){var r,n;return Qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.provider,t.next=3,this.getAddress();case 3:return n=t.sent,t.abrupt("return",r.send("personal_unlockAccount",[n.toLowerCase(),e,null]));case 5:case"end":return t.stop()}}),t,this)})))}}]),r}(O),ut=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(){return Object(h.a)(this,r),t.apply(this,arguments)}return Object(d.a)(r,[{key:"sendTransaction",value:function(e){var t=this;return this.sendUncheckedTransaction(e).then((function(e){return{hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(r){return t.provider.waitForTransaction(e,r)}}}))}}]),r}(st),ct={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0},ft=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(e,n){var i;Object(h.a)(this,r),et.checkNew(this instanceof r?this.constructor:void 0,r);var o=n;return null==o&&(o=new Promise((function(e,t){setTimeout((function(){i.detectNetwork().then((function(t){e(t)}),(function(e){t(e)}))}),0)}))),i=t.call(this,o),e||(e=Object(g.getStatic)(i.constructor,"defaultUrl")()),"string"===typeof e?Object(g.defineReadOnly)(Object(s.a)(i),"connection",Object.freeze({url:e})):Object(g.defineReadOnly)(Object(s.a)(i),"connection",Object.freeze(Object(g.shallowCopy)(e))),i._nextId=42,i}return Object(d.a)(r,[{key:"_cache",get:function(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}},{key:"detectNetwork",value:function(){var e=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((function(){e._cache.detectNetwork=null}),0)),this._cache.detectNetwork}},{key:"_uncachedDetectNetwork",value:function(){return $e(this,void 0,void 0,Qe().mark((function e(){var t,r;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nt(0);case 2:return t=null,e.prev=3,e.next=6,this.send("eth_chainId",[]);case 6:t=e.sent,e.next=19;break;case 9:return e.prev=9,e.t0=e.catch(3),e.prev=11,e.next=14,this.send("net_version",[]);case 14:t=e.sent,e.next=19;break;case 17:e.prev=17,e.t1=e.catch(11);case 19:if(null==t){e.next=28;break}return r=Object(g.getStatic)(this.constructor,"getNetwork"),e.prev=21,e.abrupt("return",r(j.a.from(t).toNumber()));case 25:return e.prev=25,e.t2=e.catch(21),e.abrupt("return",et.throwError("could not detect network",b.Logger.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e.t2}));case 28:return e.abrupt("return",et.throwError("could not detect network",b.Logger.errors.NETWORK_ERROR,{event:"noNetwork"}));case 29:case"end":return e.stop()}}),e,this,[[3,9],[11,17],[21,25]])})))}},{key:"getSigner",value:function(e){return new st(at,this,e)}},{key:"getUncheckedSigner",value:function(e){return this.getSigner(e).connectUnchecked()}},{key:"listAccounts",value:function(){var e=this;return this.send("eth_accounts",[]).then((function(t){return t.map((function(t){return e.formatter.address(t)}))}))}},{key:"send",value:function(e,t){var r=this,n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Object(g.deepCopy)(n),provider:this});var i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];var o=Object(Ee.fetchJson)(this.connection,JSON.stringify(n),it).then((function(e){return r.emit("debug",{action:"response",request:n,response:e,provider:r}),e}),(function(e){throw r.emit("debug",{action:"response",error:e,request:n,provider:r}),e}));return i&&(this._cache[e]=o,setTimeout((function(){r._cache[e]=null}),0)),o}},{key:"prepareRequest",value:function(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ot(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ot(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ot(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ot(t.address),t.position,t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[Object(g.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[Object(g.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=ot(t.filter.address)),["eth_getLogs",[t.filter]]}return null}},{key:"perform",value:function(e,t){return $e(this,void 0,void 0,Qe().mark((function r(){var n;return Qe().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==(n=this.prepareRequest(e,t))&&et.throwError(e+" not implemented",b.Logger.errors.NOT_IMPLEMENTED,{operation:e}),r.prev=2,r.next=5,this.send(n[0],n[1]);case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),r.abrupt("return",rt(e,r.t0,t));case 11:case"end":return r.stop()}}),r,this,[[2,8]])})))}},{key:"_startEvent",value:function(e){"pending"===e.tag&&this._startPending(),Object(u.a)(Object(c.a)(r.prototype),"_startEvent",this).call(this,e)}},{key:"_startPending",value:function(){if(null==this._pendingFilter){var e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;var n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return nt(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((function(e){}))}(),r})).catch((function(e){}))}}},{key:"_stopEvent",value:function(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),Object(u.a)(Object(c.a)(r.prototype),"_stopEvent",this).call(this,e)}}],[{key:"defaultUrl",value:function(){return"http://localhost:8545"}},{key:"hexlifyTransaction",value:function(e,t){var r=Object(g.shallowCopy)(ct);if(t)for(var n in t)t[n]&&(r[n]=!0);Object(g.checkProperties)(e,r);var i={};return["gasLimit","gasPrice","type","nonce","value"].forEach((function(t){if(null!=e[t]){var r=Object(m.hexValue)(e[t]);"gasLimit"===t&&(t="gas"),i[t]=r}})),["from","to","data"].forEach((function(t){null!=e[t]&&(i[t]=Object(m.hexlify)(e[t]))})),e.accessList&&(i.accessList=Object(T.accessListify)(e.accessList)),i}}]),r}(Ze),lt=null;try{if(null==(lt=WebSocket))throw new Error("inject please")}catch(zr){var ht=new b.Logger("providers/5.3.0");lt=function(){ht.throwError("WebSockets not supported in this environment",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}function dt(){dt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new A(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var pt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},vt=new b.Logger("providers/5.3.0"),mt=1,gt=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(e,n){var i,o;Object(h.a)(this,r),"any"===n&&vt.throwError("WebSocketProvider does not support 'any' network yet",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),(o=t.call(this,e,n))._pollingInterval=-1,o._wsReady=!1,Object(g.defineReadOnly)(Object(s.a)(o),"_websocket",new lt(o.connection.url)),Object(g.defineReadOnly)(Object(s.a)(o),"_requests",{}),Object(g.defineReadOnly)(Object(s.a)(o),"_subs",{}),Object(g.defineReadOnly)(Object(s.a)(o),"_subIds",{}),Object(g.defineReadOnly)(Object(s.a)(o),"_detectNetwork",Object(u.a)((i=Object(s.a)(o),Object(c.a)(r.prototype)),"detectNetwork",i).call(i)),o._websocket.onopen=function(){o._wsReady=!0,Object.keys(o._requests).forEach((function(e){o._websocket.send(o._requests[e].payload)}))},o._websocket.onmessage=function(e){var t=e.data,r=JSON.parse(t);if(null!=r.id){var n=String(r.id),i=o._requests[n];if(delete o._requests[n],void 0!==r.result)i.callback(null,r.result),o.emit("debug",{action:"response",request:JSON.parse(i.payload),response:r.result,provider:Object(s.a)(o)});else{var a=null;r.error?(a=new Error(r.error.message||"unknown error"),Object(g.defineReadOnly)(a,"code",r.error.code||null),Object(g.defineReadOnly)(a,"response",t)):a=new Error("unknown error"),i.callback(a,void 0),o.emit("debug",{action:"response",error:a,request:JSON.parse(i.payload),provider:Object(s.a)(o)})}}else if("eth_subscription"===r.method){var u=o._subs[r.params.subscription];u&&u.processFunc(r.params.result)}else console.warn("this should not happen")};var a=setInterval((function(){o.emit("poll")}),1e3);return a.unref&&a.unref(),o}return Object(d.a)(r,[{key:"detectNetwork",value:function(){return this._detectNetwork}},{key:"pollingInterval",get:function(){return 0},set:function(e){vt.throwError("cannot set polling interval on WebSocketProvider",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}},{key:"resetEventsBlock",value:function(e){vt.throwError("cannot reset events block on WebSocketProvider",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}},{key:"poll",value:function(){return pt(this,void 0,void 0,dt().mark((function e(){return dt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}}),e)})))}},{key:"polling",set:function(e){e&&vt.throwError("cannot set polling on WebSocketProvider",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}},{key:"send",value:function(e,t){var r=this,n=mt++;return new Promise((function(i,o){var a=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});r.emit("debug",{action:"request",request:JSON.parse(a),provider:r}),r._requests[String(n)]={callback:function(e,t){return e?o(e):i(t)},payload:a},r._wsReady&&r._websocket.send(a)}))}},{key:"_subscribe",value:function(e,t,r){return pt(this,void 0,void 0,dt().mark((function n(){var i,o,a=this;return dt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==(i=this._subIds[e])&&(i=Promise.all(t).then((function(e){return a.send("eth_subscribe",e)})),this._subIds[e]=i),n.next=4,i;case 4:o=n.sent,this._subs[o]={tag:e,processFunc:r};case 6:case"end":return n.stop()}}),n,this)})))}},{key:"_startEvent",value:function(e){var t=this;switch(e.type){case"block":this._subscribe("block",["newHeads"],(function(e){var r=j.a.from(e.number).toNumber();t._emitted.block=r,t.emit("block",r)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(function(e){t.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(function(r){null==r.removed&&(r.removed=!1),t.emit(e.filter,t.formatter.filterLog(r))}));break;case"tx":var r=function(e){var r=e.hash;t.getTransactionReceipt(r).then((function(e){e&&t.emit(r,e)}))};r(e),this._subscribe("tx",["newHeads"],(function(e){t._events.filter((function(e){return"tx"===e.type})).forEach(r)}));break;case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}},{key:"_stopEvent",value:function(e){var t=this,r=e.tag;if("tx"===e.type){if(this._events.filter((function(e){return"tx"===e.type})).length)return;r="tx"}else if(this.listenerCount(e.event))return;var n=this._subIds[r];n&&(delete this._subIds[r],n.then((function(e){t._subs[e]&&(delete t._subs[e],t.send("eth_unsubscribe",[e]))})))}},{key:"destroy",value:function(){return pt(this,void 0,void 0,dt().mark((function e(){var t=this;return dt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._websocket.readyState!==lt.CONNECTING){e.next=3;break}return e.next=3,new Promise((function(e){t._websocket.onopen=function(){e(!0)},t._websocket.onerror=function(){e(!1)}}));case 3:this._websocket.close(1e3);case 4:case"end":return e.stop()}}),e,this)})))}}],[{key:"defaultUrl",value:function(){return"ws://localhost:8546"}}]),r}(ft);function bt(){bt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new A(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var yt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},wt=new b.Logger("providers/5.3.0"),kt=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(){return Object(h.a)(this,r),t.apply(this,arguments)}return Object(d.a)(r,[{key:"detectNetwork",value:function(){var e=this,t=Object.create(null,{detectNetwork:{get:function(){return Object(u.a)(Object(c.a)(r.prototype),"detectNetwork",e)}}});return yt(this,void 0,void 0,bt().mark((function e(){var r;return bt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(r=this.network)){e.next=7;break}return e.next=4,t.detectNetwork.call(this);case 4:(r=e.sent)||wt.throwError("no network detected",b.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(Object(g.defineReadOnly)(this,"_network",r),this.emit("network",r,null));case 7:return e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})))}}]),r}(ft),xt=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(e,n){var i;Object(h.a)(this,r),wt.checkAbstract(this instanceof r?this.constructor:void 0,r),e=Object(g.getStatic)(this instanceof r?this.constructor:void 0,"getNetwork")(e),n=Object(g.getStatic)(this instanceof r?this.constructor:void 0,"getApiKey")(n);var o=Object(g.getStatic)(this instanceof r?this.constructor:void 0,"getUrl")(e,n);return i=t.call(this,o,e),"string"===typeof n?Object(g.defineReadOnly)(Object(s.a)(i),"apiKey",n):null!=n&&Object.keys(n).forEach((function(e){Object(g.defineReadOnly)(Object(s.a)(i),e,n[e])})),i}return Object(d.a)(r,[{key:"_startPending",value:function(){wt.warn("WARNING: API provider does not support pending filters")}},{key:"isCommunityResource",value:function(){return!1}},{key:"getSigner",value:function(e){return wt.throwError("API provider does not support signing",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}},{key:"listAccounts",value:function(){return Promise.resolve([])}}],[{key:"getApiKey",value:function(e){return e}},{key:"getUrl",value:function(e,t){return wt.throwError("not implemented; sub-classes must override getUrl",b.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}]),r}(kt),_t=new b.Logger("providers/5.3.0"),Et="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",At=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(e,n){var i;Object(h.a)(this,r);var o=new St(e,n),a=o.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");return i=t.call(this,a,o.network),Object(g.defineReadOnly)(Object(s.a)(i),"apiKey",o.apiKey),i}return Object(d.a)(r,[{key:"isCommunityResource",value:function(){return this.apiKey===Et}}]),r}(gt),St=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(){return Object(h.a)(this,r),t.apply(this,arguments)}return Object(d.a)(r,[{key:"isCommunityResource",value:function(){return this.apiKey===Et}}],[{key:"getWebSocketProvider",value:function(e,t){return new At(e,t)}},{key:"getApiKey",value:function(e){return null==e?Et:(e&&"string"!==typeof e&&_t.throwArgumentError("invalid apiKey","apiKey",e),e)}},{key:"getUrl",value:function(e,t){var r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"ropsten":r="eth-ropsten.alchemyapi.io/v2/";break;case"rinkeby":r="eth-rinkeby.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.alchemyapi.io/v2/";break;case"kovan":r="eth-kovan.alchemyapi.io/v2/";break;default:_t.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:function(e,r){return t===Et&&Re(),Promise.resolve(!0)}}}}]),r}(xt);function Ot(){Ot=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new A(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var Mt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Pt=new b.Logger("providers/5.3.0"),jt=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(){return Object(h.a)(this,r),t.apply(this,arguments)}return Object(d.a)(r,[{key:"perform",value:function(e,t){var n=this,i=Object.create(null,{perform:{get:function(){return Object(u.a)(Object(c.a)(r.prototype),"perform",n)}}});return Mt(this,void 0,void 0,Ot().mark((function r(){var n;return Ot().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("getBlockNumber"!==e){r.next=5;break}return r.next=3,i.perform.call(this,"getBlock",{blockTag:"latest"});case 3:return n=r.sent,r.abrupt("return",n.number);case 5:return r.abrupt("return",i.perform.call(this,e,t));case 6:case"end":return r.stop()}}),r,this)})))}}],[{key:"getApiKey",value:function(e){return null!=e&&Pt.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}},{key:"getUrl",value:function(e,t){var r=null;switch(e.name){case"homestead":r="https://cloudflare-eth.com/";break;default:Pt.throwArgumentError("unsupported network","network",arguments[0])}return r}}]),r}(xt);function Tt(){Tt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new A(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var Ct=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Rt=new b.Logger("providers/5.3.0");function Lt(e){var t={};for(var r in e)if(null!=e[r]){var n=e[r];n={type:!0,gasLimit:!0,gasPrice:!0,nonce:!0,value:!0}[r]?Object(m.hexValue)(Object(m.hexlify)(n)):"accessList"===r?"["+Object(T.accessListify)(n).map((function(e){return'{address:"'.concat(e.address,'",storageKeys:["').concat(e.storageKeys.join('","'),'"]}')})).join(",")+"]":Object(m.hexlify)(n),t[r]=n}return t}function Nt(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"OK"!=e.message){var t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function It(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){var t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){var r=new Error("invalid response");throw r.result=JSON.stringify(e),r}if(e.error){var n=new Error(e.error.message||"unknown error");throw e.error.code&&(n.code=e.error.code),e.error.data&&(n.data=e.error.data),n}return e.result}function Bt(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function Ft(e,t,r){if("call"===e&&t.code===b.Logger.errors.SERVER_ERROR){var n=t.error;if(n&&n.message.match("reverted")&&Object(m.isHexString)(n.data))return n.data}var i=t.message;throw t.code===b.Logger.errors.SERVER_ERROR&&(t.error&&"string"===typeof t.error.message?i=t.error.message:"string"===typeof t.body?i=t.body:"string"===typeof t.responseText&&(i=t.responseText)),(i=(i||"").toLowerCase()).match(/insufficient funds/)&&Rt.throwError("insufficient funds for intrinsic transaction cost",b.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),i.match(/same hash was already imported|transaction nonce is too low/)&&Rt.throwError("nonce has already been used",b.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),i.match(/another transaction with same nonce/)&&Rt.throwError("replacement fee too low",b.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),i.match(/execution failed due to an exception/)&&Rt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}var Dt=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(e,n){var i;return Object(h.a)(this,r),Rt.checkNew(this instanceof r?this.constructor:void 0,r),i=t.call(this,e),Object(g.defineReadOnly)(Object(s.a)(i),"baseUrl",i.getBaseUrl()),Object(g.defineReadOnly)(Object(s.a)(i),"apiKey",n||"9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB"),i}return Object(d.a)(r,[{key:"getBaseUrl",value:function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"ropsten":return"https://api-ropsten.etherscan.io";case"rinkeby":return"https://api-rinkeby.etherscan.io";case"kovan":return"https://api-kovan.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io"}return Rt.throwArgumentError("unsupported network","network",name)}},{key:"getUrl",value:function(e,t){var r=Object.keys(t).reduce((function(e,r){var n=t[r];return null!=n&&(e+="&".concat(r,"=").concat(n)),e}),""),n=this.apiKey?"&apikey=".concat(this.apiKey):"";return"".concat(this.baseUrl,"/api?module=").concat(e).concat(r).concat(n)}},{key:"getPostUrl",value:function(){return"".concat(this.baseUrl,"/api")}},{key:"getPostData",value:function(e,t){return t.module=e,t.apikey=this.apiKey,t}},{key:"fetch",value:function(e,t,r){return Ct(this,void 0,void 0,Tt().mark((function n(){var i,o,a,s,u,c,f=this;return Tt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=r?this.getPostUrl():this.getUrl(e,t),o=r?this.getPostData(e,t):null,a="proxy"===e?It:Nt,this.emit("debug",{action:"request",request:i,provider:this}),s={url:i,throttleSlotInterval:1e3,throttleCallback:function(e,t){return f.isCommunityResource()&&Re(),Promise.resolve(!0)}},u=null,o&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},u=Object.keys(o).map((function(e){return"".concat(e,"=").concat(o[e])})).join("&")),n.next=9,Object(Ee.fetchJson)(s,u,a||It);case 9:return c=n.sent,this.emit("debug",{action:"response",request:i,response:Object(g.deepCopy)(c),provider:this}),n.abrupt("return",c);case 12:case"end":return n.stop()}}),n,this)})))}},{key:"detectNetwork",value:function(){return Ct(this,void 0,void 0,Tt().mark((function e(){return Tt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.network);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){var n=this,i=Object.create(null,{perform:{get:function(){return Object(u.a)(Object(c.a)(r.prototype),"perform",n)}}});return Ct(this,void 0,void 0,Tt().mark((function r(){var n,o,a,s,u,c,f,l,h;return Tt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=e,r.next="getBlockNumber"===r.t0?3:"getGasPrice"===r.t0?4:"getBalance"===r.t0?5:"getTransactionCount"===r.t0?6:"getCode"===r.t0?7:"getStorageAt"===r.t0?8:"sendTransaction"===r.t0?9:"getBlock"===r.t0?10:"getTransaction"===r.t0?13:"getTransactionReceipt"===r.t0?14:"call"===r.t0?15:"estimateGas"===r.t0?29:"getLogs"===r.t0?41:"getEtherPrice"===r.t0?65:72;break;case 3:return r.abrupt("return",this.fetch("proxy",{action:"eth_blockNumber"}));case 4:return r.abrupt("return",this.fetch("proxy",{action:"eth_gasPrice"}));case 5:return r.abrupt("return",this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag}));case 6:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag}));case 7:return r.abrupt("return",this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag}));case 8:return r.abrupt("return",this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag}));case 9:return r.abrupt("return",this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((function(e){return Ft("sendTransaction",e,t.signedTransaction)})));case 10:if(!t.blockTag){r.next=12;break}return r.abrupt("return",this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"}));case 12:throw new Error("getBlock by blockHash not implemented");case 13:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash}));case 14:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash}));case 15:if("latest"===t.blockTag){r.next=17;break}throw new Error("EtherscanProvider does not support blockTag for call");case 17:return(n=Lt(t.transaction)).module="proxy",n.action="eth_call",r.prev=20,r.next=23,this.fetch("proxy",n,!0);case 23:return r.abrupt("return",r.sent);case 26:return r.prev=26,r.t1=r.catch(20),r.abrupt("return",Ft("call",r.t1,t.transaction));case 29:return(o=Lt(t.transaction)).module="proxy",o.action="eth_estimateGas",r.prev=32,r.next=35,this.fetch("proxy",o,!0);case 35:return r.abrupt("return",r.sent);case 38:return r.prev=38,r.t2=r.catch(32),r.abrupt("return",Ft("estimateGas",r.t2,t.transaction));case 41:return a={action:"getLogs"},t.filter.fromBlock&&(a.fromBlock=Bt(t.filter.fromBlock)),t.filter.toBlock&&(a.toBlock=Bt(t.filter.toBlock)),t.filter.address&&(a.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Rt.throwError("unsupported topic count",b.Logger.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length&&("string"===typeof(s=t.filter.topics[0])&&66===s.length||Rt.throwError("unsupported topic format",b.Logger.errors.UNSUPPORTED_OPERATION,{topic0:s}),a.topic0=s)),r.next=48,this.fetch("logs",a);case 48:u=r.sent,c={},f=0;case 51:if(!(f=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var Ht=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},qt=new b.Logger("providers/5.3.0");function Gt(){return(new Date).getTime()}function Jt(e){for(var t=null,r=0;rt?null:(n+i)/2}function Kt(e){if(null===e)return"null";if("number"===typeof e||"boolean"===typeof e)return JSON.stringify(e);if("string"===typeof e)return e;if(j.a.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((function(e){return Kt(e)})));if("object"===typeof e){var t=Object.keys(e);return t.sort(),"{"+t.map((function(t){var r=e[t];return r="function"===typeof r?"[function]":Kt(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}var Xt=1;function Wt(e){var t=null,r=null,n=new Promise((function(n){t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:function(e){return n=n.then(e)}}}var Zt=[b.Logger.errors.CALL_EXCEPTION,b.Logger.errors.INSUFFICIENT_FUNDS,b.Logger.errors.NONCE_EXPIRED,b.Logger.errors.REPLACEMENT_UNDERPRICED,b.Logger.errors.UNPREDICTABLE_GAS_LIMIT],Yt=["address","args","errorArgs","errorSignature","method","transaction"];function Qt(e,t){var r={weight:e.weight};return Object.defineProperty(r,"provider",{get:function(){return e.provider}}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function $t(e,t,r){var n=Kt;switch(t){case"getBlockNumber":return function(t){var r=t.map((function(e){return e.result})),n=Vt(t.map((function(e){return e.result})),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber};case"getGasPrice":return function(e){var t=e.map((function(e){return e.result}));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return Vt(e.map((function(e){return e.result})))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=Object(g.shallowCopy)(e)).confirmations=-1,Kt(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=Object(g.shallowCopy)(e)).transactions=e.transactions.map((function(e){return(e=Object(g.shallowCopy)(e)).confirmations=-1,e})),Kt(e))}:function(e){return null==e?null:Kt(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){var n={};r.forEach((function(t){var r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));for(var i=Object.keys(n),o=0;o=t)return a.result}}}(n,e.quorum)}function er(e,t){return Ht(this,void 0,void 0,zt().mark((function r(){var n;return zt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(null!=(n=e.provider).blockNumber&&n.blockNumber>=t||-1===t)){r.next=3;break}return r.abrupt("return",n);case 3:return r.abrupt("return",Object(Ee.poll)((function(){return new Promise((function(r,i){setTimeout((function(){return n.blockNumber>=t?r(n):e.cancelled?r(null):r(void 0)}),0)}))}),{oncePoll:n}));case 4:case"end":return r.stop()}}),r)})))}function tr(e,t,r,n){return Ht(this,void 0,void 0,zt().mark((function i(){var o,a;return zt().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:o=e.provider,i.t0=r,i.next="getBlockNumber"===i.t0||"getGasPrice"===i.t0?4:"getEtherPrice"===i.t0?5:"getBalance"===i.t0||"getTransactionCount"===i.t0||"getCode"===i.t0?8:"getStorageAt"===i.t0?13:"getBlock"===i.t0?18:"call"===i.t0||"estimateGas"===i.t0?23:"getTransaction"===i.t0||"getTransactionReceipt"===i.t0?28:"getLogs"===i.t0?29:35;break;case 4:return i.abrupt("return",o[r]());case 5:if(!o.getEtherPrice){i.next=7;break}return i.abrupt("return",o.getEtherPrice());case 7:return i.abrupt("break",35);case 8:if(!n.blockTag||!Object(m.isHexString)(n.blockTag)){i.next=12;break}return i.next=11,er(e,t);case 11:o=i.sent;case 12:return i.abrupt("return",o[r](n.address,n.blockTag||"latest"));case 13:if(!n.blockTag||!Object(m.isHexString)(n.blockTag)){i.next=17;break}return i.next=16,er(e,t);case 16:o=i.sent;case 17:return i.abrupt("return",o.getStorageAt(n.address,n.position,n.blockTag||"latest"));case 18:if(!n.blockTag||!Object(m.isHexString)(n.blockTag)){i.next=22;break}return i.next=21,er(e,t);case 21:o=i.sent;case 22:return i.abrupt("return",o[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash));case 23:if(!n.blockTag||!Object(m.isHexString)(n.blockTag)){i.next=27;break}return i.next=26,er(e,t);case 26:o=i.sent;case 27:return i.abrupt("return",o[r](n.transaction));case 28:return i.abrupt("return",o[r](n.transactionHash));case 29:if(!((a=n.filter).fromBlock&&Object(m.isHexString)(a.fromBlock)||a.toBlock&&Object(m.isHexString)(a.toBlock))){i.next=34;break}return i.next=33,er(e,t);case 33:o=i.sent;case 34:return i.abrupt("return",o.getLogs(a));case 35:return i.abrupt("return",qt.throwError("unknown method error",b.Logger.errors.UNKNOWN_ERROR,{method:r,params:n}));case 36:case"end":return i.stop()}}),i)})))}var rr=function(e){Object(f.a)(r,e);var t=Object(l.a)(r);function r(e,n){var i;Object(h.a)(this,r),qt.checkNew(this instanceof r?this.constructor:void 0,r),0===e.length&&qt.throwArgumentError("missing providers","providers",e);var o=e.map((function(e,t){if(k.isProvider(e)){var r=Te(e)?2e3:750;return Object.freeze({provider:e,weight:1,stallTimeout:r,priority:1})}var n=Object(g.shallowCopy)(e);null==n.priority&&(n.priority=1),null==n.stallTimeout&&(n.stallTimeout=Te(e)?2e3:750),null==n.weight&&(n.weight=1);var i=n.weight;return(i%1||i>512||i<1)&&qt.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(t,"].weight"),i),Object.freeze(n)})),a=o.reduce((function(e,t){return e+t.weight}),0);null==n?n=a/2:n>a&&qt.throwArgumentError("quorum will always fail; larger than total weight","quorum",n);var u=Jt(o.map((function(e){return e.provider.network})));return null==u&&(u=new Promise((function(e,t){setTimeout((function(){i.detectNetwork().then(e,t)}),0)}))),i=t.call(this,u),Object(g.defineReadOnly)(Object(s.a)(i),"providerConfigs",Object.freeze(o)),Object(g.defineReadOnly)(Object(s.a)(i),"quorum",n),i._highestBlockNumber=-1,i}return Object(d.a)(r,[{key:"detectNetwork",value:function(){return Ht(this,void 0,void 0,zt().mark((function e(){var t;return zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.providerConfigs.map((function(e){return e.provider.getNetwork()})));case 2:return t=e.sent,e.abrupt("return",Jt(t));case 4:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){return Ht(this,void 0,void 0,zt().mark((function r(){var n,i,o,a,s,u,c,f,l,h,d=this;return zt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("sendTransaction"!==e){r.next=13;break}return r.next=3,Promise.all(this.providerConfigs.map((function(e){return e.provider.sendTransaction(t.signedTransaction).then((function(e){return e.hash}),(function(e){return e}))})));case 3:n=r.sent,i=0;case 5:if(!(i=d.quorum)){r.next=22;break}if(void 0===(p=a(h))){r.next=18;break}return s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0})),r.abrupt("return",{v:p});case 18:if(f){r.next=21;break}return r.next=21,Wt(100).getPromise();case 21:f=!1;case 22:if(v=s.reduce((function(e,t){if(!t.done||null==t.error)return e;var r=t.error.code;return Zt.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{}),Object.keys(v).forEach((function(e){var t=v[e];if(!(t.weight=64;){var d=r,p=n,v=i,m=o,g=a,b=s,y=u,w=c,k=void 0,x=void 0,_=void 0,E=void 0,A=void 0;for(x=0;x<16;x++)_=l+4*x,f[x]=(255&e[_])<<24|(255&e[_+1])<<16|(255&e[_+2])<<8|255&e[_+3];for(x=16;x<64;x++)E=((k=f[x-2])>>>17|k<<15)^(k>>>19|k<<13)^k>>>10,A=((k=f[x-15])>>>7|k<<25)^(k>>>18|k<<14)^k>>>3,f[x]=(E+f[x-7]|0)+(A+f[x-16]|0)|0;for(x=0;x<64;x++)E=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&b^~g&y)|0)+(w+(t[x]+f[x]|0)|0)|0,A=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&p^d&v^p&v)|0,w=y,y=b,b=g,g=m+E|0,m=v,v=p,p=d,d=E+A|0;r=r+d|0,n=n+p|0,i=i+v|0,o=o+m|0,a=a+g|0,s=s+b|0,u=u+y|0,c=c+w|0,l+=64,h-=64}}l(e);var h,d=e.length%64,p=e.length/536870912|0,v=e.length<<3,m=d<56?56:120,g=e.slice(e.length-d,e.length);for(g.push(128),h=d+1;h>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(v>>>24&255),g.push(v>>>16&255),g.push(v>>>8&255),g.push(v>>>0&255),l(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function i(e,t,r){e=e.length<=64?e:n(e);var i,o=64+t.length+4,a=new Array(o),s=new Array(64),u=[];for(i=0;i<64;i++)a[i]=54;for(i=0;i=o-4;e--){if(a[e]++,a[e]<=255)return;a[e]=0}}for(;r>=32;)c(),u=u.concat(n(s.concat(n(a)))),r-=32;return r>0&&(c(),u=u.concat(n(s.concat(n(a))).slice(0,r))),u}function o(e,t,r,n,i){var o;for(c(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)u(e,16*o,i,16),s(i,n),c(i,0,e,t+16*o,16);for(o=0;o>>32-t}function s(e,t){c(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=a(t[0]+t[12],7),t[8]^=a(t[4]+t[0],9),t[12]^=a(t[8]+t[4],13),t[0]^=a(t[12]+t[8],18),t[9]^=a(t[5]+t[1],7),t[13]^=a(t[9]+t[5],9),t[1]^=a(t[13]+t[9],13),t[5]^=a(t[1]+t[13],18),t[14]^=a(t[10]+t[6],7),t[2]^=a(t[14]+t[10],9),t[6]^=a(t[2]+t[14],13),t[10]^=a(t[6]+t[2],18),t[3]^=a(t[15]+t[11],7),t[7]^=a(t[3]+t[15],9),t[11]^=a(t[7]+t[3],13),t[15]^=a(t[11]+t[7],18),t[1]^=a(t[0]+t[3],7),t[2]^=a(t[1]+t[0],9),t[3]^=a(t[2]+t[1],13),t[0]^=a(t[3]+t[2],18),t[6]^=a(t[5]+t[4],7),t[7]^=a(t[6]+t[5],9),t[4]^=a(t[7]+t[6],13),t[5]^=a(t[4]+t[7],18),t[11]^=a(t[10]+t[9],7),t[8]^=a(t[11]+t[10],9),t[9]^=a(t[8]+t[11],13),t[10]^=a(t[9]+t[8],18),t[12]^=a(t[15]+t[14],7),t[13]^=a(t[12]+t[15],9),t[14]^=a(t[13]+t[12],13),t[15]^=a(t[14]+t[13],18);for(var n=0;n<16;++n)e[n]+=t[n]}function u(e,t,r,n){for(var i=0;i=256)return!1}return!0}function l(e,t){if("number"!==typeof e||e%1)throw new Error("invalid "+t);return e}function h(e,r,n,a,s,h,d){if(n=l(n,"N"),a=l(a,"r"),s=l(s,"p"),h=l(h,"dkLen"),0===n||0!==(n&n-1))throw new Error("N must be power of 2");if(n>2147483647/128/a)throw new Error("N too large");if(a>2147483647/128/s)throw new Error("r too large");if(!f(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!f(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var p=i(e,r,128*s*a),v=new Uint32Array(32*s*a),m=0;mT&&(r=T);for(var f=0;fT&&(r=T);for(var m=0;m>0&255),p.push(v[L]>>8&255),p.push(v[L]>>16&255),p.push(v[L]>>24&255);var N=i(e,p,h);return d&&d(null,1,N),N}d&&C(t)};if(!d)for(;;){var L=R();if(void 0!=L)return L}R()}var d={scrypt:function(e,t,r,n,i,o,a){return new Promise((function(s,u){var c=0;a&&a(0),h(e,t,r,n,i,o,(function(e,t,r){if(e)u(e);else if(r)a&&1!==c&&a(1),s(new Uint8Array(r));else if(a&&t!==c)return c=t,a(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(h(e,t,r,n,i,o))}};e.exports=d}()}).call(this,r(286).setImmediate)},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://uniswap.org/tokenlist.schema.json","title":"Uniswap Token List","description":"Schema for lists of tokens compatible with the Uniswap Interface","definitions":{"Version":{"type":"object","description":"The version of the list, used in change detection","examples":[{"major":1,"minor":0,"patch":0}],"additionalProperties":false,"properties":{"major":{"type":"integer","description":"The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed.","minimum":0,"examples":[1,2]},"minor":{"type":"integer","description":"The minor version of the list. Must be incremented when tokens are added to the list.","minimum":0,"examples":[0,1]},"patch":{"type":"integer","description":"The patch version of the list. Must be incremented for any changes to the list.","minimum":0,"examples":[0,1]}},"required":["major","minor","patch"]},"TagIdentifier":{"type":"string","description":"The unique identifier of a tag","minLength":1,"maxLength":10,"pattern":"^[\\\\w]+$","examples":["compound","stablecoin"]},"ExtensionIdentifier":{"type":"string","description":"The name of a token extension property","minLength":1,"maxLength":30,"pattern":"^[\\\\w]+$","examples":["color","is_fee_on_transfer","aliases"]},"ExtensionValue":{"anyOf":[{"type":"string","minLength":1,"maxLength":30,"examples":["#00000"]},{"type":"boolean","examples":[true]},{"type":"number","examples":[15]},{"type":"null"}]},"TagDefinition":{"type":"object","description":"Definition of a tag that can be associated with a token via its identifier","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the tag","pattern":"^[ \\\\w]+$","minLength":1,"maxLength":20},"description":{"type":"string","description":"A user-friendly description of the tag","pattern":"^[ \\\\w\\\\.,]+$","minLength":1,"maxLength":200}},"required":["name","description"],"examples":[{"name":"Stablecoin","description":"A token with value pegged to another asset"}]},"TokenInfo":{"type":"object","description":"Metadata for a single token in a token list","additionalProperties":false,"properties":{"chainId":{"type":"integer","description":"The chain ID of the Ethereum network where this token is deployed","minimum":1,"examples":[1,42]},"address":{"type":"string","description":"The checksummed address of the token on the specified chain ID","pattern":"^0x[a-fA-F0-9]{40}$","examples":["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]},"decimals":{"type":"integer","description":"The number of decimals for the token balance","minimum":0,"maximum":255,"examples":[18]},"name":{"type":"string","description":"The name of the token","minLength":1,"maxLength":40,"pattern":"^[ \\\\w.\'+\\\\-%/\xc0-\xd6\xd8-\xf6\xf8-\xff\\\\:]+$","examples":["USD Coin"]},"symbol":{"type":"string","description":"The symbol for the token; must be alphanumeric","pattern":"^[a-zA-Z0-9+\\\\-%/\\\\$]+$","minLength":1,"maxLength":20,"examples":["USDC"]},"logoURI":{"type":"string","description":"A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64","format":"uri","examples":["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]},"tags":{"type":"array","description":"An array of tag identifiers associated with the token; tags are defined at the list level","items":{"$ref":"#/definitions/TagIdentifier"},"maxLength":10,"examples":["stablecoin","compound"]},"extensions":{"type":"object","description":"An object containing any arbitrary or vendor-specific token metadata","propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValue"},"maxProperties":10,"examples":[{"color":"#000000","is_verified_by_me":true}]}},"required":["chainId","address","decimals","name","symbol"]}},"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the token list","minLength":1,"maxLength":20,"pattern":"^[\\\\w ]+$","examples":["My Token List"]},"timestamp":{"type":"string","format":"date-time","description":"The timestamp of this list version; i.e. when this immutable version of the list was created"},"version":{"$ref":"#/definitions/Version"},"tokens":{"type":"array","description":"The list of tokens included in the list","items":{"$ref":"#/definitions/TokenInfo"},"minItems":1,"maxItems":10000},"keywords":{"type":"array","description":"Keywords associated with the contents of the list; may be used in list discoverability","items":{"type":"string","description":"A keyword to describe the contents of the list","minLength":1,"maxLength":20,"pattern":"^[\\\\w ]+$","examples":["compound","lending","personal tokens"]},"maxItems":20,"uniqueItems":true},"tags":{"type":"object","description":"A mapping of tag identifiers to their name and description","propertyNames":{"$ref":"#/definitions/TagIdentifier"},"additionalProperties":{"$ref":"#/definitions/TagDefinition"},"maxProperties":20,"examples":[{"stablecoin":{"name":"Stablecoin","description":"A token with value pegged to another asset"}}]},"logoURI":{"type":"string","description":"A URI for the logo of the token list; prefer SVG or PNG of size 256x256","format":"uri","examples":["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]}},"required":["name","timestamp","version","tokens"]}')},function(e,t,r){"use strict";r.d(t,"a",(function(){return Nr}));var n=r(28),i=r(54),o=r(55),a=r(70),s=r(80),u=r(259),c=r(141);function f(e){var t=Object(u.a)();return function(){var r,n=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Object(c.a)(this,r)}}var l=r(1),h=r.n(l),d={},p=[];function v(e,t){}function m(e,t){}function g(e,t,r){t||d[r]||(e(!1,r),d[r]=!0)}function b(e,t){g(v,e,t)}b.preMessage=function(e){p.push(e)},b.resetWarned=function(){d={}},b.noteOnce=function(e,t){g(m,e,t)};var y=b,w=r(22),k=function(e){var t,r,i=e.className,o=e.included,a=e.vertical,s=e.style,u=e.length,c=e.offset,f=e.reverse;u<0&&(f=!f,u=Math.abs(u),c=100-c);var l=a?(t={},Object(w.a)(t,f?"top":"bottom","".concat(c,"%")),Object(w.a)(t,f?"bottom":"top","auto"),Object(w.a)(t,"height","".concat(u,"%")),t):(r={},Object(w.a)(r,f?"right":"left","".concat(c,"%")),Object(w.a)(r,f?"left":"right","auto"),Object(w.a)(r,"width","".concat(u,"%")),r),d=Object(n.a)(Object(n.a)({},s),l);return o?h.a.createElement("div",{className:i,style:d}):null},x=r(19),_=r(47);function E(e,t){if(null==e)return{};var r,n,i=Object(_.a)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,"`Slider[step]` should be a positive number in order to make Slider[dots] work.");var a=Object.keys(t).map(parseFloat).sort((function(e,t){return e-t}));if(r&&n)for(var s=i;s<=o;s+=n)-1===a.indexOf(s)&&a.push(s);return a}(0,o,a,s,d,l).map((function(e){var o,a="".concat(Math.abs(e-d)/m*100,"%"),s=!u&&e===f||u&&e<=f&&e>=c,l=r?Object(n.a)(Object(n.a)({},p),{},Object(w.a)({},i?"top":"bottom",a)):Object(n.a)(Object(n.a)({},p),{},Object(w.a)({},i?"right":"left",a));s&&(l=Object(n.a)(Object(n.a)({},l),v));var g=L()((o={},Object(w.a)(o,"".concat(t,"-dot"),!0),Object(w.a)(o,"".concat(t,"-dot-active"),s),Object(w.a)(o,"".concat(t,"-dot-reverse"),i),o));return h.a.createElement("span",{className:g,style:l,key:e})}));return h.a.createElement("div",{className:"".concat(t,"-step")},g)},I=r(43),B=function(e){var t=e.className,r=e.vertical,i=e.reverse,o=e.marks,a=e.included,s=e.upperBound,u=e.lowerBound,c=e.max,f=e.min,l=e.onClickLabel,d=Object.keys(o),p=c-f,v=d.map(parseFloat).sort((function(e,t){return e-t})).map((function(e){var c,d=o[e],v="object"===Object(I.a)(d)&&!h.a.isValidElement(d),m=v?d.label:d;if(!m&&0!==m)return null;var g=!a&&e===s||a&&e<=s&&e>=u,b=L()((c={},Object(w.a)(c,"".concat(t,"-text"),!0),Object(w.a)(c,"".concat(t,"-text-active"),g),c)),y=Object(w.a)({marginBottom:"-50%"},i?"top":"bottom","".concat((e-f)/p*100,"%")),k=Object(w.a)({transform:"translateX(".concat(i?"50%":"-50%",")"),msTransform:"translateX(".concat(i?"50%":"-50%",")")},i?"right":"left","".concat((e-f)/p*100,"%")),x=r?y:k,_=v?Object(n.a)(Object(n.a)({},x),d.style):x;return h.a.createElement("span",{className:b,style:_,key:e,onMouseDown:function(t){return l(t,e)},onTouchStart:function(t){return l(t,e)}},m)}));return h.a.createElement("div",{className:t},v)},F=function(e){Object(a.a)(r,e);var t=f(r);function r(){var e;return Object(i.a)(this,r),(e=t.apply(this,arguments)).state={clickFocused:!1},e.setHandleRef=function(t){e.handle=t},e.handleMouseUp=function(){document.activeElement===e.handle&&e.setClickFocus(!0)},e.handleMouseDown=function(t){t.preventDefault(),e.focus()},e.handleBlur=function(){e.setClickFocus(!1)},e.handleKeyDown=function(){e.setClickFocus(!1)},e}return Object(o.a)(r,[{key:"componentDidMount",value:function(){this.onMouseUpListener=C(document,"mouseup",this.handleMouseUp)}},{key:"componentWillUnmount",value:function(){this.onMouseUpListener&&this.onMouseUpListener.remove()}},{key:"setClickFocus",value:function(e){this.setState({clickFocused:e})}},{key:"clickFocus",value:function(){this.setClickFocus(!0),this.focus()}},{key:"focus",value:function(){this.handle.focus()}},{key:"blur",value:function(){this.handle.blur()}},{key:"render",value:function(){var e,t,r,i=this.props,o=i.prefixCls,a=i.vertical,s=i.reverse,u=i.offset,c=i.style,f=i.disabled,l=i.min,d=i.max,p=i.value,v=i.tabIndex,m=i.ariaLabel,g=i.ariaLabelledBy,b=i.ariaValueTextFormatter,y=E(i,["prefixCls","vertical","reverse","offset","style","disabled","min","max","value","tabIndex","ariaLabel","ariaLabelledBy","ariaValueTextFormatter"]),k=L()(this.props.className,Object(w.a)({},"".concat(o,"-handle-click-focused"),this.state.clickFocused)),_=a?(e={},Object(w.a)(e,s?"top":"bottom","".concat(u,"%")),Object(w.a)(e,s?"bottom":"top","auto"),Object(w.a)(e,"transform",s?null:"translateY(+50%)"),e):(t={},Object(w.a)(t,s?"right":"left","".concat(u,"%")),Object(w.a)(t,s?"left":"right","auto"),Object(w.a)(t,"transform","translateX(".concat(s?"+":"-","50%)")),t),A=Object(n.a)(Object(n.a)({},c),_),S=v||0;return(f||null===v)&&(S=null),b&&(r=b(p)),h.a.createElement("div",Object(x.a)({ref:this.setHandleRef,tabIndex:S},y,{className:k,style:A,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,role:"slider","aria-valuemin":l,"aria-valuemax":d,"aria-valuenow":p,"aria-disabled":!!f,"aria-label":m,"aria-labelledby":g,"aria-valuetext":r}))}}]),r}(h.a.Component),D={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=D.F1&&t<=D.F12)return!1;switch(t){case D.ALT:case D.CAPS_LOCK:case D.CONTEXT_MENU:case D.CTRL:case D.DOWN:case D.END:case D.ESC:case D.HOME:case D.INSERT:case D.LEFT:case D.MAC_FF_META:case D.META:case D.NUMLOCK:case D.NUM_CENTER:case D.PAGE_DOWN:case D.PAGE_UP:case D.PAUSE:case D.PRINT_SCREEN:case D.RIGHT:case D.SHIFT:case D.UP:case D.WIN_KEY:case D.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=D.ZERO&&e<=D.NINE)return!0;if(e>=D.NUM_ZERO&&e<=D.NUM_MULTIPLY)return!0;if(e>=D.A&&e<=D.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case D.SPACE:case D.QUESTION_MARK:case D.NUM_PLUS:case D.NUM_MINUS:case D.NUM_PERIOD:case D.NUM_DIVISION:case D.SEMICOLON:case D.DASH:case D.EQUALS:case D.COMMA:case D.PERIOD:case D.SLASH:case D.APOSTROPHE:case D.SINGLE_QUOTE:case D.OPEN_SQUARE_BRACKET:case D.BACKSLASH:case D.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},U=D;function z(e,t){try{return Object.keys(t).some((function(r){return e.target===Object(j.findDOMNode)(t[r])}))}catch(r){return!1}}function H(e,t){var r=t.min,n=t.max;return en}function q(e){return e.touches.length>1||"touchend"===e.type.toLowerCase()&&e.touches.length>0}function G(e,t){var r=t.marks,n=t.step,i=t.min,o=t.max,a=Object.keys(r).map(parseFloat);if(null!==n){var s=Math.pow(10,J(n)),u=Math.floor((o*s-i*s)/(n*s)),c=Math.min((e-i)/n,u),f=Math.round(c)*n+i;a.push(f)}var l=a.map((function(t){return Math.abs(e-t)}));return a[l.indexOf(Math.min.apply(Math,O(l)))]}function J(e){var t=e.toString(),r=0;return t.indexOf(".")>=0&&(r=t.length-t.indexOf(".")-1),r}function V(e,t){return e?t.clientY:t.pageX}function K(e,t){return e?t.touches[0].clientY:t.touches[0].pageX}function X(e,t){var r=t.getBoundingClientRect();return e?r.top+.5*r.height:window.pageXOffset+r.left+.5*r.width}function W(e,t){var r=t.max,n=t.min;return e<=n?n:e>=r?r:e}function Z(e,t){var r=t.step,n=isFinite(G(e,t))?G(e,t):0;return null===r?n:parseFloat(n.toFixed(J(r)))}function Y(e){e.stopPropagation(),e.preventDefault()}function Q(e,t,r){var n="increase";switch(e.keyCode){case U.UP:n=t&&r?"decrease":"increase";break;case U.RIGHT:n=!t&&r?"decrease":"increase";break;case U.DOWN:n=t&&r?"increase":"decrease";break;case U.LEFT:n=!t&&r?"increase":"decrease";break;case U.END:return function(e,t){return t.max};case U.HOME:return function(e,t){return t.min};case U.PAGE_UP:return function(e,t){return e+2*t.step};case U.PAGE_DOWN:return function(e,t){return e-2*t.step};default:return}return function(e,t){return function(e,t,r){var n={increase:function(e,t){return e+t},decrease:function(e,t){return e-t}},i=n[e](Object.keys(r.marks).indexOf(JSON.stringify(t)),1),o=Object.keys(r.marks)[i];return r.step?n[e](t,r.step):Object.keys(r.marks).length&&r.marks[o]?r.marks[o]:t}(n,e,t)}}function $(){}function ee(e){var t;return(t=function(e){Object(a.a)(r,e);var t=f(r);function r(e){var n;Object(i.a)(this,r),(n=t.call(this,e)).onDown=function(e,t){var r=t,i=n.props,o=i.draggableTrack,a=i.vertical,s=n.state.bounds,u=o&&n.positionGetValue&&n.positionGetValue(r)||[],c=z(e,n.handlesRefs);if(n.dragTrack=o&&s.length>=2&&!c&&!u.map((function(e,t){var r=!!t||e>=s[t];return t===u.length-1?e<=s[t]:r})).some((function(e){return!e})),n.dragTrack)n.dragOffset=r,n.startBounds=O(s);else{if(c){var f=X(a,e.target);n.dragOffset=r-f,r=f}else n.dragOffset=0;n.onStart(r)}},n.onMouseDown=function(e){if(0===e.button){n.removeDocumentEvents();var t=V(n.props.vertical,e);n.onDown(e,t),n.addDocumentMouseEvents()}},n.onTouchStart=function(e){if(!q(e)){var t=K(n.props.vertical,e);n.onDown(e,t),n.addDocumentTouchEvents(),Y(e)}},n.onFocus=function(e){var t=n.props,r=t.onFocus,i=t.vertical;if(z(e,n.handlesRefs)&&!n.dragTrack){var o=X(i,e.target);n.dragOffset=0,n.onStart(o),Y(e),r&&r(e)}},n.onBlur=function(e){var t=n.props.onBlur;n.dragTrack||n.onEnd(),t&&t(e)},n.onMouseUp=function(){n.handlesRefs[n.prevMovedHandleIndex]&&n.handlesRefs[n.prevMovedHandleIndex].clickFocus()},n.onMouseMove=function(e){if(n.sliderRef){var t=V(n.props.vertical,e);n.onMove(e,t-n.dragOffset,n.dragTrack,n.startBounds)}else n.onEnd()},n.onTouchMove=function(e){if(!q(e)&&n.sliderRef){var t=K(n.props.vertical,e);n.onMove(e,t-n.dragOffset,n.dragTrack,n.startBounds)}else n.onEnd()},n.onKeyDown=function(e){n.sliderRef&&z(e,n.handlesRefs)&&n.onKeyboard(e)},n.onClickMarkLabel=function(e,t){e.stopPropagation(),n.onChange({value:t}),n.setState({value:t},(function(){return n.onEnd(!0)}))},n.saveSlider=function(e){n.sliderRef=e};var o=e.step,a=e.max,s=e.min,u=!isFinite(a-s)||(a-s)%o===0;return y(!o||Math.floor(o)!==o||u,"Slider[max] - Slider[min] (".concat(a-s,") should be a multiple of Slider[step] (").concat(o,")")),n.handlesRefs={},n}return Object(o.a)(r,[{key:"componentDidMount",value:function(){this.document=this.sliderRef&&this.sliderRef.ownerDocument;var e=this.props,t=e.autoFocus,r=e.disabled;t&&!r&&this.focus()}},{key:"componentWillUnmount",value:function(){P(Object(s.a)(r.prototype),"componentWillUnmount",this)&&P(Object(s.a)(r.prototype),"componentWillUnmount",this).call(this),this.removeDocumentEvents()}},{key:"getSliderStart",value:function(){var e=this.sliderRef,t=this.props,r=t.vertical,n=t.reverse,i=e.getBoundingClientRect();return r?n?i.bottom:i.top:window.pageXOffset+(n?i.right:i.left)}},{key:"getSliderLength",value:function(){var e=this.sliderRef;if(!e)return 0;var t=e.getBoundingClientRect();return this.props.vertical?t.height:t.width}},{key:"addDocumentTouchEvents",value:function(){this.onTouchMoveListener=C(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=C(this.document,"touchend",this.onEnd)}},{key:"addDocumentMouseEvents",value:function(){this.onMouseMoveListener=C(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=C(this.document,"mouseup",this.onEnd)}},{key:"removeDocumentEvents",value:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()}},{key:"focus",value:function(){var e;this.props.disabled||null===(e=this.handlesRefs[0])||void 0===e||e.focus()}},{key:"blur",value:function(){var e=this;this.props.disabled||Object.keys(this.handlesRefs).forEach((function(t){var r,n;null===(r=e.handlesRefs[t])||void 0===r||null===(n=r.blur)||void 0===n||n.call(r)}))}},{key:"calcValue",value:function(e){var t=this.props,r=t.vertical,n=t.min,i=t.max,o=Math.abs(Math.max(e,0)/this.getSliderLength());return r?(1-o)*(i-n)+n:o*(i-n)+n}},{key:"calcValueByPos",value:function(e){var t=(this.props.reverse?-1:1)*(e-this.getSliderStart());return this.trimAlignValue(this.calcValue(t))}},{key:"calcOffset",value:function(e){var t=this.props,r=t.min,n=(e-r)/(t.max-r);return Math.max(0,100*n)}},{key:"saveHandle",value:function(e,t){this.handlesRefs[e]=t}},{key:"render",value:function(){var e,t=this.props,i=t.prefixCls,o=t.className,a=t.marks,u=t.dots,c=t.step,f=t.included,l=t.disabled,d=t.vertical,p=t.reverse,v=t.min,m=t.max,g=t.children,b=t.maximumTrackStyle,y=t.style,k=t.railStyle,x=t.dotStyle,_=t.activeDotStyle,E=P(Object(s.a)(r.prototype),"render",this).call(this),A=E.tracks,S=E.handles,O=L()(i,(e={},Object(w.a)(e,"".concat(i,"-with-marks"),Object.keys(a).length),Object(w.a)(e,"".concat(i,"-disabled"),l),Object(w.a)(e,"".concat(i,"-vertical"),d),Object(w.a)(e,o,o),e));return h.a.createElement("div",{ref:this.saveSlider,className:O,onTouchStart:l?$:this.onTouchStart,onMouseDown:l?$:this.onMouseDown,onMouseUp:l?$:this.onMouseUp,onKeyDown:l?$:this.onKeyDown,onFocus:l?$:this.onFocus,onBlur:l?$:this.onBlur,style:y},h.a.createElement("div",{className:"".concat(i,"-rail"),style:Object(n.a)(Object(n.a)({},b),k)}),A,h.a.createElement(N,{prefixCls:i,vertical:d,reverse:p,marks:a,dots:u,step:c,included:f,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:v,dotStyle:x,activeDotStyle:_}),S,h.a.createElement(B,{className:"".concat(i,"-mark"),onClickLabel:l?$:this.onClickMarkLabel,vertical:d,marks:a,included:f,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:v,reverse:p}),g)}}]),r}(e)).displayName="ComponentEnhancer(".concat(e.displayName,")"),t.defaultProps=Object(n.a)(Object(n.a)({},e.defaultProps),{},{prefixCls:"rc-slider",className:"",min:0,max:100,step:1,marks:{},handle:function(e){var t=e.index,r=E(e,["index"]);return delete r.dragging,null===r.value?null:h.a.createElement(F,Object(x.a)({},r,{key:t}))},onBeforeChange:$,onChange:$,onAfterChange:$,included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),t}var te=ee(function(e){Object(a.a)(r,e);var t=f(r);function r(e){var n;Object(i.a)(this,r),(n=t.call(this,e)).positionGetValue=function(e){return[]},n.onEnd=function(e){var t=n.state.dragging;n.removeDocumentEvents(),(t||e)&&n.props.onAfterChange(n.getValue()),n.setState({dragging:!1})};var o=void 0!==e.defaultValue?e.defaultValue:e.min,a=void 0!==e.value?e.value:o;return n.state={value:n.trimAlignValue(a),dragging:!1},y(!("minimumTrackStyle"in e),"minimumTrackStyle will be deprecated, please use trackStyle instead."),y(!("maximumTrackStyle"in e),"maximumTrackStyle will be deprecated, please use railStyle instead."),n}return Object(o.a)(r,[{key:"calcValueByPos",value:function(e){return 0}},{key:"calcOffset",value:function(e){return 0}},{key:"saveHandle",value:function(e,t){}},{key:"removeDocumentEvents",value:function(){}},{key:"componentDidUpdate",value:function(e,t){var r=this.props,n=r.min,i=r.max,o=r.value,a=r.onChange;if("min"in this.props||"max"in this.props){var s=void 0!==o?o:t.value,u=this.trimAlignValue(s,this.props);u!==t.value&&(this.setState({value:u}),n===e.min&&i===e.max||!H(s,this.props)||a(u))}}},{key:"onChange",value:function(e){var t=this.props,r=!("value"in t),i=e.value>this.props.max?Object(n.a)(Object(n.a)({},e),{},{value:this.props.max}):e;r&&this.setState(i);var o=i.value;t.onChange(o)}},{key:"onStart",value:function(e){this.setState({dragging:!0});var t=this.props,r=this.getValue();t.onBeforeChange(r);var n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e,n!==r&&(this.prevMovedHandleIndex=0,this.onChange({value:n}))}},{key:"onMove",value:function(e,t){Y(e);var r=this.state.value,n=this.calcValueByPos(t);n!==r&&this.onChange({value:n})}},{key:"onKeyboard",value:function(e){var t=this.props,r=t.reverse,n=Q(e,t.vertical,r);if(n){Y(e);var i=this.state.value,o=n(i,this.props),a=this.trimAlignValue(o);if(a===i)return;this.onChange({value:a}),this.props.onAfterChange(a),this.onEnd()}}},{key:"getValue",value:function(){return this.state.value}},{key:"getLowerBound",value:function(){var e=this.props.startPoint||this.props.min;return this.state.value>e?e:this.state.value}},{key:"getUpperBound",value:function(){return this.state.value1&&void 0!==arguments[1]?arguments[1]:{};if(null===e)return null;var r=Object(n.a)(Object(n.a)({},this.props),t),i=W(e,r);return Z(i,r)}},{key:"render",value:function(){var e=this,t=this.props,r=t.prefixCls,i=t.vertical,o=t.included,a=t.disabled,s=t.minimumTrackStyle,u=t.trackStyle,c=t.handleStyle,f=t.tabIndex,l=t.ariaLabelForHandle,d=t.ariaLabelledByForHandle,p=t.ariaValueTextFormatterForHandle,v=t.min,m=t.max,g=t.startPoint,b=t.reverse,y=t.handle,w=this.state,x=w.value,_=w.dragging,E=this.calcOffset(x),A=y({className:"".concat(r,"-handle"),prefixCls:r,vertical:i,offset:E,value:x,dragging:_,disabled:a,min:v,max:m,reverse:b,index:0,tabIndex:f,ariaLabel:l,ariaLabelledBy:d,ariaValueTextFormatter:p,style:c[0]||c,ref:function(t){return e.saveHandle(0,t)}}),S=void 0!==g?this.calcOffset(g):0,O=u[0]||u;return{tracks:h.a.createElement(k,{className:"".concat(r,"-track"),vertical:i,included:o,offset:S,reverse:b,length:E-S,style:Object(n.a)(Object(n.a)({},s),O)}),handles:A}}}]),r}(h.a.Component)),re=function(e){var t=e.value,r=e.handle,n=e.bounds,i=e.props,o=i.allowCross,a=i.pushable,s=Number(a),u=W(t,i),c=u;return o||null==r||void 0===n||(r>0&&u<=n[r-1]+s&&(c=n[r-1]+s),r=n[r+1]-s&&(c=n[r+1]-s)),Z(c,i)},ne=function(e){Object(a.a)(r,e);var t=f(r);function r(e){var n;Object(i.a)(this,r),(n=t.call(this,e)).positionGetValue=function(e){var t=n.getValue(),r=n.calcValueByPos(e),i=n.getClosestBound(r),o=n.getBoundNeedMoving(r,i);if(r===t[o])return null;var a=O(t);return a[o]=r,a},n.onEnd=function(e){var t=n.state.handle;n.removeDocumentEvents(),t||(n.dragTrack=!1),(null!==t||e)&&n.props.onAfterChange(n.getValue()),n.setState({handle:null})};var o=e.count,a=e.min,s=e.max,u=Array.apply(void 0,O(Array(o+1))).map((function(){return a})),c="defaultValue"in e?e.defaultValue:u,f=(void 0!==e.value?e.value:c).map((function(t,r){return re({value:t,handle:r,props:e})})),l=f[0]===s?0:f.length-1;return n.state={handle:null,recent:l,bounds:f},n}return Object(o.a)(r,[{key:"calcValueByPos",value:function(e){return 0}},{key:"getSliderLength",value:function(){return 0}},{key:"calcOffset",value:function(e){return 0}},{key:"saveHandle",value:function(e,t){}},{key:"removeDocumentEvents",value:function(){}},{key:"componentDidUpdate",value:function(e,t){var r=this,n=this.props,i=n.onChange,o=n.value,a=n.min,s=n.max;if(("min"in this.props||"max"in this.props)&&(a!==e.min||s!==e.max)){var u=o||t.bounds;if(u.some((function(e){return H(e,r.props)})))i(u.map((function(e){return W(e,r.props)})))}}},{key:"onChange",value:function(e){var t=this.props;if(!("value"in t))this.setState(e);else{var r={};["handle","recent"].forEach((function(t){void 0!==e[t]&&(r[t]=e[t])})),Object.keys(r).length&&this.setState(r)}var i=Object(n.a)(Object(n.a)({},this.state),e).bounds;t.onChange(i)}},{key:"onStart",value:function(e){var t=this.props,r=this.state,n=this.getValue();t.onBeforeChange(n);var i=this.calcValueByPos(e);this.startValue=i,this.startPosition=e;var o=this.getClosestBound(i);if(this.prevMovedHandleIndex=this.getBoundNeedMoving(i,o),this.setState({handle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex}),i!==n[this.prevMovedHandleIndex]){var a=O(r.bounds);a[this.prevMovedHandleIndex]=i,this.onChange({bounds:a})}}},{key:"onMove",value:function(e,t,r,n){Y(e);var i=this.state,o=this.props,a=o.max||100,s=o.min||0;if(r){var u=o.vertical?-t:t;u=o.reverse?-u:u;var c=a-Math.max.apply(Math,O(n)),f=s-Math.min.apply(Math,O(n)),l=Math.min(Math.max(u/(this.getSliderLength()/(a-s)),f),c),h=n.map((function(e){return Math.floor(Math.max(Math.min(e+l,a),s))}));i.bounds.map((function(e,t){return e===h[t]})).some((function(e){return!e}))&&this.onChange({bounds:h})}else{var d=this.calcValueByPos(t);d!==i.bounds[i.handle]&&this.moveTo(d)}}},{key:"onKeyboard",value:function(e){var t=this.props,r=t.reverse,n=Q(e,t.vertical,r);if(n){Y(e);var i=this.state,o=this.props,a=i.bounds,s=i.handle,u=a[null===s?i.recent:s],c=n(u,o),f=re({value:c,handle:s,bounds:i.bounds,props:o});if(f===u)return;this.moveTo(f,!0)}}},{key:"getValue",value:function(){return this.state.bounds}},{key:"getClosestBound",value:function(e){for(var t=this.state.bounds,r=0,n=1;n=t[n]&&(r=n);return Math.abs(t[r+1]-e)=n.length||i<0)return!1;var o=t+r,a=n[i],s=this.props.pushable,u=Number(s),c=r*(e[o]-a);return!!this.pushHandle(e,o,r,u-c)&&(e[t]=a,!0)}},{key:"trimAlignValue",value:function(e){var t=this.state,r=t.handle,n=t.bounds;return re({value:e,handle:r,bounds:n,props:this.props})}},{key:"render",value:function(){var e=this,t=this.state,r=t.handle,n=t.bounds,i=this.props,o=i.prefixCls,a=i.vertical,s=i.included,u=i.disabled,c=i.min,f=i.max,l=i.reverse,d=i.handle,p=i.trackStyle,v=i.handleStyle,m=i.tabIndex,g=i.ariaLabelGroupForHandles,b=i.ariaLabelledByGroupForHandles,y=i.ariaValueTextFormatterGroupForHandles,x=n.map((function(t){return e.calcOffset(t)})),_="".concat(o,"-handle"),E=n.map((function(t,n){var i,s=m[n]||0;(u||null===m[n])&&(s=null);var h=r===n;return d({className:L()((i={},Object(w.a)(i,_,!0),Object(w.a)(i,"".concat(_,"-").concat(n+1),!0),Object(w.a)(i,"".concat(_,"-dragging"),h),i)),prefixCls:o,vertical:a,dragging:h,offset:x[n],value:t,index:n,tabIndex:s,min:c,max:f,reverse:l,disabled:u,style:v[n],ref:function(t){return e.saveHandle(n,t)},ariaLabel:g[n],ariaLabelledBy:b[n],ariaValueTextFormatter:y[n]})}));return{tracks:n.slice(0,-1).map((function(e,t){var r,n=t+1,i=L()((r={},Object(w.a)(r,"".concat(o,"-track"),!0),Object(w.a)(r,"".concat(o,"-track-").concat(n),!0),r));return h.a.createElement(k,{className:i,vertical:a,reverse:l,included:s,offset:x[n-1],length:x[n]-x[n-1],style:p[t],key:n})})),handles:E}}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(!("value"in e||"min"in e||"max"in e))return null;var r=e.value||t.bounds,i=r.map((function(r,n){return re({value:r,handle:n,bounds:t.bounds,props:e})}));if(t.bounds.length===i.length){if(i.every((function(e,r){return e===t.bounds[r]})))return null}else i=r.map((function(t,r){return re({value:t,handle:r,props:e})}));return Object(n.a)(Object(n.a)({},t),{},{bounds:i})}}]),r}(h.a.Component);ne.displayName="Range",ne.defaultProps={count:1,allowCross:!0,pushable:!1,draggableTrack:!1,tabIndex:[],ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]};var ie=ee(ne),oe=r(30),ae=function(e){return+setTimeout(e,16)},se=function(e){return clearTimeout(e)};"undefined"!==typeof window&&"requestAnimationFrame"in window&&(ae=function(e){return window.requestAnimationFrame(e)},se=function(e){return window.cancelAnimationFrame(e)});var ue=0,ce=new Map;function fe(e){ce.delete(e)}var le=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=ue+=1;function n(t){if(0===t)fe(r),e();else{var i=ae((function(){n(t-1)}));ce.set(r,i)}}return n(t),r};le.cancel=function(e){var t=ce.get(e);return fe(t),se(t)};var he=le;function de(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}function pe(e){return function(e){return e instanceof HTMLElement||e instanceof SVGElement}(e)?e:e instanceof h.a.Component?T.a.findDOMNode(e):null}var ve=r(122);function me(e,t){"function"===typeof e?e(t):"object"===Object(I.a)(e)&&e&&"current"in e&&(e.current=t)}function ge(){for(var e=arguments.length,t=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:2;t();var o=he((function(){i<=1?n({isCanceled:function(){return o!==e.current}}):r(n,i-1)}));e.current=o},t]}(),2),s=a[0],u=a[1];var c=t?Ue:De;return Fe((function(){if("none"!==i&&"end"!==i){var e=c.indexOf(i),t=c[e+1],n=r(i);!1===n?o(t,!0):t&&s((function(e){function r(){e.isCanceled()||o(t,!0)}!0===n?r():Promise.resolve(n).then(r)}))}}),[e,i]),l.useEffect((function(){return function(){u()}}),[]),[function(){o("prepare",!0)},i]};function qe(e,t,r,i){var o=i.motionEnter,a=void 0===o||o,s=i.motionAppear,u=void 0===s||s,c=i.motionLeave,f=void 0===c||c,h=i.motionDeadline,d=i.motionLeaveImmediately,p=i.onAppearPrepare,v=i.onEnterPrepare,m=i.onLeavePrepare,g=i.onAppearStart,b=i.onEnterStart,y=i.onLeaveStart,k=i.onAppearActive,x=i.onEnterActive,_=i.onLeaveActive,E=i.onAppearEnd,A=i.onEnterEnd,S=i.onLeaveEnd,O=i.onVisibleChanged,M=xe(Ae(),2),P=M[0],j=M[1],T=xe(Ae("none"),2),C=T[0],R=T[1],L=xe(Ae(null),2),N=L[0],I=L[1],B=Object(l.useRef)(!1),F=Object(l.useRef)(null);function D(){return r()}var U=Object(l.useRef)(!1);function z(){R("none",!0),I(null,!0)}function H(e){var t=D();if(!e||e.deadline||e.target===t){var r,n=U.current;"appear"===C&&n?r=null===E||void 0===E?void 0:E(t,e):"enter"===C&&n?r=null===A||void 0===A?void 0:A(t,e):"leave"===C&&n&&(r=null===S||void 0===S?void 0:S(t,e)),"none"!==C&&n&&!1!==r&&z()}}var q=xe(function(e){var t=Object(l.useRef)(),r=Object(l.useRef)(e);r.current=e;var n=l.useCallback((function(e){r.current(e)}),[]);function i(e){e&&(e.removeEventListener(Ie,n),e.removeEventListener(Ne,n))}return l.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(Ie,n),e.addEventListener(Ne,n),t.current=e)},i]}(H),1)[0],G=function(e){var t,r,n;switch(e){case"appear":return t={},Object(w.a)(t,"prepare",p),Object(w.a)(t,"start",g),Object(w.a)(t,"active",k),t;case"enter":return r={},Object(w.a)(r,"prepare",v),Object(w.a)(r,"start",b),Object(w.a)(r,"active",x),r;case"leave":return n={},Object(w.a)(n,"prepare",m),Object(w.a)(n,"start",y),Object(w.a)(n,"active",_),n;default:return{}}},J=l.useMemo((function(){return G(C)}),[C]),V=xe(He(C,!e,(function(e){if("prepare"===e){var t=J.prepare;return!!t&&t(D())}var r;X in J&&I((null===(r=J[X])||void 0===r?void 0:r.call(J,D(),null))||null);return"active"===X&&(q(D()),h>0&&(clearTimeout(F.current),F.current=setTimeout((function(){H({deadline:!0})}),h))),"prepared"===X&&z(),!0})),2),K=V[0],X=V[1],W=ze(X);U.current=W,Fe((function(){j(t);var r,n=B.current;B.current=!0,!n&&t&&u&&(r="appear"),n&&t&&a&&(r="enter"),(n&&!t&&f||!n&&d&&!t&&f)&&(r="leave");var i=G(r);r&&(e||i.prepare)?(R(r),K()):R("none")}),[t]),Object(l.useEffect)((function(){("appear"===C&&!u||"enter"===C&&!a||"leave"===C&&!f)&&R("none")}),[u,a,f]),Object(l.useEffect)((function(){return function(){B.current=!1,clearTimeout(F.current)}}),[]);var Z=l.useRef(!1);Object(l.useEffect)((function(){P&&(Z.current=!0),void 0!==P&&"none"===C&&((Z.current||P)&&(null===O||void 0===O||O(P)),Z.current=!0)}),[P,C]);var Y=N;return J.prepare&&"start"===X&&(Y=Object(n.a)({transition:"none"},Y)),[C,X,Y,null!==P&&void 0!==P?P:t]}var Ge=function(e){var t=e;"object"===Object(I.a)(e)&&(t=e.transitionSupport);var r=l.forwardRef((function(e,r){var i=e.visible,o=void 0===i||i,a=e.removeOnLeave,s=void 0===a||a,u=e.forceRender,c=e.children,f=e.motionName,h=e.leavedClassName,d=e.eventProps,p=function(e,r){return!(!e.motionName||!t||!1===r)}(e,l.useContext(_e).motion),v=Object(l.useRef)(),m=Object(l.useRef)();var g=xe(qe(p,o,(function(){try{return v.current instanceof HTMLElement?v.current:pe(m.current)}catch(e){return null}}),e),4),b=g[0],y=g[1],k=g[2],x=g[3],_=l.useRef(x);x&&(_.current=!0);var E,A=l.useCallback((function(e){v.current=e,me(r,e)}),[r]),S=Object(n.a)(Object(n.a)({},d),{},{visible:o});if(c)if("none"===b)E=x?c(Object(n.a)({},S),A):!s&&_.current&&h?c(Object(n.a)(Object(n.a)({},S),{},{className:h}),A):u||!s&&!h?c(Object(n.a)(Object(n.a)({},S),{},{style:{display:"none"}}),A):null;else{var O,M;"prepare"===y?M="prepare":ze(y)?M="active":"start"===y&&(M="start");var P=Be(f,"".concat(b,"-").concat(M));E=c(Object(n.a)(Object(n.a)({},S),{},{className:L()(Be(f,b),(O={},Object(w.a)(O,P,P&&M),Object(w.a)(O,f,"string"===typeof f),O)),style:k}),A)}else E=null;l.isValidElement(E)&&be(E)&&(E.ref||(E=l.cloneElement(E,{ref:A})));return l.createElement(Ee,{ref:m},E)}));return r.displayName="CSSMotion",r}(Le);function Je(e){var t;return t=e&&"object"===Object(I.a)(e)&&"key"in e?e:{key:e},Object(n.a)(Object(n.a)({},t),{},{key:String(t.key)})}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Je)}function Ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[],i=0,o=t.length,a=Ve(e),s=Ve(t);a.forEach((function(e){for(var t=!1,a=i;a1}));return c.forEach((function(e){(r=r.filter((function(t){var r=t.key,n=t.status;return r!==e||"remove"!==n}))).forEach((function(t){t.key===e&&(t.status="keep")}))})),r}var Xe=["component","children","onVisibleChanged","onAllRemoved"],We=["status"],Ze=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ge,r=function(e){Object(a.a)(s,e);var r=f(s);function s(){var e;Object(i.a)(this,s);for(var t=arguments.length,o=new Array(t),a=0;a=0&&r.left>=0&&r.bottom>r.top&&r.right>r.left?r:null}function Gt(e){var t,r,n;if(Dt.isWindow(e)||9===e.nodeType){var i=Dt.getWindow(e);t={left:Dt.getWindowScrollLeft(i),top:Dt.getWindowScrollTop(i)},r=Dt.viewportWidth(i),n=Dt.viewportHeight(i)}else t=Dt.offset(e),r=Dt.outerWidth(e),n=Dt.outerHeight(e);return t.width=r,t.height=n,t}function Jt(e,t){var r=t.charAt(0),n=t.charAt(1),i=e.width,o=e.height,a=e.left,s=e.top;return"c"===r?s+=o/2:"b"===r&&(s+=o),"c"===n?a+=i/2:"r"===n&&(a+=i),{left:a,top:s}}function Vt(e,t,r,n,i){var o=Jt(t,r[1]),a=Jt(e,r[0]),s=[a.left-o.left,a.top-o.top];return{left:Math.round(e.left-s[0]+n[0]-i[0]),top:Math.round(e.top-s[1]+n[1]-i[1])}}function Kt(e,t,r){return e.leftr.right}function Xt(e,t,r){return e.topr.bottom}function Wt(e,t,r){var n=[];return Dt.each(e,(function(e){n.push(e.replace(t,(function(e){return r[e]})))})),n}function Zt(e,t){return e[t]=-e[t],e}function Yt(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function Qt(e,t){e[0]=Yt(e[0],t.width),e[1]=Yt(e[1],t.height)}function $t(e,t,r,n){var i=r.points,o=r.offset||[0,0],a=r.targetOffset||[0,0],s=r.overflow,u=r.source||e;o=[].concat(o),a=[].concat(a);var c={},f=0,l=qt(u,!(!(s=s||{})||!s.alwaysByViewport)),h=Gt(u);Qt(o,h),Qt(a,t);var d=Vt(h,t,i,o,a),p=Dt.merge(h,d);if(l&&(s.adjustX||s.adjustY)&&n){if(s.adjustX&&Kt(d,h,l)){var v=Wt(i,/[lr]/gi,{l:"r",r:"l"}),m=Zt(o,0),g=Zt(a,0);(function(e,t,r){return e.left>r.right||e.left+t.widthr.bottom||e.top+t.height=r.left&&i.left+o.width>r.right&&(o.width-=i.left+o.width-r.right),n.adjustX&&i.left+o.width>r.right&&(i.left=Math.max(r.right-o.width,r.left)),n.adjustY&&i.top=r.top&&i.top+o.height>r.bottom&&(o.height-=i.top+o.height-r.bottom),n.adjustY&&i.top+o.height>r.bottom&&(i.top=Math.max(r.bottom-o.height,r.top)),Dt.mix(i,o)}(d,h,l,c))}return p.width!==h.width&&Dt.css(u,"width",Dt.width(u)+p.width-h.width),p.height!==h.height&&Dt.css(u,"height",Dt.height(u)+p.height-h.height),Dt.offset(u,{left:p.left,top:p.top},{useCssRight:r.useCssRight,useCssBottom:r.useCssBottom,useCssTransform:r.useCssTransform,ignoreShake:r.ignoreShake}),{points:i,offset:o,targetOffset:a,overflow:c}}function er(e,t,r){var n=r.target||t;return $t(e,Gt(n),r,!function(e,t){var r=qt(e,t),n=Gt(e);return!r||n.left+n.width<=r.left||n.top+n.height<=r.top||n.left>=r.right||n.top>=r.bottom}(n,r.overflow&&r.overflow.alwaysByViewport))}er.__getOffsetParent=zt,er.__getVisibleRectForElement=qt;var tr=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=new Set;function i(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=n.has(e);if(y(!a,"Warning: There may be circular references"),a)return!1;if(e===t)return!0;if(r&&o>1)return!1;n.add(e);var s=o+1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var u=0;u=0&&n<=s+c&&i>=0&&i<=u+f,d=[r.points[0],"cc"];return $t(e,l,rt(rt({},r),{},{points:d}),h)}(o,u,n)),function(e,t){e!==document.activeElement&&de(t,e)&&"function"===typeof e.focus&&e.focus()}(c,o),i&&a&&i(o,a),!0}return!1}),c),2),m=v[0],g=v[1],b=xe(h.a.useState(),2),y=b[0],w=b[1],k=xe(h.a.useState(),2),x=k[0],_=k[1];return nr((function(){w(ar(i)),_(sr(i))})),h.a.useEffect((function(){var e,t;f.current.element===y&&((e=f.current.point)===(t=x)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))&&tr(f.current.align,o)||m()})),h.a.useEffect((function(){return or(l.current,m)}),[l.current]),h.a.useEffect((function(){return or(y,m)}),[y]),h.a.useEffect((function(){n?g():m()}),[n]),h.a.useEffect((function(){if(s)return C(window,"resize",m).remove}),[s]),h.a.useEffect((function(){return function(){g()}}),[]),h.a.useImperativeHandle(t,(function(){return{forceAlign:function(){return m(!0)}}})),h.a.isValidElement(d)&&(d=h.a.cloneElement(d,{ref:ge(d.ref,l)})),d},cr=h.a.forwardRef(ur);cr.displayName="Align";var fr=cr;function lr(){lr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new A(i||[]);return n(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var l={};function h(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,o)&&(v=g);var b=p.prototype=h.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;n(this,"_invoke",{value:function(n,o){function a(){return new t((function(i,a){!function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Object(I.a)(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(n,o,i,a)}))}return i=i?i.then(a,a):a()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}function hr(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}function dr(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){hr(o,n,i,a,s,"next",e)}function s(e){hr(o,n,i,a,s,"throw",e)}a(void 0)}))}}var pr=["measure","alignPre","align",null,"motion"],vr=l.forwardRef((function(e,t){var r=e.visible,i=e.prefixCls,o=e.className,a=e.style,s=e.children,u=e.zIndex,c=e.stretch,f=e.destroyPopupOnHide,h=e.forceRender,d=e.align,p=e.point,v=e.getRootDomNode,m=e.getClassNameFromAlign,g=e.onAlign,b=e.onMouseEnter,y=e.onMouseLeave,w=e.onMouseDown,k=e.onTouchStart,_=e.onClick,E=Object(l.useRef)(),A=Object(l.useRef)(),S=xe(Object(l.useState)(),2),O=S[0],M=S[1],P=function(e){var t=xe(l.useState({width:0,height:0}),2),r=t[0],n=t[1];return[l.useMemo((function(){var t={};if(e){var n=r.width,i=r.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){var t=e.offsetWidth,r=e.offsetHeight,i=e.getBoundingClientRect(),o=i.width,a=i.height;Math.abs(t-o)<1&&Math.abs(r-a)<1&&(t=o,r=a),n({width:t,height:r})}]}(c),j=xe(P,2),T=j[0],C=j[1];var R=function(e,t){var r=xe(Ae(null),2),n=r[0],i=r[1],o=Object(l.useRef)();function a(e){i(e,!0)}function s(){he.cancel(o.current)}return Object(l.useEffect)((function(){a("measure")}),[e]),Object(l.useEffect)((function(){switch(n){case"measure":t()}n&&(o.current=he(dr(lr().mark((function e(){var t,r;return lr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=pr.indexOf(n),(r=pr[t+1])&&-1!==t&&a(r);case 3:case"end":return e.stop()}}),e)})))))}),[n]),Object(l.useEffect)((function(){return function(){s()}}),[]),[n,function(e){s(),o.current=he((function(){a((function(e){switch(n){case"align":return"motion";case"motion":return"stable"}return e})),null===e||void 0===e||e()}))}]}(r,(function(){c&&C(v())})),N=xe(R,2),I=N[0],B=N[1],F=xe(Object(l.useState)(0),2),D=F[0],U=F[1],z=Object(l.useRef)();function H(){var e;null===(e=E.current)||void 0===e||e.forceAlign()}function q(e,t){var r=m(t);O!==r&&M(r),U((function(e){return e+1})),"align"===I&&(null===g||void 0===g||g(e,t))}nr((function(){"alignPre"===I&&U(0)}),[I]),nr((function(){"align"===I&&(D<3?H():B((function(){var e;null===(e=z.current)||void 0===e||e.call(z)})))}),[D]);var G=Object(n.a)({},$e(e));function J(){return new Promise((function(e){z.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=G[e];G[e]=function(e,r){return B(),null===t||void 0===t?void 0:t(e,r)}})),l.useEffect((function(){G.motionName||"motion"!==I||B()}),[G.motionName,I]),l.useImperativeHandle(t,(function(){return{forceAlign:H,getElement:function(){return A.current}}}));var V=Object(n.a)(Object(n.a)({},T),{},{zIndex:u,opacity:"motion"!==I&&"stable"!==I&&r?0:void 0,pointerEvents:r||"stable"===I?void 0:"none"},a),K=!0;null===d||void 0===d||!d.points||"align"!==I&&"stable"!==I||(K=!1);var X=s;return l.Children.count(s)>1&&(X=l.createElement("div",{className:"".concat(i,"-content")},s)),l.createElement(Qe,Object(x.a)({visible:r,ref:A,leavedClassName:"".concat(i,"-hidden")},G,{onAppearPrepare:J,onEnterPrepare:J,removeOnLeave:f,forceRender:h}),(function(e,t){var r=e.className,a=e.style,s=L()(i,o,O,r);return l.createElement(fr,{target:p||v,key:"popup",ref:E,monitorWindowResize:!0,disabled:K,align:d,onAlign:q},l.createElement("div",{ref:t,className:s,onMouseEnter:b,onMouseLeave:y,onMouseDownCapture:w,onTouchStartCapture:k,onClick:_,style:Object(n.a)(Object(n.a)({},a),V)},X))}))}));vr.displayName="PopupInner";var mr=vr,gr=l.forwardRef((function(e,t){var r=e.prefixCls,i=e.visible,o=e.zIndex,a=e.children,s=e.mobile,u=(s=void 0===s?{}:s).popupClassName,c=s.popupStyle,f=s.popupMotion,h=void 0===f?{}:f,d=s.popupRender,p=e.onClick,v=l.useRef();l.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return v.current}}}));var m=Object(n.a)({zIndex:o},c),g=a;return l.Children.count(a)>1&&(g=l.createElement("div",{className:"".concat(r,"-content")},a)),d&&(g=d(g)),l.createElement(Qe,Object(x.a)({visible:i,ref:v,removeOnLeave:!0},h),(function(e,t){var i=e.className,o=e.style,a=L()(r,u,i);return l.createElement("div",{ref:t,className:a,onClick:p,style:Object(n.a)(Object(n.a)({},o),m)},g)}))}));gr.displayName="MobilePopupInner";var br=gr,yr=["visible","mobile"],wr=l.forwardRef((function(e,t){var r=e.visible,i=e.mobile,o=E(e,yr),a=xe(Object(l.useState)(r),2),s=a[0],u=a[1],c=xe(Object(l.useState)(!1),2),f=c[0],h=c[1],d=Object(n.a)(Object(n.a)({},o),{},{visible:s});Object(l.useEffect)((function(){u(r),r&&i&&h(function(){if("undefined"===typeof navigator||"undefined"===typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null===e||void 0===e?void 0:e.substr(0,4))}())}),[r,i]);var p=f?l.createElement(br,Object(x.a)({},d,{mobile:i,ref:t})):l.createElement(mr,Object(x.a)({},d,{ref:t}));return l.createElement("div",null,l.createElement(et,d),p)}));wr.displayName="Popup";var kr=wr,xr=l.createContext(null);function _r(){}function Er(){return""}function Ar(e){return e?e.ownerDocument:window.document}var Sr=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var Or=function(e){var t=function(t){Object(a.a)(s,t);var r=f(s);function s(e){var t,n;return Object(i.a)(this,s),t=r.call(this,e),Object(w.a)(Object(oe.a)(t),"popupRef",l.createRef()),Object(w.a)(Object(oe.a)(t),"triggerRef",l.createRef()),Object(w.a)(Object(oe.a)(t),"portalContainer",void 0),Object(w.a)(Object(oe.a)(t),"attachId",void 0),Object(w.a)(Object(oe.a)(t),"clickOutsideHandler",void 0),Object(w.a)(Object(oe.a)(t),"touchOutsideHandler",void 0),Object(w.a)(Object(oe.a)(t),"contextMenuOutsideHandler1",void 0),Object(w.a)(Object(oe.a)(t),"contextMenuOutsideHandler2",void 0),Object(w.a)(Object(oe.a)(t),"mouseDownTimeout",void 0),Object(w.a)(Object(oe.a)(t),"focusTime",void 0),Object(w.a)(Object(oe.a)(t),"preClickTime",void 0),Object(w.a)(Object(oe.a)(t),"preTouchTime",void 0),Object(w.a)(Object(oe.a)(t),"delayTimer",void 0),Object(w.a)(Object(oe.a)(t),"hasPopupMouseDown",void 0),Object(w.a)(Object(oe.a)(t),"onMouseEnter",(function(e){var r=t.props.mouseEnterDelay;t.fireEvents("onMouseEnter",e),t.delaySetPopupVisible(!0,r,r?null:e)})),Object(w.a)(Object(oe.a)(t),"onMouseMove",(function(e){t.fireEvents("onMouseMove",e),t.setPoint(e)})),Object(w.a)(Object(oe.a)(t),"onMouseLeave",(function(e){t.fireEvents("onMouseLeave",e),t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)})),Object(w.a)(Object(oe.a)(t),"onPopupMouseEnter",(function(){t.clearDelayTimer()})),Object(w.a)(Object(oe.a)(t),"onPopupMouseLeave",(function(e){var r;e.relatedTarget&&!e.relatedTarget.setTimeout&&de(null===(r=t.popupRef.current)||void 0===r?void 0:r.getElement(),e.relatedTarget)||t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)})),Object(w.a)(Object(oe.a)(t),"onFocus",(function(e){t.fireEvents("onFocus",e),t.clearDelayTimer(),t.isFocusToShow()&&(t.focusTime=Date.now(),t.delaySetPopupVisible(!0,t.props.focusDelay))})),Object(w.a)(Object(oe.a)(t),"onMouseDown",(function(e){t.fireEvents("onMouseDown",e),t.preClickTime=Date.now()})),Object(w.a)(Object(oe.a)(t),"onTouchStart",(function(e){t.fireEvents("onTouchStart",e),t.preTouchTime=Date.now()})),Object(w.a)(Object(oe.a)(t),"onBlur",(function(e){t.fireEvents("onBlur",e),t.clearDelayTimer(),t.isBlurToHide()&&t.delaySetPopupVisible(!1,t.props.blurDelay)})),Object(w.a)(Object(oe.a)(t),"onContextMenu",(function(e){e.preventDefault(),t.fireEvents("onContextMenu",e),t.setPopupVisible(!0,e)})),Object(w.a)(Object(oe.a)(t),"onContextMenuClose",(function(){t.isContextMenuToShow()&&t.close()})),Object(w.a)(Object(oe.a)(t),"onClick",(function(e){if(t.fireEvents("onClick",e),t.focusTime){var r;if(t.preClickTime&&t.preTouchTime?r=Math.min(t.preClickTime,t.preTouchTime):t.preClickTime?r=t.preClickTime:t.preTouchTime&&(r=t.preTouchTime),Math.abs(r-t.focusTime)<20)return;t.focusTime=0}t.preClickTime=0,t.preTouchTime=0,t.isClickToShow()&&(t.isClickToHide()||t.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!t.state.popupVisible;(t.isClickToHide()&&!n||n&&t.isClickToShow())&&t.setPopupVisible(!t.state.popupVisible,e)})),Object(w.a)(Object(oe.a)(t),"onPopupMouseDown",(function(){var e;(t.hasPopupMouseDown=!0,clearTimeout(t.mouseDownTimeout),t.mouseDownTimeout=window.setTimeout((function(){t.hasPopupMouseDown=!1}),0),t.context)&&(e=t.context).onPopupMouseDown.apply(e,arguments)})),Object(w.a)(Object(oe.a)(t),"onDocumentClick",(function(e){if(!t.props.mask||t.props.maskClosable){var r=e.target,n=t.getRootDomNode(),i=t.getPopupDomNode();de(n,r)&&!t.isContextMenuOnly()||de(i,r)||t.hasPopupMouseDown||t.close()}})),Object(w.a)(Object(oe.a)(t),"getRootDomNode",(function(){var e=t.props.getTriggerDOMNode;if(e)return e(t.triggerRef.current);try{var r=pe(t.triggerRef.current);if(r)return r}catch(n){}return T.a.findDOMNode(Object(oe.a)(t))})),Object(w.a)(Object(oe.a)(t),"getPopupClassNameFromAlign",(function(e){var r=[],n=t.props,i=n.popupPlacement,o=n.builtinPlacements,a=n.prefixCls,s=n.alignPoint,u=n.getPopupClassNameFromAlign;return i&&o&&r.push(function(e,t,r,n){for(var i=r.points,o=Object.keys(e),a=0;a1024||e%1||e!=e)&&a.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return u.getRandomValues(t),Object(n.a)(t)}u&&u.getRandomValues||(a.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(e){return a.throwError("no secure random source avaialble",i.a.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(58))},function(e,t,r){var n=r(558),i=r(559),o=r(358),a=r(560);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()}},function(e,t,r){"use strict";(function(t){var n=r(82);function i(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i=0;c--)if(f[c]!==l[c])return!1;for(c=f.length-1;c>=0;c--)if(s=f[c],!y(e[s],t[s],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function w(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function k(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(r){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function x(e,t,r,n){var i;if("function"!==typeof t)throw new TypeError('"block" argument must be a function');"string"===typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(r){t=r}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&g(i,r,"Missing expected exception"+n);var o="string"===typeof n,s=!e&&i&&!r;if((!e&&a.isError(i)&&o&&k(i,r)||s)&&g(i,r,"Got unwanted exception"+n),e&&i&&r&&!k(i,r)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return v(m(e.actual),128)+" "+e.operator+" "+v(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=p(t),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},a.inherits(h.AssertionError,Error),h.fail=g,h.ok=b,h.equal=function(e,t,r){e!=t&&g(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&g(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){y(e,t,!1)||g(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){y(e,t,!0)||g(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){y(e,t,!1)&&g(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){y(t,r,!0)&&g(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&g(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&g(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){x(!0,e,t,r)},h.doesNotThrow=function(e,t,r){x(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=n((function e(t,r){t||g(t,!0,r,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var _=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this,r(58))},function(e,t,r){(t=e.exports=r(396)).Stream=t,t.Readable=t,t.Writable=r(295),t.Duplex=r(148),t.Transform=r(399),t.PassThrough=r(619)},function(e,t,r){(function(e){var n="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(618),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(58))},,function(e,t,r){(function(n,i){var o;!function(){"use strict";var a="input is invalid type",s="object"===typeof window,u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"===typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"===typeof n&&n.versions&&n.versions.node?u=i:c&&(u=self);var f=!u.JS_SHA3_NO_COMMON_JS&&"object"===typeof e&&e.exports,l=r(357),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,d="0123456789abcdef".split(""),p=[4,1024,262144,67108864],v=[0,8,16,24],m=[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],g=[224,256,384,512],b=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var k=function(e,t,r){return function(n){return new I(e,t,e).update(n)[r]()}},x=function(e,t,r){return function(n,i){return new I(e,t,i).update(n)[r]()}},_=function(e,t,r){return function(t,n,i,o){return M["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return M["kmac"+e].update(t,n,i,o)[r]()}},A=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function B(e,t,r){I.call(this,e,t,r)}I.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!h||!ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var n,i,o=this.blocks,s=this.byteCount,u=e.length,c=this.blockCount,f=0,l=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=s){for(this.start=n-s,this.block=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},I.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!h||!ArrayBuffer.isView(e)))throw new Error(a);t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},I.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t===0&&(F(r),o=0)}return i&&(e=r[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},I.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r===0&&F(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},B.prototype=new I,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),I.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,s,u,c,f,l,h,d,p,v,g,b,y,w,k,x,_,E,A,S,O,M,P,j,T,C,R,L,N,I,B,F,D,U,z,H,q,G,J,V,K,X,W,Z,Y,Q,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(f<<1|l>>>31),r=s^(l<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|d>>>31),r=c^(d<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],v=e[1],K=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,j=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,J=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,O=e[18]<<20|e[19]>>>12,M=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=p^~g&y,e[1]=v^~b&w,e[10]=A^~O&P,e[11]=S^~M&j,e[20]=N^~B&D,e[21]=I^~F&U,e[30]=J^~K&W,e[31]=V^~X&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~y&k,e[3]=b^~w&x,e[12]=O^~P&T,e[13]=M^~j&C,e[22]=B^~D&z,e[23]=F^~U&H,e[32]=K^~W&Y,e[33]=X^~Z&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=y^~k&_,e[5]=w^~x&E,e[14]=P^~T&R,e[15]=j^~C&L,e[24]=D^~z&q,e[25]=U^~H&G,e[34]=W^~Y&$,e[35]=Z^~Q&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=k^~_&p,e[7]=x^~E&v,e[16]=T^~R&A,e[17]=C^~L&S,e[26]=z^~q&N,e[27]=H^~G&I,e[36]=Y^~$&J,e[37]=Q^~ee&V,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=_^~p&g,e[9]=E^~v&b,e[18]=R^~A&O,e[19]=L^~S&M,e[28]=q^~N&B,e[29]=G^~I&F,e[38]=$^~J&K,e[39]=ee^~V&X,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(f)e.exports=M;else{for(j=0;j-1?n:o.nextTick;b.WritableState=g;var c=Object.create(r(187));c.inherits=r(52);var f={deprecate:r(291)},l=r(397),h=r(294).Buffer,d=("undefined"!==typeof i?i:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var p,v=r(398);function m(){}function g(e,t){s=s||r(148),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,c=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,i);else{var a=x(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||k(e,r),n?u(w,e,r,a,i):w(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(e){if(s=s||r(148),!p.call(b,this)&&!(this instanceof s))return new b(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),l.call(this)}function y(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function k(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,y(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(y(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=x(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"===typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(_,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}c.inherits(b,l),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:f.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]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===b&&(e&&e._writableState instanceof g)}})):p=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof d);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"===typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!==typeof r&&(r=m),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"===typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(n,a),i=!1),i}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=h.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=v.destroy,b.prototype._undestroy=v.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(71),r(286).setImmediate,r(58))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var n,i=r(115),o=r(161),a=r(146);function s(t){return(0,a.unpadBuffer)(t.toArrayLike(e))}t.bnToHex=function(e){return"0x".concat(e.toString(16))},t.bnToUnpaddedBuffer=s,t.bnToRlp=function(e){return s(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(n=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"===typeof e&&!(0,o.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(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)");var r=(0,a.toBuffer)(e);if(t===n.Buffer)return r;if(t===n.BN)return new i.BN(r);if(t===n.Number){var s=new i.BN(r),u=new i.BN(Number.MAX_SAFE_INTEGER.toString());if(s.gt(u))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return s.toNumber()}return"0x".concat(r.toString("hex"))}}}).call(this,r(51).Buffer)},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return o}));var n=r(8);function i(e){e=atob(e);for(var t=[],r=0;r31)throw new Error("bytes32 string must be less than 32 bytes");return Object(i.hexlify)(Object(i.concat)([t,n.a]).slice(0,32))}function s(e){var t=Object(i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===t[r-1];)r--;return Object(o.h)(t.slice(0,r))}},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return s}));var n=r(8),i=r(46),o=r(64),a="\x19Ethereum Signed Message:\n";function s(e){return"string"===typeof e&&(e=Object(o.f)(e)),Object(i.keccak256)(Object(n.concat)([Object(o.f)(a),Object(o.f)(String(e.length)),e]))}},function(e,t,r){"use strict";var n=r(632),i=r(302),o=r(167),a=r(404),s=r(634);function u(e,t,r){var n=this._refs[r];if("string"==typeof n){if(!this._refs[n])return u.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[r])instanceof a)return p(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,o,s,f=c.call(this,t,r);return f&&(i=f.schema,t=f.root,s=f.baseId),i instanceof a?o=i.validate||e.call(this,i.schema,t,void 0,s):void 0!==i&&(o=p(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,s)),o}function c(e,t){var r=n.parse(t),i=m(r),o=v(this._getId(e.schema));if(0===Object.keys(e.schema).length||i!==o){var s=b(i),u=this._refs[s];if("string"==typeof u)return f.call(this,e,u,r);if(u instanceof a)u.validate||this._compile(u),e=u;else{if(!((u=this._schemas[s])instanceof a))return;if(u.validate||this._compile(u),s==b(t))return{schema:u,root:e,baseId:o};e=u}if(!e.schema)return;o=v(this._getId(e.schema))}return h.call(this,r,o,e.schema,e)}function f(e,t,r){var n=c.call(this,e,t);if(n){var i=n.schema,o=n.baseId;e=n.root;var a=this._getId(i);return a&&(o=y(o,a)),h.call(this,r,o,i,e)}}e.exports=u,u.normalizeId=b,u.fullPath=v,u.url=y,u.ids=function(e){var t=b(this._getId(e)),r={"":t},a={"":v(t,!1)},u={},c=this;return s(e,{allKeys:!0},(function(e,t,s,f,l,h,d){if(""!==t){var p=c._getId(e),v=r[f],m=a[f]+"/"+l;if(void 0!==d&&(m+="/"+("number"==typeof d?d:o.escapeFragment(d))),"string"==typeof p){p=v=b(v?n.resolve(v,p):p);var g=c._refs[p];if("string"==typeof g&&(g=c._refs[g]),g&&g.schema){if(!i(e,g.schema))throw new Error('id "'+p+'" resolves to more than one schema')}else if(p!=b(m))if("#"==p[0]){if(u[p]&&!i(e,u[p]))throw new Error('id "'+p+'" resolves to more than one schema');u[p]=e}else c._refs[p]=m}r[t]=v,a[t]=m}})),u},u.inlineRef=p,u.schema=c;var l=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function h(e,t,r,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),a=1;a1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.encoder.encode(e).substring(1)}},function(e,t,r){"use strict";var n=r(126),i=r(127);Object.defineProperty(t,"__esModule",{value:!0});var o=r(190),a=function(){function e(t,r,i){n(this,e),this.name=t,this.code=r,this.encode=i}return i(e,[{key:"digest",value:function(e){var t=this;if(e instanceof Uint8Array){var r=this.encode(e);return r instanceof Uint8Array?o.create(this.code,r):r.then((function(e){return o.create(t.code,e)}))}throw Error("Unknown type, must be binary type")}}]),e}();t.Hasher=a,t.from=function(e){var t=e.name,r=e.code,n=e.encode;return new a(t,r,n)}},function(e,t,r){"use strict";var n=r(183);e.exports=function(e,t){t||(t=e.reduce((function(e,t){return e+t.length}),0));var r,i=new Uint8Array(t),o=0,a=n(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;i.set(s,o),o+=s.length}}catch(u){a.e(u)}finally{a.f()}return i}},function(e,t,r){"use strict";(function(t){var n=r(86),i=r(695),o={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s={adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t)&&(e=r(420)),e}(),transformRequest:[function(e,t){return i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){s.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){s.headers[e]=n.merge(o)})),e.exports=s}).call(this,r(71))},function(e,t,r){"use strict";e.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]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var n=r(232),i=r(717),o=function(){function e(e,t){this._rgb=e,this._population=t}return e.applyFilter=function(e,t){return"function"===typeof t?i(e,(function(e){var r=e.r,n=e.g,i=e.b;return t(r,n,i,255)})):e},Object.defineProperty(e.prototype,"r",{get:function(){return this._rgb[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"g",{get:function(){return this._rgb[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"b",{get:function(){return this._rgb[2]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rgb",{get:function(){return this._rgb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hsl",{get:function(){if(!this._hsl){var e=this._rgb,t=e[0],r=e[1],i=e[2];this._hsl=n.rgbToHsl(t,r,i)}return this._hsl},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hex",{get:function(){if(!this._hex){var e=this._rgb,t=e[0],r=e[1],i=e[2];this._hex=n.rgbToHex(t,r,i)}return this._hex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"population",{get:function(){return this._population},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return{rgb:this.rgb,population:this.population}},e.prototype.getRgb=function(){return this._rgb},e.prototype.getHsl=function(){return this.hsl},e.prototype.getPopulation=function(){return this._population},e.prototype.getHex=function(){return this.hex},e.prototype.getYiq=function(){if(!this._yiq){var e=this._rgb;this._yiq=(299*e[0]+587*e[1]+114*e[2])/1e3}return this._yiq},Object.defineProperty(e.prototype,"titleTextColor",{get:function(){return this._titleTextColor||(this._titleTextColor=this.getYiq()<200?"#fff":"#000"),this._titleTextColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bodyTextColor",{get:function(){return this._bodyTextColor||(this._bodyTextColor=this.getYiq()<150?"#fff":"#000"),this._bodyTextColor},enumerable:!1,configurable:!0}),e.prototype.getTitleTextColor=function(){return this.titleTextColor},e.prototype.getBodyTextColor=function(){return this.bodyTextColor},e}();t.Swatch=o},function(e,t,r){(function(e){var n=r(102),i=r(725),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u}).call(this,r(93)(e))},function(e,t){var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,r){(function(e){var n=r(432),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&n.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=s}).call(this,r(93)(e))},function(e,t){var r=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},function(e,t,r){var n=r(233),i=r(737),o=r(738),a=r(739),s=r(740),u=r(741);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t,r){var n=r(150)(r(102),"Map");e.exports=n},function(e,t,r){var n=r(746),i=r(753),o=r(755),a=r(756),s=r(757);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t1&&"boolean"!==typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===E(/^%?[^%]*%?$/,e))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=O(e),i=r.length>0?r[0]:"",a=M("%"+i+"%",t),u=a.name,c=a.value,f=!1,l=a.alias;l&&(i=l[0],k(r,w([0,1],l)));for(var h=1,d=!0;h=r.length){var b=s(c,p);c=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else d=y(c,p),c=c[p];d&&!f&&(v[u]=c)}}return c}},function(e,t,r){"use strict";var n=r(891);e.exports=Function.prototype.bind||n},function(e,t,r){"use strict";var n=String.prototype.replace,i=/%20/g,o="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:o,RFC3986:a}},function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var n=r(6),i=r(7),o=r(20),a=r(14),s=r(15),u=r(9),c=r(10),f=r(45),l=r(95),h=new c.a(f.a),d=1;function p(e,t){var r="Web3LegacyFetcher";return function(e,n){var i=this,o={method:e,params:n,id:d++,jsonrpc:"2.0"};return new Promise((function(e,n){i.emit("debug",{action:"request",fetcher:r,request:Object(u.c)(o),provider:i}),t(o,(function(t,a){if(t)return i.emit("debug",{action:"response",fetcher:r,error:t,request:o,provider:i}),n(t);if(i.emit("debug",{action:"response",fetcher:r,request:o,response:a,provider:i}),a.error){var s=new Error(a.error.message);return s.code=a.error.code,s.data=a.error.data,n(s)}e(a.result)}))}))}}var v=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(e,i){var a;Object(n.a)(this,r),null==e&&h.throwArgumentError("missing provider","provider",e);var s=null,c=null,f=null;return"function"===typeof e?(s="unknown:",c=e):(!(s=e.host||e.path||"")&&e.isMetaMask&&(s="metamask"),f=e,e.request?(""===s&&(s="eip-1193:"),c=function(e){return function(t,r){var n=this;null==r&&(r=[]);var i={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Object(u.c)(i),provider:this}),e.request(i).then((function(e){return n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,response:e,provider:n}),e}),(function(e){throw n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,error:e,provider:n}),e}))}}(e)):e.sendAsync?c=p(0,e.sendAsync.bind(e)):e.send?c=p(0,e.send.bind(e)):h.throwArgumentError("unsupported provider","provider",e),s||(s="unknown:")),a=t.call(this,s,i),Object(u.d)(Object(o.a)(a),"jsonRpcFetchFunc",c),Object(u.d)(Object(o.a)(a),"provider",f),a}return Object(i.a)(r,[{key:"send",value:function(e,t){return this.jsonRpcFetchFunc(e,t)}}]),r}(l.a)},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="0x0000000000000000000000000000000000000000000000000000000000000000"},,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(39),i=r(143);function o(e){return Object(n.a)(Object(i.b)(e))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return ee})),r.d(t,"b",(function(){return V}));var n=r(1),i=r.n(n),o=r(11),a=r.n(o),s=r(249),u=r.n(s),c=r(343),f=r.n(c),l=r(250),h=r.n(l);function d(){return(d=Object.assign||function(e){for(var t=1;t=0||(i[r]=e[r]);return i}var g={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},b={rel:["amphtml","canonical","alternate"]},y={type:["application/ld+json"]},w={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},k=Object.keys(g).map((function(e){return g[e]})),x={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},_=Object.keys(x).reduce((function(e,t){return e[x[t]]=t,e}),{}),E=function(e,t){for(var r=e.length-1;r>=0;r-=1){var n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},A=function(e){var t=E(e,g.TITLE),r=E(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,(function(){return t}));var n=E(e,"defaultTitle");return t||n||void 0},S=function(e){return E(e,"onChangeClientState")||function(){}},O=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return d({},e,t)}),{})},M=function(e,t){return t.filter((function(e){return void 0!==e[g.BASE]})).map((function(e){return e[g.BASE]})).reverse().reduce((function(t,r){if(!t.length)for(var n=Object.keys(r),i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")},I=function(e){return Object.keys(e).reduce((function(t,r){var n=void 0!==e[r]?r+'="'+e[r]+'"':""+r;return t?t+" "+n:n}),"")},B=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce((function(t,r){return t[x[r]||r]=e[r],t}),t)},F=function(e,t){return t.map((function(t,r){var n,o=((n={key:r})["data-rh"]=!0,n);return Object.keys(t).forEach((function(e){var r=x[e]||e;"innerHTML"===r||"cssText"===r?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[r]=t[e]})),i.a.createElement(e,o)}))},D=function(e,t,r){switch(e){case g.TITLE:return{toComponent:function(){return r=t.titleAttributes,(n={key:e=t.title})["data-rh"]=!0,o=B(r,n),[i.a.createElement(g.TITLE,o,e)];var e,r,n,o},toString:function(){return function(e,t,r,n){var i=I(r),o=T(t);return i?"<"+e+' data-rh="true" '+i+">"+N(o,n)+"":"<"+e+' data-rh="true">'+N(o,n)+""}(e,t.title,t.titleAttributes,r)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return B(t)},toString:function(){return I(t)}};default:return{toComponent:function(){return F(e,t)},toString:function(){return function(e,t,r){return t.reduce((function(t,n){var i=Object.keys(n).filter((function(e){return!("innerHTML"===e||"cssText"===e)})).reduce((function(e,t){var i=void 0===n[t]?t:t+'="'+N(n[t],r)+'"';return e?e+" "+i:i}),""),o=n.innerHTML||n.cssText||"",a=-1===L.indexOf(e);return t+"<"+e+' data-rh="true" '+i+(a?"/>":">"+o+"")}),"")}(e,t,r)}}}},U=function(e){var t=e.baseTag,r=e.bodyAttributes,n=e.encode,i=e.htmlAttributes,o=e.noscriptTags,a=e.styleTags,s=e.title,u=void 0===s?"":s,c=e.titleAttributes,f=e.linkTags,l=e.metaTags,h=e.scriptTags,d={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var p=function(e){var t=e.linkTags,r=e.scriptTags,n=e.encode,i=C(e.metaTags,w),o=C(t,b),a=C(r,y);return{priorityMethods:{toComponent:function(){return[].concat(F(g.META,i.priority),F(g.LINK,o.priority),F(g.SCRIPT,a.priority))},toString:function(){return D(g.META,i.priority,n)+" "+D(g.LINK,o.priority,n)+" "+D(g.SCRIPT,a.priority,n)}},metaTags:i.default,linkTags:o.default,scriptTags:a.default}}(e);d=p.priorityMethods,f=p.linkTags,l=p.metaTags,h=p.scriptTags}return{priority:d,base:D(g.BASE,t,n),bodyAttributes:D("bodyAttributes",r,n),htmlAttributes:D("htmlAttributes",i,n),link:D(g.LINK,f,n),meta:D(g.META,l,n),noscript:D(g.NOSCRIPT,o,n),script:D(g.SCRIPT,h,n),style:D(g.STYLE,a,n),title:D(g.TITLE,{title:u,titleAttributes:c},n)}},z=[],H=function(e,t){var r=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){r.context.helmet=e},helmetInstances:{get:function(){return r.canUseDOM?z:r.instances},add:function(e){(r.canUseDOM?z:r.instances).push(e)},remove:function(e){var t=(r.canUseDOM?z:r.instances).indexOf(e);(r.canUseDOM?z:r.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=U({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},q=i.a.createContext({}),G=a.a.shape({setHelmet:a.a.func,helmetInstances:a.a.shape({get:a.a.func,add:a.a.func,remove:a.a.func})}),J="undefined"!=typeof document,V=function(e){function t(r){var n;return(n=e.call(this,r)||this).helmetData=new H(n.props.context,t.canUseDOM),n}return p(t,e),t.prototype.render=function(){return i.a.createElement(q.Provider,{value:this.helmetData.value},this.props.children)},t}(n.Component);V.canUseDOM=J,V.propTypes={context:a.a.shape({helmet:a.a.shape()}),children:a.a.node.isRequired},V.defaultProps={context:{}},V.displayName="HelmetProvider";var K=function(e,t){var r,n=document.head||document.querySelector(g.HEAD),i=n.querySelectorAll(e+"[data-rh]"),o=[].slice.call(i),a=[];return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&("innerHTML"===i?n.innerHTML=t.innerHTML:"cssText"===i?n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText)):n.setAttribute(i,void 0===t[i]?"":t[i]));n.setAttribute("data-rh","true"),o.some((function(e,t){return r=t,n.isEqualNode(e)}))?o.splice(r,1):a.push(n)})),o.forEach((function(e){return e.parentNode.removeChild(e)})),a.forEach((function(e){return n.appendChild(e)})),{oldTags:o,newTags:a}},X=function(e,t){var r=document.getElementsByTagName(e)[0];if(r){for(var n=r.getAttribute("data-rh"),i=n?n.split(","):[],o=[].concat(i),a=Object.keys(t),s=0;s=0;l-=1)r.removeAttribute(o[l]);i.length===o.length?r.removeAttribute("data-rh"):r.getAttribute("data-rh")!==a.join(",")&&r.setAttribute("data-rh",a.join(","))}},W=function(e,t){var r=e.baseTag,n=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,s=e.onChangeClientState,u=e.scriptTags,c=e.styleTags,f=e.title,l=e.titleAttributes;X(g.BODY,e.bodyAttributes),X(g.HTML,n),function(e,t){void 0!==e&&document.title!==e&&(document.title=T(e)),X(g.TITLE,t)}(f,l);var h={baseTag:K(g.BASE,r),linkTags:K(g.LINK,i),metaTags:K(g.META,o),noscriptTags:K(g.NOSCRIPT,a),scriptTags:K(g.SCRIPT,u),styleTags:K(g.STYLE,c)},d={},p={};Object.keys(h).forEach((function(e){var t=h[e],r=t.newTags,n=t.oldTags;r.length&&(d[e]=r),n.length&&(p[e]=h[e].oldTags)})),t&&t(),s(e,d,p)},Z=null,Y=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i elements are self-closing and can not contain children. Refer to our API for more information.")}},r.flattenArrayTypeChildren=function(e){var t,r=e.child,n=e.arrayTypeChildren;return d({},n,((t={})[r.type]=[].concat(n[r.type]||[],[d({},e.newChildProps,this.mapNestedChildrenToProps(r,e.nestedChildren))]),t))},r.mapObjectTypeChildren=function(e){var t,r,n=e.child,i=e.newProps,o=e.newChildProps,a=e.nestedChildren;switch(n.type){case g.TITLE:return d({},i,((t={})[n.type]=a,t.titleAttributes=d({},o),t));case g.BODY:return d({},i,{bodyAttributes:d({},o)});case g.HTML:return d({},i,{htmlAttributes:d({},o)});default:return d({},i,((r={})[n.type]=d({},o),r))}},r.mapArrayTypeChildrenToProps=function(e,t){var r=d({},t);return Object.keys(e).forEach((function(t){var n;r=d({},r,((n={})[t]=e[t],n))})),r},r.warnOnInvalidChildren=function(e,t){return f()(k.some((function(t){return e.type===t})),"function"==typeof e.type?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+k.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),f()(!t||"string"==typeof t||Array.isArray(t)&&!t.some((function(e){return"string"!=typeof e})),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``} ) Refer to our API for more information."),!0},r.mapChildrenToProps=function(e,t){var r=this,n={};return i.a.Children.forEach(e,(function(e){if(e&&e.props){var i=e.props,o=i.children,a=m(i,Q),s=Object.keys(a).reduce((function(e,t){return e[_[t]||t]=a[t],e}),{}),u=e.type;switch("symbol"==typeof u?u=u.toString():r.warnOnInvalidChildren(e,o),u){case g.FRAGMENT:t=r.mapChildrenToProps(o,t);break;case g.LINK:case g.META:case g.NOSCRIPT:case g.SCRIPT:case g.STYLE:n=r.flattenArrayTypeChildren({child:e,arrayTypeChildren:n,newChildProps:s,nestedChildren:o});break;default:t=r.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:o})}}})),this.mapArrayTypeChildrenToProps(n,t)},r.render=function(){var e=this.props,t=e.children,r=m(e,$),n=d({},r),o=r.helmetData;return t&&(n=this.mapChildrenToProps(t,n)),!o||o instanceof H||(o=new H(o.context,o.instances)),o?i.a.createElement(Y,d({},n,{context:o.value,helmetData:void 0})):i.a.createElement(q.Consumer,null,(function(e){return i.a.createElement(Y,d({},n,{context:e}))}))},t}(n.Component);ee.propTypes={base:a.a.object,bodyAttributes:a.a.object,children:a.a.oneOfType([a.a.arrayOf(a.a.node),a.a.node]),defaultTitle:a.a.string,defer:a.a.bool,encodeSpecialCharacters:a.a.bool,htmlAttributes:a.a.object,link:a.a.arrayOf(a.a.object),meta:a.a.arrayOf(a.a.object),noscript:a.a.arrayOf(a.a.object),onChangeClientState:a.a.func,script:a.a.arrayOf(a.a.object),style:a.a.arrayOf(a.a.object),title:a.a.string,titleAttributes:a.a.object,titleTemplate:a.a.string,prioritizeSeoTags:a.a.bool,helmetData:a.a.object},ee.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},ee.displayName="Helmet"},function(e,t,r){"use strict";e.exports=function(e,t,r,n,i,o,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,i,o,a,s],f=0;(u=new Error(t.replace(/%s/g,(function(){return c[f++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},,function(e,t,r){"use strict";var n=r(126),i=r(127),o=r(179),a=r(412),s=r(202),u=r(690),c=r(308),f=r(306),l=r(691),h=s.nameToCode,d=Object.keys(h).reduce((function(e,t){return e[h[t]]=t,e}),{}),p=Symbol.for("@ipld/js-cid/CID"),v=function(e){function t(e,r,i,u){if(n(this,t),this.version,this.codec,this.multihash,Object.defineProperty(this,p,{value:!0}),t.isCID(e)){var c=e;return this.version=c.version,this.codec=c.codec,this.multihash=c.multihash,void(this.multibaseName=c.multibaseName||(0===c.version?"base58btc":"base32"))}if("string"===typeof e){var f=a.isEncoded(e);if(f){var l=a.decode(e);this.version=parseInt(l[0].toString(),16),this.codec=s.getCodec(l.slice(1)),this.multihash=s.rmPrefix(l.slice(1)),this.multibaseName=f}else this.version=0,this.codec="dag-pb",this.multihash=o.fromB58String(e),this.multibaseName="base58btc";return t.validateCID(this),void Object.defineProperty(this,"string",{value:e})}if(e instanceof Uint8Array){var h=parseInt(e[0].toString(),16);if(1===h){var v=e;this.version=h,this.codec=s.getCodec(v.slice(1)),this.multihash=s.rmPrefix(v.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";t.validateCID(this)}else this.version=e,"number"===typeof r&&(r=d[r]),this.codec=r,this.multihash=i,this.multibaseName=u||(0===e?"base58btc":"base32"),t.validateCID(this)}return i(t,[{key:"bytes",get:function(){var e=this._bytes;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");var t=s.getCodeVarint(this.codec);e=c([[1],t,this.multihash],1+t.byteLength+this.multihash.byteLength)}Object.defineProperty(this,"_bytes",{value:e})}return e}},{key:"prefix",get:function(){var e=s.getCodeVarint(this.codec),t=o.prefix(this.multihash);return c([[this.version],e,t],1+e.byteLength+t.byteLength)}},{key:"code",get:function(){return h[this.codec]}},{key:"toV0",value:function(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");var e=o.decode(this.multihash),r=e.name,n=e.length;if("sha2-256"!==r)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==n)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new t(0,this.codec,this.multihash)}},{key:"toV1",value:function(){return new t(1,this.codec,this.multihash,this.multibaseName)}},{key:"toBaseEncodedString",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&0!==this.string.length&&t===this.multibaseName)return this.string;if(0===this.version){if("base58btc"!==t)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");e=o.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");e=f(a.encode(t,this.bytes))}return t===this.multibaseName&&Object.defineProperty(this,"string",{value:e}),e}},{key:e,value:function(){return"CID("+this.toString()+")"}},{key:"toString",value:function(e){return this.toBaseEncodedString(e)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&l(this.multihash,e.multihash)}}],[{key:"validateCID",value:function(e){var t=u.checkCIDComponents(e);if(t)throw new Error(t)}},{key:"isCID",value:function(e){return e instanceof t||Boolean(e&&e[p])}}]),t}(Symbol.for("nodejs.util.inspect.custom"));v.codecs=h,e.exports=v},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n(r(426)),o=n(r(826));i.default.DefaultOpts.ImageClass=o.default,e.exports=i.default},function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=1/12.92;function i(e){return Math.pow((e+.055)/1.055,2.4)}function o(e){var t=e[0]/255,r=e[1]/255,o=e[2]/255;return.2126*(t<=.03928?t*n:i(t))+.7152*(r<=.03928?r*n:i(r))+.0722*(o<=.03928?o*n:i(o))}function a(e){var t=255;8===(e=e.replace(/^#/,"")).length&&(t=parseInt(e.slice(6,8),16),e=e.substring(0,6)),4===e.length&&(t=parseInt(e.slice(3,4).repeat(2),16),e=e.substring(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var r=parseInt(e,16);return[r>>16,r>>8&255,255&r,t]}function s(e,t){return function(e,t){return(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}(o(e),o(t))}function u(e,t){return s(a(e),a(t))}},function(e,t,r){var n=r(833);e.exports=d,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var r,n=[],o=0,a=0,s="",f=t&&t.delimiter||"/";null!=(r=i.exec(e));){var l=r[0],h=r[1],d=r.index;if(s+=e.slice(a,d),a=d+l.length,h)s+=h[1];else{var p=e[a],v=r[2],m=r[3],g=r[4],b=r[5],y=r[6],w=r[7];s&&(n.push(s),s="");var k=null!=v&&null!=p&&p!==v,x="+"===y||"*"===y,_="?"===y||"*"===y,E=r[2]||f,A=g||b;n.push({name:m||o++,prefix:v||"",delimiter:E,optional:_,repeat:x,partial:k,asterisk:!!w,pattern:A?c(A):w?".*":"[^"+u(E)+"]+?"})}}return ae.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function l(e,t){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(t);else try{e.current=t}catch(r){throw new Error('Cannot assign value "'+t+'" to ref "'+e+'"')}}function h(e,t){return function(r){if(e&&e(r),!r.defaultPrevented)return t(r)}}var d=r(47),p=r(19);function v(e,t){return function(e,t){var r=Object(n.useState)((function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}}))[0];return r.callback=t,r.facade}(t||null,(function(t){return e.forEach((function(e){return function(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}(e,t)}))}))}var m={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},g=function(e){var t=e.children;return n.createElement(n.Fragment,null,n.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:m}),t,t&&n.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:m}))};g.propTypes={},g.defaultProps={children:null};var b=r(79);function y(e){return e}function w(e,t){void 0===t&&(t=y);var r=[],n=!1;return{read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var i=t(e,n);return r.push(i),function(){r=r.filter((function(e){return e!==i}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var i=r;r=[],i.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}function k(e,t){return void 0===t&&(t=y),w(e,t)}function x(e){void 0===e&&(e={});var t=w(null);return t.options=Object(b.a)({async:!0,ssr:!1},e),t}var _=k({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),E=k(),A=k(),S=x({async:!0}),O=[],M=n.forwardRef((function(e,t){var r,i=n.useState(),o=i[0],a=i[1],s=n.useRef(),u=n.useRef(!1),c=n.useRef(null),f=e.children,l=e.disabled,h=e.noFocusGuards,d=e.persistentFocus,g=e.crossFrame,b=e.autoFocus,y=(e.allowTextSelection,e.group),w=e.className,k=e.whiteList,x=e.hasPositiveIndices,A=e.shards,M=void 0===A?O:A,P=e.as,j=void 0===P?"div":P,T=e.lockProps,C=void 0===T?{}:T,R=e.sideCar,L=e.returnFocus,N=e.focusOptions,I=e.onActivation,B=e.onDeactivation,F=n.useState({})[0],D=n.useCallback((function(){c.current=c.current||document&&document.activeElement,s.current&&I&&I(s.current),u.current=!0}),[I]),U=n.useCallback((function(){u.current=!1,B&&B(s.current)}),[B]);Object(n.useEffect)((function(){l||(c.current=null)}),[]);var z=n.useCallback((function(e){var t=c.current;if(t&&t.focus){var r="function"===typeof L?L(t):L;if(r){var n="object"===typeof r?r:void 0;c.current=null,e?Promise.resolve().then((function(){return t.focus(n)})):t.focus(n)}}}),[L]),H=n.useCallback((function(e){u.current&&_.useMedium(e)}),[]),q=E.useMedium,G=n.useCallback((function(e){s.current!==e&&(s.current=e,a(e))}),[]);var J=Object(p.a)(((r={})["data-focus-lock-disabled"]=l&&"disabled",r["data-focus-lock"]=y,r),C),V=!0!==h,K=V&&"tail"!==h,X=v([t,G]);return n.createElement(n.Fragment,null,V&&[n.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:l?-1:0,style:m}),x?n.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:l?-1:1,style:m}):null],!l&&n.createElement(R,{id:F,sideCar:S,observed:o,disabled:l,persistentFocus:d,crossFrame:g,autoFocus:b,whiteList:k,shards:M,onActivation:D,onDeactivation:U,returnFocus:z,focusOptions:N}),n.createElement(j,Object(p.a)({ref:X},J,{className:w,onBlur:q,onFocus:H}),f),K&&n.createElement("div",{"data-focus-guard":!0,tabIndex:l?-1:0,style:m}))}));M.propTypes={},M.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var P=M,j=r(67),T=r(22);var C=function(e,t){return function(r){var o,a=[];function s(){o=e(a.map((function(e){return e.props}))),t(o)}var u=function(e){function t(){return e.apply(this,arguments)||this}Object(j.a)(t,e),t.peek=function(){return o};var n=t.prototype;return n.componentDidMount=function(){a.push(this),s()},n.componentDidUpdate=function(){s()},n.componentWillUnmount=function(){var e=a.indexOf(this);a.splice(e,1),s()},n.render=function(){return i.a.createElement(r,this.props)},t}(n.PureComponent);return Object(T.a)(u,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),u}},R=function(e){for(var t=Array(e.length),r=0;r=0})).sort(K)},W=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),Z="".concat(W,", [data-focus-guard]"),Y=function(e,t){return e.reduce((function(e,r){var n,i=function e(t,r){return R((t.shadowRoot||t).children).reduce((function(t,n){return t.concat(n.matches(r?Z:W)?[n]:[],e(n))}),[])}(r,t),o=(n=[]).concat.apply(n,i.map((function(e){return function(e,t){var r;return e instanceof HTMLIFrameElement&&(null===(r=e.contentDocument)||void 0===r?void 0:r.body)?Y([e.contentDocument.body],t):[e]}(e,t)})));return e.concat(o,r.parentNode?R(r.parentNode.querySelectorAll(W)).filter((function(e){return e===r})):[])}),[])},Q=function(e,t){return R(e).filter((function(e){return function e(t,r){var n=t.get(r);if(void 0!==n)return n;var i=F(r,e.bind(void 0,t));return t.set(r,i),i}(t,e)})).filter((function(e){return function(e){return!((z(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)}))},$=function(e,t){return void 0===t&&(t=new Map),R(e).filter((function(e){return D(t,e)}))},ee=function(e,t,r){return X(Q(Y(e,r),t),!0,r)},te=function(e,t){return X(Q(Y(e),t),!1)},re=function(e,t){return Q(function(e){var t=e.querySelectorAll("[".concat("data-autofocus-inside","]"));return R(t).map((function(e){return Y([e])})).reduce((function(e,t){return e.concat(t)}),[])}(e),t)},ne=function e(t,r){return t.shadowRoot?e(t.shadowRoot,r):!(void 0===Object.getPrototypeOf(t).contains||!Object.getPrototypeOf(t).contains.call(t,r))||R(t.children).some((function(t){var n;if(t instanceof HTMLIFrameElement){var i=null===(n=t.contentDocument)||void 0===n?void 0:n.body;return!!i&&e(i,r)}return e(t,r)}))},ie=function e(t){if(void 0===t&&(t=document),t&&t.activeElement){var r=t.activeElement;return r.shadowRoot?e(r.shadowRoot):r instanceof HTMLIFrameElement&&function(e){try{return e()}catch(t){return}}((function(){return r.contentWindow.document}))?e(r.contentWindow.document):r}},oe=function(e){return L(e).filter(Boolean).reduce((function(e,t){var r=t.getAttribute("data-focus-lock");return e.push.apply(e,r?function(e){for(var t=new Set,r=e.length,n=0;n0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(n)}return e.filter((function(e,r){return!t.has(r)}))}(R(function e(t){return t.parentNode?e(t.parentNode):t}(t).querySelectorAll("[".concat("data-focus-lock",'="').concat(r,'"]:not([').concat("data-focus-lock-disabled",'="disabled"])')))):[t]),e}),[])},ae=function(e,t){return void 0===t&&(t=ie(N(e).ownerDocument)),!(!t||t.dataset&&t.dataset.focusGuard)&&oe(e).some((function(e){return ne(e,t)||function(e,t){return Boolean(R(e.querySelectorAll("iframe")).some((function(e){return function(e,t){return e===t}(e,t)})))}(e,t)}))},se=function(e,t){return H(e)&&e.name?function(e,t){return t.filter(H).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},ue=function(e){return e[0]&&e.length>1?se(e[0],e):e[0]},ce=function(e,t){return e.length>1?e.indexOf(se(e[t],e)):t},fe=function(e,t,r,n){var i=e.length,o=e[0],a=e[i-1],s=G(r);if(!(r&&e.indexOf(r)>=0)){var u=void 0!==r?t.indexOf(r):-1,c=n?t.indexOf(n):u,f=n?e.indexOf(n):-1,l=u-c,h=t.indexOf(o),d=t.indexOf(a),p=function(e){var t=new Set;return e.forEach((function(r){return t.add(se(r,e))})),e.filter((function(e){return t.has(e)}))}(t),v=(void 0!==r?p.indexOf(r):-1)-(n?p.indexOf(n):u),m=ce(e,0),g=ce(e,i-1);return-1===u||-1===f?"NEW_FOCUS":!l&&f>=0?f:u<=h&&s&&Math.abs(l)>1?g:u>=d&&s&&Math.abs(l)>1?m:l&&Math.abs(v)>1?f:u<=h?g:u>d?m:l?Math.abs(l)>1?f:(i+f+l)%i:void 0}},le=function(e,t,r){var n,i=e.map((function(e){return e.node})),o=$(i.filter((n=r,function(e){var t,r=null===(t=U(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==r&&"false"!==r||n.indexOf(e)>=0})));return o&&o.length?ue(o):ue($(t))},he=function e(t,r){return void 0===r&&(r=[]),r.push(t),t.parentNode&&e(t.parentNode.host||t.parentNode,r),r},de=function(e,t){for(var r=he(e),n=he(t),i=0;i=0)return o}return!1},pe=function(e,t,r){var n=L(e),i=L(t),o=n[0],a=!1;return i.filter(Boolean).forEach((function(e){a=de(a||e,e)||a,r.filter(Boolean).forEach((function(e){var t=de(o,e);t&&(a=!a||ne(t,a)?t:de(t,a))}))})),a},ve=function(e,t){var r=ie(L(e).length>0?document:N(e).ownerDocument),n=oe(e).filter(J),i=pe(r||e,e,n),o=new Map,a=te(n,o),s=ee(n,o).filter((function(e){var t=e.node;return J(t)}));if(s[0]||(s=a)[0]){var u=te([i],o).map((function(e){return e.node})),c=function(e,t){var r=new Map;return t.forEach((function(e){return r.set(e.node,e)})),e.map((function(e){return r.get(e)})).filter(V)}(u,s),f=c.map((function(e){return e.node})),l=fe(f,u,r,t);if("NEW_FOCUS"===l){var h=le(a,f,function(e,t){return e.reduce((function(e,r){return e.concat(re(r,t))}),[])}(n,o));return h?{node:h}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===l?l:c[l]}},me=0,ge=!1,be=function(e,t,r){void 0===r&&(r={});var n,i,o=ve(e,t);if(!ge&&o){if(me>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),ge=!0,void setTimeout((function(){ge=!1}),1);me++,n=o.node,i=r.focusOptions,"focus"in n&&n.focus(i),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus(),me--}},ye=function(e){var t=oe(e).filter(J),r=pe(e,e,t),n=new Map,i=ee([r],n,!0),o=ee(t,n).filter((function(e){var t=e.node;return J(t)})).map((function(e){return e.node}));return i.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:o.indexOf(t)>=0,guard:G(t)}}))};function we(e){var t=window.setImmediate;"undefined"!==typeof t?t(e):setTimeout(e,1)}var ke=function(){return document&&document.activeElement===document.body||function(e){void 0===e&&(e=document);var t=ie(e);return!!t&&R(e.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(e){return ne(e,t)}))}()},xe=null,_e=null,Ee=null,Ae=!1,Se=function(){return!0};function Oe(e,t,r,n){var i=null,o=e;do{var a=n[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else{if(!a.lockItem)break;if(o!==e)return;i=null}}while((o+=r)!==t);i&&(i.node.tabIndex=0)}var Me=function(e){return e&&"current"in e?e.current:e},Pe=function(){var e,t=!1;if(xe){var r=xe,n=r.observed,i=r.persistentFocus,o=r.autoFocus,a=r.shards,s=r.crossFrame,u=r.focusOptions,c=n||Ee&&Ee.portaledElement,f=document&&document.activeElement;if(c){var l=[c].concat(a.map(Me).filter(Boolean));if(f&&!function(e){return(xe.whiteList||Se)(e)}(f)||(i||(s?Boolean(Ae):"meanwhile"===Ae)||!ke()||!_e&&o)&&(c&&!(ae(l)||f&&function(e,t){return t.some((function(t){return function e(t,r,n){return r&&(r.host===t&&(!r.activeElement||n.contains(r.activeElement))||r.parentNode&&e(t,r.parentNode,n))}(e,t,t)}))}(f,l)||(e=f,Ee&&Ee.portaledElement===e))&&(document&&!_e&&f&&!o?(f.blur&&f.blur(),document.body.focus()):(t=be(l,_e,{focusOptions:u}),Ee={})),Ae=!1,_e=document&&document.activeElement),document){var h=document&&document.activeElement,d=ye(l),p=d.map((function(e){return e.node})).indexOf(h);p>-1&&(d.filter((function(e){var t=e.guard,r=e.node;return t&&r.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),Oe(p,d.length,1,d),Oe(p,-1,-1,d))}}}return t},je=function(e){Pe()&&e&&(e.stopPropagation(),e.preventDefault())},Te=function(){return we(Pe)},Ce=function(e){var t=e.target,r=e.currentTarget;r.contains(t)||(Ee={observerNode:r,portaledElement:t})},Re=function(){Ae="just",setTimeout((function(){Ae="meanwhile"}),0)};_.assignSyncMedium(Ce),E.assignMedium(Te),A.assignMedium((function(e){return e({moveFocusInside:be,focusInside:ae})}));var Le=C((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!xe&&(document.addEventListener("focusin",je),document.addEventListener("focusout",Te),window.addEventListener("blur",Re));var r=xe,n=r&&t&&t.id===r.id;xe=t,r&&!n&&(r.onDeactivation(),e.filter((function(e){return e.id===r.id})).length||r.returnFocus(!t)),t?(_e=null,n&&r.observed===t.observed||t.onActivation(),Pe(),we(Pe)):(document.removeEventListener("focusin",je),document.removeEventListener("focusout",Te),window.removeEventListener("blur",Re),_e=null)}))((function(){return null})),Ne=n.forwardRef((function(e,t){return n.createElement(P,Object(p.a)({sideCar:Le,ref:t},e))})),Ie=P.propTypes||{};Ie.sideCar,Object(d.a)(Ie,["sideCar"]);Ne.propTypes={};var Be=Ne,Fe=x(),De=function(){},Ue=n.forwardRef((function(e,t){var r=n.useRef(null),i=n.useState({onScrollCapture:De,onWheelCapture:De,onTouchMoveCapture:De}),o=i[0],a=i[1],s=e.forwardProps,u=e.children,c=e.className,f=e.removeScrollBar,l=e.enabled,h=e.shards,d=e.sideCar,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,w=void 0===y?"div":y,k=e.gapMode,x=Object(b.d)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=d,E=v([r,t]),A=Object(b.a)(Object(b.a)({},x),o);return n.createElement(n.Fragment,null,l&&n.createElement(_,{sideCar:Fe,removeScrollBar:f,shards:h,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:k}),s?n.cloneElement(n.Children.only(u),Object(b.a)(Object(b.a)({},A),{ref:E})):n.createElement(w,Object(b.a)({},A,{className:c,ref:E}),u))}));Ue.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ue.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var ze,He=function(e){var t=e.sideCar,r=Object(b.d)(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return n.createElement(i,Object(b.a)({},r))};He.isSideCarExport=!0;function qe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ze||r.nc;return t&&e.setAttribute("nonce",t),e}var Ge=function(){var e=0,t=null;return{add:function(r){var n,i;0==e&&(t=qe())&&(i=r,(n=t).styleSheet?n.styleSheet.cssText=i:n.appendChild(document.createTextNode(i)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Je=function(){var e=function(){var e=Ge();return function(t,r){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&r])}}();return function(t){var r=t.styles,n=t.dynamic;return e(r,n),null}},Ve={left:0,top:0,right:0,gap:0},Ke=function(e){return parseInt(e||"",10)||0},Xe=function(e){if(void 0===e&&(e="margin"),"undefined"===typeof window)return Ve;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[Ke(r),Ke(n),Ke(i)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},We=Je(),Ze=function(e,t,r,n){var i=e.left,o=e.top,a=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat("right-scroll-bar-position"," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat("width-before-scroll-bar"," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat("right-scroll-bar-position"," .").concat("right-scroll-bar-position"," {\n right: 0 ").concat(n,";\n }\n \n .").concat("width-before-scroll-bar"," .").concat("width-before-scroll-bar"," {\n margin-right: 0 ").concat(n,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Ye=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,o=void 0===i?"margin":i,a=n.useMemo((function(){return Xe(o)}),[o]);return n.createElement(We,{styles:Ze(a,!t,o,r?"":"!important")})},Qe=!1;if("undefined"!==typeof window)try{var $e=Object.defineProperty({},"passive",{get:function(){return Qe=!0,!0}});window.addEventListener("test",$e,$e),window.removeEventListener("test",$e,$e)}catch(xt){Qe=!1}var et=!!Qe&&{passive:!1},tt=function(e,t){var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},rt=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!==typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),nt(e,n)){var i=it(e,n);if(i[1]>i[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},nt=function(e,t){return"v"===e?function(e){return tt(e,"overflowY")}(t):function(e){return tt(e,"overflowX")}(t)},it=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},ot=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},at=function(e){return[e.deltaX,e.deltaY]},st=function(e){return e&&"current"in e?e.current:e},ut=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ct=0,ft=[];var lt,ht=(lt=function(e){var t=n.useRef([]),r=n.useRef([0,0]),i=n.useRef(),o=n.useState(ct++)[0],a=n.useState(Je)[0],s=n.useRef(e);n.useEffect((function(){s.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=Object(b.e)([e.lockRef.current],(e.shards||[]).map(st),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var u=n.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var n,o=ot(e),a=r.current,u="deltaX"in e?e.deltaX:a[0]-o[0],c="deltaY"in e?e.deltaY:a[1]-o[1],f=e.target,l=Math.abs(u)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===l&&"range"===f.type)return!1;var h=rt(l,f);if(!h)return!0;if(h?n=l:(n="v"===l?"h":"v",h=rt(l,f)),!h)return!1;if(!i.current&&"changedTouches"in e&&(u||c)&&(i.current=n),!n)return!0;var d=i.current||n;return function(e,t,r,n,i){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*n,s=r.target,u=t.contains(s),c=!1,f=a>0,l=0,h=0;do{var d=it(e,s),p=d[0],v=d[1]-d[2]-o*p;(p||v)&&nt(e,s)&&(l+=v,h+=p),s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(f&&(i&&0===l||!i&&a>l)||!f&&(i&&0===h||!i&&-a>h))&&(c=!0),c}(d,t,e,"h"===d?u:c,!0)}),[]),c=n.useCallback((function(e){var r=e;if(ft.length&&ft[ft.length-1]===a){var n="deltaY"in r?at(r):ot(r),i=t.current.filter((function(e){return e.name===r.type&&e.target===r.target&&(t=e.delta,i=n,t[0]===i[0]&&t[1]===i[1]);var t,i}))[0];if(i&&i.should)r.cancelable&&r.preventDefault();else if(!i){var o=(s.current.shards||[]).map(st).filter(Boolean).filter((function(e){return e.contains(r.target)}));(o.length>0?u(r,o[0]):!s.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),f=n.useCallback((function(e,r,n,i){var o={name:e,delta:r,target:n,should:i};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),l=n.useCallback((function(e){r.current=ot(e),i.current=void 0}),[]),h=n.useCallback((function(t){f(t.type,at(t),t.target,u(t,e.lockRef.current))}),[]),d=n.useCallback((function(t){f(t.type,ot(t),t.target,u(t,e.lockRef.current))}),[]);n.useEffect((function(){return ft.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:d}),document.addEventListener("wheel",c,et),document.addEventListener("touchmove",c,et),document.addEventListener("touchstart",l,et),function(){ft=ft.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,et),document.removeEventListener("touchmove",c,et),document.removeEventListener("touchstart",l,et)}}),[]);var p=e.removeScrollBar,v=e.inert;return n.createElement(n.Fragment,null,v?n.createElement(a,{styles:ut(o)}):null,p?n.createElement(Ye,{gapMode:e.gapMode}):null)},Fe.useMedium(lt),He),dt=n.forwardRef((function(e,t){return n.createElement(Ue,Object(b.a)({},e,{ref:t,sideCar:ht}))}));dt.classNames=Ue.classNames;var pt=dt,vt=r(11),mt=r.n(vt);function gt(){return(gt=Object.assign||function(e){for(var t=1;t=0||(i[r]=e[r]);return i}mt.a.bool,mt.a.bool,mt.a.bool,mt.a.func;var yt=Object(n.forwardRef)((function(e,t){var r=e.as,i=void 0===r?"div":r,a=e.isOpen,s=void 0===a||a,u=bt(e,["as","isOpen"]);return Object(n.useEffect)((function(){s?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame((function(){window.__REACH_DISABLE_TOOLTIPS=!1}))}),[s]),s?Object(n.createElement)(o.a,{"data-reach-dialog-wrapper":""},Object(n.createElement)(wt,gt({ref:t,as:i},u))):null}));var wt=Object(n.forwardRef)((function(e,t){var r=e.allowPinchZoom,i=e.as,o=void 0===i?"div":i,a=e.dangerouslyBypassFocusLock,c=void 0!==a&&a,d=e.dangerouslyBypassScrollLock,p=void 0!==d&&d,v=e.initialFocusRef,m=e.onClick,g=e.onDismiss,b=void 0===g?u:g,y=e.onKeyDown,w=e.onMouseDown,k=e.unstable_lockFocusAcrossFrames,x=void 0===k||k,_=bt(e,["allowPinchZoom","as","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),E=Object(n.useRef)(null),A=Object(n.useRef)(null),S=function(){for(var e=arguments.length,t=new Array(e),r=0;r *"),(function(n){var i,o;if(n!==(null==(i=e.parentNode)||null==(o=i.parentNode)?void 0:o.parentNode)){var a=n.getAttribute("aria-hidden");null!==a&&"false"!==a||(t.push(a),r.push(n),n.setAttribute("aria-hidden","true"))}})),function(){r.forEach((function(e,r){var n=t[r];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}}(A.current):void 0}),[]),Object(n.createElement)(Be,{autoFocus:!0,returnFocus:!0,onActivation:O,disabled:c,crossFrame:x},Object(n.createElement)(pt,{allowPinchZoom:r,enabled:!p},Object(n.createElement)(o,gt({},_,{ref:S,"data-reach-dialog-overlay":"",onClick:h(m,(function(e){E.current===e.target&&(e.stopPropagation(),b(e))})),onKeyDown:h(y,(function(e){"Escape"===e.key&&(e.stopPropagation(),b(e))})),onMouseDown:h(w,(function(e){E.current=e.target}))}))))}));var kt=Object(n.forwardRef)((function(e,t){var r=e.as,i=void 0===r?"div":r,o=e.onClick;e.onKeyDown;var a=bt(e,["as","onClick","onKeyDown"]);return Object(n.createElement)(i,gt({"aria-modal":"true",role:"dialog",tabIndex:-1},a,{ref:t,"data-reach-dialog-content":"",onClick:h(o,(function(e){e.stopPropagation()}))}))}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return d}));var n=r(41),i=r(4),o=r(39),a=(r(499),r(143)),s=r(10),u=new RegExp("^bytes([0-9]+)$"),c=new RegExp("^(u?int)([0-9]*)$"),f=new RegExp("^(.*)\\[([0-9]*)\\]$"),l=new s.a("solidity/5.7.0");function h(e,t){e.length!=t.length&&l.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);var r=[];return e.forEach((function(e,o){r.push(function e(t,r,o){switch(t){case"address":return o?Object(i.o)(r,32):Object(i.a)(r);case"string":return Object(a.b)(r);case"bytes":return Object(i.a)(r);case"bool":return r=r?"0x01":"0x00",o?Object(i.o)(r,32):Object(i.a)(r)}var s=t.match(c);if(s){var h=parseInt(s[2]||"256");return(s[2]&&String(h)!==s[2]||h%8!==0||0===h||h>256)&&l.throwArgumentError("invalid number type","type",t),o&&(h=256),r=n.a.from(r).toTwos(h),Object(i.o)(r,h/8)}if(s=t.match(u)){var d=parseInt(s[1]);return(String(d)!==s[1]||0===d||d>32)&&l.throwArgumentError("invalid bytes type","type",t),Object(i.a)(r).byteLength!==d&&l.throwArgumentError("invalid value for ".concat(t),"value",r),o?Object(i.a)((r+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):r}if((s=t.match(f))&&Array.isArray(r)){var p=s[1];parseInt(s[2]||String(r.length))!=r.length&&l.throwArgumentError("invalid array length for ".concat(t),"value",r);var v=[];return r.forEach((function(t){v.push(e(p,t,!0))})),Object(i.b)(v)}return l.throwArgumentError("invalid type","type",t)}(e,t[o]))})),Object(i.h)(Object(i.b)(r))}function d(e,t){return Object(o.a)(h(e,t))}},function(e,t,r){var n=r(508);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},function(e,t,r){var n=r(503),i=r(514),o=r(584);e.exports=function(e){return function(){var t,r=n(e);if(i()){var a=n(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return o(this,t)}}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(100),i=r(186),o=r(366),a=r(145),s=n.sum32,u=n.sum32_4,c=n.sum32_5,f=o.ch32,l=o.maj32,h=o.s0_256,d=o.s1_256,p=o.g0_256,v=o.g1_256,m=i.BlockHash,g=[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];function b(){if(!(this instanceof b))return new b;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(b,m),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0},p=function(e){var t="";e=(e=(e=(e=(e=a.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r1&&void 0!==arguments[1]&&arguments[1];if(!e)return e;if("string"===typeof e&&!b(e))throw new Error('Given value "'+e+'" is not a valid hex string.');var r=l(e);return t&&(r>Number.MAX_SAFE_INTEGER||r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:y,isHexStrict:b,stripHexPrefix:function(e){return 0!==e&&y(e)?e.replace(/^(-)?0x/i,"$1"):e},leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"===typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+e},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"===typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(i).join(r||"0")},toTwosComplement:function(e){return"0x"+l(e).toTwos(256).toString(16,64)},sha3:k,sha3Raw:function(e){return null===(e=k(e))?w:e},toNumber:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"number"===typeof e?e:v(g(e),t)}}}).call(this,r(51).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(51),i=r(115);t.MAX_UINT64=new i.BN("ffffffffffffffff",16),t.MAX_INTEGER=new i.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new i.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},function(e,t,r){"use strict";(function(e){var n=this&&this.__read||function(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var o=i(r(284)),a=r(115),s=r(356),u=r(161),c=r(372),f=r(146),l=r(290),h=r(228),d=r(296),p=function(){function e(e,t,r,n){void 0===e&&(e=new a.BN(0)),void 0===t&&(t=new a.BN(0)),void 0===r&&(r=c.KECCAK256_RLP),void 0===n&&(n=c.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,i=t.stateRoot,o=t.codeHash;return new e(r?new a.BN((0,f.toBuffer)(r)):void 0,n?new a.BN((0,f.toBuffer)(n)):void 0,i?(0,f.toBuffer)(i):void 0,o?(0,f.toBuffer)(o):void 0)},e.fromRlpSerializedAccount=function(e){var t=a.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=n(t,4),i=r[0],o=r[1],s=r[2],u=r[3];return new e(new a.BN(i),new a.BN(o),s,u)},e.prototype._validate=function(){if(this.nonce.lt(new a.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new a.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,d.bnToUnpaddedBuffer)(this.nonce),(0,d.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return a.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(c.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(c.KECCAK256_NULL)},e}();t.Account=p;t.isValidAddress=function(e){try{(0,h.assertIsString)(e)}catch(t){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};t.toChecksumAddress=function(e,t){(0,h.assertIsHexString)(e);var r=(0,u.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,d.toType)(t,d.TypeOutput.BN).toString()+"0x");for(var i=(0,l.keccakFromString)(n+r).toString("hex"),o="0x",a=0;a=8?o+=r[a].toUpperCase():o+=r[a];return o};t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e};t.generateAddress=function(t,r){(0,h.assertIsBuffer)(t),(0,h.assertIsBuffer)(r);var n=new a.BN(r);return n.isZero()?(0,l.rlphash)([t,null]).slice(-20):(0,l.rlphash)([t,e.from(n.toArray())]).slice(-20)};t.generateAddress2=function(t,r,n){return(0,h.assertIsBuffer)(t),(0,h.assertIsBuffer)(r),(0,h.assertIsBuffer)(n),(0,o.default)(20===t.length),(0,o.default)(32===r.length),(0,l.keccak256)(e.concat([e.from("ff","hex"),t,r,(0,l.keccak256)(n)])).slice(-20)};t.isValidPrivate=function(e){return(0,s.privateKeyVerify)(e)};t.isValidPublic=function(t,r){return void 0===r&&(r=!1),(0,h.assertIsBuffer)(t),64===t.length?(0,s.publicKeyVerify)(e.concat([e.from([4]),t])):!!r&&(0,s.publicKeyVerify)(t)};t.pubToAddress=function(t,r){return void 0===r&&(r=!1),(0,h.assertIsBuffer)(t),r&&64!==t.length&&(t=e.from((0,s.publicKeyConvert)(t,!1).slice(1))),(0,o.default)(64===t.length),(0,l.keccak)(t).slice(-20)},t.publicToAddress=t.pubToAddress;t.privateToPublic=function(t){return(0,h.assertIsBuffer)(t),e.from((0,s.publicKeyCreate)(t,!1)).slice(1)};t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))};t.importPublic=function(t){return(0,h.assertIsBuffer)(t),64!==t.length&&(t=e.from((0,s.publicKeyConvert)(t,!1).slice(1))),t};t.zeroAddress=function(){var e=(0,f.zeros)(20);return(0,f.bufferToHex)(e)};t.isZeroAddress=function(e){try{(0,h.assertIsString)(e)}catch(r){return!1}return(0,t.zeroAddress)()===e}}).call(this,r(51).Buffer)},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){e.exports=r(564)(r(565))},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a0)if("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?x(e,new k):O(e,a,t,!0);else if(a.ended)x(e,new y);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?O(e,a,t,!1):T(e,a)):O(e,a,t,!1)}else n||(a.reading=!1,T(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(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 P(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(j,e))}function j(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,I(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(C,e,t))}function C(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){c("readable nexttick read 0"),e.read(0)}function N(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function F(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(D,t,e))}function D(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):P(this),null;if(0===(e=M(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e0?B(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){x(this,new w("_read()"))},A.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,c("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?u:m;function s(t,n){c("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",d),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",h),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function u(){c("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var f=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,I(e))}}(r);e.on("drain",f);var l=!1;function h(t){c("ondata");var n=e.write(t);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!l&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(t){c("onerror",t),m(),e.removeListener("error",d),0===o(e,"error")&&x(e,t)}function p(){e.removeListener("finish",v),m()}function v(){c("onfinish"),e.removeListener("close",p),m()}function m(){c("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",p),e.once("finish",v),e.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?P(this):i.reading||n.nextTick(L,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(R,this),r},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(R,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"===typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(590)),h(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=B,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(A.from=function(e,t){return void 0===d&&(d=r(591)),d(A,e,t)})}).call(this,r(58),r(71))},function(e,t,r){e.exports=r(114).EventEmitter},function(e,t,r){"use strict";(function(t){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!o&&e?a._writableState?a._writableState.errorEmitted?t.nextTick(n,a):(a._writableState.errorEmitted=!0,t.nextTick(r,a,e)):t.nextTick(r,a,e):o?(t.nextTick(n,a),o(e)):t.nextTick(n,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,r(71))},function(e,t,r){"use strict";var n=r(162).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},function(e,t,r){"use strict";(function(t,n){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;e.exports=A,A.WritableState=E;var a={deprecate:r(291)},s=r(382),u=r(51).Buffer,c=("undefined"!==typeof t?t:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var f,l=r(383),h=r(384).getHighWaterMark,d=r(162).codes,p=d.ERR_INVALID_ARG_TYPE,v=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,y=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,k=d.ERR_UNKNOWN_ENCODING,x=l.errorOrDestroy;function _(){}function E(e,t,a){o=o||r(163),e=e||{},"boolean"!==typeof a&&(a=t instanceof o),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if("function"!==typeof o)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(T,e,t),e._writableState.errorEmitted=!0,x(e,i)):(o(i),e._writableState.errorEmitted=!0,x(e,i),T(e,t))}(e,r,i,t,o);else{var a=P(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||M(e,r),i?n.nextTick(O,e,r,a,o):O(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function A(e){var t=this instanceof(o=o||r(163));if(!t&&!f.call(A,this))return new A(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),s.call(this)}function S(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function O(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),T(e,t)}function M(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,S(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(S(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function j(e,t){e._final((function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(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(j,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}r(52)(A,s),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===A&&(e&&e._writableState instanceof E)}})):f=function(e){return e instanceof this},A.prototype.pipe=function(){x(this,new g)},A.prototype.write=function(e,t,r){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=e,u.isBuffer(i)||i instanceof c);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"===typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!==typeof r&&(r=_),o.ending?function(e,t){var r=new w;x(e,r),n.nextTick(t,r)}(this,r):(s||function(e,t,r,i){var o;return null===r?o=new y:"string"===typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(x(e,o),n.nextTick(i,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=u.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length-1))throw new k(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new v("_write()"))},A.prototype._writev=null,A.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&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,T(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(e,t){t(e)}}).call(this,r(58),r(71))},function(e,t,r){"use strict";e.exports=f;var n=r(162).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(163);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){"use strict";(function(t,n){var i;e.exports=A,A.ReadableState=E;r(114).EventEmitter;var o=function(e,t){return e.listeners(t).length},a=r(389),s=r(51).Buffer,u=("undefined"!==typeof t?t:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var c,f=r(599);c=f&&f.debuglog?f.debuglog("stream"):function(){};var l,h,d,p=r(600),v=r(390),m=r(391).getHighWaterMark,g=r(164).codes,b=g.ERR_INVALID_ARG_TYPE,y=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,k=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(52)(A,a);var x=v.errorOrDestroy,_=["error","close","destroy","pause","resume"];function E(e,t,n){i=i||r(165),e=e||{},"boolean"!==typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(147).StringDecoder),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function A(e){if(i=i||r(165),!(this instanceof A))return new A(e);var t=this instanceof i;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function S(e,t,r,n,i){c("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?P(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,j(e)))}(e,a);else if(i||(o=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof u||"string"===typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(a,t)),o)x(e,o);else if(a.objectMode||t&&t.length>0)if("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?x(e,new k):O(e,a,t,!0);else if(a.ended)x(e,new y);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?O(e,a,t,!1):T(e,a)):O(e,a,t,!1)}else n||(a.reading=!1,T(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(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 P(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(j,e))}function j(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,I(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(C,e,t))}function C(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){c("readable nexttick read 0"),e.read(0)}function N(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function F(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(D,t,e))}function D(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):P(this),null;if(0===(e=M(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e0?B(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){x(this,new w("_read()"))},A.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,c("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?u:m;function s(t,n){c("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",d),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",h),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function u(){c("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var f=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,I(e))}}(r);e.on("drain",f);var l=!1;function h(t){c("ondata");var n=e.write(t);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!l&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(t){c("onerror",t),m(),e.removeListener("error",d),0===o(e,"error")&&x(e,t)}function p(){e.removeListener("finish",v),m()}function v(){c("onfinish"),e.removeListener("close",p),m()}function m(){c("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",p),e.once("finish",v),e.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?P(this):i.reading||n.nextTick(L,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(R,this),r},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(R,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"===typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(602)),h(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=B,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(A.from=function(e,t){return void 0===d&&(d=r(603)),d(A,e,t)})}).call(this,r(58),r(71))},function(e,t,r){e.exports=r(114).EventEmitter},function(e,t,r){"use strict";(function(t){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!o&&e?a._writableState?a._writableState.errorEmitted?t.nextTick(n,a):(a._writableState.errorEmitted=!0,t.nextTick(r,a,e)):t.nextTick(r,a,e):o?(t.nextTick(n,a),o(e)):t.nextTick(n,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,r(71))},function(e,t,r){"use strict";var n=r(164).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},function(e,t,r){"use strict";(function(t,n){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;e.exports=A,A.WritableState=E;var a={deprecate:r(291)},s=r(389),u=r(51).Buffer,c=("undefined"!==typeof t?t:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var f,l=r(390),h=r(391).getHighWaterMark,d=r(164).codes,p=d.ERR_INVALID_ARG_TYPE,v=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,y=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,k=d.ERR_UNKNOWN_ENCODING,x=l.errorOrDestroy;function _(){}function E(e,t,a){o=o||r(165),e=e||{},"boolean"!==typeof a&&(a=t instanceof o),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if("function"!==typeof o)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(T,e,t),e._writableState.errorEmitted=!0,x(e,i)):(o(i),e._writableState.errorEmitted=!0,x(e,i),T(e,t))}(e,r,i,t,o);else{var a=P(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||M(e,r),i?n.nextTick(O,e,r,a,o):O(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function A(e){var t=this instanceof(o=o||r(165));if(!t&&!f.call(A,this))return new A(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),s.call(this)}function S(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function O(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),T(e,t)}function M(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,S(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(S(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function j(e,t){e._final((function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(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(j,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}r(52)(A,s),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===A&&(e&&e._writableState instanceof E)}})):f=function(e){return e instanceof this},A.prototype.pipe=function(){x(this,new g)},A.prototype.write=function(e,t,r){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=e,u.isBuffer(i)||i instanceof c);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"===typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!==typeof r&&(r=_),o.ending?function(e,t){var r=new w;x(e,r),n.nextTick(t,r)}(this,r):(s||function(e,t,r,i){var o;return null===r?o=new y:"string"===typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(x(e,o),n.nextTick(i,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=u.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length-1))throw new k(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new v("_write()"))},A.prototype._writev=null,A.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&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,T(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(e,t){t(e)}}).call(this,r(58),r(71))},function(e,t,r){"use strict";e.exports=f;var n=r(164).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(165);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,v=0|this._g,m=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+d(r[g-15])+r[g-16];for(var b=0;b<64;++b){var y=m+h(u)+c(u,p,v)+a[b]+r[b]|0,w=l(n)+f(n,i,o)|0;m=v,v=p,p=u,u=s+y|0,s=o,o=i,i=n,n=y+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=v+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},function(e,t,r){var n=r(52),i=r(166),o=r(94).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,b=0|this._gh,y=0|this._hh,w=0|this._al,k=0|this._bl,x=0|this._cl,_=0|this._dl,E=0|this._el,A=0|this._fl,S=0|this._gl,O=0|this._hl,M=0;M<32;M+=2)t[M]=e.readInt32BE(4*M),t[M+1]=e.readInt32BE(4*M+4);for(;M<160;M+=2){var P=t[M-30],j=t[M-30+1],T=d(P,j),C=p(j,P),R=v(P=t[M-4],j=t[M-4+1]),L=m(j,P),N=t[M-14],I=t[M-14+1],B=t[M-32],F=t[M-32+1],D=C+I|0,U=T+N+g(D,C)|0;U=(U=U+R+g(D=D+L|0,L)|0)+B+g(D=D+F|0,F)|0,t[M]=U,t[M+1]=D}for(var z=0;z<160;z+=2){U=t[z],D=t[z+1];var H=f(r,n,i),q=f(w,k,x),G=l(r,w),J=l(w,r),V=h(s,E),K=h(E,s),X=a[z],W=a[z+1],Z=c(s,u,b),Y=c(E,A,S),Q=O+K|0,$=y+V+g(Q,O)|0;$=($=($=$+Z+g(Q=Q+Y|0,Y)|0)+X+g(Q=Q+W|0,W)|0)+U+g(Q=Q+D|0,D)|0;var ee=J+q|0,te=G+H+g(ee,J)|0;y=b,O=S,b=u,S=A,u=s,A=E,s=o+$+g(E=_+Q|0,_)|0,o=i,_=x,i=n,x=k,n=r,k=w,r=$+te+g(w=Q+ee|0,Q)|0}this._al=this._al+w|0,this._bl=this._bl+k|0,this._cl=this._cl+x|0,this._dl=this._dl+_|0,this._el=this._el+E|0,this._fl=this._fl+A|0,this._gl=this._gl+S|0,this._hl=this._hl+O|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,k)|0,this._ch=this._ch+i+g(this._cl,x)|0,this._dh=this._dh+o+g(this._dl,_)|0,this._eh=this._eh+s+g(this._el,E)|0,this._fh=this._fh+u+g(this._fl,A)|0,this._gh=this._gh+b+g(this._gl,S)|0,this._hh=this._hh+y+g(this._hl,O)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},function(e,t,r){"use strict";(function(t,n){var i=r(229);e.exports=y;var o,a=r(614);y.ReadableState=b;r(114).EventEmitter;var s=function(e,t){return e.listeners(t).length},u=r(397),c=r(294).Buffer,f=("undefined"!==typeof t?t:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var l=Object.create(r(187));l.inherits=r(52);var h=r(615),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,v=r(616),m=r(398);l.inherits(y,u);var g=["error","close","destroy","pause","resume"];function b(e,t){e=e||{};var n=t instanceof(o=o||r(148));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(147).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function y(e){if(o=o||r(148),!(this instanceof y))return new y(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function w(e,t,r,n,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,_(e)}(e,a)):(i||(o=function(e,t){var r;n=t,c.isBuffer(n)||n instanceof f||"string"===typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):k(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?k(e,a,t,!1):A(e,a)):k(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(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 _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(E,e):E(e))}function E(e){d("emit readable"),e.emit("readable"),P(e)}function A(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(S,e,t))}function S(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function R(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):_(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&T(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e0?j(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&T(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:y;function c(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",c),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",v),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function f(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",c);var l=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(r);e.on("drain",l);var h=!1;var p=!1;function v(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==R(o.pipes,e))&&!h&&(d("false write response, pause",o.awaitDrain),o.awaitDrain++,p=!0),r.pause())}function m(t){d("onerror",t),y(),e.removeListener("error",m),0===s(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),y()}function b(){d("onfinish"),e.removeListener("close",g),y()}function y(){d("unpipe"),r.unpipe(e)}return r.on("data",v),function(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",g),e.once("finish",b),e.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var p=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},v=new f.Logger(l.a),m=new Uint8Array(32);m.fill(0);var g=a.a.from(-1),b=a.a.from(0),y=a.a.from(1),w=a.a.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var k=Object(s.hexZeroPad)(y.toHexString(),32),x=Object(s.hexZeroPad)(b.toHexString(),32),_={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},E=["name","version","chainId","verifyingContract","salt"];function A(e){return function(t){return"string"!==typeof t&&v.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var S={name:A("name"),version:A("version"),chainId:function(e){try{return a.a.from(e).toString()}catch(t){}return v.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return Object(o.getAddress)(e).toLowerCase()}catch(t){}return v.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=Object(s.arrayify)(e);if(32!==t.length)throw new Error("bad length");return Object(s.hexlify)(t)}catch(r){}return v.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function O(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var r=""===t[1],n=parseInt(t[2]||"256");(n%8!==0||n>256||t[2]&&t[2]!==String(n))&&v.throwArgumentError("invalid numeric width","type",e);var i=w.mask(r?n-1:n),c=r?i.add(y).mul(g):b;return function(t){var r=a.a.from(t);return(r.lt(c)||r.gt(i))&&v.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),Object(s.hexZeroPad)(r.toTwos(256).toHexString(),32)}}var f=e.match(/^bytes(\d+)$/);if(f){var l=parseInt(f[1]);return(0===l||l>32||f[1]!==String(l))&&v.throwArgumentError("invalid bytes width","type",e),function(t){return Object(s.arrayify)(t).length!==l&&v.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=Object(s.arrayify)(e),r=t.length%32;return r?Object(s.hexConcat)([t,m.slice(r)]):Object(s.hexlify)(t)}(t)}}switch(e){case"address":return function(e){return Object(s.hexZeroPad)(Object(o.getAddress)(e),32)};case"bool":return function(e){return e?k:x};case"bytes":return function(e){return Object(u.keccak256)(e)};case"string":return function(e){return Object(h.a)(e)}}return null}function M(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var P=function(){function e(t){Object(n.a)(this,e),Object(c.defineReadOnly)(this,"types",Object.freeze(Object(c.deepCopy)(t))),Object(c.defineReadOnly)(this,"_encoderCache",{}),Object(c.defineReadOnly)(this,"_types",{});var r={},i={},o={};Object.keys(t).forEach((function(e){r[e]={},i[e]=[],o[e]={}}));var a=function(e){var n={};t[e].forEach((function(o){n[o.name]&&v.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),n[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&v.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),O(a)||(i[a]||v.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),i[a].push(e),r[e][a]=!0)}))};for(var s in t)a(s);var u=Object.keys(i).filter((function(e){return 0===i[e].length}));for(var f in 0===u.length?v.throwArgumentError("missing primary type","types",t):u.length>1&&v.throwArgumentError("ambiguous primary types or unused types: ".concat(u.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),Object(c.defineReadOnly)(this,"primaryType",u[0]),function e(n,a){a[n]&&v.throwArgumentError("circular type reference to ".concat(JSON.stringify(n)),"types",t),a[n]=!0,Object.keys(r[n]).forEach((function(t){i[t]&&(e(t,a),Object.keys(a).forEach((function(e){o[e][t]=!0})))})),delete a[n]}(this.primaryType,{}),o){var l=Object.keys(o[f]);l.sort(),this._types[f]=M(f,t[f])+l.map((function(e){return M(e,t[e])})).join("")}}return Object(i.a)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,r=O(e);if(r)return r;var n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var i=n[1],o=this.getEncoder(i),a=parseInt(n[3]);return function(e){a>=0&&e.length!==a&&v.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var r=e.map(o);return t._types[i]&&(r=r.map(u.keccak256)),Object(u.keccak256)(Object(s.hexConcat)(r))}}var c=this.types[e];if(c){var f=Object(h.a)(this._types[e]);return function(e){var r=c.map((function(r){var n=r.name,i=r.type,o=t.getEncoder(i)(e[n]);return t._types[i]?Object(u.keccak256)(o):o}));return r.unshift(f),Object(s.hexConcat)(r)}}return v.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||v.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return Object(u.keccak256)(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,r){var n=this;if(O(e))return r(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&v.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(o,e,r)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=n._visit(a,t[o],r),e}),{}):v.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,r,n){return e.from(r).hashStruct(t,n)}},{key:"hashDomain",value:function(t){var r=[];for(var n in t){var i=_[n];i||v.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",t),r.push({name:n,type:i})}return r.sort((function(e,t){return E.indexOf(e.name)-E.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return Object(s.hexConcat)(["0x1901",e.hashDomain(t),e.from(r).hash(n)])}},{key:"hash",value:function(t,r,n){return Object(u.keccak256)(e.encode(t,r,n))}},{key:"resolveNames",value:function(t,r,n,i){return p(this,void 0,void 0,d().mark((function o(){var a,u,f;return d().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:t=Object(c.shallowCopy)(t),a={},t.verifyingContract&&!Object(s.isHexString)(t.verifyingContract,20)&&(a[t.verifyingContract]="0x"),(u=e.from(r)).visit(n,(function(e,t){return"address"!==e||Object(s.isHexString)(t,20)||(a[t]="0x"),t})),o.t0=d().keys(a);case 6:if((o.t1=o.t0()).done){o.next=13;break}return f=o.t1.value,o.next=10,i(f);case 10:a[f]=o.sent,o.next=6;break;case 13:return t.verifyingContract&&a[t.verifyingContract]&&(t.verifyingContract=a[t.verifyingContract]),n=u.visit(n,(function(e,t){return"address"===e&&a[t]?a[t]:t})),o.abrupt("return",{domain:t,value:n});case 16:case"end":return o.stop()}}),o)})))}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var i={},o=[];E.forEach((function(e){var r=t[e];null!=r&&(i[e]=S[e](r),o.push({name:e,type:_[e]}))}));var u=e.from(r),f=Object(c.shallowCopy)(r);return f.EIP712Domain?v.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):f.EIP712Domain=o,u.encode(n),{types:f,domain:i,primaryType:u.primaryType,message:u.visit(n,(function(e,t){if(e.match(/^bytes(\d*)/))return Object(s.hexlify)(Object(s.arrayify)(t));if(e.match(/^u?int/))return a.a.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&v.throwArgumentError("invalid string","value",t),t}return v.throwArgumentError("unsupported type","type",e)}))}}}]),e}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="0x0000000000000000000000000000000000000000"},function(e,t,r){"use strict";function n(e){for(var t=(e=e.slice()).length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return c}));var n=r(8),i=r(13),o=r(474),a=new i.Logger(o.a),s=null;try{if(null==(s=window))throw new Error("try next")}catch(f){try{if(null==(s=e))throw new Error("try next")}catch(f){s={}}}var u=s.crypto||s.msCrypto;function c(e){(e<=0||e>1024||e%1)&&a.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return u.getRandomValues(t),Object(n.arrayify)(t)}u&&u.getRandomValues||(a.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(e){return a.throwError("no secure random source avaialble",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(58))},function(e,t,r){"use strict";var n=r(167);e.exports=function(e){n.copy(e,this)}},function(e,t,r){"use strict";e.exports=function(e,t){t||(t={}),"function"===typeof t&&(t={cmp:t});var r,n="boolean"===typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},o={key:n,value:e[n]};return r(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"===typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!==typeof t)return JSON.stringify(t);var r,a;if(Array.isArray(t)){for(a="[",r=0;r",b=d?">":"<",y=void 0;if(!h&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!m&&void 0!==v&&"number"!=typeof v&&"boolean"!=typeof v)throw new Error(p+" must be number or boolean");if(m){var w=e.util.getData(v.$data,a,e.dataPathArr),k="exclusive"+o,x="exclType"+o,_="exclIsNumber"+o,E="' + "+(O="op"+o)+" + '";i+=" var schemaExcl"+o+" = "+w+"; ",i+=" var "+k+"; var "+x+" = typeof "+(w="schemaExcl"+o)+"; if ("+x+" != 'boolean' && "+x+" != 'undefined' && "+x+" != 'number') { ";var A;y=p;(A=A||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(y||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var S=i;i=A.pop(),!e.compositeRule&&f?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+x+" == 'number' ? ( ("+k+" = "+n+" === undefined || "+w+" "+g+"= "+n+") ? "+l+" "+b+"= "+w+" : "+l+" "+b+" "+n+" ) : ( ("+k+" = "+w+" === true) ? "+l+" "+b+"= "+n+" : "+l+" "+b+" "+n+" ) || "+l+" !== "+l+") { var op"+o+" = "+k+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(y=p,c=e.errSchemaPath+"/"+p,n=w,h=m)}else{E=g;if((_="number"==typeof v)&&h){var O="'"+E+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+v+" "+g+"= "+n+" ? "+l+" "+b+"= "+v+" : "+l+" "+b+" "+n+" ) || "+l+" !== "+l+") { "}else{_&&void 0===s?(k=!0,y=p,c=e.errSchemaPath+"/"+p,n=v,b+="="):(_&&(n=Math[d?"min":"max"](v,s)),v===(!_||n)?(k=!0,y=p,c=e.errSchemaPath+"/"+p,b+="="):(k=!1,E+="="));O="'"+E+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+l+" "+b+" "+n+" || "+l+" !== "+l+") { "}}y=y||t,(A=A||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(y||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+O+", limit: "+n+", exclusive: "+k+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+E+" ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+u:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";S=i;return i=A.pop(),!e.compositeRule&&f?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",f&&(i+=" else { "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,l="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+l+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var d=t,p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+u:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var v=i;return i=p.pop(),!e.compositeRule&&f?e.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",f&&(i+=" else { "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,l="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");var d="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+l+".length ":i+=" ucs2length("+l+") ",i+=" "+d+" "+n+") { ";var p=t,v=v||[];v.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+u:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var m=i;return i=v.pop(),!e.compositeRule&&f?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",f&&(i+=" else { "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,l="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+l+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var d=t,p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+u:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var v=i;return i=p.pop(),!e.compositeRule&&f?e.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",f&&(i+=" else { "),i}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},function(e,t,r){"use strict";var n=r(664),i=r(304),o=i.encodeText,a=i.decodeText,s=i.concat;function u(e){if(Object.prototype.hasOwnProperty.call(n.names,e))return n.names[e];if(Object.prototype.hasOwnProperty.call(n.codes,e))return n.codes[e];throw new Error("Unsupported encoding: ".concat(e))}(t=e.exports=function(e,t){if(!t)throw new Error("requires an encoded Uint8Array");var r=u(e),n=r.name,i=r.codeBuf;return function(e,t){u(e).decode(a(t))}(n,t),s([i,t],i.length+t.length)}).encode=function(e,t){var r=u(e),n=o(r.encode(t));return s([r.codeBuf,n],r.codeBuf.length+n.length)},t.decode=function(e){e instanceof Uint8Array&&(e=a(e));var t=e[0];return["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(t)&&(e=e.toLowerCase()),u(e[0]).decode(e.substring(1))},t.isEncoded=function(e){if(e instanceof Uint8Array&&(e=a(e)),"[object String]"!==Object.prototype.toString.call(e))return!1;try{return u(e[0]).name}catch(t){return!1}},t.encoding=u,t.encodingFromData=function(e){return e instanceof Uint8Array&&(e=a(e)),u(e[0])};var c=Object.freeze(n.names),f=Object.freeze(n.codes);t.names=c,t.codes=f},function(e,t,r){"use strict";var n=r(225),i=r(672).bases;function o(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}var a=o("utf8","u",(function(e){return"u"+new TextDecoder("utf8").decode(e)}),(function(e){return(new TextEncoder).encode(e.substring(1))})),s=o("ascii","a",(function(e){for(var t="a",r=0;r1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.decoder.decode("".concat(r.prefix).concat(e))}},function(e,t,r){"use strict";var n=r(305),i=r(306),o=r(417);function a(e){return parseInt(i(e,"base16"),16)}e.exports={numberToUint8Array:function(e){var t=e.toString(16);t.length%2===1&&(t="0"+t);return o(t,"base16")},uint8ArrayToNumber:a,varintUint8ArrayEncode:function(e){return Uint8Array.from(n.encode(a(e)))},varintEncode:function(e){return Uint8Array.from(n.encode(e))}}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n1&&(t=Array.prototype.slice.call(arguments));var r=e(t);if("object"===typeof r)for(var n=r.length,i=0;i1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=o},function(e,t,r){var n=r(310),i={};for(var o in n)n.hasOwnProperty(o)&&(i[n[o]]=o);var a=e.exports={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"]}};for(var s in a)if(a.hasOwnProperty(s)){if(!("channels"in a[s]))throw new Error("missing channels property: "+s);if(!("labels"in a[s]))throw new Error("missing channel labels property: "+s);if(a[s].labels.length!==a[s].channels)throw new Error("channel and label counts mismatch: "+s);var u=a[s].channels,c=a[s].labels;delete a[s].channels,delete a[s].labels,Object.defineProperty(a[s],"channels",{value:u}),Object.defineProperty(a[s],"labels",{value:c})}a.rgb.hsl=function(e){var t,r,n=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),u=s-a;return s===a?t=0:n===s?t=(i-o)/u:i===s?t=2+(o-n)/u:o===s&&(t=4+(n-i)/u),(t=Math.min(60*t,360))<0&&(t+=360),r=(a+s)/2,[t,100*(s===a?0:r<=.5?u/(s+a):u/(2-s-a)),100*r]},a.rgb.hsv=function(e){var t,r,n,i,o,a=e[0]/255,s=e[1]/255,u=e[2]/255,c=Math.max(a,s,u),f=c-Math.min(a,s,u),l=function(e){return(c-e)/6/f+.5};return 0===f?i=o=0:(o=f/c,t=l(a),r=l(s),n=l(u),a===c?i=n-r:s===c?i=1/3+t-n:u===c&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},a.rgb.hwb=function(e){var t=e[0],r=e[1],n=e[2];return[a.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(r,n))),100*(n=1-1/255*Math.max(t,Math.max(r,n)))]},a.rgb.cmyk=function(e){var t,r=e[0]/255,n=e[1]/255,i=e[2]/255;return[100*((1-r-(t=Math.min(1-r,1-n,1-i)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},a.rgb.keyword=function(e){var t=i[e];if(t)return t;var r,o,a,s=1/0;for(var u in n)if(n.hasOwnProperty(u)){var c=n[u],f=(o=e,a=c,Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)+Math.pow(o[2]-a[2],2));f.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},a.rgb.lab=function(e){var t=a.rgb.xyz(e),r=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.hsl.rgb=function(e){var t,r,n,i,o,a=e[0]/360,s=e[1]/100,u=e[2]/100;if(0===s)return[o=255*u,o,o];t=2*u-(r=u<.5?u*(1+s):u+s-u*s),i=[0,0,0];for(var c=0;c<3;c++)(n=a+1/3*-(c-1))<0&&n++,n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c]=255*o;return i},a.hsl.hsv=function(e){var t=e[0],r=e[1]/100,n=e[2]/100,i=r,o=Math.max(n,.01);return r*=(n*=2)<=1?n:2-n,i*=o<=1?o:2-o,[t,100*(0===n?2*i/(o+i):2*r/(n+r)),100*((n+r)/2)]},a.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),a=255*n*(1-r),s=255*n*(1-r*o),u=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,u,a];case 1:return[s,n,a];case 2:return[a,n,u];case 3:return[a,s,n];case 4:return[u,a,n];case 5:return[n,a,s]}},a.hsv.hsl=function(e){var t,r,n,i=e[0],o=e[1]/100,a=e[2]/100,s=Math.max(a,.01);return n=(2-o)*a,r=o*s,[i,100*(r=(r/=(t=(2-o)*s)<=1?t:2-t)||0),100*(n/=2)]},a.hwb.rgb=function(e){var t,r,n,i,o,a,s,u=e[0]/360,c=e[1]/100,f=e[2]/100,l=c+f;switch(l>1&&(c/=l,f/=l),n=6*u-(t=Math.floor(6*u)),0!==(1&t)&&(n=1-n),i=c+n*((r=1-f)-c),t){default:case 6:case 0:o=r,a=i,s=c;break;case 1:o=i,a=r,s=c;break;case 2:o=c,a=r,s=i;break;case 3:o=c,a=i,s=r;break;case 4:o=i,a=c,s=r;break;case 5:o=r,a=c,s=i}return[255*o,255*a,255*s]},a.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},a.xyz.rgb=function(e){var t,r,n,i=e[0]/100,o=e[1]/100,a=e[2]/100;return r=-.9689*i+1.8758*o+.0415*a,n=.0557*i+-.204*o+1.057*a,t=(t=3.2406*i+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},a.xyz.lab=function(e){var t=e[0],r=e[1],n=e[2];return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},a.lab.xyz=function(e){var t,r,n,i=e[0];t=e[1]/500+(r=(i+16)/116),n=r-e[2]/200;var o=Math.pow(r,3),a=Math.pow(t,3),s=Math.pow(n,3);return r=o>.008856?o:(r-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,[t*=95.047,r*=100,n*=108.883]},a.lab.lch=function(e){var t,r=e[0],n=e[1],i=e[2];return(t=360*Math.atan2(i,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+i*i),t]},a.lch.lab=function(e){var t,r=e[0],n=e[1];return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]},a.rgb.ansi16=function(e){var t=e[0],r=e[1],n=e[2],i=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return 2===i&&(o+=60),o},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){var t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},a.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},a.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var r;return e-=16,[Math.floor(e/36)/5*255,Math.floor((r=e%36)/6)/5*255,r%6/5*255]},a.rgb.hex=function(e){var 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},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var r=t[0];3===t[0].length&&(r=r.split("").map((function(e){return e+e})).join(""));var n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},a.rgb.hcg=function(e){var t,r=e[0]/255,n=e[1]/255,i=e[2]/255,o=Math.max(Math.max(r,n),i),a=Math.min(Math.min(r,n),i),s=o-a;return t=s<=0?0:o===r?(n-i)/s%6:o===n?2+(i-r)/s:4+(r-n)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?a/(1-s):0)]},a.hsl.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=1,i=0;return(n=r<.5?2*t*r:2*t*(1-r))<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},a.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=t*r,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},a.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];var i,o=[0,0,0],a=t%1*6,s=a%1,u=1-s;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=u,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=u,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=u}return i=(1-r)*n,[255*(r*o[0]+i),255*(r*o[1]+i),255*(r*o[2]+i)]},a.hcg.hsv=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t),n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},a.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100*(1-t)+.5*t,n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},a.hcg.hwb=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},a.hwb.hcg=function(e){var t=e[1]/100,r=1-e[2]/100,n=r-t,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]},a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=r(311),u=a(r(786)),c=o(r(232)),f=o(r(810)),l=o(r(814)),h=o(r(824)),d=r(455),p=function(){function e(t,r){this._src=t,this.opts=d({},r,e.DefaultOpts),this.opts.combinedFilter=h.combineFilters(this.opts.filters)}return e.from=function(e){return new u.default(e)},e.prototype._process=function(e,t){var r=t.quantizer,n=t.generator;return e.scaleDown(t),e.applyFilter(t.combinedFilter).then((function(e){return r(e.data,t)})).then((function(e){return s.Swatch.applyFilter(e,t.combinedFilter)})).then((function(e){return Promise.resolve(n(e))}))},e.prototype.palette=function(){return this.swatches()},e.prototype.swatches=function(){return this._palette},e.prototype.getPalette=function(e){var t=this,r=new this.opts.ImageClass,n=r.load(this._src).then((function(e){return t._process(e,t.opts)})).then((function(e){return t._palette=e,r.remove(),e}),(function(e){throw r.remove(),e}));return e&&n.then((function(t){return e(null,t)}),(function(t){return e(t)})),n},e.Builder=u.default,e.Quantizer=f,e.Generator=l,e.Filter=h,e.Util=c,e.Swatch=s.Swatch,e.DefaultOpts={colorCount:64,quality:5,generator:l.Default,ImageClass:null,quantizer:f.MMCQ,filters:[h.Default]},e}();t.default=p},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++rf))return!1;var h=u.get(e),d=u.get(t);if(h&&d)return h==t&&d==e;var p=-1,v=!0,m=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++p2?t[2]:void 0;for(c&&o(t[0],t[1],c)&&(n=1);++r1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||o===n.RFC1738&&(40===f||41===f)?u+=s.charAt(c):f<128?u+=a[f]:f<2048?u+=a[192|f>>6]+a[128|63&f]:f<55296||f>=57344?u+=a[224|f>>12]+a[128|f>>6&63]+a[128|63&f]:(c+=1,f=65536+((1023&f)<<10|1023&s.charCodeAt(c)),u+=a[240|f>>18]+a[128|f>>12&63]+a[128|f>>6&63]+a[128|63&f])}return u},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n(u=(a=Math.ceil(h/7))>u?a+1:u+1)&&(o=u,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for((u=c.length)-(o=f.length)<0&&(o=u,n=f,f=c,c=n),r=0;o;)r=(c[--o]=c[o]+f[o]+r)/p|0,c[o]%=p;for(r&&(c.unshift(r),++i),u=c.length;0==c[--u];)c.pop();return t.d=c,t.e=i,s?O(t,h):t}function b(e,t,r){if(e!==~~e||er)throw Error(c+e)}function y(e){var t,r,n,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;te.e^o.s<0?1:-1;for(t=0,r=(n=o.d.length)<(i=e.d.length)?n:i;te.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1},m.decimalPlaces=m.dp=function(){var e=this,t=e.d.length-1,r=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)r--;return r<0?0:r},m.dividedBy=m.div=function(e){return w(this,new this.constructor(e))},m.dividedToIntegerBy=m.idiv=function(e){var t=this.constructor;return O(w(this,new t(e),0,1),t.precision)},m.equals=m.eq=function(e){return!this.cmp(e)},m.exponent=function(){return x(this)},m.greaterThan=m.gt=function(e){return this.cmp(e)>0},m.greaterThanOrEqualTo=m.gte=function(e){return this.cmp(e)>=0},m.isInteger=m.isint=function(){return this.e>this.d.length-2},m.isNegative=m.isneg=function(){return this.s<0},m.isPositive=m.ispos=function(){return this.s>0},m.isZero=function(){return 0===this.s},m.lessThan=m.lt=function(e){return this.cmp(e)<0},m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1},m.logarithm=m.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(void 0===e)e=new n(10);else if((e=new n(e)).s<1||e.eq(o))throw Error(u+"NaN");if(r.s<1)throw Error(u+(r.s?"NaN":"-Infinity"));return r.eq(o)?new n(0):(s=!1,t=w(A(r,a),A(e,a),a),s=!0,O(t,i))},m.minus=m.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?M(t,e):g(t,(e.s=-e.s,e))},m.modulo=m.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(!(e=new n(e)).s)throw Error(u+"NaN");return r.s?(s=!1,t=w(r,e,0,1).times(e),s=!0,r.minus(t)):O(new n(r),i)},m.naturalExponential=m.exp=function(){return k(this)},m.naturalLogarithm=m.ln=function(){return A(this)},m.negated=m.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},m.plus=m.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?g(t,e):M(t,(e.s=-e.s,e))},m.precision=m.sd=function(e){var t,r,n,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(c+e);if(t=x(i)+1,r=7*(n=i.d.length-1)+1,n=i.d[n]){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},m.squareRoot=m.sqrt=function(){var e,t,r,n,i,o,a,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(u+"NaN")}for(e=x(c),s=!1,0==(i=Math.sqrt(+c))||i==1/0?(((t=y(c.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=l((e+1)/2)-(e<0||e%2),n=new f(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):n=new f(i.toString()),i=a=(r=f.precision)+3;;)if(n=(o=n).plus(w(c,o,a+2)).times(.5),y(o.d).slice(0,a)===(t=y(n.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(O(o,r+1,0),o.times(o).eq(c)){n=o;break}}else if("9999"!=t)break;a+=4}return s=!0,O(n,r)},m.times=m.mul=function(e){var t,r,n,i,o,a,u,c,f,l=this,h=l.constructor,d=l.d,v=(e=new h(e)).d;if(!l.s||!e.s)return new h(0);for(e.s*=l.s,r=l.e+e.e,(c=d.length)<(f=v.length)&&(o=d,d=v,v=o,a=c,c=f,f=a),o=[],n=a=c+f;n--;)o.push(0);for(n=f;--n>=0;){for(t=0,i=c+n;i>n;)u=o[i]+v[n]*d[i-n-1]+t,o[i--]=u%p|0,t=u/p|0;o[i]=(o[i]+t)%p|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,s?O(e,h.precision):e},m.toDecimalPlaces=m.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(b(e,0,1e9),void 0===t?t=n.rounding:b(t,0,8),O(r,e+x(r)+1,t))},m.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=P(n,!0):(b(e,0,1e9),void 0===t?t=i.rounding:b(t,0,8),r=P(n=O(new i(n),e+1,t),!0,e+1)),r},m.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return void 0===e?P(i):(b(e,0,1e9),void 0===t?t=o.rounding:b(t,0,8),r=P((n=O(new o(i),e+x(i)+1,t)).abs(),!1,e+x(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)},m.toInteger=m.toint=function(){var e=this,t=e.constructor;return O(new t(e),x(e)+1,t.rounding)},m.toNumber=function(){return+this},m.toPower=m.pow=function(e){var t,r,n,i,a,c,f=this,h=f.constructor,d=+(e=new h(e));if(!e.s)return new h(o);if(!(f=new h(f)).s){if(e.s<1)throw Error(u+"Infinity");return f}if(f.eq(o))return f;if(n=h.precision,e.eq(o))return O(f,n);if(c=(t=e.e)>=(r=e.d.length-1),a=f.s,c){if((r=d<0?-d:d)<=9007199254740991){for(i=new h(o),t=Math.ceil(n/7+4),s=!1;r%2&&j((i=i.times(f)).d,t),0!==(r=l(r/2));)j((f=f.times(f)).d,t);return s=!0,e.s<0?new h(o).div(i):O(i,n)}}else if(a<0)throw Error(u+"NaN");return a=a<0&&1&e.d[Math.max(t,r)]?-1:1,f.s=1,s=!1,i=e.times(A(f,n+12)),s=!0,(i=k(i)).s=a,i},m.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return void 0===e?n=P(i,(r=x(i))<=o.toExpNeg||r>=o.toExpPos):(b(e,1,1e9),void 0===t?t=o.rounding:b(t,0,8),n=P(i=O(new o(i),e,t),e<=(r=x(i))||r<=o.toExpNeg,e)),n},m.toSignificantDigits=m.tosd=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(b(e,1,1e9),void 0===t?t=r.rounding:b(t,0,8)),O(new r(this),e,t)},m.toString=m.valueOf=m.val=m.toJSON=function(){var e=this,t=x(e),r=e.constructor;return P(e,t<=r.toExpNeg||t>=r.toExpPos)};var w=function(){function e(e,t){var r,n=0,i=e.length;for(e=e.slice();i--;)r=e[i]*t+n,e[i]=r%p|0,n=r/p|0;return n&&e.unshift(n),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function r(e,t,r){for(var n=0;r--;)e[r]-=n,n=e[r]1;)e.shift()}return function(n,i,o,a){var s,c,f,l,h,d,v,m,g,b,y,w,k,_,E,A,S,M,P=n.constructor,j=n.s==i.s?1:-1,T=n.d,C=i.d;if(!n.s)return new P(n);if(!i.s)throw Error(u+"Division by zero");for(c=n.e-i.e,S=C.length,E=T.length,m=(v=new P(j)).d=[],f=0;C[f]==(T[f]||0);)++f;if(C[f]>(T[f]||0)&&--c,(w=null==o?o=P.precision:a?o+(x(n)-x(i))+1:o)<0)return new P(0);if(w=w/7+2|0,f=0,1==S)for(l=0,C=C[0],w++;(f1&&(C=e(C,l),T=e(T,l),S=C.length,E=T.length),_=S,b=(g=T.slice(0,S)).length;b=p/2&&++A;do{l=0,(s=t(C,g,S,b))<0?(y=g[0],S!=b&&(y=y*p+(g[1]||0)),(l=y/A|0)>1?(l>=p&&(l=p-1),1==(s=t(h=e(C,l),g,d=h.length,b=g.length))&&(l--,r(h,S16)throw Error(f+x(e));if(!e.s)return new d(o);for(null==t?(s=!1,u=p):u=t,a=new d(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(u+=Math.log(h(2,l))/Math.LN10*2+5|0,r=n=i=new d(o),d.precision=u;;){if(n=O(n.times(e),u),r=r.times(++c),y((a=i.plus(w(n,r,u))).d).slice(0,u)===y(i.d).slice(0,u)){for(;l--;)i=O(i.times(i),u);return d.precision=p,null==t?(s=!0,O(i,p)):i}i=a}}function x(e){for(var t=7*e.e,r=e.d[0];r>=10;r/=10)t++;return t}function _(e,t,r){if(t>e.LN10.sd())throw s=!0,r&&(e.precision=r),Error(u+"LN10 precision limit exceeded");return O(new e(e.LN10),t)}function E(e){for(var t="";e--;)t+="0";return t}function A(e,t){var r,n,i,a,c,f,l,h,d,p=1,v=e,m=v.d,g=v.constructor,b=g.precision;if(v.s<1)throw Error(u+(v.s?"NaN":"-Infinity"));if(v.eq(o))return new g(0);if(null==t?(s=!1,h=b):h=t,v.eq(10))return null==t&&(s=!0),_(g,h);if(h+=10,g.precision=h,n=(r=y(m)).charAt(0),a=x(v),!(Math.abs(a)<15e14))return l=_(g,h+2,b).times(a+""),v=A(new g(n+"."+r.slice(1)),h-10).plus(l),g.precision=b,null==t?(s=!0,O(v,b)):v;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=y((v=v.times(e)).d)).charAt(0),p++;for(a=x(v),n>1?(v=new g("0."+r),a++):v=new g(n+"."+r.slice(1)),f=c=v=w(v.minus(o),v.plus(o),h),d=O(v.times(v),h),i=3;;){if(c=O(c.times(d),h),y((l=f.plus(w(c,new g(i),h))).d).slice(0,h)===y(f.d).slice(0,h))return f=f.times(2),0!==a&&(f=f.plus(_(g,h+2,b).times(a+""))),f=w(f,new g(p),h),g.precision=b,null==t?(s=!0,O(f,b)):f;f=l,i+=2}}function S(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);)++n;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(n,i)){if(i-=n,r=r-n-1,e.e=l(r/7),e.d=[],n=(r+1)%7,r<0&&(n+=7),nv||e.e<-v))throw Error(f+r)}else e.s=0,e.e=0,e.d=[0];return e}function O(e,t,r){var n,i,o,a,u,c,d,m,g=e.d;for(a=1,o=g[0];o>=10;o/=10)a++;if((n=t-a)<0)n+=7,i=t,d=g[m=0];else{if((m=Math.ceil((n+1)/7))>=(o=g.length))return e;for(d=o=g[m],a=1;o>=10;o/=10)a++;i=(n%=7)-7+a}if(void 0!==r&&(u=d/(o=h(10,a-i-1))%10|0,c=t<0||void 0!==g[m+1]||d%o,c=r<4?(u||c)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||c||6==r&&(n>0?i>0?d/h(10,a-i):0:g[m-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return c?(o=x(e),g.length=1,t=t-o-1,g[0]=h(10,(7-t%7)%7),e.e=l(-t/7)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(0==n?(g.length=m,o=1,m--):(g.length=m+1,o=h(10,7-n),g[m]=i>0?(d/h(10,a-i)%h(10,i)|0)*o:0),c)for(;;){if(0==m){(g[0]+=o)==p&&(g[0]=1,++e.e);break}if(g[m]+=o,g[m]!=p)break;g[m--]=0,o=1}for(n=g.length;0===g[--n];)g.pop();if(s&&(e.e>v||e.e<-v))throw Error(f+x(e));return e}function M(e,t){var r,n,i,o,a,u,c,f,l,h,d=e.constructor,v=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),s?O(t,v):t;if(c=e.d,h=t.d,n=t.e,f=e.e,c=c.slice(),a=f-n){for((l=a<0)?(r=c,a=-a,u=h.length):(r=h,n=f,u=c.length),a>(i=Math.max(Math.ceil(v/7),u)+2)&&(a=i,r.length=1),r.reverse(),i=a;i--;)r.push(0);r.reverse()}else{for((l=(i=c.length)<(u=h.length))&&(u=i),i=0;i0;--i)c[u++]=0;for(i=h.length;i>a;){if(c[--i]0?o=o.charAt(0)+"."+o.slice(1)+E(n):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+E(-i-1)+o,r&&(n=r-a)>0&&(o+=E(n))):i>=a?(o+=E(i+1-a),r&&(n=r-i-1)>0&&(o=o+"."+E(n))):((n=i+1)0&&(i+1===a&&(o+="."),o+=E(n))),e.s<0?"-"+o:o}function j(e,t){if(e.length>t)return e.length=t,!0}function T(e){if(!e||"object"!==typeof e)throw Error(u+"Object expected");var t,r,n,i=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t=i[t+1]&&n<=i[t+2]))throw Error(c+r+": "+n);this[r]=n}if(void 0!==(n=e[r="LN10"])){if(n!=Math.LN10)throw Error(c+r+": "+n);this[r]=new this(n)}return this}(a=function e(t){var r,n,i;function o(e){var t=this;if(!(t instanceof o))return new o(e);if(t.constructor=o,e instanceof o)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"===typeof e){if(0*e!==0)throw Error(c+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):S(t,e.toString())}if("string"!==typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!d.test(e))throw Error(c+e);S(t,e)}if(o.prototype=m,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=e,o.config=o.set=T,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),l=s((function(e,t){var r=t;r.assert=u,r.toArray=f.toArray,r.zero2=f.zero2,r.toHex=f.toHex,r.encode=f.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0===(1&u)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0===(1&c)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"===typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i.a(e,"hex","le")}})),h=l.getNAF,d=l.getJSF,p=l.assert;function v(e,t){this.type=e,this.p=new i.a(t.p,16),this.red=t.prime?i.a.red(t.prime):i.a.mont(this.p),this.zero=new i.a(0).toRed(this.red),this.one=new i.a(1).toRed(this.red),this.two=new i.a(2).toRed(this.red),this.n=t.n&&new i.a(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var m=v;function g(e,t){this.curve=e,this.type=t,this.precomputed=null}v.prototype.point=function(){throw new Error("Not implemented")},v.prototype.validate=function(){throw new Error("Not implemented")},v.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=h(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+n[u];s.push(a)}for(var c=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=i;l>0;l--){for(o=0;o=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=o[s];p(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},v.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,u=this._wnafT1,c=this._wnafT2,f=this._wnafT3,l=0;for(o=0;o=1;o-=2){var v=o-1,m=o;if(1===u[v]&&1===u[m]){var g=[t[v],null,null,t[m]];0===t[v].y.cmp(t[m].y)?(g[1]=t[v].add(t[m]),g[2]=t[v].toJ().mixedAdd(t[m].neg())):0===t[v].y.cmp(t[m].y.redNeg())?(g[1]=t[v].toJ().mixedAdd(t[m]),g[2]=t[v].add(t[m].neg())):(g[1]=t[v].toJ().mixedAdd(t[m]),g[2]=t[v].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=d(r[v],r[m]);for(l=Math.max(y[0].length,l),f[v]=new Array(l),f[m]=new Array(l),a=0;a=0;o--){for(var E=0;o>=0;){var A=!0;for(a=0;a=0&&E++,x=x.dblp(E),o<0)break;for(a=0;a0?s=c[a][S-1>>1]:S<0&&(s=c[a][-S-1>>1].neg()),x="affine"===s.type?x.mixedAdd(s):x.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},g.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},w.prototype.pointFromX=function(e,t){(e=new i.a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},x.prototype.isInfinity=function(){return this.inf},x.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},x.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},x.prototype.getX=function(){return this.x.fromRed()},x.prototype.getY=function(){return this.y.fromRed()},x.prototype.mul=function(e){return e=new i.a(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},x.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},x.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},x.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},x.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},x.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},b(_,m.BasePoint),w.prototype.jpoint=function(e,t,r){return new _(this,e,t,r)},_.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},_.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},_.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},_.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},_.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},_.prototype.inspect=function(){return this.isInfinity()?"":""},_.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var E=s((function(e,t){var r=t;r.base=m,r.short=k,r.mont=null,r.edwards=null})),A=s((function(e,t){var r,n=t,i=l.assert;function o(e){"short"===e.type?this.curve=new E.short(e):"edwards"===e.type?this.curve=new E.edwards(e):this.curve=new E.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(u){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function S(e){if(!(this instanceof S))return new S(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=f.toArray(e.entropy,e.entropyEnc||"hex"),r=f.toArray(e.nonce,e.nonceEnc||"hex"),n=f.toArray(e.pers,e.persEnc||"hex");u(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var O=S;S.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},S.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=f.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var T=l.assert;function C(e,t){if(e instanceof C)return e;this._importDER(e,t)||(T(e.r&&e.s,"Signature without r or s"),this.r=new i.a(e.r,16),this.s=new i.a(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var R=C;function L(){this.place=0}function N(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function I(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}C.prototype._importDER=function(e,t){e=l.toArray(e,t);var r=new L;if(48!==e[r.place++])return!1;var n=N(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=N(e,r);if(!1===o)return!1;var a=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var s=N(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var u=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new i.a(a),this.s=new i.a(u),this.recoveryParam=null,!0},C.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=I(t),r=I(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];B(n,t.length),(n=n.concat(t)).push(2),B(n,r.length);var i=n.concat(r),o=[48];return B(o,i.length),o=o.concat(i),l.encode(o,e)};var F=function(){throw new Error("unsupported")},D=l.assert;function U(e){if(!(this instanceof U))return new U(e);"string"===typeof e&&(D(Object.prototype.hasOwnProperty.call(A,e),"Unknown curve "+e),e=A[e]),e instanceof A.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var z=U;U.prototype.keyPair=function(e){return new j(this,e)},U.prototype.keyFromPrivate=function(e,t){return j.fromPrivate(this,e,t)},U.prototype.keyFromPublic=function(e,t){return j.fromPublic(this,e,t)},U.prototype.genKeyPair=function(e){e||(e={});for(var t=new O({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||F(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i.a(2));;){var o=new i.a(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},U.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},U.prototype.sign=function(e,t,r,n){"object"===typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i.a(e,16));for(var o=this.n.byteLength(),a=t.getPrivate().toArray("be",o),s=e.toArray("be",o),u=new O({hash:this.hash,entropy:a,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new i.a(1)),f=0;;f++){var l=n.k?n.k(f):new i.a(u.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var h=this.g.mul(l);if(!h.isInfinity()){var d=h.getX(),p=d.umod(this.n);if(0!==p.cmpn(0)){var v=l.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var m=(h.getY().isOdd()?1:0)|(0!==d.cmp(p)?2:0);return n.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),m^=1),new R({r:p,s:v,recoveryParam:m})}}}}}},U.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i.a(e,16)),r=this.keyFromPublic(r,n);var o=(t=new R(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),f)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},U.prototype.recoverPubKey=function(e,t,r,n){D((3&r)===r,"The recovery param is more than two bits"),t=new R(t,n);var o=this.n,a=new i.a(e),s=t.r,u=t.s,c=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var l=t.r.invm(o),h=o.sub(a).mul(l).umod(o),d=u.mul(l).umod(o);return this.g.mulAdd(h,s,d)},U.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new R(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var H=s((function(e,t){var r=t;r.version="6.5.4",r.utils=l,r.rand=function(){throw new Error("unsupported")},r.curve=E,r.curves=A,r.ec=z,r.eddsa=null})).ec}).call(this,r(58))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(130);function i(){return(i=Object.assign||function(e){for(var t=1;t3&&r&&r(o.responseText,o)},o.send(n)}catch(c){console&&console.log(c)}}function d(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:JSON.parse,parsePayload:function(e,t,r){return Object(o.a)({},t,r||"")},crossDomain:!1,ajax:h}}var p=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(n.a)(this,e),this.init(t,r),this.type="backend"}return Object(i.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.services=e,this.options=f(t,this.options||{},d())}},{key:"readMulti",value:function(e,t,r){var n=this.options.loadPath;"function"===typeof this.options.loadPath&&(n=this.options.loadPath(e,t));var i=this.services.interpolator.interpolate(n,{lng:e.join("+"),ns:t.join("+")});this.loadUrl(i,r)}},{key:"read",value:function(e,t,r){var n=this.options.loadPath;"function"===typeof this.options.loadPath&&(n=this.options.loadPath([e],[t]));var i=this.services.interpolator.interpolate(n,{lng:e,ns:t});this.loadUrl(i,r)}},{key:"loadUrl",value:function(e,t){var r=this;this.options.ajax(e,this.options,(function(n,i){if(i.status>=500&&i.status<600)return t("failed loading "+e,!0);if(i.status>=400&&i.status<500)return t("failed loading "+e,!1);var o,a;try{o=r.options.parse(n,e)}catch(s){a="failed parsing "+e+" to json"}if(a)return t(a,!1);t(null,o)}))}},{key:"create",value:function(e,t,r,n){var i=this;"string"===typeof e&&(e=[e]);var o=this.options.parsePayload(t,r,n);e.forEach((function(e){var r=i.services.interpolator.interpolate(i.options.addPath,{lng:e,ns:t});i.options.ajax(r,i.options,(function(e,t){}),o)}))}}]),e}();p.type="backend",t.a=p},function(e,t,r){"use strict";var n=r(54),i=r(55),o=[],a=o.forEach,s=o.slice;function u(e){return a.call(s.call(arguments,1),(function(t){if(t)for(var r in t)void 0===e[r]&&(e[r]=t[r])})),e}var c=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,f=function(e,t,r){var n=r||{};n.path=n.path||"/";var i=e+"="+encodeURIComponent(t);if(n.maxAge>0){var o=n.maxAge-0;if(isNaN(o))throw new Error("maxAge should be a Number");i+="; Max-Age="+Math.floor(o)}if(n.domain){if(!c.test(n.domain))throw new TypeError("option domain is invalid");i+="; Domain="+n.domain}if(n.path){if(!c.test(n.path))throw new TypeError("option path is invalid");i+="; Path="+n.path}if(n.expires){if("function"!==typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");i+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch("string"===typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},l=function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*r*1e3)),n&&(i.domain=n),document.cookie=f(e,encodeURIComponent(t),i)},h=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n0)r[n].substring(0,i)===e.lookupQuerystring&&(t=r[n].substring(i+1))}return t}},v=null,m=function(){if(null!==v)return v;try{v="undefined"!==window&&null!==window.localStorage;window.localStorage.setItem("i18next.translate.boo","foo"),window.localStorage.removeItem("i18next.translate.boo")}catch(e){v=!1}return v},g={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&m()){var r=window.localStorage.getItem(e.lookupLocalStorage);r&&(t=r)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&m()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},b=null,y=function(){if(null!==b)return b;try{b="undefined"!==window&&null!==window.sessionStorage;window.sessionStorage.setItem("i18next.translate.boo","foo"),window.sessionStorage.removeItem("i18next.translate.boo")}catch(e){b=!1}return b},w={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&y()){var r=window.sessionStorage.getItem(e.lookupSessionStorage);r&&(t=r)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&y()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},k={name:"navigator",lookup:function(e){var t=[];if("undefined"!==typeof navigator){if(navigator.languages)for(var r=0;r0?t:void 0}},x={name:"htmlTag",lookup:function(e){var t,r=e.htmlTag||("undefined"!==typeof document?document.documentElement:null);return r&&"function"===typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},_={name:"path",lookup:function(e){var t;if("undefined"!==typeof window){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if("number"===typeof e.lookupFromPathIndex){if("string"!==typeof r[e.lookupFromPathIndex])return;t=r[e.lookupFromPathIndex].replace("/","")}else t=r[0].replace("/","")}return t}},E={name:"subdomain",lookup:function(e){var t;if("undefined"!==typeof window){var r=window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);r instanceof Array&&(t="number"===typeof e.lookupFromSubdomainIndex?r[e.lookupFromSubdomainIndex].replace("http://","").replace("https://","").replace(".",""):r[0].replace("http://","").replace("https://","").replace(".",""))}return t}};var A=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(n.a)(this,e),this.type="languageDetector",this.detectors={},this.init(t,r)}return Object(i.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=u(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(d),this.addDetector(p),this.addDetector(g),this.addDetector(w),this.addDetector(k),this.addDetector(x),this.addDetector(_),this.addDetector(E)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var r=[];return e.forEach((function(e){if(t.detectors[e]){var n=t.detectors[e].lookup(t.options);n&&"string"===typeof n&&(n=[n]),n&&(r=r.concat(n))}})),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var r=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){r.detectors[t]&&r.detectors[t].cacheUserLanguage(e,r.options)})))}}]),e}();A.type="languageDetector",t.a=A},function(e,t){e.exports=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"success",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"success",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"success",type:"bool"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"},{name:"_extraData",type:"bytes"}],name:"approveAndCall",outputs:[{name:"success",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"remaining",type:"uint256"}],payable:!1,type:"function"},{inputs:[{name:"_initialAmount",type:"uint256"},{name:"_tokenName",type:"string"},{name:"_decimalUnits",type:"uint8"},{name:"_tokenSymbol",type:"string"}],type:"constructor"},{payable:!1,type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"_from",type:"address"},{indexed:!0,name:"_to",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_owner",type:"address"},{indexed:!0,name:"_spender",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"Approval",type:"event"}]},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="random/5.7.0"},function(e,t,r){(function(t,r){!function(){"use strict";var n="object"===typeof window?window:{};!n.JS_SHA3_NO_NODE_JS&&"object"===typeof t&&t.versions&&t.versions.node&&(n=r);for(var i=!n.JS_SHA3_NO_COMMON_JS&&"object"===typeof e&&e.exports,o="0123456789abcdef".split(""),a=[0,8,16,24],s=[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],u=[224,256,384,512],c=["hex","buffer","arrayBuffer","array"],f=function(e,t,r){return function(n){return new k(e,t,e).update(n)[r]()}},l=function(e,t,r){return function(n,i){return new k(e,t,i).update(n)[r]()}},h=function(e,t){var r=f(e,t,"hex");r.create=function(){return new k(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}k.prototype.update=function(e){var t="string"!==typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,o=this.blocks,s=this.byteCount,u=this.blockCount,c=0,f=this.s;c>2]|=e[c]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(o[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=s){for(this.start=r-s,this.block=o[u],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+o[15&e]+o[e>>12&15]+o[e>>8&15]+o[e>>20&15]+o[e>>16&15]+o[e>>28&15]+o[e>>24&15];s%t===0&&(x(r),a=0)}return i&&(e=r[a],i>0&&(u+=o[e>>4&15]+o[15&e]),i>1&&(u+=o[e>>12&15]+o[e>>8&15]),i>2&&(u+=o[e>>20&15]+o[e>>16&15])),u},k.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r===0&&x(n)}return o&&(e=s<<2,t=n[a],o>0&&(u[e]=255&t),o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u};var x=function(e){var t,r,n,i,o,a,u,c,f,l,h,d,p,v,m,g,b,y,w,k,x,_,E,A,S,O,M,P,j,T,C,R,L,N,I,B,F,D,U,z,H,q,G,J,V,K,X,W,Z,Y,Q,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|f>>>31),r=o^(f<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|p>>>31),r=f^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=h^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,v=e[0],m=e[1],K=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,j=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,J=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,O=e[18]<<20|e[19]>>>12,M=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=v^~g&y,e[1]=m^~b&w,e[10]=A^~O&P,e[11]=S^~M&j,e[20]=N^~B&D,e[21]=I^~F&U,e[30]=J^~K&W,e[31]=V^~X&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~y&k,e[3]=b^~w&x,e[12]=O^~P&T,e[13]=M^~j&C,e[22]=B^~D&z,e[23]=F^~U&H,e[32]=K^~W&Y,e[33]=X^~Z&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=y^~k&_,e[5]=w^~x&E,e[14]=P^~T&R,e[15]=j^~C&L,e[24]=D^~z&q,e[25]=U^~H&G,e[34]=W^~Y&$,e[35]=Z^~Q&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=k^~_&v,e[7]=x^~E&m,e[16]=T^~R&A,e[17]=C^~L&S,e[26]=z^~q&N,e[27]=H^~G&I,e[36]=Y^~$&J,e[37]=Q^~ee&V,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=_^~v&g,e[9]=E^~m&b,e[18]=R^~A&O,e[19]=L^~S&M,e[28]=q^~N&B,e[29]=G^~I&F,e[38]=$^~J&K,e[39]=ee^~V&X,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=s[n],e[1]^=s[n+1]};if(i)e.exports=p;else for(m=0;m>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),l=s((function(e,t){var r=t;r.assert=u,r.toArray=f.toArray,r.zero2=f.zero2,r.toHex=f.toHex,r.encode=f.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0===(1&u)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0===(1&c)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"===typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i.a(e,"hex","le")}})),h=l.getNAF,d=l.getJSF,p=l.assert;function v(e,t){this.type=e,this.p=new i.a(t.p,16),this.red=t.prime?i.a.red(t.prime):i.a.mont(this.p),this.zero=new i.a(0).toRed(this.red),this.one=new i.a(1).toRed(this.red),this.two=new i.a(2).toRed(this.red),this.n=t.n&&new i.a(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var m=v;function g(e,t){this.curve=e,this.type=t,this.precomputed=null}v.prototype.point=function(){throw new Error("Not implemented")},v.prototype.validate=function(){throw new Error("Not implemented")},v.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=h(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+n[u];s.push(a)}for(var c=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=i;l>0;l--){for(o=0;o=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=o[s];p(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},v.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,u=this._wnafT1,c=this._wnafT2,f=this._wnafT3,l=0;for(o=0;o=1;o-=2){var v=o-1,m=o;if(1===u[v]&&1===u[m]){var g=[t[v],null,null,t[m]];0===t[v].y.cmp(t[m].y)?(g[1]=t[v].add(t[m]),g[2]=t[v].toJ().mixedAdd(t[m].neg())):0===t[v].y.cmp(t[m].y.redNeg())?(g[1]=t[v].toJ().mixedAdd(t[m]),g[2]=t[v].add(t[m].neg())):(g[1]=t[v].toJ().mixedAdd(t[m]),g[2]=t[v].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=d(r[v],r[m]);for(l=Math.max(y[0].length,l),f[v]=new Array(l),f[m]=new Array(l),a=0;a=0;o--){for(var E=0;o>=0;){var A=!0;for(a=0;a=0&&E++,x=x.dblp(E),o<0)break;for(a=0;a0?s=c[a][S-1>>1]:S<0&&(s=c[a][-S-1>>1].neg()),x="affine"===s.type?x.mixedAdd(s):x.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},g.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},w.prototype.pointFromX=function(e,t){(e=new i.a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},x.prototype.isInfinity=function(){return this.inf},x.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},x.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},x.prototype.getX=function(){return this.x.fromRed()},x.prototype.getY=function(){return this.y.fromRed()},x.prototype.mul=function(e){return e=new i.a(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},x.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},x.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},x.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},x.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},x.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},b(_,m.BasePoint),w.prototype.jpoint=function(e,t,r){return new _(this,e,t,r)},_.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},_.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},_.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},_.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},_.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},_.prototype.inspect=function(){return this.isInfinity()?"":""},_.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var E=s((function(e,t){var r=t;r.base=m,r.short=k,r.mont=null,r.edwards=null})),A=s((function(e,t){var r,n=t,i=l.assert;function o(e){"short"===e.type?this.curve=new E.short(e):"edwards"===e.type?this.curve=new E.edwards(e):this.curve=new E.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(u){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function S(e){if(!(this instanceof S))return new S(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=f.toArray(e.entropy,e.entropyEnc||"hex"),r=f.toArray(e.nonce,e.nonceEnc||"hex"),n=f.toArray(e.pers,e.persEnc||"hex");u(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var O=S;S.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},S.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=f.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var T=l.assert;function C(e,t){if(e instanceof C)return e;this._importDER(e,t)||(T(e.r&&e.s,"Signature without r or s"),this.r=new i.a(e.r,16),this.s=new i.a(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var R=C;function L(){this.place=0}function N(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function I(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}C.prototype._importDER=function(e,t){e=l.toArray(e,t);var r=new L;if(48!==e[r.place++])return!1;var n=N(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=N(e,r);if(!1===o)return!1;var a=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var s=N(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var u=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new i.a(a),this.s=new i.a(u),this.recoveryParam=null,!0},C.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=I(t),r=I(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];B(n,t.length),(n=n.concat(t)).push(2),B(n,r.length);var i=n.concat(r),o=[48];return B(o,i.length),o=o.concat(i),l.encode(o,e)};var F=function(){throw new Error("unsupported")},D=l.assert;function U(e){if(!(this instanceof U))return new U(e);"string"===typeof e&&(D(Object.prototype.hasOwnProperty.call(A,e),"Unknown curve "+e),e=A[e]),e instanceof A.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var z=U;U.prototype.keyPair=function(e){return new j(this,e)},U.prototype.keyFromPrivate=function(e,t){return j.fromPrivate(this,e,t)},U.prototype.keyFromPublic=function(e,t){return j.fromPublic(this,e,t)},U.prototype.genKeyPair=function(e){e||(e={});for(var t=new O({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||F(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i.a(2));;){var o=new i.a(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},U.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},U.prototype.sign=function(e,t,r,n){"object"===typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i.a(e,16));for(var o=this.n.byteLength(),a=t.getPrivate().toArray("be",o),s=e.toArray("be",o),u=new O({hash:this.hash,entropy:a,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new i.a(1)),f=0;;f++){var l=n.k?n.k(f):new i.a(u.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var h=this.g.mul(l);if(!h.isInfinity()){var d=h.getX(),p=d.umod(this.n);if(0!==p.cmpn(0)){var v=l.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var m=(h.getY().isOdd()?1:0)|(0!==d.cmp(p)?2:0);return n.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),m^=1),new R({r:p,s:v,recoveryParam:m})}}}}}},U.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i.a(e,16)),r=this.keyFromPublic(r,n);var o=(t=new R(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),f)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},U.prototype.recoverPubKey=function(e,t,r,n){D((3&r)===r,"The recovery param is more than two bits"),t=new R(t,n);var o=this.n,a=new i.a(e),s=t.r,u=t.s,c=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var l=t.r.invm(o),h=o.sub(a).mul(l).umod(o),d=u.mul(l).umod(o);return this.g.mulAdd(h,s,d)},U.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new R(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var H=s((function(e,t){var r=t;r.version="6.5.4",r.utils=l,r.rand=function(){throw new Error("unsupported")},r.curve=E,r.curves=A,r.ec=z,r.eddsa=null})).ec}).call(this,r(58))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="random/5.3.0"},function(e,t,r){"use strict";var n=r(631),i=r(301),o=r(635),a=r(404),s=r(405),u=r(636),c=r(637),f=r(658),l=r(167);e.exports=g,g.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);r=n.validate||this._compile(n)}var i=r(t);!0!==r.$async&&(this.errors=r.errors);return i},g.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},g.prototype.addSchema=function(e,t,r,n){if(Array.isArray(e)){for(var o=0;o0},e.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;a.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),k="undefined"!==typeof WeakMap?new WeakMap:new r,x=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=u.getInstance(),n=new w(t,r,this);k.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){x.prototype[e]=function(){var t;return(t=k.get(this))[e].apply(t,arguments)}}));var _="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:x;t.a=_}).call(this,r(58))},function(e,t,r){"use strict";var n=r(713),i=r(424),o=[].slice,a=["keyword","gray","hex"],s={};Object.keys(i).forEach((function(e){s[o.call(i[e].labels).sort().join("")]=e}));var u={};function c(e,t){if(!(this instanceof c))return new c(e,t);if(t&&t in a&&(t=null),t&&!(t in i))throw new Error("Unknown model: "+t);var r,f;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof c)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"===typeof e){var l=n.get(e);if(null===l)throw new Error("Unable to parse color from string: "+e);this.model=l.model,f=i[this.model].channels,this.color=l.value.slice(0,f),this.valpha="number"===typeof l.value[f]?l.value[f]:1}else if(e.length){this.model=t||"rgb",f=i[this.model].channels;var h=o.call(e,0,f);this.color=d(h,f),this.valpha="number"===typeof e[f]?e[f]:1}else if("number"===typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var p=Object.keys(e);"alpha"in e&&(p.splice(p.indexOf("alpha"),1),this.valpha="number"===typeof e.alpha?e.alpha:0);var v=p.sort().join("");if(!(v in s))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=s[v];var m=i[this.model].labels,g=[];for(r=0;rr?(t+.05)/(r+.05):(r+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),r=t.color[0];return r=(r=(r+e)%360)<0?360+r:r,t.color[0]=r,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var r=e.rgb(),n=this.rgb(),i=void 0===t?.5:t,o=2*i-1,a=r.alpha()-n.alpha(),s=((o*a===-1?o:(o+a)/(1+o*a))+1)/2,u=1-s;return c.rgb(s*r.red()+u*n.red(),s*r.green()+u*n.green(),s*r.blue()+u*n.blue(),r.alpha()*i+n.alpha()*(1-i))}},Object.keys(i).forEach((function(e){if(-1===a.indexOf(e)){var t=i[e].channels;c.prototype[e]=function(){if(this.model===e)return new c(this);if(arguments.length)return new c(arguments,e);var r="number"===typeof arguments[t]?t:this.valpha;return new c(h(i[this.model][e].raw(this.color)).concat(r),e)},c[e]=function(r){return"number"===typeof r&&(r=d(o.call(arguments),t)),new c(r,e)}}})),e.exports=c},function(e,t,r){"use strict";(function(e){var n=r(1),i=r.n(n),o=r(67),a=r(11),s=r.n(a),u="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:{};function c(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(r,n){e=r,t.forEach((function(t){return t(e,n)}))}}}var f=i.a.createContext||function(e,t){var r,i,a="__create-react-context-"+function(){var e="__global_unique_id__";return u[e]=(u[e]||0)+1}()+"__",f=function(e){function r(){var t;return(t=e.apply(this,arguments)||this).emitter=c(t.props.value),t}Object(o.a)(r,e);var n=r.prototype;return n.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},n.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var r,n=this.props.value,i=e.value;((o=n)===(a=i)?0!==o||1/o===1/a:o!==o&&a!==a)?r=0:(r="function"===typeof t?t(n,i):1073741823,0!==(r|=0)&&this.emitter.set(e.value,r))}var o,a},n.render=function(){return this.props.children},r}(n.Component);f.childContextTypes=((r={})[a]=s.a.object.isRequired,r);var l=function(t){function r(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,r){0!==((0|e.observedBits)&r)&&e.setState({value:e.getValue()})},e}Object(o.a)(r,t);var n=r.prototype;return n.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?1073741823:t},n.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?1073741823:e},n.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},n.getValue=function(){return this.context[a]?this.context[a].get():e},n.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},r}(n.Component);return l.contextTypes=((i={})[a]=s.a.object,i),{Provider:f,Consumer:l}};t.a=f}).call(this,r(58))},function(e,t,r){"use strict";r.d(t,"a",(function(){return _e}));var n=r(1),i=r.n(n);function o(e,t){return e.map((function(e,r){return e+t[r]}))}function a(e,t){return e.map((function(e,r){return e-t[r]}))}function s(e){return Math.hypot.apply(Math,e)}function u(e,t){void 0===t&&(t=e);var r=s(t),n=0===r?0:1/r,i=t.map((function(e){return n*e}));return{distance:s(e),direction:i}}function c(e,t,r){var n=s(t),i=0===n?0:1/n,o=0===r?0:1/r,a=o*n,u=t.map((function(e){return o*e})),c=t.map((function(e){return i*e}));return{velocities:u,velocity:a,distance:s(e),direction:c}}function f(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function l(e,t,r){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,r):e*t*r/(t+r*e)}function h(e,t,r,n){return void 0===n&&(n=.15),0===n?function(e,t,r){return Math.max(t,Math.min(e,r))}(e,t,r):er?+l(e-r,r-t,n)+r:e}function d(e,t){for(var r=0;r=0||(i[r]=e[r]);return i}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function w(){}function k(){for(var e=arguments.length,t=new Array(e),r=0;r1?t-1:0),n=1;n2?i-2:0),a=2;a0||i>0,a=p({},r.controller.state.shared,r.state,r.mapStateValues(r.state),{locked:!!document.pointerLockElement,touches:i,down:o}),s=r.handler(a);return r.state.memo=void 0!==s?s:r.state.memo,a},this.controller=e,this.args=t}var t,r,n,i=e.prototype;return i.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},i.updateGestureState=function(e){Object.assign(this.state,e)},i.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},i.getMovement=function(e){var t=this.config.rubberband,r=this.state,n=r._bounds,i=r._initial,s=r._active,u=r._intentional,c=r.lastOffset,f=r.movement,l=r._threshold,h=this.getInternalMovement(e,this.state),d=!1===u[0]?Y(h[0],l[0]):u[0],v=!1===u[1]?Y(h[1],l[1]):u[1],m=this.checkIntentionality([d,v],h);if(m._blocked)return p({},m,{_movement:h,delta:[0,0]});var g=m._intentional,b=h,y=[!1!==g[0]?h[0]-g[0]:0,!1!==g[1]?h[1]-g[1]:0],w=o(y,c),k=s?t:[0,0];return y=Q(n,o(y,i),k),p({},m,{intentional:!1!==g[0]||!1!==g[1],_initial:i,_movement:b,movement:y,values:e,offset:Q(n,w,k),delta:a(y,f)})},i.clean=function(){this.clearTimeout()},t=e,(r=[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}},{key:"transform",get:function(){return this.config.transform||this.controller.config.transform||W}}])&&d(t.prototype,r),n&&d(t,n),e}();function Y(e,t){return Math.abs(e)>=t&&f(e)*t}function Q(e,t,r){var n=t[0],i=t[1],o=r[0],a=r[1],s=e[0],u=s[0],c=s[1],f=e[1],l=f[0],d=f[1];return[h(n,u,c,o),h(i,l,d,a)]}function $(e,t,r){var n=e.state,i=t.timeStamp,o=t.type,a=n.values;return{_lastEventType:o,event:t,timeStamp:i,elapsedTime:r?0:i-n.startTime,previous:a}}function ee(e,t,r,n){var i=e.state,o=e.config,s=e.stateKey,u=e.args,c=e.transform,f=i.offset,l=r.timeStamp,h=o.initial,d=o.bounds,v=a(c(o.threshold),c([0,0])).map(Math.abs),m=p({},K()[s],{_active:!0,args:u,values:t,initial:null!=n?n:t,_threshold:v,offset:f,lastOffset:f,startTime:l});return p({},m,{_initial:E(h,m),_bounds:E(d,m)})}var te=function(e){var t=this;this.classes=e,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=S(),this.supportsGestureEvents=function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),this.bind=function(){for(var e=arguments.length,r=new Array(e),n=0;ni?"x":n0?t.setUpDelayedDragTrigger(e):t.startDrag(e,!0))},t.onDragChange=function(e){if(!t.state.canceled&&t.state._active&&t.isValidEvent(e)&&(t.state._lastEventType!==e.type||e.timeStamp!==t.state.timeStamp)){var r;if(document.pointerLockElement){var n=e.movementX,i=e.movementY;r=o(t.transform([n,i]),t.state.values)}else r=T(e,t.transform);var a=t.getKinematics(r,e);if(!t.state._dragStarted){if(t.state._dragDelayed)return void t.startDrag(e);if(!t.shouldPreventWindowScrollY)return;if(t.state._dragPreventScroll||!a.axis)return;if("x"!==a.axis)return void(t.state._active=!1);t.startDrag(e)}var u=P(e);t.updateSharedState(u);var c=$(g(t),e),f=s(a._movement),l=t.state._dragIsTap;l&&f>=3&&(l=!1),t.updateGestureState(p({},c,a,{_dragIsTap:l})),t.fireGestureHandler()}},t.onDragEnd=function(e){if(ne(t.controller,e),t.isValidEvent(e)&&(t.clean(),t.state._active)){t.state._active=!1;var r=t.state._dragIsTap,n=t.state.velocities,i=n[0],o=n[1],a=t.state.movement,s=a[0],u=a[1],c=t.state._intentional,l=c[0],h=c[1],d=t.config.swipeVelocity,v=d[0],m=d[1],b=t.config.swipeDistance,y=b[0],w=b[1],k=t.config.swipeDuration,x=p({},$(g(t),e),t.getMovement(t.state.values)),_=[0,0];x.elapsedTimev&&Math.abs(s)>y&&(_[0]=f(i)),!1!==h&&Math.abs(o)>m&&Math.abs(u)>w&&(_[1]=f(o))),t.updateSharedState({buttons:0}),t.updateGestureState(p({},x,{tap:r,swipe:_})),t.fireGestureHandler(t.config.filterTaps&&!0===r)}},t.clean=function(){e.prototype.clean.call(g(t)),t.state._dragStarted=!1,t.releasePointerCapture(),ie(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0,_active:!1}),t.updateSharedState({buttons:0}),setTimeout((function(){return t.fireGestureHandler()}),0))},t.onClick=function(e){t.state._dragIsTap||e.stopPropagation()},t}v(t,e);var r=t.prototype;return r.startDrag=function(e,t){void 0===t&&(t=!1),this.state._active&&!this.state._dragStarted&&(t||this.setStartState(e),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())},r.addBindings=function(e){(this.config.useTouch?(fe(e,"onTouchStart",this.onDragStart),fe(e,"onTouchMove",this.onDragChange),fe(e,"onTouchEnd",this.onDragEnd),fe(e,"onTouchCancel",this.onDragEnd)):(fe(e,"onPointerDown",this.onDragStart),fe(e,"onPointerMove",this.onDragChange),fe(e,"onPointerUp",this.onDragEnd),fe(e,"onPointerCancel",this.onDragEnd)),this.config.filterTaps)&&fe(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(ve);var be=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="pinching",t.stateKey="pinch",t.onPinchStart=function(e){re(t.controller,e);var r=t.controller.touchIds;if(t.enabled&&(!t.state._active||!t.state._pointerIds.every((function(e){return r.has(e)})))&&!(r.size<2)){var n=Array.from(r).slice(0,2),i=C(e,n,t.transform),o=i.values,a=i.origin;t.updateSharedState(P(e)),t.updateGestureState(p({},ee(g(t),o,e),$(g(t),e,!0),{_pointerIds:n,cancel:t.onCancel,origin:a})),t.updateGestureState(t.getMovement(o)),t.fireGestureHandler()}},t.onPinchChange=function(e){var r=t.state,n=r.canceled,i=r._active;if(!n&&i&&e.timeStamp!==t.state.timeStamp){var o=P(e);t.updateSharedState(o);try{var a=C(e,t.state._pointerIds,t.transform),s=a.values,u=a.origin,c=t.getKinematics(s,e);t.updateGestureState(p({},$(g(t),e),c,{origin:u})),t.fireGestureHandler()}catch(f){t.onPinchEnd(e)}}},t.onPinchEnd=function(e){ne(t.controller,e);var r=M(e);t.state._pointerIds.every((function(e){return!r.includes(e)}))||(t.clean(),t.state._active&&(t.updateGestureState(p({},$(g(t),e),t.getMovement(t.state.values),{_active:!1})),t.fireGestureHandler()))},t.onCancel=function(){t.state.canceled||(t.updateGestureState({_active:!1,canceled:!0}),setTimeout((function(){return t.fireGestureHandler()}),0))},t.onGestureStart=function(e){if(t.enabled){e.preventDefault();var r=N(e,t.transform);t.updateSharedState(P(e)),t.updateGestureState(p({},ee(g(t),r,e),$(g(t),e,!0),{origin:[e.clientX,e.clientY],cancel:t.onCancel})),t.updateGestureState(t.getMovement(r)),t.fireGestureHandler()}},t.onGestureChange=function(e){var r=t.state,n=r.canceled,i=r._active;if(!n&&i){e.preventDefault();var o=P(e);t.updateSharedState(o);var a=N(e,t.transform);a[0]=260*(a[0]-t.state.event.scale)+t.state.values[0];var s=t.getKinematics(a,e);t.updateGestureState(p({},$(g(t),e),s,{origin:[e.clientX,e.clientY]})),t.fireGestureHandler()}},t.onGestureEnd=function(e){t.clean(),t.state._active&&(t.updateGestureState(p({},$(g(t),e),t.getMovement(t.state.values),{_active:!1,origin:[e.clientX,e.clientY]})),t.fireGestureHandler())},t.wheelShouldRun=function(e){return t.enabled&&e.ctrlKey},t.getWheelValuesFromEvent=function(e){var r=L(e,t.transform)[1],n=t.state.values,i=n[0],o=n[1],a=7*-r,s=void 0!==o?o:0;return{values:[i+a,s],origin:[e.clientX,e.clientY],delta:[a,s]}},t.onWheel=function(e){t.wheelShouldRun(e)&&(t.setTimeout(t.onWheelEnd),t.state._active?t.onWheelChange(e):t.onWheelStart(e))},t.onWheelStart=function(e){var r=t.getWheelValuesFromEvent(e),n=r.values,i=r.delta,o=r.origin;e.cancelable&&e.preventDefault(),t.updateSharedState(P(e)),t.updateGestureState(p({},ee(g(t),n,e,t.state.values),$(g(t),e,!0),{offset:n,delta:i,origin:o})),t.updateGestureState(t.getMovement(n)),t.fireGestureHandler()},t.onWheelChange=function(e){e.cancelable&&e.preventDefault(),t.updateSharedState(P(e));var r=t.getWheelValuesFromEvent(e),n=r.values,i=r.origin,o=r.delta;t.updateGestureState(p({},$(g(t),e),t.getKinematics(n,e),{origin:i,delta:o})),t.fireGestureHandler()},t.onWheelEnd=function(){t.clean(),t.state._active&&(t.state._active=!1,t.updateGestureState(t.getMovement(t.state.values)),t.fireGestureHandler())},t}return v(t,e),t.prototype.addBindings=function(e){this.controller.config.domTarget&&!this.controller.supportsTouchEvents&&this.controller.supportsGestureEvents?(fe(e,"onGestureStart",this.onGestureStart),fe(e,"onGestureChange",this.onGestureChange),fe(e,"onGestureEnd",this.onGestureEnd)):(fe(e,"onTouchStart",this.onPinchStart),fe(e,"onTouchMove",this.onPinchChange),fe(e,"onTouchEnd",this.onPinchEnd),fe(e,"onTouchCancel",this.onPinchEnd),fe(e,"onWheel",this.onWheel))},t}(function(e){function t(){return e.apply(this,arguments)||this}v(t,e);var r=t.prototype;return r.getInternalMovement=function(e,t){var r=t.values[1],n=e[0],i=e[1],o=void 0===i?r:i,s=o-r,u=t.turns;return Math.abs(s)>270&&(u+=f(s)),a([n,o-360*u],t.initial)},r.getKinematics=function(e,t){var r=this.getMovement(e),n=(e[1]-r._movement[1]-this.state.initial[1])/360,i=t.timeStamp-this.state.timeStamp;return p({turns:n},r,m(c(r.movement,r.delta,i),["distance","velocity"]))},r.mapStateValues=function(e){return{da:e.values,vdva:e.velocities}},t}(Z));var ye=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="wheeling",t.stateKey="wheel",t.debounced=!0,t.handleEvent=function(e){if((!e.ctrlKey||!("pinch"in t.controller.handlers))&&t.enabled){t.setTimeout(t.onEnd),t.updateSharedState(P(e));var r=o(L(e,t.transform),t.state.values);if(t.state._active)t.updateGestureState(p({},$(g(t),e),t.getKinematics(r,e)));else{t.updateGestureState(p({},ee(g(t),r,e,t.state.values),$(g(t),e,!0)));var n=t.getMovement(r),i=u(n.delta);t.updateGestureState(n),t.updateGestureState(i)}t.fireGestureHandler()}},t.onEnd=function(){if(t.clean(),t.state._active){var e=t.getMovement(t.state.values);t.updateGestureState(e),t.updateGestureState({_active:!1,velocities:[0,0],velocity:0}),t.fireGestureHandler()}},t}return v(t,e),t.prototype.addBindings=function(e){fe(e,"onWheel",this.handleEvent)},t}(ve);var we=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="moving",t.stateKey="move",t.debounced=!0,t.onMove=function(e){t.enabled&&(t.setTimeout(t.onMoveEnd),t.state._active?t.onMoveChange(e):t.onMoveStart(e))},t.onMoveStart=function(e){t.updateSharedState(P(e));var r=T(e,t.transform);t.updateGestureState(p({},ee(g(t),r,e),$(g(t),e,!0))),t.updateGestureState(t.getMovement(r)),t.fireGestureHandler()},t.onMoveChange=function(e){t.updateSharedState(P(e));var r=T(e,t.transform);t.updateGestureState(p({},$(g(t),e),t.getKinematics(r,e))),t.fireGestureHandler()},t.onMoveEnd=function(){if(t.clean(),t.state._active){var e=t.state.values;t.updateGestureState(t.getMovement(e)),t.updateGestureState({velocities:[0,0],velocity:0,_active:!1}),t.fireGestureHandler()}},t.hoverTransform=function(){return t.controller.config.hover.transform||t.controller.config.transform},t.onPointerEnter=function(e){if(t.controller.state.shared.hovering=!0,t.controller.config.enabled){if(t.controller.config.hover.enabled){var r=T(e,t.hoverTransform()),n=p({},t.controller.state.shared,t.state,$(g(t),e,!0),{args:t.args,values:r,active:!0,hovering:!0});t.controller.handlers.hover(p({},n,t.mapStateValues(n)))}"move"in t.controller.handlers&&t.onMoveStart(e)}},t.onPointerLeave=function(e){if(t.controller.state.shared.hovering=!1,"move"in t.controller.handlers&&t.onMoveEnd(),t.controller.config.hover.enabled){var r=T(e,t.hoverTransform()),n=p({},t.controller.state.shared,t.state,$(g(t),e),{args:t.args,values:r,active:!1});t.controller.handlers.hover(p({},n,t.mapStateValues(n)))}},t}return v(t,e),t.prototype.addBindings=function(e){"move"in this.controller.handlers&&fe(e,"onPointerMove",this.onMove),"hover"in this.controller.handlers&&(fe(e,"onPointerEnter",this.onPointerEnter),fe(e,"onPointerLeave",this.onPointerLeave))},t}(ve);var ke=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="scrolling",t.stateKey="scroll",t.debounced=!0,t.handleEvent=function(e){if(t.enabled){t.clearTimeout(),t.setTimeout(t.onEnd);var r=R(e,t.transform);if(t.updateSharedState(P(e)),t.state._active)t.updateGestureState(p({},$(g(t),e),t.getKinematics(r,e)));else{t.updateGestureState(p({},ee(g(t),r,e,t.state.values),$(g(t),e,!0)));var n=t.getMovement(r),i=u(n.delta);t.updateGestureState(n),t.updateGestureState(i)}t.fireGestureHandler()}},t.onEnd=function(){t.clean(),t.state._active&&(t.updateGestureState(p({},t.getMovement(t.state.values),{_active:!1,velocities:[0,0],velocity:0})),t.fireGestureHandler())},t}return v(t,e),t.prototype.addBindings=function(e){fe(e,"onScroll",this.handleEvent)},t}(ve);var xe=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function _e(e,t){void 0===t&&(t={});var r=function(e){var t={},r={},n=new Set;for(var i in e)xe.test(i)?(n.add(RegExp.lastMatch),r[i]=e[i]):t[i]=e[i];return[r,t,n]}(e),n=r[0],i=r[1],o=r[2];X.set("drag",ge),X.set("hover",we),X.set("move",we),X.set("pinch",be),X.set("scroll",ke),X.set("wheel",ye);var a=function(e,t){void 0===e&&(e={}),void 0===t&&(t=new Set);var r=e,n=r.drag,i=r.wheel,o=r.move,a=r.scroll,s=r.pinch,u=r.hover,c=r.eventOptions,f=r.window,l=r.transform,h=H({domTarget:r.domTarget,eventOptions:c,transform:l,window:f,enabled:r.enabled});return t.has("onDrag")&&(h.drag=J(n)),t.has("onWheel")&&(h.wheel=q(i)),t.has("onScroll")&&(h.scroll=q(a)),t.has("onMove")&&(h.move=q(o)),t.has("onPinch")&&(h.pinch=G(s)),t.has("onHover")&&(h.hover=p({enabled:!0},u)),h}(t,o),s={};return o.has("onDrag")&&(s.drag=Ee(n,"onDrag")),o.has("onWheel")&&(s.wheel=Ee(n,"onWheel")),o.has("onScroll")&&(s.scroll=Ee(n,"onScroll")),o.has("onMove")&&(s.move=Ee(n,"onMove")),o.has("onPinch")&&(s.pinch=Ee(n,"onPinch")),o.has("onHover")&&(s.hover=n.onHover),de(s,a,i)}function Ee(e,t){var r=t+"Start",n=t+"End";return function(i){var o=void 0;return i.first&&r in e&&e[r](i),t in e&&(o=e[t](i)),i.last&&n in e&&e[n](i),o}}},function(e,t,r){"use strict";t.a=function(){return!1}},function(e,t,r){"use strict";(function(e){var n=r(65),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i?n.a.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}}).call(this,r(329)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:r,width:o,height:u},f)},l),a.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:r,width:o,height:u},f)},l),a.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},function(e,t,r){var n,i=r(847),o=r(848),a=r(850),s=r(853);function u(e,t,r,i,o){var a=e.rect(0,0,r,r);a.rotate(360*n.random());var s=r/o*n.random()+i*r/o;a.translate(s),a.rotate(180*n.random()),a.attr("fill",c(t)),a.attr("stroke","none")}function c(e){n.random();var t=Math.floor(e.length*n.random());return e.splice(t,1)[0]}e.exports=function(e,t){n=new i(t);var r=o(e),f=r.paper,l=r.container,h=function(e,t){var r=30*t.random()-15;return e.map((function(e){var t=a(e);return t.rotate(r),t.hexString()}))}(s.slice(),n),d=f.rect(0,0,e,e);d.attr("fill",c(h)),d.attr("stroke","none");for(var p=0;p<3;p++)u(f,h,e,p,3);return l}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0);function i(e){return Object(n.a)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6zM7.9 7.5L10.3 5l.7.7-2.4 2.5 2.4 2.5-.7.7-2.4-2.5-2.4 2.5-.7-.7 2.4-2.5-2.4-2.5.7-.7 2.4 2.5z"}}]})(e)}},function(e,t,r){"use strict";(function(e){var n=r(1),i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(){function e(e,t){for(var r=0;r div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',o=r.head||r.getElementsByTagName("head")[0],a=r.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(r.createTextNode(n)),o.appendChild(a)}}(l),o.__resizeLast__={},o.__resizeListeners__=[],(o.__resizeTriggers__=l.createElement("div")).className="resize-triggers";var d=l.createElement("div");d.className="expand-trigger",d.appendChild(l.createElement("div"));var p=l.createElement("div");p.className="contract-trigger",o.__resizeTriggers__.appendChild(d),o.__resizeTriggers__.appendChild(p),o.appendChild(o.__resizeTriggers__),a(o),o.addEventListener("scroll",s,!0),n&&(o.__resizeTriggers__.__animationListener__=function(e){e.animationName===r&&a(o)},o.__resizeTriggers__.addEventListener(n,o.__resizeTriggers__.__animationListener__))}o.__resizeListeners__.push(f)}},removeResizeListener:function(e,t){if(u)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(n,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(r){}}}}}null==p||null==v?(f=h,l=function(e){return d(e,20)}):(f=function(e){var t=u(e,2),r=t[0],n=t[1];p(r),h(n)},l=function(e){var t=v((function(){h(r),e()})),r=d((function(){p(t),e()}),20);return[t,r]});var g=function(e){function t(){var e,r,n;i(this,t);for(var o=arguments.length,a=Array(o),u=0;ua?1:Math.round(100*f/a)/100,t.a!==l)return{h:t.h,s:t.s,l:t.l,a:l,source:"rgb"}}else{var h=void 0;if(n!==(h=c<0?0:c>o?1:Math.round(100*c/o)/100))return{h:t.h,s:t.s,l:t.l,a:h,source:"rgb"}}return null},u={},c=function(e,t,r,n){var i=e+"-"+t+"-"+r+(n?"-server":"");if(u[i])return u[i];var o=function(e,t,r,n){if("undefined"===typeof document&&!n)return null;var i=n?new n:document.createElement("canvas");i.width=2*r,i.height=2*r;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=t,o.fillRect(0,0,r,r),o.translate(r,r),o.fillRect(0,0,r,r),i.toDataURL()):null}(e,t,r,n);return u[i]=o,o},f=Object.assign||function(e){for(var t=1;t-1)){var i=r.getArrowOffset(),o=38===e.keyCode?n+i:n-i;r.setUpdatedValue(o,e)}},r.handleDrag=function(e){if(r.props.dragLabel){var t=Math.round(r.props.value+e.movementX);t>=0&&t<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(t),e)}},r.handleMouseDown=function(e){r.props.dragLabel&&(e.preventDefault(),r.handleDrag(e),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r.inputId="rc-editable-input-"+w++,r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),b(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var r=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(r,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=a()({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return i.a.createElement("div",{style:t.wrap},i.a.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?i.a.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(n.PureComponent||n.Component),x=function(e,t,r,n){var i=n.clientWidth,o=n.clientHeight,a="number"===typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"===typeof e.pageY?e.pageY:e.touches[0].pageY,u=a-(n.getBoundingClientRect().left+window.pageXOffset),c=s-(n.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var f=void 0;if(c<0)f=359;else if(c>o)f=0;else{f=360*(-100*c/o+100)/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var l=void 0;if(u<0)l=0;else if(u>i)l=359;else{l=360*(100*u/i)/100}if(r.h!==l)return{h:l,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},_=function(){function e(e,t){for(var r=0;r-1};var I=function(e,t){var r=this.__data__,n=T(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function B(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};var ct=function(e){return null!=e&&ut(e.length)&&!te(e)};var ft=function(e){return tt(e)&&ct(e)},lt=r(156),ht=Function.prototype,dt=Object.prototype,pt=ht.toString,vt=dt.hasOwnProperty,mt=pt.call(Object);var gt=function(e){if(!tt(e)||"[object Object]"!=$(e))return!1;var t=Ye(e);if(null===t)return!0;var r=vt.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&pt.call(r)==mt},bt={};bt["[object Float32Array]"]=bt["[object Float64Array]"]=bt["[object Int8Array]"]=bt["[object Int16Array]"]=bt["[object Int32Array]"]=bt["[object Uint8Array]"]=bt["[object Uint8ClampedArray]"]=bt["[object Uint16Array]"]=bt["[object Uint32Array]"]=!0,bt["[object Arguments]"]=bt["[object Array]"]=bt["[object ArrayBuffer]"]=bt["[object Boolean]"]=bt["[object DataView]"]=bt["[object Date]"]=bt["[object Error]"]=bt["[object Function]"]=bt["[object Map]"]=bt["[object Number]"]=bt["[object Object]"]=bt["[object RegExp]"]=bt["[object Set]"]=bt["[object String]"]=bt["[object WeakMap]"]=!1;var yt=function(e){return tt(e)&&ut(e.length)&&!!bt[$(e)]};var wt=function(e){return function(t){return e(t)}},kt=r(349),xt=kt.a&&kt.a.isTypedArray,_t=xt?wt(xt):yt;var Et=function(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]},At=Object.prototype.hasOwnProperty;var St=function(e,t,r){var n=e[t];At.call(e,t)&&j(n,r)&&(void 0!==r||t in e)||Ue(e,t,r)};var Ot=function(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Jt);var Xt=function(e,t){return Kt(qt(e,t,Ut),e+"")};var Wt=function(e,t,r){if(!ee(r))return!1;var n=typeof t;return!!("number"==n?ct(r)&&jt(t,r.length):"string"==n&&t in r)&&j(r[t],e)};var Zt=function(e){return Xt((function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&Wt(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n=t||r<0||l&&e-c>=o}function m(){var e=$t();if(v(e))return g(e);s=setTimeout(m,function(e){var r=t-(e-u);return l?lr(r,o-(e-c)):r}(e))}function g(e){return s=void 0,h&&n?d(e):(n=i=void 0,a)}function b(){var e=$t(),r=v(e);if(n=arguments,i=this,u=e,r){if(void 0===s)return p(u);if(l)return clearTimeout(s),s=setTimeout(m,t),d(u)}return void 0===s&&(s=setTimeout(m,t)),a}return t=cr(t)||0,ee(r)&&(f=!!r.leading,o=(l="maxWait"in r)?fr(cr(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h),b.cancel=function(){void 0!==s&&clearTimeout(s),c=0,n=u=i=s=void 0},b.flush=function(){return void 0===s?a:g($t())},b};var dr=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return ee(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),hr(e,t,{leading:n,maxWait:t,trailing:i})},pr=function(){function e(e,t){for(var r=0;ri&&(u=i),c<0?c=0:c>o&&(c=o);var f=u/i,l=1-c/o;return{h:t.h,s:f,v:l,a:t.a,source:"hsv"}}(e,r.props.hsl,r.container),e)},r.handleMouseDown=function(e){r.handleChange(e);var t=r.getContainerRenderWindow();t.addEventListener("mousemove",r.handleChange),t.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=dr((function(e,t,r){e(t,r)}),50),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),pr(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},r=t.color,n=t.white,o=t.black,s=t.pointer,u=t.circle,c=a()({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:r,white:n,black:o,pointer:s,circle:u}},{custom:!!this.props.style});return i.a.createElement("div",{style:c.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.a.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),i.a.createElement("div",{style:c.white,className:"saturation-white"},i.a.createElement("div",{style:c.black,className:"saturation-black"}),i.a.createElement("div",{style:c.pointer},this.props.pointer?i.a.createElement(this.props.pointer,this.props):i.a.createElement("div",{style:c.circle}))))}}]),t}(n.PureComponent||n.Component);var mr=function(e,t){for(var r=-1,n=null==e?0:e.length;++r=128?"#000":"#fff"},jr=function(e,t){var r=e.replace("\xb0","");return Ar()(t+" ("+r+")")._ok},Tr=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var e,t,r;Ir(this,n);for(var i=arguments.length,o=Array(i),a=0;as))return!1;var c=o.get(e),f=o.get(t);if(c&&f)return c==t&&f==e;var l=-1,h=!0,d=2&r?new Xr:void 0;for(o.set(e,t),o.set(t,e);++l1&&(e.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"===typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"===typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),r.props.onChange({h:e.h||r.props.hsl.h,s:Number(Mi(e.s)?r.props.hsl.s:e.s),l:Number(Mi(e.l)?r.props.hsl.l:e.l),source:"hsl"},t))},r.showHighlight=function(e){e.currentTarget.style.background="#eee"},r.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?r.state={view:"rgb"}:r.state={view:e.view},r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Ti(t,[{key:"render",value:function(){var e=this,t=a()({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),r=void 0;return"hex"===this.state.view?r=i.a.createElement("div",{style:t.fields,className:"flexbox-fix"},i.a.createElement("div",{style:t.field},i.a.createElement(k,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?r=i.a.createElement("div",{style:t.fields,className:"flexbox-fix"},i.a.createElement("div",{style:t.field},i.a.createElement(k,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),i.a.createElement("div",{style:t.field},i.a.createElement(k,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),i.a.createElement("div",{style:t.field},i.a.createElement(k,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),i.a.createElement("div",{style:t.alpha},i.a.createElement(k,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(r=i.a.createElement("div",{style:t.fields,className:"flexbox-fix"},i.a.createElement("div",{style:t.field},i.a.createElement(k,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),i.a.createElement("div",{style:t.field},i.a.createElement(k,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),i.a.createElement("div",{style:t.field},i.a.createElement(k,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),i.a.createElement("div",{style:t.alpha},i.a.createElement(k,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),i.a.createElement("div",{style:t.wrap,className:"flexbox-fix"},r,i.a.createElement("div",{style:t.toggle},i.a.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},i.a.createElement(ji.a,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(i.a.Component);Ci.defaultProps={view:"hex"};var Ri=Ci,Li=function(){var e=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return i.a.createElement("div",{style:e.picker})},Ni=function(){var e=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return i.a.createElement("div",{style:e.picker})},Ii=function(e){var t=e.width,r=e.onChange,n=e.disableAlpha,o=e.rgb,s=e.hsl,u=e.hsv,c=e.hex,f=e.renderers,l=e.styles,d=void 0===l?{}:l,p=e.className,v=void 0===p?"":p,m=e.defaultView,b=a()(Zt({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:n});return i.a.createElement("div",{style:b.picker,className:"chrome-picker "+v},i.a.createElement("div",{style:b.saturation},i.a.createElement(vr,{style:b.Saturation,hsl:s,hsv:u,pointer:Ni,onChange:r})),i.a.createElement("div",{style:b.body},i.a.createElement("div",{style:b.controls,className:"flexbox-fix"},i.a.createElement("div",{style:b.color},i.a.createElement("div",{style:b.swatch},i.a.createElement("div",{style:b.active}),i.a.createElement(h,{renderers:f}))),i.a.createElement("div",{style:b.toggles},i.a.createElement("div",{style:b.hue},i.a.createElement(S,{style:b.Hue,hsl:s,pointer:Li,onChange:r})),i.a.createElement("div",{style:b.alpha},i.a.createElement(g,{style:b.Alpha,rgb:o,hsl:s,pointer:Li,renderers:f,onChange:r})))),i.a.createElement(Ri,{rgb:o,hsl:s,hex:c,view:m,onChange:r,disableAlpha:n})))};Ii.propTypes={width:M.a.oneOfType([M.a.string,M.a.number]),disableAlpha:M.a.bool,styles:M.a.object,defaultView:M.a.oneOf(["hex","rgb","hsl"])},Ii.defaultProps={width:225,disableAlpha:!1,styles:{}};Rr(Ii);var Bi=function(e){var t=e.color,r=e.onClick,n=void 0===r?function(){}:r,o=e.onSwatchHover,s=e.active,u=a()({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Pr(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return i.a.createElement(Ur,{style:u.color,color:t,onClick:n,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},i.a.createElement("div",{style:u.dot}))},Fi=function(e){var t=e.hex,r=e.rgb,n=e.onChange,o=a()({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(e,t){e.r||e.g||e.b?n({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},t):n({hex:e.hex,source:"hex"},t)};return i.a.createElement("div",{style:o.fields,className:"flexbox-fix"},i.a.createElement("div",{style:o.active}),i.a.createElement(k,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:t,onChange:s}),i.a.createElement(k,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:r.r,onChange:s}),i.a.createElement(k,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:r.g,onChange:s}),i.a.createElement(k,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:r.b,onChange:s}))},Di=function(e){var t=e.onChange,r=e.onSwatchHover,n=e.colors,o=e.hex,s=e.rgb,u=e.styles,c=void 0===u?{}:u,f=e.className,l=void 0===f?"":f,h=a()(Zt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},c)),d=function(e,r){e.hex?Mr(e.hex)&&t({hex:e.hex,source:"hex"},r):t(e,r)};return i.a.createElement(Qt,{style:h.Compact,styles:c},i.a.createElement("div",{style:h.compact,className:"compact-picker "+l},i.a.createElement("div",null,ii(n,(function(e){return i.a.createElement(Bi,{key:e,color:e,active:e.toLowerCase()===o,onClick:d,onSwatchHover:r})})),i.a.createElement("div",{style:h.clear})),i.a.createElement(Fi,{hex:o,rgb:s,onChange:d})))};Di.propTypes={colors:M.a.arrayOf(M.a.string),styles:M.a.object},Di.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Rr(Di);var Ui=Object(o.handleHover)((function(e){var t=e.hover,r=e.color,n=e.onClick,o=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},u=a()({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return i.a.createElement("div",{style:u.swatch},i.a.createElement(Ur,{color:r,onClick:n,onHover:o,focusStyle:s}))})),zi=function(e){var t=e.width,r=e.colors,n=e.onChange,o=e.onSwatchHover,s=e.triangle,u=e.styles,c=void 0===u?{}:u,f=e.className,l=void 0===f?"":f,h=a()(Zt({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},c),{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s,"bottom-left-triangle":"bottom-left"===s,"bottom-right-triangle":"bottom-right"===s}),d=function(e,t){return n({hex:e,source:"hex"},t)};return i.a.createElement("div",{style:h.card,className:"github-picker "+l},i.a.createElement("div",{style:h.triangleShadow}),i.a.createElement("div",{style:h.triangle}),ii(r,(function(e){return i.a.createElement(Ui,{color:e,key:e,onClick:d,onSwatchHover:o})})))};zi.propTypes={width:M.a.oneOfType([M.a.string,M.a.number]),colors:M.a.arrayOf(M.a.string),triangle:M.a.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:M.a.object},zi.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Rr(zi);var Hi=function(e){var t=e.direction,r=a()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return i.a.createElement("div",{style:r.picker})},qi=Object.assign||function(e){for(var t=1;t.5});return i.a.createElement("div",{style:r.picker})},Xi=function(){var e=a()({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return i.a.createElement("div",{style:e.pointer},i.a.createElement("div",{style:e.left},i.a.createElement("div",{style:e.leftInside})),i.a.createElement("div",{style:e.right},i.a.createElement("div",{style:e.rightInside})))},Wi=function(e){var t=e.onClick,r=e.label,n=e.children,o=e.active,s=a()({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return i.a.createElement("div",{style:s.button,onClick:t},r||n)},Zi=function(e){var t=e.rgb,r=e.currentColor,n=a()({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return i.a.createElement("div",null,i.a.createElement("div",{style:n.label},"new"),i.a.createElement("div",{style:n.swatches},i.a.createElement("div",{style:n.new}),i.a.createElement("div",{style:n.current})),i.a.createElement("div",{style:n.label},"current"))},Yi=function(){function e(e,t){for(var r=0;r100&&(e.a=100),e.a/=100,t({h:n.h,s:n.s,l:n.l,a:e.a,source:"rgb"},i))};return i.a.createElement("div",{style:u.fields,className:"flexbox-fix"},i.a.createElement("div",{style:u.double},i.a.createElement(k,{style:{input:u.input,label:u.label},label:"hex",value:o.replace("#",""),onChange:c})),i.a.createElement("div",{style:u.single},i.a.createElement(k,{style:{input:u.input,label:u.label},label:"r",value:r.r,onChange:c,dragLabel:"true",dragMax:"255"})),i.a.createElement("div",{style:u.single},i.a.createElement(k,{style:{input:u.input,label:u.label},label:"g",value:r.g,onChange:c,dragLabel:"true",dragMax:"255"})),i.a.createElement("div",{style:u.single},i.a.createElement(k,{style:{input:u.input,label:u.label},label:"b",value:r.b,onChange:c,dragLabel:"true",dragMax:"255"})),i.a.createElement("div",{style:u.alpha},i.a.createElement(k,{style:{input:u.input,label:u.label},label:"a",value:Math.round(100*r.a),onChange:c,dragLabel:"true",dragMax:"100"})))},eo=Object.assign||function(e){for(var t=1;t=t?e.call(null):n.id=requestAnimationFrame(i)}))};return n}var d=null;function p(e){if(void 0===e&&(e=!1),null===d||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?d="positive-descending":(t.scrollLeft=1,d=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),d}return d}var v=function(e,t){return e};function m(e){var t,r,a=e.getItemOffset,s=e.getEstimatedTotalSize,f=e.getItemSize,d=e.getOffsetForIndexAndAlignment,m=e.getStartIndexForOffset,b=e.getStopIndexForStartIndex,y=e.initInstanceProps,w=e.shouldResetStyleCacheOnItemSizeChange,k=e.validateProps;return r=t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=y(r.props,Object(o.a)(Object(o.a)(r))),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Object(o.a)(Object(o.a)(r)),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"===typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=u((function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})})),r._callOnScroll=void 0,r._callOnScroll=u((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,n=r.props,i=n.direction,o=n.itemSize,s=n.layout,u=r._getItemStyleCache(w&&o,w&&s,w&&i);if(u.hasOwnProperty(e))t=u[e];else{var c=a(r.props,e,r._instanceProps),l=f(r.props,e,r._instanceProps),h="horizontal"===i||"horizontal"===s,d="rtl"===i,p=h?c:0;u[e]=t={position:"absolute",left:d?void 0:p,right:d?p:void 0,top:h?0:c,height:h?"100%":l,width:h?l:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=u((function(e,t,r){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(p()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffset0)for(var P=S;P<=O;P++)M.push(Object(c.createElement)(t,{data:h,key:p(P,h),index:P,isScrolling:w?x:void 0,style:this._getItemStyle(P)}));var j=s(this.props,this._instanceProps);return Object(c.createElement)(g||b||"div",{className:r,onScroll:E,ref:this._outerRefSetter,style:Object(n.a)({position:"relative",height:o,width:k,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},Object(c.createElement)(u||f||"div",{children:M,ref:a,style:{height:_?"100%":j,pointerEvents:x?"none":void 0,width:_?j:"100%"}}))},r._callPropsCallbacks=function(){if("function"===typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],r=e[1],n=e[2],i=e[3];this._callOnItemsRendered(t,r,n,i)}if("function"===typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,u=o.scrollUpdateWasRequested;this._callOnScroll(a,s,u)}},r._getRangeToRender=function(){var e=this.props,t=e.itemCount,r=e.overscanCount,n=this.state,i=n.isScrolling,o=n.scrollDirection,a=n.scrollOffset;if(0===t)return[0,0,0,0];var s=m(this.props,a,this._instanceProps),u=b(this.props,s,a,this._instanceProps),c=i&&"backward"!==o?1:Math.max(1,r),f=i&&"forward"!==o?1:Math.max(1,r);return[Math.max(0,s-c),Math.max(0,Math.min(t-1,u+f)),s,u]},t}(c.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},r}var g=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},b=m({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,r,n){var i=e.direction,o=e.height,a=e.itemCount,s=e.itemSize,u=e.layout,c=e.width,f="horizontal"===i||"horizontal"===u?c:o,l=Math.max(0,a*s-f),h=Math.min(l,t*s),d=Math.max(0,t*s-f+s);switch("smart"===r&&(r=n>=d-f&&n<=h+f?"auto":"center"),r){case"start":return h;case"end":return d;case"center":var p=Math.round(d+(h-d)/2);return pl+Math.floor(f/2)?l:p;case"auto":default:return n>=d&&n<=h?n:n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}var p=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},v=new f.a(l.a),m=new Uint8Array(32);m.fill(0);var g=a.a.from(-1),b=a.a.from(0),y=a.a.from(1),w=a.a.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var k=Object(s.g)(y.toHexString(),32),x=Object(s.g)(b.toHexString(),32),_={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},E=["name","version","chainId","verifyingContract","salt"];function A(e){return function(t){return"string"!==typeof t&&v.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var S={name:A("name"),version:A("version"),chainId:function(e){try{return a.a.from(e).toString()}catch(t){}return v.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return Object(o.a)(e).toLowerCase()}catch(t){}return v.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=Object(s.a)(e);if(32!==t.length)throw new Error("bad length");return Object(s.h)(t)}catch(r){}return v.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function O(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var r=""===t[1],n=parseInt(t[2]||"256");(n%8!==0||n>256||t[2]&&t[2]!==String(n))&&v.throwArgumentError("invalid numeric width","type",e);var i=w.mask(r?n-1:n),c=r?i.add(y).mul(g):b;return function(t){var r=a.a.from(t);return(r.lt(c)||r.gt(i))&&v.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),Object(s.g)(r.toTwos(256).toHexString(),32)}}var f=e.match(/^bytes(\d+)$/);if(f){var l=parseInt(f[1]);return(0===l||l>32||f[1]!==String(l))&&v.throwArgumentError("invalid bytes width","type",e),function(t){return Object(s.a)(t).length!==l&&v.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=Object(s.a)(e),r=t.length%32;return r?Object(s.c)([t,m.slice(r)]):Object(s.h)(t)}(t)}}switch(e){case"address":return function(e){return Object(s.g)(Object(o.a)(e),32)};case"bool":return function(e){return e?k:x};case"bytes":return function(e){return Object(u.a)(e)};case"string":return function(e){return Object(h.a)(e)}}return null}function M(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var P=function(){function e(t){Object(n.a)(this,e),Object(c.d)(this,"types",Object.freeze(Object(c.c)(t))),Object(c.d)(this,"_encoderCache",{}),Object(c.d)(this,"_types",{});var r={},i={},o={};Object.keys(t).forEach((function(e){r[e]={},i[e]=[],o[e]={}}));var a=function(e){var n={};t[e].forEach((function(o){n[o.name]&&v.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),n[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&v.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),O(a)||(i[a]||v.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),i[a].push(e),r[e][a]=!0)}))};for(var s in t)a(s);var u=Object.keys(i).filter((function(e){return 0===i[e].length}));for(var f in 0===u.length?v.throwArgumentError("missing primary type","types",t):u.length>1&&v.throwArgumentError("ambiguous primary types or unused types: ".concat(u.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),Object(c.d)(this,"primaryType",u[0]),function e(n,a){a[n]&&v.throwArgumentError("circular type reference to ".concat(JSON.stringify(n)),"types",t),a[n]=!0,Object.keys(r[n]).forEach((function(t){i[t]&&(e(t,a),Object.keys(a).forEach((function(e){o[e][t]=!0})))})),delete a[n]}(this.primaryType,{}),o){var l=Object.keys(o[f]);l.sort(),this._types[f]=M(f,t[f])+l.map((function(e){return M(e,t[e])})).join("")}}return Object(i.a)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,r=O(e);if(r)return r;var n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var i=n[1],o=this.getEncoder(i),a=parseInt(n[3]);return function(e){a>=0&&e.length!==a&&v.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var r=e.map(o);return t._types[i]&&(r=r.map(u.a)),Object(u.a)(Object(s.c)(r))}}var c=this.types[e];if(c){var f=Object(h.a)(this._types[e]);return function(e){var r=c.map((function(r){var n=r.name,i=r.type,o=t.getEncoder(i)(e[n]);return t._types[i]?Object(u.a)(o):o}));return r.unshift(f),Object(s.c)(r)}}return v.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||v.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return Object(u.a)(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,r){var n=this;if(O(e))return r(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&v.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(o,e,r)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=n._visit(a,t[o],r),e}),{}):v.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,r,n){return e.from(r).hashStruct(t,n)}},{key:"hashDomain",value:function(t){var r=[];for(var n in t){var i=_[n];i||v.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",t),r.push({name:n,type:i})}return r.sort((function(e,t){return E.indexOf(e.name)-E.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return Object(s.c)(["0x1901",e.hashDomain(t),e.from(r).hash(n)])}},{key:"hash",value:function(t,r,n){return Object(u.a)(e.encode(t,r,n))}},{key:"resolveNames",value:function(t,r,n,i){return p(this,void 0,void 0,d().mark((function o(){var a,u,f;return d().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:t=Object(c.g)(t),a={},t.verifyingContract&&!Object(s.k)(t.verifyingContract,20)&&(a[t.verifyingContract]="0x"),(u=e.from(r)).visit(n,(function(e,t){return"address"!==e||Object(s.k)(t,20)||(a[t]="0x"),t})),o.t0=d().keys(a);case 6:if((o.t1=o.t0()).done){o.next=13;break}return f=o.t1.value,o.next=10,i(f);case 10:a[f]=o.sent,o.next=6;break;case 13:return t.verifyingContract&&a[t.verifyingContract]&&(t.verifyingContract=a[t.verifyingContract]),n=u.visit(n,(function(e,t){return"address"===e&&a[t]?a[t]:t})),o.abrupt("return",{domain:t,value:n});case 16:case"end":return o.stop()}}),o)})))}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var i={},o=[];E.forEach((function(e){var r=t[e];null!=r&&(i[e]=S[e](r),o.push({name:e,type:_[e]}))}));var u=e.from(r),f=Object(c.g)(r);return f.EIP712Domain?v.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):f.EIP712Domain=o,u.encode(n),{types:f,domain:i,primaryType:u.primaryType,message:u.visit(n,(function(e,t){if(e.match(/^bytes(\d*)/))return Object(s.h)(Object(s.a)(t));if(e.match(/^u?int/))return a.a.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&v.throwArgumentError("invalid string","value",t),t}return v.throwArgumentError("unsupported type","type",e)}))}}}]),e}()},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return f})),r.d(t,"a",(function(){return l}));var n=r(44),i=r.n(n),o=r(4),a=r(459),s=r(10),u=new s.a("sha2/5.7.0");function c(e){return"0x"+i.a.ripemd160().update(Object(o.a)(e)).digest("hex")}function f(e){return"0x"+i.a.sha256().update(Object(o.a)(e)).digest("hex")}function l(e,t,r){return a.a[e]||u.throwError("unsupported algorithm "+e,s.a.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+i.a.hmac(i.a[e],Object(o.a)(t)).update(Object(o.a)(r)).digest("hex")}},function(e,t){function r(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))}}},function(e,t,r){(function(e){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}})),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,e,n.depth)}function u(e,t){var r=s.styles[t];return r?"\x1b["+s.colors[r][0]+"m"+e+"\x1b["+s.colors[r][1]+"m":e}function c(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&_(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return g(i)||(i=f(e,i,n)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(g(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(m(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),x(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(_(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(y(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return l(r)}var c,w="",E=!1,A=["{","}"];(d(r)&&(E=!0,A=["[","]"]),_(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return y(r)&&(w=" "+RegExp.prototype.toString.call(r)),k(r)&&(w=" "+Date.prototype.toUTCString.call(r)),x(r)&&(w=" "+l(r)),0!==a.length||E&&0!=r.length?n<0?y(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=E?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,w,A)):A[0]+w+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),M(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=v(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"===typeof e}function v(e){return null===e}function m(e){return"number"===typeof e}function g(e){return"string"===typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===E(e)}function w(e){return"object"===typeof e&&null!==e}function k(e){return w(e)&&"[object Date]"===E(e)}function x(e){return w(e)&&("[object Error]"===E(e)||e instanceof Error)}function _(e){return"function"===typeof e}function E(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(b(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=e.pid;a[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else a[r]=function(){};return a[r]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=p,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=g,t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=w,t.isDate=k,t.isError=x,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=r(563);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),S[e.getMonth()],t].join(" ")}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))},t.inherits=r(374),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function j(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!==typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;or.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(s=r.slice(i,l)).length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)u=t(s),c.push(u.data),s=u.remainder;return{data:c,remainder:r.slice(l)}}(c(t));if(r)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},t.getLength=function(t){if(!t||0===t.length)return e.from([]);var r=c(t),n=r[0];if(n<=127)return r.length;if(n<=183)return n-127;if(n<=191)return n-182;if(n<=247)return n-191;var i=n-246;return i+o(r.slice(1,i).toString("hex"),16)}}).call(this,r(51).Buffer)},function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(t)}e.exports=r},function(e,t,r){"use strict";var n=t;n.version=r(566).version,n.utils=r(85),n.rand=r(377),n.curve=r(378),n.curves=r(289),n.ec=r(573),n.eddsa=r(577)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(581),i=r(513);t.keccak224=n.createHashFunction((function(){return i("keccak224")})),t.keccak256=n.createHashFunction((function(){return i("keccak256")})),t.keccak384=n.createHashFunction((function(){return i("keccak384")})),t.keccak512=n.createHashFunction((function(){return i("keccak512")}))},function(e,t,r){"use strict";var n=r(52),i=r(597),o=r(606),a=r(607),s=r(612);function u(e){s.call(this,"digest"),this._hash=e}n(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new u(a(e))}},function(e,t,r){"use strict";var n=r(828),i=r(829);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=y(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),l=["%","/","?",";","#"].concat(f),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(830);function y(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o127?R+="x":R+=C[L];if(!R.match(d)){var I=j.slice(0,O),B=j.slice(O+1),F=C.match(p);F&&(I.push(F[1]),B.unshift(F[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=I.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+D,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!v[x])for(O=0,T=f.length;O0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift());return r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=_.slice(-1)[0],S=(r.host||e.host||_.length>1)&&("."===A||".."===A)||""===A,O=0,M=_.length;M>=0;M--)"."===(A=_[M])?_.splice(M,1):".."===A?(_.splice(M,1),O++):O&&(_.splice(M,1),O--);if(!k&&!x)for(;O--;O)_.unshift("..");!k||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),S&&"/"!==_.join("/").substr(-1)&&_.push("");var P,j=""===_[0]||_[0]&&"/"===_[0].charAt(0);E&&(r.hostname=r.host=j?"":_.length?_.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift()));return(k=k||r.host&&_.length)&&!j&&_.unshift(""),_.length?r.pathname=_.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,r){var n=r(511);e.exports=function(e){return"string"!==typeof e?e:n(e)?e.slice(2):e}},function(e,t){e.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)}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r