diff --git a/kinode/packages/app_store/app_store/src/icon b/kinode/packages/app_store/app_store/src/icon index 9210c6e1f..a4b7f043f 100644 --- a/kinode/packages/app_store/app_store/src/icon +++ b/kinode/packages/app_store/app_store/src/icon @@ -1 +1 @@ -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIgAAACJCAYAAAD35nD3AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAtUSURBVHgB7Z2/bxvJFcffmyFFiRSNQHKAWPEhlh3LFiIjxqnSNWfkABeHc5siVdrU+TtSp04TINeeYeAKB75Gl4aJEznQr0ukIIqUIKYPsCRKIrUzNzNLUuSKP5bL/TEznA9gU1xTpiF+/d73vZl5izDBcL5VVl/UoNzzBUU4lg+ID49hQkGwGCWAcz4PpDQL7PQmeFAAQucAyRQwVhjpLyPkAnjjBDjUxU+tCrT0Hi5r76D4zyripxdgKdYIhPMXBajdnYdccQ4apz8Emv/ByCKIihQPa7yDXGlPigZLDw/BEowWiBJFfeU+XJ4uAsnPpSaIYbQEQ6e2odA4MjlFGSeQLlEAvQVG4B2ZKhZjBMJPtxbE76vmiKIP3PsXUNjGmeV9MACtBeL7isUVkT5WtEkfcYGiQiK0ontU0VIgVgsjiBQKihQ0jRUdhaKVQCZKGD3xKlDEHZ2Eoo1A+Onm6uQKowMZUZj3BmeXN0ADMheIMp9IPhYNqDI4rlCpJ/81zizuQ4ZkJhCVTs7ufyi+eASO/hBvJ0t/kolA+NnmHYD8xxOfTsLSrHhw+t4OpEyqAnFRY0ymcAP2d/+M99Nb+0lNIGrh7Ix85rzGmMhoMsOep5VyUhEIP99cAp5fcyklJuSKco6up5FyEheIKl+BroIjAbwKlpYrkCCJCUT5jZPFNWGulsCRHKLKEes6ryAhEhGIb0YXhd+g8+BIHvSq8J+950mY19gF4ptR/tSJI2USMq+xCsRVKhmTgEhiE4gThybELBICMeB7DplWnDgyR34G4rPguy9iaSnEIhBnSDVDfhYLi08hBsYWCK/trjlx6Ai9Jda8nsCYjCUQ1QRz6yr6wuiS36iMTmSB+CuyrkOqP3TV3/AdjUgCURULp2vgMANOnraPmY5ItAjiylmzQJhSVWYERhaI7zucOIxDFBK8sTty1B9JIH4uc77DWOr80ah+ZLQIIjcXO8xGfIajNNFCC8SlFkuQn+Gd+x+GfXkogfgO2KUWa5Cp5v32zTAvDRdBzkgsbVuHRlAWyrAOFQg//8eSCEuulW4dohUfwrAOjyDMc6nFVkIUHQMF0owezpjaivhs+cnmwLW0wRHERY8JQKzVDCh7+wrERY8JQbbhby32PXnQP4K46DE5ELrS9496XXTRY8KQXqRPRZPr+Q1e/YHITZA5BOfB6yixKVSB8So4EkAOCIRr812vCUR1TWtEj0mCjH8AyH/Vfu7BS0D8HBwJIPoioruKNx687bx6PcWca9RS52xHCKLWfk5wTVwrgiMZKP1R8NJ1gXCuzxxSJDWRH1+2n3NeFNd+Bo5k4OxaT6RLIMqo6GZOOftj13OET8CRDKLkDZrV7gii40l8FUX41RwMFUXQTQxICo/f6XzaLRCd0ksnhH7R9Zx5z8CRDIEg0RaIlumlhYwgnWZVRhAXRZIhkGauIghed7Ba0WlWJYw9BkdC5NqZ5Eog/DLUDqPMCJpVV/ImSKM7gnD+9yntb7MhzSrg6/ZzaVYB3eGtRBBNs+YKr99JrVG9o0cLxJdCGB2phX8kLs6A2cilg69BNxbuyiWOw2arXeYcBtojzSqHA2GkbqvniOKR3waj4UIcRD+B+OXuYdODNCIf7k0dxL+ATfBACa8LzYrWF4hJ8z2kWe0sec3mtViM1HN1Ok/n5ANRBlXuKjIFaVYZ1y8kRwHJS9AVuUdEGFVijEHthJDXYD7VriUEHSndKxOg+VkwDWVWNf/hDgX19B6dzOXmiHCrZm4tJNRks6pnaRtEaIOIfG6mQJj3J3PNqiHRjzWEQMilmQIx2azqWtoGYVCIZ05qVhhpVoWodS1tg+TpLBGruOaZ1BYmmlWk62AOU0SGETAZs8yq/qVtAGJUk6wXRplVA0rbTkSzzGwPIjHHrJpR2gYwXyASI8yqmY09OwRiglk1pbQNYIdAJHqbVX1XbYdA1D1YbUBns6rzqu0QRCcVUrvNd6Loa1aNK23bIBzbk2IkWppVw0rbbuoixXgnYAv6mVURPdhfwVQ4CoGwXKz3Wc0crcyqPBFIzN0eeXkpBEIt8SAtdDKrhpa2bZQHoQW7Iog+ZtXY0rYNkQJhp/Z4kBY6mFWDS9s2dPo4BydYBdtOuLbM6tUEgNdCNOnONrNh2N639ZMcfv/hMT/ZqRu/qhtEmlXOWgJ5DJ73O6MNYwbgwoO3fh9E5BqwjaBZdbPNRgPV6nPz8LYn0gzhdt3ywx+AJ3si/mFvOduMYco9Eu/A2KjleR0CyZNDccGyiT18Tfy6KZXhP5WzzfivIU2Q/sbYNjvHI/ngC+S4cQRFi7rujP1SDZhpiSMruMFRWRYv0Fzul0bVmlVdzn/ui8MRGbH8Ig2q/PJqFDfHfRGCzU4z0kexkHNUkfxB/H4AI8Mei/9Mds9q9aBdol8JxAYfwvADudM23GsZiiongj/AT0K/h6mgCBZNroxH4XwfjIeHH0eFEUdXqdlood/DzGbZxdVdH9oCQfyJ8CDeERgNnoV+KefhX9v1FvA29GsZGCgQPFKetEl36ZIr7YHJBO8OMZCI6zUYcp4Y4r+NXKzzvK602y2QqWOzZ274K7nPh79O3ncm4ocXdlMSZ8P/HTpy0X1ToS6BWJFm5KhMHLDND2FdVGzjLtz9VojkYMB7fB45QmVKd3pRV4Iv4Webd4BR82/FLptUBD4TPkCO2Cr6IR/X4+1sim4th4/EF35DjIhVYy4PZ7MI5bMGeOwrvPFwu/PSdYHIoXan+V9Yt7rrGIxsjs0u/z54+Vp/XaUZJBvgmCz49RsaSnovwBQvnEAmjXOs9LrcUyAqiqS+NO7IDObtBM1pi/5LuMRzApkU+kQPSV+BYOnhofmdVcdQBkQPyeBNIDV8BQ67GRA9JAMFopSF6AyrrQyJHpLh28hm6hVrNhM5rpBnsodED8lQgbi+iKVgfntY9JCE2oiKpR9XrJoCMOnIrqn8TEMQfqcyOsNqDWfhZ5aEFogqe51hNR/PexMmtbQY7ayDMqwu1RiLTC03lkcaBT6SQJRhLZW/BIeZnI0+Dmvk01KIt6tCiXbcM26iIJVRUkv7uyACOLu8AcQt5hmDbIiFrFqCRD9vOV1fd37EAORn9N+9yBF/rMOr/P9bZZjhz4y+54zNSHEI3xEltbQY+3Qz5wfzcFp75rYoaoZcHmHFL/DG7bGOXox9pF+ZVsacadWNHF0fVxySWGY+qJ3QrrLRB/FZ4PS9WIqIWAdo8NNvVoVlXgVHhohyNmLF0ovYJ6w4kWRJvOKQJDKCh59sPhKVjRvikiaUvoorrXSS2IwmdULPo09cdZMwslq5PPsKv/fTRA7eJzrEy/VJEkb2OVj5yziqlX4kOrlONWjkApHruMYPq79TTbAExSFJbQwgr+2uia7aI3CMj+e9gf/tVfD+p4nfqSPVOZHKvAJddb4kImrzuFdRi6UpkfogUedLooJHUPNejbOuEuldISNcvyQkMmog2Yi7vxGWTEcRq2hS5E9E2rkFjh5kEzW6/gWgAfz91gMgfNWlnSaqfMVKcNpPFmghkBYq7fDGg4kVSjOdwOHOmzQqlDBoJRCJSjvTotIhho8FHwUNhdFCO4G08P1JbsnqiKKxMFpoK5BOlEfJkRXxA7XkpkfCfHKyD0fbO7oKo4URAmmhtjeenImV4ssF46KK2gLo7QDFfX84jxkYJZBO+OnWAjC6pLVYDBVFJ8YKpBN/4/SFEAq7owboZtXKV54Cqyp9YKNqqig6sUIgQdqCYfUy0Nx8IqKRYpB3C5WC8EgVSoVDtYHbMqwUSC/47osCLNydF+XzFHhTZUDxSHhZ/SGD8rVvoPRCNKz8yUoMj4FjHXJwAYVCFb7524nu5jIuvgMP/q4n6fddZQAAAABJRU5ErkJggg== \ No newline at end of file +data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIgAAACJCAYAAAD35nD3AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAxGSURBVHgB7Z1PbBx3Fcff+83u2nHtHLJBkChVndI4iUhQwFzCBURFQVV6rdQTPSAOSJx6ogIJCZVbxY1e4YAQlXpKVKlISOWSXLBUkVZJtqVJVMtuRZ0D66y9a8+8vvcbb7y2Z3dnZ2fm95uZ30dy9t9kvN757nvf936/mR9CxSC6uwBtnIF6MA/YaOgnfVqI3NjDdvj6zqa+neP/iRfaUCEQSooWQrd+CoLeSQhgAZR3AggWIA3Q3+B99fjT2+CfNdhRm3j8/JdQQkojEHp89zT/e4rvngZVPwFBMAN5olQXgp1HAPU1gN11fOrCGpSAwgqE6N0Z6J5/BnZ7Z8GrfyN3QYxDBOPvfA61xn2YufcQ8cUuFJBCCUSLYvsspw24bCRKTAP5D0UsOPvNFhSIQgiEaLUJnfYii+JSoUQRBUKbPcw6zOJKEQyv1QLZ8xXLXE6cglLCQgEWisV+xUqBlF8Yh5CoorwVG9OPVQKpnDAOI0Kh4F82RRQrBKJ7Fh36YWWFcRjlt2zxKEYFoquSztlLpTCfmeCzP7m4AgYxJhCdTlD9ILXuZlkxnHZyF4iOGlvnvst3LoNjAsxEk1wFor3GlrrmokZCJJocC27k6U1yEwh1P2GfAcvOa0yJDBJKNJm/eBtyIBeBUOfjqy6lpEwDb2P93C3ImEwFslelvODK14yQaQfH8B9ZppzMBOL8Rk5k7EsyEYgTR85kKJLUBaJHXre3rzkzmjNiXgO6kfbMtlQF4sRhmAxEkppAnDgsIWWRKEiB0HN0XnDisACEBtTwx/qYpLK7KXGG1FJSMq5TRZBwXMWJw0rkmGzRC/Txu1NF9elSTPecG421GfKacObsVZiCxAKhx3eWwadFcNhN4C3pY5WQRAIJpwZ6iX+pI2+85fCYTc7EAtGmVCb6OIoFH7Mklc3kEWSbI4fzHcVDjpme9zsZEwkknNNBS+AoKN4p2rwz0bSL2ALR4Ukm/DgKDvuRCVJN/AgiqcV1SouPdFonSDWxBELb/11yqaVMcKqJWdXEiyCB71JL2ZCqJkaXdaxAdJPFVS3lQ47p6aVL4zYbKZCw5+G51FJWKLg8LoqMjiCu51FuxLCOiSJDBRKWtc6Ylp4xUWR4BNl2Yy2VYEwUiRQI0UcN/sedy1IVRkSR6AjSnV103qNCjIgi0QJxfY/qgcFi1NNHBKI7bC56VA+CZlR39WgEUa7vUVkiqtYDAtHm1JW21QW9xcNm9WAEEXPqqC5iVp8+/8zgUwcFItc9d1Qbv3d+8OETgej0gt4z4Kg25DUH08x+BNlWiWY9O0qG7ok82+w/rO2/UluUWqcYqDPc/Xua/5gnfwggdiCAVfBgg432BjiSE57vpC+7uS8Qm1vrGMyBr5YA6XlQyOLw546cVUwUnmkc6EcsEGpxyX7diSUBNW01bspd/TGHl8JWr4CNEL3EovgR385BIuiWE0oCOsHf8GsX2mEE2aYm2AYhR4zgVZ1GaJrUh1chCK5y9rzBaeg6OOKxUJeM0g5NKtXsSi/EqQSD1/heesJFuMY7/gNHI/u+DDbS652Umz2B7J4EW5CUgvAyZEOTo8lrTiQx8MIv555APDs+sFAc1yBbnEjisKcJRf+TicnQAOMEV3IQR58m+P4vwTEc1oRoQ8GcBUP7SkwyZpVWokEulyE3QRaT+ZmmgtrcCTAN6QNlIOTrEtqlmmFg0FA8QGf2fFuJHgTfB1P4/qvgiIYrGQW0Y7aCIcNhHrnfQkHYhJOOLXFEkR8MEjbmSgT7kJp5g4pXjI8BIf5RvwdCEUn4HOEGp583h3ZgJfIFXI4T/QVQdYbvnJt9BG8P3UZSnK1dXlVjk4qeSYFcmaiFTtDiI8jdUPwzC/ufoMdcMmN0ORyQVEFceeFvhm4jZbt0cgGi9yNRSn6H3s5CkOalD2JOIBRzeqOM1AK9xbdv8qMb/HOLv+Fv8wuvZ9w+jxZJeODPjN5Ghgr20qdUTFHbBBiac70dRxoL8X736199j9+gB2b46YEh+6HgX/nn30NebPE+JAo9C9nAvoQ4DbJICfn3yDAAv+9h2wCs6p6Owp/z/fqY/Ty//zI+za9/Bzz1EUfKLbABYmnT49YvwBxv8LsYbZIlrYSRY8Q2HKqVeiP5iK9VsPdRb9riS1K5mH9yKE4F9cHYLcQABsEqlAOrhgIMCyQG2n/E2i7VhXQMI1Mc2PyqM2AY+wUSN20Q2DMinQbydwf+b/nWXBMRjAskzrdejN0YpCeBUM4TvhB+ZrIMVuFCvYag4NHYbaTTKf2Gkfsp+aCbQjOdRNaGYol0wRj4WbzN+FsEcHRZC90ap5eNjuVkzwd6uqQJWBs1MIlS/McHz4/dLvQhr2ohIN4LjWvAnkNd5W5fmcdMNsJWfi4LpEfRqwH5m9wvMzMnJPBXWSSd2EZU+wzuvj6ZxFyU83gSweLgfghSvCouCwhZIEGtzSbPzKRl3b+gWwc7igYgxS17Q40pafJ53rEjz/v+llFxCMFuu8ZN9q7hL6IMuhkUiAjUYNcy/JJ0Ip4H46h6m02qMtvSRR5WD0dmzUCeO1dmGLTDVQz1zJW5fQK6EbtjmiYyEozujLuh8JdXwSaa/4D0ZBp8C3KFVo2Vj0Vh7dMNJedfGm2W9SFq5XhqJFcI3p/AMRzWBJ57sRs6IfTtCLP5nD/bLx9dahkFhpllTyA1e0ZCMxWJpBUnjlj4uwMCMV3JHEZEQvA6pDnnVFdK6vdOHDGpzw5cQGZm+wF06mAVYYhjkZCMwchoZrIJNHpGmvd3bkiVZUJRPmx29RfpSZOfOq1X7L7CsggFr+h2+7jWPMm0PbzJ1dEHJZpplh8IGzi39I7cHRiswwf8yU60pmq+4C3Qs9lBrgYts8RPcpQ5MSAWUfwWR4qWLptlOwrAkQB/v2gZuEaZ/5A/eYsFMkAYFVYjrzxkQ4u66NRmH/Tv7n+ac/6XVvRDHOZZvbPev/tEIIjf6lnTD3GYY9d/KA2y/sOD8dhr3ANHtUHxovscFIiUuy7NVJsvPn0w+PCAQHSaoYMKclSIwG8NphchYkEhvwWOaqLwyLE/IhB86sKaNErAUS3I39TH/hDRTQNv1pnVqhHgStTT0QJptFvOrFYIObPhkDntEymQsCeiboOjGmD93mFz2md4X3que9tFkYrQ2R1amAwViIsiFcH3P9TTTocwemTLRZFyI96jiyODwEiBuChScsR7jIgewvixcR1F5PxdR6nQfY/nVsZtNlYgYRTB98FRLob0PQ4Ta3ZN2GHz18FRDmTM5fiFWM3Q+NOvOhxFnGEtPmIXtuNFDyG2QEIz48fescNSOLWMM6aDTDSBE+cv3nappsBMkFr6TD7Ddy54z1U1BWTC1NJnYoG4qqag8DGbJLX0SXSOQFjVKOdHCoNaiZrrEet/QkJ0kyViBpLDMsR3xGiIDWO6s4xmezfd7DOLEd/x+f1bMAVTX4BTr7t7TBZE9ubBYQ8iji28nsR3DJLKFVqdSCwjJXEIqV3Cl2i1CY87L9mxineFkW73VvBOGuIQUr3GsxOJYUQcwdx1PH4mNV+Y+kXAQ5G0f+LSTc5kIA4h9WslIPIb5Pznuq05oj0Hp5WUxSFktoyAM645kaIhjSKzq63oNyyRxA3uZQiuw/r9d7ISh/4NkAP0+JNlbuktgyM9ZDb68Ys3IWNyW6mGNu9cBvCWXYUzJXrSlr8STr3InlyXMnK+ZEqC3iPYrr2XZUo5jJG1rlzKSQCnFPji/sqwUySzwthiaC6axESqFJnLkXC4flqMCaSPiyZDEK8hJ62ttT7MO2oMYlwggo4ms2xgFZVzceSJ4fK147+fp9cY+k7AIujx3dO60gFDiywah4UhFYqhdBKFVQLpQ/+/ex48b6k6QrFPGH2sFEgfHVG8xiXwdxehlNgrjD5WC6TPE4+Cu6cLX/X0zWdnt2WDxxhHIQQyCG3dWQScWSpUVNGikPVv/BVZKNBkVTIphRNIH/r43Rn4+rMsFu8UIC1a18IXUXj4gKPFGnx272GRRDFIYQVyGO1XqN4EDBaBqJm7YPpRghSLYmfDZl8xCaURyGH0zLbt9gIELBpPNSHYXeCDmGxZswM7ZiEorwuKxdDrbkKj8SXM7Kwj2u8nklBagQxDp6bnvj0Pnc0Z8Oqh4fXp6FJshD2oQZgW/J1NmJvvwif/2SxqqkjKV9FAFhU6frmtAAAAAElFTkSuQmCC \ No newline at end of file diff --git a/kinode/packages/app_store/pkg/ui/assets/background-a451R5-M.jpg b/kinode/packages/app_store/pkg/ui/assets/background-a451R5-M.jpg new file mode 100644 index 000000000..e40de63eb Binary files /dev/null and b/kinode/packages/app_store/pkg/ui/assets/background-a451R5-M.jpg differ diff --git a/kinode/packages/app_store/pkg/ui/assets/index-5QTuaL_D.js b/kinode/packages/app_store/pkg/ui/assets/index-CPkF34RS.js similarity index 77% rename from kinode/packages/app_store/pkg/ui/assets/index-5QTuaL_D.js rename to kinode/packages/app_store/pkg/ui/assets/index-CPkF34RS.js index a42f6b63c..12927c6c4 100644 --- a/kinode/packages/app_store/pkg/ui/assets/index-5QTuaL_D.js +++ b/kinode/packages/app_store/pkg/ui/assets/index-CPkF34RS.js @@ -1,4 +1,4 @@ -var iw=Object.defineProperty;var ow=(t,e,r)=>e in t?iw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var zh=(t,e,r)=>(ow(t,typeof e!="symbol"?e+"":e,r),r);function sw(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Do(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Uo(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var jm={exports:{}},hu={},Dm={exports:{}},ye={};/** +var iw=Object.defineProperty;var ow=(t,e,r)=>e in t?iw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var zh=(t,e,r)=>(ow(t,typeof e!="symbol"?e+"":e,r),r);function sw(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Fo(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var jm={exports:{}},hu={},Dm={exports:{}},ye={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var iw=Object.defineProperty;var ow=(t,e,r)=>e in t?iw(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var dl=Symbol.for("react.element"),lw=Symbol.for("react.portal"),aw=Symbol.for("react.fragment"),uw=Symbol.for("react.strict_mode"),cw=Symbol.for("react.profiler"),fw=Symbol.for("react.provider"),dw=Symbol.for("react.context"),hw=Symbol.for("react.forward_ref"),pw=Symbol.for("react.suspense"),mw=Symbol.for("react.memo"),gw=Symbol.for("react.lazy"),$h=Symbol.iterator;function vw(t){return t===null||typeof t!="object"?null:(t=$h&&t[$h]||t["@@iterator"],typeof t=="function"?t:null)}var Um={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Fm=Object.assign,zm={};function Fo(t,e,r){this.props=t,this.context=e,this.refs=zm,this.updater=r||Um}Fo.prototype.isReactComponent={};Fo.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Fo.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function $m(){}$m.prototype=Fo.prototype;function kd(t,e,r){this.props=t,this.context=e,this.refs=zm,this.updater=r||Um}var Nd=kd.prototype=new $m;Nd.constructor=kd;Fm(Nd,Fo.prototype);Nd.isPureReactComponent=!0;var Hh=Array.isArray,Hm=Object.prototype.hasOwnProperty,Pd={current:null},qm={key:!0,ref:!0,__self:!0,__source:!0};function Wm(t,e,r){var n,i={},o=null,s=null;if(e!=null)for(n in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)Hm.call(e,n)&&!qm.hasOwnProperty(n)&&(i[n]=e[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1e in t?iw(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Aw=L,_w=Symbol.for("react.element"),Sw=Symbol.for("react.fragment"),kw=Object.prototype.hasOwnProperty,Nw=Aw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Pw={key:!0,ref:!0,__self:!0,__source:!0};function Gm(t,e,r){var n,i={},o=null,s=null;r!==void 0&&(o=""+r),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)kw.call(e,n)&&!Pw.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:_w,type:t,key:o,ref:s,props:i,_owner:Nw.current}}hu.Fragment=Sw;hu.jsx=Gm;hu.jsxs=Gm;jm.exports=hu;var C=jm.exports,ff={},Vm={exports:{}},gr={},Km={exports:{}},Qm={};/** + */var Aw=L,_w=Symbol.for("react.element"),Sw=Symbol.for("react.fragment"),kw=Object.prototype.hasOwnProperty,Nw=Aw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Pw={key:!0,ref:!0,__self:!0,__source:!0};function Gm(t,e,r){var n,i={},o=null,s=null;r!==void 0&&(o=""+r),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)kw.call(e,n)&&!Pw.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:_w,type:t,key:o,ref:s,props:i,_owner:Nw.current}}hu.Fragment=Sw;hu.jsx=Gm;hu.jsxs=Gm;jm.exports=hu;var P=jm.exports,ff={},Vm={exports:{}},gr={},Km={exports:{}},Qm={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var iw=Object.defineProperty;var ow=(t,e,r)=>e in t?iw(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function e(_,I){var R=_.length;_.push(I);e:for(;0>>1,h=_[k];if(0>>1;ki(y,R))ji(U,y)?(_[k]=U,_[j]=R,k=j):(_[k]=y,_[Z]=R,k=Z);else if(ji(U,R))_[k]=U,_[j]=R,k=j;else break e}}return I}function i(_,I){var R=_.sortIndex-I.sortIndex;return R!==0?R:_.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,m=3,g=!1,v=!1,x=!1,N=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(_){for(var I=r(u);I!==null;){if(I.callback===null)n(u);else if(I.startTime<=_)n(u),I.sortIndex=I.expirationTime,e(a,I);else break;I=r(u)}}function T(_){if(x=!1,b(_),!v)if(r(a)!==null)v=!0,A(B);else{var I=r(u);I!==null&&S(T,I.startTime-_)}}function B(_,I){v=!1,x&&(x=!1,E(H),H=-1),g=!0;var R=m;try{for(b(I),d=r(a);d!==null&&(!(d.expirationTime>I)||_&&!X());){var k=d.callback;if(typeof k=="function"){d.callback=null,m=d.priorityLevel;var h=k(d.expirationTime<=I);I=t.unstable_now(),typeof h=="function"?d.callback=h:d===r(a)&&n(a),b(I)}else n(a);d=r(a)}if(d!==null)var P=!0;else{var Z=r(u);Z!==null&&S(T,Z.startTime-I),P=!1}return P}finally{d=null,m=R,g=!1}}var D=!1,$=null,H=-1,Q=5,J=-1;function X(){return!(t.unstable_now()-J_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<_?Math.floor(1e3/_):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return r(a)},t.unstable_next=function(_){switch(m){case 1:case 2:case 3:var I=3;break;default:I=m}var R=m;m=I;try{return _()}finally{m=R}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(_,I){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var R=m;m=_;try{return I()}finally{m=R}},t.unstable_scheduleCallback=function(_,I,R){var k=t.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0k?(_.sortIndex=R,e(u,_),r(a)===null&&_===r(u)&&(x?(E(H),H=-1):x=!0,S(T,R-k))):(_.sortIndex=h,e(a,_),v||g||(v=!0,A(B))),_},t.unstable_shouldYield=X,t.unstable_wrapCallback=function(_){var I=m;return function(){var R=m;m=I;try{return _.apply(this,arguments)}finally{m=R}}}})(Qm);Km.exports=Qm;var Cw=Km.exports;/** + */(function(t){function e(_,I){var R=_.length;_.push(I);e:for(;0>>1,h=_[k];if(0>>1;ki(y,R))ji(U,y)?(_[k]=U,_[j]=R,k=j):(_[k]=y,_[Z]=R,k=Z);else if(ji(U,R))_[k]=U,_[j]=R,k=j;else break e}}return I}function i(_,I){var R=_.sortIndex-I.sortIndex;return R!==0?R:_.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,m=3,g=!1,v=!1,E=!1,N=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(_){for(var I=r(u);I!==null;){if(I.callback===null)n(u);else if(I.startTime<=_)n(u),I.sortIndex=I.expirationTime,e(a,I);else break;I=r(u)}}function T(_){if(E=!1,b(_),!v)if(r(a)!==null)v=!0,A(B);else{var I=r(u);I!==null&&S(T,I.startTime-_)}}function B(_,I){v=!1,E&&(E=!1,x(H),H=-1),g=!0;var R=m;try{for(b(I),d=r(a);d!==null&&(!(d.expirationTime>I)||_&&!X());){var k=d.callback;if(typeof k=="function"){d.callback=null,m=d.priorityLevel;var h=k(d.expirationTime<=I);I=t.unstable_now(),typeof h=="function"?d.callback=h:d===r(a)&&n(a),b(I)}else n(a);d=r(a)}if(d!==null)var C=!0;else{var Z=r(u);Z!==null&&S(T,Z.startTime-I),C=!1}return C}finally{d=null,m=R,g=!1}}var D=!1,$=null,H=-1,Y=5,Q=-1;function X(){return!(t.unstable_now()-Q_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<_?Math.floor(1e3/_):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return r(a)},t.unstable_next=function(_){switch(m){case 1:case 2:case 3:var I=3;break;default:I=m}var R=m;m=I;try{return _()}finally{m=R}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(_,I){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var R=m;m=_;try{return I()}finally{m=R}},t.unstable_scheduleCallback=function(_,I,R){var k=t.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0k?(_.sortIndex=R,e(u,_),r(a)===null&&_===r(u)&&(E?(x(H),H=-1):E=!0,S(T,R-k))):(_.sortIndex=h,e(a,_),v||g||(v=!0,A(B))),_},t.unstable_shouldYield=X,t.unstable_wrapCallback=function(_){var I=m;return function(){var R=m;m=I;try{return _.apply(this,arguments)}finally{m=R}}}})(Qm);Km.exports=Qm;var Cw=Km.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var iw=Object.defineProperty;var ow=(t,e,r)=>e in t?iw(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Jm=L,pr=Cw;function q(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),df=Object.prototype.hasOwnProperty,Mw=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Wh={},Gh={};function Iw(t){return df.call(Gh,t)?!0:df.call(Wh,t)?!1:Mw.test(t)?Gh[t]=!0:(Wh[t]=!0,!1)}function Rw(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Tw(t,e,r,n){if(e===null||typeof e>"u"||Rw(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Vt(t,e,r,n,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var Tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Tt[t]=new Vt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Tt[e]=new Vt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Tt[t]=new Vt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Tt[t]=new Vt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Tt[t]=new Vt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Tt[t]=new Vt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Tt[t]=new Vt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Tt[t]=new Vt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Tt[t]=new Vt(t,5,!1,t.toLowerCase(),null,!1,!1)});var Md=/[\-:]([a-z])/g;function Id(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Md,Id);Tt[e]=new Vt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Md,Id);Tt[e]=new Vt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Md,Id);Tt[e]=new Vt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Tt[t]=new Vt(t,1,!1,t.toLowerCase(),null,!1,!1)});Tt.xlinkHref=new Vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Tt[t]=new Vt(t,1,!1,t.toLowerCase(),null,!0,!0)});function Rd(t,e,r,n){var i=Tt.hasOwnProperty(e)?Tt[e]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),df=Object.prototype.hasOwnProperty,Mw=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Wh={},Gh={};function Iw(t){return df.call(Gh,t)?!0:df.call(Wh,t)?!1:Mw.test(t)?Gh[t]=!0:(Wh[t]=!0,!1)}function Rw(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Tw(t,e,r,n){if(e===null||typeof e>"u"||Rw(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Vt(t,e,r,n,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var Tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Tt[t]=new Vt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Tt[e]=new Vt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Tt[t]=new Vt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Tt[t]=new Vt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Tt[t]=new Vt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Tt[t]=new Vt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Tt[t]=new Vt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Tt[t]=new Vt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Tt[t]=new Vt(t,5,!1,t.toLowerCase(),null,!1,!1)});var Md=/[\-:]([a-z])/g;function Id(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Md,Id);Tt[e]=new Vt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Md,Id);Tt[e]=new Vt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Md,Id);Tt[e]=new Vt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Tt[t]=new Vt(t,1,!1,t.toLowerCase(),null,!1,!1)});Tt.xlinkHref=new Vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Tt[t]=new Vt(t,1,!1,t.toLowerCase(),null,!0,!0)});function Rd(t,e,r,n){var i=Tt.hasOwnProperty(e)?Tt[e]:null;(i!==null?i.type!==0:n||!(2l||i[s]!==o[l]){var a=` -`+i[s].replace(" at new "," at ");return t.displayName&&a.includes("")&&(a=a.replace("",t.displayName)),a}while(1<=s&&0<=l);break}}}finally{pc=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?fs(t):""}function Ow(t){switch(t.tag){case 5:return fs(t.type);case 16:return fs("Lazy");case 13:return fs("Suspense");case 19:return fs("SuspenseList");case 0:case 2:case 15:return t=mc(t.type,!1),t;case 11:return t=mc(t.type.render,!1),t;case 1:return t=mc(t.type,!0),t;default:return""}}function gf(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Zi:return"Fragment";case Xi:return"Portal";case hf:return"Profiler";case Td:return"StrictMode";case pf:return"Suspense";case mf:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Zm:return(t.displayName||"Context")+".Consumer";case Xm:return(t._context.displayName||"Context")+".Provider";case Od:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Ld:return e=t.displayName||null,e!==null?e:gf(t.type)||"Memo";case Jn:e=t._payload,t=t._init;try{return gf(t(e))}catch{}}return null}function Lw(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return gf(e);case 8:return e===Td?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function pi(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function tg(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Bw(t){var e=tg(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){n=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Nl(t){t._valueTracker||(t._valueTracker=Bw(t))}function rg(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=tg(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function ka(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function vf(t,e){var r=e.checked;return ft({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Kh(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=pi(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function ng(t,e){e=e.checked,e!=null&&Rd(t,"checked",e,!1)}function yf(t,e){ng(t,e);var r=pi(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?wf(t,e.type,r):e.hasOwnProperty("defaultValue")&&wf(t,e.type,pi(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Qh(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function wf(t,e,r){(e!=="number"||ka(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var ds=Array.isArray;function go(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Pl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ts(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var ws={animationIterationCount:!0,aspectRatio:!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,gridArea:!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},jw=["Webkit","ms","Moz","O"];Object.keys(ws).forEach(function(t){jw.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ws[e]=ws[t]})});function lg(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||ws.hasOwnProperty(t)&&ws[t]?(""+e).trim():e+"px"}function ag(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=lg(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var Dw=ft({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bf(t,e){if(e){if(Dw[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(q(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(q(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(q(61))}if(e.style!=null&&typeof e.style!="object")throw Error(q(62))}}function Af(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _f=null;function Bd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Sf=null,vo=null,yo=null;function Xh(t){if(t=ml(t)){if(typeof Sf!="function")throw Error(q(280));var e=t.stateNode;e&&(e=yu(e),Sf(t.stateNode,t.type,e))}}function ug(t){vo?yo?yo.push(t):yo=[t]:vo=t}function cg(){if(vo){var t=vo,e=yo;if(yo=vo=null,Xh(t),e)for(t=0;t>>=0,t===0?32:31-(Qw(t)/Jw|0)|0}var Cl=64,Ml=4194304;function hs(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Ma(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,o=t.pingedLanes,s=r&268435455;if(s!==0){var l=s&~i;l!==0?n=hs(l):(o&=s,o!==0&&(n=hs(o)))}else s=r&~i,s!==0?n=hs(s):o!==0&&(n=hs(o));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function hl(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Wr(e),t[e]=r}function e2(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=xs),l0=" ",a0=!1;function Mg(t,e){switch(t){case"keyup":return P2.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ig(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var eo=!1;function M2(t,e){switch(t){case"compositionend":return Ig(e);case"keypress":return e.which!==32?null:(a0=!0,l0);case"textInput":return t=e.data,t===l0&&a0?null:t;default:return null}}function I2(t,e){if(eo)return t==="compositionend"||!qd&&Mg(t,e)?(t=Pg(),ia=zd=ri=null,eo=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=d0(r)}}function Lg(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Lg(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Bg(){for(var t=window,e=ka();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=ka(t.document)}return e}function Wd(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function F2(t){var e=Bg(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Lg(r.ownerDocument.documentElement,r)){if(n!==null&&Wd(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!t.extend&&o>n&&(i=n,n=o,o=i),i=h0(r,o);var s=h0(r,n);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>n?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,to=null,If=null,As=null,Rf=!1;function p0(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Rf||to==null||to!==ka(n)||(n=to,"selectionStart"in n&&Wd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),As&&Us(As,n)||(As=n,n=Ta(If,"onSelect"),0io||(t.current=Df[io],Df[io]=null,io--)}function Qe(t,e){io++,Df[io]=t.current,t.current=e}var mi={},zt=wi(mi),er=wi(!1),Ri=mi;function ko(t,e){var r=t.type.contextTypes;if(!r)return mi;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=e[o];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function tr(t){return t=t.childContextTypes,t!=null}function La(){tt(er),tt(zt)}function x0(t,e,r){if(zt.current!==mi)throw Error(q(168));Qe(zt,e),Qe(er,r)}function Wg(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(q(108,Lw(t)||"Unknown",i));return ft({},r,n)}function Ba(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||mi,Ri=zt.current,Qe(zt,t),Qe(er,er.current),!0}function b0(t,e,r){var n=t.stateNode;if(!n)throw Error(q(169));r?(t=Wg(t,e,Ri),n.__reactInternalMemoizedMergedChildContext=t,tt(er),tt(zt),Qe(zt,t)):tt(er),Qe(er,r)}var bn=null,wu=!1,Cc=!1;function Gg(t){bn===null?bn=[t]:bn.push(t)}function X2(t){wu=!0,Gg(t)}function Ei(){if(!Cc&&bn!==null){Cc=!0;var t=0,e=Re;try{var r=bn;for(Re=1;t>=s,i-=s,Sn=1<<32-Wr(e)+i|r<H?(Q=$,$=null):Q=$.sibling;var J=m(E,$,b[H],T);if(J===null){$===null&&($=Q);break}t&&$&&J.alternate===null&&e(E,$),w=o(J,w,H),D===null?B=J:D.sibling=J,D=J,$=Q}if(H===b.length)return r(E,$),nt&&Ai(E,H),B;if($===null){for(;HH?(Q=$,$=null):Q=$.sibling;var X=m(E,$,J.value,T);if(X===null){$===null&&($=Q);break}t&&$&&X.alternate===null&&e(E,$),w=o(X,w,H),D===null?B=X:D.sibling=X,D=X,$=Q}if(J.done)return r(E,$),nt&&Ai(E,H),B;if($===null){for(;!J.done;H++,J=b.next())J=d(E,J.value,T),J!==null&&(w=o(J,w,H),D===null?B=J:D.sibling=J,D=J);return nt&&Ai(E,H),B}for($=n(E,$);!J.done;H++,J=b.next())J=g($,E,H,J.value,T),J!==null&&(t&&J.alternate!==null&&$.delete(J.key===null?H:J.key),w=o(J,w,H),D===null?B=J:D.sibling=J,D=J);return t&&$.forEach(function(ie){return e(E,ie)}),nt&&Ai(E,H),B}function N(E,w,b,T){if(typeof b=="object"&&b!==null&&b.type===Zi&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case kl:e:{for(var B=b.key,D=w;D!==null;){if(D.key===B){if(B=b.type,B===Zi){if(D.tag===7){r(E,D.sibling),w=i(D,b.props.children),w.return=E,E=w;break e}}else if(D.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===Jn&&C0(B)===D.type){r(E,D.sibling),w=i(D,b.props),w.ref=ts(E,D,b),w.return=E,E=w;break e}r(E,D);break}else e(E,D);D=D.sibling}b.type===Zi?(w=Mi(b.props.children,E.mode,T,b.key),w.return=E,E=w):(T=da(b.type,b.key,b.props,null,E.mode,T),T.ref=ts(E,w,b),T.return=E,E=T)}return s(E);case Xi:e:{for(D=b.key;w!==null;){if(w.key===D)if(w.tag===4&&w.stateNode.containerInfo===b.containerInfo&&w.stateNode.implementation===b.implementation){r(E,w.sibling),w=i(w,b.children||[]),w.return=E,E=w;break e}else{r(E,w);break}else e(E,w);w=w.sibling}w=jc(b,E.mode,T),w.return=E,E=w}return s(E);case Jn:return D=b._init,N(E,w,D(b._payload),T)}if(ds(b))return v(E,w,b,T);if(Jo(b))return x(E,w,b,T);jl(E,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,w!==null&&w.tag===6?(r(E,w.sibling),w=i(w,b),w.return=E,E=w):(r(E,w),w=Bc(b,E.mode,T),w.return=E,E=w),s(E)):r(E,w)}return N}var Po=ev(!0),tv=ev(!1),gl={},an=wi(gl),Hs=wi(gl),qs=wi(gl);function Pi(t){if(t===gl)throw Error(q(174));return t}function eh(t,e){switch(Qe(qs,e),Qe(Hs,t),Qe(an,gl),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:xf(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=xf(e,t)}tt(an),Qe(an,e)}function Co(){tt(an),tt(Hs),tt(qs)}function rv(t){Pi(qs.current);var e=Pi(an.current),r=xf(e,t.type);e!==r&&(Qe(Hs,t),Qe(an,r))}function th(t){Hs.current===t&&(tt(an),tt(Hs))}var at=wi(0);function $a(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Mc=[];function rh(){for(var t=0;tr?r:4,t(!0);var n=Ic.transition;Ic.transition={};try{t(!1),e()}finally{Re=r,Ic.transition=n}}function yv(){return Pr().memoizedState}function rE(t,e,r){var n=di(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},wv(t))Ev(e,r);else if(r=Jg(t,e,r,n),r!==null){var i=Wt();Gr(r,t,n,i),xv(r,e,n)}}function nE(t,e,r){var n=di(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(wv(t))Ev(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,l=o(s,r);if(i.hasEagerState=!0,i.eagerState=l,Vr(l,s)){var a=e.interleaved;a===null?(i.next=i,Xd(e)):(i.next=a.next,a.next=i),e.interleaved=i;return}}catch{}finally{}r=Jg(t,e,i,n),r!==null&&(i=Wt(),Gr(r,t,n,i),xv(r,e,n))}}function wv(t){var e=t.alternate;return t===ct||e!==null&&e===ct}function Ev(t,e){_s=Ha=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function xv(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Dd(t,r)}}var qa={readContext:Nr,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useInsertionEffect:Lt,useLayoutEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useMutableSource:Lt,useSyncExternalStore:Lt,useId:Lt,unstable_isNewReconciler:!1},iE={readContext:Nr,useCallback:function(t,e){return Zr().memoizedState=[t,e===void 0?null:e],t},useContext:Nr,useEffect:I0,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,aa(4194308,4,hv.bind(null,e,t),r)},useLayoutEffect:function(t,e){return aa(4194308,4,t,e)},useInsertionEffect:function(t,e){return aa(4,2,t,e)},useMemo:function(t,e){var r=Zr();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Zr();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=rE.bind(null,ct,t),[n.memoizedState,t]},useRef:function(t){var e=Zr();return t={current:t},e.memoizedState=t},useState:M0,useDebugValue:lh,useDeferredValue:function(t){return Zr().memoizedState=t},useTransition:function(){var t=M0(!1),e=t[0];return t=tE.bind(null,t[1]),Zr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=ct,i=Zr();if(nt){if(r===void 0)throw Error(q(407));r=r()}else{if(r=e(),Nt===null)throw Error(q(349));Oi&30||ov(n,e,r)}i.memoizedState=r;var o={value:r,getSnapshot:e};return i.queue=o,I0(lv.bind(null,n,o,t),[t]),n.flags|=2048,Vs(9,sv.bind(null,n,o,r,e),void 0,null),r},useId:function(){var t=Zr(),e=Nt.identifierPrefix;if(nt){var r=kn,n=Sn;r=(n&~(1<<32-Wr(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Ws++,0")&&(a=a.replace("",t.displayName)),a}while(1<=s&&0<=l);break}}}finally{pc=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?fs(t):""}function Ow(t){switch(t.tag){case 5:return fs(t.type);case 16:return fs("Lazy");case 13:return fs("Suspense");case 19:return fs("SuspenseList");case 0:case 2:case 15:return t=mc(t.type,!1),t;case 11:return t=mc(t.type.render,!1),t;case 1:return t=mc(t.type,!0),t;default:return""}}function gf(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case eo:return"Fragment";case Zi:return"Portal";case hf:return"Profiler";case Td:return"StrictMode";case pf:return"Suspense";case mf:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Zm:return(t.displayName||"Context")+".Consumer";case Xm:return(t._context.displayName||"Context")+".Provider";case Od:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Ld:return e=t.displayName||null,e!==null?e:gf(t.type)||"Memo";case Jn:e=t._payload,t=t._init;try{return gf(t(e))}catch{}}return null}function Lw(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return gf(e);case 8:return e===Td?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function pi(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function tg(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Bw(t){var e=tg(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){n=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Nl(t){t._valueTracker||(t._valueTracker=Bw(t))}function rg(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=tg(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function ka(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function vf(t,e){var r=e.checked;return ft({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Kh(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=pi(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function ng(t,e){e=e.checked,e!=null&&Rd(t,"checked",e,!1)}function yf(t,e){ng(t,e);var r=pi(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?wf(t,e.type,r):e.hasOwnProperty("defaultValue")&&wf(t,e.type,pi(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Qh(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function wf(t,e,r){(e!=="number"||ka(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var ds=Array.isArray;function vo(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Pl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ts(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var ws={animationIterationCount:!0,aspectRatio:!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,gridArea:!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},jw=["Webkit","ms","Moz","O"];Object.keys(ws).forEach(function(t){jw.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ws[e]=ws[t]})});function lg(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||ws.hasOwnProperty(t)&&ws[t]?(""+e).trim():e+"px"}function ag(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=lg(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var Dw=ft({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bf(t,e){if(e){if(Dw[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(q(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(q(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(q(61))}if(e.style!=null&&typeof e.style!="object")throw Error(q(62))}}function Af(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _f=null;function Bd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Sf=null,yo=null,wo=null;function Xh(t){if(t=ml(t)){if(typeof Sf!="function")throw Error(q(280));var e=t.stateNode;e&&(e=yu(e),Sf(t.stateNode,t.type,e))}}function ug(t){yo?wo?wo.push(t):wo=[t]:yo=t}function cg(){if(yo){var t=yo,e=wo;if(wo=yo=null,Xh(t),e)for(t=0;t>>=0,t===0?32:31-(Qw(t)/Jw|0)|0}var Cl=64,Ml=4194304;function hs(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Ma(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,o=t.pingedLanes,s=r&268435455;if(s!==0){var l=s&~i;l!==0?n=hs(l):(o&=s,o!==0&&(n=hs(o)))}else s=r&~i,s!==0?n=hs(s):o!==0&&(n=hs(o));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function hl(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Wr(e),t[e]=r}function e2(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=Es),l0=" ",a0=!1;function Mg(t,e){switch(t){case"keyup":return P2.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ig(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var to=!1;function M2(t,e){switch(t){case"compositionend":return Ig(e);case"keypress":return e.which!==32?null:(a0=!0,l0);case"textInput":return t=e.data,t===l0&&a0?null:t;default:return null}}function I2(t,e){if(to)return t==="compositionend"||!qd&&Mg(t,e)?(t=Pg(),ia=zd=ri=null,to=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=d0(r)}}function Lg(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Lg(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Bg(){for(var t=window,e=ka();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=ka(t.document)}return e}function Wd(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function F2(t){var e=Bg(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Lg(r.ownerDocument.documentElement,r)){if(n!==null&&Wd(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!t.extend&&o>n&&(i=n,n=o,o=i),i=h0(r,o);var s=h0(r,n);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>n?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,ro=null,If=null,As=null,Rf=!1;function p0(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Rf||ro==null||ro!==ka(n)||(n=ro,"selectionStart"in n&&Wd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),As&&Us(As,n)||(As=n,n=Ta(If,"onSelect"),0oo||(t.current=Df[oo],Df[oo]=null,oo--)}function Qe(t,e){oo++,Df[oo]=t.current,t.current=e}var mi={},zt=wi(mi),er=wi(!1),Ri=mi;function No(t,e){var r=t.type.contextTypes;if(!r)return mi;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=e[o];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function tr(t){return t=t.childContextTypes,t!=null}function La(){tt(er),tt(zt)}function E0(t,e,r){if(zt.current!==mi)throw Error(q(168));Qe(zt,e),Qe(er,r)}function Wg(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(q(108,Lw(t)||"Unknown",i));return ft({},r,n)}function Ba(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||mi,Ri=zt.current,Qe(zt,t),Qe(er,er.current),!0}function b0(t,e,r){var n=t.stateNode;if(!n)throw Error(q(169));r?(t=Wg(t,e,Ri),n.__reactInternalMemoizedMergedChildContext=t,tt(er),tt(zt),Qe(zt,t)):tt(er),Qe(er,r)}var bn=null,wu=!1,Cc=!1;function Gg(t){bn===null?bn=[t]:bn.push(t)}function X2(t){wu=!0,Gg(t)}function xi(){if(!Cc&&bn!==null){Cc=!0;var t=0,e=Re;try{var r=bn;for(Re=1;t>=s,i-=s,Sn=1<<32-Wr(e)+i|r<H?(Y=$,$=null):Y=$.sibling;var Q=m(x,$,b[H],T);if(Q===null){$===null&&($=Y);break}t&&$&&Q.alternate===null&&e(x,$),w=o(Q,w,H),D===null?B=Q:D.sibling=Q,D=Q,$=Y}if(H===b.length)return r(x,$),nt&&Ai(x,H),B;if($===null){for(;HH?(Y=$,$=null):Y=$.sibling;var X=m(x,$,Q.value,T);if(X===null){$===null&&($=Y);break}t&&$&&X.alternate===null&&e(x,$),w=o(X,w,H),D===null?B=X:D.sibling=X,D=X,$=Y}if(Q.done)return r(x,$),nt&&Ai(x,H),B;if($===null){for(;!Q.done;H++,Q=b.next())Q=d(x,Q.value,T),Q!==null&&(w=o(Q,w,H),D===null?B=Q:D.sibling=Q,D=Q);return nt&&Ai(x,H),B}for($=n(x,$);!Q.done;H++,Q=b.next())Q=g($,x,H,Q.value,T),Q!==null&&(t&&Q.alternate!==null&&$.delete(Q.key===null?H:Q.key),w=o(Q,w,H),D===null?B=Q:D.sibling=Q,D=Q);return t&&$.forEach(function(ie){return e(x,ie)}),nt&&Ai(x,H),B}function N(x,w,b,T){if(typeof b=="object"&&b!==null&&b.type===eo&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case kl:e:{for(var B=b.key,D=w;D!==null;){if(D.key===B){if(B=b.type,B===eo){if(D.tag===7){r(x,D.sibling),w=i(D,b.props.children),w.return=x,x=w;break e}}else if(D.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===Jn&&C0(B)===D.type){r(x,D.sibling),w=i(D,b.props),w.ref=rs(x,D,b),w.return=x,x=w;break e}r(x,D);break}else e(x,D);D=D.sibling}b.type===eo?(w=Mi(b.props.children,x.mode,T,b.key),w.return=x,x=w):(T=da(b.type,b.key,b.props,null,x.mode,T),T.ref=rs(x,w,b),T.return=x,x=T)}return s(x);case Zi:e:{for(D=b.key;w!==null;){if(w.key===D)if(w.tag===4&&w.stateNode.containerInfo===b.containerInfo&&w.stateNode.implementation===b.implementation){r(x,w.sibling),w=i(w,b.children||[]),w.return=x,x=w;break e}else{r(x,w);break}else e(x,w);w=w.sibling}w=jc(b,x.mode,T),w.return=x,x=w}return s(x);case Jn:return D=b._init,N(x,w,D(b._payload),T)}if(ds(b))return v(x,w,b,T);if(Yo(b))return E(x,w,b,T);jl(x,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,w!==null&&w.tag===6?(r(x,w.sibling),w=i(w,b),w.return=x,x=w):(r(x,w),w=Bc(b,x.mode,T),w.return=x,x=w),s(x)):r(x,w)}return N}var Co=ev(!0),tv=ev(!1),gl={},an=wi(gl),Hs=wi(gl),qs=wi(gl);function Pi(t){if(t===gl)throw Error(q(174));return t}function eh(t,e){switch(Qe(qs,e),Qe(Hs,t),Qe(an,gl),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ef(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ef(e,t)}tt(an),Qe(an,e)}function Mo(){tt(an),tt(Hs),tt(qs)}function rv(t){Pi(qs.current);var e=Pi(an.current),r=Ef(e,t.type);e!==r&&(Qe(Hs,t),Qe(an,r))}function th(t){Hs.current===t&&(tt(an),tt(Hs))}var at=wi(0);function $a(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Mc=[];function rh(){for(var t=0;tr?r:4,t(!0);var n=Ic.transition;Ic.transition={};try{t(!1),e()}finally{Re=r,Ic.transition=n}}function yv(){return Pr().memoizedState}function rx(t,e,r){var n=di(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},wv(t))xv(e,r);else if(r=Jg(t,e,r,n),r!==null){var i=Wt();Gr(r,t,n,i),Ev(r,e,n)}}function nx(t,e,r){var n=di(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(wv(t))xv(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,l=o(s,r);if(i.hasEagerState=!0,i.eagerState=l,Vr(l,s)){var a=e.interleaved;a===null?(i.next=i,Xd(e)):(i.next=a.next,a.next=i),e.interleaved=i;return}}catch{}finally{}r=Jg(t,e,i,n),r!==null&&(i=Wt(),Gr(r,t,n,i),Ev(r,e,n))}}function wv(t){var e=t.alternate;return t===ct||e!==null&&e===ct}function xv(t,e){_s=Ha=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function Ev(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Dd(t,r)}}var qa={readContext:Nr,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useInsertionEffect:Lt,useLayoutEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useMutableSource:Lt,useSyncExternalStore:Lt,useId:Lt,unstable_isNewReconciler:!1},ix={readContext:Nr,useCallback:function(t,e){return Zr().memoizedState=[t,e===void 0?null:e],t},useContext:Nr,useEffect:I0,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,aa(4194308,4,hv.bind(null,e,t),r)},useLayoutEffect:function(t,e){return aa(4194308,4,t,e)},useInsertionEffect:function(t,e){return aa(4,2,t,e)},useMemo:function(t,e){var r=Zr();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Zr();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=rx.bind(null,ct,t),[n.memoizedState,t]},useRef:function(t){var e=Zr();return t={current:t},e.memoizedState=t},useState:M0,useDebugValue:lh,useDeferredValue:function(t){return Zr().memoizedState=t},useTransition:function(){var t=M0(!1),e=t[0];return t=tx.bind(null,t[1]),Zr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=ct,i=Zr();if(nt){if(r===void 0)throw Error(q(407));r=r()}else{if(r=e(),Nt===null)throw Error(q(349));Oi&30||ov(n,e,r)}i.memoizedState=r;var o={value:r,getSnapshot:e};return i.queue=o,I0(lv.bind(null,n,o,t),[t]),n.flags|=2048,Vs(9,sv.bind(null,n,o,r,e),void 0,null),r},useId:function(){var t=Zr(),e=Nt.identifierPrefix;if(nt){var r=kn,n=Sn;r=(n&~(1<<32-Wr(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Ws++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=s.createElement(r,{is:n.is}):(t=s.createElement(r),r==="select"&&(s=t,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):t=s.createElementNS(t,r),t[nn]=e,t[$s]=n,Mv(t,e,!1,!1),e.stateNode=t;e:{switch(s=Af(r,n),r){case"dialog":et("cancel",t),et("close",t),i=n;break;case"iframe":case"object":case"embed":et("load",t),i=n;break;case"video":case"audio":for(i=0;iIo&&(e.flags|=128,n=!0,rs(o,!1),e.lanes=4194304)}else{if(!n)if(t=$a(s),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),rs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!nt)return Bt(e),null}else 2*vt()-o.renderingStartTime>Io&&r!==1073741824&&(e.flags|=128,n=!0,rs(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(r=o.last,r!==null?r.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=vt(),e.sibling=null,r=at.current,Qe(at,n?r&1|2:r&1),e):(Bt(e),null);case 22:case 23:return hh(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?lr&1073741824&&(Bt(e),e.subtreeFlags&6&&(e.flags|=8192)):Bt(e),null;case 24:return null;case 25:return null}throw Error(q(156,e.tag))}function dE(t,e){switch(Vd(e),e.tag){case 1:return tr(e.type)&&La(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Co(),tt(er),tt(zt),rh(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return th(e),null;case 13:if(tt(at),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(q(340));No()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return tt(at),null;case 4:return Co(),null;case 10:return Yd(e.type._context),null;case 22:case 23:return hh(),null;case 24:return null;default:return null}}var Ul=!1,jt=!1,hE=typeof WeakSet=="function"?WeakSet:Set,ee=null;function ao(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ht(t,e,n)}else r.current=null}function Jf(t,e,r){try{r()}catch(n){ht(t,e,n)}}var F0=!1;function pE(t,e){if(Tf=Ia,t=Bg(),Wd(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=t,m=null;t:for(;;){for(var g;d!==r||i!==0&&d.nodeType!==3||(l=s+i),d!==o||n!==0&&d.nodeType!==3||(a=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(g=d.firstChild)!==null;)m=d,d=g;for(;;){if(d===t)break t;if(m===r&&++u===i&&(l=s),m===o&&++c===n&&(a=s),(g=d.nextSibling)!==null)break;d=m,m=d.parentNode}d=g}r=l===-1||a===-1?null:{start:l,end:a}}else r=null}r=r||{start:0,end:0}}else r=null;for(Of={focusedElem:t,selectionRange:r},Ia=!1,ee=e;ee!==null;)if(e=ee,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ee=t;else for(;ee!==null;){e=ee;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var x=v.memoizedProps,N=v.memoizedState,E=e.stateNode,w=E.getSnapshotBeforeUpdate(e.elementType===e.type?x:Dr(e.type,x),N);E.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(T){ht(e,e.return,T)}if(t=e.sibling,t!==null){t.return=e.return,ee=t;break}ee=e.return}return v=F0,F0=!1,v}function Ss(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&Jf(e,r,o)}i=i.next}while(i!==n)}}function bu(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Yf(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function Tv(t){var e=t.alternate;e!==null&&(t.alternate=null,Tv(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[nn],delete e[$s],delete e[jf],delete e[J2],delete e[Y2])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Ov(t){return t.tag===5||t.tag===3||t.tag===4}function z0(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Ov(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Xf(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Oa));else if(n!==4&&(t=t.child,t!==null))for(Xf(t,e,r),t=t.sibling;t!==null;)Xf(t,e,r),t=t.sibling}function Zf(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Zf(t,e,r),t=t.sibling;t!==null;)Zf(t,e,r),t=t.sibling}var Mt=null,Fr=!1;function Vn(t,e,r){for(r=r.child;r!==null;)Lv(t,e,r),r=r.sibling}function Lv(t,e,r){if(ln&&typeof ln.onCommitFiberUnmount=="function")try{ln.onCommitFiberUnmount(pu,r)}catch{}switch(r.tag){case 5:jt||ao(r,e);case 6:var n=Mt,i=Fr;Mt=null,Vn(t,e,r),Mt=n,Fr=i,Mt!==null&&(Fr?(t=Mt,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Mt.removeChild(r.stateNode));break;case 18:Mt!==null&&(Fr?(t=Mt,r=r.stateNode,t.nodeType===8?Pc(t.parentNode,r):t.nodeType===1&&Pc(t,r),js(t)):Pc(Mt,r.stateNode));break;case 4:n=Mt,i=Fr,Mt=r.stateNode.containerInfo,Fr=!0,Vn(t,e,r),Mt=n,Fr=i;break;case 0:case 11:case 14:case 15:if(!jt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Jf(r,e,s),i=i.next}while(i!==n)}Vn(t,e,r);break;case 1:if(!jt&&(ao(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){ht(r,e,l)}Vn(t,e,r);break;case 21:Vn(t,e,r);break;case 22:r.mode&1?(jt=(n=jt)||r.memoizedState!==null,Vn(t,e,r),jt=n):Vn(t,e,r);break;default:Vn(t,e,r)}}function $0(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new hE),e.forEach(function(n){var i=AE.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Tr(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=s),n&=~o}if(n=i,n=vt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*gE(n/1960))-n,10t?16:t,ni===null)var n=!1;else{if(t=ni,ni=null,Va=0,be&6)throw Error(q(331));var i=be;for(be|=4,ee=t.current;ee!==null;){var o=ee,s=o.child;if(ee.flags&16){var l=o.deletions;if(l!==null){for(var a=0;avt()-fh?Ci(t,0):ch|=r),rr(t,e)}function Hv(t,e){e===0&&(t.mode&1?(e=Ml,Ml<<=1,!(Ml&130023424)&&(Ml=4194304)):e=1);var r=Wt();t=Rn(t,e),t!==null&&(hl(t,e,r),rr(t,r))}function bE(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),Hv(t,r)}function AE(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(q(314))}n!==null&&n.delete(e),Hv(t,r)}var qv;qv=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||er.current)Zt=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Zt=!1,cE(t,e,r);Zt=!!(t.flags&131072)}else Zt=!1,nt&&e.flags&1048576&&Vg(e,Da,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;ua(t,e),t=e.pendingProps;var i=ko(e,zt.current);Eo(e,r),i=ih(null,e,n,t,i,r);var o=oh();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,tr(n)?(o=!0,Ba(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Zd(e),i.updater=Eu,e.stateNode=i,i._reactInternals=e,Hf(e,n,t,r),e=Gf(null,e,n,!0,o,r)):(e.tag=0,nt&&o&&Gd(e),qt(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(ua(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=SE(n),t=Dr(n,t),i){case 0:e=Wf(null,e,n,t,r);break e;case 1:e=j0(null,e,n,t,r);break e;case 11:e=L0(null,e,n,t,r);break e;case 14:e=B0(null,e,n,Dr(n.type,t),r);break e}throw Error(q(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Dr(n,i),Wf(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Dr(n,i),j0(t,e,n,i,r);case 3:e:{if(Nv(e),t===null)throw Error(q(387));n=e.pendingProps,o=e.memoizedState,i=o.element,Yg(t,e),za(e,n,null,r);var s=e.memoizedState;if(n=s.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Mo(Error(q(423)),e),e=D0(t,e,n,r,i);break e}else if(n!==i){i=Mo(Error(q(424)),e),e=D0(t,e,n,r,i);break e}else for(cr=ui(e.stateNode.containerInfo.firstChild),dr=e,nt=!0,zr=null,r=tv(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(No(),n===i){e=Tn(t,e,r);break e}qt(t,e,n,r)}e=e.child}return e;case 5:return rv(e),t===null&&Ff(e),n=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,Lf(n,i)?s=null:o!==null&&Lf(n,o)&&(e.flags|=32),kv(t,e),qt(t,e,s,r),e.child;case 6:return t===null&&Ff(e),null;case 13:return Pv(t,e,r);case 4:return eh(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Po(e,null,n,r):qt(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Dr(n,i),L0(t,e,n,i,r);case 7:return qt(t,e,e.pendingProps,r),e.child;case 8:return qt(t,e,e.pendingProps.children,r),e.child;case 12:return qt(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Qe(Ua,n._currentValue),n._currentValue=s,o!==null)if(Vr(o.value,s)){if(o.children===i.children&&!er.current){e=Tn(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===n){if(o.tag===1){a=Pn(-1,r&-r),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),zf(o.return,r,e),l.lanes|=r;break}a=a.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(q(341));s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),zf(s,r,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}qt(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Eo(e,r),i=Nr(i),n=n(i),e.flags|=1,qt(t,e,n,r),e.child;case 14:return n=e.type,i=Dr(n,e.pendingProps),i=Dr(n.type,i),B0(t,e,n,i,r);case 15:return _v(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Dr(n,i),ua(t,e),e.tag=1,tr(n)?(t=!0,Ba(e)):t=!1,Eo(e,r),Zg(e,n,i),Hf(e,n,i,r),Gf(null,e,n,!0,t,r);case 19:return Cv(t,e,r);case 22:return Sv(t,e,r)}throw Error(q(156,e.tag))};function Wv(t,e){return vg(t,e)}function _E(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sr(t,e,r,n){return new _E(t,e,r,n)}function mh(t){return t=t.prototype,!(!t||!t.isReactComponent)}function SE(t){if(typeof t=="function")return mh(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Od)return 11;if(t===Ld)return 14}return 2}function hi(t,e){var r=t.alternate;return r===null?(r=Sr(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function da(t,e,r,n,i,o){var s=2;if(n=t,typeof t=="function")mh(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case Zi:return Mi(r.children,i,o,e);case Td:s=8,i|=8;break;case hf:return t=Sr(12,r,e,i|2),t.elementType=hf,t.lanes=o,t;case pf:return t=Sr(13,r,e,i),t.elementType=pf,t.lanes=o,t;case mf:return t=Sr(19,r,e,i),t.elementType=mf,t.lanes=o,t;case eg:return _u(r,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Xm:s=10;break e;case Zm:s=9;break e;case Od:s=11;break e;case Ld:s=14;break e;case Jn:s=16,n=null;break e}throw Error(q(130,t==null?t:typeof t,""))}return e=Sr(s,r,e,i),e.elementType=t,e.type=n,e.lanes=o,e}function Mi(t,e,r,n){return t=Sr(7,t,n,e),t.lanes=r,t}function _u(t,e,r,n){return t=Sr(22,t,n,e),t.elementType=eg,t.lanes=r,t.stateNode={isHidden:!1},t}function Bc(t,e,r){return t=Sr(6,t,null,e),t.lanes=r,t}function jc(t,e,r){return e=Sr(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function kE(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vc(0),this.expirationTimes=vc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vc(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gh(t,e,r,n,i,o,s,l,a){return t=new kE(t,e,r,l,a),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Sr(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zd(o),t}function NE(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qv)}catch(t){console.error(t)}}Qv(),Vm.exports=gr;var Qs=Vm.exports,J0=Qs;ff.createRoot=J0.createRoot,ff.hydrateRoot=J0.hydrateRoot;/** +`+o.stack}return{value:t,source:e,stack:i,digest:null}}function Oc(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function qf(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var lx=typeof WeakMap=="function"?WeakMap:Map;function bv(t,e,r){r=Pn(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Ga||(Ga=!0,ed=n),qf(t,e)},r}function Av(t,e,r){r=Pn(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){qf(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){qf(t,e),typeof n!="function"&&(fi===null?fi=new Set([this]):fi.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),r}function R0(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new lx;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=Ex.bind(null,t,e,r),e.then(t,t))}function T0(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function O0(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Pn(-1,1),e.tag=2,ci(r,e,1))),r.lanes|=1),t)}var ax=jn.ReactCurrentOwner,Zt=!1;function qt(t,e,r,n){e.child=t===null?tv(e,null,r,n):Co(e,t.child,r,n)}function L0(t,e,r,n,i){r=r.render;var o=e.ref;return Eo(e,i),n=ih(t,e,r,n,o,i),r=oh(),t!==null&&!Zt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Tn(t,e,i)):(nt&&r&&Gd(e),e.flags|=1,qt(t,e,n,i),e.child)}function B0(t,e,r,n,i){if(t===null){var o=r.type;return typeof o=="function"&&!mh(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,_v(t,e,o,n,i)):(t=da(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(r=r.compare,r=r!==null?r:Us,r(s,n)&&t.ref===e.ref)return Tn(t,e,i)}return e.flags|=1,t=hi(o,n),t.ref=e.ref,t.return=e,e.child=t}function _v(t,e,r,n,i){if(t!==null){var o=t.memoizedProps;if(Us(o,n)&&t.ref===e.ref)if(Zt=!1,e.pendingProps=n=o,(t.lanes&i)!==0)t.flags&131072&&(Zt=!0);else return e.lanes=t.lanes,Tn(t,e,i)}return Wf(t,e,r,n,i)}function Sv(t,e,r){var n=e.pendingProps,i=n.children,o=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qe(co,lr),lr|=r;else{if(!(r&1073741824))return t=o!==null?o.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Qe(co,lr),lr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,Qe(co,lr),lr|=n}else o!==null?(n=o.baseLanes|r,e.memoizedState=null):n=r,Qe(co,lr),lr|=n;return qt(t,e,i,r),e.child}function kv(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Wf(t,e,r,n,i){var o=tr(r)?Ri:zt.current;return o=No(e,o),Eo(e,i),r=ih(t,e,r,n,o,i),n=oh(),t!==null&&!Zt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Tn(t,e,i)):(nt&&n&&Gd(e),e.flags|=1,qt(t,e,r,i),e.child)}function j0(t,e,r,n,i){if(tr(r)){var o=!0;Ba(e)}else o=!1;if(Eo(e,i),e.stateNode===null)ua(t,e),Zg(e,r,n),Hf(e,r,n,i),n=!0;else if(t===null){var s=e.stateNode,l=e.memoizedProps;s.props=l;var a=s.context,u=r.contextType;typeof u=="object"&&u!==null?u=Nr(u):(u=tr(r)?Ri:zt.current,u=No(e,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==n||a!==u)&&P0(e,s,n,u),Yn=!1;var m=e.memoizedState;s.state=m,za(e,n,s,i),a=e.memoizedState,l!==n||m!==a||er.current||Yn?(typeof c=="function"&&($f(e,r,c,n),a=e.memoizedState),(l=Yn||N0(e,r,l,n,m,a,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=a),s.props=n,s.state=a,s.context=u,n=l):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{s=e.stateNode,Yg(t,e),l=e.memoizedProps,u=e.type===e.elementType?l:Dr(e.type,l),s.props=u,d=e.pendingProps,m=s.context,a=r.contextType,typeof a=="object"&&a!==null?a=Nr(a):(a=tr(r)?Ri:zt.current,a=No(e,a));var g=r.getDerivedStateFromProps;(c=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||m!==a)&&P0(e,s,n,a),Yn=!1,m=e.memoizedState,s.state=m,za(e,n,s,i);var v=e.memoizedState;l!==d||m!==v||er.current||Yn?(typeof g=="function"&&($f(e,r,g,n),v=e.memoizedState),(u=Yn||N0(e,r,u,n,m,v,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,v,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,v,a)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===t.memoizedProps&&m===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&m===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=v),s.props=n,s.state=v,s.context=a,n=u):(typeof s.componentDidUpdate!="function"||l===t.memoizedProps&&m===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&m===t.memoizedState||(e.flags|=1024),n=!1)}return Gf(t,e,r,n,o,i)}function Gf(t,e,r,n,i,o){kv(t,e);var s=(e.flags&128)!==0;if(!n&&!s)return i&&b0(e,r,!1),Tn(t,e,o);n=e.stateNode,ax.current=e;var l=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&s?(e.child=Co(e,t.child,null,o),e.child=Co(e,null,l,o)):qt(t,e,l,o),e.memoizedState=n.state,i&&b0(e,r,!0),e.child}function Nv(t){var e=t.stateNode;e.pendingContext?E0(t,e.pendingContext,e.pendingContext!==e.context):e.context&&E0(t,e.context,!1),eh(t,e.containerInfo)}function D0(t,e,r,n,i){return Po(),Kd(i),e.flags|=256,qt(t,e,r,n),e.child}var Vf={dehydrated:null,treeContext:null,retryLane:0};function Kf(t){return{baseLanes:t,cachePool:null,transitions:null}}function Pv(t,e,r){var n=e.pendingProps,i=at.current,o=!1,s=(e.flags&128)!==0,l;if((l=s)||(l=t!==null&&t.memoizedState===null?!1:(i&2)!==0),l?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Qe(at,i&1),t===null)return Ff(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=n.children,t=n.fallback,o?(n=e.mode,o=e.child,s={mode:"hidden",children:s},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=_u(s,n,0,null),t=Mi(t,n,r,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=Kf(r),e.memoizedState=Vf,t):ah(e,s));if(i=t.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return ux(t,e,s,n,l,i,r);if(o){o=n.fallback,s=e.mode,i=t.child,l=i.sibling;var a={mode:"hidden",children:n.children};return!(s&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=a,e.deletions=null):(n=hi(i,a),n.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=hi(l,o):(o=Mi(o,s,r,null),o.flags|=2),o.return=e,n.return=e,n.sibling=o,e.child=n,n=o,o=e.child,s=t.child.memoizedState,s=s===null?Kf(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~r,e.memoizedState=Vf,n}return o=t.child,t=o.sibling,n=hi(o,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function ah(t,e){return e=_u({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Dl(t,e,r,n){return n!==null&&Kd(n),Co(e,t.child,null,r),t=ah(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function ux(t,e,r,n,i,o,s){if(r)return e.flags&256?(e.flags&=-257,n=Oc(Error(q(422))),Dl(t,e,s,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=n.fallback,i=e.mode,n=_u({mode:"visible",children:n.children},i,0,null),o=Mi(o,i,s,null),o.flags|=2,n.return=e,o.return=e,n.sibling=o,e.child=n,e.mode&1&&Co(e,t.child,null,s),e.child.memoizedState=Kf(s),e.memoizedState=Vf,o);if(!(e.mode&1))return Dl(t,e,s,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var l=n.dgst;return n=l,o=Error(q(419)),n=Oc(o,n,void 0),Dl(t,e,s,n)}if(l=(s&t.childLanes)!==0,Zt||l){if(n=Nt,n!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Rn(t,i),Gr(n,t,i,-1))}return ph(),n=Oc(Error(q(421))),Dl(t,e,s,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=bx.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,cr=ui(i.nextSibling),dr=e,nt=!0,zr=null,t!==null&&(Ar[_r++]=Sn,Ar[_r++]=kn,Ar[_r++]=Ti,Sn=t.id,kn=t.overflow,Ti=e),e=ah(e,n.children),e.flags|=4096,e)}function U0(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),zf(t.return,e,r)}function Lc(t,e,r,n,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function Cv(t,e,r){var n=e.pendingProps,i=n.revealOrder,o=n.tail;if(qt(t,e,n.children,r),n=at.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&U0(t,r,e);else if(t.tag===19)U0(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(Qe(at,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&$a(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),Lc(e,!1,i,r,o);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&$a(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}Lc(e,!0,r,null,o);break;case"together":Lc(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ua(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Tn(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Li|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(q(153));if(e.child!==null){for(t=e.child,r=hi(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=hi(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function cx(t,e,r){switch(e.tag){case 3:Nv(e),Po();break;case 5:rv(e);break;case 1:tr(e.type)&&Ba(e);break;case 4:eh(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Qe(Ua,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Qe(at,at.current&1),e.flags|=128,null):r&e.child.childLanes?Pv(t,e,r):(Qe(at,at.current&1),t=Tn(t,e,r),t!==null?t.sibling:null);Qe(at,at.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return Cv(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Qe(at,at.current),n)break;return null;case 22:case 23:return e.lanes=0,Sv(t,e,r)}return Tn(t,e,r)}var Mv,Qf,Iv,Rv;Mv=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Qf=function(){};Iv=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Pi(an.current);var o=null;switch(r){case"input":i=vf(t,i),n=vf(t,n),o=[];break;case"select":i=ft({},i,{value:void 0}),n=ft({},n,{value:void 0}),o=[];break;case"textarea":i=xf(t,i),n=xf(t,n),o=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Oa)}bf(r,n);var s;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Rs.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var a=n[u];if(l=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(r||(r={}),r[s]=a[s])}else r||(o||(o=[]),o.push(u,r)),r=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Rs.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&et("scroll",t),o||l===a||(o=[])):(o=o||[]).push(u,a))}r&&(o=o||[]).push("style",r);var u=o;(e.updateQueue=u)&&(e.flags|=4)}};Rv=function(t,e,r,n){r!==n&&(e.flags|=4)};function ns(t,e){if(!nt)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Bt(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function fx(t,e,r){var n=e.pendingProps;switch(Vd(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bt(e),null;case 1:return tr(e.type)&&La(),Bt(e),null;case 3:return n=e.stateNode,Mo(),tt(er),tt(zt),rh(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Bl(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,zr!==null&&(nd(zr),zr=null))),Qf(t,e),Bt(e),null;case 5:th(e);var i=Pi(qs.current);if(r=e.type,t!==null&&e.stateNode!=null)Iv(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(q(166));return Bt(e),null}if(t=Pi(an.current),Bl(e)){n=e.stateNode,r=e.type;var o=e.memoizedProps;switch(n[nn]=e,n[$s]=o,t=(e.mode&1)!==0,r){case"dialog":et("cancel",n),et("close",n);break;case"iframe":case"object":case"embed":et("load",n);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=s.createElement(r,{is:n.is}):(t=s.createElement(r),r==="select"&&(s=t,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):t=s.createElementNS(t,r),t[nn]=e,t[$s]=n,Mv(t,e,!1,!1),e.stateNode=t;e:{switch(s=Af(r,n),r){case"dialog":et("cancel",t),et("close",t),i=n;break;case"iframe":case"object":case"embed":et("load",t),i=n;break;case"video":case"audio":for(i=0;iRo&&(e.flags|=128,n=!0,ns(o,!1),e.lanes=4194304)}else{if(!n)if(t=$a(s),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),ns(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!nt)return Bt(e),null}else 2*vt()-o.renderingStartTime>Ro&&r!==1073741824&&(e.flags|=128,n=!0,ns(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(r=o.last,r!==null?r.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=vt(),e.sibling=null,r=at.current,Qe(at,n?r&1|2:r&1),e):(Bt(e),null);case 22:case 23:return hh(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?lr&1073741824&&(Bt(e),e.subtreeFlags&6&&(e.flags|=8192)):Bt(e),null;case 24:return null;case 25:return null}throw Error(q(156,e.tag))}function dx(t,e){switch(Vd(e),e.tag){case 1:return tr(e.type)&&La(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Mo(),tt(er),tt(zt),rh(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return th(e),null;case 13:if(tt(at),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(q(340));Po()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return tt(at),null;case 4:return Mo(),null;case 10:return Yd(e.type._context),null;case 22:case 23:return hh(),null;case 24:return null;default:return null}}var Ul=!1,jt=!1,hx=typeof WeakSet=="function"?WeakSet:Set,ee=null;function uo(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ht(t,e,n)}else r.current=null}function Jf(t,e,r){try{r()}catch(n){ht(t,e,n)}}var F0=!1;function px(t,e){if(Tf=Ia,t=Bg(),Wd(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=t,m=null;t:for(;;){for(var g;d!==r||i!==0&&d.nodeType!==3||(l=s+i),d!==o||n!==0&&d.nodeType!==3||(a=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(g=d.firstChild)!==null;)m=d,d=g;for(;;){if(d===t)break t;if(m===r&&++u===i&&(l=s),m===o&&++c===n&&(a=s),(g=d.nextSibling)!==null)break;d=m,m=d.parentNode}d=g}r=l===-1||a===-1?null:{start:l,end:a}}else r=null}r=r||{start:0,end:0}}else r=null;for(Of={focusedElem:t,selectionRange:r},Ia=!1,ee=e;ee!==null;)if(e=ee,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ee=t;else for(;ee!==null;){e=ee;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var E=v.memoizedProps,N=v.memoizedState,x=e.stateNode,w=x.getSnapshotBeforeUpdate(e.elementType===e.type?E:Dr(e.type,E),N);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(T){ht(e,e.return,T)}if(t=e.sibling,t!==null){t.return=e.return,ee=t;break}ee=e.return}return v=F0,F0=!1,v}function Ss(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&Jf(e,r,o)}i=i.next}while(i!==n)}}function bu(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Yf(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function Tv(t){var e=t.alternate;e!==null&&(t.alternate=null,Tv(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[nn],delete e[$s],delete e[jf],delete e[J2],delete e[Y2])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Ov(t){return t.tag===5||t.tag===3||t.tag===4}function z0(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Ov(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Xf(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Oa));else if(n!==4&&(t=t.child,t!==null))for(Xf(t,e,r),t=t.sibling;t!==null;)Xf(t,e,r),t=t.sibling}function Zf(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Zf(t,e,r),t=t.sibling;t!==null;)Zf(t,e,r),t=t.sibling}var Mt=null,Fr=!1;function Vn(t,e,r){for(r=r.child;r!==null;)Lv(t,e,r),r=r.sibling}function Lv(t,e,r){if(ln&&typeof ln.onCommitFiberUnmount=="function")try{ln.onCommitFiberUnmount(pu,r)}catch{}switch(r.tag){case 5:jt||uo(r,e);case 6:var n=Mt,i=Fr;Mt=null,Vn(t,e,r),Mt=n,Fr=i,Mt!==null&&(Fr?(t=Mt,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Mt.removeChild(r.stateNode));break;case 18:Mt!==null&&(Fr?(t=Mt,r=r.stateNode,t.nodeType===8?Pc(t.parentNode,r):t.nodeType===1&&Pc(t,r),js(t)):Pc(Mt,r.stateNode));break;case 4:n=Mt,i=Fr,Mt=r.stateNode.containerInfo,Fr=!0,Vn(t,e,r),Mt=n,Fr=i;break;case 0:case 11:case 14:case 15:if(!jt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Jf(r,e,s),i=i.next}while(i!==n)}Vn(t,e,r);break;case 1:if(!jt&&(uo(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){ht(r,e,l)}Vn(t,e,r);break;case 21:Vn(t,e,r);break;case 22:r.mode&1?(jt=(n=jt)||r.memoizedState!==null,Vn(t,e,r),jt=n):Vn(t,e,r);break;default:Vn(t,e,r)}}function $0(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new hx),e.forEach(function(n){var i=Ax.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Tr(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=s),n&=~o}if(n=i,n=vt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*gx(n/1960))-n,10t?16:t,ni===null)var n=!1;else{if(t=ni,ni=null,Va=0,be&6)throw Error(q(331));var i=be;for(be|=4,ee=t.current;ee!==null;){var o=ee,s=o.child;if(ee.flags&16){var l=o.deletions;if(l!==null){for(var a=0;avt()-fh?Ci(t,0):ch|=r),rr(t,e)}function Hv(t,e){e===0&&(t.mode&1?(e=Ml,Ml<<=1,!(Ml&130023424)&&(Ml=4194304)):e=1);var r=Wt();t=Rn(t,e),t!==null&&(hl(t,e,r),rr(t,r))}function bx(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),Hv(t,r)}function Ax(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(q(314))}n!==null&&n.delete(e),Hv(t,r)}var qv;qv=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||er.current)Zt=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Zt=!1,cx(t,e,r);Zt=!!(t.flags&131072)}else Zt=!1,nt&&e.flags&1048576&&Vg(e,Da,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;ua(t,e),t=e.pendingProps;var i=No(e,zt.current);Eo(e,r),i=ih(null,e,n,t,i,r);var o=oh();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,tr(n)?(o=!0,Ba(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Zd(e),i.updater=xu,e.stateNode=i,i._reactInternals=e,Hf(e,n,t,r),e=Gf(null,e,n,!0,o,r)):(e.tag=0,nt&&o&&Gd(e),qt(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(ua(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=Sx(n),t=Dr(n,t),i){case 0:e=Wf(null,e,n,t,r);break e;case 1:e=j0(null,e,n,t,r);break e;case 11:e=L0(null,e,n,t,r);break e;case 14:e=B0(null,e,n,Dr(n.type,t),r);break e}throw Error(q(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Dr(n,i),Wf(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Dr(n,i),j0(t,e,n,i,r);case 3:e:{if(Nv(e),t===null)throw Error(q(387));n=e.pendingProps,o=e.memoizedState,i=o.element,Yg(t,e),za(e,n,null,r);var s=e.memoizedState;if(n=s.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Io(Error(q(423)),e),e=D0(t,e,n,r,i);break e}else if(n!==i){i=Io(Error(q(424)),e),e=D0(t,e,n,r,i);break e}else for(cr=ui(e.stateNode.containerInfo.firstChild),dr=e,nt=!0,zr=null,r=tv(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Po(),n===i){e=Tn(t,e,r);break e}qt(t,e,n,r)}e=e.child}return e;case 5:return rv(e),t===null&&Ff(e),n=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,Lf(n,i)?s=null:o!==null&&Lf(n,o)&&(e.flags|=32),kv(t,e),qt(t,e,s,r),e.child;case 6:return t===null&&Ff(e),null;case 13:return Pv(t,e,r);case 4:return eh(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Co(e,null,n,r):qt(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Dr(n,i),L0(t,e,n,i,r);case 7:return qt(t,e,e.pendingProps,r),e.child;case 8:return qt(t,e,e.pendingProps.children,r),e.child;case 12:return qt(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Qe(Ua,n._currentValue),n._currentValue=s,o!==null)if(Vr(o.value,s)){if(o.children===i.children&&!er.current){e=Tn(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===n){if(o.tag===1){a=Pn(-1,r&-r),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),zf(o.return,r,e),l.lanes|=r;break}a=a.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(q(341));s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),zf(s,r,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}qt(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Eo(e,r),i=Nr(i),n=n(i),e.flags|=1,qt(t,e,n,r),e.child;case 14:return n=e.type,i=Dr(n,e.pendingProps),i=Dr(n.type,i),B0(t,e,n,i,r);case 15:return _v(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Dr(n,i),ua(t,e),e.tag=1,tr(n)?(t=!0,Ba(e)):t=!1,Eo(e,r),Zg(e,n,i),Hf(e,n,i,r),Gf(null,e,n,!0,t,r);case 19:return Cv(t,e,r);case 22:return Sv(t,e,r)}throw Error(q(156,e.tag))};function Wv(t,e){return vg(t,e)}function _x(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sr(t,e,r,n){return new _x(t,e,r,n)}function mh(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Sx(t){if(typeof t=="function")return mh(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Od)return 11;if(t===Ld)return 14}return 2}function hi(t,e){var r=t.alternate;return r===null?(r=Sr(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function da(t,e,r,n,i,o){var s=2;if(n=t,typeof t=="function")mh(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case eo:return Mi(r.children,i,o,e);case Td:s=8,i|=8;break;case hf:return t=Sr(12,r,e,i|2),t.elementType=hf,t.lanes=o,t;case pf:return t=Sr(13,r,e,i),t.elementType=pf,t.lanes=o,t;case mf:return t=Sr(19,r,e,i),t.elementType=mf,t.lanes=o,t;case eg:return _u(r,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Xm:s=10;break e;case Zm:s=9;break e;case Od:s=11;break e;case Ld:s=14;break e;case Jn:s=16,n=null;break e}throw Error(q(130,t==null?t:typeof t,""))}return e=Sr(s,r,e,i),e.elementType=t,e.type=n,e.lanes=o,e}function Mi(t,e,r,n){return t=Sr(7,t,n,e),t.lanes=r,t}function _u(t,e,r,n){return t=Sr(22,t,n,e),t.elementType=eg,t.lanes=r,t.stateNode={isHidden:!1},t}function Bc(t,e,r){return t=Sr(6,t,null,e),t.lanes=r,t}function jc(t,e,r){return e=Sr(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function kx(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vc(0),this.expirationTimes=vc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vc(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gh(t,e,r,n,i,o,s,l,a){return t=new kx(t,e,r,l,a),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Sr(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zd(o),t}function Nx(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qv)}catch(t){console.error(t)}}Qv(),Vm.exports=gr;var Qs=Vm.exports,J0=Qs;ff.createRoot=J0.createRoot,ff.hydrateRoot=J0.hydrateRoot;/** * @remix-run/router v1.14.2 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Js(){return Js=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function Eh(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function TE(){return Math.random().toString(36).substr(2,8)}function X0(t,e){return{usr:t.state,key:t.key,idx:e}}function id(t,e,r,n){return r===void 0&&(r=null),Js({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ho(e):e,{state:r,key:e&&e.key||n||TE()})}function Jv(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ho(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function OE(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,s=i.history,l=ii.Pop,a=null,u=c();u==null&&(u=0,s.replaceState(Js({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){l=ii.Pop;let N=c(),E=N==null?null:N-u;u=N,a&&a({action:l,location:x.location,delta:E})}function m(N,E){l=ii.Push;let w=id(x.location,N,E);r&&r(w,N),u=c()+1;let b=X0(w,u),T=x.createHref(w);try{s.pushState(b,"",T)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;i.location.assign(T)}o&&a&&a({action:l,location:x.location,delta:1})}function g(N,E){l=ii.Replace;let w=id(x.location,N,E);r&&r(w,N),u=c();let b=X0(w,u),T=x.createHref(w);s.replaceState(b,"",T),o&&a&&a({action:l,location:x.location,delta:0})}function v(N){let E=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof N=="string"?N:Jv(N);return _t(E,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,E)}let x={get action(){return l},get location(){return t(i,s)},listen(N){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(Y0,d),a=N,()=>{i.removeEventListener(Y0,d),a=null}},createHref(N){return e(i,N)},createURL:v,encodeLocation(N){let E=v(N);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:m,replace:g,go(N){return s.go(N)}};return x}var Z0;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Z0||(Z0={}));function LE(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?Ho(e):e,i=Zv(n.pathname||"/",r);if(i==null)return null;let o=Yv(t);BE(o);let s=null;for(let l=0;s==null&&l{let a={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};a.relativePath.startsWith("/")&&(_t(a.relativePath.startsWith(n),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(n.length));let u=Ii([n,a.relativePath]),c=r.concat(a);o.children&&o.children.length>0&&(_t(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Yv(o.children,e,c,u)),!(o.path==null&&!o.index)&&e.push({path:u,score:HE(u,o.index),routesMeta:c})};return t.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,s);else for(let a of Xv(o.path))i(o,s,a)}),e}function Xv(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let s=Xv(n.join("/")),l=[];return l.push(...s.map(a=>a===""?o:[o,a].join("/"))),i&&l.push(...s),l.map(a=>t.startsWith("/")&&a===""?"/":a)}function BE(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:qE(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const jE=/^:[\w-]+$/,DE=3,UE=2,FE=1,zE=10,$E=-2,ep=t=>t==="*";function HE(t,e){let r=t.split("/"),n=r.length;return r.some(ep)&&(n+=$E),e&&(n+=UE),r.filter(i=>!ep(i)).reduce((i,o)=>i+(jE.test(o)?DE:o===""?FE:zE),n)}function qE(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function WE(t,e){let{routesMeta:r}=t,n={},i="/",o=[];for(let s=0;s{let{paramName:m,isOptional:g}=c;if(m==="*"){let x=l[d]||"";s=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const v=l[d];return g&&!v?u[m]=void 0:u[m]=QE(v||"",m),u},{}),pathname:o,pathnameBase:s,pattern:t}}function VE(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),Eh(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,a)=>(n.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function KE(t){try{return decodeURI(t)}catch(e){return Eh(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function QE(t,e){try{return decodeURIComponent(t)}catch(r){return Eh(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),t}}function Zv(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function JE(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Ho(t):t;return{pathname:r?r.startsWith("/")?r:YE(r,e):e,search:rx(n),hash:nx(i)}}function YE(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Dc(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function XE(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function ZE(t,e){let r=XE(t);return e?r.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function ex(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Ho(t):(i=Js({},t),_t(!i.pathname||!i.pathname.includes("?"),Dc("?","pathname","search",i)),_t(!i.pathname||!i.pathname.includes("#"),Dc("#","pathname","hash",i)),_t(!i.search||!i.search.includes("#"),Dc("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,l;if(s==null)l=r;else{let d=e.length-1;if(!n&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),d-=1;i.pathname=m.join("/")}l=d>=0?e[d]:"/"}let a=JE(i,l),u=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&r.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const Ii=t=>t.join("/").replace(/\/\/+/g,"/"),tx=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),rx=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,nx=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function ix(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const ey=["post","put","patch","delete"];new Set(ey);const ox=["get",...ey];new Set(ox);/** + */function Js(){return Js=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function xh(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Tx(){return Math.random().toString(36).substr(2,8)}function X0(t,e){return{usr:t.state,key:t.key,idx:e}}function id(t,e,r,n){return r===void 0&&(r=null),Js({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?qo(e):e,{state:r,key:e&&e.key||n||Tx()})}function Jv(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function qo(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function Ox(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,s=i.history,l=ii.Pop,a=null,u=c();u==null&&(u=0,s.replaceState(Js({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){l=ii.Pop;let N=c(),x=N==null?null:N-u;u=N,a&&a({action:l,location:E.location,delta:x})}function m(N,x){l=ii.Push;let w=id(E.location,N,x);r&&r(w,N),u=c()+1;let b=X0(w,u),T=E.createHref(w);try{s.pushState(b,"",T)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;i.location.assign(T)}o&&a&&a({action:l,location:E.location,delta:1})}function g(N,x){l=ii.Replace;let w=id(E.location,N,x);r&&r(w,N),u=c();let b=X0(w,u),T=E.createHref(w);s.replaceState(b,"",T),o&&a&&a({action:l,location:E.location,delta:0})}function v(N){let x=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof N=="string"?N:Jv(N);return _t(x,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,x)}let E={get action(){return l},get location(){return t(i,s)},listen(N){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(Y0,d),a=N,()=>{i.removeEventListener(Y0,d),a=null}},createHref(N){return e(i,N)},createURL:v,encodeLocation(N){let x=v(N);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:g,go(N){return s.go(N)}};return E}var Z0;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Z0||(Z0={}));function Lx(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?qo(e):e,i=Zv(n.pathname||"/",r);if(i==null)return null;let o=Yv(t);Bx(o);let s=null;for(let l=0;s==null&&l{let a={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};a.relativePath.startsWith("/")&&(_t(a.relativePath.startsWith(n),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(n.length));let u=Ii([n,a.relativePath]),c=r.concat(a);o.children&&o.children.length>0&&(_t(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Yv(o.children,e,c,u)),!(o.path==null&&!o.index)&&e.push({path:u,score:Hx(u,o.index),routesMeta:c})};return t.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,s);else for(let a of Xv(o.path))i(o,s,a)}),e}function Xv(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let s=Xv(n.join("/")),l=[];return l.push(...s.map(a=>a===""?o:[o,a].join("/"))),i&&l.push(...s),l.map(a=>t.startsWith("/")&&a===""?"/":a)}function Bx(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:qx(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const jx=/^:[\w-]+$/,Dx=3,Ux=2,Fx=1,zx=10,$x=-2,ep=t=>t==="*";function Hx(t,e){let r=t.split("/"),n=r.length;return r.some(ep)&&(n+=$x),e&&(n+=Ux),r.filter(i=>!ep(i)).reduce((i,o)=>i+(jx.test(o)?Dx:o===""?Fx:zx),n)}function qx(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function Wx(t,e){let{routesMeta:r}=t,n={},i="/",o=[];for(let s=0;s{let{paramName:m,isOptional:g}=c;if(m==="*"){let E=l[d]||"";s=o.slice(0,o.length-E.length).replace(/(.)\/+$/,"$1")}const v=l[d];return g&&!v?u[m]=void 0:u[m]=Qx(v||"",m),u},{}),pathname:o,pathnameBase:s,pattern:t}}function Vx(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),xh(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,a)=>(n.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function Kx(t){try{return decodeURI(t)}catch(e){return xh(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Qx(t,e){try{return decodeURIComponent(t)}catch(r){return xh(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),t}}function Zv(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Jx(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?qo(t):t;return{pathname:r?r.startsWith("/")?r:Yx(r,e):e,search:rE(n),hash:nE(i)}}function Yx(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Dc(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Xx(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Zx(t,e){let r=Xx(t);return e?r.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function eE(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=qo(t):(i=Js({},t),_t(!i.pathname||!i.pathname.includes("?"),Dc("?","pathname","search",i)),_t(!i.pathname||!i.pathname.includes("#"),Dc("#","pathname","hash",i)),_t(!i.search||!i.search.includes("#"),Dc("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,l;if(s==null)l=r;else{let d=e.length-1;if(!n&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),d-=1;i.pathname=m.join("/")}l=d>=0?e[d]:"/"}let a=Jx(i,l),u=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&r.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const Ii=t=>t.join("/").replace(/\/\/+/g,"/"),tE=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),rE=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,nE=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function iE(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const ey=["post","put","patch","delete"];new Set(ey);const oE=["get",...ey];new Set(oE);/** * React Router v6.21.3 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ys(){return Ys=Object.assign?Object.assign.bind():function(t){for(var e=1;e{l.current=!0}),L.useCallback(function(u,c){if(c===void 0&&(c={}),!l.current)return;if(typeof u=="number"){n.go(u);return}let d=ex(u,JSON.parse(s),o,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:Ii([e,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[e,n,s,o,t])}function ax(){let{matches:t}=L.useContext($i),e=t[t.length-1];return e?e.params:{}}function ux(t,e){return cx(t,e)}function cx(t,e,r,n){Iu()||_t(!1);let{navigator:i}=L.useContext(Cu),{matches:o}=L.useContext($i),s=o[o.length-1],l=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let u=Ru(),c;if(e){var d;let N=typeof e=="string"?Ho(e):e;a==="/"||(d=N.pathname)!=null&&d.startsWith(a)||_t(!1),c=N}else c=u;let m=c.pathname||"/",g=a==="/"?m:m.slice(a.length)||"/",v=LE(t,{pathname:g}),x=mx(v&&v.map(N=>Object.assign({},N,{params:Object.assign({},l,N.params),pathname:Ii([a,i.encodeLocation?i.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?a:Ii([a,i.encodeLocation?i.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),o,r,n);return e&&x?L.createElement(Mu.Provider,{value:{location:Ys({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ii.Pop}},x):x}function fx(){let t=wx(),e=ix(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},e),r?L.createElement("pre",{style:i},r):null,o)}const dx=L.createElement(fx,null);class hx extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?L.createElement($i.Provider,{value:this.props.routeContext},L.createElement(ty.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function px(t){let{routeContext:e,match:r,children:n}=t,i=L.useContext(xh);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),L.createElement($i.Provider,{value:e},n)}function mx(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var o;if((o=r)!=null&&o.errors)t=r.matches;else return null}let s=t,l=(i=r)==null?void 0:i.errors;if(l!=null){let c=s.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id]));c>=0||_t(!1),s=s.slice(0,Math.min(s.length,c+1))}let a=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,d,m)=>{let g,v=!1,x=null,N=null;r&&(g=l&&d.route.id?l[d.route.id]:void 0,x=d.route.errorElement||dx,a&&(u<0&&m===0?(xx("route-fallback",!1),v=!0,N=null):u===m&&(v=!0,N=d.route.hydrateFallbackElement||null)));let E=e.concat(s.slice(0,m+1)),w=()=>{let b;return g?b=x:v?b=N:d.route.Component?b=L.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=c,L.createElement(px,{match:d,routeContext:{outlet:c,matches:E,isDataRoute:r!=null},children:b})};return r&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?L.createElement(hx,{location:r.location,revalidation:r.revalidation,component:x,error:g,children:w(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):w()},null)}var ny=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ny||{}),Ja=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Ja||{});function gx(t){let e=L.useContext(xh);return e||_t(!1),e}function vx(t){let e=L.useContext(sx);return e||_t(!1),e}function yx(t){let e=L.useContext($i);return e||_t(!1),e}function iy(t){let e=yx(),r=e.matches[e.matches.length-1];return r.route.id||_t(!1),r.route.id}function wx(){var t;let e=L.useContext(ty),r=vx(Ja.UseRouteError),n=iy(Ja.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function Ex(){let{router:t}=gx(ny.UseNavigateStable),e=iy(Ja.UseNavigateStable),r=L.useRef(!1);return ry(()=>{r.current=!0}),L.useCallback(function(i,o){o===void 0&&(o={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Ys({fromRouteId:e},o)))},[t,e])}const tp={};function xx(t,e,r){!e&&!tp[t]&&(tp[t]=!0)}function ms(t){_t(!1)}function bx(t){let{basename:e="/",children:r=null,location:n,navigationType:i=ii.Pop,navigator:o,static:s=!1,future:l}=t;Iu()&&_t(!1);let a=e.replace(/^\/*/,"/"),u=L.useMemo(()=>({basename:a,navigator:o,static:s,future:Ys({v7_relativeSplatPath:!1},l)}),[a,l,o,s]);typeof n=="string"&&(n=Ho(n));let{pathname:c="/",search:d="",hash:m="",state:g=null,key:v="default"}=n,x=L.useMemo(()=>{let N=Zv(c,a);return N==null?null:{location:{pathname:N,search:d,hash:m,state:g,key:v},navigationType:i}},[a,c,d,m,g,v,i]);return x==null?null:L.createElement(Cu.Provider,{value:u},L.createElement(Mu.Provider,{children:r,value:x}))}function Ax(t){let{children:e,location:r}=t;return ux(od(e),r)}new Promise(()=>{});function od(t,e){e===void 0&&(e=[]);let r=[];return L.Children.forEach(t,(n,i)=>{if(!L.isValidElement(n))return;let o=[...e,i];if(n.type===L.Fragment){r.push.apply(r,od(n.props.children,o));return}n.type!==ms&&_t(!1),!n.props.index||!n.props.children||_t(!1);let s={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=od(n.props.children,o)),r.push(s)}),r}/** + */function Ys(){return Ys=Object.assign?Object.assign.bind():function(t){for(var e=1;e{l.current=!0}),L.useCallback(function(u,c){if(c===void 0&&(c={}),!l.current)return;if(typeof u=="number"){n.go(u);return}let d=eE(u,JSON.parse(s),o,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:Ii([e,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[e,n,s,o,t])}function aE(){let{matches:t}=L.useContext($i),e=t[t.length-1];return e?e.params:{}}function uE(t,e){return cE(t,e)}function cE(t,e,r,n){Iu()||_t(!1);let{navigator:i}=L.useContext(Cu),{matches:o}=L.useContext($i),s=o[o.length-1],l=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let u=Ru(),c;if(e){var d;let N=typeof e=="string"?qo(e):e;a==="/"||(d=N.pathname)!=null&&d.startsWith(a)||_t(!1),c=N}else c=u;let m=c.pathname||"/",g=a==="/"?m:m.slice(a.length)||"/",v=Lx(t,{pathname:g}),E=mE(v&&v.map(N=>Object.assign({},N,{params:Object.assign({},l,N.params),pathname:Ii([a,i.encodeLocation?i.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?a:Ii([a,i.encodeLocation?i.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),o,r,n);return e&&E?L.createElement(Mu.Provider,{value:{location:Ys({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ii.Pop}},E):E}function fE(){let t=wE(),e=iE(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},e),r?L.createElement("pre",{style:i},r):null,o)}const dE=L.createElement(fE,null);class hE extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?L.createElement($i.Provider,{value:this.props.routeContext},L.createElement(ty.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pE(t){let{routeContext:e,match:r,children:n}=t,i=L.useContext(Eh);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),L.createElement($i.Provider,{value:e},n)}function mE(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var o;if((o=r)!=null&&o.errors)t=r.matches;else return null}let s=t,l=(i=r)==null?void 0:i.errors;if(l!=null){let c=s.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id]));c>=0||_t(!1),s=s.slice(0,Math.min(s.length,c+1))}let a=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,d,m)=>{let g,v=!1,E=null,N=null;r&&(g=l&&d.route.id?l[d.route.id]:void 0,E=d.route.errorElement||dE,a&&(u<0&&m===0?(EE("route-fallback",!1),v=!0,N=null):u===m&&(v=!0,N=d.route.hydrateFallbackElement||null)));let x=e.concat(s.slice(0,m+1)),w=()=>{let b;return g?b=E:v?b=N:d.route.Component?b=L.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=c,L.createElement(pE,{match:d,routeContext:{outlet:c,matches:x,isDataRoute:r!=null},children:b})};return r&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?L.createElement(hE,{location:r.location,revalidation:r.revalidation,component:E,error:g,children:w(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):w()},null)}var ny=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ny||{}),Ja=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Ja||{});function gE(t){let e=L.useContext(Eh);return e||_t(!1),e}function vE(t){let e=L.useContext(sE);return e||_t(!1),e}function yE(t){let e=L.useContext($i);return e||_t(!1),e}function iy(t){let e=yE(),r=e.matches[e.matches.length-1];return r.route.id||_t(!1),r.route.id}function wE(){var t;let e=L.useContext(ty),r=vE(Ja.UseRouteError),n=iy(Ja.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function xE(){let{router:t}=gE(ny.UseNavigateStable),e=iy(Ja.UseNavigateStable),r=L.useRef(!1);return ry(()=>{r.current=!0}),L.useCallback(function(i,o){o===void 0&&(o={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Ys({fromRouteId:e},o)))},[t,e])}const tp={};function EE(t,e,r){!e&&!tp[t]&&(tp[t]=!0)}function ms(t){_t(!1)}function bE(t){let{basename:e="/",children:r=null,location:n,navigationType:i=ii.Pop,navigator:o,static:s=!1,future:l}=t;Iu()&&_t(!1);let a=e.replace(/^\/*/,"/"),u=L.useMemo(()=>({basename:a,navigator:o,static:s,future:Ys({v7_relativeSplatPath:!1},l)}),[a,l,o,s]);typeof n=="string"&&(n=qo(n));let{pathname:c="/",search:d="",hash:m="",state:g=null,key:v="default"}=n,E=L.useMemo(()=>{let N=Zv(c,a);return N==null?null:{location:{pathname:N,search:d,hash:m,state:g,key:v},navigationType:i}},[a,c,d,m,g,v,i]);return E==null?null:L.createElement(Cu.Provider,{value:u},L.createElement(Mu.Provider,{children:r,value:E}))}function AE(t){let{children:e,location:r}=t;return uE(od(e),r)}new Promise(()=>{});function od(t,e){e===void 0&&(e=[]);let r=[];return L.Children.forEach(t,(n,i)=>{if(!L.isValidElement(n))return;let o=[...e,i];if(n.type===L.Fragment){r.push.apply(r,od(n.props.children,o));return}n.type!==ms&&_t(!1),!n.props.index||!n.props.children||_t(!1);let s={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=od(n.props.children,o)),r.push(s)}),r}/** * React Router DOM v6.21.3 * * Copyright (c) Remix Software Inc. @@ -64,14 +64,14 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */const _x="startTransition",rp=bw[_x];function Sx(t){let{basename:e,children:r,future:n,window:i}=t,o=L.useRef();o.current==null&&(o.current=RE({window:i,v5Compat:!0}));let s=o.current,[l,a]=L.useState({action:s.action,location:s.location}),{v7_startTransition:u}=n||{},c=L.useCallback(d=>{u&&rp?rp(()=>a(d)):a(d)},[a,u]);return L.useLayoutEffect(()=>s.listen(c),[s,c]),L.createElement(bx,{basename:e,children:r,location:l.location,navigationType:l.action,navigator:s,future:n})}var np;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(np||(np={}));var ip;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(ip||(ip={}));var bh={exports:{}};const kx={},Nx=Object.freeze(Object.defineProperty({__proto__:null,default:kx},Symbol.toStringTag,{value:"Module"})),Px=Uo(Nx);bh.exports;(function(t){(function(e,r){function n(M,f){if(!M)throw new Error(f||"Assertion failed")}function i(M,f){M.super_=f;var p=function(){};p.prototype=f.prototype,M.prototype=new p,M.prototype.constructor=M}function o(M,f,p){if(o.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(M||0,f||10,p||"be"))}typeof e=="object"?e.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=Px.Buffer}catch{}o.isBN=function(f){return f instanceof o?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===o.wordSize&&Array.isArray(f.words)},o.max=function(f,p){return f.cmp(p)>0?f:p},o.min=function(f,p){return f.cmp(p)<0?f:p},o.prototype._init=function(f,p,A){if(typeof f=="number")return this._initNumber(f,p,A);if(typeof f=="object")return this._initArray(f,p,A);p==="hex"&&(p=16),n(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var S=0;f[0]==="-"&&(S++,this.negative=1),S=0;S-=3)I=f[S]|f[S-1]<<8|f[S-2]<<16,this.words[_]|=I<>>26-R&67108863,R+=24,R>=26&&(R-=26,_++);else if(A==="le")for(S=0,_=0;S>>26-R&67108863,R+=24,R>=26&&(R-=26,_++);return this._strip()};function l(M,f){var p=M.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;n(!1,"Invalid character in "+M)}function a(M,f,p){var A=l(M,p);return p-1>=f&&(A|=l(M,p-1)<<4),A}o.prototype._parseHex=function(f,p,A){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var S=0;S=p;S-=2)R=a(f,p,S)<<_,this.words[I]|=R&67108863,_>=18?(_-=18,I+=1,this.words[I]|=R>>>26):_+=8;else{var k=f.length-p;for(S=k%2===0?p+1:p;S=18?(_-=18,I+=1,this.words[I]|=R>>>26):_+=8}this._strip()};function u(M,f,p,A){for(var S=0,_=0,I=Math.min(M.length,p),R=f;R=49?_=k-49+10:k>=17?_=k-17+10:_=k,n(k>=0&&_1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?""}var m=["","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"],g=[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];o.prototype.toString=function(f,p){f=f||10,p=p|0||1;var A;if(f===16||f==="hex"){A="";for(var S=0,_=0,I=0;I>>24-S&16777215,S+=2,S>=26&&(S-=26,I--),_!==0||I!==this.length-1?A=m[6-k.length]+k+A:A=k+A}for(_!==0&&(A=_.toString(16)+A);A.length%p!==0;)A="0"+A;return this.negative!==0&&(A="-"+A),A}if(f===(f|0)&&f>=2&&f<=36){var h=g[f],P=v[f];A="";var Z=this.clone();for(Z.negative=0;!Z.isZero();){var y=Z.modrn(P).toString(f);Z=Z.idivn(P),Z.isZero()?A=y+A:A=m[h-y.length]+y+A}for(this.isZero()&&(A="0"+A);A.length%p!==0;)A="0"+A;return this.negative!==0&&(A="-"+A),A}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(f,p){return this.toArrayLike(s,f,p)}),o.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var x=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};o.prototype.toArrayLike=function(f,p,A){this._strip();var S=this.byteLength(),_=A||Math.max(1,S);n(S<=_,"byte array longer than desired length"),n(_>0,"Requested array length <= 0");var I=x(f,_),R=p==="le"?"LE":"BE";return this["_toArrayLike"+R](I,S),I},o.prototype._toArrayLikeLE=function(f,p){for(var A=0,S=0,_=0,I=0;_>8&255),A>16&255),I===6?(A>24&255),S=0,I=0):(S=R>>>24,I+=2)}if(A=0&&(f[A--]=R>>8&255),A>=0&&(f[A--]=R>>16&255),I===6?(A>=0&&(f[A--]=R>>24&255),S=0,I=0):(S=R>>>24,I+=2)}if(A>=0)for(f[A--]=S;A>=0;)f[A--]=0},Math.clz32?o.prototype._countBits=function(f){return 32-Math.clz32(f)}:o.prototype._countBits=function(f){var p=f,A=0;return p>=4096&&(A+=13,p>>>=13),p>=64&&(A+=7,p>>>=7),p>=8&&(A+=4,p>>>=4),p>=2&&(A+=2,p>>>=2),A+p},o.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,A=0;return p&8191||(A+=13,p>>>=13),p&127||(A+=7,p>>>=7),p&15||(A+=4,p>>>=4),p&3||(A+=2,p>>>=2),p&1||A++,A},o.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function N(M){for(var f=new Array(M.bitLength()),p=0;p>>S&1}return f}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;pf.length?this.clone().ior(f):f.clone().ior(this)},o.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},o.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var A=0;Af.length?this.clone().iand(f):f.clone().iand(this)},o.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},o.prototype.iuxor=function(f){var p,A;this.length>f.length?(p=this,A=f):(p=f,A=this);for(var S=0;Sf.length?this.clone().ixor(f):f.clone().ixor(this)},o.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},o.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,A=f%26;this._expand(p),A>0&&p--;for(var S=0;S0&&(this.words[S]=~this.words[S]&67108863>>26-A),this._strip()},o.prototype.notn=function(f){return this.clone().inotn(f)},o.prototype.setn=function(f,p){n(typeof f=="number"&&f>=0);var A=f/26|0,S=f%26;return this._expand(A+1),p?this.words[A]=this.words[A]|1<f.length?(A=this,S=f):(A=f,S=this);for(var _=0,I=0;I>>26;for(;_!==0&&I>>26;if(this.length=A.length,_!==0)this.words[this.length]=_,this.length++;else if(A!==this)for(;If.length?this.clone().iadd(f):f.clone().iadd(this)},o.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var A=this.cmp(f);if(A===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,_;A>0?(S=this,_=f):(S=f,_=this);for(var I=0,R=0;R<_.length;R++)p=(S.words[R]|0)-(_.words[R]|0)+I,I=p>>26,this.words[R]=p&67108863;for(;I!==0&&R>26,this.words[R]=p&67108863;if(I===0&&R>>26,Z=k&67108863,y=Math.min(h,f.length-1),j=Math.max(0,h-M.length+1);j<=y;j++){var U=h-j|0;S=M.words[U]|0,_=f.words[j]|0,I=S*_+Z,P+=I/67108864|0,Z=I&67108863}p.words[h]=Z|0,k=P|0}return k!==0?p.words[h]=k|0:p.length--,p._strip()}var w=function(f,p,A){var S=f.words,_=p.words,I=A.words,R=0,k,h,P,Z=S[0]|0,y=Z&8191,j=Z>>>13,U=S[1]|0,F=U&8191,W=U>>>13,oe=S[2]|0,Y=oe&8191,V=oe>>>13,Je=S[3]|0,K=Je&8191,le=Je>>>13,Qr=S[4]|0,Te=Qr&8191,Ne=Qr>>>13,Jr=S[5]|0,Pe=Jr&8191,ce=Jr>>>13,wr=S[6]|0,fe=wr&8191,Oe=wr>>>13,Yr=S[7]|0,me=Yr&8191,ze=Yr>>>13,gn=S[8]|0,$e=gn&8191,He=gn>>>13,Ht=S[9]|0,Le=Ht&8191,qe=Ht>>>13,Rr=_[0]|0,Ce=Rr&8191,We=Rr>>>13,vn=_[1]|0,Be=vn&8191,Ge=vn>>>13,yn=_[2]|0,je=yn&8191,ne=yn>>>13,ot=_[3]|0,ge=ot&8191,de=ot>>>13,rt=_[4]|0,Ae=rt&8191,_e=rt>>>13,Ct=_[5]|0,Me=Ct&8191,De=Ct>>>13,Kt=_[6]|0,Ve=Kt&8191,Ke=Kt>>>13,Qt=_[7]|0,Ie=Qt&8191,Ue=Qt>>>13,Er=_[8]|0,ke=Er&8191,Ye=Er>>>13,bi=_[9]|0,Xe=bi&8191,Ze=bi>>>13;A.negative=f.negative^p.negative,A.length=19,k=Math.imul(y,Ce),h=Math.imul(y,We),h=h+Math.imul(j,Ce)|0,P=Math.imul(j,We);var $n=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+($n>>>26)|0,$n&=67108863,k=Math.imul(F,Ce),h=Math.imul(F,We),h=h+Math.imul(W,Ce)|0,P=Math.imul(W,We),k=k+Math.imul(y,Be)|0,h=h+Math.imul(y,Ge)|0,h=h+Math.imul(j,Be)|0,P=P+Math.imul(j,Ge)|0;var Hn=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(Hn>>>26)|0,Hn&=67108863,k=Math.imul(Y,Ce),h=Math.imul(Y,We),h=h+Math.imul(V,Ce)|0,P=Math.imul(V,We),k=k+Math.imul(F,Be)|0,h=h+Math.imul(F,Ge)|0,h=h+Math.imul(W,Be)|0,P=P+Math.imul(W,Ge)|0,k=k+Math.imul(y,je)|0,h=h+Math.imul(y,ne)|0,h=h+Math.imul(j,je)|0,P=P+Math.imul(j,ne)|0;var qn=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(qn>>>26)|0,qn&=67108863,k=Math.imul(K,Ce),h=Math.imul(K,We),h=h+Math.imul(le,Ce)|0,P=Math.imul(le,We),k=k+Math.imul(Y,Be)|0,h=h+Math.imul(Y,Ge)|0,h=h+Math.imul(V,Be)|0,P=P+Math.imul(V,Ge)|0,k=k+Math.imul(F,je)|0,h=h+Math.imul(F,ne)|0,h=h+Math.imul(W,je)|0,P=P+Math.imul(W,ne)|0,k=k+Math.imul(y,ge)|0,h=h+Math.imul(y,de)|0,h=h+Math.imul(j,ge)|0,P=P+Math.imul(j,de)|0;var Wn=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,k=Math.imul(Te,Ce),h=Math.imul(Te,We),h=h+Math.imul(Ne,Ce)|0,P=Math.imul(Ne,We),k=k+Math.imul(K,Be)|0,h=h+Math.imul(K,Ge)|0,h=h+Math.imul(le,Be)|0,P=P+Math.imul(le,Ge)|0,k=k+Math.imul(Y,je)|0,h=h+Math.imul(Y,ne)|0,h=h+Math.imul(V,je)|0,P=P+Math.imul(V,ne)|0,k=k+Math.imul(F,ge)|0,h=h+Math.imul(F,de)|0,h=h+Math.imul(W,ge)|0,P=P+Math.imul(W,de)|0,k=k+Math.imul(y,Ae)|0,h=h+Math.imul(y,_e)|0,h=h+Math.imul(j,Ae)|0,P=P+Math.imul(j,_e)|0;var Gn=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(Gn>>>26)|0,Gn&=67108863,k=Math.imul(Pe,Ce),h=Math.imul(Pe,We),h=h+Math.imul(ce,Ce)|0,P=Math.imul(ce,We),k=k+Math.imul(Te,Be)|0,h=h+Math.imul(Te,Ge)|0,h=h+Math.imul(Ne,Be)|0,P=P+Math.imul(Ne,Ge)|0,k=k+Math.imul(K,je)|0,h=h+Math.imul(K,ne)|0,h=h+Math.imul(le,je)|0,P=P+Math.imul(le,ne)|0,k=k+Math.imul(Y,ge)|0,h=h+Math.imul(Y,de)|0,h=h+Math.imul(V,ge)|0,P=P+Math.imul(V,de)|0,k=k+Math.imul(F,Ae)|0,h=h+Math.imul(F,_e)|0,h=h+Math.imul(W,Ae)|0,P=P+Math.imul(W,_e)|0,k=k+Math.imul(y,Me)|0,h=h+Math.imul(y,De)|0,h=h+Math.imul(j,Me)|0,P=P+Math.imul(j,De)|0;var Xu=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,k=Math.imul(fe,Ce),h=Math.imul(fe,We),h=h+Math.imul(Oe,Ce)|0,P=Math.imul(Oe,We),k=k+Math.imul(Pe,Be)|0,h=h+Math.imul(Pe,Ge)|0,h=h+Math.imul(ce,Be)|0,P=P+Math.imul(ce,Ge)|0,k=k+Math.imul(Te,je)|0,h=h+Math.imul(Te,ne)|0,h=h+Math.imul(Ne,je)|0,P=P+Math.imul(Ne,ne)|0,k=k+Math.imul(K,ge)|0,h=h+Math.imul(K,de)|0,h=h+Math.imul(le,ge)|0,P=P+Math.imul(le,de)|0,k=k+Math.imul(Y,Ae)|0,h=h+Math.imul(Y,_e)|0,h=h+Math.imul(V,Ae)|0,P=P+Math.imul(V,_e)|0,k=k+Math.imul(F,Me)|0,h=h+Math.imul(F,De)|0,h=h+Math.imul(W,Me)|0,P=P+Math.imul(W,De)|0,k=k+Math.imul(y,Ve)|0,h=h+Math.imul(y,Ke)|0,h=h+Math.imul(j,Ve)|0,P=P+Math.imul(j,Ke)|0;var Zu=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,k=Math.imul(me,Ce),h=Math.imul(me,We),h=h+Math.imul(ze,Ce)|0,P=Math.imul(ze,We),k=k+Math.imul(fe,Be)|0,h=h+Math.imul(fe,Ge)|0,h=h+Math.imul(Oe,Be)|0,P=P+Math.imul(Oe,Ge)|0,k=k+Math.imul(Pe,je)|0,h=h+Math.imul(Pe,ne)|0,h=h+Math.imul(ce,je)|0,P=P+Math.imul(ce,ne)|0,k=k+Math.imul(Te,ge)|0,h=h+Math.imul(Te,de)|0,h=h+Math.imul(Ne,ge)|0,P=P+Math.imul(Ne,de)|0,k=k+Math.imul(K,Ae)|0,h=h+Math.imul(K,_e)|0,h=h+Math.imul(le,Ae)|0,P=P+Math.imul(le,_e)|0,k=k+Math.imul(Y,Me)|0,h=h+Math.imul(Y,De)|0,h=h+Math.imul(V,Me)|0,P=P+Math.imul(V,De)|0,k=k+Math.imul(F,Ve)|0,h=h+Math.imul(F,Ke)|0,h=h+Math.imul(W,Ve)|0,P=P+Math.imul(W,Ke)|0,k=k+Math.imul(y,Ie)|0,h=h+Math.imul(y,Ue)|0,h=h+Math.imul(j,Ie)|0,P=P+Math.imul(j,Ue)|0;var ec=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(ec>>>26)|0,ec&=67108863,k=Math.imul($e,Ce),h=Math.imul($e,We),h=h+Math.imul(He,Ce)|0,P=Math.imul(He,We),k=k+Math.imul(me,Be)|0,h=h+Math.imul(me,Ge)|0,h=h+Math.imul(ze,Be)|0,P=P+Math.imul(ze,Ge)|0,k=k+Math.imul(fe,je)|0,h=h+Math.imul(fe,ne)|0,h=h+Math.imul(Oe,je)|0,P=P+Math.imul(Oe,ne)|0,k=k+Math.imul(Pe,ge)|0,h=h+Math.imul(Pe,de)|0,h=h+Math.imul(ce,ge)|0,P=P+Math.imul(ce,de)|0,k=k+Math.imul(Te,Ae)|0,h=h+Math.imul(Te,_e)|0,h=h+Math.imul(Ne,Ae)|0,P=P+Math.imul(Ne,_e)|0,k=k+Math.imul(K,Me)|0,h=h+Math.imul(K,De)|0,h=h+Math.imul(le,Me)|0,P=P+Math.imul(le,De)|0,k=k+Math.imul(Y,Ve)|0,h=h+Math.imul(Y,Ke)|0,h=h+Math.imul(V,Ve)|0,P=P+Math.imul(V,Ke)|0,k=k+Math.imul(F,Ie)|0,h=h+Math.imul(F,Ue)|0,h=h+Math.imul(W,Ie)|0,P=P+Math.imul(W,Ue)|0,k=k+Math.imul(y,ke)|0,h=h+Math.imul(y,Ye)|0,h=h+Math.imul(j,ke)|0,P=P+Math.imul(j,Ye)|0;var tc=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(tc>>>26)|0,tc&=67108863,k=Math.imul(Le,Ce),h=Math.imul(Le,We),h=h+Math.imul(qe,Ce)|0,P=Math.imul(qe,We),k=k+Math.imul($e,Be)|0,h=h+Math.imul($e,Ge)|0,h=h+Math.imul(He,Be)|0,P=P+Math.imul(He,Ge)|0,k=k+Math.imul(me,je)|0,h=h+Math.imul(me,ne)|0,h=h+Math.imul(ze,je)|0,P=P+Math.imul(ze,ne)|0,k=k+Math.imul(fe,ge)|0,h=h+Math.imul(fe,de)|0,h=h+Math.imul(Oe,ge)|0,P=P+Math.imul(Oe,de)|0,k=k+Math.imul(Pe,Ae)|0,h=h+Math.imul(Pe,_e)|0,h=h+Math.imul(ce,Ae)|0,P=P+Math.imul(ce,_e)|0,k=k+Math.imul(Te,Me)|0,h=h+Math.imul(Te,De)|0,h=h+Math.imul(Ne,Me)|0,P=P+Math.imul(Ne,De)|0,k=k+Math.imul(K,Ve)|0,h=h+Math.imul(K,Ke)|0,h=h+Math.imul(le,Ve)|0,P=P+Math.imul(le,Ke)|0,k=k+Math.imul(Y,Ie)|0,h=h+Math.imul(Y,Ue)|0,h=h+Math.imul(V,Ie)|0,P=P+Math.imul(V,Ue)|0,k=k+Math.imul(F,ke)|0,h=h+Math.imul(F,Ye)|0,h=h+Math.imul(W,ke)|0,P=P+Math.imul(W,Ye)|0,k=k+Math.imul(y,Xe)|0,h=h+Math.imul(y,Ze)|0,h=h+Math.imul(j,Xe)|0,P=P+Math.imul(j,Ze)|0;var rc=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(rc>>>26)|0,rc&=67108863,k=Math.imul(Le,Be),h=Math.imul(Le,Ge),h=h+Math.imul(qe,Be)|0,P=Math.imul(qe,Ge),k=k+Math.imul($e,je)|0,h=h+Math.imul($e,ne)|0,h=h+Math.imul(He,je)|0,P=P+Math.imul(He,ne)|0,k=k+Math.imul(me,ge)|0,h=h+Math.imul(me,de)|0,h=h+Math.imul(ze,ge)|0,P=P+Math.imul(ze,de)|0,k=k+Math.imul(fe,Ae)|0,h=h+Math.imul(fe,_e)|0,h=h+Math.imul(Oe,Ae)|0,P=P+Math.imul(Oe,_e)|0,k=k+Math.imul(Pe,Me)|0,h=h+Math.imul(Pe,De)|0,h=h+Math.imul(ce,Me)|0,P=P+Math.imul(ce,De)|0,k=k+Math.imul(Te,Ve)|0,h=h+Math.imul(Te,Ke)|0,h=h+Math.imul(Ne,Ve)|0,P=P+Math.imul(Ne,Ke)|0,k=k+Math.imul(K,Ie)|0,h=h+Math.imul(K,Ue)|0,h=h+Math.imul(le,Ie)|0,P=P+Math.imul(le,Ue)|0,k=k+Math.imul(Y,ke)|0,h=h+Math.imul(Y,Ye)|0,h=h+Math.imul(V,ke)|0,P=P+Math.imul(V,Ye)|0,k=k+Math.imul(F,Xe)|0,h=h+Math.imul(F,Ze)|0,h=h+Math.imul(W,Xe)|0,P=P+Math.imul(W,Ze)|0;var nc=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(nc>>>26)|0,nc&=67108863,k=Math.imul(Le,je),h=Math.imul(Le,ne),h=h+Math.imul(qe,je)|0,P=Math.imul(qe,ne),k=k+Math.imul($e,ge)|0,h=h+Math.imul($e,de)|0,h=h+Math.imul(He,ge)|0,P=P+Math.imul(He,de)|0,k=k+Math.imul(me,Ae)|0,h=h+Math.imul(me,_e)|0,h=h+Math.imul(ze,Ae)|0,P=P+Math.imul(ze,_e)|0,k=k+Math.imul(fe,Me)|0,h=h+Math.imul(fe,De)|0,h=h+Math.imul(Oe,Me)|0,P=P+Math.imul(Oe,De)|0,k=k+Math.imul(Pe,Ve)|0,h=h+Math.imul(Pe,Ke)|0,h=h+Math.imul(ce,Ve)|0,P=P+Math.imul(ce,Ke)|0,k=k+Math.imul(Te,Ie)|0,h=h+Math.imul(Te,Ue)|0,h=h+Math.imul(Ne,Ie)|0,P=P+Math.imul(Ne,Ue)|0,k=k+Math.imul(K,ke)|0,h=h+Math.imul(K,Ye)|0,h=h+Math.imul(le,ke)|0,P=P+Math.imul(le,Ye)|0,k=k+Math.imul(Y,Xe)|0,h=h+Math.imul(Y,Ze)|0,h=h+Math.imul(V,Xe)|0,P=P+Math.imul(V,Ze)|0;var ic=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(ic>>>26)|0,ic&=67108863,k=Math.imul(Le,ge),h=Math.imul(Le,de),h=h+Math.imul(qe,ge)|0,P=Math.imul(qe,de),k=k+Math.imul($e,Ae)|0,h=h+Math.imul($e,_e)|0,h=h+Math.imul(He,Ae)|0,P=P+Math.imul(He,_e)|0,k=k+Math.imul(me,Me)|0,h=h+Math.imul(me,De)|0,h=h+Math.imul(ze,Me)|0,P=P+Math.imul(ze,De)|0,k=k+Math.imul(fe,Ve)|0,h=h+Math.imul(fe,Ke)|0,h=h+Math.imul(Oe,Ve)|0,P=P+Math.imul(Oe,Ke)|0,k=k+Math.imul(Pe,Ie)|0,h=h+Math.imul(Pe,Ue)|0,h=h+Math.imul(ce,Ie)|0,P=P+Math.imul(ce,Ue)|0,k=k+Math.imul(Te,ke)|0,h=h+Math.imul(Te,Ye)|0,h=h+Math.imul(Ne,ke)|0,P=P+Math.imul(Ne,Ye)|0,k=k+Math.imul(K,Xe)|0,h=h+Math.imul(K,Ze)|0,h=h+Math.imul(le,Xe)|0,P=P+Math.imul(le,Ze)|0;var oc=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(oc>>>26)|0,oc&=67108863,k=Math.imul(Le,Ae),h=Math.imul(Le,_e),h=h+Math.imul(qe,Ae)|0,P=Math.imul(qe,_e),k=k+Math.imul($e,Me)|0,h=h+Math.imul($e,De)|0,h=h+Math.imul(He,Me)|0,P=P+Math.imul(He,De)|0,k=k+Math.imul(me,Ve)|0,h=h+Math.imul(me,Ke)|0,h=h+Math.imul(ze,Ve)|0,P=P+Math.imul(ze,Ke)|0,k=k+Math.imul(fe,Ie)|0,h=h+Math.imul(fe,Ue)|0,h=h+Math.imul(Oe,Ie)|0,P=P+Math.imul(Oe,Ue)|0,k=k+Math.imul(Pe,ke)|0,h=h+Math.imul(Pe,Ye)|0,h=h+Math.imul(ce,ke)|0,P=P+Math.imul(ce,Ye)|0,k=k+Math.imul(Te,Xe)|0,h=h+Math.imul(Te,Ze)|0,h=h+Math.imul(Ne,Xe)|0,P=P+Math.imul(Ne,Ze)|0;var sc=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(sc>>>26)|0,sc&=67108863,k=Math.imul(Le,Me),h=Math.imul(Le,De),h=h+Math.imul(qe,Me)|0,P=Math.imul(qe,De),k=k+Math.imul($e,Ve)|0,h=h+Math.imul($e,Ke)|0,h=h+Math.imul(He,Ve)|0,P=P+Math.imul(He,Ke)|0,k=k+Math.imul(me,Ie)|0,h=h+Math.imul(me,Ue)|0,h=h+Math.imul(ze,Ie)|0,P=P+Math.imul(ze,Ue)|0,k=k+Math.imul(fe,ke)|0,h=h+Math.imul(fe,Ye)|0,h=h+Math.imul(Oe,ke)|0,P=P+Math.imul(Oe,Ye)|0,k=k+Math.imul(Pe,Xe)|0,h=h+Math.imul(Pe,Ze)|0,h=h+Math.imul(ce,Xe)|0,P=P+Math.imul(ce,Ze)|0;var lc=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(lc>>>26)|0,lc&=67108863,k=Math.imul(Le,Ve),h=Math.imul(Le,Ke),h=h+Math.imul(qe,Ve)|0,P=Math.imul(qe,Ke),k=k+Math.imul($e,Ie)|0,h=h+Math.imul($e,Ue)|0,h=h+Math.imul(He,Ie)|0,P=P+Math.imul(He,Ue)|0,k=k+Math.imul(me,ke)|0,h=h+Math.imul(me,Ye)|0,h=h+Math.imul(ze,ke)|0,P=P+Math.imul(ze,Ye)|0,k=k+Math.imul(fe,Xe)|0,h=h+Math.imul(fe,Ze)|0,h=h+Math.imul(Oe,Xe)|0,P=P+Math.imul(Oe,Ze)|0;var ac=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(ac>>>26)|0,ac&=67108863,k=Math.imul(Le,Ie),h=Math.imul(Le,Ue),h=h+Math.imul(qe,Ie)|0,P=Math.imul(qe,Ue),k=k+Math.imul($e,ke)|0,h=h+Math.imul($e,Ye)|0,h=h+Math.imul(He,ke)|0,P=P+Math.imul(He,Ye)|0,k=k+Math.imul(me,Xe)|0,h=h+Math.imul(me,Ze)|0,h=h+Math.imul(ze,Xe)|0,P=P+Math.imul(ze,Ze)|0;var uc=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(uc>>>26)|0,uc&=67108863,k=Math.imul(Le,ke),h=Math.imul(Le,Ye),h=h+Math.imul(qe,ke)|0,P=Math.imul(qe,Ye),k=k+Math.imul($e,Xe)|0,h=h+Math.imul($e,Ze)|0,h=h+Math.imul(He,Xe)|0,P=P+Math.imul(He,Ze)|0;var cc=(R+k|0)+((h&8191)<<13)|0;R=(P+(h>>>13)|0)+(cc>>>26)|0,cc&=67108863,k=Math.imul(Le,Xe),h=Math.imul(Le,Ze),h=h+Math.imul(qe,Xe)|0,P=Math.imul(qe,Ze);var fc=(R+k|0)+((h&8191)<<13)|0;return R=(P+(h>>>13)|0)+(fc>>>26)|0,fc&=67108863,I[0]=$n,I[1]=Hn,I[2]=qn,I[3]=Wn,I[4]=Gn,I[5]=Xu,I[6]=Zu,I[7]=ec,I[8]=tc,I[9]=rc,I[10]=nc,I[11]=ic,I[12]=oc,I[13]=sc,I[14]=lc,I[15]=ac,I[16]=uc,I[17]=cc,I[18]=fc,R!==0&&(I[19]=R,A.length++),A};Math.imul||(w=E);function b(M,f,p){p.negative=f.negative^M.negative,p.length=M.length+f.length;for(var A=0,S=0,_=0;_>>26)|0,S+=I>>>26,I&=67108863}p.words[_]=R,A=I,I=S}return A!==0?p.words[_]=A:p.length--,p._strip()}function T(M,f,p){return b(M,f,p)}o.prototype.mulTo=function(f,p){var A,S=this.length+f.length;return this.length===10&&f.length===10?A=w(this,f,p):S<63?A=E(this,f,p):S<1024?A=b(this,f,p):A=T(this,f,p),A},o.prototype.mul=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},o.prototype.mulf=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),T(this,f,p)},o.prototype.imul=function(f){return this.clone().mulTo(f,this)},o.prototype.imuln=function(f){var p=f<0;p&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var A=0,S=0;S>=26,A+=_/67108864|0,A+=I>>>26,this.words[S]=I&67108863}return A!==0&&(this.words[S]=A,this.length++),p?this.ineg():this},o.prototype.muln=function(f){return this.clone().imuln(f)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(f){var p=N(f);if(p.length===0)return new o(1);for(var A=this,S=0;S=0);var p=f%26,A=(f-p)/26,S=67108863>>>26-p<<26-p,_;if(p!==0){var I=0;for(_=0;_>>26-p}I&&(this.words[_]=I,this.length++)}if(A!==0){for(_=this.length-1;_>=0;_--)this.words[_+A]=this.words[_];for(_=0;_=0);var S;p?S=(p-p%26)/26:S=0;var _=f%26,I=Math.min((f-_)/26,this.length),R=67108863^67108863>>>_<<_,k=A;if(S-=I,S=Math.max(0,S),k){for(var h=0;hI)for(this.length-=I,h=0;h=0&&(P!==0||h>=S);h--){var Z=this.words[h]|0;this.words[h]=P<<26-_|Z>>>_,P=Z&R}return k&&P!==0&&(k.words[k.length++]=P),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(f,p,A){return n(this.negative===0),this.iushrn(f,p,A)},o.prototype.shln=function(f){return this.clone().ishln(f)},o.prototype.ushln=function(f){return this.clone().iushln(f)},o.prototype.shrn=function(f){return this.clone().ishrn(f)},o.prototype.ushrn=function(f){return this.clone().iushrn(f)},o.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,A=(f-p)/26,S=1<=0);var p=f%26,A=(f-p)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=A)return this;if(p!==0&&A++,this.length=Math.min(A,this.length),p!==0){var S=67108863^67108863>>>p<=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},o.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p>26)-(k/67108864|0),this.words[_+A]=I&67108863}for(;_>26,this.words[_+A]=I&67108863;if(R===0)return this._strip();for(n(R===-1),R=0,_=0;_>26,this.words[_]=I&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(f,p){var A=this.length-f.length,S=this.clone(),_=f,I=_.words[_.length-1]|0,R=this._countBits(I);A=26-R,A!==0&&(_=_.ushln(A),S.iushln(A),I=_.words[_.length-1]|0);var k=S.length-_.length,h;if(p!=="mod"){h=new o(null),h.length=k+1,h.words=new Array(h.length);for(var P=0;P=0;y--){var j=(S.words[_.length+y]|0)*67108864+(S.words[_.length+y-1]|0);for(j=Math.min(j/I|0,67108863),S._ishlnsubmul(_,j,y);S.negative!==0;)j--,S.negative=0,S._ishlnsubmul(_,1,y),S.isZero()||(S.negative^=1);h&&(h.words[y]=j)}return h&&h._strip(),S._strip(),p!=="div"&&A!==0&&S.iushrn(A),{div:h||null,mod:S}},o.prototype.divmod=function(f,p,A){if(n(!f.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var S,_,I;return this.negative!==0&&f.negative===0?(I=this.neg().divmod(f,p),p!=="mod"&&(S=I.div.neg()),p!=="div"&&(_=I.mod.neg(),A&&_.negative!==0&&_.iadd(f)),{div:S,mod:_}):this.negative===0&&f.negative!==0?(I=this.divmod(f.neg(),p),p!=="mod"&&(S=I.div.neg()),{div:S,mod:I.mod}):this.negative&f.negative?(I=this.neg().divmod(f.neg(),p),p!=="div"&&(_=I.mod.neg(),A&&_.negative!==0&&_.isub(f)),{div:I.div,mod:_}):f.length>this.length||this.cmp(f)<0?{div:new o(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new o(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new o(this.modrn(f.words[0]))}:this._wordDiv(f,p)},o.prototype.div=function(f){return this.divmod(f,"div",!1).div},o.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},o.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},o.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var A=p.div.negative!==0?p.mod.isub(f):p.mod,S=f.ushrn(1),_=f.andln(1),I=A.cmp(S);return I<0||_===1&&I===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},o.prototype.modrn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var A=(1<<26)%f,S=0,_=this.length-1;_>=0;_--)S=(A*S+(this.words[_]|0))%f;return p?-S:S},o.prototype.modn=function(f){return this.modrn(f)},o.prototype.idivn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var A=0,S=this.length-1;S>=0;S--){var _=(this.words[S]|0)+A*67108864;this.words[S]=_/f|0,A=_%f}return this._strip(),p?this.ineg():this},o.prototype.divn=function(f){return this.clone().idivn(f)},o.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var p=this,A=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var S=new o(1),_=new o(0),I=new o(0),R=new o(1),k=0;p.isEven()&&A.isEven();)p.iushrn(1),A.iushrn(1),++k;for(var h=A.clone(),P=p.clone();!p.isZero();){for(var Z=0,y=1;!(p.words[0]&y)&&Z<26;++Z,y<<=1);if(Z>0)for(p.iushrn(Z);Z-- >0;)(S.isOdd()||_.isOdd())&&(S.iadd(h),_.isub(P)),S.iushrn(1),_.iushrn(1);for(var j=0,U=1;!(A.words[0]&U)&&j<26;++j,U<<=1);if(j>0)for(A.iushrn(j);j-- >0;)(I.isOdd()||R.isOdd())&&(I.iadd(h),R.isub(P)),I.iushrn(1),R.iushrn(1);p.cmp(A)>=0?(p.isub(A),S.isub(I),_.isub(R)):(A.isub(p),I.isub(S),R.isub(_))}return{a:I,b:R,gcd:A.iushln(k)}},o.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var p=this,A=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var S=new o(1),_=new o(0),I=A.clone();p.cmpn(1)>0&&A.cmpn(1)>0;){for(var R=0,k=1;!(p.words[0]&k)&&R<26;++R,k<<=1);if(R>0)for(p.iushrn(R);R-- >0;)S.isOdd()&&S.iadd(I),S.iushrn(1);for(var h=0,P=1;!(A.words[0]&P)&&h<26;++h,P<<=1);if(h>0)for(A.iushrn(h);h-- >0;)_.isOdd()&&_.iadd(I),_.iushrn(1);p.cmp(A)>=0?(p.isub(A),S.isub(_)):(A.isub(p),_.isub(S))}var Z;return p.cmpn(1)===0?Z=S:Z=_,Z.cmpn(0)<0&&Z.iadd(f),Z},o.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),A=f.clone();p.negative=0,A.negative=0;for(var S=0;p.isEven()&&A.isEven();S++)p.iushrn(1),A.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;A.isEven();)A.iushrn(1);var _=p.cmp(A);if(_<0){var I=p;p=A,A=I}else if(_===0||A.cmpn(1)===0)break;p.isub(A)}while(!0);return A.iushln(S)},o.prototype.invm=function(f){return this.egcd(f).a.umod(f)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(f){return this.words[0]&f},o.prototype.bincn=function(f){n(typeof f=="number");var p=f%26,A=(f-p)/26,S=1<>>26,R&=67108863,this.words[I]=R}return _!==0&&(this.words[I]=_,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var A;if(this.length>1)A=1;else{p&&(f=-f),n(f<=67108863,"Number is too big");var S=this.words[0]|0;A=S===f?0:Sf.length)return 1;if(this.length=0;A--){var S=this.words[A]|0,_=f.words[A]|0;if(S!==_){S<_?p=-1:S>_&&(p=1);break}}return p},o.prototype.gtn=function(f){return this.cmpn(f)===1},o.prototype.gt=function(f){return this.cmp(f)===1},o.prototype.gten=function(f){return this.cmpn(f)>=0},o.prototype.gte=function(f){return this.cmp(f)>=0},o.prototype.ltn=function(f){return this.cmpn(f)===-1},o.prototype.lt=function(f){return this.cmp(f)===-1},o.prototype.lten=function(f){return this.cmpn(f)<=0},o.prototype.lte=function(f){return this.cmp(f)<=0},o.prototype.eqn=function(f){return this.cmpn(f)===0},o.prototype.eq=function(f){return this.cmp(f)===0},o.red=function(f){return new X(f)},o.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(f){return this.red=f,this},o.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},o.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},o.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},o.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},o.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},o.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},o.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},o.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},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(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var B={k256:null,p224:null,p192:null,p25519:null};function D(M,f){this.name=M,this.p=new o(f,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var f=new o(null);return f.words=new Array(Math.ceil(this.n/13)),f},D.prototype.ireduce=function(f){var p=f,A;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),A=p.bitLength();while(A>this.n);var S=A0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},D.prototype.split=function(f,p){f.iushrn(this.n,0,p)},D.prototype.imulK=function(f){return f.imul(this.k)};function $(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i($,D),$.prototype.split=function(f,p){for(var A=4194303,S=Math.min(f.length,9),_=0;_>>22,I=R}I>>>=22,f.words[_-10]=I,I===0&&f.length>10?f.length-=10:f.length-=9},$.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,A=0;A>>=26,f.words[A]=_,p=S}return p!==0&&(f.words[f.length++]=p),f},o._prime=function(f){if(B[f])return B[f];var p;if(f==="k256")p=new $;else if(f==="p224")p=new H;else if(f==="p192")p=new Q;else if(f==="p25519")p=new J;else throw new Error("Unknown prime "+f);return B[f]=p,p};function X(M){if(typeof M=="string"){var f=o._prime(M);this.m=f.p,this.prime=f}else n(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}X.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},X.prototype._verify2=function(f,p){n((f.negative|p.negative)===0,"red works only with positives"),n(f.red&&f.red===p.red,"red works only with red numbers")},X.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(c(f,f.umod(this.m)._forceRed(this)),f)},X.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},X.prototype.add=function(f,p){this._verify2(f,p);var A=f.add(p);return A.cmp(this.m)>=0&&A.isub(this.m),A._forceRed(this)},X.prototype.iadd=function(f,p){this._verify2(f,p);var A=f.iadd(p);return A.cmp(this.m)>=0&&A.isub(this.m),A},X.prototype.sub=function(f,p){this._verify2(f,p);var A=f.sub(p);return A.cmpn(0)<0&&A.iadd(this.m),A._forceRed(this)},X.prototype.isub=function(f,p){this._verify2(f,p);var A=f.isub(p);return A.cmpn(0)<0&&A.iadd(this.m),A},X.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},X.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},X.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},X.prototype.isqr=function(f){return this.imul(f,f.clone())},X.prototype.sqr=function(f){return this.mul(f,f)},X.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(n(p%2===1),p===3){var A=this.m.add(new o(1)).iushrn(2);return this.pow(f,A)}for(var S=this.m.subn(1),_=0;!S.isZero()&&S.andln(1)===0;)_++,S.iushrn(1);n(!S.isZero());var I=new o(1).toRed(this),R=I.redNeg(),k=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);this.pow(h,k).cmp(R)!==0;)h.redIAdd(R);for(var P=this.pow(h,S),Z=this.pow(f,S.addn(1).iushrn(1)),y=this.pow(f,S),j=_;y.cmp(I)!==0;){for(var U=y,F=0;U.cmp(I)!==0;F++)U=U.redSqr();n(F=0;_--){for(var P=p.words[_],Z=h-1;Z>=0;Z--){var y=P>>Z&1;if(I!==S[0]&&(I=this.sqr(I)),y===0&&R===0){k=0;continue}R<<=1,R|=y,k++,!(k!==A&&(_!==0||Z!==0))&&(I=this.mul(I,S[R]),k=0,R=0)}h=26}return I},X.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},X.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},o.mont=function(f){return new ie(f)};function ie(M){X.call(this,M),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)}i(ie,X),ie.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},ie.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},ie.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var A=f.imul(p),S=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=A.isub(S).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},ie.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new o(0)._forceRed(this);var A=f.mul(p),S=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=A.isub(S).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},ie.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(t,Fe)})(bh);var Cx=bh.exports;const ue=Do(Cx),Mx="logger/5.7.0";let op=!1,sp=!1;const ha={debug:1,default:2,info:2,warning:3,error:4,off:5};let lp=ha.default,Uc=null;function Ix(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const ap=Ix();var sd;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(sd||(sd={}));var Ur;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(Ur||(Ur={}));const up="0123456789abcdef";class O{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();ha[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(lp>ha[n])&&console.log.apply(console,r)}debug(...e){this._log(O.levels.DEBUG,e)}info(...e){this._log(O.levels.INFO,e)}warn(...e){this._log(O.levels.WARNING,e)}makeError(e,r,n){if(sp)return this.makeError("censored error",r,{});r||(r=O.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(a=>{const u=n[a];try{if(u instanceof Uint8Array){let c="";for(let d=0;d>4],c+=up[u[d]&15];i.push(a+"=Uint8Array(0x"+c+")")}else i.push(a+"="+JSON.stringify(u))}catch{i.push(a+"="+JSON.stringify(n[a].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const o=e;let s="";switch(r){case Ur.NUMERIC_FAULT:{s="NUMERIC_FAULT";const a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":s+="-"+a;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Ur.CALL_EXCEPTION:case Ur.INSUFFICIENT_FUNDS:case Ur.MISSING_NEW:case Ur.NONCE_EXPIRED:case Ur.REPLACEMENT_UNDERPRICED:case Ur.TRANSACTION_REPLACED:case Ur.UNPREDICTABLE_GAS_LIMIT:s=r;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const l=new Error(e);return l.reason=o,l.code=r,Object.keys(n).forEach(function(a){l[a]=n[a]}),l}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,O.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){ap&&this.throwError("platform missing String.prototype.normalize",O.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ap})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,O.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,O.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,O.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",O.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",O.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",O.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return Uc||(Uc=new O(Mx)),Uc}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",O.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),op){if(!e)return;this.globalLogger().throwError("error censorship permanent",O.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}sp=!!e,op=!!r}static setLogLevel(e){const r=ha[e.toLowerCase()];if(r==null){O.globalLogger().warn("invalid log level - "+e);return}lp=r}static from(e){return new O(e)}}O.errors=Ur;O.levels=sd;const Rx="bytes/5.7.0",dt=new O(Rx);function oy(t){return!!t.toHexString}function bo(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return bo(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Ah(t){return pe(t)&&!(t.length%2)||Tu(t)}function cp(t){return typeof t=="number"&&t==t&&t%1===0}function Tu(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!cp(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function se(t,e){if(e||(e={}),typeof t=="number"){dt.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),bo(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),oy(t)&&(t=t.toHexString()),pe(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":dt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;ise(i)),r=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(r);return e.reduce((i,o)=>(n.set(o,i),i+o.length),0),bo(n)}function Ro(t){let e=se(t);if(e.length===0)return e;let r=0;for(;re&&dt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),bo(r)}function pe(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const Fc="0123456789abcdef";function re(t,e){if(e||(e={}),typeof t=="number"){dt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Fc[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),oy(t))return t.toHexString();if(pe(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":dt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Tu(t)){let r="0x";for(let n=0;n>4]+Fc[i&15]}return r}return dt.throwArgumentError("invalid hexlify value","value",t)}function On(t){if(typeof t!="string")t=re(t);else if(!pe(t)||t.length%2)return null;return(t.length-2)/2}function It(t,e,r){return typeof t!="string"?t=re(t):(!pe(t)||t.length%2)&&dt.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Xt(t){let e="0x";return t.forEach(r=>{e+=re(r).substring(2)}),e}function Ou(t){const e=Tx(re(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function Tx(t){typeof t!="string"&&(t=re(t)),pe(t)||dt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&dt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Lu(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Ah(t)){let r=se(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=re(r.slice(0,32)),e.s=re(r.slice(32,64))):r.length===65?(e.r=re(r.slice(0,32)),e.s=re(r.slice(32,64)),e.v=r[64]):dt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:dt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=re(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=pa(se(e._vs),32);e._vs=re(i);const o=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=o:e.recoveryParam!==o&&dt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const s=re(i);e.s==null?e.s=s:e.s!==s&&dt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?dt.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&dt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!pe(e.r)?dt.throwArgumentError("signature missing or invalid r","signature",t):e.r=pt(e.r,32),e.s==null||!pe(e.s)?dt.throwArgumentError("signature missing or invalid s","signature",t):e.s=pt(e.s,32);const r=se(e.s);r[0]>=128&&dt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=re(r);e._vs&&(pe(e._vs)||dt.throwArgumentError("signature invalid _vs","signature",t),e._vs=pt(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&dt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}const Ox="bignumber/5.7.0";var Xs=ue.BN;const En=new O(Ox),zc={},fp=9007199254740991;let dp=!1;class G{constructor(e,r){e!==zc&&En.throwError("cannot call constructor directly; use BigNumber.from",O.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Jt(ve(this).fromTwos(e))}toTwos(e){return Jt(ve(this).toTwos(e))}abs(){return this._hex[0]==="-"?G.from(this._hex.substring(1)):this}add(e){return Jt(ve(this).add(ve(e)))}sub(e){return Jt(ve(this).sub(ve(e)))}div(e){return G.from(e).isZero()&&xr("division-by-zero","div"),Jt(ve(this).div(ve(e)))}mul(e){return Jt(ve(this).mul(ve(e)))}mod(e){const r=ve(e);return r.isNeg()&&xr("division-by-zero","mod"),Jt(ve(this).umod(r))}pow(e){const r=ve(e);return r.isNeg()&&xr("negative-power","pow"),Jt(ve(this).pow(r))}and(e){const r=ve(e);return(this.isNegative()||r.isNeg())&&xr("unbound-bitwise-result","and"),Jt(ve(this).and(r))}or(e){const r=ve(e);return(this.isNegative()||r.isNeg())&&xr("unbound-bitwise-result","or"),Jt(ve(this).or(r))}xor(e){const r=ve(e);return(this.isNegative()||r.isNeg())&&xr("unbound-bitwise-result","xor"),Jt(ve(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&xr("negative-width","mask"),Jt(ve(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&xr("negative-width","shl"),Jt(ve(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&xr("negative-width","shr"),Jt(ve(this).shrn(e))}eq(e){return ve(this).eq(ve(e))}lt(e){return ve(this).lt(ve(e))}lte(e){return ve(this).lte(ve(e))}gt(e){return ve(this).gt(ve(e))}gte(e){return ve(this).gte(ve(e))}isNegative(){return this._hex[0]==="-"}isZero(){return ve(this).isZero()}toNumber(){try{return ve(this).toNumber()}catch{xr("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return En.throwError("this platform does not support BigInt",O.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?dp||(dp=!0,En.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?En.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",O.errors.UNEXPECTED_ARGUMENT,{}):En.throwError("BigNumber.toString does not accept parameters",O.errors.UNEXPECTED_ARGUMENT,{})),ve(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof G)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new G(zc,Zs(e)):e.match(/^-?[0-9]+$/)?new G(zc,Zs(new Xs(e))):En.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&xr("underflow","BigNumber.from",e),(e>=fp||e<=-fp)&&xr("overflow","BigNumber.from",e),G.from(String(e));const r=e;if(typeof r=="bigint")return G.from(r.toString());if(Tu(r))return G.from(re(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return G.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(pe(n)||n[0]==="-"&&pe(n.substring(1))))return G.from(n)}return En.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Zs(t){if(typeof t!="string")return Zs(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&En.throwArgumentError("invalid hex","value",t),t=Zs(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Jt(t){return G.from(Zs(t))}function ve(t){const e=G.from(t).toHexString();return e[0]==="-"?new Xs("-"+e.substring(3),16):new Xs(e.substring(2),16)}function xr(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),En.throwError(t,O.errors.NUMERIC_FAULT,n)}function Lx(t){return new Xs(t,36).toString(16)}function Bx(t){return new Xs(t,16).toString(36)}const jx="properties/5.7.0";var Dx=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const Ya=new O(jx);function z(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function fr(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function yt(t){return Dx(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(o=>({key:n,value:o}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Ux(t,e){(!t||typeof t!="object")&&Ya.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||Ya.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function it(t){const e={};for(const r in t)e[r]=t[r];return e}const Fx={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function sy(t){if(t==null||Fx[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rnr(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&z(e,r,nr(n))}return e}return Ya.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function nr(t){return zx(t)}class yl{constructor(e){for(const r in e)this[r]=nr(e[r])}}const wl="abi/5.7.0",Ee=new O(wl),ji={};let hp={calldata:!0,memory:!0,storage:!0},$x={calldata:!0,memory:!0};function $l(t,e){if(t==="bytes"||t==="string"){if(hp[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&$x[e])return!0;return(hp[e]||e==="payable")&&Ee.throwArgumentError("invalid modifier","name",e),!1}function Hx(t,e){let r=t;function n(l){Ee.throwArgumentError(`unexpected character at position ${l}`,"param",t)}t=t.replace(/\s/g," ");function i(l){let a={type:"",name:"",parent:l,state:{allowType:!0}};return e&&(a.indexed=!1),a}let o={type:"",name:"",state:{allowType:!0}},s=o;for(let l=0;lJSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Se.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Se.full?", ":",")+")"):r+=this.type,e!==Se.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Se.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?kt.fromString(e,r):kt.fromObject(e)}static fromObject(e){return kt.isParamType(e)?e:new kt(ji,{name:e.name||null,type:Ji(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(kt.fromObject):null})}static fromString(e,r){function n(i){return kt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(Hx(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function el(t,e){return Gx(t).map(r=>kt.fromString(r,e))}class Nn{constructor(e,r){e!==ji&&Ee.throwError("use a static from method",O.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),ma(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return Nn.isFragment(e)?e:typeof e=="string"?Nn.fromString(e):Nn.fromObject(e)}static fromObject(e){if(Nn.isFragment(e))return e;switch(e.type){case"function":return sn.fromObject(e);case"event":return _n.fromObject(e);case"constructor":return on.fromObject(e);case"error":return ei.fromObject(e);case"fallback":case"receive":return null}return Ee.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?_n.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?sn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?on.fromString(e.trim()):e.split(" ")[0]==="error"?ei.fromString(e.substring(5).trim()):Ee.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class _n extends Nn{format(e){if(e||(e=Se.sighash),Se[e]||Ee.throwArgumentError("invalid format type","format",e),e===Se.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Se.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Se.full?", ":",")+") ",e!==Se.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?_n.fromString(e):_n.fromObject(e)}static fromObject(e){if(_n.isEventFragment(e))return e;e.type!=="event"&&Ee.throwArgumentError("invalid event object","value",e);const r={name:tl(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(kt.fromObject):[],type:"event"};return new _n(ji,r)}static fromString(e){let r=e.match(rl);r||Ee.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Ee.warn("unknown modifier: "+i)}}),_n.fromObject({name:r[1].trim(),anonymous:n,inputs:el(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function ly(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Ee.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Ee.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=G.from(r[1]),r[0]):t}function ay(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function uy(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Ee.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Ee.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Ee.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Ee.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Ee.throwArgumentError("unable to determine stateMutability","value",t),e}class on extends Nn{format(e){if(e||(e=Se.sighash),Se[e]||Ee.throwArgumentError("invalid format type","format",e),e===Se.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===Se.sighash&&Ee.throwError("cannot format a constructor for sighash",O.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Se.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?on.fromString(e):on.fromObject(e)}static fromObject(e){if(on.isConstructorFragment(e))return e;e.type!=="constructor"&&Ee.throwArgumentError("invalid constructor object","value",e);let r=uy(e);r.constant&&Ee.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(kt.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?G.from(e.gas):null};return new on(ji,n)}static fromString(e){let r={type:"constructor"};e=ly(e,r);let n=e.match(rl);return(!n||n[1].trim()!=="constructor")&&Ee.throwArgumentError("invalid constructor string","value",e),r.inputs=el(n[2].trim(),!1),ay(n[3].trim(),r),on.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class sn extends on{format(e){if(e||(e=Se.sighash),Se[e]||Ee.throwArgumentError("invalid format type","format",e),e===Se.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Se.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Se.full?", ":",")+") ",e!==Se.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?sn.fromString(e):sn.fromObject(e)}static fromObject(e){if(sn.isFunctionFragment(e))return e;e.type!=="function"&&Ee.throwArgumentError("invalid function object","value",e);let r=uy(e);const n={type:e.type,name:tl(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(kt.fromObject):[],outputs:e.outputs?e.outputs.map(kt.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?G.from(e.gas):null};return new sn(ji,n)}static fromString(e){let r={type:"function"};e=ly(e,r);let n=e.split(" returns ");n.length>2&&Ee.throwArgumentError("invalid function string","value",e);let i=n[0].match(rl);if(i||Ee.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&tl(r.name),r.inputs=el(i[2],!1),ay(i[3].trim(),r),n.length>1){let o=n[1].match(rl);(o[1].trim()!=""||o[3].trim()!="")&&Ee.throwArgumentError("unexpected tokens","value",e),r.outputs=el(o[2],!1)}else r.outputs=[];return sn.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function pp(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Ee.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class ei extends Nn{format(e){if(e||(e=Se.sighash),Se[e]||Ee.throwArgumentError("invalid format type","format",e),e===Se.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Se.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Se.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?ei.fromString(e):ei.fromObject(e)}static fromObject(e){if(ei.isErrorFragment(e))return e;e.type!=="error"&&Ee.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:tl(e.name),inputs:e.inputs?e.inputs.map(kt.fromObject):[]};return pp(new ei(ji,r))}static fromString(e){let r={type:"error"},n=e.match(rl);return n||Ee.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&tl(r.name),r.inputs=el(n[2],!1),pp(ei.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Ji(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const Wx=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function tl(t){return(!t||!t.match(Wx))&&Ee.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const rl=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Gx(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&_h.throwError("value out-of-bounds",O.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Ut([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class Xa{constructor(e,r,n,i){z(this,"_data",se(e)),z(this,"wordSize",r||32),z(this,"_coerceFunc",n),z(this,"allowLoose",i),this._offset=0}get data(){return re(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):Xa.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:_h.throwError("data out-of-bounds",O.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new Xa(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return G.from(this.readBytes(this.wordSize))}}var cy={exports:{}};/** + */const _E="startTransition",rp=bw[_E];function SE(t){let{basename:e,children:r,future:n,window:i}=t,o=L.useRef();o.current==null&&(o.current=Rx({window:i,v5Compat:!0}));let s=o.current,[l,a]=L.useState({action:s.action,location:s.location}),{v7_startTransition:u}=n||{},c=L.useCallback(d=>{u&&rp?rp(()=>a(d)):a(d)},[a,u]);return L.useLayoutEffect(()=>s.listen(c),[s,c]),L.createElement(bE,{basename:e,children:r,location:l.location,navigationType:l.action,navigator:s,future:n})}var np;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(np||(np={}));var ip;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(ip||(ip={}));var bh={exports:{}};const kE={},NE=Object.freeze(Object.defineProperty({__proto__:null,default:kE},Symbol.toStringTag,{value:"Module"})),PE=Fo(NE);bh.exports;(function(t){(function(e,r){function n(M,f){if(!M)throw new Error(f||"Assertion failed")}function i(M,f){M.super_=f;var p=function(){};p.prototype=f.prototype,M.prototype=new p,M.prototype.constructor=M}function o(M,f,p){if(o.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(M||0,f||10,p||"be"))}typeof e=="object"?e.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=PE.Buffer}catch{}o.isBN=function(f){return f instanceof o?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===o.wordSize&&Array.isArray(f.words)},o.max=function(f,p){return f.cmp(p)>0?f:p},o.min=function(f,p){return f.cmp(p)<0?f:p},o.prototype._init=function(f,p,A){if(typeof f=="number")return this._initNumber(f,p,A);if(typeof f=="object")return this._initArray(f,p,A);p==="hex"&&(p=16),n(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var S=0;f[0]==="-"&&(S++,this.negative=1),S=0;S-=3)I=f[S]|f[S-1]<<8|f[S-2]<<16,this.words[_]|=I<>>26-R&67108863,R+=24,R>=26&&(R-=26,_++);else if(A==="le")for(S=0,_=0;S>>26-R&67108863,R+=24,R>=26&&(R-=26,_++);return this._strip()};function l(M,f){var p=M.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;n(!1,"Invalid character in "+M)}function a(M,f,p){var A=l(M,p);return p-1>=f&&(A|=l(M,p-1)<<4),A}o.prototype._parseHex=function(f,p,A){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var S=0;S=p;S-=2)R=a(f,p,S)<<_,this.words[I]|=R&67108863,_>=18?(_-=18,I+=1,this.words[I]|=R>>>26):_+=8;else{var k=f.length-p;for(S=k%2===0?p+1:p;S=18?(_-=18,I+=1,this.words[I]|=R>>>26):_+=8}this._strip()};function u(M,f,p,A){for(var S=0,_=0,I=Math.min(M.length,p),R=f;R=49?_=k-49+10:k>=17?_=k-17+10:_=k,n(k>=0&&_1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?""}var m=["","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"],g=[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];o.prototype.toString=function(f,p){f=f||10,p=p|0||1;var A;if(f===16||f==="hex"){A="";for(var S=0,_=0,I=0;I>>24-S&16777215,S+=2,S>=26&&(S-=26,I--),_!==0||I!==this.length-1?A=m[6-k.length]+k+A:A=k+A}for(_!==0&&(A=_.toString(16)+A);A.length%p!==0;)A="0"+A;return this.negative!==0&&(A="-"+A),A}if(f===(f|0)&&f>=2&&f<=36){var h=g[f],C=v[f];A="";var Z=this.clone();for(Z.negative=0;!Z.isZero();){var y=Z.modrn(C).toString(f);Z=Z.idivn(C),Z.isZero()?A=y+A:A=m[h-y.length]+y+A}for(this.isZero()&&(A="0"+A);A.length%p!==0;)A="0"+A;return this.negative!==0&&(A="-"+A),A}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(f,p){return this.toArrayLike(s,f,p)}),o.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var E=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};o.prototype.toArrayLike=function(f,p,A){this._strip();var S=this.byteLength(),_=A||Math.max(1,S);n(S<=_,"byte array longer than desired length"),n(_>0,"Requested array length <= 0");var I=E(f,_),R=p==="le"?"LE":"BE";return this["_toArrayLike"+R](I,S),I},o.prototype._toArrayLikeLE=function(f,p){for(var A=0,S=0,_=0,I=0;_>8&255),A>16&255),I===6?(A>24&255),S=0,I=0):(S=R>>>24,I+=2)}if(A=0&&(f[A--]=R>>8&255),A>=0&&(f[A--]=R>>16&255),I===6?(A>=0&&(f[A--]=R>>24&255),S=0,I=0):(S=R>>>24,I+=2)}if(A>=0)for(f[A--]=S;A>=0;)f[A--]=0},Math.clz32?o.prototype._countBits=function(f){return 32-Math.clz32(f)}:o.prototype._countBits=function(f){var p=f,A=0;return p>=4096&&(A+=13,p>>>=13),p>=64&&(A+=7,p>>>=7),p>=8&&(A+=4,p>>>=4),p>=2&&(A+=2,p>>>=2),A+p},o.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,A=0;return p&8191||(A+=13,p>>>=13),p&127||(A+=7,p>>>=7),p&15||(A+=4,p>>>=4),p&3||(A+=2,p>>>=2),p&1||A++,A},o.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function N(M){for(var f=new Array(M.bitLength()),p=0;p>>S&1}return f}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;pf.length?this.clone().ior(f):f.clone().ior(this)},o.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},o.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var A=0;Af.length?this.clone().iand(f):f.clone().iand(this)},o.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},o.prototype.iuxor=function(f){var p,A;this.length>f.length?(p=this,A=f):(p=f,A=this);for(var S=0;Sf.length?this.clone().ixor(f):f.clone().ixor(this)},o.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},o.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,A=f%26;this._expand(p),A>0&&p--;for(var S=0;S0&&(this.words[S]=~this.words[S]&67108863>>26-A),this._strip()},o.prototype.notn=function(f){return this.clone().inotn(f)},o.prototype.setn=function(f,p){n(typeof f=="number"&&f>=0);var A=f/26|0,S=f%26;return this._expand(A+1),p?this.words[A]=this.words[A]|1<f.length?(A=this,S=f):(A=f,S=this);for(var _=0,I=0;I>>26;for(;_!==0&&I>>26;if(this.length=A.length,_!==0)this.words[this.length]=_,this.length++;else if(A!==this)for(;If.length?this.clone().iadd(f):f.clone().iadd(this)},o.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var A=this.cmp(f);if(A===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,_;A>0?(S=this,_=f):(S=f,_=this);for(var I=0,R=0;R<_.length;R++)p=(S.words[R]|0)-(_.words[R]|0)+I,I=p>>26,this.words[R]=p&67108863;for(;I!==0&&R>26,this.words[R]=p&67108863;if(I===0&&R>>26,Z=k&67108863,y=Math.min(h,f.length-1),j=Math.max(0,h-M.length+1);j<=y;j++){var U=h-j|0;S=M.words[U]|0,_=f.words[j]|0,I=S*_+Z,C+=I/67108864|0,Z=I&67108863}p.words[h]=Z|0,k=C|0}return k!==0?p.words[h]=k|0:p.length--,p._strip()}var w=function(f,p,A){var S=f.words,_=p.words,I=A.words,R=0,k,h,C,Z=S[0]|0,y=Z&8191,j=Z>>>13,U=S[1]|0,F=U&8191,W=U>>>13,oe=S[2]|0,J=oe&8191,V=oe>>>13,Je=S[3]|0,K=Je&8191,le=Je>>>13,Qr=S[4]|0,Te=Qr&8191,Ne=Qr>>>13,Jr=S[5]|0,Pe=Jr&8191,ce=Jr>>>13,wr=S[6]|0,fe=wr&8191,Oe=wr>>>13,Yr=S[7]|0,me=Yr&8191,ze=Yr>>>13,gn=S[8]|0,$e=gn&8191,He=gn>>>13,Ht=S[9]|0,Le=Ht&8191,qe=Ht>>>13,Rr=_[0]|0,Ce=Rr&8191,We=Rr>>>13,vn=_[1]|0,Be=vn&8191,Ge=vn>>>13,yn=_[2]|0,je=yn&8191,ne=yn>>>13,ot=_[3]|0,ge=ot&8191,de=ot>>>13,rt=_[4]|0,Ae=rt&8191,_e=rt>>>13,Ct=_[5]|0,Me=Ct&8191,De=Ct>>>13,Kt=_[6]|0,Ve=Kt&8191,Ke=Kt>>>13,Qt=_[7]|0,Ie=Qt&8191,Ue=Qt>>>13,xr=_[8]|0,ke=xr&8191,Ye=xr>>>13,bi=_[9]|0,Xe=bi&8191,Ze=bi>>>13;A.negative=f.negative^p.negative,A.length=19,k=Math.imul(y,Ce),h=Math.imul(y,We),h=h+Math.imul(j,Ce)|0,C=Math.imul(j,We);var $n=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+($n>>>26)|0,$n&=67108863,k=Math.imul(F,Ce),h=Math.imul(F,We),h=h+Math.imul(W,Ce)|0,C=Math.imul(W,We),k=k+Math.imul(y,Be)|0,h=h+Math.imul(y,Ge)|0,h=h+Math.imul(j,Be)|0,C=C+Math.imul(j,Ge)|0;var Hn=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(Hn>>>26)|0,Hn&=67108863,k=Math.imul(J,Ce),h=Math.imul(J,We),h=h+Math.imul(V,Ce)|0,C=Math.imul(V,We),k=k+Math.imul(F,Be)|0,h=h+Math.imul(F,Ge)|0,h=h+Math.imul(W,Be)|0,C=C+Math.imul(W,Ge)|0,k=k+Math.imul(y,je)|0,h=h+Math.imul(y,ne)|0,h=h+Math.imul(j,je)|0,C=C+Math.imul(j,ne)|0;var qn=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(qn>>>26)|0,qn&=67108863,k=Math.imul(K,Ce),h=Math.imul(K,We),h=h+Math.imul(le,Ce)|0,C=Math.imul(le,We),k=k+Math.imul(J,Be)|0,h=h+Math.imul(J,Ge)|0,h=h+Math.imul(V,Be)|0,C=C+Math.imul(V,Ge)|0,k=k+Math.imul(F,je)|0,h=h+Math.imul(F,ne)|0,h=h+Math.imul(W,je)|0,C=C+Math.imul(W,ne)|0,k=k+Math.imul(y,ge)|0,h=h+Math.imul(y,de)|0,h=h+Math.imul(j,ge)|0,C=C+Math.imul(j,de)|0;var Wn=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,k=Math.imul(Te,Ce),h=Math.imul(Te,We),h=h+Math.imul(Ne,Ce)|0,C=Math.imul(Ne,We),k=k+Math.imul(K,Be)|0,h=h+Math.imul(K,Ge)|0,h=h+Math.imul(le,Be)|0,C=C+Math.imul(le,Ge)|0,k=k+Math.imul(J,je)|0,h=h+Math.imul(J,ne)|0,h=h+Math.imul(V,je)|0,C=C+Math.imul(V,ne)|0,k=k+Math.imul(F,ge)|0,h=h+Math.imul(F,de)|0,h=h+Math.imul(W,ge)|0,C=C+Math.imul(W,de)|0,k=k+Math.imul(y,Ae)|0,h=h+Math.imul(y,_e)|0,h=h+Math.imul(j,Ae)|0,C=C+Math.imul(j,_e)|0;var Gn=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(Gn>>>26)|0,Gn&=67108863,k=Math.imul(Pe,Ce),h=Math.imul(Pe,We),h=h+Math.imul(ce,Ce)|0,C=Math.imul(ce,We),k=k+Math.imul(Te,Be)|0,h=h+Math.imul(Te,Ge)|0,h=h+Math.imul(Ne,Be)|0,C=C+Math.imul(Ne,Ge)|0,k=k+Math.imul(K,je)|0,h=h+Math.imul(K,ne)|0,h=h+Math.imul(le,je)|0,C=C+Math.imul(le,ne)|0,k=k+Math.imul(J,ge)|0,h=h+Math.imul(J,de)|0,h=h+Math.imul(V,ge)|0,C=C+Math.imul(V,de)|0,k=k+Math.imul(F,Ae)|0,h=h+Math.imul(F,_e)|0,h=h+Math.imul(W,Ae)|0,C=C+Math.imul(W,_e)|0,k=k+Math.imul(y,Me)|0,h=h+Math.imul(y,De)|0,h=h+Math.imul(j,Me)|0,C=C+Math.imul(j,De)|0;var Xu=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,k=Math.imul(fe,Ce),h=Math.imul(fe,We),h=h+Math.imul(Oe,Ce)|0,C=Math.imul(Oe,We),k=k+Math.imul(Pe,Be)|0,h=h+Math.imul(Pe,Ge)|0,h=h+Math.imul(ce,Be)|0,C=C+Math.imul(ce,Ge)|0,k=k+Math.imul(Te,je)|0,h=h+Math.imul(Te,ne)|0,h=h+Math.imul(Ne,je)|0,C=C+Math.imul(Ne,ne)|0,k=k+Math.imul(K,ge)|0,h=h+Math.imul(K,de)|0,h=h+Math.imul(le,ge)|0,C=C+Math.imul(le,de)|0,k=k+Math.imul(J,Ae)|0,h=h+Math.imul(J,_e)|0,h=h+Math.imul(V,Ae)|0,C=C+Math.imul(V,_e)|0,k=k+Math.imul(F,Me)|0,h=h+Math.imul(F,De)|0,h=h+Math.imul(W,Me)|0,C=C+Math.imul(W,De)|0,k=k+Math.imul(y,Ve)|0,h=h+Math.imul(y,Ke)|0,h=h+Math.imul(j,Ve)|0,C=C+Math.imul(j,Ke)|0;var Zu=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,k=Math.imul(me,Ce),h=Math.imul(me,We),h=h+Math.imul(ze,Ce)|0,C=Math.imul(ze,We),k=k+Math.imul(fe,Be)|0,h=h+Math.imul(fe,Ge)|0,h=h+Math.imul(Oe,Be)|0,C=C+Math.imul(Oe,Ge)|0,k=k+Math.imul(Pe,je)|0,h=h+Math.imul(Pe,ne)|0,h=h+Math.imul(ce,je)|0,C=C+Math.imul(ce,ne)|0,k=k+Math.imul(Te,ge)|0,h=h+Math.imul(Te,de)|0,h=h+Math.imul(Ne,ge)|0,C=C+Math.imul(Ne,de)|0,k=k+Math.imul(K,Ae)|0,h=h+Math.imul(K,_e)|0,h=h+Math.imul(le,Ae)|0,C=C+Math.imul(le,_e)|0,k=k+Math.imul(J,Me)|0,h=h+Math.imul(J,De)|0,h=h+Math.imul(V,Me)|0,C=C+Math.imul(V,De)|0,k=k+Math.imul(F,Ve)|0,h=h+Math.imul(F,Ke)|0,h=h+Math.imul(W,Ve)|0,C=C+Math.imul(W,Ke)|0,k=k+Math.imul(y,Ie)|0,h=h+Math.imul(y,Ue)|0,h=h+Math.imul(j,Ie)|0,C=C+Math.imul(j,Ue)|0;var ec=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(ec>>>26)|0,ec&=67108863,k=Math.imul($e,Ce),h=Math.imul($e,We),h=h+Math.imul(He,Ce)|0,C=Math.imul(He,We),k=k+Math.imul(me,Be)|0,h=h+Math.imul(me,Ge)|0,h=h+Math.imul(ze,Be)|0,C=C+Math.imul(ze,Ge)|0,k=k+Math.imul(fe,je)|0,h=h+Math.imul(fe,ne)|0,h=h+Math.imul(Oe,je)|0,C=C+Math.imul(Oe,ne)|0,k=k+Math.imul(Pe,ge)|0,h=h+Math.imul(Pe,de)|0,h=h+Math.imul(ce,ge)|0,C=C+Math.imul(ce,de)|0,k=k+Math.imul(Te,Ae)|0,h=h+Math.imul(Te,_e)|0,h=h+Math.imul(Ne,Ae)|0,C=C+Math.imul(Ne,_e)|0,k=k+Math.imul(K,Me)|0,h=h+Math.imul(K,De)|0,h=h+Math.imul(le,Me)|0,C=C+Math.imul(le,De)|0,k=k+Math.imul(J,Ve)|0,h=h+Math.imul(J,Ke)|0,h=h+Math.imul(V,Ve)|0,C=C+Math.imul(V,Ke)|0,k=k+Math.imul(F,Ie)|0,h=h+Math.imul(F,Ue)|0,h=h+Math.imul(W,Ie)|0,C=C+Math.imul(W,Ue)|0,k=k+Math.imul(y,ke)|0,h=h+Math.imul(y,Ye)|0,h=h+Math.imul(j,ke)|0,C=C+Math.imul(j,Ye)|0;var tc=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(tc>>>26)|0,tc&=67108863,k=Math.imul(Le,Ce),h=Math.imul(Le,We),h=h+Math.imul(qe,Ce)|0,C=Math.imul(qe,We),k=k+Math.imul($e,Be)|0,h=h+Math.imul($e,Ge)|0,h=h+Math.imul(He,Be)|0,C=C+Math.imul(He,Ge)|0,k=k+Math.imul(me,je)|0,h=h+Math.imul(me,ne)|0,h=h+Math.imul(ze,je)|0,C=C+Math.imul(ze,ne)|0,k=k+Math.imul(fe,ge)|0,h=h+Math.imul(fe,de)|0,h=h+Math.imul(Oe,ge)|0,C=C+Math.imul(Oe,de)|0,k=k+Math.imul(Pe,Ae)|0,h=h+Math.imul(Pe,_e)|0,h=h+Math.imul(ce,Ae)|0,C=C+Math.imul(ce,_e)|0,k=k+Math.imul(Te,Me)|0,h=h+Math.imul(Te,De)|0,h=h+Math.imul(Ne,Me)|0,C=C+Math.imul(Ne,De)|0,k=k+Math.imul(K,Ve)|0,h=h+Math.imul(K,Ke)|0,h=h+Math.imul(le,Ve)|0,C=C+Math.imul(le,Ke)|0,k=k+Math.imul(J,Ie)|0,h=h+Math.imul(J,Ue)|0,h=h+Math.imul(V,Ie)|0,C=C+Math.imul(V,Ue)|0,k=k+Math.imul(F,ke)|0,h=h+Math.imul(F,Ye)|0,h=h+Math.imul(W,ke)|0,C=C+Math.imul(W,Ye)|0,k=k+Math.imul(y,Xe)|0,h=h+Math.imul(y,Ze)|0,h=h+Math.imul(j,Xe)|0,C=C+Math.imul(j,Ze)|0;var rc=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(rc>>>26)|0,rc&=67108863,k=Math.imul(Le,Be),h=Math.imul(Le,Ge),h=h+Math.imul(qe,Be)|0,C=Math.imul(qe,Ge),k=k+Math.imul($e,je)|0,h=h+Math.imul($e,ne)|0,h=h+Math.imul(He,je)|0,C=C+Math.imul(He,ne)|0,k=k+Math.imul(me,ge)|0,h=h+Math.imul(me,de)|0,h=h+Math.imul(ze,ge)|0,C=C+Math.imul(ze,de)|0,k=k+Math.imul(fe,Ae)|0,h=h+Math.imul(fe,_e)|0,h=h+Math.imul(Oe,Ae)|0,C=C+Math.imul(Oe,_e)|0,k=k+Math.imul(Pe,Me)|0,h=h+Math.imul(Pe,De)|0,h=h+Math.imul(ce,Me)|0,C=C+Math.imul(ce,De)|0,k=k+Math.imul(Te,Ve)|0,h=h+Math.imul(Te,Ke)|0,h=h+Math.imul(Ne,Ve)|0,C=C+Math.imul(Ne,Ke)|0,k=k+Math.imul(K,Ie)|0,h=h+Math.imul(K,Ue)|0,h=h+Math.imul(le,Ie)|0,C=C+Math.imul(le,Ue)|0,k=k+Math.imul(J,ke)|0,h=h+Math.imul(J,Ye)|0,h=h+Math.imul(V,ke)|0,C=C+Math.imul(V,Ye)|0,k=k+Math.imul(F,Xe)|0,h=h+Math.imul(F,Ze)|0,h=h+Math.imul(W,Xe)|0,C=C+Math.imul(W,Ze)|0;var nc=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(nc>>>26)|0,nc&=67108863,k=Math.imul(Le,je),h=Math.imul(Le,ne),h=h+Math.imul(qe,je)|0,C=Math.imul(qe,ne),k=k+Math.imul($e,ge)|0,h=h+Math.imul($e,de)|0,h=h+Math.imul(He,ge)|0,C=C+Math.imul(He,de)|0,k=k+Math.imul(me,Ae)|0,h=h+Math.imul(me,_e)|0,h=h+Math.imul(ze,Ae)|0,C=C+Math.imul(ze,_e)|0,k=k+Math.imul(fe,Me)|0,h=h+Math.imul(fe,De)|0,h=h+Math.imul(Oe,Me)|0,C=C+Math.imul(Oe,De)|0,k=k+Math.imul(Pe,Ve)|0,h=h+Math.imul(Pe,Ke)|0,h=h+Math.imul(ce,Ve)|0,C=C+Math.imul(ce,Ke)|0,k=k+Math.imul(Te,Ie)|0,h=h+Math.imul(Te,Ue)|0,h=h+Math.imul(Ne,Ie)|0,C=C+Math.imul(Ne,Ue)|0,k=k+Math.imul(K,ke)|0,h=h+Math.imul(K,Ye)|0,h=h+Math.imul(le,ke)|0,C=C+Math.imul(le,Ye)|0,k=k+Math.imul(J,Xe)|0,h=h+Math.imul(J,Ze)|0,h=h+Math.imul(V,Xe)|0,C=C+Math.imul(V,Ze)|0;var ic=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(ic>>>26)|0,ic&=67108863,k=Math.imul(Le,ge),h=Math.imul(Le,de),h=h+Math.imul(qe,ge)|0,C=Math.imul(qe,de),k=k+Math.imul($e,Ae)|0,h=h+Math.imul($e,_e)|0,h=h+Math.imul(He,Ae)|0,C=C+Math.imul(He,_e)|0,k=k+Math.imul(me,Me)|0,h=h+Math.imul(me,De)|0,h=h+Math.imul(ze,Me)|0,C=C+Math.imul(ze,De)|0,k=k+Math.imul(fe,Ve)|0,h=h+Math.imul(fe,Ke)|0,h=h+Math.imul(Oe,Ve)|0,C=C+Math.imul(Oe,Ke)|0,k=k+Math.imul(Pe,Ie)|0,h=h+Math.imul(Pe,Ue)|0,h=h+Math.imul(ce,Ie)|0,C=C+Math.imul(ce,Ue)|0,k=k+Math.imul(Te,ke)|0,h=h+Math.imul(Te,Ye)|0,h=h+Math.imul(Ne,ke)|0,C=C+Math.imul(Ne,Ye)|0,k=k+Math.imul(K,Xe)|0,h=h+Math.imul(K,Ze)|0,h=h+Math.imul(le,Xe)|0,C=C+Math.imul(le,Ze)|0;var oc=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(oc>>>26)|0,oc&=67108863,k=Math.imul(Le,Ae),h=Math.imul(Le,_e),h=h+Math.imul(qe,Ae)|0,C=Math.imul(qe,_e),k=k+Math.imul($e,Me)|0,h=h+Math.imul($e,De)|0,h=h+Math.imul(He,Me)|0,C=C+Math.imul(He,De)|0,k=k+Math.imul(me,Ve)|0,h=h+Math.imul(me,Ke)|0,h=h+Math.imul(ze,Ve)|0,C=C+Math.imul(ze,Ke)|0,k=k+Math.imul(fe,Ie)|0,h=h+Math.imul(fe,Ue)|0,h=h+Math.imul(Oe,Ie)|0,C=C+Math.imul(Oe,Ue)|0,k=k+Math.imul(Pe,ke)|0,h=h+Math.imul(Pe,Ye)|0,h=h+Math.imul(ce,ke)|0,C=C+Math.imul(ce,Ye)|0,k=k+Math.imul(Te,Xe)|0,h=h+Math.imul(Te,Ze)|0,h=h+Math.imul(Ne,Xe)|0,C=C+Math.imul(Ne,Ze)|0;var sc=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(sc>>>26)|0,sc&=67108863,k=Math.imul(Le,Me),h=Math.imul(Le,De),h=h+Math.imul(qe,Me)|0,C=Math.imul(qe,De),k=k+Math.imul($e,Ve)|0,h=h+Math.imul($e,Ke)|0,h=h+Math.imul(He,Ve)|0,C=C+Math.imul(He,Ke)|0,k=k+Math.imul(me,Ie)|0,h=h+Math.imul(me,Ue)|0,h=h+Math.imul(ze,Ie)|0,C=C+Math.imul(ze,Ue)|0,k=k+Math.imul(fe,ke)|0,h=h+Math.imul(fe,Ye)|0,h=h+Math.imul(Oe,ke)|0,C=C+Math.imul(Oe,Ye)|0,k=k+Math.imul(Pe,Xe)|0,h=h+Math.imul(Pe,Ze)|0,h=h+Math.imul(ce,Xe)|0,C=C+Math.imul(ce,Ze)|0;var lc=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(lc>>>26)|0,lc&=67108863,k=Math.imul(Le,Ve),h=Math.imul(Le,Ke),h=h+Math.imul(qe,Ve)|0,C=Math.imul(qe,Ke),k=k+Math.imul($e,Ie)|0,h=h+Math.imul($e,Ue)|0,h=h+Math.imul(He,Ie)|0,C=C+Math.imul(He,Ue)|0,k=k+Math.imul(me,ke)|0,h=h+Math.imul(me,Ye)|0,h=h+Math.imul(ze,ke)|0,C=C+Math.imul(ze,Ye)|0,k=k+Math.imul(fe,Xe)|0,h=h+Math.imul(fe,Ze)|0,h=h+Math.imul(Oe,Xe)|0,C=C+Math.imul(Oe,Ze)|0;var ac=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(ac>>>26)|0,ac&=67108863,k=Math.imul(Le,Ie),h=Math.imul(Le,Ue),h=h+Math.imul(qe,Ie)|0,C=Math.imul(qe,Ue),k=k+Math.imul($e,ke)|0,h=h+Math.imul($e,Ye)|0,h=h+Math.imul(He,ke)|0,C=C+Math.imul(He,Ye)|0,k=k+Math.imul(me,Xe)|0,h=h+Math.imul(me,Ze)|0,h=h+Math.imul(ze,Xe)|0,C=C+Math.imul(ze,Ze)|0;var uc=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(uc>>>26)|0,uc&=67108863,k=Math.imul(Le,ke),h=Math.imul(Le,Ye),h=h+Math.imul(qe,ke)|0,C=Math.imul(qe,Ye),k=k+Math.imul($e,Xe)|0,h=h+Math.imul($e,Ze)|0,h=h+Math.imul(He,Xe)|0,C=C+Math.imul(He,Ze)|0;var cc=(R+k|0)+((h&8191)<<13)|0;R=(C+(h>>>13)|0)+(cc>>>26)|0,cc&=67108863,k=Math.imul(Le,Xe),h=Math.imul(Le,Ze),h=h+Math.imul(qe,Xe)|0,C=Math.imul(qe,Ze);var fc=(R+k|0)+((h&8191)<<13)|0;return R=(C+(h>>>13)|0)+(fc>>>26)|0,fc&=67108863,I[0]=$n,I[1]=Hn,I[2]=qn,I[3]=Wn,I[4]=Gn,I[5]=Xu,I[6]=Zu,I[7]=ec,I[8]=tc,I[9]=rc,I[10]=nc,I[11]=ic,I[12]=oc,I[13]=sc,I[14]=lc,I[15]=ac,I[16]=uc,I[17]=cc,I[18]=fc,R!==0&&(I[19]=R,A.length++),A};Math.imul||(w=x);function b(M,f,p){p.negative=f.negative^M.negative,p.length=M.length+f.length;for(var A=0,S=0,_=0;_>>26)|0,S+=I>>>26,I&=67108863}p.words[_]=R,A=I,I=S}return A!==0?p.words[_]=A:p.length--,p._strip()}function T(M,f,p){return b(M,f,p)}o.prototype.mulTo=function(f,p){var A,S=this.length+f.length;return this.length===10&&f.length===10?A=w(this,f,p):S<63?A=x(this,f,p):S<1024?A=b(this,f,p):A=T(this,f,p),A},o.prototype.mul=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},o.prototype.mulf=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),T(this,f,p)},o.prototype.imul=function(f){return this.clone().mulTo(f,this)},o.prototype.imuln=function(f){var p=f<0;p&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var A=0,S=0;S>=26,A+=_/67108864|0,A+=I>>>26,this.words[S]=I&67108863}return A!==0&&(this.words[S]=A,this.length++),p?this.ineg():this},o.prototype.muln=function(f){return this.clone().imuln(f)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(f){var p=N(f);if(p.length===0)return new o(1);for(var A=this,S=0;S=0);var p=f%26,A=(f-p)/26,S=67108863>>>26-p<<26-p,_;if(p!==0){var I=0;for(_=0;_>>26-p}I&&(this.words[_]=I,this.length++)}if(A!==0){for(_=this.length-1;_>=0;_--)this.words[_+A]=this.words[_];for(_=0;_=0);var S;p?S=(p-p%26)/26:S=0;var _=f%26,I=Math.min((f-_)/26,this.length),R=67108863^67108863>>>_<<_,k=A;if(S-=I,S=Math.max(0,S),k){for(var h=0;hI)for(this.length-=I,h=0;h=0&&(C!==0||h>=S);h--){var Z=this.words[h]|0;this.words[h]=C<<26-_|Z>>>_,C=Z&R}return k&&C!==0&&(k.words[k.length++]=C),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(f,p,A){return n(this.negative===0),this.iushrn(f,p,A)},o.prototype.shln=function(f){return this.clone().ishln(f)},o.prototype.ushln=function(f){return this.clone().iushln(f)},o.prototype.shrn=function(f){return this.clone().ishrn(f)},o.prototype.ushrn=function(f){return this.clone().iushrn(f)},o.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,A=(f-p)/26,S=1<=0);var p=f%26,A=(f-p)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=A)return this;if(p!==0&&A++,this.length=Math.min(A,this.length),p!==0){var S=67108863^67108863>>>p<=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},o.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p>26)-(k/67108864|0),this.words[_+A]=I&67108863}for(;_>26,this.words[_+A]=I&67108863;if(R===0)return this._strip();for(n(R===-1),R=0,_=0;_>26,this.words[_]=I&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(f,p){var A=this.length-f.length,S=this.clone(),_=f,I=_.words[_.length-1]|0,R=this._countBits(I);A=26-R,A!==0&&(_=_.ushln(A),S.iushln(A),I=_.words[_.length-1]|0);var k=S.length-_.length,h;if(p!=="mod"){h=new o(null),h.length=k+1,h.words=new Array(h.length);for(var C=0;C=0;y--){var j=(S.words[_.length+y]|0)*67108864+(S.words[_.length+y-1]|0);for(j=Math.min(j/I|0,67108863),S._ishlnsubmul(_,j,y);S.negative!==0;)j--,S.negative=0,S._ishlnsubmul(_,1,y),S.isZero()||(S.negative^=1);h&&(h.words[y]=j)}return h&&h._strip(),S._strip(),p!=="div"&&A!==0&&S.iushrn(A),{div:h||null,mod:S}},o.prototype.divmod=function(f,p,A){if(n(!f.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var S,_,I;return this.negative!==0&&f.negative===0?(I=this.neg().divmod(f,p),p!=="mod"&&(S=I.div.neg()),p!=="div"&&(_=I.mod.neg(),A&&_.negative!==0&&_.iadd(f)),{div:S,mod:_}):this.negative===0&&f.negative!==0?(I=this.divmod(f.neg(),p),p!=="mod"&&(S=I.div.neg()),{div:S,mod:I.mod}):this.negative&f.negative?(I=this.neg().divmod(f.neg(),p),p!=="div"&&(_=I.mod.neg(),A&&_.negative!==0&&_.isub(f)),{div:I.div,mod:_}):f.length>this.length||this.cmp(f)<0?{div:new o(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new o(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new o(this.modrn(f.words[0]))}:this._wordDiv(f,p)},o.prototype.div=function(f){return this.divmod(f,"div",!1).div},o.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},o.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},o.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var A=p.div.negative!==0?p.mod.isub(f):p.mod,S=f.ushrn(1),_=f.andln(1),I=A.cmp(S);return I<0||_===1&&I===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},o.prototype.modrn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var A=(1<<26)%f,S=0,_=this.length-1;_>=0;_--)S=(A*S+(this.words[_]|0))%f;return p?-S:S},o.prototype.modn=function(f){return this.modrn(f)},o.prototype.idivn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var A=0,S=this.length-1;S>=0;S--){var _=(this.words[S]|0)+A*67108864;this.words[S]=_/f|0,A=_%f}return this._strip(),p?this.ineg():this},o.prototype.divn=function(f){return this.clone().idivn(f)},o.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var p=this,A=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var S=new o(1),_=new o(0),I=new o(0),R=new o(1),k=0;p.isEven()&&A.isEven();)p.iushrn(1),A.iushrn(1),++k;for(var h=A.clone(),C=p.clone();!p.isZero();){for(var Z=0,y=1;!(p.words[0]&y)&&Z<26;++Z,y<<=1);if(Z>0)for(p.iushrn(Z);Z-- >0;)(S.isOdd()||_.isOdd())&&(S.iadd(h),_.isub(C)),S.iushrn(1),_.iushrn(1);for(var j=0,U=1;!(A.words[0]&U)&&j<26;++j,U<<=1);if(j>0)for(A.iushrn(j);j-- >0;)(I.isOdd()||R.isOdd())&&(I.iadd(h),R.isub(C)),I.iushrn(1),R.iushrn(1);p.cmp(A)>=0?(p.isub(A),S.isub(I),_.isub(R)):(A.isub(p),I.isub(S),R.isub(_))}return{a:I,b:R,gcd:A.iushln(k)}},o.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var p=this,A=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var S=new o(1),_=new o(0),I=A.clone();p.cmpn(1)>0&&A.cmpn(1)>0;){for(var R=0,k=1;!(p.words[0]&k)&&R<26;++R,k<<=1);if(R>0)for(p.iushrn(R);R-- >0;)S.isOdd()&&S.iadd(I),S.iushrn(1);for(var h=0,C=1;!(A.words[0]&C)&&h<26;++h,C<<=1);if(h>0)for(A.iushrn(h);h-- >0;)_.isOdd()&&_.iadd(I),_.iushrn(1);p.cmp(A)>=0?(p.isub(A),S.isub(_)):(A.isub(p),_.isub(S))}var Z;return p.cmpn(1)===0?Z=S:Z=_,Z.cmpn(0)<0&&Z.iadd(f),Z},o.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),A=f.clone();p.negative=0,A.negative=0;for(var S=0;p.isEven()&&A.isEven();S++)p.iushrn(1),A.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;A.isEven();)A.iushrn(1);var _=p.cmp(A);if(_<0){var I=p;p=A,A=I}else if(_===0||A.cmpn(1)===0)break;p.isub(A)}while(!0);return A.iushln(S)},o.prototype.invm=function(f){return this.egcd(f).a.umod(f)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(f){return this.words[0]&f},o.prototype.bincn=function(f){n(typeof f=="number");var p=f%26,A=(f-p)/26,S=1<>>26,R&=67108863,this.words[I]=R}return _!==0&&(this.words[I]=_,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var A;if(this.length>1)A=1;else{p&&(f=-f),n(f<=67108863,"Number is too big");var S=this.words[0]|0;A=S===f?0:Sf.length)return 1;if(this.length=0;A--){var S=this.words[A]|0,_=f.words[A]|0;if(S!==_){S<_?p=-1:S>_&&(p=1);break}}return p},o.prototype.gtn=function(f){return this.cmpn(f)===1},o.prototype.gt=function(f){return this.cmp(f)===1},o.prototype.gten=function(f){return this.cmpn(f)>=0},o.prototype.gte=function(f){return this.cmp(f)>=0},o.prototype.ltn=function(f){return this.cmpn(f)===-1},o.prototype.lt=function(f){return this.cmp(f)===-1},o.prototype.lten=function(f){return this.cmpn(f)<=0},o.prototype.lte=function(f){return this.cmp(f)<=0},o.prototype.eqn=function(f){return this.cmpn(f)===0},o.prototype.eq=function(f){return this.cmp(f)===0},o.red=function(f){return new X(f)},o.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(f){return this.red=f,this},o.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},o.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},o.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},o.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},o.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},o.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},o.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},o.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},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(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var B={k256:null,p224:null,p192:null,p25519:null};function D(M,f){this.name=M,this.p=new o(f,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var f=new o(null);return f.words=new Array(Math.ceil(this.n/13)),f},D.prototype.ireduce=function(f){var p=f,A;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),A=p.bitLength();while(A>this.n);var S=A0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},D.prototype.split=function(f,p){f.iushrn(this.n,0,p)},D.prototype.imulK=function(f){return f.imul(this.k)};function $(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i($,D),$.prototype.split=function(f,p){for(var A=4194303,S=Math.min(f.length,9),_=0;_>>22,I=R}I>>>=22,f.words[_-10]=I,I===0&&f.length>10?f.length-=10:f.length-=9},$.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,A=0;A>>=26,f.words[A]=_,p=S}return p!==0&&(f.words[f.length++]=p),f},o._prime=function(f){if(B[f])return B[f];var p;if(f==="k256")p=new $;else if(f==="p224")p=new H;else if(f==="p192")p=new Y;else if(f==="p25519")p=new Q;else throw new Error("Unknown prime "+f);return B[f]=p,p};function X(M){if(typeof M=="string"){var f=o._prime(M);this.m=f.p,this.prime=f}else n(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}X.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},X.prototype._verify2=function(f,p){n((f.negative|p.negative)===0,"red works only with positives"),n(f.red&&f.red===p.red,"red works only with red numbers")},X.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(c(f,f.umod(this.m)._forceRed(this)),f)},X.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},X.prototype.add=function(f,p){this._verify2(f,p);var A=f.add(p);return A.cmp(this.m)>=0&&A.isub(this.m),A._forceRed(this)},X.prototype.iadd=function(f,p){this._verify2(f,p);var A=f.iadd(p);return A.cmp(this.m)>=0&&A.isub(this.m),A},X.prototype.sub=function(f,p){this._verify2(f,p);var A=f.sub(p);return A.cmpn(0)<0&&A.iadd(this.m),A._forceRed(this)},X.prototype.isub=function(f,p){this._verify2(f,p);var A=f.isub(p);return A.cmpn(0)<0&&A.iadd(this.m),A},X.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},X.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},X.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},X.prototype.isqr=function(f){return this.imul(f,f.clone())},X.prototype.sqr=function(f){return this.mul(f,f)},X.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(n(p%2===1),p===3){var A=this.m.add(new o(1)).iushrn(2);return this.pow(f,A)}for(var S=this.m.subn(1),_=0;!S.isZero()&&S.andln(1)===0;)_++,S.iushrn(1);n(!S.isZero());var I=new o(1).toRed(this),R=I.redNeg(),k=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);this.pow(h,k).cmp(R)!==0;)h.redIAdd(R);for(var C=this.pow(h,S),Z=this.pow(f,S.addn(1).iushrn(1)),y=this.pow(f,S),j=_;y.cmp(I)!==0;){for(var U=y,F=0;U.cmp(I)!==0;F++)U=U.redSqr();n(F=0;_--){for(var C=p.words[_],Z=h-1;Z>=0;Z--){var y=C>>Z&1;if(I!==S[0]&&(I=this.sqr(I)),y===0&&R===0){k=0;continue}R<<=1,R|=y,k++,!(k!==A&&(_!==0||Z!==0))&&(I=this.mul(I,S[R]),k=0,R=0)}h=26}return I},X.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},X.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},o.mont=function(f){return new ie(f)};function ie(M){X.call(this,M),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)}i(ie,X),ie.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},ie.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},ie.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var A=f.imul(p),S=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=A.isub(S).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},ie.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new o(0)._forceRed(this);var A=f.mul(p),S=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=A.isub(S).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},ie.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(t,Fe)})(bh);var CE=bh.exports;const ue=Uo(CE),ME="logger/5.7.0";let op=!1,sp=!1;const ha={debug:1,default:2,info:2,warning:3,error:4,off:5};let lp=ha.default,Uc=null;function IE(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const ap=IE();var sd;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(sd||(sd={}));var Ur;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(Ur||(Ur={}));const up="0123456789abcdef";class O{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();ha[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(lp>ha[n])&&console.log.apply(console,r)}debug(...e){this._log(O.levels.DEBUG,e)}info(...e){this._log(O.levels.INFO,e)}warn(...e){this._log(O.levels.WARNING,e)}makeError(e,r,n){if(sp)return this.makeError("censored error",r,{});r||(r=O.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(a=>{const u=n[a];try{if(u instanceof Uint8Array){let c="";for(let d=0;d>4],c+=up[u[d]&15];i.push(a+"=Uint8Array(0x"+c+")")}else i.push(a+"="+JSON.stringify(u))}catch{i.push(a+"="+JSON.stringify(n[a].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const o=e;let s="";switch(r){case Ur.NUMERIC_FAULT:{s="NUMERIC_FAULT";const a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":s+="-"+a;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Ur.CALL_EXCEPTION:case Ur.INSUFFICIENT_FUNDS:case Ur.MISSING_NEW:case Ur.NONCE_EXPIRED:case Ur.REPLACEMENT_UNDERPRICED:case Ur.TRANSACTION_REPLACED:case Ur.UNPREDICTABLE_GAS_LIMIT:s=r;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const l=new Error(e);return l.reason=o,l.code=r,Object.keys(n).forEach(function(a){l[a]=n[a]}),l}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,O.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){ap&&this.throwError("platform missing String.prototype.normalize",O.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ap})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,O.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,O.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,O.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",O.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",O.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",O.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return Uc||(Uc=new O(ME)),Uc}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",O.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),op){if(!e)return;this.globalLogger().throwError("error censorship permanent",O.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}sp=!!e,op=!!r}static setLogLevel(e){const r=ha[e.toLowerCase()];if(r==null){O.globalLogger().warn("invalid log level - "+e);return}lp=r}static from(e){return new O(e)}}O.errors=Ur;O.levels=sd;const RE="bytes/5.7.0",dt=new O(RE);function oy(t){return!!t.toHexString}function Ao(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Ao(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Ah(t){return pe(t)&&!(t.length%2)||Tu(t)}function cp(t){return typeof t=="number"&&t==t&&t%1===0}function Tu(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!cp(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function se(t,e){if(e||(e={}),typeof t=="number"){dt.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),Ao(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),oy(t)&&(t=t.toHexString()),pe(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":dt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;ise(i)),r=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(r);return e.reduce((i,o)=>(n.set(o,i),i+o.length),0),Ao(n)}function To(t){let e=se(t);if(e.length===0)return e;let r=0;for(;re&&dt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),Ao(r)}function pe(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const Fc="0123456789abcdef";function re(t,e){if(e||(e={}),typeof t=="number"){dt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Fc[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),oy(t))return t.toHexString();if(pe(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":dt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Tu(t)){let r="0x";for(let n=0;n>4]+Fc[i&15]}return r}return dt.throwArgumentError("invalid hexlify value","value",t)}function On(t){if(typeof t!="string")t=re(t);else if(!pe(t)||t.length%2)return null;return(t.length-2)/2}function It(t,e,r){return typeof t!="string"?t=re(t):(!pe(t)||t.length%2)&&dt.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Xt(t){let e="0x";return t.forEach(r=>{e+=re(r).substring(2)}),e}function Ou(t){const e=TE(re(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function TE(t){typeof t!="string"&&(t=re(t)),pe(t)||dt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&dt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Lu(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Ah(t)){let r=se(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=re(r.slice(0,32)),e.s=re(r.slice(32,64))):r.length===65?(e.r=re(r.slice(0,32)),e.s=re(r.slice(32,64)),e.v=r[64]):dt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:dt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=re(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=pa(se(e._vs),32);e._vs=re(i);const o=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=o:e.recoveryParam!==o&&dt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const s=re(i);e.s==null?e.s=s:e.s!==s&&dt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?dt.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&dt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!pe(e.r)?dt.throwArgumentError("signature missing or invalid r","signature",t):e.r=pt(e.r,32),e.s==null||!pe(e.s)?dt.throwArgumentError("signature missing or invalid s","signature",t):e.s=pt(e.s,32);const r=se(e.s);r[0]>=128&&dt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=re(r);e._vs&&(pe(e._vs)||dt.throwArgumentError("signature invalid _vs","signature",t),e._vs=pt(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&dt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}const OE="bignumber/5.7.0";var Xs=ue.BN;const xn=new O(OE),zc={},fp=9007199254740991;let dp=!1;class G{constructor(e,r){e!==zc&&xn.throwError("cannot call constructor directly; use BigNumber.from",O.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Jt(ve(this).fromTwos(e))}toTwos(e){return Jt(ve(this).toTwos(e))}abs(){return this._hex[0]==="-"?G.from(this._hex.substring(1)):this}add(e){return Jt(ve(this).add(ve(e)))}sub(e){return Jt(ve(this).sub(ve(e)))}div(e){return G.from(e).isZero()&&Er("division-by-zero","div"),Jt(ve(this).div(ve(e)))}mul(e){return Jt(ve(this).mul(ve(e)))}mod(e){const r=ve(e);return r.isNeg()&&Er("division-by-zero","mod"),Jt(ve(this).umod(r))}pow(e){const r=ve(e);return r.isNeg()&&Er("negative-power","pow"),Jt(ve(this).pow(r))}and(e){const r=ve(e);return(this.isNegative()||r.isNeg())&&Er("unbound-bitwise-result","and"),Jt(ve(this).and(r))}or(e){const r=ve(e);return(this.isNegative()||r.isNeg())&&Er("unbound-bitwise-result","or"),Jt(ve(this).or(r))}xor(e){const r=ve(e);return(this.isNegative()||r.isNeg())&&Er("unbound-bitwise-result","xor"),Jt(ve(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Er("negative-width","mask"),Jt(ve(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Er("negative-width","shl"),Jt(ve(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Er("negative-width","shr"),Jt(ve(this).shrn(e))}eq(e){return ve(this).eq(ve(e))}lt(e){return ve(this).lt(ve(e))}lte(e){return ve(this).lte(ve(e))}gt(e){return ve(this).gt(ve(e))}gte(e){return ve(this).gte(ve(e))}isNegative(){return this._hex[0]==="-"}isZero(){return ve(this).isZero()}toNumber(){try{return ve(this).toNumber()}catch{Er("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return xn.throwError("this platform does not support BigInt",O.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?dp||(dp=!0,xn.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?xn.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",O.errors.UNEXPECTED_ARGUMENT,{}):xn.throwError("BigNumber.toString does not accept parameters",O.errors.UNEXPECTED_ARGUMENT,{})),ve(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof G)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new G(zc,Zs(e)):e.match(/^-?[0-9]+$/)?new G(zc,Zs(new Xs(e))):xn.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Er("underflow","BigNumber.from",e),(e>=fp||e<=-fp)&&Er("overflow","BigNumber.from",e),G.from(String(e));const r=e;if(typeof r=="bigint")return G.from(r.toString());if(Tu(r))return G.from(re(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return G.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(pe(n)||n[0]==="-"&&pe(n.substring(1))))return G.from(n)}return xn.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Zs(t){if(typeof t!="string")return Zs(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&xn.throwArgumentError("invalid hex","value",t),t=Zs(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Jt(t){return G.from(Zs(t))}function ve(t){const e=G.from(t).toHexString();return e[0]==="-"?new Xs("-"+e.substring(3),16):new Xs(e.substring(2),16)}function Er(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),xn.throwError(t,O.errors.NUMERIC_FAULT,n)}function LE(t){return new Xs(t,36).toString(16)}function BE(t){return new Xs(t,16).toString(36)}const jE="properties/5.7.0";var DE=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const Ya=new O(jE);function z(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function fr(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function yt(t){return DE(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(o=>({key:n,value:o}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function UE(t,e){(!t||typeof t!="object")&&Ya.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||Ya.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function it(t){const e={};for(const r in t)e[r]=t[r];return e}const FE={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function sy(t){if(t==null||FE[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rnr(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&z(e,r,nr(n))}return e}return Ya.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function nr(t){return zE(t)}class yl{constructor(e){for(const r in e)this[r]=nr(e[r])}}const wl="abi/5.7.0",xe=new O(wl),ji={};let hp={calldata:!0,memory:!0,storage:!0},$E={calldata:!0,memory:!0};function $l(t,e){if(t==="bytes"||t==="string"){if(hp[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&$E[e])return!0;return(hp[e]||e==="payable")&&xe.throwArgumentError("invalid modifier","name",e),!1}function HE(t,e){let r=t;function n(l){xe.throwArgumentError(`unexpected character at position ${l}`,"param",t)}t=t.replace(/\s/g," ");function i(l){let a={type:"",name:"",parent:l,state:{allowType:!0}};return e&&(a.indexed=!1),a}let o={type:"",name:"",state:{allowType:!0}},s=o;for(let l=0;lJSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Se.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Se.full?", ":",")+")"):r+=this.type,e!==Se.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Se.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?kt.fromString(e,r):kt.fromObject(e)}static fromObject(e){return kt.isParamType(e)?e:new kt(ji,{name:e.name||null,type:Yi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(kt.fromObject):null})}static fromString(e,r){function n(i){return kt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(HE(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function el(t,e){return GE(t).map(r=>kt.fromString(r,e))}class Nn{constructor(e,r){e!==ji&&xe.throwError("use a static from method",O.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),ma(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return Nn.isFragment(e)?e:typeof e=="string"?Nn.fromString(e):Nn.fromObject(e)}static fromObject(e){if(Nn.isFragment(e))return e;switch(e.type){case"function":return sn.fromObject(e);case"event":return _n.fromObject(e);case"constructor":return on.fromObject(e);case"error":return ei.fromObject(e);case"fallback":case"receive":return null}return xe.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?_n.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?sn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?on.fromString(e.trim()):e.split(" ")[0]==="error"?ei.fromString(e.substring(5).trim()):xe.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class _n extends Nn{format(e){if(e||(e=Se.sighash),Se[e]||xe.throwArgumentError("invalid format type","format",e),e===Se.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Se.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Se.full?", ":",")+") ",e!==Se.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?_n.fromString(e):_n.fromObject(e)}static fromObject(e){if(_n.isEventFragment(e))return e;e.type!=="event"&&xe.throwArgumentError("invalid event object","value",e);const r={name:tl(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(kt.fromObject):[],type:"event"};return new _n(ji,r)}static fromString(e){let r=e.match(rl);r||xe.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:xe.warn("unknown modifier: "+i)}}),_n.fromObject({name:r[1].trim(),anonymous:n,inputs:el(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function ly(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&xe.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||xe.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=G.from(r[1]),r[0]):t}function ay(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function uy(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&xe.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&xe.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&xe.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&xe.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&xe.throwArgumentError("unable to determine stateMutability","value",t),e}class on extends Nn{format(e){if(e||(e=Se.sighash),Se[e]||xe.throwArgumentError("invalid format type","format",e),e===Se.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===Se.sighash&&xe.throwError("cannot format a constructor for sighash",O.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Se.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?on.fromString(e):on.fromObject(e)}static fromObject(e){if(on.isConstructorFragment(e))return e;e.type!=="constructor"&&xe.throwArgumentError("invalid constructor object","value",e);let r=uy(e);r.constant&&xe.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(kt.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?G.from(e.gas):null};return new on(ji,n)}static fromString(e){let r={type:"constructor"};e=ly(e,r);let n=e.match(rl);return(!n||n[1].trim()!=="constructor")&&xe.throwArgumentError("invalid constructor string","value",e),r.inputs=el(n[2].trim(),!1),ay(n[3].trim(),r),on.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class sn extends on{format(e){if(e||(e=Se.sighash),Se[e]||xe.throwArgumentError("invalid format type","format",e),e===Se.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Se.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Se.full?", ":",")+") ",e!==Se.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?sn.fromString(e):sn.fromObject(e)}static fromObject(e){if(sn.isFunctionFragment(e))return e;e.type!=="function"&&xe.throwArgumentError("invalid function object","value",e);let r=uy(e);const n={type:e.type,name:tl(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(kt.fromObject):[],outputs:e.outputs?e.outputs.map(kt.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?G.from(e.gas):null};return new sn(ji,n)}static fromString(e){let r={type:"function"};e=ly(e,r);let n=e.split(" returns ");n.length>2&&xe.throwArgumentError("invalid function string","value",e);let i=n[0].match(rl);if(i||xe.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&tl(r.name),r.inputs=el(i[2],!1),ay(i[3].trim(),r),n.length>1){let o=n[1].match(rl);(o[1].trim()!=""||o[3].trim()!="")&&xe.throwArgumentError("unexpected tokens","value",e),r.outputs=el(o[2],!1)}else r.outputs=[];return sn.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function pp(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&xe.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class ei extends Nn{format(e){if(e||(e=Se.sighash),Se[e]||xe.throwArgumentError("invalid format type","format",e),e===Se.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Se.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Se.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?ei.fromString(e):ei.fromObject(e)}static fromObject(e){if(ei.isErrorFragment(e))return e;e.type!=="error"&&xe.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:tl(e.name),inputs:e.inputs?e.inputs.map(kt.fromObject):[]};return pp(new ei(ji,r))}static fromString(e){let r={type:"error"},n=e.match(rl);return n||xe.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&tl(r.name),r.inputs=el(n[2],!1),pp(ei.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Yi(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const WE=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function tl(t){return(!t||!t.match(WE))&&xe.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const rl=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function GE(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&_h.throwError("value out-of-bounds",O.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Ut([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class Xa{constructor(e,r,n,i){z(this,"_data",se(e)),z(this,"wordSize",r||32),z(this,"_coerceFunc",n),z(this,"allowLoose",i),this._offset=0}get data(){return re(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):Xa.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:_h.throwError("data out-of-bounds",O.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new Xa(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return G.from(this.readBytes(this.wordSize))}}var cy={exports:{}};/** * [js-sha3]{@link https://github.com/emn178/js-sha3} * * @version 0.8.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT - */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",s=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?i=Fe:o&&(i=self);var l=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,a=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],d=[4,1024,262144,67108864],m=[1,256,65536,16777216],g=[6,1536,393216,100663296],v=[0,8,16,24],x=[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],N=[224,256,384,512],E=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(y){return Object.prototype.toString.call(y)==="[object Array]"}),a&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(y){return typeof y=="object"&&y.buffer&&y.buffer.constructor===ArrayBuffer});for(var T=function(y,j,U){return function(F){return new h(y,j,y).update(F)[U]()}},B=function(y,j,U){return function(F,W){return new h(y,j,W).update(F)[U]()}},D=function(y,j,U){return function(F,W,oe,Y){return f["cshake"+y].update(F,W,oe,Y)[U]()}},$=function(y,j,U){return function(F,W,oe,Y){return f["kmac"+y].update(F,W,oe,Y)[U]()}},H=function(y,j,U,F){for(var W=0;W>5,this.byteCount=this.blockCount<<2,this.outputBlocks=U>>5,this.extraBytes=(U&31)>>3;for(var F=0;F<50;++F)this.s[F]=0}h.prototype.update=function(y){if(this.finalized)throw new Error(r);var j,U=typeof y;if(U!=="string"){if(U==="object"){if(y===null)throw new Error(e);if(a&&y.constructor===ArrayBuffer)y=new Uint8Array(y);else if(!Array.isArray(y)&&(!a||!ArrayBuffer.isView(y)))throw new Error(e)}else throw new Error(e);j=!0}for(var F=this.blocks,W=this.byteCount,oe=y.length,Y=this.blockCount,V=0,Je=this.s,K,le;V>2]|=y[V]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|le&63)<=57344?(F[K>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<=W){for(this.start=K-W,this.block=F[Y],K=0;K>8,U=y&255;U>0;)W.unshift(U),y=y>>8,U=y&255,++F;return j?W.push(F):W.unshift(F),this.update(W),W.length},h.prototype.encodeString=function(y){var j,U=typeof y;if(U!=="string"){if(U==="object"){if(y===null)throw new Error(e);if(a&&y.constructor===ArrayBuffer)y=new Uint8Array(y);else if(!Array.isArray(y)&&(!a||!ArrayBuffer.isView(y)))throw new Error(e)}else throw new Error(e);j=!0}var F=0,W=y.length;if(j)F=W;else for(var oe=0;oe=57344?F+=3:(Y=65536+((Y&1023)<<10|y.charCodeAt(++oe)&1023),F+=4)}return F+=this.encode(F*8),this.update(y),F},h.prototype.bytepad=function(y,j){for(var U=this.encode(j),F=0;F>2]|=this.padding[j&3],this.lastByteIndex===this.byteCount)for(y[0]=y[U],j=1;j>4&15]+u[V&15]+u[V>>12&15]+u[V>>8&15]+u[V>>20&15]+u[V>>16&15]+u[V>>28&15]+u[V>>24&15];oe%y===0&&(Z(j),W=0)}return F&&(V=j[W],Y+=u[V>>4&15]+u[V&15],F>1&&(Y+=u[V>>12&15]+u[V>>8&15]),F>2&&(Y+=u[V>>20&15]+u[V>>16&15])),Y},h.prototype.arrayBuffer=function(){this.finalize();var y=this.blockCount,j=this.s,U=this.outputBlocks,F=this.extraBytes,W=0,oe=0,Y=this.outputBits>>3,V;F?V=new ArrayBuffer(U+1<<2):V=new ArrayBuffer(Y);for(var Je=new Uint32Array(V);oe>8&255,Y[V+2]=Je>>16&255,Y[V+3]=Je>>24&255;oe%y===0&&Z(j)}return F&&(V=oe<<2,Je=j[W],Y[V]=Je&255,F>1&&(Y[V+1]=Je>>8&255),F>2&&(Y[V+2]=Je>>16&255)),Y};function P(y,j,U){h.call(this,y,j,U)}P.prototype=new h,P.prototype.finalize=function(){return this.encode(this.outputBits,!0),h.prototype.finalize.call(this)};var Z=function(y){var j,U,F,W,oe,Y,V,Je,K,le,Qr,Te,Ne,Jr,Pe,ce,wr,fe,Oe,Yr,me,ze,gn,$e,He,Ht,Le,qe,Rr,Ce,We,vn,Be,Ge,yn,je,ne,ot,ge,de,rt,Ae,_e,Ct,Me,De,Kt,Ve,Ke,Qt,Ie,Ue,Er,ke,Ye,bi,Xe,Ze,$n,Hn,qn,Wn,Gn;for(F=0;F<48;F+=2)W=y[0]^y[10]^y[20]^y[30]^y[40],oe=y[1]^y[11]^y[21]^y[31]^y[41],Y=y[2]^y[12]^y[22]^y[32]^y[42],V=y[3]^y[13]^y[23]^y[33]^y[43],Je=y[4]^y[14]^y[24]^y[34]^y[44],K=y[5]^y[15]^y[25]^y[35]^y[45],le=y[6]^y[16]^y[26]^y[36]^y[46],Qr=y[7]^y[17]^y[27]^y[37]^y[47],Te=y[8]^y[18]^y[28]^y[38]^y[48],Ne=y[9]^y[19]^y[29]^y[39]^y[49],j=Te^(Y<<1|V>>>31),U=Ne^(V<<1|Y>>>31),y[0]^=j,y[1]^=U,y[10]^=j,y[11]^=U,y[20]^=j,y[21]^=U,y[30]^=j,y[31]^=U,y[40]^=j,y[41]^=U,j=W^(Je<<1|K>>>31),U=oe^(K<<1|Je>>>31),y[2]^=j,y[3]^=U,y[12]^=j,y[13]^=U,y[22]^=j,y[23]^=U,y[32]^=j,y[33]^=U,y[42]^=j,y[43]^=U,j=Y^(le<<1|Qr>>>31),U=V^(Qr<<1|le>>>31),y[4]^=j,y[5]^=U,y[14]^=j,y[15]^=U,y[24]^=j,y[25]^=U,y[34]^=j,y[35]^=U,y[44]^=j,y[45]^=U,j=Je^(Te<<1|Ne>>>31),U=K^(Ne<<1|Te>>>31),y[6]^=j,y[7]^=U,y[16]^=j,y[17]^=U,y[26]^=j,y[27]^=U,y[36]^=j,y[37]^=U,y[46]^=j,y[47]^=U,j=le^(W<<1|oe>>>31),U=Qr^(oe<<1|W>>>31),y[8]^=j,y[9]^=U,y[18]^=j,y[19]^=U,y[28]^=j,y[29]^=U,y[38]^=j,y[39]^=U,y[48]^=j,y[49]^=U,Jr=y[0],Pe=y[1],De=y[11]<<4|y[10]>>>28,Kt=y[10]<<4|y[11]>>>28,qe=y[20]<<3|y[21]>>>29,Rr=y[21]<<3|y[20]>>>29,Hn=y[31]<<9|y[30]>>>23,qn=y[30]<<9|y[31]>>>23,Ae=y[40]<<18|y[41]>>>14,_e=y[41]<<18|y[40]>>>14,Ge=y[2]<<1|y[3]>>>31,yn=y[3]<<1|y[2]>>>31,ce=y[13]<<12|y[12]>>>20,wr=y[12]<<12|y[13]>>>20,Ve=y[22]<<10|y[23]>>>22,Ke=y[23]<<10|y[22]>>>22,Ce=y[33]<<13|y[32]>>>19,We=y[32]<<13|y[33]>>>19,Wn=y[42]<<2|y[43]>>>30,Gn=y[43]<<2|y[42]>>>30,ke=y[5]<<30|y[4]>>>2,Ye=y[4]<<30|y[5]>>>2,je=y[14]<<6|y[15]>>>26,ne=y[15]<<6|y[14]>>>26,fe=y[25]<<11|y[24]>>>21,Oe=y[24]<<11|y[25]>>>21,Qt=y[34]<<15|y[35]>>>17,Ie=y[35]<<15|y[34]>>>17,vn=y[45]<<29|y[44]>>>3,Be=y[44]<<29|y[45]>>>3,$e=y[6]<<28|y[7]>>>4,He=y[7]<<28|y[6]>>>4,bi=y[17]<<23|y[16]>>>9,Xe=y[16]<<23|y[17]>>>9,ot=y[26]<<25|y[27]>>>7,ge=y[27]<<25|y[26]>>>7,Yr=y[36]<<21|y[37]>>>11,me=y[37]<<21|y[36]>>>11,Ue=y[47]<<24|y[46]>>>8,Er=y[46]<<24|y[47]>>>8,Ct=y[8]<<27|y[9]>>>5,Me=y[9]<<27|y[8]>>>5,Ht=y[18]<<20|y[19]>>>12,Le=y[19]<<20|y[18]>>>12,Ze=y[29]<<7|y[28]>>>25,$n=y[28]<<7|y[29]>>>25,de=y[38]<<8|y[39]>>>24,rt=y[39]<<8|y[38]>>>24,ze=y[48]<<14|y[49]>>>18,gn=y[49]<<14|y[48]>>>18,y[0]=Jr^~ce&fe,y[1]=Pe^~wr&Oe,y[10]=$e^~Ht&qe,y[11]=He^~Le&Rr,y[20]=Ge^~je&ot,y[21]=yn^~ne&ge,y[30]=Ct^~De&Ve,y[31]=Me^~Kt&Ke,y[40]=ke^~bi&Ze,y[41]=Ye^~Xe&$n,y[2]=ce^~fe&Yr,y[3]=wr^~Oe&me,y[12]=Ht^~qe&Ce,y[13]=Le^~Rr&We,y[22]=je^~ot&de,y[23]=ne^~ge&rt,y[32]=De^~Ve&Qt,y[33]=Kt^~Ke&Ie,y[42]=bi^~Ze&Hn,y[43]=Xe^~$n&qn,y[4]=fe^~Yr&ze,y[5]=Oe^~me&gn,y[14]=qe^~Ce&vn,y[15]=Rr^~We&Be,y[24]=ot^~de&Ae,y[25]=ge^~rt&_e,y[34]=Ve^~Qt&Ue,y[35]=Ke^~Ie&Er,y[44]=Ze^~Hn&Wn,y[45]=$n^~qn&Gn,y[6]=Yr^~ze&Jr,y[7]=me^~gn&Pe,y[16]=Ce^~vn&$e,y[17]=We^~Be&He,y[26]=de^~Ae&Ge,y[27]=rt^~_e&yn,y[36]=Qt^~Ue&Ct,y[37]=Ie^~Er&Me,y[46]=Hn^~Wn&ke,y[47]=qn^~Gn&Ye,y[8]=ze^~Jr&ce,y[9]=gn^~Pe&wr,y[18]=vn^~$e&Ht,y[19]=Be^~He&Le,y[28]=Ae^~Ge&je,y[29]=_e^~yn&ne,y[38]=Ue^~Ct&De,y[39]=Er^~Me&Kt,y[48]=Wn^~ke&bi,y[49]=Gn^~Ye&Xe,y[0]^=x[F],y[1]^=x[F+1]};if(l)t.exports=f;else for(A=0;A>=8;return e}function gp(t,e,r){let n=0;for(let i=0;ie+1+n&&tn.throwError("child data too short",O.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function dy(t,e){if(t.length===0&&tn.throwError("data too short",O.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&tn.throwError("data short segment too short",O.errors.BUFFER_OVERRUN,{});const n=gp(t,e+1,r);return e+1+r+n>t.length&&tn.throwError("data long segment too short",O.errors.BUFFER_OVERRUN,{}),vp(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&tn.throwError("data array too short",O.errors.BUFFER_OVERRUN,{}),vp(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&tn.throwError("data array too short",O.errors.BUFFER_OVERRUN,{});const n=gp(t,e+1,r);e+1+r+n>t.length&&tn.throwError("data array too short",O.errors.BUFFER_OVERRUN,{});const i=re(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&tn.throwError("data too short",O.errors.BUFFER_OVERRUN,{});const n=re(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:re(t[e])}}function Sh(t){const e=se(t),r=dy(e,0);return r.consumed!==e.length&&tn.throwArgumentError("invalid rlp data","data",t),r.result}const Yx="address/5.7.0",oi=new O(Yx);function yp(t){pe(t,20)||oi.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=se(ut(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Xx=9007199254740991;function Zx(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const kh={};for(let t=0;t<10;t++)kh[String(t)]=String(t);for(let t=0;t<26;t++)kh[String.fromCharCode(65+t)]=String(10+t);const wp=Math.floor(Zx(Xx));function hy(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>kh[n]).join("");for(;e.length>=wp;){let n=e.substring(0,wp);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function mt(t){let e=null;if(typeof t!="string"&&oi.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=yp(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&oi.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==hy(t)&&oi.throwArgumentError("bad icap checksum","address",t),e=Lx(t.substring(4));e.length<40;)e="0"+e;e=yp("0x"+e)}else oi.throwArgumentError("invalid address","address",t);return e}function eb(t){try{return mt(t),!0}catch{}return!1}function tb(t){let e=Bx(mt(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+hy("XE00"+e)+e}function Nh(t){let e=null;try{e=mt(t.from)}catch{oi.throwArgumentError("missing from address","transaction",t)}const r=Ro(se(G.from(t.nonce).toHexString()));return mt(It(ut(Bu([e,r])),12))}function rb(t,e,r){return On(e)!==32&&oi.throwArgumentError("salt must be 32 bytes","salt",e),On(r)!==32&&oi.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),mt(It(ut(Ut(["0xff",mt(t),e,r])),12))}const nb=Object.freeze(Object.defineProperty({__proto__:null,getAddress:mt,getContractAddress:Nh,getCreate2Address:rb,getIcapAddress:tb,isAddress:eb},Symbol.toStringTag,{value:"Module"}));class ib extends Dn{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=mt(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return mt(pt(e.readValue().toHexString(),20))}}class ob extends Dn{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const co=new O(wl);function py(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let a={};n=e.map(u=>{const c=u.localName;return c||co.throwError("cannot encode object for signature with missing names",O.errors.INVALID_ARGUMENT,{argument:"values",coder:u,value:r}),a[c]&&co.throwError("cannot encode object for signature with duplicate names",O.errors.INVALID_ARGUMENT,{argument:"values",coder:u,value:r}),a[c]=!0,r[c]})}else co.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&co.throwArgumentError("types/value length mismatch","tuple",r);let i=new ld(t.wordSize),o=new ld(t.wordSize),s=[];e.forEach((a,u)=>{let c=n[u];if(a.dynamic){let d=o.length;a.encode(o,c);let m=i.writeUpdatableValue();s.push(g=>{m(g+d)})}else a.encode(i,c)}),s.forEach(a=>{a(i.length)});let l=t.appendWriter(i);return l+=t.appendWriter(o),l}function my(t,e){let r=[],n=t.subReader(0);e.forEach(o=>{let s=null;if(o.dynamic){let l=t.readValue(),a=n.subReader(l.toNumber());try{s=o.decode(a)}catch(u){if(u.code===O.errors.BUFFER_OVERRUN)throw u;s=u,s.baseType=o.name,s.name=o.localName,s.type=o.type}}else try{s=o.decode(t)}catch(l){if(l.code===O.errors.BUFFER_OVERRUN)throw l;s=l,s.baseType=o.name,s.name=o.localName,s.type=o.type}s!=null&&r.push(s)});const i=e.reduce((o,s)=>{const l=s.localName;return l&&(o[l]||(o[l]=0),o[l]++),o},{});e.forEach((o,s)=>{let l=o.localName;if(!l||i[l]!==1||(l==="length"&&(l="_length"),r[l]!=null))return;const a=r[s];a instanceof Error?Object.defineProperty(r,l,{enumerable:!0,get:()=>{throw a}}):r[l]=a});for(let o=0;o{throw s}})}return Object.freeze(r)}class sb extends Dn{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",o=r===-1||e.dynamic;super("array",i,n,o),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&co.throwError("insufficient data length",O.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;s++)o++;return o}return t===ar.OVERRUN?r.length-e-1:0}function wb(t,e,r,n,i){return t===ar.OVERLONG?(n.push(i),0):(n.push(65533),wy(t,e,r))}const Eb=Object.freeze({error:yb,ignore:wy,replace:wb});function Ey(t,e){e==null&&(e=Eb.error),t=se(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let o=null,s=null;if((i&224)===192)o=1,s=127;else if((i&240)===224)o=2,s=2047;else if((i&248)===240)o=3,s=65535;else{(i&192)===128?n+=e(ar.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(ar.BAD_PREFIX,n-1,t,r);continue}if(n-1+o>=t.length){n+=e(ar.OVERRUN,n-1,t,r);continue}let l=i&(1<<8-o-1)-1;for(let a=0;a1114111){n+=e(ar.OUT_OF_RANGE,n-1-o,t,r,l);continue}if(l>=55296&&l<=57343){n+=e(ar.UTF16_SURROGATE,n-1-o,t,r,l);continue}if(l<=s){n+=e(ar.OVERLONG,n-1-o,t,r,l);continue}r.push(l)}}return r}function mr(t,e=nl.current){e!=nl.current&&(yy.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const o=t.charCodeAt(n);if(n>=t.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");const s=65536+((i&1023)<<10)+(o&1023);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return se(r)}function xb(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function El(t,e){return xb(Ey(t,e))}function bb(t,e=nl.current){return Ey(mr(t,e))}class Ab extends gy{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,mr(r))}decode(e){return El(super.decode(e))}}class Hl extends Dn{constructor(e,r){let n=!1;const i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});const o="tuple("+i.join(",")+")";super("tuple",o,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const o=i.localName;return o&&(n[o]||(n[o]=0),n[o]++),n},{});return this.coders.forEach((n,i)=>{let o=n.localName;!o||r[o]!==1||(o==="length"&&(o="_length"),e[o]==null&&(e[o]=e[i]))}),Object.freeze(e)}encode(e,r){return py(e,this.coders,r)}decode(e){return e.coerce(this.name,my(e,this.coders))}}const ql=new O(wl),_b=new RegExp(/^bytes([0-9]*)$/),Sb=new RegExp(/^(u?int)([0-9]*)$/);class kb{constructor(e){z(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new ib(e.name);case"bool":return new lb(e.name);case"string":return new Ab(e.name);case"bytes":return new ab(e.name);case"array":return new sb(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Hl((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new cb(e.name)}let r=e.type.match(Sb);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&ql.throwArgumentError("invalid "+r[1]+" bit length","param",e),new gb(n/8,r[1]==="int",e.name)}if(r=e.type.match(_b),r){let n=parseInt(r[1]);return(n===0||n>32)&&ql.throwArgumentError("invalid bytes length","param",e),new ub(n,e.name)}return ql.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new Xa(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new ld(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(kt.from(i)));return new Hl(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&ql.throwError("types/values length mismatch",O.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(s=>this._getCoder(kt.from(s))),i=new Hl(n,"_"),o=this._getWriter();return i.encode(o,r),o.data}decode(e,r,n){const i=e.map(s=>this._getCoder(kt.from(s)));return new Hl(i,"_").decode(this._getReader(se(r),n))}}const Nb=new kb;function fo(t){return ut(mr(t))}const xy="hash/5.7.0";function by(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(l)?i(l,s-1):r.push(l)})};return i(t,e),r}function Pb(t){const e={};for(let r=0;r>--a&1}const d=31,m=Math.pow(2,d),g=m>>>1,v=g>>1,x=m-1;let N=0;for(let B=0;B1;){let J=D+$>>>1;B>>1|c(),H=H<<1^g,Q=(Q^g)<<1|g|1;w=H,b=1+Q-H}let T=n-4;return E.map(B=>{switch(B-T){case 3:return T+65792+(t[l++]<<16|t[l++]<<8|t[l++]);case 2:return T+256+(t[l++]<<8|t[l++]);case 1:return T+t[l++];default:return B-1}})}function Mb(t){let e=0;return()=>t[e++]}function Ib(t){return Mb(Cb(t))}function Rb(t){return t&1?~t>>1:t>>1}function Tb(t,e){let r=Array(t);for(let n=0;ne[s]):r}function Lb(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(jb(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Db(r,t))}return Pb(_y(e))}function Bb(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function Sy(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[s].push(o));return n}function jb(t,e){let r=1+e(),n=e(),i=Bb(e),o=Sy(i.length,1+t,e);return _y(o.map((s,l)=>{const a=s[0],u=s.slice(1);return Array(i[l]).fill(void 0).map((c,d)=>{let m=d*n;return[a+d*r,u.map(g=>g+m)]})}))}function Db(t,e){let r=1+e();return Sy(r,1+t,e).map(i=>[i[0],i.slice(1)])}function Ub(t){let e=Za(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let u=Za(t,e);if(u.length==0)break;n.push({set:new Set(u),node:r()})}n.sort((u,c)=>c.set.size-u.set.size);let i=t(),o=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let l=i==1,a=i==2;return{branches:n,valid:o,fe0f:s,save:l,check:a}}}function Fb(){return Ib(by("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const ju=Fb(),zb=new Set(Za(ju)),$b=new Set(Za(ju)),Hb=Lb(ju),qb=Ub(ju),xp=45,bp=95;function ky(t){return bb(t)}function Wb(t){return t.filter(e=>e!=65039)}function Ny(t){for(let e of t.split(".")){let r=ky(e);try{for(let n=r.lastIndexOf(bp)-1;n>=0;n--)if(r[n]!==bp)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===xp&&r[3]===xp)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function Gb(t){return Ny(Vb(t,Wb))}function Vb(t,e){let r=ky(t).reverse(),n=[];for(;r.length;){let i=Qb(r);if(i){n.push(...e(i));continue}let o=r.pop();if(zb.has(o)){n.push(o);continue}if($b.has(o))continue;let s=Hb[o];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${o.toString(16).toUpperCase()}`)}return Ny(Kb(String.fromCodePoint(...n)))}function Kb(t){return t.normalize("NFC")}function Qb(t,e){var r;let n=qb,i,o,s=[],l=t.length;for(e&&(e.length=0);l;){let a=t[--l];if(n=(r=n.branches.find(u=>u.set.has(a)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)o=a;else if(n.check&&a===o)break;s.push(a),n.fe0f&&(s.push(65039),l>0&&t[l-1]==65039&&l--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(l).reverse()),t.length=l)}return i}const Jb=new O(xy),Py=new Uint8Array(32);Py.fill(0);function Ap(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function Cy(t){const e=mr(Gb(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(Ap(e.slice(n))),r}function ga(t){typeof t!="string"&&Jb.throwArgumentError("invalid ENS name; not a string","name",t);let e=Py;const r=Cy(t);for(;r.length;)e=ut(Ut([e,ut(r.pop())]));return re(e)}function Yb(t){return re(Ut(Cy(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}var Xb=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const lt=new O(xy),My=new Uint8Array(32);My.fill(0);const Zb=G.from(-1),Iy=G.from(0),Ry=G.from(1),eA=G.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function tA(t){const e=se(t),r=e.length%32;return r?Xt([e,My.slice(r)]):re(e)}const rA=pt(Ry.toHexString(),32),nA=pt(Iy.toHexString(),32),_p={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},$c=["name","version","chainId","verifyingContract","salt"];function Sp(t){return function(e){return typeof e!="string"&<.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const iA={name:Sp("name"),version:Sp("version"),chainId:function(t){try{return G.from(t).toString()}catch{}return lt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return mt(t).toLowerCase()}catch{}return lt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=se(t);if(e.length!==32)throw new Error("bad length");return re(e)}catch{}return lt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Hc(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&<.throwArgumentError("invalid numeric width","type",t);const i=eA.mask(r?n-1:n),o=r?i.add(Ry).mul(Zb):Iy;return function(s){const l=G.from(s);return(l.lt(o)||l.gt(i))&<.throwArgumentError(`value out-of-bounds for ${t}`,"value",s),pt(l.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&<.throwArgumentError("invalid bytes width","type",t),function(n){return se(n).length!==r&<.throwArgumentError(`invalid length for ${t}`,"value",n),tA(n)}}}switch(t){case"address":return function(e){return pt(mt(e),32)};case"bool":return function(e){return e?rA:nA};case"bytes":return function(e){return ut(e)};case"string":return function(e){return fo(e)}}return null}function kp(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class sr{constructor(e){z(this,"types",Object.freeze(nr(e))),z(this,"_encoderCache",{}),z(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(l=>{r[l]={},n[l]=[],i[l]={}});for(const l in e){const a={};e[l].forEach(u=>{a[u.name]&<.throwArgumentError(`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(l)}`,"types",e),a[u.name]=!0;const c=u.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===l&<.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!Hc(c)&&(n[c]||lt.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(l),r[l][c]=!0)})}const o=Object.keys(n).filter(l=>n[l].length===0);o.length===0?lt.throwArgumentError("missing primary type","types",e):o.length>1&<.throwArgumentError(`ambiguous primary types or unused types: ${o.map(l=>JSON.stringify(l)).join(", ")}`,"types",e),z(this,"primaryType",o[0]);function s(l,a){a[l]&<.throwArgumentError(`circular type reference to ${JSON.stringify(l)}`,"types",e),a[l]=!0,Object.keys(r[l]).forEach(u=>{n[u]&&(s(u,a),Object.keys(a).forEach(c=>{i[c][u]=!0}))}),delete a[l]}s(this.primaryType,{});for(const l in i){const a=Object.keys(i[l]);a.sort(),this._types[l]=kp(l,e[l])+a.map(u=>kp(u,e[u])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=Hc(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],o=this.getEncoder(i),s=parseInt(r[3]);return l=>{s>=0&&l.length!==s&<.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",l);let a=l.map(o);return this._types[i]&&(a=a.map(ut)),ut(Xt(a))}}const n=this.types[e];if(n){const i=fo(this._types[e]);return o=>{const s=n.map(({name:l,type:a})=>{const u=this.getEncoder(a)(o[l]);return this._types[a]?ut(u):u});return s.unshift(i),Xt(s)}}return lt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||lt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return ut(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(Hc(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const s=i[1],l=parseInt(i[3]);return l>=0&&r.length!==l&<.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(a=>this._visit(s,a,n))}const o=this.types[e];return o?o.reduce((s,{name:l,type:a})=>(s[l]=this._visit(a,r[l],n),s),{}):lt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new sr(e)}static getPrimaryType(e){return sr.from(e).primaryType}static hashStruct(e,r,n){return sr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=_p[n];i||lt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>$c.indexOf(n.name)-$c.indexOf(i.name)),sr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Xt(["0x1901",sr.hashDomain(e),sr.from(r).hash(n)])}static hash(e,r,n){return ut(sr.encode(e,r,n))}static resolveNames(e,r,n,i){return Xb(this,void 0,void 0,function*(){e=it(e);const o={};e.verifyingContract&&!pe(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=sr.from(r);s.visit(n,(l,a)=>(l==="address"&&!pe(a,20)&&(o[a]="0x"),a));for(const l in o)o[l]=yield i(l);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),n=s.visit(n,(l,a)=>l==="address"&&o[a]?o[a]:a),{domain:e,value:n}})}static getPayload(e,r,n){sr.hashDomain(e);const i={},o=[];$c.forEach(a=>{const u=e[a];u!=null&&(i[a]=iA[a](u),o.push({name:a,type:_p[a]}))});const s=sr.from(r),l=it(r);return l.EIP712Domain?lt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):l.EIP712Domain=o,s.encode(n),{types:l,domain:i,primaryType:s.primaryType,message:s.visit(n,(a,u)=>{if(a.match(/^bytes(\d*)/))return re(se(u));if(a.match(/^u?int/))return G.from(u).toString();switch(a){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return typeof u!="string"&<.throwArgumentError("invalid string","value",u),u}return lt.throwArgumentError("unsupported type","type",a)})}}}const st=new O(wl);class oA extends yl{}class sA extends yl{}class lA extends yl{}class ad extends yl{static isIndexed(e){return!!(e&&e._isIndexed)}}const aA={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Np(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class ud{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,z(this,"fragments",r.map(n=>Nn.from(n)).filter(n=>n!=null)),z(this,"_abiCoder",fr(new.target,"getAbiCoder")()),z(this,"functions",{}),z(this,"errors",{}),z(this,"events",{}),z(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){st.warn("duplicate definition - constructor");return}z(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let o=n.format();if(i[o]){st.warn("duplicate definition - "+o);return}i[o]=n}),this.deploy||z(this,"deploy",on.from({payable:!1,type:"constructor"})),z(this,"_isInterface",!0)}format(e){e||(e=Se.full),e===Se.sighash&&st.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Se.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Nb}static getAddress(e){return mt(e)}static getSighash(e){return It(fo(e.format()),0,4)}static getEventTopic(e){return fo(e.format())}getFunction(e){if(pe(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];st.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(o=>o.split("(")[0]===n);return i.length===0?st.throwArgumentError("no matching function","name",n):i.length>1&&st.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[sn.fromString(e).format()];return r||st.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(pe(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];st.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(o=>o.split("(")[0]===n);return i.length===0?st.throwArgumentError("no matching event","name",n):i.length>1&&st.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[_n.fromString(e).format()];return r||st.throwArgumentError("no matching event","signature",e),r}getError(e){if(pe(e)){const n=fr(this.constructor,"getSighash");for(const i in this.errors){const o=this.errors[i];if(e===n(o))return this.errors[i]}st.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(o=>o.split("(")[0]===n);return i.length===0?st.throwArgumentError("no matching error","name",n):i.length>1&&st.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[sn.fromString(e).format()];return r||st.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return fr(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),fr(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=se(r);return re(n.slice(0,4))!==this.getSighash(e)&&st.throwArgumentError(`data signature does not match error ${e.name}.`,"data",re(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),re(Ut([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=se(r);return re(n.slice(0,4))!==this.getSighash(e)&&st.throwArgumentError(`data signature does not match function ${e.name}.`,"data",re(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),re(Ut([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=se(r),i=null,o="",s=null,l=null,a=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const u=re(n.slice(0,4)),c=aA[u];if(c)s=this._abiCoder.decode(c.inputs,n.slice(4)),l=c.name,a=c.signature,c.reason&&(i=s[0]),l==="Error"?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:l==="Panic"&&(o=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{const d=this.getError(u);s=this._abiCoder.decode(d.inputs,n.slice(4)),l=d.name,a=d.format()}catch{}break}}return st.throwError("call revert exception"+o,O.errors.CALL_EXCEPTION,{method:e.format(),data:re(r),errorArgs:s,errorName:l,errorSignature:a,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),re(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&st.throwError("too many arguments for "+e.format(),O.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(o,s)=>o.type==="string"?fo(s):o.type==="bytes"?ut(re(s)):(o.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),o.type.match(/^u?int/)&&(s=G.from(s).toHexString()),o.type==="address"&&this._abiCoder.encode(["address"],[s]),pt(re(s),32));for(r.forEach((o,s)=>{let l=e.inputs[s];if(!l.indexed){o!=null&&st.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+l.name,o);return}o==null?n.push(null):l.baseType==="array"||l.baseType==="tuple"?st.throwArgumentError("filtering with tuples or arrays not supported","contract."+l.name,o):Array.isArray(o)?n.push(o.map(a=>i(l,a))):n.push(i(l,o))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&st.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((s,l)=>{const a=r[l];if(s.indexed)if(s.type==="string")n.push(fo(a));else if(s.type==="bytes")n.push(ut(a));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[a]))}else i.push(s),o.push(a)}),{data:this._abiCoder.encode(i,o),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let m=this.getEventTopic(e);(!pe(n[0],32)||n[0].toLowerCase()!==m)&&st.throwError("fragment/topic mismatch",O.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:m,value:n[0]}),n=n.slice(1)}let i=[],o=[],s=[];e.inputs.forEach((m,g)=>{m.indexed?m.type==="string"||m.type==="bytes"||m.baseType==="tuple"||m.baseType==="array"?(i.push(kt.fromObject({type:"bytes32",name:m.name})),s.push(!0)):(i.push(m),s.push(!1)):(o.push(m),s.push(!1))});let l=n!=null?this._abiCoder.decode(i,Ut(n)):null,a=this._abiCoder.decode(o,r,!0),u=[],c=0,d=0;e.inputs.forEach((m,g)=>{if(m.indexed)if(l==null)u[g]=new ad({_isIndexed:!0,hash:null});else if(s[g])u[g]=new ad({_isIndexed:!0,hash:l[d++]});else try{u[g]=l[d++]}catch(v){u[g]=v}else try{u[g]=a[c++]}catch(v){u[g]=v}if(m.name&&u[m.name]==null){const v=u[g];v instanceof Error?Object.defineProperty(u,m.name,{enumerable:!0,get:()=>{throw Np(`property ${JSON.stringify(m.name)}`,v)}}):u[m.name]=v}});for(let m=0;m{throw Np(`index ${m}`,g)}})}return Object.freeze(u)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new sA({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:G.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new oA({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=re(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new lA({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const uA="abstract-provider/5.7.0";var cA=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const fA=new O(uA);class dA extends yl{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class qo{constructor(){fA.checkAbstract(new.target,qo),z(this,"_isProvider",!0)}getFeeData(){return cA(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield yt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)});let n=null,i=null,o=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,o=G.from("1500000000"),i=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const hA="abstract-signer/5.7.0";var Or=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const br=new O(hA),pA=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],mA=[O.errors.INSUFFICIENT_FUNDS,O.errors.NONCE_EXPIRED,O.errors.REPLACEMENT_UNDERPRICED];class xl{constructor(){br.checkAbstract(new.target,xl),z(this,"_isSigner",!0)}getBalance(e){return Or(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Or(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Or(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield yt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Or(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield yt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Or(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return Or(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Or(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Or(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Or(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)pA.indexOf(n)===-1&&br.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=it(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&br.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Or(this,void 0,void 0,function*(){const r=yield yt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Or(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&br.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?br.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&br.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const o=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=o,r.maxPriorityFeePerGas=o}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&br.throwError("network does not support EIP-1559",O.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):br.throwError("failed to get consistent fee data",O.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(mA.indexOf(i.code)>=0)throw i;return br.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&br.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield yt(r)})}_checkProvider(e){this.provider||br.throwError("missing provider",O.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class Ph extends xl{constructor(e,r){super(),z(this,"address",e),z(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{br.throwError(e,O.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new Ph(this.address,e)}}var Ty={},we={},bl=Oy;function Oy(t,e){if(!t)throw new Error(e||"Assertion failed")}Oy.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var cd={exports:{}};typeof Object.create=="function"?cd.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:cd.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var gA=cd.exports,vA=bl,yA=gA;we.inherits=yA;function wA(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function EA(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=o&63|128):wA(t,i)?(o=65536+((o&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=o&63|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=o&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}we.htonl=Ly;function bA(t,e){for(var r="",n=0;n>>0}return o}we.join32=AA;function _A(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=o&255):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=o&255)}return r}we.split32=_A;function SA(t,e){return t>>>e|t<<32-e}we.rotr32=SA;function kA(t,e){return t<>>32-e}we.rotl32=kA;function NA(t,e){return t+e>>>0}we.sum32=NA;function PA(t,e,r){return t+e+r>>>0}we.sum32_3=PA;function CA(t,e,r,n){return t+e+r+n>>>0}we.sum32_4=CA;function MA(t,e,r,n,i){return t+e+r+n+i>>>0}we.sum32_5=MA;function IA(t,e,r,n){var i=t[e],o=t[e+1],s=n+o>>>0,l=(s>>0,t[e+1]=s}we.sum64=IA;function RA(t,e,r,n){var i=e+n>>>0,o=(i>>0}we.sum64_hi=RA;function TA(t,e,r,n){var i=e+n;return i>>>0}we.sum64_lo=TA;function OA(t,e,r,n,i,o,s,l){var a=0,u=e;u=u+n>>>0,a+=u>>0,a+=u>>0,a+=u>>0}we.sum64_4_hi=OA;function LA(t,e,r,n,i,o,s,l){var a=e+n+o+l;return a>>>0}we.sum64_4_lo=LA;function BA(t,e,r,n,i,o,s,l,a,u){var c=0,d=e;d=d+n>>>0,c+=d>>0,c+=d>>0,c+=d>>0,c+=d>>0}we.sum64_5_hi=BA;function jA(t,e,r,n,i,o,s,l,a,u){var c=e+n+o+l+u;return c>>>0}we.sum64_5_lo=jA;function DA(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}we.rotr64_hi=DA;function UA(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}we.rotr64_lo=UA;function FA(t,e,r){return t>>>r}we.shr64_hi=FA;function zA(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}we.shr64_lo=zA;var Wo={},Pp=we,$A=bl;function Du(){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}Wo.BlockHash=Du;Du.prototype.update=function(e,r){if(e=Pp.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Pp.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=e&255}else for(i[o++]=e&255,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,s=8;s>>3}mn.g0_256=VA;function KA(t){return un(t,17)^un(t,19)^t>>>10}mn.g1_256=KA;var To=we,QA=Wo,JA=mn,qc=To.rotl32,is=To.sum32,YA=To.sum32_5,XA=JA.ft_1,zy=QA.BlockHash,ZA=[1518500249,1859775393,2400959708,3395469782];function dn(){if(!(this instanceof dn))return new dn;zy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}To.inherits(dn,zy);var e_=dn;dn.blockSize=512;dn.outSize=160;dn.hmacStrength=80;dn.padLength=64;dn.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),z_(e.length<=this.blockSize);for(var r=e.length;r>8,m=c&255;d?a.push(d,m):a.push(m)}return a}r.toArray=n;function i(s){return s.length===1?"0"+s:s}r.zero2=i;function o(s){for(var l="",a=0;a(m>>1)-1?x=(m>>1)-N:x=N,g.isubn(x)):x=0,d[v]=x,g.iushrn(1)}return d}r.getNAF=n;function i(a,u){var c=[[],[]];a=a.clone(),u=u.clone();for(var d=0,m=0,g;a.cmpn(-d)>0||u.cmpn(-m)>0;){var v=a.andln(3)+d&3,x=u.andln(3)+m&3;v===3&&(v=-1),x===3&&(x=-1);var N;v&1?(g=a.andln(7)+d&7,(g===3||g===5)&&x===2?N=-v:N=v):N=0,c[0].push(N);var E;x&1?(g=u.andln(7)+m&7,(g===3||g===5)&&v===2?E=-x:E=x):E=0,c[1].push(E),2*d===N+1&&(d=1-d),2*m===E+1&&(m=1-m),a.iushrn(1),u.iushrn(1)}return c}r.getJSF=i;function o(a,u,c){var d="_"+u;a.prototype[u]=function(){return this[d]!==void 0?this[d]:this[d]=c.call(this)}}r.cachedProperty=o;function s(a){return typeof a=="string"?r.toArray(a,"hex"):a}r.parseBytes=s;function l(a){return new ue(a,"hex","le")}r.intFromLE=l}),eu=yr.getNAF,q_=yr.getJSF,tu=yr.assert;function xi(t,e){this.type=t,this.p=new ue(e.p,16),this.red=e.prime?ue.red(e.prime):ue.mont(this.p),this.zero=new ue(0).toRed(this.red),this.one=new ue(1).toRed(this.red),this.two=new ue(2).toRed(this.red),this.n=e.n&&new ue(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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 Hi=xi;xi.prototype.point=function(){throw new Error("Not implemented")};xi.prototype.validate=function(){throw new Error("Not implemented")};xi.prototype._fixedNafMul=function(e,r){tu(e.precomputed);var n=e._getDoubles(),i=eu(r,1,this._bitLength),o=(1<=l;u--)a=(a<<1)+i[u];s.push(a)}for(var c=this.jpoint(null,null,null),d=this.jpoint(null,null,null),m=o;m>0;m--){for(l=0;l=0;a--){for(var u=0;a>=0&&s[a]===0;a--)u++;if(a>=0&&u++,l=l.dblp(u),a<0)break;var c=s[a];tu(c!==0),e.type==="affine"?c>0?l=l.mixedAdd(o[c-1>>1]):l=l.mixedAdd(o[-c-1>>1].neg()):c>0?l=l.add(o[c-1>>1]):l=l.add(o[-c-1>>1].neg())}return e.type==="affine"?l.toP():l};xi.prototype._wnafMulAdd=function(e,r,n,i,o){var s=this._wnafT1,l=this._wnafT2,a=this._wnafT3,u=0,c,d,m;for(c=0;c=1;c-=2){var v=c-1,x=c;if(s[v]!==1||s[x]!==1){a[v]=eu(n[v],s[v],this._bitLength),a[x]=eu(n[x],s[x],this._bitLength),u=Math.max(a[v].length,u),u=Math.max(a[x].length,u);continue}var N=[r[v],null,null,r[x]];r[v].y.cmp(r[x].y)===0?(N[1]=r[v].add(r[x]),N[2]=r[v].toJ().mixedAdd(r[x].neg())):r[v].y.cmp(r[x].y.redNeg())===0?(N[1]=r[v].toJ().mixedAdd(r[x]),N[2]=r[v].add(r[x].neg())):(N[1]=r[v].toJ().mixedAdd(r[x]),N[2]=r[v].toJ().mixedAdd(r[x].neg()));var E=[-3,-1,-5,-7,0,7,5,1,3],w=q_(n[v],n[x]);for(u=Math.max(w[0].length,u),a[v]=new Array(u),a[x]=new Array(u),d=0;d=0;c--){for(var $=0;c>=0;){var H=!0;for(d=0;d=0&&$++,B=B.dblp($),c<0)break;for(d=0;d0?m=l[d][Q-1>>1]:Q<0&&(m=l[d][-Q-1>>1].neg()),m.type==="affine"?B=B.mixedAdd(m):B=B.add(m))}}for(c=0;c=Math.ceil((e.bitLength()+1)/r.step):!1};Mr.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o=0&&(g=u,v=c),d.negative&&(d=d.neg(),m=m.neg()),g.negative&&(g=g.neg(),v=v.neg()),[{a:d,b:m},{a:g,b:v}]};Ir.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],o=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),l=o.mul(n.a),a=s.mul(i.a),u=o.mul(n.b),c=s.mul(i.b),d=e.sub(l).sub(a),m=u.add(c).neg();return{k1:d,k2:m}};Ir.prototype.pointFromX=function(e,r){e=new ue(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return(r&&!o||!r&&o)&&(i=i.redNeg()),this.point(e,i)};Ir.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),o=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};Ir.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,s=0;s":""};Pt.prototype.isInfinity=function(){return this.inf};Pt.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(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Pt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),l=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,l)};Pt.prototype.getX=function(){return this.x.fromRed()};Pt.prototype.getY=function(){return this.y.fromRed()};Pt.prototype.mul=function(e){return e=new ue(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)};Pt.prototype.mulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};Pt.prototype.jmulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};Pt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Pt.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(o){return o.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};Pt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Ot(t,e,r,n){Hi.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ue(0)):(this.x=new ue(e,16),this.y=new ue(r,16),this.z=new ue(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}Mh(Ot,Hi.BasePoint);Ir.prototype.jpoint=function(e,r,n){return new Ot(this,e,r,n)};Ot.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};Ot.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Ot.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),o=e.x.redMul(n),s=this.y.redMul(r.redMul(e.z)),l=e.y.redMul(n.redMul(this.z)),a=i.redSub(o),u=s.redSub(l);if(a.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),d=c.redMul(a),m=i.redMul(c),g=u.redSqr().redIAdd(d).redISub(m).redISub(m),v=u.redMul(m.redISub(g)).redISub(s.redMul(d)),x=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(g,v,x)};Ot.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),o=this.y,s=e.y.redMul(r).redMul(this.z),l=n.redSub(i),a=o.redSub(s);if(l.cmpn(0)===0)return a.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=l.redSqr(),c=u.redMul(l),d=n.redMul(u),m=a.redSqr().redIAdd(c).redISub(d).redISub(d),g=a.redMul(d.redISub(m)).redISub(o.redMul(c)),v=this.z.redMul(l);return this.curve.jpoint(m,g,v)};Ot.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(o),this.x.cmp(n)===0)return!0}};Ot.prototype.inspect=function(){return this.isInfinity()?"":""};Ot.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var va=Ko(function(t,e){var r=e;r.base=Hi,r.short=G_,r.mont=null,r.edwards=null}),ya=Ko(function(t,e){var r=e,n=yr.assert;function i(l){l.type==="short"?this.curve=new va.short(l):l.type==="edwards"?this.curve=new va.edwards(l):this.curve=new va.mont(l),this.g=this.curve.g,this.n=this.curve.n,this.hash=l.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function o(l,a){Object.defineProperty(r,l,{configurable:!0,enumerable:!0,get:function(){var u=new i(a);return Object.defineProperty(r,l,{configurable:!0,enumerable:!0,value:u}),u}})}o("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:en.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("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:en.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("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:en.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("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:en.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"]}),o("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:en.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"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:en.sha256,gRed:!1,g:["9"]}),o("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:en.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}o("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:en.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function gi(t){if(!(this instanceof gi))return new gi(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Hr.toArray(t.entropy,t.entropyEnc||"hex"),r=Hr.toArray(t.nonce,t.nonceEnc||"hex"),n=Hr.toArray(t.pers,t.persEnc||"hex");Ch(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var Zy=gi;gi.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};gi.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Hr.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length"};var V_=yr.assert;function Uu(t,e){if(t instanceof Uu)return t;this._importDER(t,e)||(V_(t.r&&t.s,"Signature without r or s"),this.r=new ue(t.r,16),this.s=new ue(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Fu=Uu;function K_(){this.place=0}function Vc(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return i<=127?!1:(e.place=s,i)}function Rp(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Uu.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=Rp(r),n=Rp(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Kc(i,r.length),i=i.concat(r),i.push(2),Kc(i,n.length);var o=i.concat(n),s=[48];return Kc(s,o.length),s=s.concat(o),yr.encode(s,e)};var Q_=function(){throw new Error("unsupported")},e1=yr.assert;function Cr(t){if(!(this instanceof Cr))return new Cr(t);typeof t=="string"&&(e1(Object.prototype.hasOwnProperty.call(ya,t),"Unknown curve "+t),t=ya[t]),t instanceof ya.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var J_=Cr;Cr.prototype.keyPair=function(e){return new Ih(this,e)};Cr.prototype.keyFromPrivate=function(e,r){return Ih.fromPrivate(this,e,r)};Cr.prototype.keyFromPublic=function(e,r){return Ih.fromPublic(this,e,r)};Cr.prototype.genKeyPair=function(e){e||(e={});for(var r=new Zy({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Q_(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new ue(2));;){var o=new ue(r.generate(n));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}};Cr.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Cr.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new ue(e,16));for(var o=this.n.byteLength(),s=r.getPrivate().toArray("be",o),l=e.toArray("be",o),a=new Zy({hash:this.hash,entropy:s,nonce:l,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new ue(1)),c=0;;c++){var d=i.k?i.k(c):new ue(a.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(u)>=0)){var m=this.g.mul(d);if(!m.isInfinity()){var g=m.getX(),v=g.umod(this.n);if(v.cmpn(0)!==0){var x=d.invm(this.n).mul(v.mul(r.getPrivate()).iadd(e));if(x=x.umod(this.n),x.cmpn(0)!==0){var N=(m.getY().isOdd()?1:0)|(g.cmp(v)!==0?2:0);return i.canonical&&x.cmp(this.nh)>0&&(x=this.n.sub(x),N^=1),new Fu({r:v,s:x,recoveryParam:N})}}}}}};Cr.prototype.verify=function(e,r,n,i){e=this._truncateToN(new ue(e,16)),n=this.keyFromPublic(n,i),r=new Fu(r,"hex");var o=r.r,s=r.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var l=s.invm(this.n),a=l.mul(e).umod(this.n),u=l.mul(o).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(a,n.getPublic(),u),c.isInfinity()?!1:c.eqXToP(o)):(c=this.g.mulAdd(a,n.getPublic(),u),c.isInfinity()?!1:c.getX().umod(this.n).cmp(o)===0)};Cr.prototype.recoverPubKey=function(t,e,r,n){e1((3&r)===r,"The recovery param is more than two bits"),e=new Fu(e,n);var i=this.n,o=new ue(t),s=e.r,l=e.s,a=r&1,u=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");u?s=this.curve.pointFromX(s.add(this.curve.n),a):s=this.curve.pointFromX(s,a);var c=e.r.invm(i),d=i.sub(o).mul(c).umod(i),m=l.mul(c).umod(i);return this.g.mulAdd(d,s,m)};Cr.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Fu(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch{continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var Y_=Ko(function(t,e){var r=e;r.version="6.5.4",r.utils=yr,r.rand=function(){throw new Error("unsupported")},r.curve=va,r.curves=ya,r.ec=J_,r.eddsa=null}),X_=Y_.ec;const Z_="signing-key/5.7.0",pd=new O(Z_);let Qc=null;function rn(){return Qc||(Qc=new X_("secp256k1")),Qc}class e3{constructor(e){z(this,"curve","secp256k1"),z(this,"privateKey",re(e)),On(this.privateKey)!==32&&pd.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=rn().keyFromPrivate(se(this.privateKey));z(this,"publicKey","0x"+r.getPublic(!1,"hex")),z(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),z(this,"_isSigningKey",!0)}_addPoint(e){const r=rn().keyFromPublic(se(this.publicKey)),n=rn().keyFromPublic(se(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=rn().keyFromPrivate(se(this.privateKey)),n=se(e);n.length!==32&&pd.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return Lu({recoveryParam:i.recoveryParam,r:pt("0x"+i.r.toString(16),32),s:pt("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=rn().keyFromPrivate(se(this.privateKey)),n=rn().keyFromPublic(se(t1(e)));return pt("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function t3(t,e){const r=Lu(e),n={r:se(r.r),s:se(r.s)};return"0x"+rn().recoverPubKey(se(t),n,r.recoveryParam).encode("hex",!1)}function t1(t,e){const r=se(t);if(r.length===32){const n=new e3(r);return e?"0x"+rn().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?re(r):"0x"+rn().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+rn().keyFromPublic(r).getPublic(!0,"hex"):re(r)}return pd.throwArgumentError("invalid public or private key","key","[REDACTED]")}const r3="transactions/5.7.0",Un=new O(r3);var Tp;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(Tp||(Tp={}));function Rh(t){return t==="0x"?null:mt(t)}function Dt(t){return t==="0x"?vy:G.from(t)}function n3(t){const e=t1(t);return mt(It(ut(It(e,1)),12))}function r1(t,e){return n3(t3(se(t),e))}function ur(t,e){const r=Ro(G.from(t).toHexString());return r.length>32&&Un.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function Jc(t,e){return{address:mt(t),storageKeys:(e||[]).map((r,n)=>(On(r)!==32&&Un.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function qi(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Un.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),Jc(r[0],r[1])):Jc(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,o)=>(i[o]=!0,i),{});return Jc(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function n1(t){return qi(t).map(e=>[e.address,e.storageKeys])}function i3(t,e){if(t.gasPrice!=null){const n=G.from(t.gasPrice),i=G.from(t.maxFeePerGas||0);n.eq(i)||Un.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[ur(t.chainId||0,"chainId"),ur(t.nonce||0,"nonce"),ur(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),ur(t.maxFeePerGas||0,"maxFeePerGas"),ur(t.gasLimit||0,"gasLimit"),t.to!=null?mt(t.to):"0x",ur(t.value||0,"value"),t.data||"0x",n1(t.accessList||[])];if(e){const n=Lu(e);r.push(ur(n.recoveryParam,"recoveryParam")),r.push(Ro(n.r)),r.push(Ro(n.s))}return Xt(["0x02",Bu(r)])}function o3(t,e){const r=[ur(t.chainId||0,"chainId"),ur(t.nonce||0,"nonce"),ur(t.gasPrice||0,"gasPrice"),ur(t.gasLimit||0,"gasLimit"),t.to!=null?mt(t.to):"0x",ur(t.value||0,"value"),t.data||"0x",n1(t.accessList||[])];if(e){const n=Lu(e);r.push(ur(n.recoveryParam,"recoveryParam")),r.push(Ro(n.r)),r.push(Ro(n.s))}return Xt(["0x01",Bu(r)])}function i1(t,e,r){try{const n=Dt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Un.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=pt(e[1],32),t.s=pt(e[2],32);try{const n=ut(r(t));t.from=r1(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function s3(t){const e=Sh(t.slice(1));e.length!==9&&e.length!==12&&Un.throwArgumentError("invalid component count for transaction type: 2","payload",re(t));const r=Dt(e[2]),n=Dt(e[3]),i={type:2,chainId:Dt(e[0]).toNumber(),nonce:Dt(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Dt(e[4]),to:Rh(e[5]),value:Dt(e[6]),data:e[7],accessList:qi(e[8])};return e.length===9||(i.hash=ut(t),i1(i,e.slice(9),i3)),i}function l3(t){const e=Sh(t.slice(1));e.length!==8&&e.length!==11&&Un.throwArgumentError("invalid component count for transaction type: 1","payload",re(t));const r={type:1,chainId:Dt(e[0]).toNumber(),nonce:Dt(e[1]).toNumber(),gasPrice:Dt(e[2]),gasLimit:Dt(e[3]),to:Rh(e[4]),value:Dt(e[5]),data:e[6],accessList:qi(e[7])};return e.length===8||(r.hash=ut(t),i1(r,e.slice(8),o3)),r}function a3(t){const e=Sh(t);e.length!==9&&e.length!==6&&Un.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Dt(e[0]).toNumber(),gasPrice:Dt(e[1]),gasLimit:Dt(e[2]),to:Rh(e[3]),value:Dt(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=G.from(e[6]).toNumber()}catch{return r}if(r.r=pt(e[7],32),r.s=pt(e[8],32),G.from(r.r).isZero()&&G.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);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(re(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const o=ut(Bu(i));try{r.from=r1(o,{r:re(r.r),s:re(r.s),recoveryParam:n})}catch{}r.hash=ut(t)}return r.type=null,r}function u3(t){const e=se(t);if(e[0]>127)return a3(e);switch(e[0]){case 1:return l3(e);case 2:return s3(e)}return Un.throwError(`unsupported transaction type: ${e[0]}`,O.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const c3="contracts/5.7.0";var Ui=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const gt=new O(c3);function ru(t,e){return Ui(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&>.throwArgumentError("invalid address or ENS name","name",r);try{return mt(r)}catch{}t||gt.throwError("a provider or signer is needed to resolve ENS names",O.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&>.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function wa(t,e,r){return Ui(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>wa(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield ru(t,e):r.type==="tuple"?yield wa(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>wa(t,n,r.arrayChildren))):Promise.reject(gt.makeError("invalid value for array",O.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function zu(t,e,r){return Ui(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=it(r.pop())),gt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=yt({override:ru(t.signer,n.from),signer:t.signer.getAddress()}).then(u=>Ui(this,void 0,void 0,function*(){return mt(u.signer)!==u.override&>.throwError("Contract with a Signer cannot override from",O.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),u.override})):n.from=t.signer.getAddress():n.from&&(n.from=ru(t.provider,n.from));const i=yield yt({args:wa(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:yt(n)||{}}),o=t.interface.encodeFunctionData(e,i.args),s={data:o,to:i.address},l=i.overrides;if(l.nonce!=null&&(s.nonce=G.from(l.nonce).toNumber()),l.gasLimit!=null&&(s.gasLimit=G.from(l.gasLimit)),l.gasPrice!=null&&(s.gasPrice=G.from(l.gasPrice)),l.maxFeePerGas!=null&&(s.maxFeePerGas=G.from(l.maxFeePerGas)),l.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=G.from(l.maxPriorityFeePerGas)),l.from!=null&&(s.from=l.from),l.type!=null&&(s.type=l.type),l.accessList!=null&&(s.accessList=qi(l.accessList)),s.gasLimit==null&&e.gas!=null){let u=21e3;const c=se(o);for(let d=0;dn[u]!=null);return a.length&>.throwError(`cannot override ${a.map(u=>JSON.stringify(u)).join(",")}`,O.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:a}),s})}function f3(t,e){return function(...r){return zu(t,e,r)}}function d3(t,e){const r=t.signer||t.provider;return function(...n){return Ui(this,void 0,void 0,function*(){r||gt.throwError("estimate require a provider or signer",O.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield zu(t,e,n);return yield r.estimateGas(i)})}}function h3(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(o=>{let s=nr(o),l=null;try{l=t.interface.parseLog(o)}catch{}return l&&(s.args=l.args,s.decode=(a,u)=>t.interface.decodeEventLog(l.eventFragment,a,u),s.event=l.name,s.eventSignature=l.signature),s.removeListener=()=>t.provider,s.getBlock=()=>t.provider.getBlock(i.blockHash),s.getTransaction=()=>t.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function o1(t,e,r){const n=t.signer||t.provider;return function(...i){return Ui(this,void 0,void 0,function*(){let o;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const a=it(i.pop());a.blockTag!=null&&(o=yield a.blockTag),delete a.blockTag,i.push(a)}t.deployTransaction!=null&&(yield t._deployed(o));const s=yield zu(t,e,i),l=yield n.call(s,o);try{let a=t.interface.decodeFunctionResult(e,l);return r&&e.outputs.length===1&&(a=a[0]),a}catch(a){throw a.code===O.errors.CALL_EXCEPTION&&(a.address=t.address,a.args=i,a.transaction=s),a}})}}function p3(t,e){return function(...r){return Ui(this,void 0,void 0,function*(){t.signer||gt.throwError("sending a transaction requires a signer",O.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield zu(t,e,r),i=yield t.signer.sendTransaction(n);return h3(t,i),i})}}function Op(t,e,r){return e.constant?o1(t,e,r):p3(t,e)}function s1(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class il{constructor(e,r){z(this,"tag",e),z(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class m3 extends il{constructor(){super("error",null)}}class Lp extends il{constructor(e,r,n,i){const o={address:e};let s=r.getEventTopic(n);i?(s!==i[0]&>.throwArgumentError("topic mismatch","topics",i),o.topics=i.slice()):o.topics=[s],super(s1(o),o),z(this,"address",e),z(this,"interface",r),z(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=Vx(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class Bp extends il{constructor(e,r){super("*",{address:e}),z(this,"address",e),z(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class g3{constructor(e,r,n){z(this,"interface",fr(new.target,"getInterface")(r)),n==null?(z(this,"provider",null),z(this,"signer",null)):xl.isSigner(n)?(z(this,"provider",n.provider||null),z(this,"signer",n)):qo.isProvider(n)?(z(this,"provider",n),z(this,"signer",null)):gt.throwArgumentError("invalid signer or provider","signerOrProvider",n),z(this,"callStatic",{}),z(this,"estimateGas",{}),z(this,"functions",{}),z(this,"populateTransaction",{}),z(this,"filters",{});{const s={};Object.keys(this.interface.events).forEach(l=>{const a=this.interface.events[l];z(this.filters,l,(...u)=>({address:this.address,topics:this.interface.encodeFilterTopics(a,u)})),s[a.name]||(s[a.name]=[]),s[a.name].push(l)}),Object.keys(s).forEach(l=>{const a=s[l];a.length===1?z(this.filters,l,this.filters[a[0]]):gt.warn(`Duplicate definition of ${l} (${a.join(", ")})`)})}if(z(this,"_runningEvents",{}),z(this,"_wrappedEmits",{}),e==null&>.throwArgumentError("invalid contract address or ENS name","addressOrName",e),z(this,"address",e),this.provider)z(this,"resolvedAddress",ru(this.provider,e));else try{z(this,"resolvedAddress",Promise.resolve(mt(e)))}catch{gt.throwError("provider is required to use ENS name as contract address",O.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});const i={},o={};Object.keys(this.interface.functions).forEach(s=>{const l=this.interface.functions[s];if(o[s]){gt.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}o[s]=!0;{const a=l.name;i[`%${a}`]||(i[`%${a}`]=[]),i[`%${a}`].push(s)}this[s]==null&&z(this,s,Op(this,l,!0)),this.functions[s]==null&&z(this.functions,s,Op(this,l,!1)),this.callStatic[s]==null&&z(this.callStatic,s,o1(this,l,!0)),this.populateTransaction[s]==null&&z(this.populateTransaction,s,f3(this,l)),this.estimateGas[s]==null&&z(this.estimateGas,s,d3(this,l))}),Object.keys(i).forEach(s=>{const l=i[s];if(l.length>1)return;s=s.substring(1);const a=l[0];try{this[s]==null&&z(this,s,this[a])}catch{}this.functions[s]==null&&z(this.functions,s,this.functions[a]),this.callStatic[s]==null&&z(this.callStatic,s,this.callStatic[a]),this.populateTransaction[s]==null&&z(this.populateTransaction,s,this.populateTransaction[a]),this.estimateGas[s]==null&&z(this.estimateGas,s,this.estimateGas[a])})}static getContractAddress(e){return Nh(e)}static getInterface(e){return ud.isInterface(e)?e:new ud(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&>.throwError("contract not deployed",O.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||gt.throwError("sending a transactions require a signer",O.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=it(e||{});return["from","to"].forEach(function(n){r[n]!=null&>.throwError("cannot override "+n,O.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new Ph(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&z(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return ad.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new m3);if(e==="event")return this._normalizeRunningEvent(new il("event",null));if(e==="*")return this._normalizeRunningEvent(new Bp(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new Lp(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Lp(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new il(s1(r),r))}return this._normalizeRunningEvent(new Bp(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=nr(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||gt.throwError("events require a provider or a signer with a provider",O.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=o=>{let s=this._wrapEvent(e,o,r);if(s.decodeError==null)try{const l=e.getEmit(s);this.emit(e.filter,...l)}catch(l){s.decodeError=l.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),o=it(i.filter);return typeof r=="string"&&pe(r,32)?(n!=null&>.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),o.blockHash=r):(o.fromBlock=r??0,o.toBlock=n??"latest"),this.provider.getLogs(o).then(s=>s.map(l=>this._wrapEvent(i,l,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class v3 extends g3{}class l1{constructor(e){z(this,"alphabet",e),z(this,"base",e.length),z(this,"_alphabetMap",{}),z(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let o=0;r[o]===0&&o=0;--o)i+=this.alphabet[n[o]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;o>0;)r.push(o&255),o>>=8}for(let n=0;e[n]===this._leader&&n0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}const w3="networks/5.7.1",Dp=new O(w3);function E3(t){return t&&typeof t.renetwork=="function"}function An(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const o=["goerli","ropsten","rinkeby","sepolia"];try{const s=new r.PocketProvider(t,n.pocket);s.network&&o.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const o=["ropsten"],s=new r.AnkrProvider(t,n.ankr);s.network&&o.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let o=1;return n.quorum!=null?o=n.quorum:t==="homestead"&&(o=2),new r.FallbackProvider(i,o)}return i[0]};return e.renetwork=function(r){return An(r)},e}function nu(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return nu(t,n)},r}const Up={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:An("homestead")},Fp={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:An("ropsten")},zp={chainId:63,name:"classicMordor",_defaultProvider:nu("https://www.ethercluster.com/mordor","classicMordor")},Gl={unspecified:{chainId:0,name:"unspecified"},homestead:Up,mainnet:Up,morden:{chainId:2,name:"morden"},ropsten:Fp,testnet:Fp,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:An("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:An("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:An("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:An("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:nu("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:zp,classicTestnet:zp,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:nu("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:An("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:An("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 Th(t){if(t==null)return null;if(typeof t=="number"){for(const n in Gl){const i=Gl[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Gl[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Gl[t.name];if(!e)return typeof t.chainId!="number"&&Dp.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&Dp.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(E3(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const x3="web/5.7.1";var b3=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};function A3(t,e){return b3(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const s=e.fetchOptions;s.mode&&(r.mode=s.mode),s.cache&&(r.cache=s.cache),s.credentials&&(r.credentials=s.credentials),s.redirect&&(r.redirect=s.redirect),s.referrer&&(r.referrer=s.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach((s,l)=>{o[l.toLowerCase()]=s}):n.headers.keys().forEach(s=>{o[s.toLowerCase()]=n.headers.get(s)}),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:se(new Uint8Array(i))}})}var _3=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const Br=new O(x3);function $p(t){return new Promise(e=>{setTimeout(e,t)})}function Qn(t,e){if(t==null)return null;if(typeof t=="string")return t;if(Ah(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return El(t)}catch{}return re(t)}return t}function S3(t){return mr(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function k3(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Br.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,o=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Br.assertArgument(o>0&&o%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const s=typeof t=="object"?!!t.errorPassThrough:!1,l={};let a=null;const u={method:"GET"};let c=!1,d=2*60*1e3;if(typeof t=="string")a=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Br.throwArgumentError("missing URL","connection.url",t),a=t.url,typeof t.timeout=="number"&&t.timeout>0&&(d=t.timeout),t.headers)for(const E in t.headers)l[E.toLowerCase()]={key:E,value:String(t.headers[E])},["if-none-match","if-modified-since"].indexOf(E.toLowerCase())>=0&&(c=!0);if(u.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){a.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Br.throwError("basic authentication requires a secure https url",O.errors.INVALID_ARGUMENT,{argument:"url",url:a,user:t.user,password:"[REDACTED]"});const E=t.user+":"+t.password;l.authorization={key:"Authorization",value:"Basic "+Ay(mr(E))}}t.skipFetchSetup!=null&&(u.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(u.fetchOptions=it(t.fetchOptions))}const m=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),g=a?a.match(m):null;if(g)try{const E={statusCode:200,statusMessage:"OK",headers:{"content-type":g[1]||"text/plain"},body:g[2]?by(g[3]):S3(g[3])};let w=E.body;return r&&(w=r(E.body,E)),Promise.resolve(w)}catch(E){Br.throwError("processing response error",O.errors.SERVER_ERROR,{body:Qn(g[1],g[2]),error:E,requestBody:null,requestMethod:"GET",url:a})}e&&(u.method="POST",u.body=e,l["content-type"]==null&&(l["content-type"]={key:"Content-Type",value:"application/octet-stream"}),l["content-length"]==null&&(l["content-length"]={key:"Content-Length",value:String(e.length)}));const v={};Object.keys(l).forEach(E=>{const w=l[E];v[w.key]=w.value}),u.headers=v;const x=function(){let E=null;return{promise:new Promise(function(T,B){d&&(E=setTimeout(()=>{E!=null&&(E=null,B(Br.makeError("timeout",O.errors.TIMEOUT,{requestBody:Qn(u.body,v["content-type"]),requestMethod:u.method,timeout:d,url:a})))},d))}),cancel:function(){E!=null&&(clearTimeout(E),E=null)}}}(),N=function(){return _3(this,void 0,void 0,function*(){for(let E=0;E=300)&&(x.cancel(),Br.throwError("bad response",O.errors.SERVER_ERROR,{status:w.statusCode,headers:w.headers,body:Qn(b,w.headers?w.headers["content-type"]:null),requestBody:Qn(u.body,v["content-type"]),requestMethod:u.method,url:a})),r)try{const T=yield r(b,w);return x.cancel(),T}catch(T){if(T.throttleRetry&&E{let l=null;if(o!=null)try{l=JSON.parse(El(o))}catch(a){Br.throwError("invalid JSON",O.errors.SERVER_ERROR,{body:o,error:a})}return r&&(l=r(l,s)),l},i=null;if(e!=null){i=mr(e);const o=typeof t=="string"?{url:t}:it(t);o.headers?Object.keys(o.headers).filter(l=>l.toLowerCase()==="content-type").length!==0||(o.headers=it(o.headers),o.headers["content-type"]="application/json"):o.headers={"content-type":"application/json"},t=o}return k3(t,i,n)}function ho(t,e){return e||(e={}),e=it(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,o=!1;const s=()=>o?!1:(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));const l=e.retryLimit;let a=0;function u(){return t().then(function(c){if(c!==void 0)s()&&r(c);else if(e.oncePoll)e.oncePoll.once("poll",u);else if(e.onceBlock)e.onceBlock.once("block",u);else if(!o){if(a++,a>l){s()&&n(new Error("retry limit reached"));return}let d=e.interval*parseInt(String(Math.random()*Math.pow(2,a)));de.ceiling&&(d=e.ceiling),setTimeout(u,d)}return null},function(c){s()&&n(c)})}u()})}var iu="qpzry9x8gf2tvdw0s3jn54khce6mua7l",gd={};for(var Vl=0;Vl>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function a1(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=Ao(e)^n>>5}for(e=Ao(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=a1(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",o=0;o>5)throw new Error("Non 5-bit word");n=Ao(n)^s,i+=iu.charAt(s)}for(o=0;o<6;++o)n=Ao(n);for(n^=1,o=0;o<6;++o){var l=n>>(5-o)*5&31;i+=iu.charAt(l)}return i}function u1(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var o=t.slice(0,i),s=t.slice(i+1);if(s.length<6)return"Data too short";var l=a1(o);if(typeof l=="string")return l;for(var a=[],u=0;u=s.length)&&a.push(d)}return l!==1?"Invalid checksum for "+t:{prefix:o,words:a}}function P3(){var t=u1.apply(null,arguments);if(typeof t=="object")return t}function C3(t){var e=u1.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function $u(t,e,r,n){for(var i=0,o=0,s=(1<=r;)o-=r,l.push(i>>o&s);if(n)o>0&&l.push(i<=e)return"Excess padding";if(i<this.data(d,!0);return e.transaction={hash:s,type:u,accessList:te.allowNull(this.accessList.bind(this),null),blockHash:te.allowNull(s,null),blockNumber:te.allowNull(a,null),transactionIndex:te.allowNull(a,null),confirmations:te.allowNull(a,null),from:r,gasPrice:te.allowNull(n),maxPriorityFeePerGas:te.allowNull(n),maxFeePerGas:te.allowNull(n),gasLimit:n,to:te.allowNull(r,null),value:n,nonce:a,data:o,r:te.allowNull(this.uint256),s:te.allowNull(this.uint256),v:te.allowNull(a),creates:te.allowNull(r,null),raw:te.allowNull(o)},e.transactionRequest={from:te.allowNull(r),nonce:te.allowNull(a),gasLimit:te.allowNull(n),gasPrice:te.allowNull(n),maxPriorityFeePerGas:te.allowNull(n),maxFeePerGas:te.allowNull(n),to:te.allowNull(r),value:te.allowNull(n),data:te.allowNull(c),type:te.allowNull(a),accessList:te.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:a,blockNumber:a,transactionHash:s,address:r,topics:te.arrayOf(s),data:o,logIndex:a,blockHash:s},e.receipt={to:te.allowNull(this.address,null),from:te.allowNull(this.address,null),contractAddress:te.allowNull(r,null),transactionIndex:a,root:te.allowNull(l),gasUsed:n,logsBloom:te.allowNull(o),blockHash:s,transactionHash:s,logs:te.arrayOf(this.receiptLog.bind(this)),blockNumber:a,confirmations:te.allowNull(a,null),cumulativeGasUsed:n,effectiveGasPrice:te.allowNull(n),status:te.allowNull(a),type:u},e.block={hash:te.allowNull(s),parentHash:s,number:a,timestamp:a,nonce:te.allowNull(l),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:te.allowNull(r),extraData:o,transactions:te.allowNull(te.arrayOf(s)),baseFeePerGas:te.allowNull(n)},e.blockWithTransactions=it(e.block),e.blockWithTransactions.transactions=te.allowNull(te.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:te.allowNull(i,void 0),toBlock:te.allowNull(i,void 0),blockHash:te.allowNull(s,void 0),address:te.allowNull(r,void 0),topics:te.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:te.allowNull(a),blockHash:te.allowNull(s),transactionIndex:a,removed:te.allowNull(this.boolean.bind(this)),address:r,data:te.allowFalsish(o,"0x"),topics:te.arrayOf(s),transactionHash:s,logIndex:a},e}accessList(e){return qi(e||[])}number(e){return e==="0x"?0:G.from(e).toNumber()}type(e){return e==="0x"||e==null?0:G.from(e).toNumber()}bigNumber(e){return G.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),pe(e))?e.toLowerCase():ss.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return mt(e)}callAddress(e){if(!pe(e,32))return null;const r=mt(It(e,12));return r===fb?null:r}contractAddress(e){return Nh(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||pe(e))return Ou(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return On(n)!==32?ss.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=G.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!pe(e))throw new Error("invalid uint256");return pt(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=te.check(r,e);return i._difficulty=n==null?null:G.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return te.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&G.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=te.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;pe(n)&&(n=G.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),pe(n)&&(n=G.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return u3(e)}receiptLog(e){return te.check(this.formats.receiptLog,e)}receipt(e){const r=te.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=G.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&ss.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):ss.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&ss.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return te.check(this.formats.filter,e)}filterLog(e){return te.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const o=e[i](r[i]);o!==void 0&&(n[i]=o)}catch(o){throw o.checkKey=i,o.checkValue=r[i],o}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}function c1(t){return t&&typeof t.isCommunityResource=="function"}function vd(t){return c1(t)&&t.isCommunityResource()}let qp=!1;function _l(){qp||(qp=!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("=========================="))}var ae=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const he=new O($t),L3=10;function Wp(t){return t==null?"null":(On(t)!==32&&he.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function Gp(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[Wp(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return Wp(e)}).join("&")}function B3(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function Gi(t){if(typeof t=="string"){if(t=t.toLowerCase(),On(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+Gp(t);if(dA.isForkEvent(t))throw he.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+Gp(t.topics||[])}throw new Error("invalid event - "+t)}function ls(){return new Date().getTime()}function Vp(t){return new Promise(e=>{setTimeout(e,t)})}const j3=["block","network","pending","poll"];class D3{constructor(e,r,n){z(this,"tag",e),z(this,"listener",r),z(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=B3(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||j3.indexOf(this.tag)>=0}}const U3={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 Xc(t){return pt(G.from(t).toHexString(),32)}function Kp(t){return md.encode(Ut([t,It(jp(jp(t)),0,4)]))}const f1=new RegExp("^(ipfs)://(.*)$","i"),Qp=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),f1,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ea(t,e){try{return El(ol(t,e))}catch{}return null}function ol(t,e){if(t==="0x")return null;const r=G.from(It(t,e,e+32)).toNumber(),n=G.from(It(t,r,r+32)).toNumber();return It(t,r+32,r+32+n)}function Zc(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):he.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function Jp(t){const e=se(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function F3(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function d1(t){const e=[];let r=0;for(let n=0;nG.from(e).eq(1)).catch(e=>{if(e.code===O.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return ae(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Xt([e,ga(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Xt(["0x9061b923",d1([Yb(this.name),n.data])]));try{let o=yield this.provider.call(n);return se(o).length%32===4&&he.throwError("resolver threw error",O.errors.CALL_EXCEPTION,{transaction:n,data:o}),i&&(o=ol(o,0)),o}catch(o){if(o.code===O.errors.CALL_EXCEPTION)return null;throw o}})}_fetchBytes(e,r){return ae(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?ol(n,0):null})}_getAddress(e,r){const n=U3[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,O.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=se(r);if(n.p2pkh!=null){const o=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(o){const s=parseInt(o[1],16);if(o[2].length===s*2&&s>=1&&s<=75)return Kp(Ut([[n.p2pkh],"0x"+o[2]]))}}if(n.p2sh!=null){const o=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(o){const s=parseInt(o[1],16);if(o[2].length===s*2&&s>=1&&s<=75)return Kp(Ut([[n.p2sh],"0x"+o[2]]))}}if(n.prefix!=null){const o=i[1];let s=i[0];if(s===0?o!==20&&o!==32&&(s=-1):s=-1,s>=0&&i.length===2+o&&o>=1&&o<=75){const l=Hp.toWords(i.slice(2));return l.unshift(s),Hp.encode(n.prefix,l)}}return null}getAddress(e){return ae(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===mb?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===O.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",Xc(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&he.throwError("invalid or unsupported coin data",O.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return ae(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;ns[a])}return he.throwError("invalid or unsupported content hash data",O.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ae(this,void 0,void 0,function*(){let r=mr(e);r=Ut([Xc(64),Xc(r.length),r]),r.length%32!==0&&(r=Ut([r,pt("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",re(r));return n==null||n==="0x"?null:El(n)})}}let ef=null,z3=1;class Hu extends qo{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),z(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=fr(new.target,"getNetwork")(e);r?(z(this,"_network",r),this.emit("network",r,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ae(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",O.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:z(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return ho(()=>this._ready().then(e=>e,e=>{if(!(e.code===O.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return ef==null&&(ef=new te),ef}static getNetwork(e){return Th(e??"homestead")}ccipReadFetch(e,r,n){return ae(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),o=r.toLowerCase(),s=[];for(let l=0;l=0?null:JSON.stringify({data:o,sender:i}),d=yield Al({url:u,errorPassThrough:!0},c,(g,v)=>(g.status=v.statusCode,g));if(d.data)return d.data;const m=d.message||"unknown error";if(d.status>=400&&d.status<500)return he.throwError(`response not found during CCIP fetch: ${m}`,O.errors.SERVER_ERROR,{url:a,errorMessage:m});s.push(m)}return he.throwError(`error encountered during CCIP fetch: ${s.map(l=>JSON.stringify(l)).join(", ")}`,O.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ae(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const o=yield i;if(ls()-o.respTime<=e)return o.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=ls(),n=yt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:o})=>{if(o)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),o;const s=ls();return i=G.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ae(this,void 0,void 0,function*(){const e=z3++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",O.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const o=this._emitted[i];o!=="pending"&&n-o>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const o=i.hash;let s=this.getTransactionReceipt(o).then(l=>(!l||l.blockNumber==null||(this._emitted["t:"+o]=l.blockNumber,this.emit(o,l)),null)).catch(l=>{this.emit("error",l)});r.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const o=i.filter;o.fromBlock=i._lastBlockNumber+1,o.toBlock=n;const s=o.toBlock-this._maxFilterBlockRange;s>o.fromBlock&&(o.fromBlock=s),o.fromBlock<0&&(o.fromBlock=0);const l=this.getLogs(o).then(a=>{i._inflight=!1,a.length!==0&&a.forEach(u=>{u.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=u.blockNumber),this._emitted["b:"+u.blockHash]=u.blockNumber,this._emitted["t:"+u.transactionHash]=u.blockNumber,this.emit(o,u)})}).catch(a=>{this.emit("error",a),i._inflight=!1});r.push(l)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ae(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",O.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ae(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)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,e),yield Vp(0),this._network;const n=he.makeError("underlying network changed",O.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=ls();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return ae(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return ae(this,void 0,void 0,function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=r?o:new Promise((s,l)=>{const a=[];let u=!1;const c=function(){return u?!0:(u=!0,a.forEach(m=>{m()}),!1)},d=m=>{m.confirmations{this.removeListener(e,d)}),i){let m=i.startBlock,g=null;const v=x=>ae(this,void 0,void 0,function*(){u||(yield Vp(1e3),this.getTransactionCount(i.from).then(N=>ae(this,void 0,void 0,function*(){if(!u){if(N<=i.nonce)m=x;else{{const E=yield this.getTransaction(e);if(E&&E.blockNumber!=null)return}for(g==null&&(g=m-3,g{u||this.once("block",v)}))});if(u)return;this.once("block",v),a.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){const m=setTimeout(()=>{c()||l(he.makeError("timeout exceeded",O.errors.TIMEOUT,{timeout:n}))},n);m.unref&&m.unref(),a.push(()=>{clearTimeout(m)})}})})}getBlockNumber(){return ae(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return G.from(e)}catch(r){return he.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return G.from(i)}catch(o){return he.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:o})}})}getTransactionCount(e,r){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return G.from(i).toNumber()}catch(o){return he.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:o})}})}getCode(e,r){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return re(i)}catch(o){return he.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:o})}})}getStorageAt(e,r,n){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield yt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(s=>Ou(s))}),o=yield this.perform("getStorageAt",i);try{return re(o)}catch(s){return he.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:s})}})}_wrapTransaction(e,r,n){if(r!=null&&On(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",O.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(o,s)=>ae(this,void 0,void 0,function*(){o==null&&(o=1),s==null&&(s=0);let l;o!==0&&n!=null&&(l={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const a=yield this._waitForTransaction(e.hash,o,s,l);return a==null&&o===0?null:(this._emitted["t:"+e.hash]=a.blockNumber,a.status===0&&he.throwError("transaction failed",O.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:a}),a)}),i}sendTransaction(e){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(o=>re(o)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const o=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,o,i)}catch(o){throw o.transaction=n,o.transactionHash=n.hash,o}})}_getTransactionRequest(e){return ae(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?this._getAddress(o):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?G.from(o):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?re(o):null))}),this.formatter.transactionRequest(yield yt(n))})}_getFilter(e){return ae(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield yt(r))})}_call(e,r,n){return ae(this,void 0,void 0,function*(){n>=L3&&he.throwError("CCIP read exceeded maximum redirections",O.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,o=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&o.substring(0,10)==="0x556f1830"&&On(o)%32===4)try{const s=It(o,4),l=It(s,0,32);G.from(l).eq(i)||he.throwError("CCIP Read sender did not match",O.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const a=[],u=G.from(It(s,32,64)).toNumber(),c=G.from(It(s,u,u+32)).toNumber(),d=It(s,u+32);for(let E=0;Eae(this,void 0,void 0,function*(){const o=yield this.perform("getBlock",i);if(o==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let s=null;for(let a=0;athis._wrapTransaction(a)),l}return this.formatter.block(o)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ae(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return ho(()=>ae(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ae(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return ho(()=>ae(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield yt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),te.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ae(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ae(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return ae(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new yd(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return ae(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",O.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+ga(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ae(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(pe(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return ae(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=Ea(yield this.call({to:n,data:"0x691f3431"+ga(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ae(this,void 0,void 0,function*(){let r=null;if(pe(e)){const o=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(o,"getAvatar");if(!s)return null;r=new yd(this,s,o);try{const l=yield r.getAvatar();if(l)return l.url}catch(l){if(l.code!==O.errors.CALL_EXCEPTION)throw l}try{const l=Ea(yield this.call({to:s,data:"0x691f3431"+ga(o).substring(2)}),0);r=yield this.getResolver(l)}catch(l){if(l.code!==O.errors.CALL_EXCEPTION)throw l;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return he.throwError(e+" not implemented",O.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new D3(Gi(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],o=Gi(e);return this._events=this._events.filter(s=>s.tag!==o?!0:(setTimeout(()=>{s.listener.apply(this,r)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let r=Gi(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=Gi(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,o=Gi(e);return this._events=this._events.filter(s=>s.tag!==o||s.listener!=r||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=Gi(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var xn=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const wt=new O($t),$3=["call","estimateGas"];function Ps(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=pe(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=Ps(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return Ps(JSON.parse(t),e)}catch{}return null}function h1(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const o=Ps(e,!0);if(o)return o.data;wt.throwError("missing revert data in call exception; Transaction reverted without a reason string",O.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let o=Ps(e.body,!1);o==null&&(o=Ps(e,!1)),o&&wt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{reason:o.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===O.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&wt.throwError("insufficient funds for intrinsic transaction cost",O.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&wt.throwError("nonce has already been used",O.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&wt.throwError("replacement fee too low",O.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&wt.throwError("legacy pre-eip-155 transactions not supported",O.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),$3.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&wt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function Yp(t){return new Promise(function(e){setTimeout(e,t)})}function H3(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function as(t){return t&&t.toLowerCase()}const wd={};class Oh extends xl{constructor(e,r,n){if(super(),e!==wd)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");z(this,"provider",r),n==null&&(n=0),typeof n=="string"?(z(this,"_address",this.provider.formatter.address(n)),z(this,"_index",null)):typeof n=="number"?(z(this,"_index",n),z(this,"_address",null)):wt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return wt.throwError("cannot alter JSON-RPC Signer connection",O.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new q3(wd,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&wt.throwError("unknown account #"+this._index,O.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=it(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=it(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>xn(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&wt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),yt({tx:yt(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&wt.throwArgumentError("from address mismatch","transaction",e):n.from=i;const o=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[o]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&wt.throwError("user rejected transaction",O.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),h1("sendTransaction",s,o)))})}signTransaction(e){return wt.throwError("signing transactions is unsupported",O.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return xn(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield ho(()=>xn(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return xn(this,void 0,void 0,function*(){const r=typeof e=="string"?mr(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[re(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&wt.throwError("user rejected signing",O.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return xn(this,void 0,void 0,function*(){const r=typeof e=="string"?mr(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),re(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&wt.throwError("user rejected signing",O.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return xn(this,void 0,void 0,function*(){const i=yield sr.resolveNames(e,r,n,s=>this.provider.resolveName(s)),o=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(sr.getPayload(i.domain,r,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&wt.throwError("user rejected signing",O.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,messageData:{domain:i.domain,types:r,value:i.value}}),s}})}unlock(e){return xn(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class q3 extends Oh{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const W3={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class vi extends Hu{constructor(e,r){let n=r;n==null&&(n=new Promise((i,o)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{o(s)})},0)})),super(n),e||(e=fr(this.constructor,"defaultUrl")()),typeof e=="string"?z(this,"connection",Object.freeze({url:e})):z(this,"connection",Object.freeze(it(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return xn(this,void 0,void 0,function*(){yield Yp(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=fr(this.constructor,"getNetwork");try{return r(G.from(e).toNumber())}catch(n){return wt.throwError("could not detect network",O.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return wt.throwError("could not detect network",O.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Oh(wd,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:nr(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const o=Al(this.connection,JSON.stringify(n),H3).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=o,setTimeout(()=>{this._cache[e]=null},0)),o}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[as(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[as(r.address),r.blockTag]];case"getCode":return["eth_getCode",[as(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[as(r.address),pt(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[fr(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[fr(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=as(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return xn(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&G.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const o=yield this.getFeeData();o.maxFeePerGas==null&&o.maxPriorityFeePerGas==null&&(r=it(r),r.transaction=it(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&wt.throwError(e+" not implemented",O.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return h1(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(o){if(e._pendingFilter!=r)return null;let s=Promise.resolve();return o.forEach(function(l){e._emitted["t:"+l.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(l).then(function(a){return e.emit("pending",a),null})})}),s.then(function(){return Yp(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(o=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=it(W3);if(r)for(const o in r)r[o]&&(n[o]=!0);Ux(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(o){if(e[o]==null)return;const s=Ou(G.from(e[o]));o==="gasLimit"&&(o="gas"),i[o]=s}),["from","to","data"].forEach(function(o){e[o]!=null&&(i[o]=re(e[o]))}),e.accessList&&(i.accessList=qi(e.accessList)),i}}let Cs=null;try{if(Cs=WebSocket,Cs==null)throw new Error("inject please")}catch{const e=new O($t);Cs=function(){e.throwError("WebSockets not supported in this environment",O.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var tf=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const Kl=new O($t);let G3=1;class qu extends vi{constructor(e,r){r==="any"&&Kl.throwError("WebSocketProvider does not support 'any' network yet",O.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,r):super("_websocket",r),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?z(this,"_websocket",new Cs(this.connection.url)):z(this,"_websocket",e),z(this,"_requests",{}),z(this,"_subs",{}),z(this,"_subIds",{}),z(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{const o=i.data,s=JSON.parse(o);if(s.id!=null){const l=String(s.id),a=this._requests[l];if(delete this._requests[l],s.result!==void 0)a.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(a.payload),response:s.result,provider:this});else{let u=null;s.error?(u=new Error(s.error.message||"unknown error"),z(u,"code",s.error.code||null),z(u,"response",o)):u=new Error("unknown error"),a.callback(u,void 0),this.emit("debug",{action:"response",error:u,request:JSON.parse(a.payload),provider:this})}}else if(s.method==="eth_subscription"){const l=this._subs[s.params.subscription];l&&l.processFunc(s.params.result)}else console.warn("this should not happen")};const n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Kl.throwError("cannot reset events block on WebSocketProvider",O.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Kl.throwError("cannot set polling interval on WebSocketProvider",O.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return tf(this,void 0,void 0,function*(){return null})}set polling(e){e&&Kl.throwError("cannot set polling on WebSocketProvider",O.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,r){const n=G3++;return new Promise((i,o)=>{function s(a,u){return a?o(a):i(u)}const l=JSON.stringify({method:e,params:r,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(l),provider:this}),this._requests[String(n)]={callback:s,payload:l},this._wsReady&&this.websocket.send(l)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,r,n){return tf(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(r).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);const o=yield i;this._subs[o]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],r=>{const n=G.from(r.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],r=>{this.emit("pending",r)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],r=>{r.removed==null&&(r.removed=!1),this.emit(e.filter,this.formatter.filterLog(r))});break;case"tx":{const r=n=>{const i=n.hash;this.getTransactionReceipt(i).then(o=>{o&&this.emit(i,o)})};r(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(r)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let r=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;r="tx"}else if(this.listenerCount(e.event))return;const n=this._subIds[r];n&&(delete this._subIds[r],n.then(i=>{this._subs[i]&&(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return tf(this,void 0,void 0,function*(){this.websocket.readyState===Cs.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}}var V3=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const gs=new O($t);class p1 extends vi{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return V3(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||gs.throwError("no network detected",O.errors.UNKNOWN_ERROR,{}),this._network==null&&(z(this,"_network",r),this.emit("network",r,null))),r})}}class Fn extends p1{constructor(e,r){gs.checkAbstract(new.target,Fn),e=fr(new.target,"getNetwork")(e),r=fr(new.target,"getApiKey")(r);const n=fr(new.target,"getUrl")(e,r);super(n,e),typeof r=="string"?z(this,"apiKey",r):r!=null&&Object.keys(r).forEach(i=>{z(this,i,r[i])})}_startPending(){gs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return gs.throwError("API provider does not support signing",O.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,r){return gs.throwError("not implemented; sub-classes must override getUrl",O.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const Xp=new O($t),xa="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class m1 extends qu{constructor(e,r){const n=new Lh(e,r),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),z(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===xa}}class Lh extends Fn{static getWebSocketProvider(e,r){return new m1(e,r)}static getApiKey(e){return e==null?xa:(e&&typeof e!="string"&&Xp.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,r){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:Xp.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+r,throttleCallback:(i,o)=>(r===xa&&_l(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===xa}}const K3=new O($t),Ql="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Q3(t){switch(t){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 K3.throwArgumentError("unsupported network","name",t)}class g1 extends Fn{isCommunityResource(){return this.apiKey===Ql}static getApiKey(e){return e??Ql}static getUrl(e,r){r==null&&(r=Ql);const n={allowGzip:!0,url:"https://"+Q3(e.name)+r,throttleCallback:(i,o)=>(r.apiKey===Ql&&_l(),Promise.resolve(!0))};return r.projectSecret!=null&&(n.user="",n.password=r.projectSecret),n}}var J3=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const Zp=new O($t);class v1 extends Fn{static getApiKey(e){return e!=null&&Zp.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,r){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:Zp.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,r){const n=Object.create(null,{perform:{get:()=>super.perform}});return J3(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,r)})}}var Jl=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const ti=new O($t);function em(t){const e={};for(let r in t){if(t[r]==null)continue;let n=t[r];r==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?n=Ou(re(n)):r==="accessList"?n="["+qi(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=re(n),e[r]=n)}return e}function Y3(t){if(t.status==0&&(t.message==="No records found"||t.message==="No transactions found"))return t.result;if(t.status!=1||typeof t.message!="string"||!t.message.match(/^OK/)){const e=new Error("invalid response");throw e.result=JSON.stringify(t),(t.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return t.result}function tm(t){if(t&&t.status==0&&t.message=="NOTOK"&&(t.result||"").toLowerCase().indexOf("rate limit")>=0){const e=new Error("throttled response");throw e.result=JSON.stringify(t),e.throttleRetry=!0,e}if(t.jsonrpc!="2.0"){const e=new Error("invalid response");throw e.result=JSON.stringify(t),e}if(t.error){const e=new Error(t.error.message||"unknown error");throw t.error.code&&(e.code=t.error.code),t.error.data&&(e.data=t.error.data),e}return t.result}function rm(t){if(t==="pending")throw new Error("pending not supported");return t==="latest"?t:parseInt(t.substring(2),16)}function rf(t,e,r){if(t==="call"&&e.code===O.errors.SERVER_ERROR){const i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let o=i.data;if(o&&(o="0x"+o.replace(/^.*0x/i,"")),pe(o))return o;ti.throwError("missing revert data in call exception",O.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===O.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&ti.throwError("insufficient funds for intrinsic transaction cost",O.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&ti.throwError("nonce has already been used",O.errors.NONCE_EXPIRED,{error:e,method:t,transaction:r}),n.match(/another transaction with same nonce/)&&ti.throwError("replacement fee too low",O.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&ti.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:r}),e}class y1 extends Hu{constructor(e,r){super(e),z(this,"baseUrl",this.getBaseUrl()),z(this,"apiKey",r||null)}getBaseUrl(){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 ti.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,r){const n=Object.keys(r).reduce((o,s)=>{const l=r[s];return l!=null&&(o+=`&${s}=${l}`),o},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,r){return r.module=e,r.apikey=this.apiKey,r}fetch(e,r,n){return Jl(this,void 0,void 0,function*(){const i=n?this.getPostUrl():this.getUrl(e,r),o=n?this.getPostData(e,r):null,s=e==="proxy"?tm:Y3;this.emit("debug",{action:"request",request:i,provider:this});const l={url:i,throttleSlotInterval:1e3,throttleCallback:(c,d)=>(this.isCommunityResource()&&_l(),Promise.resolve(!0))};let a=null;o&&(l.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},a=Object.keys(o).map(c=>`${c}=${o[c]}`).join("&"));const u=yield Al(l,a,s||tm);return this.emit("debug",{action:"response",request:i,response:nr(u),provider:this}),u})}detectNetwork(){return Jl(this,void 0,void 0,function*(){return this.network})}perform(e,r){const n=Object.create(null,{perform:{get:()=>super.perform}});return Jl(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:r.address,tag:r.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:r.address,tag:r.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:r.address,tag:r.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:r.address,position:r.position,tag:r.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:r.signedTransaction},!0).catch(i=>rf("sendTransaction",i,r.signedTransaction));case"getBlock":if(r.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:r.blockTag,boolean:r.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:r.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:r.transactionHash});case"call":{if(r.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const i=em(r.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(o){return rf("call",o,r.transaction)}}case"estimateGas":{const i=em(r.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(o){return rf("estimateGas",o,r.transaction)}}case"getLogs":{const i={action:"getLogs"};if(r.filter.fromBlock&&(i.fromBlock=rm(r.filter.fromBlock)),r.filter.toBlock&&(i.toBlock=rm(r.filter.toBlock)),r.filter.address&&(i.address=r.filter.address),r.filter.topics&&r.filter.topics.length>0&&(r.filter.topics.length>1&&ti.throwError("unsupported topic count",O.errors.UNSUPPORTED_OPERATION,{topics:r.filter.topics}),r.filter.topics.length===1)){const l=r.filter.topics[0];(typeof l!="string"||l.length!==66)&&ti.throwError("unsupported topic format",O.errors.UNSUPPORTED_OPERATION,{topic0:l}),i.topic0=l}const o=yield this.fetch("logs",i);let s={};for(let l=0;l{["contractAddress","to"].forEach(function(a){s[a]==""&&delete s[a]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);const l=this.formatter.transactionResponse(s);return s.timeStamp&&(l.timestamp=parseInt(s.timeStamp)),l})})}isCommunityResource(){return this.apiKey==null}}var ou=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const Si=new O($t);function Yl(){return new Date().getTime()}function nm(t){let e=null;for(let r=0;re?null:(n+i)/2}function po(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(G.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>po(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=po(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let X3=1;function om(t){let e=null,r=null,n=new Promise(s=>{e=function(){r&&(clearTimeout(r),r=null),s()},r=setTimeout(e,t)});const i=s=>(n=n.then(s),n);function o(){return n}return{cancel:e,getPromise:o,wait:i}}const Z3=[O.errors.CALL_EXCEPTION,O.errors.INSUFFICIENT_FUNDS,O.errors.NONCE_EXPIRED,O.errors.REPLACEMENT_UNDERPRICED,O.errors.UNPREDICTABLE_GAS_LIMIT],eS=["address","args","errorArgs","errorSignature","method","transaction"];function Xl(t,e){const r={weight:t.weight};return Object.defineProperty(r,"provider",{get:()=>t.provider}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function tS(t,e){return function(r){const n={};r.forEach(o=>{const s=t(o.result);n[s]||(n[s]={count:0,result:o.result}),n[s].count++});const i=Object.keys(n);for(let o=0;o=e)return s.result}}}function rS(t,e,r){let n=po;switch(e){case"getBlockNumber":return function(i){const o=i.map(l=>l.result);let s=im(i.map(l=>l.result),2);if(s!=null)return s=Math.ceil(s),o.indexOf(s+1)>=0&&s++,s>=t._highestBlockNumber&&(t._highestBlockNumber=s),t._highestBlockNumber};case"getGasPrice":return function(i){const o=i.map(s=>s.result);return o.sort(),o[Math.floor(o.length/2)]};case"getEtherPrice":return function(i){return im(i.map(o=>o.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=it(i),i.confirmations=-1,po(i))};break;case"getBlock":r.includeTransactions?n=function(i){return i==null?null:(i=it(i),i.transactions=i.transactions.map(o=>(o=it(o),o.confirmations=-1,o)),po(i))}:n=function(i){return i==null?null:po(i)};break;default:throw new Error("unknown method: "+e)}return tS(n,t.quorum)}function us(t,e){return ou(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:ho(()=>new Promise((n,i)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function nS(t,e,r,n){return ou(this,void 0,void 0,function*(){let i=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&pe(n.blockTag)&&(i=yield us(t,e)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&pe(n.blockTag)&&(i=yield us(t,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&pe(n.blockTag)&&(i=yield us(t,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&pe(n.blockTag)&&(i=yield us(t,e)),r==="call"&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let o=n.filter;return(o.fromBlock&&pe(o.fromBlock)||o.toBlock&&pe(o.toBlock))&&(i=yield us(t,e)),i.getLogs(o)}}return Si.throwError("unknown method error",O.errors.UNKNOWN_ERROR,{method:r,params:n})})}class w1 extends Hu{constructor(e,r){e.length===0&&Si.throwArgumentError("missing providers","providers",e);const n=e.map((s,l)=>{if(qo.isProvider(s)){const c=vd(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}const a=it(s);a.priority==null&&(a.priority=1),a.stallTimeout==null&&(a.stallTimeout=vd(s)?2e3:750),a.weight==null&&(a.weight=1);const u=a.weight;return(u%1||u>512||u<1)&&Si.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${l}].weight`,u),Object.freeze(a)}),i=n.reduce((s,l)=>s+l.weight,0);r==null?r=i/2:r>i&&Si.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let o=nm(n.map(s=>s.provider.network));o==null&&(o=new Promise((s,l)=>{setTimeout(()=>{this.detectNetwork().then(s,l)},0)})),super(o),z(this,"providerConfigs",Object.freeze(n)),z(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return ou(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return nm(e)})}perform(e,r){return ou(this,void 0,void 0,function*(){if(e==="sendTransaction"){const a=yield Promise.all(this.providerConfigs.map(u=>u.provider.sendTransaction(r.signedTransaction).then(c=>c.hash,c=>c)));for(let u=0;ua.priority-u.priority);const o=this._highestBlockNumber;let s=0,l=!0;for(;;){const a=Yl();let u=i.filter(g=>g.runner&&a-g.startg+v.weight,0);for(;u{g.staller=null}),g.runner=nS(g,o,e,r).then(x=>{g.done=!0,g.result=x,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xl(g,Yl()),request:{method:e,params:nr(r)},provider:this})},x=>{g.done=!0,g.error=x,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xl(g,Yl()),request:{method:e,params:nr(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xl(g,null),request:{method:e,params:nr(r)},provider:this}),u+=g.weight}const c=[];i.forEach(g=>{g.done||!g.runner||(c.push(g.runner),g.staller&&c.push(g.staller.getPromise()))}),c.length&&(yield Promise.race(c));const d=i.filter(g=>g.done&&g.error==null);if(d.length>=this.quorum){const g=n(d);if(g!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),g;l||(yield om(100).getPromise()),l=!1}const m=i.reduce((g,v)=>{if(!v.done||v.error==null)return g;const x=v.error.code;return Z3.indexOf(x)>=0&&(g[x]||(g[x]={error:v.error,weight:0}),g[x].weight+=v.weight),g},{});if(Object.keys(m).forEach(g=>{const v=m[g];if(v.weight{E.staller&&E.staller.cancel(),E.cancelled=!0});const x=v.error,N={};eS.forEach(E=>{x[E]!=null&&(N[E]=x[E])}),Si.throwError(x.reason||x.message,g,N)}),i.filter(g=>!g.done).length===0)break}return i.forEach(a=>{a.staller&&a.staller.cancel(),a.cancelled=!0}),Si.throwError("failed to meet quorum",O.errors.SERVER_ERROR,{method:e,params:r,results:i.map(a=>Xl(a)),provider:this})})}}const E1=null,ba=new O($t),vs="84842078b09946638c03157f83405213";class x1 extends qu{constructor(e,r){const n=new Bh(e,r),i=n.connection;i.password&&ba.throwError("INFURA WebSocket project secrets unsupported",O.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});const o=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(o,e),z(this,"apiKey",n.projectId),z(this,"projectId",n.projectId),z(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===vs}}class Bh extends Fn{static getWebSocketProvider(e,r){return new x1(e,r)}static getApiKey(e){const r={apiKey:vs,projectId:vs,projectSecret:null};return e==null||(typeof e=="string"?r.projectId=e:e.projectSecret!=null?(ba.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),ba.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),r.projectId=e.projectId,r.projectSecret=e.projectSecret):e.projectId&&(r.projectId=e.projectId),r.apiKey=r.projectId),r}static getUrl(e,r){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:ba.throwError("unsupported network",O.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const i={allowGzip:!0,url:"https://"+n+"/v3/"+r.projectId,throttleCallback:(o,s)=>(r.projectId===vs&&_l(),Promise.resolve(!0))};return r.projectSecret!=null&&(i.user="",i.password=r.projectSecret),i}isCommunityResource(){return this.projectId===vs}}class iS extends vi{send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);const i={request:n,resolve:null,reject:null},o=new Promise((s,l)=>{i.resolve=s,i.reject=l});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{const s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const l=s.map(a=>a.request);return this.emit("debug",{action:"requestBatch",request:nr(l),provider:this}),Al(this.connection,JSON.stringify(l)).then(a=>{this.emit("debug",{action:"response",request:l,response:a,provider:this}),s.forEach((u,c)=>{const d=a[c];if(d.error){const m=new Error(d.error.message);m.code=d.error.code,m.data=d.error.data,u.reject(m)}else u.resolve(d.result)})},a=>{this.emit("debug",{action:"response",error:a,request:l,provider:this}),s.forEach(u=>{u.reject(a)})})},10)),o}}const nf=new O($t),oS="ETHERS_JS_SHARED";class b1 extends Fn{static getApiKey(e){return e&&typeof e!="string"&&nf.throwArgumentError("invalid apiKey","apiKey",e),e||oS}static getUrl(e,r){nf.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:nf.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+r}}const sm=new O($t),lm="62e1ad51b37b8e00394bda3b";class A1 extends Fn{static getApiKey(e){const r={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?r.applicationId=lm:typeof e=="string"?r.applicationId=e:e.applicationSecretKey!=null?(r.applicationId=e.applicationId,r.applicationSecretKey=e.applicationSecretKey):e.applicationId?r.applicationId=e.applicationId:sm.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),r}static getUrl(e,r){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:sm.throwError("unsupported network",O.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const i=`https://${n}/v1/lb/${r.applicationId}`,o={headers:{},url:i};return r.applicationSecretKey!=null&&(o.user="",o.password=r.applicationSecretKey),o}isCommunityResource(){return this.applicationId===lm}}const am=new O($t);let sS=1;function um(t,e){const r="Web3LegacyFetcher";return function(n,i){const o={method:n,params:i,id:sS++,jsonrpc:"2.0"};return new Promise((s,l)=>{this.emit("debug",{action:"request",fetcher:r,request:nr(o),provider:this}),e(o,(a,u)=>{if(a)return this.emit("debug",{action:"response",fetcher:r,error:a,request:o,provider:this}),l(a);if(this.emit("debug",{action:"response",fetcher:r,request:o,response:u,provider:this}),u.error){const c=new Error(u.error.message);return c.code=u.error.code,c.data=u.error.data,l(c)}s(u.result)})})}}function lS(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:nr(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class _1 extends vi{constructor(e,r){e==null&&am.throwArgumentError("missing provider","provider",e);let n=null,i=null,o=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),o=e,e.request?(n===""&&(n="eip-1193:"),i=lS(e)):e.sendAsync?i=um(e,e.sendAsync.bind(e)):e.send?i=um(e,e.send.bind(e)):am.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),z(this,"jsonRpcFetchFunc",i),z(this,"provider",o)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const cm=new O($t);function aS(t,e){if(t==null&&(t="homestead"),typeof t=="string"){const n=t.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new vi(t);case"ws":case"wss":return new qu(t);default:cm.throwArgumentError("unsupported URL scheme","network",t)}}const r=Th(t);return(!r||!r._defaultProvider)&&cm.throwError("unsupported getDefaultProvider network",O.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:t}),r._defaultProvider({FallbackProvider:w1,AlchemyProvider:Lh,AnkrProvider:g1,CloudflareProvider:v1,EtherscanProvider:y1,InfuraProvider:Bh,JsonRpcProvider:vi,NodesmithProvider:b1,PocketProvider:A1,Web3Provider:_1,IpcProvider:E1},e)}const uS=Object.freeze(Object.defineProperty({__proto__:null,AlchemyProvider:Lh,AlchemyWebSocketProvider:m1,AnkrProvider:g1,BaseProvider:Hu,CloudflareProvider:v1,EtherscanProvider:y1,FallbackProvider:w1,Formatter:te,InfuraProvider:Bh,InfuraWebSocketProvider:x1,IpcProvider:E1,JsonRpcBatchProvider:iS,JsonRpcProvider:vi,JsonRpcSigner:Oh,NodesmithProvider:b1,PocketProvider:A1,Provider:qo,Resolver:yd,StaticJsonRpcProvider:p1,UrlJsonRpcProvider:Fn,Web3Provider:_1,WebSocketProvider:qu,getDefaultProvider:aS,getNetwork:Th,isCommunityResourcable:c1,isCommunityResource:vd,showThrottleMessage:_l},Symbol.toStringTag,{value:"Module"})),cS="solidity/5.7.0",fS=new RegExp("^bytes([0-9]+)$"),dS=new RegExp("^(u?int)([0-9]*)$"),hS=new RegExp("^(.*)\\[([0-9]*)\\]$"),pS="0000000000000000000000000000000000000000000000000000000000000000",Yi=new O(cS);function S1(t,e,r){switch(t){case"address":return r?pa(e,32):se(e);case"string":return mr(e);case"bytes":return se(e);case"bool":return e=e?"0x01":"0x00",r?pa(e,32):se(e)}let n=t.match(dS);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Yi.throwArgumentError("invalid number type","type",t),r&&(i=256),e=G.from(e).toTwos(i),pa(e,i/8)}if(n=t.match(fS),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Yi.throwArgumentError("invalid bytes type","type",t),se(e).byteLength!==i&&Yi.throwArgumentError(`invalid value for ${t}`,"value",e),r?se((e+pS).substring(0,66)):e}if(n=t.match(hS),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Yi.throwArgumentError(`invalid array length for ${t}`,"value",e);const s=[];return e.forEach(function(l){s.push(S1(i,l,!0))}),Ut(s)}return Yi.throwArgumentError("invalid type","type",t)}function mS(t,e){t.length!=e.length&&Yi.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(S1(n,e[i]))}),re(Ut(r))}function gS(t,e){return ut(mS(t,e))}var Wu={},Cn={},k1={};const vS=Uo(nb);var yS={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const fm=t=>{let e;const r=new Set,n=(a,u)=>{const c=typeof a=="function"?a(e):a;if(!Object.is(c,e)){const d=e;e=u??typeof c!="object"?c:Object.assign({},e,c),r.forEach(m=>m(e,d))}},i=()=>e,l={setState:n,getState:i,subscribe:a=>(r.add(a),()=>r.delete(a)),destroy:()=>{(yS?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,i,l),l},N1=t=>t?fm(t):fm;var P1={exports:{}},C1={},M1={exports:{}},I1={};/** + */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",s=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?i=Fe:o&&(i=self);var l=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,a=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],d=[4,1024,262144,67108864],m=[1,256,65536,16777216],g=[6,1536,393216,100663296],v=[0,8,16,24],E=[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],N=[224,256,384,512],x=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(y){return Object.prototype.toString.call(y)==="[object Array]"}),a&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(y){return typeof y=="object"&&y.buffer&&y.buffer.constructor===ArrayBuffer});for(var T=function(y,j,U){return function(F){return new h(y,j,y).update(F)[U]()}},B=function(y,j,U){return function(F,W){return new h(y,j,W).update(F)[U]()}},D=function(y,j,U){return function(F,W,oe,J){return f["cshake"+y].update(F,W,oe,J)[U]()}},$=function(y,j,U){return function(F,W,oe,J){return f["kmac"+y].update(F,W,oe,J)[U]()}},H=function(y,j,U,F){for(var W=0;W>5,this.byteCount=this.blockCount<<2,this.outputBlocks=U>>5,this.extraBytes=(U&31)>>3;for(var F=0;F<50;++F)this.s[F]=0}h.prototype.update=function(y){if(this.finalized)throw new Error(r);var j,U=typeof y;if(U!=="string"){if(U==="object"){if(y===null)throw new Error(e);if(a&&y.constructor===ArrayBuffer)y=new Uint8Array(y);else if(!Array.isArray(y)&&(!a||!ArrayBuffer.isView(y)))throw new Error(e)}else throw new Error(e);j=!0}for(var F=this.blocks,W=this.byteCount,oe=y.length,J=this.blockCount,V=0,Je=this.s,K,le;V>2]|=y[V]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|le&63)<=57344?(F[K>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<=W){for(this.start=K-W,this.block=F[J],K=0;K>8,U=y&255;U>0;)W.unshift(U),y=y>>8,U=y&255,++F;return j?W.push(F):W.unshift(F),this.update(W),W.length},h.prototype.encodeString=function(y){var j,U=typeof y;if(U!=="string"){if(U==="object"){if(y===null)throw new Error(e);if(a&&y.constructor===ArrayBuffer)y=new Uint8Array(y);else if(!Array.isArray(y)&&(!a||!ArrayBuffer.isView(y)))throw new Error(e)}else throw new Error(e);j=!0}var F=0,W=y.length;if(j)F=W;else for(var oe=0;oe=57344?F+=3:(J=65536+((J&1023)<<10|y.charCodeAt(++oe)&1023),F+=4)}return F+=this.encode(F*8),this.update(y),F},h.prototype.bytepad=function(y,j){for(var U=this.encode(j),F=0;F>2]|=this.padding[j&3],this.lastByteIndex===this.byteCount)for(y[0]=y[U],j=1;j>4&15]+u[V&15]+u[V>>12&15]+u[V>>8&15]+u[V>>20&15]+u[V>>16&15]+u[V>>28&15]+u[V>>24&15];oe%y===0&&(Z(j),W=0)}return F&&(V=j[W],J+=u[V>>4&15]+u[V&15],F>1&&(J+=u[V>>12&15]+u[V>>8&15]),F>2&&(J+=u[V>>20&15]+u[V>>16&15])),J},h.prototype.arrayBuffer=function(){this.finalize();var y=this.blockCount,j=this.s,U=this.outputBlocks,F=this.extraBytes,W=0,oe=0,J=this.outputBits>>3,V;F?V=new ArrayBuffer(U+1<<2):V=new ArrayBuffer(J);for(var Je=new Uint32Array(V);oe>8&255,J[V+2]=Je>>16&255,J[V+3]=Je>>24&255;oe%y===0&&Z(j)}return F&&(V=oe<<2,Je=j[W],J[V]=Je&255,F>1&&(J[V+1]=Je>>8&255),F>2&&(J[V+2]=Je>>16&255)),J};function C(y,j,U){h.call(this,y,j,U)}C.prototype=new h,C.prototype.finalize=function(){return this.encode(this.outputBits,!0),h.prototype.finalize.call(this)};var Z=function(y){var j,U,F,W,oe,J,V,Je,K,le,Qr,Te,Ne,Jr,Pe,ce,wr,fe,Oe,Yr,me,ze,gn,$e,He,Ht,Le,qe,Rr,Ce,We,vn,Be,Ge,yn,je,ne,ot,ge,de,rt,Ae,_e,Ct,Me,De,Kt,Ve,Ke,Qt,Ie,Ue,xr,ke,Ye,bi,Xe,Ze,$n,Hn,qn,Wn,Gn;for(F=0;F<48;F+=2)W=y[0]^y[10]^y[20]^y[30]^y[40],oe=y[1]^y[11]^y[21]^y[31]^y[41],J=y[2]^y[12]^y[22]^y[32]^y[42],V=y[3]^y[13]^y[23]^y[33]^y[43],Je=y[4]^y[14]^y[24]^y[34]^y[44],K=y[5]^y[15]^y[25]^y[35]^y[45],le=y[6]^y[16]^y[26]^y[36]^y[46],Qr=y[7]^y[17]^y[27]^y[37]^y[47],Te=y[8]^y[18]^y[28]^y[38]^y[48],Ne=y[9]^y[19]^y[29]^y[39]^y[49],j=Te^(J<<1|V>>>31),U=Ne^(V<<1|J>>>31),y[0]^=j,y[1]^=U,y[10]^=j,y[11]^=U,y[20]^=j,y[21]^=U,y[30]^=j,y[31]^=U,y[40]^=j,y[41]^=U,j=W^(Je<<1|K>>>31),U=oe^(K<<1|Je>>>31),y[2]^=j,y[3]^=U,y[12]^=j,y[13]^=U,y[22]^=j,y[23]^=U,y[32]^=j,y[33]^=U,y[42]^=j,y[43]^=U,j=J^(le<<1|Qr>>>31),U=V^(Qr<<1|le>>>31),y[4]^=j,y[5]^=U,y[14]^=j,y[15]^=U,y[24]^=j,y[25]^=U,y[34]^=j,y[35]^=U,y[44]^=j,y[45]^=U,j=Je^(Te<<1|Ne>>>31),U=K^(Ne<<1|Te>>>31),y[6]^=j,y[7]^=U,y[16]^=j,y[17]^=U,y[26]^=j,y[27]^=U,y[36]^=j,y[37]^=U,y[46]^=j,y[47]^=U,j=le^(W<<1|oe>>>31),U=Qr^(oe<<1|W>>>31),y[8]^=j,y[9]^=U,y[18]^=j,y[19]^=U,y[28]^=j,y[29]^=U,y[38]^=j,y[39]^=U,y[48]^=j,y[49]^=U,Jr=y[0],Pe=y[1],De=y[11]<<4|y[10]>>>28,Kt=y[10]<<4|y[11]>>>28,qe=y[20]<<3|y[21]>>>29,Rr=y[21]<<3|y[20]>>>29,Hn=y[31]<<9|y[30]>>>23,qn=y[30]<<9|y[31]>>>23,Ae=y[40]<<18|y[41]>>>14,_e=y[41]<<18|y[40]>>>14,Ge=y[2]<<1|y[3]>>>31,yn=y[3]<<1|y[2]>>>31,ce=y[13]<<12|y[12]>>>20,wr=y[12]<<12|y[13]>>>20,Ve=y[22]<<10|y[23]>>>22,Ke=y[23]<<10|y[22]>>>22,Ce=y[33]<<13|y[32]>>>19,We=y[32]<<13|y[33]>>>19,Wn=y[42]<<2|y[43]>>>30,Gn=y[43]<<2|y[42]>>>30,ke=y[5]<<30|y[4]>>>2,Ye=y[4]<<30|y[5]>>>2,je=y[14]<<6|y[15]>>>26,ne=y[15]<<6|y[14]>>>26,fe=y[25]<<11|y[24]>>>21,Oe=y[24]<<11|y[25]>>>21,Qt=y[34]<<15|y[35]>>>17,Ie=y[35]<<15|y[34]>>>17,vn=y[45]<<29|y[44]>>>3,Be=y[44]<<29|y[45]>>>3,$e=y[6]<<28|y[7]>>>4,He=y[7]<<28|y[6]>>>4,bi=y[17]<<23|y[16]>>>9,Xe=y[16]<<23|y[17]>>>9,ot=y[26]<<25|y[27]>>>7,ge=y[27]<<25|y[26]>>>7,Yr=y[36]<<21|y[37]>>>11,me=y[37]<<21|y[36]>>>11,Ue=y[47]<<24|y[46]>>>8,xr=y[46]<<24|y[47]>>>8,Ct=y[8]<<27|y[9]>>>5,Me=y[9]<<27|y[8]>>>5,Ht=y[18]<<20|y[19]>>>12,Le=y[19]<<20|y[18]>>>12,Ze=y[29]<<7|y[28]>>>25,$n=y[28]<<7|y[29]>>>25,de=y[38]<<8|y[39]>>>24,rt=y[39]<<8|y[38]>>>24,ze=y[48]<<14|y[49]>>>18,gn=y[49]<<14|y[48]>>>18,y[0]=Jr^~ce&fe,y[1]=Pe^~wr&Oe,y[10]=$e^~Ht&qe,y[11]=He^~Le&Rr,y[20]=Ge^~je&ot,y[21]=yn^~ne&ge,y[30]=Ct^~De&Ve,y[31]=Me^~Kt&Ke,y[40]=ke^~bi&Ze,y[41]=Ye^~Xe&$n,y[2]=ce^~fe&Yr,y[3]=wr^~Oe&me,y[12]=Ht^~qe&Ce,y[13]=Le^~Rr&We,y[22]=je^~ot&de,y[23]=ne^~ge&rt,y[32]=De^~Ve&Qt,y[33]=Kt^~Ke&Ie,y[42]=bi^~Ze&Hn,y[43]=Xe^~$n&qn,y[4]=fe^~Yr&ze,y[5]=Oe^~me&gn,y[14]=qe^~Ce&vn,y[15]=Rr^~We&Be,y[24]=ot^~de&Ae,y[25]=ge^~rt&_e,y[34]=Ve^~Qt&Ue,y[35]=Ke^~Ie&xr,y[44]=Ze^~Hn&Wn,y[45]=$n^~qn&Gn,y[6]=Yr^~ze&Jr,y[7]=me^~gn&Pe,y[16]=Ce^~vn&$e,y[17]=We^~Be&He,y[26]=de^~Ae&Ge,y[27]=rt^~_e&yn,y[36]=Qt^~Ue&Ct,y[37]=Ie^~xr&Me,y[46]=Hn^~Wn&ke,y[47]=qn^~Gn&Ye,y[8]=ze^~Jr&ce,y[9]=gn^~Pe&wr,y[18]=vn^~$e&Ht,y[19]=Be^~He&Le,y[28]=Ae^~Ge&je,y[29]=_e^~yn&ne,y[38]=Ue^~Ct&De,y[39]=xr^~Me&Kt,y[48]=Wn^~ke&bi,y[49]=Gn^~Ye&Xe,y[0]^=E[F],y[1]^=E[F+1]};if(l)t.exports=f;else for(A=0;A>=8;return e}function gp(t,e,r){let n=0;for(let i=0;ie+1+n&&tn.throwError("child data too short",O.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function dy(t,e){if(t.length===0&&tn.throwError("data too short",O.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&tn.throwError("data short segment too short",O.errors.BUFFER_OVERRUN,{});const n=gp(t,e+1,r);return e+1+r+n>t.length&&tn.throwError("data long segment too short",O.errors.BUFFER_OVERRUN,{}),vp(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&tn.throwError("data array too short",O.errors.BUFFER_OVERRUN,{}),vp(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&tn.throwError("data array too short",O.errors.BUFFER_OVERRUN,{});const n=gp(t,e+1,r);e+1+r+n>t.length&&tn.throwError("data array too short",O.errors.BUFFER_OVERRUN,{});const i=re(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&tn.throwError("data too short",O.errors.BUFFER_OVERRUN,{});const n=re(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:re(t[e])}}function Sh(t){const e=se(t),r=dy(e,0);return r.consumed!==e.length&&tn.throwArgumentError("invalid rlp data","data",t),r.result}const YE="address/5.7.0",oi=new O(YE);function yp(t){pe(t,20)||oi.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=se(ut(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const XE=9007199254740991;function ZE(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const kh={};for(let t=0;t<10;t++)kh[String(t)]=String(t);for(let t=0;t<26;t++)kh[String.fromCharCode(65+t)]=String(10+t);const wp=Math.floor(ZE(XE));function hy(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>kh[n]).join("");for(;e.length>=wp;){let n=e.substring(0,wp);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function mt(t){let e=null;if(typeof t!="string"&&oi.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=yp(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&oi.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==hy(t)&&oi.throwArgumentError("bad icap checksum","address",t),e=LE(t.substring(4));e.length<40;)e="0"+e;e=yp("0x"+e)}else oi.throwArgumentError("invalid address","address",t);return e}function eb(t){try{return mt(t),!0}catch{}return!1}function tb(t){let e=BE(mt(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+hy("XE00"+e)+e}function Nh(t){let e=null;try{e=mt(t.from)}catch{oi.throwArgumentError("missing from address","transaction",t)}const r=To(se(G.from(t.nonce).toHexString()));return mt(It(ut(Bu([e,r])),12))}function rb(t,e,r){return On(e)!==32&&oi.throwArgumentError("salt must be 32 bytes","salt",e),On(r)!==32&&oi.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),mt(It(ut(Ut(["0xff",mt(t),e,r])),12))}const nb=Object.freeze(Object.defineProperty({__proto__:null,getAddress:mt,getContractAddress:Nh,getCreate2Address:rb,getIcapAddress:tb,isAddress:eb},Symbol.toStringTag,{value:"Module"}));class ib extends Dn{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=mt(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return mt(pt(e.readValue().toHexString(),20))}}class ob extends Dn{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const fo=new O(wl);function py(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let a={};n=e.map(u=>{const c=u.localName;return c||fo.throwError("cannot encode object for signature with missing names",O.errors.INVALID_ARGUMENT,{argument:"values",coder:u,value:r}),a[c]&&fo.throwError("cannot encode object for signature with duplicate names",O.errors.INVALID_ARGUMENT,{argument:"values",coder:u,value:r}),a[c]=!0,r[c]})}else fo.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&fo.throwArgumentError("types/value length mismatch","tuple",r);let i=new ld(t.wordSize),o=new ld(t.wordSize),s=[];e.forEach((a,u)=>{let c=n[u];if(a.dynamic){let d=o.length;a.encode(o,c);let m=i.writeUpdatableValue();s.push(g=>{m(g+d)})}else a.encode(i,c)}),s.forEach(a=>{a(i.length)});let l=t.appendWriter(i);return l+=t.appendWriter(o),l}function my(t,e){let r=[],n=t.subReader(0);e.forEach(o=>{let s=null;if(o.dynamic){let l=t.readValue(),a=n.subReader(l.toNumber());try{s=o.decode(a)}catch(u){if(u.code===O.errors.BUFFER_OVERRUN)throw u;s=u,s.baseType=o.name,s.name=o.localName,s.type=o.type}}else try{s=o.decode(t)}catch(l){if(l.code===O.errors.BUFFER_OVERRUN)throw l;s=l,s.baseType=o.name,s.name=o.localName,s.type=o.type}s!=null&&r.push(s)});const i=e.reduce((o,s)=>{const l=s.localName;return l&&(o[l]||(o[l]=0),o[l]++),o},{});e.forEach((o,s)=>{let l=o.localName;if(!l||i[l]!==1||(l==="length"&&(l="_length"),r[l]!=null))return;const a=r[s];a instanceof Error?Object.defineProperty(r,l,{enumerable:!0,get:()=>{throw a}}):r[l]=a});for(let o=0;o{throw s}})}return Object.freeze(r)}class sb extends Dn{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",o=r===-1||e.dynamic;super("array",i,n,o),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&fo.throwError("insufficient data length",O.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;s++)o++;return o}return t===ar.OVERRUN?r.length-e-1:0}function wb(t,e,r,n,i){return t===ar.OVERLONG?(n.push(i),0):(n.push(65533),wy(t,e,r))}const xb=Object.freeze({error:yb,ignore:wy,replace:wb});function xy(t,e){e==null&&(e=xb.error),t=se(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let o=null,s=null;if((i&224)===192)o=1,s=127;else if((i&240)===224)o=2,s=2047;else if((i&248)===240)o=3,s=65535;else{(i&192)===128?n+=e(ar.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(ar.BAD_PREFIX,n-1,t,r);continue}if(n-1+o>=t.length){n+=e(ar.OVERRUN,n-1,t,r);continue}let l=i&(1<<8-o-1)-1;for(let a=0;a1114111){n+=e(ar.OUT_OF_RANGE,n-1-o,t,r,l);continue}if(l>=55296&&l<=57343){n+=e(ar.UTF16_SURROGATE,n-1-o,t,r,l);continue}if(l<=s){n+=e(ar.OVERLONG,n-1-o,t,r,l);continue}r.push(l)}}return r}function mr(t,e=nl.current){e!=nl.current&&(yy.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const o=t.charCodeAt(n);if(n>=t.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");const s=65536+((i&1023)<<10)+(o&1023);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return se(r)}function Eb(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function xl(t,e){return Eb(xy(t,e))}function bb(t,e=nl.current){return xy(mr(t,e))}class Ab extends gy{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,mr(r))}decode(e){return xl(super.decode(e))}}class Hl extends Dn{constructor(e,r){let n=!1;const i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});const o="tuple("+i.join(",")+")";super("tuple",o,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const o=i.localName;return o&&(n[o]||(n[o]=0),n[o]++),n},{});return this.coders.forEach((n,i)=>{let o=n.localName;!o||r[o]!==1||(o==="length"&&(o="_length"),e[o]==null&&(e[o]=e[i]))}),Object.freeze(e)}encode(e,r){return py(e,this.coders,r)}decode(e){return e.coerce(this.name,my(e,this.coders))}}const ql=new O(wl),_b=new RegExp(/^bytes([0-9]*)$/),Sb=new RegExp(/^(u?int)([0-9]*)$/);class kb{constructor(e){z(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new ib(e.name);case"bool":return new lb(e.name);case"string":return new Ab(e.name);case"bytes":return new ab(e.name);case"array":return new sb(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Hl((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new cb(e.name)}let r=e.type.match(Sb);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&ql.throwArgumentError("invalid "+r[1]+" bit length","param",e),new gb(n/8,r[1]==="int",e.name)}if(r=e.type.match(_b),r){let n=parseInt(r[1]);return(n===0||n>32)&&ql.throwArgumentError("invalid bytes length","param",e),new ub(n,e.name)}return ql.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new Xa(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new ld(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(kt.from(i)));return new Hl(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&ql.throwError("types/values length mismatch",O.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(s=>this._getCoder(kt.from(s))),i=new Hl(n,"_"),o=this._getWriter();return i.encode(o,r),o.data}decode(e,r,n){const i=e.map(s=>this._getCoder(kt.from(s)));return new Hl(i,"_").decode(this._getReader(se(r),n))}}const Nb=new kb;function ho(t){return ut(mr(t))}const Ey="hash/5.7.0";function by(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(l)?i(l,s-1):r.push(l)})};return i(t,e),r}function Pb(t){const e={};for(let r=0;r>--a&1}const d=31,m=Math.pow(2,d),g=m>>>1,v=g>>1,E=m-1;let N=0;for(let B=0;B1;){let Q=D+$>>>1;B>>1|c(),H=H<<1^g,Y=(Y^g)<<1|g|1;w=H,b=1+Y-H}let T=n-4;return x.map(B=>{switch(B-T){case 3:return T+65792+(t[l++]<<16|t[l++]<<8|t[l++]);case 2:return T+256+(t[l++]<<8|t[l++]);case 1:return T+t[l++];default:return B-1}})}function Mb(t){let e=0;return()=>t[e++]}function Ib(t){return Mb(Cb(t))}function Rb(t){return t&1?~t>>1:t>>1}function Tb(t,e){let r=Array(t);for(let n=0;ne[s]):r}function Lb(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(jb(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Db(r,t))}return Pb(_y(e))}function Bb(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function Sy(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[s].push(o));return n}function jb(t,e){let r=1+e(),n=e(),i=Bb(e),o=Sy(i.length,1+t,e);return _y(o.map((s,l)=>{const a=s[0],u=s.slice(1);return Array(i[l]).fill(void 0).map((c,d)=>{let m=d*n;return[a+d*r,u.map(g=>g+m)]})}))}function Db(t,e){let r=1+e();return Sy(r,1+t,e).map(i=>[i[0],i.slice(1)])}function Ub(t){let e=Za(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let u=Za(t,e);if(u.length==0)break;n.push({set:new Set(u),node:r()})}n.sort((u,c)=>c.set.size-u.set.size);let i=t(),o=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let l=i==1,a=i==2;return{branches:n,valid:o,fe0f:s,save:l,check:a}}}function Fb(){return Ib(by("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const ju=Fb(),zb=new Set(Za(ju)),$b=new Set(Za(ju)),Hb=Lb(ju),qb=Ub(ju),Ep=45,bp=95;function ky(t){return bb(t)}function Wb(t){return t.filter(e=>e!=65039)}function Ny(t){for(let e of t.split(".")){let r=ky(e);try{for(let n=r.lastIndexOf(bp)-1;n>=0;n--)if(r[n]!==bp)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===Ep&&r[3]===Ep)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function Gb(t){return Ny(Vb(t,Wb))}function Vb(t,e){let r=ky(t).reverse(),n=[];for(;r.length;){let i=Qb(r);if(i){n.push(...e(i));continue}let o=r.pop();if(zb.has(o)){n.push(o);continue}if($b.has(o))continue;let s=Hb[o];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${o.toString(16).toUpperCase()}`)}return Ny(Kb(String.fromCodePoint(...n)))}function Kb(t){return t.normalize("NFC")}function Qb(t,e){var r;let n=qb,i,o,s=[],l=t.length;for(e&&(e.length=0);l;){let a=t[--l];if(n=(r=n.branches.find(u=>u.set.has(a)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)o=a;else if(n.check&&a===o)break;s.push(a),n.fe0f&&(s.push(65039),l>0&&t[l-1]==65039&&l--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(l).reverse()),t.length=l)}return i}const Jb=new O(Ey),Py=new Uint8Array(32);Py.fill(0);function Ap(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function Cy(t){const e=mr(Gb(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(Ap(e.slice(n))),r}function ga(t){typeof t!="string"&&Jb.throwArgumentError("invalid ENS name; not a string","name",t);let e=Py;const r=Cy(t);for(;r.length;)e=ut(Ut([e,ut(r.pop())]));return re(e)}function Yb(t){return re(Ut(Cy(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}var Xb=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const lt=new O(Ey),My=new Uint8Array(32);My.fill(0);const Zb=G.from(-1),Iy=G.from(0),Ry=G.from(1),eA=G.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function tA(t){const e=se(t),r=e.length%32;return r?Xt([e,My.slice(r)]):re(e)}const rA=pt(Ry.toHexString(),32),nA=pt(Iy.toHexString(),32),_p={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},$c=["name","version","chainId","verifyingContract","salt"];function Sp(t){return function(e){return typeof e!="string"&<.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const iA={name:Sp("name"),version:Sp("version"),chainId:function(t){try{return G.from(t).toString()}catch{}return lt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return mt(t).toLowerCase()}catch{}return lt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=se(t);if(e.length!==32)throw new Error("bad length");return re(e)}catch{}return lt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Hc(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&<.throwArgumentError("invalid numeric width","type",t);const i=eA.mask(r?n-1:n),o=r?i.add(Ry).mul(Zb):Iy;return function(s){const l=G.from(s);return(l.lt(o)||l.gt(i))&<.throwArgumentError(`value out-of-bounds for ${t}`,"value",s),pt(l.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&<.throwArgumentError("invalid bytes width","type",t),function(n){return se(n).length!==r&<.throwArgumentError(`invalid length for ${t}`,"value",n),tA(n)}}}switch(t){case"address":return function(e){return pt(mt(e),32)};case"bool":return function(e){return e?rA:nA};case"bytes":return function(e){return ut(e)};case"string":return function(e){return ho(e)}}return null}function kp(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class sr{constructor(e){z(this,"types",Object.freeze(nr(e))),z(this,"_encoderCache",{}),z(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(l=>{r[l]={},n[l]=[],i[l]={}});for(const l in e){const a={};e[l].forEach(u=>{a[u.name]&<.throwArgumentError(`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(l)}`,"types",e),a[u.name]=!0;const c=u.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===l&<.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!Hc(c)&&(n[c]||lt.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(l),r[l][c]=!0)})}const o=Object.keys(n).filter(l=>n[l].length===0);o.length===0?lt.throwArgumentError("missing primary type","types",e):o.length>1&<.throwArgumentError(`ambiguous primary types or unused types: ${o.map(l=>JSON.stringify(l)).join(", ")}`,"types",e),z(this,"primaryType",o[0]);function s(l,a){a[l]&<.throwArgumentError(`circular type reference to ${JSON.stringify(l)}`,"types",e),a[l]=!0,Object.keys(r[l]).forEach(u=>{n[u]&&(s(u,a),Object.keys(a).forEach(c=>{i[c][u]=!0}))}),delete a[l]}s(this.primaryType,{});for(const l in i){const a=Object.keys(i[l]);a.sort(),this._types[l]=kp(l,e[l])+a.map(u=>kp(u,e[u])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=Hc(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],o=this.getEncoder(i),s=parseInt(r[3]);return l=>{s>=0&&l.length!==s&<.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",l);let a=l.map(o);return this._types[i]&&(a=a.map(ut)),ut(Xt(a))}}const n=this.types[e];if(n){const i=ho(this._types[e]);return o=>{const s=n.map(({name:l,type:a})=>{const u=this.getEncoder(a)(o[l]);return this._types[a]?ut(u):u});return s.unshift(i),Xt(s)}}return lt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||lt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return ut(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(Hc(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const s=i[1],l=parseInt(i[3]);return l>=0&&r.length!==l&<.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(a=>this._visit(s,a,n))}const o=this.types[e];return o?o.reduce((s,{name:l,type:a})=>(s[l]=this._visit(a,r[l],n),s),{}):lt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new sr(e)}static getPrimaryType(e){return sr.from(e).primaryType}static hashStruct(e,r,n){return sr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=_p[n];i||lt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>$c.indexOf(n.name)-$c.indexOf(i.name)),sr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Xt(["0x1901",sr.hashDomain(e),sr.from(r).hash(n)])}static hash(e,r,n){return ut(sr.encode(e,r,n))}static resolveNames(e,r,n,i){return Xb(this,void 0,void 0,function*(){e=it(e);const o={};e.verifyingContract&&!pe(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=sr.from(r);s.visit(n,(l,a)=>(l==="address"&&!pe(a,20)&&(o[a]="0x"),a));for(const l in o)o[l]=yield i(l);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),n=s.visit(n,(l,a)=>l==="address"&&o[a]?o[a]:a),{domain:e,value:n}})}static getPayload(e,r,n){sr.hashDomain(e);const i={},o=[];$c.forEach(a=>{const u=e[a];u!=null&&(i[a]=iA[a](u),o.push({name:a,type:_p[a]}))});const s=sr.from(r),l=it(r);return l.EIP712Domain?lt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):l.EIP712Domain=o,s.encode(n),{types:l,domain:i,primaryType:s.primaryType,message:s.visit(n,(a,u)=>{if(a.match(/^bytes(\d*)/))return re(se(u));if(a.match(/^u?int/))return G.from(u).toString();switch(a){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return typeof u!="string"&<.throwArgumentError("invalid string","value",u),u}return lt.throwArgumentError("unsupported type","type",a)})}}}const st=new O(wl);class oA extends yl{}class sA extends yl{}class lA extends yl{}class ad extends yl{static isIndexed(e){return!!(e&&e._isIndexed)}}const aA={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Np(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class ud{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,z(this,"fragments",r.map(n=>Nn.from(n)).filter(n=>n!=null)),z(this,"_abiCoder",fr(new.target,"getAbiCoder")()),z(this,"functions",{}),z(this,"errors",{}),z(this,"events",{}),z(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){st.warn("duplicate definition - constructor");return}z(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let o=n.format();if(i[o]){st.warn("duplicate definition - "+o);return}i[o]=n}),this.deploy||z(this,"deploy",on.from({payable:!1,type:"constructor"})),z(this,"_isInterface",!0)}format(e){e||(e=Se.full),e===Se.sighash&&st.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Se.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Nb}static getAddress(e){return mt(e)}static getSighash(e){return It(ho(e.format()),0,4)}static getEventTopic(e){return ho(e.format())}getFunction(e){if(pe(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];st.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(o=>o.split("(")[0]===n);return i.length===0?st.throwArgumentError("no matching function","name",n):i.length>1&&st.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[sn.fromString(e).format()];return r||st.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(pe(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];st.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(o=>o.split("(")[0]===n);return i.length===0?st.throwArgumentError("no matching event","name",n):i.length>1&&st.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[_n.fromString(e).format()];return r||st.throwArgumentError("no matching event","signature",e),r}getError(e){if(pe(e)){const n=fr(this.constructor,"getSighash");for(const i in this.errors){const o=this.errors[i];if(e===n(o))return this.errors[i]}st.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(o=>o.split("(")[0]===n);return i.length===0?st.throwArgumentError("no matching error","name",n):i.length>1&&st.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[sn.fromString(e).format()];return r||st.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return fr(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),fr(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=se(r);return re(n.slice(0,4))!==this.getSighash(e)&&st.throwArgumentError(`data signature does not match error ${e.name}.`,"data",re(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),re(Ut([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=se(r);return re(n.slice(0,4))!==this.getSighash(e)&&st.throwArgumentError(`data signature does not match function ${e.name}.`,"data",re(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),re(Ut([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=se(r),i=null,o="",s=null,l=null,a=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const u=re(n.slice(0,4)),c=aA[u];if(c)s=this._abiCoder.decode(c.inputs,n.slice(4)),l=c.name,a=c.signature,c.reason&&(i=s[0]),l==="Error"?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:l==="Panic"&&(o=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{const d=this.getError(u);s=this._abiCoder.decode(d.inputs,n.slice(4)),l=d.name,a=d.format()}catch{}break}}return st.throwError("call revert exception"+o,O.errors.CALL_EXCEPTION,{method:e.format(),data:re(r),errorArgs:s,errorName:l,errorSignature:a,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),re(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&st.throwError("too many arguments for "+e.format(),O.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(o,s)=>o.type==="string"?ho(s):o.type==="bytes"?ut(re(s)):(o.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),o.type.match(/^u?int/)&&(s=G.from(s).toHexString()),o.type==="address"&&this._abiCoder.encode(["address"],[s]),pt(re(s),32));for(r.forEach((o,s)=>{let l=e.inputs[s];if(!l.indexed){o!=null&&st.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+l.name,o);return}o==null?n.push(null):l.baseType==="array"||l.baseType==="tuple"?st.throwArgumentError("filtering with tuples or arrays not supported","contract."+l.name,o):Array.isArray(o)?n.push(o.map(a=>i(l,a))):n.push(i(l,o))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&st.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((s,l)=>{const a=r[l];if(s.indexed)if(s.type==="string")n.push(ho(a));else if(s.type==="bytes")n.push(ut(a));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[a]))}else i.push(s),o.push(a)}),{data:this._abiCoder.encode(i,o),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let m=this.getEventTopic(e);(!pe(n[0],32)||n[0].toLowerCase()!==m)&&st.throwError("fragment/topic mismatch",O.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:m,value:n[0]}),n=n.slice(1)}let i=[],o=[],s=[];e.inputs.forEach((m,g)=>{m.indexed?m.type==="string"||m.type==="bytes"||m.baseType==="tuple"||m.baseType==="array"?(i.push(kt.fromObject({type:"bytes32",name:m.name})),s.push(!0)):(i.push(m),s.push(!1)):(o.push(m),s.push(!1))});let l=n!=null?this._abiCoder.decode(i,Ut(n)):null,a=this._abiCoder.decode(o,r,!0),u=[],c=0,d=0;e.inputs.forEach((m,g)=>{if(m.indexed)if(l==null)u[g]=new ad({_isIndexed:!0,hash:null});else if(s[g])u[g]=new ad({_isIndexed:!0,hash:l[d++]});else try{u[g]=l[d++]}catch(v){u[g]=v}else try{u[g]=a[c++]}catch(v){u[g]=v}if(m.name&&u[m.name]==null){const v=u[g];v instanceof Error?Object.defineProperty(u,m.name,{enumerable:!0,get:()=>{throw Np(`property ${JSON.stringify(m.name)}`,v)}}):u[m.name]=v}});for(let m=0;m{throw Np(`index ${m}`,g)}})}return Object.freeze(u)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new sA({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:G.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new oA({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=re(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new lA({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const uA="abstract-provider/5.7.0";var cA=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const fA=new O(uA);class dA extends yl{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Wo{constructor(){fA.checkAbstract(new.target,Wo),z(this,"_isProvider",!0)}getFeeData(){return cA(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield yt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)});let n=null,i=null,o=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,o=G.from("1500000000"),i=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const hA="abstract-signer/5.7.0";var Or=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const br=new O(hA),pA=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],mA=[O.errors.INSUFFICIENT_FUNDS,O.errors.NONCE_EXPIRED,O.errors.REPLACEMENT_UNDERPRICED];class El{constructor(){br.checkAbstract(new.target,El),z(this,"_isSigner",!0)}getBalance(e){return Or(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Or(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Or(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield yt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Or(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield yt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Or(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return Or(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Or(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Or(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Or(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)pA.indexOf(n)===-1&&br.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=it(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&br.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Or(this,void 0,void 0,function*(){const r=yield yt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Or(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&br.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?br.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&br.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const o=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=o,r.maxPriorityFeePerGas=o}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&br.throwError("network does not support EIP-1559",O.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):br.throwError("failed to get consistent fee data",O.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(mA.indexOf(i.code)>=0)throw i;return br.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&br.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield yt(r)})}_checkProvider(e){this.provider||br.throwError("missing provider",O.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class Ph extends El{constructor(e,r){super(),z(this,"address",e),z(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{br.throwError(e,O.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new Ph(this.address,e)}}var Ty={},we={},bl=Oy;function Oy(t,e){if(!t)throw new Error(e||"Assertion failed")}Oy.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var cd={exports:{}};typeof Object.create=="function"?cd.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:cd.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var gA=cd.exports,vA=bl,yA=gA;we.inherits=yA;function wA(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function xA(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=o&63|128):wA(t,i)?(o=65536+((o&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=o&63|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=o&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}we.htonl=Ly;function bA(t,e){for(var r="",n=0;n>>0}return o}we.join32=AA;function _A(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=o&255):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=o&255)}return r}we.split32=_A;function SA(t,e){return t>>>e|t<<32-e}we.rotr32=SA;function kA(t,e){return t<>>32-e}we.rotl32=kA;function NA(t,e){return t+e>>>0}we.sum32=NA;function PA(t,e,r){return t+e+r>>>0}we.sum32_3=PA;function CA(t,e,r,n){return t+e+r+n>>>0}we.sum32_4=CA;function MA(t,e,r,n,i){return t+e+r+n+i>>>0}we.sum32_5=MA;function IA(t,e,r,n){var i=t[e],o=t[e+1],s=n+o>>>0,l=(s>>0,t[e+1]=s}we.sum64=IA;function RA(t,e,r,n){var i=e+n>>>0,o=(i>>0}we.sum64_hi=RA;function TA(t,e,r,n){var i=e+n;return i>>>0}we.sum64_lo=TA;function OA(t,e,r,n,i,o,s,l){var a=0,u=e;u=u+n>>>0,a+=u>>0,a+=u>>0,a+=u>>0}we.sum64_4_hi=OA;function LA(t,e,r,n,i,o,s,l){var a=e+n+o+l;return a>>>0}we.sum64_4_lo=LA;function BA(t,e,r,n,i,o,s,l,a,u){var c=0,d=e;d=d+n>>>0,c+=d>>0,c+=d>>0,c+=d>>0,c+=d>>0}we.sum64_5_hi=BA;function jA(t,e,r,n,i,o,s,l,a,u){var c=e+n+o+l+u;return c>>>0}we.sum64_5_lo=jA;function DA(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}we.rotr64_hi=DA;function UA(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}we.rotr64_lo=UA;function FA(t,e,r){return t>>>r}we.shr64_hi=FA;function zA(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}we.shr64_lo=zA;var Go={},Pp=we,$A=bl;function Du(){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}Go.BlockHash=Du;Du.prototype.update=function(e,r){if(e=Pp.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Pp.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=e&255}else for(i[o++]=e&255,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,s=8;s>>3}mn.g0_256=VA;function KA(t){return un(t,17)^un(t,19)^t>>>10}mn.g1_256=KA;var Oo=we,QA=Go,JA=mn,qc=Oo.rotl32,os=Oo.sum32,YA=Oo.sum32_5,XA=JA.ft_1,zy=QA.BlockHash,ZA=[1518500249,1859775393,2400959708,3395469782];function dn(){if(!(this instanceof dn))return new dn;zy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Oo.inherits(dn,zy);var e_=dn;dn.blockSize=512;dn.outSize=160;dn.hmacStrength=80;dn.padLength=64;dn.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),z_(e.length<=this.blockSize);for(var r=e.length;r>8,m=c&255;d?a.push(d,m):a.push(m)}return a}r.toArray=n;function i(s){return s.length===1?"0"+s:s}r.zero2=i;function o(s){for(var l="",a=0;a(m>>1)-1?E=(m>>1)-N:E=N,g.isubn(E)):E=0,d[v]=E,g.iushrn(1)}return d}r.getNAF=n;function i(a,u){var c=[[],[]];a=a.clone(),u=u.clone();for(var d=0,m=0,g;a.cmpn(-d)>0||u.cmpn(-m)>0;){var v=a.andln(3)+d&3,E=u.andln(3)+m&3;v===3&&(v=-1),E===3&&(E=-1);var N;v&1?(g=a.andln(7)+d&7,(g===3||g===5)&&E===2?N=-v:N=v):N=0,c[0].push(N);var x;E&1?(g=u.andln(7)+m&7,(g===3||g===5)&&v===2?x=-E:x=E):x=0,c[1].push(x),2*d===N+1&&(d=1-d),2*m===x+1&&(m=1-m),a.iushrn(1),u.iushrn(1)}return c}r.getJSF=i;function o(a,u,c){var d="_"+u;a.prototype[u]=function(){return this[d]!==void 0?this[d]:this[d]=c.call(this)}}r.cachedProperty=o;function s(a){return typeof a=="string"?r.toArray(a,"hex"):a}r.parseBytes=s;function l(a){return new ue(a,"hex","le")}r.intFromLE=l}),eu=yr.getNAF,q_=yr.getJSF,tu=yr.assert;function Ei(t,e){this.type=t,this.p=new ue(e.p,16),this.red=e.prime?ue.red(e.prime):ue.mont(this.p),this.zero=new ue(0).toRed(this.red),this.one=new ue(1).toRed(this.red),this.two=new ue(2).toRed(this.red),this.n=e.n&&new ue(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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 Hi=Ei;Ei.prototype.point=function(){throw new Error("Not implemented")};Ei.prototype.validate=function(){throw new Error("Not implemented")};Ei.prototype._fixedNafMul=function(e,r){tu(e.precomputed);var n=e._getDoubles(),i=eu(r,1,this._bitLength),o=(1<=l;u--)a=(a<<1)+i[u];s.push(a)}for(var c=this.jpoint(null,null,null),d=this.jpoint(null,null,null),m=o;m>0;m--){for(l=0;l=0;a--){for(var u=0;a>=0&&s[a]===0;a--)u++;if(a>=0&&u++,l=l.dblp(u),a<0)break;var c=s[a];tu(c!==0),e.type==="affine"?c>0?l=l.mixedAdd(o[c-1>>1]):l=l.mixedAdd(o[-c-1>>1].neg()):c>0?l=l.add(o[c-1>>1]):l=l.add(o[-c-1>>1].neg())}return e.type==="affine"?l.toP():l};Ei.prototype._wnafMulAdd=function(e,r,n,i,o){var s=this._wnafT1,l=this._wnafT2,a=this._wnafT3,u=0,c,d,m;for(c=0;c=1;c-=2){var v=c-1,E=c;if(s[v]!==1||s[E]!==1){a[v]=eu(n[v],s[v],this._bitLength),a[E]=eu(n[E],s[E],this._bitLength),u=Math.max(a[v].length,u),u=Math.max(a[E].length,u);continue}var N=[r[v],null,null,r[E]];r[v].y.cmp(r[E].y)===0?(N[1]=r[v].add(r[E]),N[2]=r[v].toJ().mixedAdd(r[E].neg())):r[v].y.cmp(r[E].y.redNeg())===0?(N[1]=r[v].toJ().mixedAdd(r[E]),N[2]=r[v].add(r[E].neg())):(N[1]=r[v].toJ().mixedAdd(r[E]),N[2]=r[v].toJ().mixedAdd(r[E].neg()));var x=[-3,-1,-5,-7,0,7,5,1,3],w=q_(n[v],n[E]);for(u=Math.max(w[0].length,u),a[v]=new Array(u),a[E]=new Array(u),d=0;d=0;c--){for(var $=0;c>=0;){var H=!0;for(d=0;d=0&&$++,B=B.dblp($),c<0)break;for(d=0;d0?m=l[d][Y-1>>1]:Y<0&&(m=l[d][-Y-1>>1].neg()),m.type==="affine"?B=B.mixedAdd(m):B=B.add(m))}}for(c=0;c=Math.ceil((e.bitLength()+1)/r.step):!1};Mr.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o=0&&(g=u,v=c),d.negative&&(d=d.neg(),m=m.neg()),g.negative&&(g=g.neg(),v=v.neg()),[{a:d,b:m},{a:g,b:v}]};Ir.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],o=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),l=o.mul(n.a),a=s.mul(i.a),u=o.mul(n.b),c=s.mul(i.b),d=e.sub(l).sub(a),m=u.add(c).neg();return{k1:d,k2:m}};Ir.prototype.pointFromX=function(e,r){e=new ue(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return(r&&!o||!r&&o)&&(i=i.redNeg()),this.point(e,i)};Ir.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),o=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};Ir.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,s=0;s":""};Pt.prototype.isInfinity=function(){return this.inf};Pt.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(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Pt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),l=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,l)};Pt.prototype.getX=function(){return this.x.fromRed()};Pt.prototype.getY=function(){return this.y.fromRed()};Pt.prototype.mul=function(e){return e=new ue(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)};Pt.prototype.mulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};Pt.prototype.jmulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};Pt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Pt.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(o){return o.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};Pt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Ot(t,e,r,n){Hi.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ue(0)):(this.x=new ue(e,16),this.y=new ue(r,16),this.z=new ue(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}Mh(Ot,Hi.BasePoint);Ir.prototype.jpoint=function(e,r,n){return new Ot(this,e,r,n)};Ot.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};Ot.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Ot.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),o=e.x.redMul(n),s=this.y.redMul(r.redMul(e.z)),l=e.y.redMul(n.redMul(this.z)),a=i.redSub(o),u=s.redSub(l);if(a.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),d=c.redMul(a),m=i.redMul(c),g=u.redSqr().redIAdd(d).redISub(m).redISub(m),v=u.redMul(m.redISub(g)).redISub(s.redMul(d)),E=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(g,v,E)};Ot.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),o=this.y,s=e.y.redMul(r).redMul(this.z),l=n.redSub(i),a=o.redSub(s);if(l.cmpn(0)===0)return a.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=l.redSqr(),c=u.redMul(l),d=n.redMul(u),m=a.redSqr().redIAdd(c).redISub(d).redISub(d),g=a.redMul(d.redISub(m)).redISub(o.redMul(c)),v=this.z.redMul(l);return this.curve.jpoint(m,g,v)};Ot.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(o),this.x.cmp(n)===0)return!0}};Ot.prototype.inspect=function(){return this.isInfinity()?"":""};Ot.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var va=Qo(function(t,e){var r=e;r.base=Hi,r.short=G_,r.mont=null,r.edwards=null}),ya=Qo(function(t,e){var r=e,n=yr.assert;function i(l){l.type==="short"?this.curve=new va.short(l):l.type==="edwards"?this.curve=new va.edwards(l):this.curve=new va.mont(l),this.g=this.curve.g,this.n=this.curve.n,this.hash=l.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function o(l,a){Object.defineProperty(r,l,{configurable:!0,enumerable:!0,get:function(){var u=new i(a);return Object.defineProperty(r,l,{configurable:!0,enumerable:!0,value:u}),u}})}o("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:en.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("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:en.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("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:en.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("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:en.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"]}),o("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:en.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"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:en.sha256,gRed:!1,g:["9"]}),o("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:en.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}o("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:en.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function gi(t){if(!(this instanceof gi))return new gi(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Hr.toArray(t.entropy,t.entropyEnc||"hex"),r=Hr.toArray(t.nonce,t.nonceEnc||"hex"),n=Hr.toArray(t.pers,t.persEnc||"hex");Ch(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var Zy=gi;gi.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};gi.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Hr.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length"};var V_=yr.assert;function Uu(t,e){if(t instanceof Uu)return t;this._importDER(t,e)||(V_(t.r&&t.s,"Signature without r or s"),this.r=new ue(t.r,16),this.s=new ue(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Fu=Uu;function K_(){this.place=0}function Vc(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return i<=127?!1:(e.place=s,i)}function Rp(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Uu.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=Rp(r),n=Rp(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Kc(i,r.length),i=i.concat(r),i.push(2),Kc(i,n.length);var o=i.concat(n),s=[48];return Kc(s,o.length),s=s.concat(o),yr.encode(s,e)};var Q_=function(){throw new Error("unsupported")},e1=yr.assert;function Cr(t){if(!(this instanceof Cr))return new Cr(t);typeof t=="string"&&(e1(Object.prototype.hasOwnProperty.call(ya,t),"Unknown curve "+t),t=ya[t]),t instanceof ya.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var J_=Cr;Cr.prototype.keyPair=function(e){return new Ih(this,e)};Cr.prototype.keyFromPrivate=function(e,r){return Ih.fromPrivate(this,e,r)};Cr.prototype.keyFromPublic=function(e,r){return Ih.fromPublic(this,e,r)};Cr.prototype.genKeyPair=function(e){e||(e={});for(var r=new Zy({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Q_(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new ue(2));;){var o=new ue(r.generate(n));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}};Cr.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Cr.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new ue(e,16));for(var o=this.n.byteLength(),s=r.getPrivate().toArray("be",o),l=e.toArray("be",o),a=new Zy({hash:this.hash,entropy:s,nonce:l,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new ue(1)),c=0;;c++){var d=i.k?i.k(c):new ue(a.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(u)>=0)){var m=this.g.mul(d);if(!m.isInfinity()){var g=m.getX(),v=g.umod(this.n);if(v.cmpn(0)!==0){var E=d.invm(this.n).mul(v.mul(r.getPrivate()).iadd(e));if(E=E.umod(this.n),E.cmpn(0)!==0){var N=(m.getY().isOdd()?1:0)|(g.cmp(v)!==0?2:0);return i.canonical&&E.cmp(this.nh)>0&&(E=this.n.sub(E),N^=1),new Fu({r:v,s:E,recoveryParam:N})}}}}}};Cr.prototype.verify=function(e,r,n,i){e=this._truncateToN(new ue(e,16)),n=this.keyFromPublic(n,i),r=new Fu(r,"hex");var o=r.r,s=r.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var l=s.invm(this.n),a=l.mul(e).umod(this.n),u=l.mul(o).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(a,n.getPublic(),u),c.isInfinity()?!1:c.eqXToP(o)):(c=this.g.mulAdd(a,n.getPublic(),u),c.isInfinity()?!1:c.getX().umod(this.n).cmp(o)===0)};Cr.prototype.recoverPubKey=function(t,e,r,n){e1((3&r)===r,"The recovery param is more than two bits"),e=new Fu(e,n);var i=this.n,o=new ue(t),s=e.r,l=e.s,a=r&1,u=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");u?s=this.curve.pointFromX(s.add(this.curve.n),a):s=this.curve.pointFromX(s,a);var c=e.r.invm(i),d=i.sub(o).mul(c).umod(i),m=l.mul(c).umod(i);return this.g.mulAdd(d,s,m)};Cr.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Fu(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch{continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var Y_=Qo(function(t,e){var r=e;r.version="6.5.4",r.utils=yr,r.rand=function(){throw new Error("unsupported")},r.curve=va,r.curves=ya,r.ec=J_,r.eddsa=null}),X_=Y_.ec;const Z_="signing-key/5.7.0",pd=new O(Z_);let Qc=null;function rn(){return Qc||(Qc=new X_("secp256k1")),Qc}class e3{constructor(e){z(this,"curve","secp256k1"),z(this,"privateKey",re(e)),On(this.privateKey)!==32&&pd.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=rn().keyFromPrivate(se(this.privateKey));z(this,"publicKey","0x"+r.getPublic(!1,"hex")),z(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),z(this,"_isSigningKey",!0)}_addPoint(e){const r=rn().keyFromPublic(se(this.publicKey)),n=rn().keyFromPublic(se(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=rn().keyFromPrivate(se(this.privateKey)),n=se(e);n.length!==32&&pd.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return Lu({recoveryParam:i.recoveryParam,r:pt("0x"+i.r.toString(16),32),s:pt("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=rn().keyFromPrivate(se(this.privateKey)),n=rn().keyFromPublic(se(t1(e)));return pt("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function t3(t,e){const r=Lu(e),n={r:se(r.r),s:se(r.s)};return"0x"+rn().recoverPubKey(se(t),n,r.recoveryParam).encode("hex",!1)}function t1(t,e){const r=se(t);if(r.length===32){const n=new e3(r);return e?"0x"+rn().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?re(r):"0x"+rn().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+rn().keyFromPublic(r).getPublic(!0,"hex"):re(r)}return pd.throwArgumentError("invalid public or private key","key","[REDACTED]")}const r3="transactions/5.7.0",Un=new O(r3);var Tp;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(Tp||(Tp={}));function Rh(t){return t==="0x"?null:mt(t)}function Dt(t){return t==="0x"?vy:G.from(t)}function n3(t){const e=t1(t);return mt(It(ut(It(e,1)),12))}function r1(t,e){return n3(t3(se(t),e))}function ur(t,e){const r=To(G.from(t).toHexString());return r.length>32&&Un.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function Jc(t,e){return{address:mt(t),storageKeys:(e||[]).map((r,n)=>(On(r)!==32&&Un.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function qi(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Un.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),Jc(r[0],r[1])):Jc(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,o)=>(i[o]=!0,i),{});return Jc(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function n1(t){return qi(t).map(e=>[e.address,e.storageKeys])}function i3(t,e){if(t.gasPrice!=null){const n=G.from(t.gasPrice),i=G.from(t.maxFeePerGas||0);n.eq(i)||Un.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[ur(t.chainId||0,"chainId"),ur(t.nonce||0,"nonce"),ur(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),ur(t.maxFeePerGas||0,"maxFeePerGas"),ur(t.gasLimit||0,"gasLimit"),t.to!=null?mt(t.to):"0x",ur(t.value||0,"value"),t.data||"0x",n1(t.accessList||[])];if(e){const n=Lu(e);r.push(ur(n.recoveryParam,"recoveryParam")),r.push(To(n.r)),r.push(To(n.s))}return Xt(["0x02",Bu(r)])}function o3(t,e){const r=[ur(t.chainId||0,"chainId"),ur(t.nonce||0,"nonce"),ur(t.gasPrice||0,"gasPrice"),ur(t.gasLimit||0,"gasLimit"),t.to!=null?mt(t.to):"0x",ur(t.value||0,"value"),t.data||"0x",n1(t.accessList||[])];if(e){const n=Lu(e);r.push(ur(n.recoveryParam,"recoveryParam")),r.push(To(n.r)),r.push(To(n.s))}return Xt(["0x01",Bu(r)])}function i1(t,e,r){try{const n=Dt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Un.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=pt(e[1],32),t.s=pt(e[2],32);try{const n=ut(r(t));t.from=r1(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function s3(t){const e=Sh(t.slice(1));e.length!==9&&e.length!==12&&Un.throwArgumentError("invalid component count for transaction type: 2","payload",re(t));const r=Dt(e[2]),n=Dt(e[3]),i={type:2,chainId:Dt(e[0]).toNumber(),nonce:Dt(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Dt(e[4]),to:Rh(e[5]),value:Dt(e[6]),data:e[7],accessList:qi(e[8])};return e.length===9||(i.hash=ut(t),i1(i,e.slice(9),i3)),i}function l3(t){const e=Sh(t.slice(1));e.length!==8&&e.length!==11&&Un.throwArgumentError("invalid component count for transaction type: 1","payload",re(t));const r={type:1,chainId:Dt(e[0]).toNumber(),nonce:Dt(e[1]).toNumber(),gasPrice:Dt(e[2]),gasLimit:Dt(e[3]),to:Rh(e[4]),value:Dt(e[5]),data:e[6],accessList:qi(e[7])};return e.length===8||(r.hash=ut(t),i1(r,e.slice(8),o3)),r}function a3(t){const e=Sh(t);e.length!==9&&e.length!==6&&Un.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Dt(e[0]).toNumber(),gasPrice:Dt(e[1]),gasLimit:Dt(e[2]),to:Rh(e[3]),value:Dt(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=G.from(e[6]).toNumber()}catch{return r}if(r.r=pt(e[7],32),r.s=pt(e[8],32),G.from(r.r).isZero()&&G.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);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(re(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const o=ut(Bu(i));try{r.from=r1(o,{r:re(r.r),s:re(r.s),recoveryParam:n})}catch{}r.hash=ut(t)}return r.type=null,r}function u3(t){const e=se(t);if(e[0]>127)return a3(e);switch(e[0]){case 1:return l3(e);case 2:return s3(e)}return Un.throwError(`unsupported transaction type: ${e[0]}`,O.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const c3="contracts/5.7.0";var Ui=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const gt=new O(c3);function ru(t,e){return Ui(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&>.throwArgumentError("invalid address or ENS name","name",r);try{return mt(r)}catch{}t||gt.throwError("a provider or signer is needed to resolve ENS names",O.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&>.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function wa(t,e,r){return Ui(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>wa(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield ru(t,e):r.type==="tuple"?yield wa(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>wa(t,n,r.arrayChildren))):Promise.reject(gt.makeError("invalid value for array",O.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function zu(t,e,r){return Ui(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=it(r.pop())),gt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=yt({override:ru(t.signer,n.from),signer:t.signer.getAddress()}).then(u=>Ui(this,void 0,void 0,function*(){return mt(u.signer)!==u.override&>.throwError("Contract with a Signer cannot override from",O.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),u.override})):n.from=t.signer.getAddress():n.from&&(n.from=ru(t.provider,n.from));const i=yield yt({args:wa(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:yt(n)||{}}),o=t.interface.encodeFunctionData(e,i.args),s={data:o,to:i.address},l=i.overrides;if(l.nonce!=null&&(s.nonce=G.from(l.nonce).toNumber()),l.gasLimit!=null&&(s.gasLimit=G.from(l.gasLimit)),l.gasPrice!=null&&(s.gasPrice=G.from(l.gasPrice)),l.maxFeePerGas!=null&&(s.maxFeePerGas=G.from(l.maxFeePerGas)),l.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=G.from(l.maxPriorityFeePerGas)),l.from!=null&&(s.from=l.from),l.type!=null&&(s.type=l.type),l.accessList!=null&&(s.accessList=qi(l.accessList)),s.gasLimit==null&&e.gas!=null){let u=21e3;const c=se(o);for(let d=0;dn[u]!=null);return a.length&>.throwError(`cannot override ${a.map(u=>JSON.stringify(u)).join(",")}`,O.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:a}),s})}function f3(t,e){return function(...r){return zu(t,e,r)}}function d3(t,e){const r=t.signer||t.provider;return function(...n){return Ui(this,void 0,void 0,function*(){r||gt.throwError("estimate require a provider or signer",O.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield zu(t,e,n);return yield r.estimateGas(i)})}}function h3(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(o=>{let s=nr(o),l=null;try{l=t.interface.parseLog(o)}catch{}return l&&(s.args=l.args,s.decode=(a,u)=>t.interface.decodeEventLog(l.eventFragment,a,u),s.event=l.name,s.eventSignature=l.signature),s.removeListener=()=>t.provider,s.getBlock=()=>t.provider.getBlock(i.blockHash),s.getTransaction=()=>t.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function o1(t,e,r){const n=t.signer||t.provider;return function(...i){return Ui(this,void 0,void 0,function*(){let o;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const a=it(i.pop());a.blockTag!=null&&(o=yield a.blockTag),delete a.blockTag,i.push(a)}t.deployTransaction!=null&&(yield t._deployed(o));const s=yield zu(t,e,i),l=yield n.call(s,o);try{let a=t.interface.decodeFunctionResult(e,l);return r&&e.outputs.length===1&&(a=a[0]),a}catch(a){throw a.code===O.errors.CALL_EXCEPTION&&(a.address=t.address,a.args=i,a.transaction=s),a}})}}function p3(t,e){return function(...r){return Ui(this,void 0,void 0,function*(){t.signer||gt.throwError("sending a transaction requires a signer",O.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield zu(t,e,r),i=yield t.signer.sendTransaction(n);return h3(t,i),i})}}function Op(t,e,r){return e.constant?o1(t,e,r):p3(t,e)}function s1(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class il{constructor(e,r){z(this,"tag",e),z(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class m3 extends il{constructor(){super("error",null)}}class Lp extends il{constructor(e,r,n,i){const o={address:e};let s=r.getEventTopic(n);i?(s!==i[0]&>.throwArgumentError("topic mismatch","topics",i),o.topics=i.slice()):o.topics=[s],super(s1(o),o),z(this,"address",e),z(this,"interface",r),z(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=VE(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class Bp extends il{constructor(e,r){super("*",{address:e}),z(this,"address",e),z(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class g3{constructor(e,r,n){z(this,"interface",fr(new.target,"getInterface")(r)),n==null?(z(this,"provider",null),z(this,"signer",null)):El.isSigner(n)?(z(this,"provider",n.provider||null),z(this,"signer",n)):Wo.isProvider(n)?(z(this,"provider",n),z(this,"signer",null)):gt.throwArgumentError("invalid signer or provider","signerOrProvider",n),z(this,"callStatic",{}),z(this,"estimateGas",{}),z(this,"functions",{}),z(this,"populateTransaction",{}),z(this,"filters",{});{const s={};Object.keys(this.interface.events).forEach(l=>{const a=this.interface.events[l];z(this.filters,l,(...u)=>({address:this.address,topics:this.interface.encodeFilterTopics(a,u)})),s[a.name]||(s[a.name]=[]),s[a.name].push(l)}),Object.keys(s).forEach(l=>{const a=s[l];a.length===1?z(this.filters,l,this.filters[a[0]]):gt.warn(`Duplicate definition of ${l} (${a.join(", ")})`)})}if(z(this,"_runningEvents",{}),z(this,"_wrappedEmits",{}),e==null&>.throwArgumentError("invalid contract address or ENS name","addressOrName",e),z(this,"address",e),this.provider)z(this,"resolvedAddress",ru(this.provider,e));else try{z(this,"resolvedAddress",Promise.resolve(mt(e)))}catch{gt.throwError("provider is required to use ENS name as contract address",O.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});const i={},o={};Object.keys(this.interface.functions).forEach(s=>{const l=this.interface.functions[s];if(o[s]){gt.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}o[s]=!0;{const a=l.name;i[`%${a}`]||(i[`%${a}`]=[]),i[`%${a}`].push(s)}this[s]==null&&z(this,s,Op(this,l,!0)),this.functions[s]==null&&z(this.functions,s,Op(this,l,!1)),this.callStatic[s]==null&&z(this.callStatic,s,o1(this,l,!0)),this.populateTransaction[s]==null&&z(this.populateTransaction,s,f3(this,l)),this.estimateGas[s]==null&&z(this.estimateGas,s,d3(this,l))}),Object.keys(i).forEach(s=>{const l=i[s];if(l.length>1)return;s=s.substring(1);const a=l[0];try{this[s]==null&&z(this,s,this[a])}catch{}this.functions[s]==null&&z(this.functions,s,this.functions[a]),this.callStatic[s]==null&&z(this.callStatic,s,this.callStatic[a]),this.populateTransaction[s]==null&&z(this.populateTransaction,s,this.populateTransaction[a]),this.estimateGas[s]==null&&z(this.estimateGas,s,this.estimateGas[a])})}static getContractAddress(e){return Nh(e)}static getInterface(e){return ud.isInterface(e)?e:new ud(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&>.throwError("contract not deployed",O.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||gt.throwError("sending a transactions require a signer",O.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=it(e||{});return["from","to"].forEach(function(n){r[n]!=null&>.throwError("cannot override "+n,O.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new Ph(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&z(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return ad.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new m3);if(e==="event")return this._normalizeRunningEvent(new il("event",null));if(e==="*")return this._normalizeRunningEvent(new Bp(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new Lp(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Lp(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new il(s1(r),r))}return this._normalizeRunningEvent(new Bp(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=nr(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||gt.throwError("events require a provider or a signer with a provider",O.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=o=>{let s=this._wrapEvent(e,o,r);if(s.decodeError==null)try{const l=e.getEmit(s);this.emit(e.filter,...l)}catch(l){s.decodeError=l.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),o=it(i.filter);return typeof r=="string"&&pe(r,32)?(n!=null&>.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),o.blockHash=r):(o.fromBlock=r??0,o.toBlock=n??"latest"),this.provider.getLogs(o).then(s=>s.map(l=>this._wrapEvent(i,l,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class v3 extends g3{}class l1{constructor(e){z(this,"alphabet",e),z(this,"base",e.length),z(this,"_alphabetMap",{}),z(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let o=0;r[o]===0&&o=0;--o)i+=this.alphabet[n[o]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;o>0;)r.push(o&255),o>>=8}for(let n=0;e[n]===this._leader&&n0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}const w3="networks/5.7.1",Dp=new O(w3);function x3(t){return t&&typeof t.renetwork=="function"}function An(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const o=["goerli","ropsten","rinkeby","sepolia"];try{const s=new r.PocketProvider(t,n.pocket);s.network&&o.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const o=["ropsten"],s=new r.AnkrProvider(t,n.ankr);s.network&&o.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let o=1;return n.quorum!=null?o=n.quorum:t==="homestead"&&(o=2),new r.FallbackProvider(i,o)}return i[0]};return e.renetwork=function(r){return An(r)},e}function nu(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return nu(t,n)},r}const Up={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:An("homestead")},Fp={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:An("ropsten")},zp={chainId:63,name:"classicMordor",_defaultProvider:nu("https://www.ethercluster.com/mordor","classicMordor")},Gl={unspecified:{chainId:0,name:"unspecified"},homestead:Up,mainnet:Up,morden:{chainId:2,name:"morden"},ropsten:Fp,testnet:Fp,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:An("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:An("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:An("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:An("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:nu("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:zp,classicTestnet:zp,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:nu("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:An("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:An("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 Th(t){if(t==null)return null;if(typeof t=="number"){for(const n in Gl){const i=Gl[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Gl[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Gl[t.name];if(!e)return typeof t.chainId!="number"&&Dp.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&Dp.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(x3(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const E3="web/5.7.1";var b3=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};function A3(t,e){return b3(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const s=e.fetchOptions;s.mode&&(r.mode=s.mode),s.cache&&(r.cache=s.cache),s.credentials&&(r.credentials=s.credentials),s.redirect&&(r.redirect=s.redirect),s.referrer&&(r.referrer=s.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach((s,l)=>{o[l.toLowerCase()]=s}):n.headers.keys().forEach(s=>{o[s.toLowerCase()]=n.headers.get(s)}),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:se(new Uint8Array(i))}})}var _3=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const Br=new O(E3);function $p(t){return new Promise(e=>{setTimeout(e,t)})}function Qn(t,e){if(t==null)return null;if(typeof t=="string")return t;if(Ah(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return xl(t)}catch{}return re(t)}return t}function S3(t){return mr(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function k3(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Br.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,o=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Br.assertArgument(o>0&&o%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const s=typeof t=="object"?!!t.errorPassThrough:!1,l={};let a=null;const u={method:"GET"};let c=!1,d=2*60*1e3;if(typeof t=="string")a=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Br.throwArgumentError("missing URL","connection.url",t),a=t.url,typeof t.timeout=="number"&&t.timeout>0&&(d=t.timeout),t.headers)for(const x in t.headers)l[x.toLowerCase()]={key:x,value:String(t.headers[x])},["if-none-match","if-modified-since"].indexOf(x.toLowerCase())>=0&&(c=!0);if(u.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){a.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Br.throwError("basic authentication requires a secure https url",O.errors.INVALID_ARGUMENT,{argument:"url",url:a,user:t.user,password:"[REDACTED]"});const x=t.user+":"+t.password;l.authorization={key:"Authorization",value:"Basic "+Ay(mr(x))}}t.skipFetchSetup!=null&&(u.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(u.fetchOptions=it(t.fetchOptions))}const m=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),g=a?a.match(m):null;if(g)try{const x={statusCode:200,statusMessage:"OK",headers:{"content-type":g[1]||"text/plain"},body:g[2]?by(g[3]):S3(g[3])};let w=x.body;return r&&(w=r(x.body,x)),Promise.resolve(w)}catch(x){Br.throwError("processing response error",O.errors.SERVER_ERROR,{body:Qn(g[1],g[2]),error:x,requestBody:null,requestMethod:"GET",url:a})}e&&(u.method="POST",u.body=e,l["content-type"]==null&&(l["content-type"]={key:"Content-Type",value:"application/octet-stream"}),l["content-length"]==null&&(l["content-length"]={key:"Content-Length",value:String(e.length)}));const v={};Object.keys(l).forEach(x=>{const w=l[x];v[w.key]=w.value}),u.headers=v;const E=function(){let x=null;return{promise:new Promise(function(T,B){d&&(x=setTimeout(()=>{x!=null&&(x=null,B(Br.makeError("timeout",O.errors.TIMEOUT,{requestBody:Qn(u.body,v["content-type"]),requestMethod:u.method,timeout:d,url:a})))},d))}),cancel:function(){x!=null&&(clearTimeout(x),x=null)}}}(),N=function(){return _3(this,void 0,void 0,function*(){for(let x=0;x=300)&&(E.cancel(),Br.throwError("bad response",O.errors.SERVER_ERROR,{status:w.statusCode,headers:w.headers,body:Qn(b,w.headers?w.headers["content-type"]:null),requestBody:Qn(u.body,v["content-type"]),requestMethod:u.method,url:a})),r)try{const T=yield r(b,w);return E.cancel(),T}catch(T){if(T.throttleRetry&&x{let l=null;if(o!=null)try{l=JSON.parse(xl(o))}catch(a){Br.throwError("invalid JSON",O.errors.SERVER_ERROR,{body:o,error:a})}return r&&(l=r(l,s)),l},i=null;if(e!=null){i=mr(e);const o=typeof t=="string"?{url:t}:it(t);o.headers?Object.keys(o.headers).filter(l=>l.toLowerCase()==="content-type").length!==0||(o.headers=it(o.headers),o.headers["content-type"]="application/json"):o.headers={"content-type":"application/json"},t=o}return k3(t,i,n)}function po(t,e){return e||(e={}),e=it(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,o=!1;const s=()=>o?!1:(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));const l=e.retryLimit;let a=0;function u(){return t().then(function(c){if(c!==void 0)s()&&r(c);else if(e.oncePoll)e.oncePoll.once("poll",u);else if(e.onceBlock)e.onceBlock.once("block",u);else if(!o){if(a++,a>l){s()&&n(new Error("retry limit reached"));return}let d=e.interval*parseInt(String(Math.random()*Math.pow(2,a)));de.ceiling&&(d=e.ceiling),setTimeout(u,d)}return null},function(c){s()&&n(c)})}u()})}var iu="qpzry9x8gf2tvdw0s3jn54khce6mua7l",gd={};for(var Vl=0;Vl>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function a1(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=_o(e)^n>>5}for(e=_o(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=a1(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",o=0;o>5)throw new Error("Non 5-bit word");n=_o(n)^s,i+=iu.charAt(s)}for(o=0;o<6;++o)n=_o(n);for(n^=1,o=0;o<6;++o){var l=n>>(5-o)*5&31;i+=iu.charAt(l)}return i}function u1(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var o=t.slice(0,i),s=t.slice(i+1);if(s.length<6)return"Data too short";var l=a1(o);if(typeof l=="string")return l;for(var a=[],u=0;u=s.length)&&a.push(d)}return l!==1?"Invalid checksum for "+t:{prefix:o,words:a}}function P3(){var t=u1.apply(null,arguments);if(typeof t=="object")return t}function C3(t){var e=u1.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function $u(t,e,r,n){for(var i=0,o=0,s=(1<=r;)o-=r,l.push(i>>o&s);if(n)o>0&&l.push(i<=e)return"Excess padding";if(i<this.data(d,!0);return e.transaction={hash:s,type:u,accessList:te.allowNull(this.accessList.bind(this),null),blockHash:te.allowNull(s,null),blockNumber:te.allowNull(a,null),transactionIndex:te.allowNull(a,null),confirmations:te.allowNull(a,null),from:r,gasPrice:te.allowNull(n),maxPriorityFeePerGas:te.allowNull(n),maxFeePerGas:te.allowNull(n),gasLimit:n,to:te.allowNull(r,null),value:n,nonce:a,data:o,r:te.allowNull(this.uint256),s:te.allowNull(this.uint256),v:te.allowNull(a),creates:te.allowNull(r,null),raw:te.allowNull(o)},e.transactionRequest={from:te.allowNull(r),nonce:te.allowNull(a),gasLimit:te.allowNull(n),gasPrice:te.allowNull(n),maxPriorityFeePerGas:te.allowNull(n),maxFeePerGas:te.allowNull(n),to:te.allowNull(r),value:te.allowNull(n),data:te.allowNull(c),type:te.allowNull(a),accessList:te.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:a,blockNumber:a,transactionHash:s,address:r,topics:te.arrayOf(s),data:o,logIndex:a,blockHash:s},e.receipt={to:te.allowNull(this.address,null),from:te.allowNull(this.address,null),contractAddress:te.allowNull(r,null),transactionIndex:a,root:te.allowNull(l),gasUsed:n,logsBloom:te.allowNull(o),blockHash:s,transactionHash:s,logs:te.arrayOf(this.receiptLog.bind(this)),blockNumber:a,confirmations:te.allowNull(a,null),cumulativeGasUsed:n,effectiveGasPrice:te.allowNull(n),status:te.allowNull(a),type:u},e.block={hash:te.allowNull(s),parentHash:s,number:a,timestamp:a,nonce:te.allowNull(l),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:te.allowNull(r),extraData:o,transactions:te.allowNull(te.arrayOf(s)),baseFeePerGas:te.allowNull(n)},e.blockWithTransactions=it(e.block),e.blockWithTransactions.transactions=te.allowNull(te.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:te.allowNull(i,void 0),toBlock:te.allowNull(i,void 0),blockHash:te.allowNull(s,void 0),address:te.allowNull(r,void 0),topics:te.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:te.allowNull(a),blockHash:te.allowNull(s),transactionIndex:a,removed:te.allowNull(this.boolean.bind(this)),address:r,data:te.allowFalsish(o,"0x"),topics:te.arrayOf(s),transactionHash:s,logIndex:a},e}accessList(e){return qi(e||[])}number(e){return e==="0x"?0:G.from(e).toNumber()}type(e){return e==="0x"||e==null?0:G.from(e).toNumber()}bigNumber(e){return G.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),pe(e))?e.toLowerCase():ls.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return mt(e)}callAddress(e){if(!pe(e,32))return null;const r=mt(It(e,12));return r===fb?null:r}contractAddress(e){return Nh(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||pe(e))return Ou(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return On(n)!==32?ls.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=G.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!pe(e))throw new Error("invalid uint256");return pt(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=te.check(r,e);return i._difficulty=n==null?null:G.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return te.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&G.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=te.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;pe(n)&&(n=G.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),pe(n)&&(n=G.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return u3(e)}receiptLog(e){return te.check(this.formats.receiptLog,e)}receipt(e){const r=te.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=G.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&ls.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):ls.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&ls.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return te.check(this.formats.filter,e)}filterLog(e){return te.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const o=e[i](r[i]);o!==void 0&&(n[i]=o)}catch(o){throw o.checkKey=i,o.checkValue=r[i],o}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}function c1(t){return t&&typeof t.isCommunityResource=="function"}function vd(t){return c1(t)&&t.isCommunityResource()}let qp=!1;function _l(){qp||(qp=!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("=========================="))}var ae=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const he=new O($t),L3=10;function Wp(t){return t==null?"null":(On(t)!==32&&he.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function Gp(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[Wp(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return Wp(e)}).join("&")}function B3(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function Gi(t){if(typeof t=="string"){if(t=t.toLowerCase(),On(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+Gp(t);if(dA.isForkEvent(t))throw he.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+Gp(t.topics||[])}throw new Error("invalid event - "+t)}function as(){return new Date().getTime()}function Vp(t){return new Promise(e=>{setTimeout(e,t)})}const j3=["block","network","pending","poll"];class D3{constructor(e,r,n){z(this,"tag",e),z(this,"listener",r),z(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=B3(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||j3.indexOf(this.tag)>=0}}const U3={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 Xc(t){return pt(G.from(t).toHexString(),32)}function Kp(t){return md.encode(Ut([t,It(jp(jp(t)),0,4)]))}const f1=new RegExp("^(ipfs)://(.*)$","i"),Qp=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),f1,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function xa(t,e){try{return xl(ol(t,e))}catch{}return null}function ol(t,e){if(t==="0x")return null;const r=G.from(It(t,e,e+32)).toNumber(),n=G.from(It(t,r,r+32)).toNumber();return It(t,r+32,r+32+n)}function Zc(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):he.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function Jp(t){const e=se(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function F3(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function d1(t){const e=[];let r=0;for(let n=0;nG.from(e).eq(1)).catch(e=>{if(e.code===O.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return ae(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Xt([e,ga(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Xt(["0x9061b923",d1([Yb(this.name),n.data])]));try{let o=yield this.provider.call(n);return se(o).length%32===4&&he.throwError("resolver threw error",O.errors.CALL_EXCEPTION,{transaction:n,data:o}),i&&(o=ol(o,0)),o}catch(o){if(o.code===O.errors.CALL_EXCEPTION)return null;throw o}})}_fetchBytes(e,r){return ae(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?ol(n,0):null})}_getAddress(e,r){const n=U3[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,O.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=se(r);if(n.p2pkh!=null){const o=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(o){const s=parseInt(o[1],16);if(o[2].length===s*2&&s>=1&&s<=75)return Kp(Ut([[n.p2pkh],"0x"+o[2]]))}}if(n.p2sh!=null){const o=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(o){const s=parseInt(o[1],16);if(o[2].length===s*2&&s>=1&&s<=75)return Kp(Ut([[n.p2sh],"0x"+o[2]]))}}if(n.prefix!=null){const o=i[1];let s=i[0];if(s===0?o!==20&&o!==32&&(s=-1):s=-1,s>=0&&i.length===2+o&&o>=1&&o<=75){const l=Hp.toWords(i.slice(2));return l.unshift(s),Hp.encode(n.prefix,l)}}return null}getAddress(e){return ae(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===mb?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===O.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",Xc(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&he.throwError("invalid or unsupported coin data",O.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return ae(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;ns[a])}return he.throwError("invalid or unsupported content hash data",O.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ae(this,void 0,void 0,function*(){let r=mr(e);r=Ut([Xc(64),Xc(r.length),r]),r.length%32!==0&&(r=Ut([r,pt("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",re(r));return n==null||n==="0x"?null:xl(n)})}}let ef=null,z3=1;class Hu extends Wo{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),z(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=fr(new.target,"getNetwork")(e);r?(z(this,"_network",r),this.emit("network",r,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ae(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",O.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:z(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return po(()=>this._ready().then(e=>e,e=>{if(!(e.code===O.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return ef==null&&(ef=new te),ef}static getNetwork(e){return Th(e??"homestead")}ccipReadFetch(e,r,n){return ae(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),o=r.toLowerCase(),s=[];for(let l=0;l=0?null:JSON.stringify({data:o,sender:i}),d=yield Al({url:u,errorPassThrough:!0},c,(g,v)=>(g.status=v.statusCode,g));if(d.data)return d.data;const m=d.message||"unknown error";if(d.status>=400&&d.status<500)return he.throwError(`response not found during CCIP fetch: ${m}`,O.errors.SERVER_ERROR,{url:a,errorMessage:m});s.push(m)}return he.throwError(`error encountered during CCIP fetch: ${s.map(l=>JSON.stringify(l)).join(", ")}`,O.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ae(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const o=yield i;if(as()-o.respTime<=e)return o.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=as(),n=yt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:o})=>{if(o)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),o;const s=as();return i=G.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ae(this,void 0,void 0,function*(){const e=z3++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",O.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const o=this._emitted[i];o!=="pending"&&n-o>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const o=i.hash;let s=this.getTransactionReceipt(o).then(l=>(!l||l.blockNumber==null||(this._emitted["t:"+o]=l.blockNumber,this.emit(o,l)),null)).catch(l=>{this.emit("error",l)});r.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const o=i.filter;o.fromBlock=i._lastBlockNumber+1,o.toBlock=n;const s=o.toBlock-this._maxFilterBlockRange;s>o.fromBlock&&(o.fromBlock=s),o.fromBlock<0&&(o.fromBlock=0);const l=this.getLogs(o).then(a=>{i._inflight=!1,a.length!==0&&a.forEach(u=>{u.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=u.blockNumber),this._emitted["b:"+u.blockHash]=u.blockNumber,this._emitted["t:"+u.transactionHash]=u.blockNumber,this.emit(o,u)})}).catch(a=>{this.emit("error",a),i._inflight=!1});r.push(l)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ae(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",O.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ae(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)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,e),yield Vp(0),this._network;const n=he.makeError("underlying network changed",O.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=as();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return ae(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return ae(this,void 0,void 0,function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=r?o:new Promise((s,l)=>{const a=[];let u=!1;const c=function(){return u?!0:(u=!0,a.forEach(m=>{m()}),!1)},d=m=>{m.confirmations{this.removeListener(e,d)}),i){let m=i.startBlock,g=null;const v=E=>ae(this,void 0,void 0,function*(){u||(yield Vp(1e3),this.getTransactionCount(i.from).then(N=>ae(this,void 0,void 0,function*(){if(!u){if(N<=i.nonce)m=E;else{{const x=yield this.getTransaction(e);if(x&&x.blockNumber!=null)return}for(g==null&&(g=m-3,g{u||this.once("block",v)}))});if(u)return;this.once("block",v),a.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){const m=setTimeout(()=>{c()||l(he.makeError("timeout exceeded",O.errors.TIMEOUT,{timeout:n}))},n);m.unref&&m.unref(),a.push(()=>{clearTimeout(m)})}})})}getBlockNumber(){return ae(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return G.from(e)}catch(r){return he.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return G.from(i)}catch(o){return he.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:o})}})}getTransactionCount(e,r){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return G.from(i).toNumber()}catch(o){return he.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:o})}})}getCode(e,r){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return re(i)}catch(o){return he.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:o})}})}getStorageAt(e,r,n){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield yt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(s=>Ou(s))}),o=yield this.perform("getStorageAt",i);try{return re(o)}catch(s){return he.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:s})}})}_wrapTransaction(e,r,n){if(r!=null&&On(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",O.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(o,s)=>ae(this,void 0,void 0,function*(){o==null&&(o=1),s==null&&(s=0);let l;o!==0&&n!=null&&(l={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const a=yield this._waitForTransaction(e.hash,o,s,l);return a==null&&o===0?null:(this._emitted["t:"+e.hash]=a.blockNumber,a.status===0&&he.throwError("transaction failed",O.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:a}),a)}),i}sendTransaction(e){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(o=>re(o)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const o=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,o,i)}catch(o){throw o.transaction=n,o.transactionHash=n.hash,o}})}_getTransactionRequest(e){return ae(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?this._getAddress(o):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?G.from(o):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?re(o):null))}),this.formatter.transactionRequest(yield yt(n))})}_getFilter(e){return ae(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield yt(r))})}_call(e,r,n){return ae(this,void 0,void 0,function*(){n>=L3&&he.throwError("CCIP read exceeded maximum redirections",O.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,o=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&o.substring(0,10)==="0x556f1830"&&On(o)%32===4)try{const s=It(o,4),l=It(s,0,32);G.from(l).eq(i)||he.throwError("CCIP Read sender did not match",O.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const a=[],u=G.from(It(s,32,64)).toNumber(),c=G.from(It(s,u,u+32)).toNumber(),d=It(s,u+32);for(let x=0;xae(this,void 0,void 0,function*(){const o=yield this.perform("getBlock",i);if(o==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let s=null;for(let a=0;athis._wrapTransaction(a)),l}return this.formatter.block(o)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ae(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return po(()=>ae(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ae(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return po(()=>ae(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ae(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield yt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),te.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ae(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ae(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return ae(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new yd(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return ae(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",O.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+ga(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ae(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(pe(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return ae(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=xa(yield this.call({to:n,data:"0x691f3431"+ga(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ae(this,void 0,void 0,function*(){let r=null;if(pe(e)){const o=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(o,"getAvatar");if(!s)return null;r=new yd(this,s,o);try{const l=yield r.getAvatar();if(l)return l.url}catch(l){if(l.code!==O.errors.CALL_EXCEPTION)throw l}try{const l=xa(yield this.call({to:s,data:"0x691f3431"+ga(o).substring(2)}),0);r=yield this.getResolver(l)}catch(l){if(l.code!==O.errors.CALL_EXCEPTION)throw l;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return he.throwError(e+" not implemented",O.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new D3(Gi(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],o=Gi(e);return this._events=this._events.filter(s=>s.tag!==o?!0:(setTimeout(()=>{s.listener.apply(this,r)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let r=Gi(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=Gi(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,o=Gi(e);return this._events=this._events.filter(s=>s.tag!==o||s.listener!=r||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=Gi(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var En=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const wt=new O($t),$3=["call","estimateGas"];function Ps(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=pe(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=Ps(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return Ps(JSON.parse(t),e)}catch{}return null}function h1(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const o=Ps(e,!0);if(o)return o.data;wt.throwError("missing revert data in call exception; Transaction reverted without a reason string",O.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let o=Ps(e.body,!1);o==null&&(o=Ps(e,!1)),o&&wt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{reason:o.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===O.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&wt.throwError("insufficient funds for intrinsic transaction cost",O.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&wt.throwError("nonce has already been used",O.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&wt.throwError("replacement fee too low",O.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&wt.throwError("legacy pre-eip-155 transactions not supported",O.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),$3.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&wt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function Yp(t){return new Promise(function(e){setTimeout(e,t)})}function H3(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function us(t){return t&&t.toLowerCase()}const wd={};class Oh extends El{constructor(e,r,n){if(super(),e!==wd)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");z(this,"provider",r),n==null&&(n=0),typeof n=="string"?(z(this,"_address",this.provider.formatter.address(n)),z(this,"_index",null)):typeof n=="number"?(z(this,"_index",n),z(this,"_address",null)):wt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return wt.throwError("cannot alter JSON-RPC Signer connection",O.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new q3(wd,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&wt.throwError("unknown account #"+this._index,O.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=it(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=it(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>En(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&wt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),yt({tx:yt(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&wt.throwArgumentError("from address mismatch","transaction",e):n.from=i;const o=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[o]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&wt.throwError("user rejected transaction",O.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),h1("sendTransaction",s,o)))})}signTransaction(e){return wt.throwError("signing transactions is unsupported",O.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return En(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield po(()=>En(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return En(this,void 0,void 0,function*(){const r=typeof e=="string"?mr(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[re(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&wt.throwError("user rejected signing",O.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return En(this,void 0,void 0,function*(){const r=typeof e=="string"?mr(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),re(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&wt.throwError("user rejected signing",O.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return En(this,void 0,void 0,function*(){const i=yield sr.resolveNames(e,r,n,s=>this.provider.resolveName(s)),o=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(sr.getPayload(i.domain,r,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&wt.throwError("user rejected signing",O.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,messageData:{domain:i.domain,types:r,value:i.value}}),s}})}unlock(e){return En(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class q3 extends Oh{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const W3={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class vi extends Hu{constructor(e,r){let n=r;n==null&&(n=new Promise((i,o)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{o(s)})},0)})),super(n),e||(e=fr(this.constructor,"defaultUrl")()),typeof e=="string"?z(this,"connection",Object.freeze({url:e})):z(this,"connection",Object.freeze(it(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return En(this,void 0,void 0,function*(){yield Yp(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=fr(this.constructor,"getNetwork");try{return r(G.from(e).toNumber())}catch(n){return wt.throwError("could not detect network",O.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return wt.throwError("could not detect network",O.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Oh(wd,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:nr(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const o=Al(this.connection,JSON.stringify(n),H3).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=o,setTimeout(()=>{this._cache[e]=null},0)),o}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[us(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[us(r.address),r.blockTag]];case"getCode":return["eth_getCode",[us(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[us(r.address),pt(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[fr(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[fr(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=us(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return En(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&G.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const o=yield this.getFeeData();o.maxFeePerGas==null&&o.maxPriorityFeePerGas==null&&(r=it(r),r.transaction=it(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&wt.throwError(e+" not implemented",O.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return h1(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(o){if(e._pendingFilter!=r)return null;let s=Promise.resolve();return o.forEach(function(l){e._emitted["t:"+l.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(l).then(function(a){return e.emit("pending",a),null})})}),s.then(function(){return Yp(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(o=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=it(W3);if(r)for(const o in r)r[o]&&(n[o]=!0);UE(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(o){if(e[o]==null)return;const s=Ou(G.from(e[o]));o==="gasLimit"&&(o="gas"),i[o]=s}),["from","to","data"].forEach(function(o){e[o]!=null&&(i[o]=re(e[o]))}),e.accessList&&(i.accessList=qi(e.accessList)),i}}let Cs=null;try{if(Cs=WebSocket,Cs==null)throw new Error("inject please")}catch{const e=new O($t);Cs=function(){e.throwError("WebSockets not supported in this environment",O.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var tf=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const Kl=new O($t);let G3=1;class qu extends vi{constructor(e,r){r==="any"&&Kl.throwError("WebSocketProvider does not support 'any' network yet",O.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,r):super("_websocket",r),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?z(this,"_websocket",new Cs(this.connection.url)):z(this,"_websocket",e),z(this,"_requests",{}),z(this,"_subs",{}),z(this,"_subIds",{}),z(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{const o=i.data,s=JSON.parse(o);if(s.id!=null){const l=String(s.id),a=this._requests[l];if(delete this._requests[l],s.result!==void 0)a.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(a.payload),response:s.result,provider:this});else{let u=null;s.error?(u=new Error(s.error.message||"unknown error"),z(u,"code",s.error.code||null),z(u,"response",o)):u=new Error("unknown error"),a.callback(u,void 0),this.emit("debug",{action:"response",error:u,request:JSON.parse(a.payload),provider:this})}}else if(s.method==="eth_subscription"){const l=this._subs[s.params.subscription];l&&l.processFunc(s.params.result)}else console.warn("this should not happen")};const n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Kl.throwError("cannot reset events block on WebSocketProvider",O.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Kl.throwError("cannot set polling interval on WebSocketProvider",O.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return tf(this,void 0,void 0,function*(){return null})}set polling(e){e&&Kl.throwError("cannot set polling on WebSocketProvider",O.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,r){const n=G3++;return new Promise((i,o)=>{function s(a,u){return a?o(a):i(u)}const l=JSON.stringify({method:e,params:r,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(l),provider:this}),this._requests[String(n)]={callback:s,payload:l},this._wsReady&&this.websocket.send(l)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,r,n){return tf(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(r).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);const o=yield i;this._subs[o]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],r=>{const n=G.from(r.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],r=>{this.emit("pending",r)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],r=>{r.removed==null&&(r.removed=!1),this.emit(e.filter,this.formatter.filterLog(r))});break;case"tx":{const r=n=>{const i=n.hash;this.getTransactionReceipt(i).then(o=>{o&&this.emit(i,o)})};r(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(r)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let r=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;r="tx"}else if(this.listenerCount(e.event))return;const n=this._subIds[r];n&&(delete this._subIds[r],n.then(i=>{this._subs[i]&&(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return tf(this,void 0,void 0,function*(){this.websocket.readyState===Cs.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}}var V3=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const gs=new O($t);class p1 extends vi{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return V3(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||gs.throwError("no network detected",O.errors.UNKNOWN_ERROR,{}),this._network==null&&(z(this,"_network",r),this.emit("network",r,null))),r})}}class Fn extends p1{constructor(e,r){gs.checkAbstract(new.target,Fn),e=fr(new.target,"getNetwork")(e),r=fr(new.target,"getApiKey")(r);const n=fr(new.target,"getUrl")(e,r);super(n,e),typeof r=="string"?z(this,"apiKey",r):r!=null&&Object.keys(r).forEach(i=>{z(this,i,r[i])})}_startPending(){gs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return gs.throwError("API provider does not support signing",O.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,r){return gs.throwError("not implemented; sub-classes must override getUrl",O.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const Xp=new O($t),Ea="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class m1 extends qu{constructor(e,r){const n=new Lh(e,r),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),z(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Ea}}class Lh extends Fn{static getWebSocketProvider(e,r){return new m1(e,r)}static getApiKey(e){return e==null?Ea:(e&&typeof e!="string"&&Xp.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,r){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:Xp.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+r,throttleCallback:(i,o)=>(r===Ea&&_l(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Ea}}const K3=new O($t),Ql="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Q3(t){switch(t){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 K3.throwArgumentError("unsupported network","name",t)}class g1 extends Fn{isCommunityResource(){return this.apiKey===Ql}static getApiKey(e){return e??Ql}static getUrl(e,r){r==null&&(r=Ql);const n={allowGzip:!0,url:"https://"+Q3(e.name)+r,throttleCallback:(i,o)=>(r.apiKey===Ql&&_l(),Promise.resolve(!0))};return r.projectSecret!=null&&(n.user="",n.password=r.projectSecret),n}}var J3=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const Zp=new O($t);class v1 extends Fn{static getApiKey(e){return e!=null&&Zp.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,r){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:Zp.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,r){const n=Object.create(null,{perform:{get:()=>super.perform}});return J3(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,r)})}}var Jl=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const ti=new O($t);function em(t){const e={};for(let r in t){if(t[r]==null)continue;let n=t[r];r==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?n=Ou(re(n)):r==="accessList"?n="["+qi(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=re(n),e[r]=n)}return e}function Y3(t){if(t.status==0&&(t.message==="No records found"||t.message==="No transactions found"))return t.result;if(t.status!=1||typeof t.message!="string"||!t.message.match(/^OK/)){const e=new Error("invalid response");throw e.result=JSON.stringify(t),(t.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return t.result}function tm(t){if(t&&t.status==0&&t.message=="NOTOK"&&(t.result||"").toLowerCase().indexOf("rate limit")>=0){const e=new Error("throttled response");throw e.result=JSON.stringify(t),e.throttleRetry=!0,e}if(t.jsonrpc!="2.0"){const e=new Error("invalid response");throw e.result=JSON.stringify(t),e}if(t.error){const e=new Error(t.error.message||"unknown error");throw t.error.code&&(e.code=t.error.code),t.error.data&&(e.data=t.error.data),e}return t.result}function rm(t){if(t==="pending")throw new Error("pending not supported");return t==="latest"?t:parseInt(t.substring(2),16)}function rf(t,e,r){if(t==="call"&&e.code===O.errors.SERVER_ERROR){const i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let o=i.data;if(o&&(o="0x"+o.replace(/^.*0x/i,"")),pe(o))return o;ti.throwError("missing revert data in call exception",O.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===O.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&ti.throwError("insufficient funds for intrinsic transaction cost",O.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&ti.throwError("nonce has already been used",O.errors.NONCE_EXPIRED,{error:e,method:t,transaction:r}),n.match(/another transaction with same nonce/)&&ti.throwError("replacement fee too low",O.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&ti.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:r}),e}class y1 extends Hu{constructor(e,r){super(e),z(this,"baseUrl",this.getBaseUrl()),z(this,"apiKey",r||null)}getBaseUrl(){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 ti.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,r){const n=Object.keys(r).reduce((o,s)=>{const l=r[s];return l!=null&&(o+=`&${s}=${l}`),o},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,r){return r.module=e,r.apikey=this.apiKey,r}fetch(e,r,n){return Jl(this,void 0,void 0,function*(){const i=n?this.getPostUrl():this.getUrl(e,r),o=n?this.getPostData(e,r):null,s=e==="proxy"?tm:Y3;this.emit("debug",{action:"request",request:i,provider:this});const l={url:i,throttleSlotInterval:1e3,throttleCallback:(c,d)=>(this.isCommunityResource()&&_l(),Promise.resolve(!0))};let a=null;o&&(l.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},a=Object.keys(o).map(c=>`${c}=${o[c]}`).join("&"));const u=yield Al(l,a,s||tm);return this.emit("debug",{action:"response",request:i,response:nr(u),provider:this}),u})}detectNetwork(){return Jl(this,void 0,void 0,function*(){return this.network})}perform(e,r){const n=Object.create(null,{perform:{get:()=>super.perform}});return Jl(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:r.address,tag:r.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:r.address,tag:r.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:r.address,tag:r.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:r.address,position:r.position,tag:r.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:r.signedTransaction},!0).catch(i=>rf("sendTransaction",i,r.signedTransaction));case"getBlock":if(r.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:r.blockTag,boolean:r.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:r.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:r.transactionHash});case"call":{if(r.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const i=em(r.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(o){return rf("call",o,r.transaction)}}case"estimateGas":{const i=em(r.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(o){return rf("estimateGas",o,r.transaction)}}case"getLogs":{const i={action:"getLogs"};if(r.filter.fromBlock&&(i.fromBlock=rm(r.filter.fromBlock)),r.filter.toBlock&&(i.toBlock=rm(r.filter.toBlock)),r.filter.address&&(i.address=r.filter.address),r.filter.topics&&r.filter.topics.length>0&&(r.filter.topics.length>1&&ti.throwError("unsupported topic count",O.errors.UNSUPPORTED_OPERATION,{topics:r.filter.topics}),r.filter.topics.length===1)){const l=r.filter.topics[0];(typeof l!="string"||l.length!==66)&&ti.throwError("unsupported topic format",O.errors.UNSUPPORTED_OPERATION,{topic0:l}),i.topic0=l}const o=yield this.fetch("logs",i);let s={};for(let l=0;l{["contractAddress","to"].forEach(function(a){s[a]==""&&delete s[a]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);const l=this.formatter.transactionResponse(s);return s.timeStamp&&(l.timestamp=parseInt(s.timeStamp)),l})})}isCommunityResource(){return this.apiKey==null}}var ou=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};const Si=new O($t);function Yl(){return new Date().getTime()}function nm(t){let e=null;for(let r=0;re?null:(n+i)/2}function mo(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(G.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>mo(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=mo(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let X3=1;function om(t){let e=null,r=null,n=new Promise(s=>{e=function(){r&&(clearTimeout(r),r=null),s()},r=setTimeout(e,t)});const i=s=>(n=n.then(s),n);function o(){return n}return{cancel:e,getPromise:o,wait:i}}const Z3=[O.errors.CALL_EXCEPTION,O.errors.INSUFFICIENT_FUNDS,O.errors.NONCE_EXPIRED,O.errors.REPLACEMENT_UNDERPRICED,O.errors.UNPREDICTABLE_GAS_LIMIT],eS=["address","args","errorArgs","errorSignature","method","transaction"];function Xl(t,e){const r={weight:t.weight};return Object.defineProperty(r,"provider",{get:()=>t.provider}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function tS(t,e){return function(r){const n={};r.forEach(o=>{const s=t(o.result);n[s]||(n[s]={count:0,result:o.result}),n[s].count++});const i=Object.keys(n);for(let o=0;o=e)return s.result}}}function rS(t,e,r){let n=mo;switch(e){case"getBlockNumber":return function(i){const o=i.map(l=>l.result);let s=im(i.map(l=>l.result),2);if(s!=null)return s=Math.ceil(s),o.indexOf(s+1)>=0&&s++,s>=t._highestBlockNumber&&(t._highestBlockNumber=s),t._highestBlockNumber};case"getGasPrice":return function(i){const o=i.map(s=>s.result);return o.sort(),o[Math.floor(o.length/2)]};case"getEtherPrice":return function(i){return im(i.map(o=>o.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=it(i),i.confirmations=-1,mo(i))};break;case"getBlock":r.includeTransactions?n=function(i){return i==null?null:(i=it(i),i.transactions=i.transactions.map(o=>(o=it(o),o.confirmations=-1,o)),mo(i))}:n=function(i){return i==null?null:mo(i)};break;default:throw new Error("unknown method: "+e)}return tS(n,t.quorum)}function cs(t,e){return ou(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:po(()=>new Promise((n,i)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function nS(t,e,r,n){return ou(this,void 0,void 0,function*(){let i=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&pe(n.blockTag)&&(i=yield cs(t,e)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&pe(n.blockTag)&&(i=yield cs(t,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&pe(n.blockTag)&&(i=yield cs(t,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&pe(n.blockTag)&&(i=yield cs(t,e)),r==="call"&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let o=n.filter;return(o.fromBlock&&pe(o.fromBlock)||o.toBlock&&pe(o.toBlock))&&(i=yield cs(t,e)),i.getLogs(o)}}return Si.throwError("unknown method error",O.errors.UNKNOWN_ERROR,{method:r,params:n})})}class w1 extends Hu{constructor(e,r){e.length===0&&Si.throwArgumentError("missing providers","providers",e);const n=e.map((s,l)=>{if(Wo.isProvider(s)){const c=vd(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}const a=it(s);a.priority==null&&(a.priority=1),a.stallTimeout==null&&(a.stallTimeout=vd(s)?2e3:750),a.weight==null&&(a.weight=1);const u=a.weight;return(u%1||u>512||u<1)&&Si.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${l}].weight`,u),Object.freeze(a)}),i=n.reduce((s,l)=>s+l.weight,0);r==null?r=i/2:r>i&&Si.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let o=nm(n.map(s=>s.provider.network));o==null&&(o=new Promise((s,l)=>{setTimeout(()=>{this.detectNetwork().then(s,l)},0)})),super(o),z(this,"providerConfigs",Object.freeze(n)),z(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return ou(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return nm(e)})}perform(e,r){return ou(this,void 0,void 0,function*(){if(e==="sendTransaction"){const a=yield Promise.all(this.providerConfigs.map(u=>u.provider.sendTransaction(r.signedTransaction).then(c=>c.hash,c=>c)));for(let u=0;ua.priority-u.priority);const o=this._highestBlockNumber;let s=0,l=!0;for(;;){const a=Yl();let u=i.filter(g=>g.runner&&a-g.startg+v.weight,0);for(;u{g.staller=null}),g.runner=nS(g,o,e,r).then(E=>{g.done=!0,g.result=E,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xl(g,Yl()),request:{method:e,params:nr(r)},provider:this})},E=>{g.done=!0,g.error=E,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xl(g,Yl()),request:{method:e,params:nr(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xl(g,null),request:{method:e,params:nr(r)},provider:this}),u+=g.weight}const c=[];i.forEach(g=>{g.done||!g.runner||(c.push(g.runner),g.staller&&c.push(g.staller.getPromise()))}),c.length&&(yield Promise.race(c));const d=i.filter(g=>g.done&&g.error==null);if(d.length>=this.quorum){const g=n(d);if(g!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),g;l||(yield om(100).getPromise()),l=!1}const m=i.reduce((g,v)=>{if(!v.done||v.error==null)return g;const E=v.error.code;return Z3.indexOf(E)>=0&&(g[E]||(g[E]={error:v.error,weight:0}),g[E].weight+=v.weight),g},{});if(Object.keys(m).forEach(g=>{const v=m[g];if(v.weight{x.staller&&x.staller.cancel(),x.cancelled=!0});const E=v.error,N={};eS.forEach(x=>{E[x]!=null&&(N[x]=E[x])}),Si.throwError(E.reason||E.message,g,N)}),i.filter(g=>!g.done).length===0)break}return i.forEach(a=>{a.staller&&a.staller.cancel(),a.cancelled=!0}),Si.throwError("failed to meet quorum",O.errors.SERVER_ERROR,{method:e,params:r,results:i.map(a=>Xl(a)),provider:this})})}}const x1=null,ba=new O($t),vs="84842078b09946638c03157f83405213";class E1 extends qu{constructor(e,r){const n=new Bh(e,r),i=n.connection;i.password&&ba.throwError("INFURA WebSocket project secrets unsupported",O.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});const o=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(o,e),z(this,"apiKey",n.projectId),z(this,"projectId",n.projectId),z(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===vs}}class Bh extends Fn{static getWebSocketProvider(e,r){return new E1(e,r)}static getApiKey(e){const r={apiKey:vs,projectId:vs,projectSecret:null};return e==null||(typeof e=="string"?r.projectId=e:e.projectSecret!=null?(ba.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),ba.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),r.projectId=e.projectId,r.projectSecret=e.projectSecret):e.projectId&&(r.projectId=e.projectId),r.apiKey=r.projectId),r}static getUrl(e,r){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:ba.throwError("unsupported network",O.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const i={allowGzip:!0,url:"https://"+n+"/v3/"+r.projectId,throttleCallback:(o,s)=>(r.projectId===vs&&_l(),Promise.resolve(!0))};return r.projectSecret!=null&&(i.user="",i.password=r.projectSecret),i}isCommunityResource(){return this.projectId===vs}}class iS extends vi{send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);const i={request:n,resolve:null,reject:null},o=new Promise((s,l)=>{i.resolve=s,i.reject=l});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{const s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const l=s.map(a=>a.request);return this.emit("debug",{action:"requestBatch",request:nr(l),provider:this}),Al(this.connection,JSON.stringify(l)).then(a=>{this.emit("debug",{action:"response",request:l,response:a,provider:this}),s.forEach((u,c)=>{const d=a[c];if(d.error){const m=new Error(d.error.message);m.code=d.error.code,m.data=d.error.data,u.reject(m)}else u.resolve(d.result)})},a=>{this.emit("debug",{action:"response",error:a,request:l,provider:this}),s.forEach(u=>{u.reject(a)})})},10)),o}}const nf=new O($t),oS="ETHERS_JS_SHARED";class b1 extends Fn{static getApiKey(e){return e&&typeof e!="string"&&nf.throwArgumentError("invalid apiKey","apiKey",e),e||oS}static getUrl(e,r){nf.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:nf.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+r}}const sm=new O($t),lm="62e1ad51b37b8e00394bda3b";class A1 extends Fn{static getApiKey(e){const r={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?r.applicationId=lm:typeof e=="string"?r.applicationId=e:e.applicationSecretKey!=null?(r.applicationId=e.applicationId,r.applicationSecretKey=e.applicationSecretKey):e.applicationId?r.applicationId=e.applicationId:sm.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),r}static getUrl(e,r){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:sm.throwError("unsupported network",O.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const i=`https://${n}/v1/lb/${r.applicationId}`,o={headers:{},url:i};return r.applicationSecretKey!=null&&(o.user="",o.password=r.applicationSecretKey),o}isCommunityResource(){return this.applicationId===lm}}const am=new O($t);let sS=1;function um(t,e){const r="Web3LegacyFetcher";return function(n,i){const o={method:n,params:i,id:sS++,jsonrpc:"2.0"};return new Promise((s,l)=>{this.emit("debug",{action:"request",fetcher:r,request:nr(o),provider:this}),e(o,(a,u)=>{if(a)return this.emit("debug",{action:"response",fetcher:r,error:a,request:o,provider:this}),l(a);if(this.emit("debug",{action:"response",fetcher:r,request:o,response:u,provider:this}),u.error){const c=new Error(u.error.message);return c.code=u.error.code,c.data=u.error.data,l(c)}s(u.result)})})}}function lS(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:nr(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class _1 extends vi{constructor(e,r){e==null&&am.throwArgumentError("missing provider","provider",e);let n=null,i=null,o=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),o=e,e.request?(n===""&&(n="eip-1193:"),i=lS(e)):e.sendAsync?i=um(e,e.sendAsync.bind(e)):e.send?i=um(e,e.send.bind(e)):am.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),z(this,"jsonRpcFetchFunc",i),z(this,"provider",o)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const cm=new O($t);function aS(t,e){if(t==null&&(t="homestead"),typeof t=="string"){const n=t.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new vi(t);case"ws":case"wss":return new qu(t);default:cm.throwArgumentError("unsupported URL scheme","network",t)}}const r=Th(t);return(!r||!r._defaultProvider)&&cm.throwError("unsupported getDefaultProvider network",O.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:t}),r._defaultProvider({FallbackProvider:w1,AlchemyProvider:Lh,AnkrProvider:g1,CloudflareProvider:v1,EtherscanProvider:y1,InfuraProvider:Bh,JsonRpcProvider:vi,NodesmithProvider:b1,PocketProvider:A1,Web3Provider:_1,IpcProvider:x1},e)}const uS=Object.freeze(Object.defineProperty({__proto__:null,AlchemyProvider:Lh,AlchemyWebSocketProvider:m1,AnkrProvider:g1,BaseProvider:Hu,CloudflareProvider:v1,EtherscanProvider:y1,FallbackProvider:w1,Formatter:te,InfuraProvider:Bh,InfuraWebSocketProvider:E1,IpcProvider:x1,JsonRpcBatchProvider:iS,JsonRpcProvider:vi,JsonRpcSigner:Oh,NodesmithProvider:b1,PocketProvider:A1,Provider:Wo,Resolver:yd,StaticJsonRpcProvider:p1,UrlJsonRpcProvider:Fn,Web3Provider:_1,WebSocketProvider:qu,getDefaultProvider:aS,getNetwork:Th,isCommunityResourcable:c1,isCommunityResource:vd,showThrottleMessage:_l},Symbol.toStringTag,{value:"Module"})),cS="solidity/5.7.0",fS=new RegExp("^bytes([0-9]+)$"),dS=new RegExp("^(u?int)([0-9]*)$"),hS=new RegExp("^(.*)\\[([0-9]*)\\]$"),pS="0000000000000000000000000000000000000000000000000000000000000000",Xi=new O(cS);function S1(t,e,r){switch(t){case"address":return r?pa(e,32):se(e);case"string":return mr(e);case"bytes":return se(e);case"bool":return e=e?"0x01":"0x00",r?pa(e,32):se(e)}let n=t.match(dS);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Xi.throwArgumentError("invalid number type","type",t),r&&(i=256),e=G.from(e).toTwos(i),pa(e,i/8)}if(n=t.match(fS),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Xi.throwArgumentError("invalid bytes type","type",t),se(e).byteLength!==i&&Xi.throwArgumentError(`invalid value for ${t}`,"value",e),r?se((e+pS).substring(0,66)):e}if(n=t.match(hS),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Xi.throwArgumentError(`invalid array length for ${t}`,"value",e);const s=[];return e.forEach(function(l){s.push(S1(i,l,!0))}),Ut(s)}return Xi.throwArgumentError("invalid type","type",t)}function mS(t,e){t.length!=e.length&&Xi.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(S1(n,e[i]))}),re(Ut(r))}function gS(t,e){return ut(mS(t,e))}var Wu={},Cn={},k1={};const vS=Fo(nb);var yS={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const fm=t=>{let e;const r=new Set,n=(a,u)=>{const c=typeof a=="function"?a(e):a;if(!Object.is(c,e)){const d=e;e=u??typeof c!="object"?c:Object.assign({},e,c),r.forEach(m=>m(e,d))}},i=()=>e,l={setState:n,getState:i,subscribe:a=>(r.add(a),()=>r.delete(a)),destroy:()=>{(yS?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,i,l),l},N1=t=>t?fm(t):fm;var P1={exports:{}},C1={},M1={exports:{}},I1={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -79,7 +79,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Bo=L;function wS(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ES=typeof Object.is=="function"?Object.is:wS,xS=Bo.useState,bS=Bo.useEffect,AS=Bo.useLayoutEffect,_S=Bo.useDebugValue;function SS(t,e){var r=e(),n=xS({inst:{value:r,getSnapshot:e}}),i=n[0].inst,o=n[1];return AS(function(){i.value=r,i.getSnapshot=e,of(i)&&o({inst:i})},[t,r,e]),bS(function(){return of(i)&&o({inst:i}),t(function(){of(i)&&o({inst:i})})},[t]),_S(r),r}function of(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!ES(t,r)}catch{return!0}}function kS(t,e){return e()}var NS=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?kS:SS;I1.useSyncExternalStore=Bo.useSyncExternalStore!==void 0?Bo.useSyncExternalStore:NS;M1.exports=I1;var PS=M1.exports;/** + */var jo=L;function wS(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var xS=typeof Object.is=="function"?Object.is:wS,ES=jo.useState,bS=jo.useEffect,AS=jo.useLayoutEffect,_S=jo.useDebugValue;function SS(t,e){var r=e(),n=ES({inst:{value:r,getSnapshot:e}}),i=n[0].inst,o=n[1];return AS(function(){i.value=r,i.getSnapshot=e,of(i)&&o({inst:i})},[t,r,e]),bS(function(){return of(i)&&o({inst:i}),t(function(){of(i)&&o({inst:i})})},[t]),_S(r),r}function of(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!xS(t,r)}catch{return!0}}function kS(t,e){return e()}var NS=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?kS:SS;I1.useSyncExternalStore=jo.useSyncExternalStore!==void 0?jo.useSyncExternalStore:NS;M1.exports=I1;var PS=M1.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -87,4 +87,4 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Gu=L,CS=PS;function MS(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var IS=typeof Object.is=="function"?Object.is:MS,RS=CS.useSyncExternalStore,TS=Gu.useRef,OS=Gu.useEffect,LS=Gu.useMemo,BS=Gu.useDebugValue;C1.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var o=TS(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=LS(function(){function a(g){if(!u){if(u=!0,c=g,g=n(g),i!==void 0&&s.hasValue){var v=s.value;if(i(v,g))return d=v}return d=g}if(v=d,IS(c,g))return v;var x=n(g);return i!==void 0&&i(v,x)?v:(c=g,d=x)}var u=!1,c,d,m=r===void 0?null:r;return[function(){return a(e())},m===null?void 0:function(){return a(m())}]},[e,r,n,i]);var l=RS(t,o[0],o[1]);return OS(function(){s.hasValue=!0,s.value=l},[l]),BS(l),l};P1.exports=C1;var jS=P1.exports;const Vu=Do(jS),{useSyncExternalStoreWithSelector:DS}=Vu;function R1(t,e=t.getState,r){const n=DS(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return L.useDebugValue(n),n}const dm=t=>{const e=typeof t=="function"?N1(t):t,r=(n,i)=>R1(e,n,i);return Object.assign(r,e),r},T1=t=>t?dm(t):dm;var US=t=>T1(t);const FS=Object.freeze(Object.defineProperty({__proto__:null,create:T1,createStore:N1,default:US,useStore:R1},Symbol.toStringTag,{value:"Module"})),zS=Uo(FS);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createWeb3ReactStoreAndActions=t.MAX_SAFE_CHAIN_ID=void 0;const e=vS,r=zS;t.MAX_SAFE_CHAIN_ID=0xfffffffffffec;function n(l){if(!Number.isInteger(l)||l<=0||l>t.MAX_SAFE_CHAIN_ID)throw new Error(`Invalid chainId ${l}`)}function i(l){return(0,e.getAddress)(l)}const o={chainId:void 0,accounts:void 0,activating:!1};function s(){const l=(0,r.createStore)()(()=>o);let a=0;function u(){const m=++a;return l.setState(Object.assign(Object.assign({},o),{activating:!0})),()=>{a===m&&l.setState({activating:!1})}}function c(m){if(m.chainId!==void 0&&n(m.chainId),m.accounts!==void 0)for(let g=0;g{var v,x;const N=(v=m.chainId)!==null&&v!==void 0?v:g.chainId,E=(x=m.accounts)!==null&&x!==void 0?x:g.accounts;let w=g.activating;return w&&N&&E&&(w=!1),{chainId:N,accounts:E,activating:w}})}function d(){a++,l.setState(o)}return[l,{startActivation:u,update:c,resetState:d}]}t.createWeb3ReactStoreAndActions=s})(k1);var $S={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const hm=t=>{let e;const r=new Set,n=(a,u)=>{const c=typeof a=="function"?a(e):a;if(!Object.is(c,e)){const d=e;e=u??typeof c!="object"?c:Object.assign({},e,c),r.forEach(m=>m(e,d))}},i=()=>e,l={setState:n,getState:i,subscribe:a=>(r.add(a),()=>r.delete(a)),destroy:()=>{($S?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,i,l),l},jh=t=>t?hm(t):hm,{useSyncExternalStoreWithSelector:HS}=Vu;function O1(t,e=t.getState,r){const n=HS(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return L.useDebugValue(n),n}const pm=t=>{const e=typeof t=="function"?jh(t):t,r=(n,i)=>O1(e,n,i);return Object.assign(r,e),r},L1=t=>t?pm(t):pm;var qS=t=>L1(t);const WS=Object.freeze(Object.defineProperty({__proto__:null,create:L1,createStore:jh,default:qS,useStore:O1},Symbol.toStringTag,{value:"Module"})),GS=Uo(WS),{useSyncExternalStoreWithSelector:VS}=Vu;function B1(t,e=t.getState,r){const n=VS(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return L.useDebugValue(n),n}const mm=(t,e)=>{const r=jh(t),n=(i,o=e)=>B1(r,i,o);return Object.assign(n,r),n},KS=(t,e)=>t?mm(t,e):mm,QS=Object.freeze(Object.defineProperty({__proto__:null,createWithEqualityFn:KS,useStoreWithEqualityFn:B1},Symbol.toStringTag,{value:"Module"})),JS=Uo(QS),YS=Uo(uS);var XS=Fe&&Fe.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),ZS=Fe&&Fe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ek=Fe&&Fe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&XS(e,t,r);return ZS(e,t),e},tk=Fe&&Fe.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.getPriorityConnector=Cn.getSelectedConnector=Cn.initializeConnector=void 0;const rk=k1,mo=L,gm=GS,nk=JS;let _o;function ik(){return tk(this,void 0,void 0,function*(){if(_o===void 0)try{const{Web3Provider:t}=yield Promise.resolve().then(()=>ek(YS));_o=t}catch{console.debug("@ethersproject/providers not available"),_o=null}})}function ok(t){const[e,r]=(0,rk.createWeb3ReactStoreAndActions)(),n=t(r),i=dk(e),o=hk(i),s=pk(n,i,o);return[n,Object.assign(Object.assign(Object.assign({},i),o),s),e]}Cn.initializeConnector=ok;function sk({chainId:t,accounts:e,activating:r}){return!!(t&&e&&!r)}function j1(...t){function e(d){const m=t.findIndex(([g])=>d===g);if(m===-1)throw new Error("Connector not found");return m}function r(d){const m=t[e(d)][2];if(!m)throw new Error("Stores not passed");return m}function n(d){return t.map(([,{useChainId:g}])=>g())[e(d)]}function i(d){return t.map(([,{useAccounts:g}])=>g())[e(d)]}function o(d){return t.map(([,{useIsActivating:g}])=>g())[e(d)]}function s(d){return t.map(([,{useAccount:g}])=>g())[e(d)]}function l(d){return t.map(([,{useIsActive:g}])=>g())[e(d)]}function a(d,m){const g=e(d);return t.map(([,{useProvider:x}],N)=>x(m,N===g))[g]}function u(d,m){const g=e(d);return t.map(([,{useENSNames:x}],N)=>x(N===g?m:void 0))[g]}function c(d,m){const g=e(d);return t.map(([,{useENSName:x}],N)=>x(N===g?m:void 0))[g]}return{useSelectedStore:r,useSelectedChainId:n,useSelectedAccounts:i,useSelectedIsActivating:o,useSelectedAccount:s,useSelectedIsActive:l,useSelectedProvider:a,useSelectedENSNames:u,useSelectedENSName:c}}Cn.getSelectedConnector=j1;function lk(...t){const{useSelectedStore:e,useSelectedChainId:r,useSelectedAccounts:n,useSelectedIsActivating:i,useSelectedAccount:o,useSelectedIsActive:s,useSelectedProvider:l,useSelectedENSNames:a,useSelectedENSName:u}=j1(...t);function c(){const B=t.map(([,{useIsActive:D}])=>D()).findIndex(D=>D);return t[B===-1?0:B][0]}function d(){return e(c())}function m(){return r(c())}function g(){return n(c())}function v(){return i(c())}function x(){return o(c())}function N(){return s(c())}function E(T){return l(c(),T)}function w(T){return a(c(),T)}function b(T){return u(c(),T)}return{useSelectedStore:e,useSelectedChainId:r,useSelectedAccounts:n,useSelectedIsActivating:i,useSelectedAccount:o,useSelectedIsActive:s,useSelectedProvider:l,useSelectedENSNames:a,useSelectedENSName:u,usePriorityConnector:c,usePriorityStore:d,usePriorityChainId:m,usePriorityAccounts:g,usePriorityIsActivating:v,usePriorityAccount:x,usePriorityIsActive:N,usePriorityProvider:E,usePriorityENSNames:w,usePriorityENSName:b}}Cn.getPriorityConnector=lk;const ak=({chainId:t})=>t,uk=({accounts:t})=>t,ck=({activating:t})=>t,fk=(t,e)=>t===void 0&&e===void 0||t!==void 0&&t.length===(e==null?void 0:e.length)&&t.every((r,n)=>r===e[n]);function dk(t){function e(){return(0,gm.useStore)(t,ak)}function r(){return(0,nk.useStoreWithEqualityFn)(t,uk,fk)}function n(){return(0,gm.useStore)(t,ck)}return{useChainId:e,useAccounts:r,useIsActivating:n}}function hk({useChainId:t,useAccounts:e,useIsActivating:r}){function n(){var o;return(o=e())===null||o===void 0?void 0:o[0]}function i(){const o=t(),s=e(),l=r();return sk({chainId:o,accounts:s,activating:l})}return{useAccount:n,useIsActive:i}}function vm(t,e=[]){const[r,n]=(0,mo.useState)();return(0,mo.useEffect)(()=>{if(t&&e.length){let i=!1;return Promise.all(e.map(o=>t.lookupAddress(o))).then(o=>{i||n(o)}).catch(o=>{i||(console.debug("Could not fetch ENS names",o),n(new Array(e.length).fill(null)))}),()=>{i=!0,n(void 0)}}},[t,e]),r??new Array(e.length).fill(void 0)}function pk(t,{useAccounts:e,useChainId:r},{useAccount:n,useIsActive:i}){function o(a,u=!0){const c=i(),d=r(),[m,g]=(0,mo.useState)(_o!==void 0);return(0,mo.useEffect)(()=>{if(m)return;let v=!1;return ik().then(()=>{v||g(!0)}),()=>{v=!0}},[m]),(0,mo.useMemo)(()=>{if(u){if(t.customProvider)return t.customProvider;if(_o&&t.provider)return new _o(t.provider,a)}},[m,u,c,d,a])}function s(a){const u=e();return vm(a,u)}function l(a){var u;const c=n(),d=(0,mo.useMemo)(()=>c===void 0?void 0:[c],[c]);return(u=vm(a,d))===null||u===void 0?void 0:u[0]}return{useProvider:o,useENSNames:s,useENSName:l}}var Ku={},D1={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(a,u,c){this.fn=a,this.context=u,this.once=c||!1}function o(a,u,c,d,m){if(typeof c!="function")throw new TypeError("The listener must be a function");var g=new i(c,d||a,m),v=r?r+u:u;return a._events[v]?a._events[v].fn?a._events[v]=[a._events[v],g]:a._events[v].push(g):(a._events[v]=g,a._eventsCount++),a}function s(a,u){--a._eventsCount===0?a._events=new n:delete a._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],c,d;if(this._eventsCount===0)return u;for(d in c=this._events)e.call(c,d)&&u.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},l.prototype.listeners=function(u){var c=r?r+u:u,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var m=0,g=d.length,v=new Array(g);me),this.eth_accounts=jest.fn(e=>e),this.eth_requestAccounts=jest.fn(e=>e)}request(e){if(!this.chainId)return Promise.reject(new Error);switch(e.method){case"eth_chainId":return Promise.resolve(this.eth_chainId(this.chainId));case"eth_accounts":return Promise.resolve(this.eth_accounts(this.accounts));case"eth_requestAccounts":return Promise.resolve(this.eth_requestAccounts(this.accounts));default:throw new Error(`Method not supported on mock: ${JSON.stringify(e)}`)}}emitConnect(e){this.emit("connect",{chainId:e})}emitDisconnect(e){this.emit("disconnect",e)}emitChainChanged(e){this.emit("chainChanged",e)}emitAccountsChanged(e){this.emit("accountsChanged",e)}}Ku.MockEIP1193Provider=vk;var jo={},yk=Fe&&Fe.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),wk=Fe&&Fe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ek=Fe&&Fe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&yk(e,t,r);return wk(e,t),e};Object.defineProperty(jo,"__esModule",{value:!0});jo.useWeb3React=jo.Web3ReactProvider=void 0;const su=Ek(L),xk=Cn,U1=(0,su.createContext)(void 0);function bk({children:t,connectors:e,connectorOverride:r,network:n,lookupENS:i=!0}){const o=(0,su.useRef)(e);if(e.length!=o.current.length||e.some((J,X)=>{const ie=o.current[X];return J[0]!==ie[0]}))throw new Error("The connectors prop passed to Web3ReactProvider must be referentially static. If connectors is changing, try providing a key prop to Web3ReactProvider that changes every time connectors changes.");const s=(0,xk.getPriorityConnector)(...e),{usePriorityConnector:l,useSelectedChainId:a,useSelectedAccounts:u,useSelectedIsActivating:c,useSelectedAccount:d,useSelectedIsActive:m,useSelectedProvider:g,useSelectedENSNames:v,useSelectedENSName:x}=s,N=l(),E=r??N,w=a(E),b=u(E),T=c(E),B=d(E),D=m(E),$=g(E,n),H=v(E,i?$:void 0),Q=x(E,i?$:void 0);return su.default.createElement(U1.Provider,{value:{connector:E,chainId:w,accounts:b,isActivating:T,account:B,isActive:D,provider:$,ENSNames:H,ENSName:Q,hooks:s}},t)}jo.Web3ReactProvider=bk;function Ak(){const t=(0,su.useContext)(U1);if(!t)throw Error("useWeb3React can only be used within the Web3ReactProvider component");return t}jo.useWeb3React=Ak;(function(t){var e=Fe&&Fe.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=Fe&&Fe.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Cn,t),r(Ku,t),r(jo,t)})(Wu);const sf=[{type:"function",name:"UPGRADE_INTERFACE_VERSION",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"approve",inputs:[{name:"to",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"apps",inputs:[{name:"",type:"uint256",internalType:"uint256"}],outputs:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherKnsNodeId",type:"bytes32",internalType:"bytes32"},{name:"metadataUrl",type:"string",internalType:"string"},{name:"metadataHash",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"balanceOf",inputs:[{name:"owner",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"contractURI",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"getApproved",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getInitializedVersion",inputs:[],outputs:[{name:"",type:"uint64",internalType:"uint64"}],stateMutability:"view"},{type:"function",name:"getPackageId",inputs:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherName",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"pure"},{type:"function",name:"getPackageInfo",inputs:[{name:"package",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"tuple",internalType:"struct IKinodeAppStore.PackageInfo",components:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherKnsNodeId",type:"bytes32",internalType:"bytes32"},{name:"metadataUrl",type:"string",internalType:"string"},{name:"metadataHash",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"getPackageInfo",inputs:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherName",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"tuple",internalType:"struct IKinodeAppStore.PackageInfo",components:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherKnsNodeId",type:"bytes32",internalType:"bytes32"},{name:"metadataUrl",type:"string",internalType:"string"},{name:"metadataHash",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"initialize",inputs:[{name:"_knsResolver",type:"address",internalType:"contract KNSRegistryResolver"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"isApprovedForAll",inputs:[{name:"owner",type:"address",internalType:"address"},{name:"operator",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"knsResolver",inputs:[],outputs:[{name:"",type:"address",internalType:"contract KNSRegistryResolver"}],stateMutability:"view"},{type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"ownerOf",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"proxiableUUID",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"registerApp",inputs:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherName",type:"bytes",internalType:"bytes"},{name:"metadataUrl",type:"string",internalType:"string"},{name:"metadataHash",type:"bytes32",internalType:"bytes32"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"renounceOwnership",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"safeTransferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"safeTransferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setApprovalForAll",inputs:[{name:"operator",type:"address",internalType:"address"},{name:"approved",type:"bool",internalType:"bool"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"tokenURI",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"transferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"transferOwnership",inputs:[{name:"newOwner",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"unlistPacakge",inputs:[{name:"package",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"updateContractURI",inputs:[{name:"uri",type:"string",internalType:"string"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"updateMetadata",inputs:[{name:"package",type:"uint256",internalType:"uint256"},{name:"metadataUrl",type:"string",internalType:"string"},{name:"metadataHash",type:"bytes32",internalType:"bytes32"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"upgradeToAndCall",inputs:[{name:"newImplementation",type:"address",internalType:"address"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"payable"},{type:"event",name:"AppMetadataUpdated",inputs:[{name:"package",type:"uint256",indexed:!0,internalType:"uint256"},{name:"metadataUrl",type:"string",indexed:!1,internalType:"string"},{name:"metadataHash",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"AppRegistered",inputs:[{name:"package",type:"uint256",indexed:!0,internalType:"uint256"},{name:"packageName",type:"string",indexed:!1,internalType:"string"},{name:"publisherName",type:"bytes",indexed:!1,internalType:"bytes"},{name:"metadataUrl",type:"string",indexed:!1,internalType:"string"},{name:"metadataHash",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"Approval",inputs:[{name:"owner",type:"address",indexed:!0,internalType:"address"},{name:"approved",type:"address",indexed:!0,internalType:"address"},{name:"tokenId",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ApprovalForAll",inputs:[{name:"owner",type:"address",indexed:!0,internalType:"address"},{name:"operator",type:"address",indexed:!0,internalType:"address"},{name:"approved",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"Initialized",inputs:[{name:"version",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"OwnershipTransferred",inputs:[{name:"previousOwner",type:"address",indexed:!0,internalType:"address"},{name:"newOwner",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"Transfer",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"tokenId",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"Upgraded",inputs:[{name:"implementation",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"error",name:"AddressEmptyCode",inputs:[{name:"target",type:"address",internalType:"address"}]},{type:"error",name:"ERC1967InvalidImplementation",inputs:[{name:"implementation",type:"address",internalType:"address"}]},{type:"error",name:"ERC1967NonPayable",inputs:[]},{type:"error",name:"ERC721IncorrectOwner",inputs:[{name:"sender",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"},{name:"owner",type:"address",internalType:"address"}]},{type:"error",name:"ERC721InsufficientApproval",inputs:[{name:"operator",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"}]},{type:"error",name:"ERC721InvalidApprover",inputs:[{name:"approver",type:"address",internalType:"address"}]},{type:"error",name:"ERC721InvalidOperator",inputs:[{name:"operator",type:"address",internalType:"address"}]},{type:"error",name:"ERC721InvalidOwner",inputs:[{name:"owner",type:"address",internalType:"address"}]},{type:"error",name:"ERC721InvalidReceiver",inputs:[{name:"receiver",type:"address",internalType:"address"}]},{type:"error",name:"ERC721InvalidSender",inputs:[{name:"sender",type:"address",internalType:"address"}]},{type:"error",name:"ERC721NonexistentToken",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}]},{type:"error",name:"FailedInnerCall",inputs:[]},{type:"error",name:"InvalidInitialization",inputs:[]},{type:"error",name:"NotInitializing",inputs:[]},{type:"error",name:"OwnableInvalidOwner",inputs:[{name:"owner",type:"address",internalType:"address"}]},{type:"error",name:"OwnableUnauthorizedAccount",inputs:[{name:"account",type:"address",internalType:"address"}]},{type:"error",name:"UUPSUnauthorizedCallContext",inputs:[]},{type:"error",name:"UUPSUnsupportedProxiableUUID",inputs:[{name:"slot",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"Unauthorized",inputs:[]}];class Ed{static createInterface(){return new ud(sf)}static connect(e,r){return new v3(e,sf,r)}}zh(Ed,"abi",sf);var F1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ym=qr.createContext&&qr.createContext(F1),_k=["attr","size","title"];function Sk(t,e){if(t==null)return{};var r=kk(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function kk(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o=0)&&(r[i]=t[i]);return r}function lu(){return lu=Object.assign?Object.assign.bind():function(t){for(var e=1;eqr.createElement(e.tag,au({key:r},e.attr),z1(e.child)))}function zn(t){return e=>qr.createElement(Mk,lu({attr:au({},t.attr)},e),z1(t.child))}function Mk(t){var e=r=>{var{attr:n,size:i,title:o}=t,s=Sk(t,_k),l=i||r.size||"1em",a;return r.className&&(a=r.className),t.className&&(a=(a?a+" ":"")+t.className),qr.createElement("svg",lu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,s,{className:a,style:au(au({color:t.color||r.color},r.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&qr.createElement("title",null,o),t.children)};return ym!==void 0?qr.createElement(ym.Consumer,null,r=>e(r)):e(F1)}function Ik(t){return zn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"},child:[]}]})(t)}function Rk(t){return zn({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"},child:[]}]})(t)}function Tk(t){return zn({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"},child:[]}]})(t)}function Ok(t){return zn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"},child:[]}]})(t)}function Lk(t){return zn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"},child:[]}]})(t)}function Bk(t){return zn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(t)}function jk(t){return zn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(t)}function $1(t){return zn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"},child:[]}]})(t)}function Dk(t){return zn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm101.8-262.2L295.6 256l62.2 62.2c4.7 4.7 4.7 12.3 0 17l-22.6 22.6c-4.7 4.7-12.3 4.7-17 0L256 295.6l-62.2 62.2c-4.7 4.7-12.3 4.7-17 0l-22.6-22.6c-4.7-4.7-4.7-12.3 0-17l62.2-62.2-62.2-62.2c-4.7-4.7-4.7-12.3 0-17l22.6-22.6c4.7-4.7 12.3-4.7 17 0l62.2 62.2 62.2-62.2c4.7-4.7 12.3-4.7 17 0l22.6 22.6c4.7 4.7 4.7 12.3 0 17z"},child:[]}]})(t)}var Uk={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Em=t=>{let e;const r=new Set,n=(a,u)=>{const c=typeof a=="function"?a(e):a;if(!Object.is(c,e)){const d=e;e=u??(typeof c!="object"||c===null)?c:Object.assign({},e,c),r.forEach(m=>m(e,d))}},i=()=>e,l={setState:n,getState:i,subscribe:a=>(r.add(a),()=>r.delete(a)),destroy:()=>{(Uk?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,i,l),l},Fk=t=>t?Em(t):Em;var H1={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:zk}=qr,{useSyncExternalStoreWithSelector:$k}=Vu;let xm=!1;function Hk(t,e=t.getState,r){(H1?"production":void 0)!=="production"&&r&&!xm&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),xm=!0);const n=$k(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return zk(n),n}const bm=t=>{(H1?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Fk(t):t,r=(n,i)=>Hk(e,n,i);return Object.assign(r,e),r},qk=t=>t?bm(t):bm;var Wk={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};function q1(t,e){let r;try{r=t()}catch{return}return{getItem:i=>{var o;const s=a=>a===null?null:JSON.parse(a,e==null?void 0:e.reviver),l=(o=r.getItem(i))!=null?o:null;return l instanceof Promise?l.then(s):s(l)},setItem:(i,o)=>r.setItem(i,JSON.stringify(o,e==null?void 0:e.replacer)),removeItem:i=>r.removeItem(i)}}const sl=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return sl(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return sl(n)(r)}}}},Gk=(t,e)=>(r,n,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:N=>N,version:0,merge:(N,E)=>({...E,...N}),...e},s=!1;const l=new Set,a=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return t((...N)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...N)},n,i);const c=sl(o.serialize),d=()=>{const N=o.partialize({...n()});let E;const w=c({state:N,version:o.version}).then(b=>u.setItem(o.name,b)).catch(b=>{E=b});if(E)throw E;return w},m=i.setState;i.setState=(N,E)=>{m(N,E),d()};const g=t((...N)=>{r(...N),d()},n,i);let v;const x=()=>{var N;if(!u)return;s=!1,l.forEach(w=>w(n()));const E=((N=o.onRehydrateStorage)==null?void 0:N.call(o,n()))||void 0;return sl(u.getItem.bind(u))(o.name).then(w=>{if(w)return o.deserialize(w)}).then(w=>{if(w)if(typeof w.version=="number"&&w.version!==o.version){if(o.migrate)return o.migrate(w.state,w.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return w.state}).then(w=>{var b;return v=o.merge(w,(b=n())!=null?b:g),r(v,!0),d()}).then(()=>{E==null||E(v,void 0),s=!0,a.forEach(w=>w(v))}).catch(w=>{E==null||E(void 0,w)})};return i.persist={setOptions:N=>{o={...o,...N},N.getStorage&&(u=N.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>x(),hasHydrated:()=>s,onHydrate:N=>(l.add(N),()=>{l.delete(N)}),onFinishHydration:N=>(a.add(N),()=>{a.delete(N)})},x(),v||g},Vk=(t,e)=>(r,n,i)=>{let o={storage:q1(()=>localStorage),partialize:x=>x,version:0,merge:(x,N)=>({...N,...x}),...e},s=!1;const l=new Set,a=new Set;let u=o.storage;if(!u)return t((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...x)},n,i);const c=()=>{const x=o.partialize({...n()});return u.setItem(o.name,{state:x,version:o.version})},d=i.setState;i.setState=(x,N)=>{d(x,N),c()};const m=t((...x)=>{r(...x),c()},n,i);let g;const v=()=>{var x,N;if(!u)return;s=!1,l.forEach(w=>{var b;return w((b=n())!=null?b:m)});const E=((N=o.onRehydrateStorage)==null?void 0:N.call(o,(x=n())!=null?x:m))||void 0;return sl(u.getItem.bind(u))(o.name).then(w=>{if(w)if(typeof w.version=="number"&&w.version!==o.version){if(o.migrate)return o.migrate(w.state,w.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return w.state}).then(w=>{var b;return g=o.merge(w,(b=n())!=null?b:m),r(g,!0),c()}).then(()=>{E==null||E(g,void 0),g=n(),s=!0,a.forEach(w=>w(g))}).catch(w=>{E==null||E(void 0,w)})};return i.persist={setOptions:x=>{o={...o,...x},x.storage&&(u=x.storage)},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>s,onHydrate:x=>(l.add(x),()=>{l.delete(x)}),onFinishHydration:x=>(a.add(x),()=>{a.delete(x)})},o.skipHydration||v(),g||m},Kk=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((Wk?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Gk(t,e)):Vk(t,e),Qk=Kk;var jr=(t=>(t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.ACCEPTED=202]="ACCEPTED",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",t[t.FOUND=302]="FOUND",t[t.SEE_OTHER=303]="SEE_OTHER",t[t.NOT_MODIFIED=304]="NOT_MODIFIED",t[t.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",t[t.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",t[t.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t))(jr||{});const xe=t=>`${t.package}:${t.publisher}`,cs=t=>{var e;return((e=t.metadata)==null?void 0:e.name)||xe(t)},lf=t=>{var e,r;return t.publisher==="sys"?"system":(e=t.state)!=null&&e.our_version&&!((r=t.state)!=null&&r.capsApproved)?"downloaded":t.metadata?"installed":"local"},or="/main:app_store:sys",Zl=(t,e)=>t.package===e.package&&t.publisher===e.publisher,Qo=qk()(Qk((t,e)=>({myApps:{downloaded:[],installed:[],local:[],system:[]},listedApps:[],searchResults:[],query:"",getMyApps:async()=>{const i=(await(await fetch(`${or}/apps`)).json()).reduce((o,s)=>{const l=lf(s);return o[l].push(s),o},{downloaded:[],installed:[],local:[],system:[]});return t(()=>({myApps:i})),i},getListedApps:async()=>{const n=await(await fetch(`${or}/apps/listed`)).json();return t({listedApps:n}),n},getMyApp:async r=>{const i=await(await fetch(`${or}/apps/${xe(r)}`)).json(),o=lf(i),s=e().myApps;s[o]=s[o].map(a=>Zl(a,i)?i:a);const l=[...e().listedApps].map(a=>Zl(a,i)?i:a);return t({myApps:s,listedApps:l}),i},installApp:async r=>{if((await fetch(`${or}/apps/${xe(r)}/caps`,{method:"POST"})).status!==jr.OK)throw new Error(`Failed to approve caps for app: ${xe(r)}`);if((await fetch(`${or}/apps/${xe(r)}`,{method:"POST"})).status!==jr.CREATED)throw new Error(`Failed to install app: ${xe(r)}`)},updateApp:async r=>{if((await fetch(`${or}/apps/${xe(r)}`,{method:"PUT"})).status!==jr.NO_CONTENT)throw new Error(`Failed to update app: ${xe(r)}`)},uninstallApp:async r=>{if(!confirm(`Are you sure you want to remove ${xe(r)}?`))return;if((await fetch(`${or}/apps/${xe(r)}`,{method:"DELETE"})).status!==jr.NO_CONTENT)throw new Error(`Failed to remove app: ${xe(r)}`);const i={...e().myApps},o=lf(r);i[o]=i[o].filter(l=>!Zl(l,r));const s=e().listedApps.map(l=>Zl(l,r)?{...l,state:void 0,installed:!1}:l);t({myApps:i,listedApps:s})},getListedApp:async r=>{const n=await fetch(`${or}/apps/listed/${r}`);if(n.status!==jr.OK)throw new Error(`Failed to get app: ${r}`);return await n.json()},downloadApp:async(r,n)=>{if((await fetch(`${or}/apps/listed/${xe(r)}`,{method:"POST",body:JSON.stringify({download_from:n})})).status!==jr.CREATED)throw new Error(`Failed to get app: ${xe(r)}`)},getCaps:async r=>{const n=await fetch(`${or}/apps/${xe(r)}/caps`);if(n.status!==jr.OK)throw new Error(`Failed to get app: ${xe(r)}`);return(await n.json())[0]},approveCaps:async r=>{if((await fetch(`${or}/apps/${xe(r)}/caps`,{method:"POST"})).status!==jr.OK)throw new Error(`Failed to get app: ${xe(r)}`)},setMirroring:async(r,n)=>{if((await fetch(`${or}/apps/${xe(r)}/mirror`,{method:n?"PUT":"DELETE"})).status!==jr.OK)throw new Error(`Failed to start mirror: ${xe(r)}`);e().getMyApp(r)},setAutoUpdate:async(r,n)=>{if((await fetch(`${or}/apps/${xe(r)}/auto-update`,{method:n?"PUT":"DELETE"})).status!==jr.OK)throw new Error(`Failed to change auto update: ${xe(r)}`);e().getMyApp(r)},get:e,set:t}),{name:"app_store",storage:q1(()=>sessionStorage)}));function W1({app:t,size:e="medium",...r}){var i,o,s,l,a;const n=vl();return C.jsxs("div",{...r,className:`app-header row ${e} ${r.className||""}`,onClick:()=>n(`/app-details/${xe(t)}`),children:[C.jsx("img",{src:((i=t.metadata)==null?void 0:i.image)||"https://png.pngtree.com/png-vector/20190215/ourmid/pngtree-vector-question-mark-icon-png-image_515448.jpg",alt:"app icon"}),C.jsxs("div",{className:"col title",children:[C.jsx("div",{className:"app-name ellipsis",children:((o=t.metadata)==null?void 0:o.name)||xe(t)}),((s=t.metadata)==null?void 0:s.description)&&e!=="large"&&C.jsx("div",{className:"ellipsis",children:(a=(l=t.metadata)==null?void 0:l.description)==null?void 0:a.slice(0,100)})]})]})}const Jk=({show:t,hide:e,hideClose:r=!1,title:n,...i})=>{const o=s=>{s.stopPropagation()};return t?C.jsx("div",{className:`modal-backdrop ${t?"show":""}`,onClick:e,children:C.jsxs("div",{...i,className:`col modal ${i.className||""}`,onClick:o,children:[!!n&&C.jsx("h3",{className:"modal-title",children:n}),!r&&C.jsx(Bk,{className:"close",onClick:e}),C.jsx("div",{className:"col modal-content",onClick:o,children:i.children})]})}):null};function xd({msg:t}){return C.jsxs("div",{id:"loading",className:"col center",children:[C.jsx("h3",{children:t}),C.jsxs("div",{id:"loader",children:[" ",C.jsx("div",{})," ",C.jsx("div",{})," ",C.jsx("div",{})," ",C.jsx("div",{})," "]})]})}function G1({app:t,...e}){var Q,J,X,ie,M,f,p,A;const{updateApp:r,downloadApp:n,installApp:i,getCaps:o,getMyApp:s}=Qo(),[l,a]=L.useState(!1),[u,c]=L.useState(((X=(J=(Q=t.metadata)==null?void 0:Q.properties)==null?void 0:J.mirrors)==null?void 0:X[0])||"Other"),[d,m]=L.useState(""),[g,v]=L.useState([]),[x,N]=L.useState(""),{clean:E,installed:w,downloaded:b,updatable:T}=L.useMemo(()=>{var h,P,Z,y;const _=(Object.entries(((P=(h=t==null?void 0:t.metadata)==null?void 0:h.properties)==null?void 0:P.code_hashes)||{}).find(([j])=>{var U,F;return j===((F=(U=t.metadata)==null?void 0:U.properties)==null?void 0:F.current_version)})||[])[1],I=t.installed,R=!!t.state,k=!!((Z=t.state)!=null&&Z.our_version&&_)&&((y=t.state)==null?void 0:y.our_version)!==_&&t.publisher!==window.our.node;return{clean:!I&&!R&&!k,installed:I,downloaded:R,updatable:k}},[t]);L.useEffect(()=>{var S,_,I;c(((I=(_=(S=t.metadata)==null?void 0:S.properties)==null?void 0:_.mirrors)==null?void 0:I[0])||"Other")},[(M=(ie=t.metadata)==null?void 0:ie.properties)==null?void 0:M.mirrors]);const B=L.useCallback(async()=>{w&&!T?window.alert("App is installed"):(b&&o(t).then(S=>{v(S.request_capabilities)}),a(!0))},[t,w,b,T,a,o]),D=L.useCallback(async()=>{const S=u==="Other"?d:u;try{N(`Downloading ${cs(t)}...`),await n(t,S);const _=setInterval(()=>{s(t).then(()=>{N(""),a(!1),clearInterval(_)}).catch(console.log)},2e3)}catch(_){console.error(_),window.alert(`Failed to download app from ${S}, please try a different mirror.`),N("")}},[u,d,t,n,s]),$=L.useCallback(async()=>{try{N(`Installing ${cs(t)}...`),await i(t);const S=setInterval(()=>{s(t).then(_=>{_.installed&&(N(""),a(!1),clearInterval(S))}).catch(console.log)},2e3)}catch(S){console.error(S),window.alert("Failed to install, please try again."),N("")}},[t,i,s]),H=L.useCallback(async()=>{try{N(`Updating ${cs(t)}...`),await r(t);const S=setInterval(()=>{s(t).then(_=>{_.installed&&(N(""),a(!1),clearInterval(S))}).catch(console.log)},2e3)}catch(S){console.error(S),window.alert("Failed to update, please try again."),N("")}},[t,r,s]);return C.jsxs(C.Fragment,{children:[C.jsx("button",{...e,type:"button",className:`unstyled action-btn ${e.className||""}`,onClick:B,children:w&&T?"Update":w?"Installed":b?"Install":"Download"}),C.jsx(Jk,{show:l,hide:()=>a(!1),children:x?C.jsx(xd,{msg:x}):E?C.jsxs(C.Fragment,{children:[C.jsxs("h3",{children:["Download ",(f=t.metadata)==null?void 0:f.name,"?"]}),C.jsx("h4",{style:{margin:0},children:"Select Mirror"}),C.jsx("select",{value:u,onChange:S=>c(S.target.value),children:(((A=(p=t.metadata)==null?void 0:p.properties)==null?void 0:A.mirrors)||[]).concat(["Other"]).map(S=>C.jsx("option",{value:S,children:S},S))}),u==="Other"&&C.jsx("input",{value:d,onChange:S=>m(S.target.value),placeholder:"Mirror, i.e. 'template.os'"}),C.jsx("button",{type:"button",onClick:D,children:"Download"})]}):b?C.jsxs(C.Fragment,{children:[C.jsx("h3",{children:"Approve App Permissions"}),C.jsxs("h4",{style:{margin:0},children:[cs(t)," needs the following permissions:"]}),C.jsx("ul",{className:"col",style:{alignItems:"flex-start"},children:g.map(S=>C.jsx("li",{children:S},S))}),C.jsx("button",{type:"button",onClick:$,children:"Approve & Install"})]}):C.jsxs(C.Fragment,{children:[C.jsx("h3",{children:"Approve App Permissions"}),C.jsxs("h4",{style:{margin:0},children:[cs(t)," needs the following permissions:"]}),C.jsx("br",{}),C.jsx("ul",{className:"col",style:{alignItems:"flex-start"},children:g.map(S=>C.jsx("li",{children:S},S))}),C.jsx("button",{type:"button",onClick:H,children:"Approve & Update"})]})})]})}const V1=t=>!!t&&t[0]==="o",Am=Qs.unstable_batchedUpdates||(t=>t()),Vi=(t,e,r=1e-4)=>Math.abs(t-e)t===!0||!!(t&&t[e]),hr=(t,e)=>typeof t=="function"?t(e):t,K1="_szhsinMenu",Yk=t=>t[K1],Xk=(t,e)=>Object.defineProperty(e,K1,{value:t}),Qu=(t,e)=>(e&&Object.keys(e).forEach(r=>{const n=t[r],i=e[r];typeof i=="function"&&n?t[r]=(...o)=>{i(...o),n(...o)}:t[r]=i}),t),Zk=t=>{if(typeof t!="string")return{top:0,right:0,bottom:0,left:0};const e=t.trim().split(/\s+/,4).map(parseFloat),r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?r:e[1];return{top:r,right:n,bottom:isNaN(e[2])?r:e[2],left:isNaN(e[3])?n:e[3]}},af=t=>{for(;t;){if(t=t.parentNode,!t||t===document.body||!t.parentNode)return;const{overflow:e,overflowX:r,overflowY:n}=getComputedStyle(t);if(/auto|scroll|overlay|hidden/.test(e+n+r))return t}};function Q1(t,e){return{"aria-disabled":t||void 0,tabIndex:e?0:-1}}function _m(t,e){for(let r=0;rL.useMemo(()=>{const i=e?`${t}__${e}`:t;let o=i;r&&Object.keys(r).forEach(l=>{const a=r[l];a&&(o+=` ${i}--${a===!0?l:`${l}-${a}`}`)});let s=typeof n=="function"?n(r):n;return typeof s=="string"&&(s=s.trim(),s&&(o+=` ${s}`)),o},[t,e,r,n]),eN="szh-menu-container",Aa="szh-menu",tN="szh-menu-button",rN="arrow",nN="item",J1=L.createContext(),Y1=L.createContext({}),Sm=L.createContext({}),X1=L.createContext({}),iN=L.createContext({}),Dh=L.createContext({}),$r=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),xt=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),ul=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Ms=Object.freeze({FIRST:"first",LAST:"last"}),oN=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),uf="absolute",sN="presentation",Z1="menuitem",km={"aria-hidden":!0,role:Z1},lN=Xk("MenuButton",L.forwardRef(function({className:e,isOpen:r,disabled:n,children:i,...o},s){const l=L.useMemo(()=>({open:r}),[r]);return C.jsx("button",{"aria-haspopup":!0,"aria-expanded":r,"aria-disabled":n||void 0,type:"button",disabled:n,...o,ref:s,className:al({block:tN,modifiers:l,className:e}),children:i})})),aN=({className:t,containerRef:e,containerProps:r,children:n,isOpen:i,theming:o,transition:s,onClose:l})=>{const a=ll(s,"item"),u=({key:d})=>{switch(d){case $r.ESC:hr(l,{key:d,reason:ul.CANCEL});break}},c=d=>{i&&!d.currentTarget.contains(d.relatedTarget)&&hr(l,{reason:ul.BLUR})};return C.jsx("div",{...Qu({onKeyDown:u,onBlur:c},r),className:al({block:eN,modifiers:L.useMemo(()=>({theme:o,itemTransition:a}),[o,a]),className:t}),style:{position:"absolute",...r==null?void 0:r.style},ref:e,children:n})},uN=()=>{let t,e=0;return{toggle:r=>{r?e++:e--,e=Math.max(e,0)},on:(r,n,i)=>{e?t||(t=setTimeout(()=>{t=0,n()},r)):i==null||i()},off:()=>{t&&(clearTimeout(t),t=0)}}},cN=(t,e)=>{const[r,n]=L.useState(),o=L.useRef({items:[],hoverIndex:-1,sorted:!1}).current,s=L.useCallback((a,u)=>{const{items:c}=o;if(!a)o.items=[];else if(u)c.push(a);else{const d=c.indexOf(a);d>-1&&(c.splice(d,1),a.contains(document.activeElement)&&(e.current.focus(),n()))}o.hoverIndex=-1,o.sorted=!1},[o,e]),l=L.useCallback((a,u,c)=>{const{items:d,hoverIndex:m}=o,g=()=>{if(o.sorted)return;const N=t.current.querySelectorAll(".szh-menu__item");d.sort((E,w)=>_m(N,E)-_m(N,w)),o.sorted=!0};let v=-1,x;switch(a){case xt.RESET:break;case xt.SET:x=u;break;case xt.UNSET:x=N=>N===u?void 0:N;break;case xt.FIRST:g(),v=0,x=d[v];break;case xt.LAST:g(),v=d.length-1,x=d[v];break;case xt.SET_INDEX:g(),v=c,x=d[v];break;case xt.INCREASE:g(),v=m,v<0&&(v=d.indexOf(u)),v++,v>=d.length&&(v=0),x=d[v];break;case xt.DECREASE:g(),v=m,v<0&&(v=d.indexOf(u)),v--,v<0&&(v=d.length-1),x=d[v];break}x||(v=-1),n(x),o.hoverIndex=v},[t,o]);return{hoverItem:r,dispatch:l,updateItems:s}},fN=(t,e,r,n)=>{const i=e.current.getBoundingClientRect(),o=t.current.getBoundingClientRect(),s=r===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:r.getBoundingClientRect(),l=Zk(n),a=v=>v+o.left-s.left-l.left,u=v=>v+o.left+i.width-s.right+l.right,c=v=>v+o.top-s.top-l.top,d=v=>v+o.top+i.height-s.bottom+l.bottom;return{menuRect:i,containerRect:o,getLeftOverflow:a,getRightOverflow:u,getTopOverflow:c,getBottomOverflow:d,confineHorizontally:v=>{let x=a(v);if(x<0)v-=x;else{const N=u(v);N>0&&(v-=N,x=a(v),x<0&&(v-=x))}return v},confineVertically:v=>{let x=c(v);if(x<0)v-=x;else{const N=d(v);N>0&&(v-=N,x=c(v),x<0&&(v-=x))}return v}}},dN=({arrowRef:t,menuY:e,anchorRect:r,containerRect:n,menuRect:i})=>{let o=r.top-n.top-e+r.height/2;const s=t.current.offsetHeight*1.25;return o=Math.max(s,o),o=Math.min(o,i.height-s),o},hN=({anchorRect:t,containerRect:e,menuRect:r,placeLeftorRightY:n,placeLeftX:i,placeRightX:o,getLeftOverflow:s,getRightOverflow:l,confineHorizontally:a,confineVertically:u,arrowRef:c,arrow:d,direction:m,position:g})=>{let v=m,x=n;g!=="initial"&&(x=u(x),g==="anchor"&&(x=Math.min(x,t.bottom-e.top),x=Math.max(x,t.top-e.top-r.height)));let N,E,w;return v==="left"?(N=i,g!=="initial"&&(E=s(N),E<0&&(w=l(o),(w<=0||-E>w)&&(N=o,v="right")))):(N=o,g!=="initial"&&(w=l(N),w>0&&(E=s(i),(E>=0||-E{let o=r.left-n.left-e+r.width/2;const s=t.current.offsetWidth*1.25;return o=Math.max(s,o),o=Math.min(o,i.width-s),o},mN=({anchorRect:t,containerRect:e,menuRect:r,placeToporBottomX:n,placeTopY:i,placeBottomY:o,getTopOverflow:s,getBottomOverflow:l,confineHorizontally:a,confineVertically:u,arrowRef:c,arrow:d,direction:m,position:g})=>{let v=m==="top"?"top":"bottom",x=n;g!=="initial"&&(x=a(x),g==="anchor"&&(x=Math.min(x,t.right-e.left),x=Math.max(x,t.left-e.left-r.width)));let N,E,w;return v==="top"?(N=i,g!=="initial"&&(E=s(N),E<0&&(w=l(o),(w<=0||-E>w)&&(N=o,v="bottom")))):(N=o,g!=="initial"&&(w=l(N),w>0&&(E=s(i),(E>=0||-E{const{menuRect:u,containerRect:c}=a,d=r==="left"||r==="right";let m=d?n:i,g=d?i:n;if(t){const B=l.current;d?m+=B.offsetWidth:g+=B.offsetHeight}const v=s.left-c.left-u.width-m,x=s.right-c.left+m,N=s.top-c.top-u.height-g,E=s.bottom-c.top+g;let w,b;e==="end"?(w=s.right-c.left-u.width,b=s.bottom-c.top-u.height):e==="center"?(w=s.left-c.left-(u.width-s.width)/2,b=s.top-c.top-(u.height-s.height)/2):(w=s.left-c.left,b=s.top-c.top),w+=m,b+=g;const T={...a,anchorRect:s,placeLeftX:v,placeRightX:x,placeLeftorRightY:b,placeTopY:N,placeBottomY:E,placeToporBottomX:w,arrowRef:l,arrow:t,direction:r,position:o};switch(r){case"left":case"right":return hN(T);case"top":case"bottom":default:return mN(T)}},_a=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?L.useLayoutEffect:L.useEffect;function Nm(t,e){typeof t=="function"?t(e):t.current=e}const Uh=(t,e)=>L.useMemo(()=>t?e?r=>{Nm(t,r),Nm(e,r)}:t:e,[t,e]),Pm=-9999,vN=({ariaLabel:t,menuClassName:e,menuStyle:r,arrow:n,arrowProps:i={},anchorPoint:o,anchorRef:s,containerRef:l,containerProps:a,focusProps:u,externalRef:c,parentScrollingRef:d,align:m="start",direction:g="bottom",position:v="auto",overflow:x="visible",setDownOverflow:N,repositionFlag:E,captureFocus:w=!0,state:b,endTransition:T,isDisabled:B,menuItemFocus:D,gap:$=0,shift:H=0,children:Q,onClose:J,...X})=>{const[ie,M]=L.useState({x:Pm,y:Pm}),[f,p]=L.useState({}),[A,S]=L.useState(),[_,I]=L.useState(g),[R]=L.useState(uN),[k,h]=L.useReducer(ne=>ne+1,1),{transition:P,boundingBoxRef:Z,boundingBoxPadding:y,rootMenuRef:j,rootAnchorRef:U,scrollNodesRef:F,reposition:W,viewScroll:oe,submenuCloseDelay:Y}=L.useContext(Dh),{submenuCtx:V,reposSubmenu:Je=E}=L.useContext(Sm),K=L.useRef(null),le=L.useRef(),Qr=L.useRef(),Te=L.useRef(!1),Ne=L.useRef({width:0,height:0}),Jr=L.useRef(()=>{}),{hoverItem:Pe,dispatch:ce,updateItems:wr}=cN(K,le),fe=V1(b),Oe=ll(P,"open"),Yr=ll(P,"close"),me=F.current,ze=ne=>{switch(ne.key){case $r.HOME:ce(xt.FIRST);break;case $r.END:ce(xt.LAST);break;case $r.UP:ce(xt.DECREASE,Pe);break;case $r.DOWN:ce(xt.INCREASE,Pe);break;case $r.SPACE:ne.target&&ne.target.className.indexOf(Aa)!==-1&&ne.preventDefault();return;default:return}ne.preventDefault(),ne.stopPropagation()},gn=()=>{b==="closing"&&S(),hr(T)},$e=ne=>{ne.stopPropagation(),R.on(Y,()=>{ce(xt.RESET),le.current.focus()})},He=ne=>{ne.target===ne.currentTarget&&R.off()},Ht=L.useCallback(ne=>{var ot;const ge=s?(ot=s.current)==null?void 0:ot.getBoundingClientRect():o?{left:o.x,right:o.x,top:o.y,bottom:o.y,width:0,height:0}:null;if(!ge)return;me.menu||(me.menu=(Z?Z.current:af(j.current))||window);const de=fN(l,K,me.menu,y);let{arrowX:rt,arrowY:Ae,x:_e,y:Ct,computedDirection:Me}=gN({arrow:n,align:m,direction:g,gap:$,shift:H,position:v,anchorRect:ge,arrowRef:Qr,positionHelpers:de});const{menuRect:De}=de;let Kt=De.height;if(!ne&&x!=="visible"){const{getTopOverflow:Ve,getBottomOverflow:Ke}=de;let Qt,Ie;const Ue=Ne.current.height,Er=Ke(Ct);if(Er>0||Vi(Er,0)&&Vi(Kt,Ue))Qt=Kt-Er,Ie=Er;else{const ke=Ve(Ct);(ke<0||Vi(ke,0)&&Vi(Kt,Ue))&&(Qt=Kt+ke,Ie=0-ke,Qt>=0&&(Ct-=ke))}Qt>=0?(Kt=Qt,S({height:Qt,overflowAmt:Ie})):S()}n&&p({x:rt,y:Ae}),M({x:_e,y:Ct}),I(Me),Ne.current={width:De.width,height:Kt}},[n,m,y,g,$,H,v,x,o,s,l,Z,j,me]);_a(()=>{fe&&(Ht(),Te.current&&h()),Te.current=fe,Jr.current=Ht},[fe,Ht,Je]),_a(()=>{A&&!N&&(K.current.scrollTop=0)},[A,N]),_a(()=>wr,[wr]),L.useEffect(()=>{let{menu:ne}=me;if(!fe||!ne)return;if(ne=ne.addEventListener?ne:window,!me.anchors){me.anchors=[];let rt=af(U&&U.current);for(;rt&&rt!==ne;)me.anchors.push(rt),rt=af(rt)}let ot=oe;if(me.anchors.length&&ot==="initial"&&(ot="auto"),ot==="initial")return;const ge=()=>{ot==="auto"?Am(()=>Ht(!0)):hr(J,{reason:ul.SCROLL})},de=me.anchors.concat(oe!=="initial"?ne:[]);return de.forEach(rt=>rt.addEventListener("scroll",ge)),()=>de.forEach(rt=>rt.removeEventListener("scroll",ge))},[U,me,fe,J,oe,Ht]);const Le=!!A&&A.overflowAmt>0;L.useEffect(()=>{if(Le||!fe||!d)return;const ne=()=>Am(Ht),ot=d.current;return ot.addEventListener("scroll",ne),()=>ot.removeEventListener("scroll",ne)},[fe,Le,d,Ht]),L.useEffect(()=>{if(typeof ResizeObserver!="function"||W==="initial")return;const ne=new ResizeObserver(([ge])=>{const{borderBoxSize:de,target:rt}=ge;let Ae,_e;if(de){const{inlineSize:Ct,blockSize:Me}=de[0]||de;Ae=Ct,_e=Me}else{const Ct=rt.getBoundingClientRect();Ae=Ct.width,_e=Ct.height}Ae===0||_e===0||Vi(Ae,Ne.current.width,1)&&Vi(_e,Ne.current.height,1)||Qs.flushSync(()=>{Jr.current(),h()})}),ot=K.current;return ne.observe(ot,{box:"border-box"}),()=>ne.unobserve(ot)},[W]),L.useEffect(()=>{if(!fe){ce(xt.RESET),Yr||S();return}const{position:ne,alwaysUpdate:ot}=D||{},ge=()=>{ne===Ms.FIRST?ce(xt.FIRST):ne===Ms.LAST?ce(xt.LAST):ne>=-1&&ce(xt.SET_INDEX,void 0,ne)};if(ot)ge();else if(w){const de=setTimeout(()=>{const rt=K.current;rt&&!rt.contains(document.activeElement)&&(le.current.focus(),ge())},Oe?170:100);return()=>clearTimeout(de)}},[fe,Oe,Yr,w,D,ce]);const qe=L.useMemo(()=>({isParentOpen:fe,submenuCtx:R,dispatch:ce,updateItems:wr}),[fe,R,ce,wr]);let Rr,Ce;A&&(N?Ce=A.overflowAmt:Rr=A.height);const We=L.useMemo(()=>({reposSubmenu:k,submenuCtx:R,overflow:x,overflowAmt:Ce,parentMenuRef:K,parentDir:_}),[k,R,x,Ce,_]),vn=Rr>=0?{maxHeight:Rr,overflow:x}:void 0,Be=L.useMemo(()=>({state:b,dir:_}),[b,_]),Ge=L.useMemo(()=>({dir:_}),[_]),yn=al({block:Aa,element:rN,modifiers:Ge,className:i.className}),je=C.jsxs("ul",{role:"menu","aria-label":t,...Q1(B),...Qu({onPointerEnter:V==null?void 0:V.off,onPointerMove:$e,onPointerLeave:He,onKeyDown:ze,onAnimationEnd:gn},X),ref:Uh(c,K),className:al({block:Aa,modifiers:Be,className:e}),style:{...r,...vn,margin:0,display:b==="closed"?"none":void 0,position:uf,left:ie.x,top:ie.y},children:[C.jsx("li",{tabIndex:-1,style:{position:uf,left:0,top:0,display:"block",outline:"none"},ref:le,...km,...u}),n&&C.jsx("li",{...km,...i,className:yn,style:{display:"block",position:uf,left:f.x,top:f.y,...i.style},ref:Qr}),C.jsx(Sm.Provider,{value:We,children:C.jsx(Y1.Provider,{value:qe,children:C.jsx(J1.Provider,{value:Pe,children:hr(Q,Be)})})})]});return a?C.jsx(aN,{...a,isOpen:fe,children:je}):je},yN=L.forwardRef(function({"aria-label":e,className:r,containerProps:n,initialMounted:i,unmountOnClose:o,transition:s,transitionTimeout:l,boundingBoxRef:a,boundingBoxPadding:u,reposition:c="auto",submenuOpenDelay:d=300,submenuCloseDelay:m=150,viewScroll:g="initial",portal:v,theming:x,onItemClick:N,...E},w){const b=L.useRef(null),T=L.useRef({}),{anchorRef:B,state:D,onClose:$}=E,H=L.useMemo(()=>({initialMounted:i,unmountOnClose:o,transition:s,transitionTimeout:l,boundingBoxRef:a,boundingBoxPadding:u,rootMenuRef:b,rootAnchorRef:B,scrollNodesRef:T,reposition:c,viewScroll:g,submenuOpenDelay:d,submenuCloseDelay:m}),[i,o,s,l,B,a,u,c,g,d,m]),Q=L.useMemo(()=>({handleClick(X,ie){X.stopPropagation||hr(N,X);let M=X.keepOpen;M===void 0&&(M=ie&&X.key===$r.SPACE),M||hr($,{value:X.value,key:X.key,reason:ul.CLICK})},handleClose(X){hr($,{key:X,reason:ul.CLICK})}}),[N,$]);if(!D)return null;const J=C.jsx(Dh.Provider,{value:H,children:C.jsx(X1.Provider,{value:Q,children:C.jsx(vN,{...E,ariaLabel:e||"Menu",externalRef:w,containerRef:b,containerProps:{className:r,containerRef:b,containerProps:n,theming:x,transition:s,onClose:$}})})});return v===!0&&typeof document<"u"?Qs.createPortal(J,document.body):v?v.target?Qs.createPortal(J,v.target):v.stablePosition?null:J:J}),bd=0,Ad=1,uu=2,cu=3,fu=4,wN=5,ew=6,EN=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],tw=t=>({_s:t,status:EN[t],isEnter:tfu}),_d=t=>t?ew:wN,xN=(t,e)=>{switch(t){case Ad:case bd:return uu;case fu:case cu:return _d(e)}},bN=t=>typeof t=="object"?[t.enter,t.exit]:[t,t],AN=(t,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||t(e+1)},0),Cm=(t,e,r,n,i)=>{clearTimeout(n.current);const o=tw(t);e(o),r.current=o,i&&i({current:o})},_N=({enter:t=!0,exit:e=!0,preEnter:r,preExit:n,timeout:i,initialEntered:o,mountOnEnter:s,unmountOnExit:l,onStateChange:a}={})=>{const[u,c]=L.useState(()=>tw(o?uu:_d(s))),d=L.useRef(u),m=L.useRef(),[g,v]=bN(i),x=L.useCallback(()=>{const E=xN(d.current._s,l);E&&Cm(E,c,d,m,a)},[a,l]),N=L.useCallback(E=>{const w=T=>{switch(Cm(T,c,d,m,a),T){case Ad:g>=0&&(m.current=setTimeout(x,g));break;case fu:v>=0&&(m.current=setTimeout(x,v));break;case bd:case cu:m.current=AN(w,T);break}},b=d.current.isEnter;typeof E!="boolean"&&(E=!b),E?!b&&w(t?r?bd:Ad:uu):b&&w(e?n?cu:fu:_d(l))},[x,a,t,e,r,n,g,v,l]);return L.useEffect(()=>()=>clearTimeout(m.current),[]),[u,N,x]},SN=({initialOpen:t,initialMounted:e,unmountOnClose:r,transition:n,transitionTimeout:i=500}={})=>{const[{status:o},s,l]=_N({initialEntered:t,mountOnEnter:!e,unmountOnExit:r,timeout:i,enter:ll(n,"open"),exit:ll(n,"close")});return[{state:oN[o],endTransition:l},s]},kN=t=>{const[e,r]=SN(t),[n,i]=L.useState(),o=(s,l)=>{i({position:s,alwaysUpdate:l}),r(!0)};return[{menuItemFocus:n,...e},r,o]},NN=(t,e)=>{const[r]=L.useState({});return{onMouseDown:()=>{r.v=t&&t!=="closed"},onClick:n=>r.v?r.v=!1:e(!0,n)}},PN=(t,e)=>{const r=L.useRef(e);L.useEffect(()=>{r.current!==e&&hr(t,{open:e}),r.current=e},[t,e])},CN=L.forwardRef(function({"aria-label":e,captureFocus:r,initialOpen:n,menuButton:i,instanceRef:o,onMenuChange:s,...l},a){const[u,c,d]=kN(l),{state:m}=u,g=V1(m),v=L.useRef(null),x=NN(m,(B,D)=>d(D.detail?void 0:Ms.FIRST)),N=L.useCallback(B=>{c(!1),B.key&&v.current.focus()},[c]),E=B=>{switch(B.key){case $r.UP:d(Ms.LAST);break;case $r.DOWN:d(Ms.FIRST);break;default:return}B.preventDefault()},w=hr(i,{open:g});if(!w||!w.type)throw new Error("Menu requires a menuButton prop.");const b={ref:Uh(w.ref,v),...Qu({onKeyDown:E,...x},w.props)};Yk(w.type)==="MenuButton"&&(b.isOpen=g);const T=L.cloneElement(w,b);return PN(s,g),L.useImperativeHandle(o,()=>({openMenu:d,closeMenu:()=>c(!1)})),C.jsxs(L.Fragment,{children:[T,C.jsx(yN,{...l,...u,"aria-label":e||(typeof w.props.children=="string"?w.props.children:"Menu"),anchorRef:v,ref:a,onClose:N})]})}),MN=(t,e)=>{const r=L.memo(e),n=L.forwardRef((i,o)=>{const s=L.useRef(null);return C.jsx(r,{...i,itemRef:s,externalRef:o,isHovering:L.useContext(J1)===s.current})});return n.displayName=`WithHovering(${t})`,n},IN=(t,e,r)=>{_a(()=>{if(t)return;const n=e.current;return r(n,!0),()=>{r(n)}},[t,e,r])},RN=(t,e,r,n)=>{const{submenuCloseDelay:i}=L.useContext(Dh),{isParentOpen:o,submenuCtx:s,dispatch:l,updateItems:a}=L.useContext(Y1),u=()=>{!r&&!n&&l(xt.SET,t.current)},c=()=>{!n&&l(xt.UNSET,t.current)},d=v=>{r&&!v.currentTarget.contains(v.relatedTarget)&&c()},m=v=>{n||(v.stopPropagation(),s.on(i,u,u))},g=(v,x)=>{s.off(),!x&&c()};return IN(n,t,a),L.useEffect(()=>{r&&o&&e.current&&e.current.focus()},[e,r,o]),{setHover:u,onBlur:d,onPointerMove:m,onPointerLeave:g}},Ki=MN("MenuItem",function({className:e,value:r,href:n,type:i,checked:o,disabled:s,children:l,onClick:a,isHovering:u,itemRef:c,externalRef:d,...m}){const g=!!s,{setHover:v,...x}=RN(c,c,u,g),N=L.useContext(X1),E=L.useContext(iN),w=i==="radio",b=i==="checkbox",T=!!n&&!g&&!w&&!b,B=w?E.value===r:b?!!o:!1,D=X=>{if(g){X.stopPropagation(),X.preventDefault();return}const ie={value:r,syntheticEvent:X};X.key!==void 0&&(ie.key=X.key),b&&(ie.checked=!B),w&&(ie.name=E.name),hr(a,ie),w&&hr(E.onRadioChange,ie),N.handleClick(ie,b||w)},$=X=>{if(u)switch(X.key){case $r.ENTER:X.preventDefault();case $r.SPACE:T?c.current.click():D(X)}},H=L.useMemo(()=>({type:i,disabled:g,hover:u,checked:B,anchor:T}),[i,g,u,B,T]),Q=Qu({...x,onPointerDown:v,onKeyDown:$,onClick:D},m),J={role:w?"menuitemradio":b?"menuitemcheckbox":Z1,"aria-checked":w||b?B:void 0,...Q1(g,u),...Q,ref:Uh(d,c),className:al({block:Aa,element:nN,modifiers:H,className:e}),children:L.useMemo(()=>hr(l,H),[l,H])};return T?C.jsx("li",{role:sN,children:C.jsx("a",{href:n,...J})}):C.jsx("li",{...J})});function Mm({...t}){return C.jsx(CN,{...t,className:"dropdown "+t.className,menuButton:C.jsx(lN,{className:"unstyled",children:C.jsx(Lk,{style:{marginBottom:"-0.125em"}})}),children:t.children})}function TN({app:t}){var s,l,a,u,c;const{uninstallApp:e,setMirroring:r,setAutoUpdate:n}=Qo(),i=vl();return!t.state?t.metadata?C.jsxs(Mm,{children:[((s=t.metadata)==null?void 0:s.description)&&C.jsx(Ki,{className:"action-entry",onClick:()=>i(`/app-details/${xe(t)}`),children:"View Details"}),((l=t.metadata)==null?void 0:l.external_url)&&C.jsx(Ki,{children:C.jsx("a",{style:{color:"inherit",whiteSpace:"nowrap",cursor:"pointer",marginTop:"0.25em"},target:"_blank",href:(a=t.metadata)==null?void 0:a.external_url,children:"View Site"})})]}):C.jsx("div",{style:{width:24}}):C.jsxs(Mm,{children:[C.jsx(Ki,{className:"action-entry",onClick:()=>i(`/app-details/${xe(t)}`),children:"View Details"}),t.installed&&C.jsxs(C.Fragment,{children:[C.jsx(Ki,{className:"action-entry",onClick:()=>e(t),children:"Uninstall"}),C.jsxs(Ki,{className:"action-entry",onClick:()=>{var d;return r(t,!((d=t.state)!=null&&d.mirroring))},children:[(u=t.state)!=null&&u.mirroring?"Stop":"Start"," Mirroring"]}),C.jsxs(Ki,{className:"action-entry",onClick:()=>{var d;return n(t,!((d=t.state)!=null&&d.auto_update))},children:[(c=t.state)!=null&&c.auto_update?"Disable":"Enable"," Auto Update"]})]})]})}function ys({app:t,...e}){var r;return L.createElement("div",{...e,key:xe(t),className:"app-entry row between"},C.jsx(W1,{app:t,size:"small"}),C.jsxs("div",{className:"app-actions row",children:[!((r=t.state)!=null&&r.caps_approved)&&C.jsx(G1,{app:t,style:{marginRight:"1em"}}),C.jsx(TN,{app:t})]}))}const Sd="/my-apps";function Ju({value:t="",onChange:e=()=>null,onBack:r,hideSearch:n=!1}){const i=vl(),o=Ru(),s=qr.useRef(null),l=o.key!=="default",a=o.pathname===Sd;return C.jsxs("div",{className:"search-header row between",children:[o.pathname!=="/"?C.jsx("button",{className:"back-btn col center",onClick:()=>{r?r():i(l?-1:"/")},children:C.jsx(Ik,{})}):C.jsx("button",{className:"back-btn col center",onClick:()=>i("/publish"),children:C.jsx($1,{})}),!n&&C.jsxs("div",{className:"searchbar row",children:[C.jsx(jk,{className:"search-icon",onClick:()=>{var u;return(u=s.current)==null?void 0:u.focus()}}),C.jsx("input",{ref:s,onChange:u=>e(u.target.value),value:t,placeholder:"Search for apps..."}),t.length>0&&C.jsx(Dk,{className:"search-icon",style:{margin:"0 -0.25em 0 0.25em"},onClick:()=>e("")})]}),C.jsx("div",{className:"row",children:C.jsxs("button",{className:`my-pkg-btn row ${a?"selected":""}`,onClick:()=>i(a?-1:Sd),children:[C.jsx(Ok,{style:{marginRight:"0.5em"}}),"My Packages"]})})]})}function ON(t){const{listedApps:e,getListedApps:r}=Qo(),[n,i]=L.useState("Recently published"),[o,s]=L.useState(""),[l,a]=L.useState(e),[u,c]=L.useState(1),d=L.useMemo(()=>Array.from({length:Math.ceil(l.length/10)},(v,x)=>x+1),[l]);L.useEffect(()=>{const v=(u-1)*10,x=v+10;a(e.slice(v,x))},[e]),L.useEffect(()=>{r().then(v=>{a(Object.values(v))}).catch(v=>console.error(v))},[]);const m=L.useCallback(async v=>{},[]),g=L.useCallback(v=>{s(v);const x=e.filter(N=>{var E,w,b,T;return N.package.toLowerCase().includes(v.toLowerCase())||((w=(E=N.metadata)==null?void 0:E.description)==null?void 0:w.toLowerCase().includes(v.toLowerCase()))||((T=(b=N.metadata)==null?void 0:b.description)==null?void 0:T.toLowerCase().includes(v.toLowerCase()))},[e]);a(x)},[e]);return C.jsxs("div",{style:{width:"100%"},children:[C.jsx(Ju,{value:o,onChange:g}),C.jsxs("div",{className:"row between",children:[C.jsx("h3",{style:{marginBottom:"0.5em"},children:"New"}),C.jsxs("select",{value:n,onChange:v=>{i(v.target.value),m(v.target.value)},style:{marginBottom:"-1em"},children:[C.jsx("option",{children:"Recently published"}),C.jsx("option",{children:"Most popular"}),C.jsx("option",{children:"Best rating"}),C.jsx("option",{children:"Recently updated"})]})]}),C.jsxs("div",{className:"new card col",style:{flex:1,overflowY:"scroll"},children:[l.map(v=>{var x;return C.jsx(ys,{app:v},xe(v)+(((x=v.state)==null?void 0:x.our_version)||""))}),d.length>1&&C.jsxs("div",{className:"row",style:{alignSelf:"center"},children:[u!==d[0]&&C.jsx(Rk,{onClick:()=>c(u-1)}),d.map(v=>C.jsx("div",{className:`page-selector ${v===u?"selected":""}`,onClick:()=>c(v),children:v},`page-${v}`)),u!==d[d.length-1]&&C.jsx(Tk,{onClick:()=>c(u+1)})]})]})]})}function LN(t){const{myApps:e,getMyApps:r}=Qo(),n=vl(),[i,o]=L.useState(""),[s,l]=L.useState(e);L.useEffect(()=>{r().then(l).catch(u=>console.error(u))},[]);const a=L.useCallback(u=>{o(u);const c=Object.keys(e).reduce((d,m)=>(d[m]=e[m].filter(g=>{var v,x,N,E;return g.package.toLowerCase().includes(u.toLowerCase())||((x=(v=g.metadata)==null?void 0:v.description)==null?void 0:x.toLowerCase().includes(u.toLowerCase()))||((E=(N=g.metadata)==null?void 0:N.description)==null?void 0:E.toLowerCase().includes(u.toLowerCase()))}),d),{downloaded:[],installed:[],local:[],system:[]});l(c)},[e]);return L.useEffect(()=>{i?a(i):l(e)},[e]),C.jsxs("div",{style:{width:"100%",height:"100%"},children:[C.jsx(Ju,{value:i,onChange:a}),C.jsxs("div",{className:"row between",children:[C.jsx("h3",{style:{marginBottom:"0.5em"},children:"My Packages"}),C.jsxs("button",{className:"row",onClick:()=>n("/publish"),children:[C.jsx($1,{style:{marginRight:"0.5em"}}),"Publish Package"]})]}),C.jsx("div",{className:"my-apps-list",children:C.jsxs("div",{className:"new card col",children:[C.jsx("h3",{children:"Downloaded"}),(s.downloaded||[]).map(u=>C.jsx(ys,{app:u},xe(u))),C.jsx("h3",{children:"Installed"}),(s.installed||[]).map(u=>C.jsx(ys,{app:u},xe(u))),C.jsx("h3",{children:"Local"}),(s.local||[]).map(u=>C.jsx(ys,{app:u},xe(u))),C.jsx("h3",{children:"System"}),(s.system||[]).map(u=>C.jsx(ys,{app:u},xe(u)))]})})]})}function BN(t){var m,g,v,x,N,E,w,b;const{myApps:e,listedApps:r,getListedApp:n}=Qo(),i=vl(),o=ax(),[s,l]=L.useState(void 0);L.useEffect(()=>{const T=e.local.find(B=>xe(B)===o.id);if(T)return l(T);if(o.id){const B=r.find(D=>xe(D)===o.id);B?l(B):n(o.id).then(D=>l(D)).catch(console.error)}},[o.id]);const a=L.useCallback(()=>{i("/publish",{state:{app:s}})},[s,i]),u=L.useMemo(()=>{var T,B;return((B=(T=s==null?void 0:s.metadata)==null?void 0:T.properties)==null?void 0:B.current_version)||"Unknown"},[s]),c=Object.entries(((g=(m=s==null?void 0:s.metadata)==null?void 0:m.properties)==null?void 0:g.code_hashes)||{}),d=((v=s==null?void 0:s.state)==null?void 0:v.our_version)||(c[(c.length||1)-1]||["",""])[1];return C.jsxs("div",{style:{width:"100%"},children:[C.jsx(Ju,{value:"",onChange:()=>null,hideSearch:!0}),C.jsx("div",{className:"card",style:{marginTop:"1em"},children:s?C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"row between",children:[C.jsx(W1,{app:s,size:"large"}),C.jsx(G1,{app:s,style:{marginRight:"0.5em"}})]}),C.jsxs("div",{className:"col",style:{marginTop:"1em"},children:[C.jsxs("div",{className:"app-details row",children:[C.jsx("div",{className:"title",children:"Description"}),C.jsx("div",{className:"value",children:(((x=s.metadata)==null?void 0:x.description)||"No description given").slice(0,2e3)})]}),C.jsxs("div",{className:"app-details row",children:[C.jsx("div",{className:"title",children:"Publisher"}),C.jsx("div",{className:"value underline",children:s.publisher})]}),C.jsxs("div",{className:"app-details row",children:[C.jsx("div",{className:"title",children:"Version"}),C.jsx("div",{className:"value",children:u})]}),C.jsxs("div",{className:"app-details row",children:[C.jsx("div",{className:"title",children:"Mirrors"}),C.jsx("div",{className:"col",children:(((E=(N=s.metadata)==null?void 0:N.properties)==null?void 0:E.mirrors)||[]).map((T,B)=>C.jsx("div",{className:"value underline",children:T},B+T))})]}),C.jsxs("div",{className:"app-details row",children:[C.jsx("div",{className:"title",children:"Hash"}),C.jsx("div",{className:"value",style:{wordBreak:"break-all"},children:d})]})]}),C.jsx("div",{className:"app-screenshots row",children:(((b=(w=s.metadata)==null?void 0:w.properties)==null?void 0:b.screenshots)||[]).map((T,B)=>C.jsx("img",{src:T},B+T))}),s.installed&&C.jsx("button",{type:"button",onClick:a,children:"Publish"})]}):C.jsxs(C.Fragment,{children:[C.jsx("h3",{children:"App details not found for "}),C.jsx("h3",{children:o.id})]})})]})}var Sa=(t=>(t[t.SEPOLIA=11155111]="SEPOLIA",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",t[t.LOCAL=1337]="LOCAL",t))(Sa||{});const du="0xaa36a7",Im="0xa",Rm={11155111:"0x18c39eB547A0060C6034f8bEaFB947D1C16eADF1"},jN="4902",Tm={[du]:{chainId:du,chainName:"Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.sepolia.org"],blockExplorerUrls:["https://sepolia.etherscan.io"]},[Im]:{chainId:Im,chainName:"Optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.optimism.io"],blockExplorerUrls:["https://optimistic.etherscan.io"]}},DN=t=>{switch(t){case"1":case"0x1":return"Ethereum";case"10":case"a":case"0xa":return"Optimism";case"42161":return"Arbitrum";case"11155111":case"aa36a7":case"0xaa36a7":return"Sepolia";default:return"Unknown"}},Om=async t=>{var r,n,i;let e=await((r=window.ethereum)==null?void 0:r.request({method:"net_version"}).catch(()=>"1"));if(e="0x"+(typeof e=="string"?e.replace(/^0x/,""):e.toString(16)),!Tm[t]){console.error(`Invalid chain ID: ${t}`);return}if(t!==e)try{await((n=window.ethereum)==null?void 0:n.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]}))}catch(o){if(String(o).includes(jN))await((i=window.ethereum)==null?void 0:i.request({method:"wallet_addEthereumChain",params:[Tm[t]]}));else throw window.alert(`You must enable the ${DN(t)} network in your wallet.`),new Error(`User cancelled connection to ${t}`)}};var cl={},Yu={};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.Connector=void 0;class UN{constructor(e,r){this.actions=e,this.onError=r}resetState(){this.actions.resetState()}}Yu.Connector=UN;var cf,Lm;function FN(){if(Lm)return cf;Lm=1;function t({mustBeMetaMask:e=!1,silent:r=!1,timeout:n=3e3}={}){o();let i=!1;return new Promise(s=>{window.ethereum?l():(window.addEventListener("ethereum#initialized",l,{once:!0}),setTimeout(()=>{l()},n));function l(){if(i)return;i=!0,window.removeEventListener("ethereum#initialized",l);const{ethereum:a}=window;a&&(!e||a.isMetaMask)?s(a):(!r&&console.error("@metamask/detect-provider:",e&&a?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum."),s(null))}});function o(){if(typeof e!="boolean")throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if(typeof r!="boolean")throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if(typeof n!="number")throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}}return cf=t,cf}var zN=Fe&&Fe.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),$N=Fe&&Fe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HN=Fe&&Fe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&zN(e,t,r);return $N(e,t),e},Qi=Fe&&Fe.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};Object.defineProperty(cl,"__esModule",{value:!0});var rw=cl.MetaMask=cl.NoMetaMaskError=void 0;const qN=Yu;class fl extends Error{constructor(){super("MetaMask not installed"),this.name=fl.name,Object.setPrototypeOf(this,fl.prototype)}}cl.NoMetaMaskError=fl;function ea(t){return Number.parseInt(t,16)}class WN extends qN.Connector{constructor({actions:e,options:r,onError:n}){super(e,n),this.options=r}isomorphicInitialize(){return Qi(this,void 0,void 0,function*(){if(!this.eagerConnection)return this.eagerConnection=Promise.resolve().then(()=>HN(FN())).then(e=>Qi(this,void 0,void 0,function*(){var r,n;const i=yield e.default(this.options);i&&(this.provider=i,!((r=this.provider.providers)===null||r===void 0)&&r.length&&(this.provider=(n=this.provider.providers.find(o=>o.isMetaMask))!==null&&n!==void 0?n:this.provider.providers[0]),this.provider.on("connect",({chainId:o})=>{this.actions.update({chainId:ea(o)})}),this.provider.on("disconnect",o=>{var s;if(o.code===1013){console.debug('MetaMask logged connection error 1013: "Try again later"');return}this.actions.resetState(),(s=this.onError)===null||s===void 0||s.call(this,o)}),this.provider.on("chainChanged",o=>{this.actions.update({chainId:ea(o)})}),this.provider.on("accountsChanged",o=>{o.length===0?this.actions.resetState():this.actions.update({accounts:o})}))}))})}connectEagerly(){return Qi(this,void 0,void 0,function*(){const e=this.actions.startActivation();try{if(yield this.isomorphicInitialize(),!this.provider)return e();const r=yield this.provider.request({method:"eth_accounts"});if(!r.length)throw new Error("No accounts returned");const n=yield this.provider.request({method:"eth_chainId"});this.actions.update({chainId:ea(n),accounts:r})}catch(r){console.debug("Could not connect eagerly",r),this.actions.resetState()}})}activate(e){var r,n;return Qi(this,void 0,void 0,function*(){let i;return!((n=(r=this.provider)===null||r===void 0?void 0:r.isConnected)===null||n===void 0)&&n.call(r)||(i=this.actions.startActivation()),this.isomorphicInitialize().then(()=>Qi(this,void 0,void 0,function*(){if(!this.provider)throw new fl;const o=yield this.provider.request({method:"eth_requestAccounts"}),s=yield this.provider.request({method:"eth_chainId"}),l=ea(s),a=typeof e=="number"?e:e==null?void 0:e.chainId;if(!a||l===a)return this.actions.update({chainId:l,accounts:o});const u=`0x${a.toString(16)}`;return this.provider.request({method:"wallet_switchEthereumChain",params:[{chainId:u}]}).catch(c=>{var d,m;if((((m=(d=c.data)===null||d===void 0?void 0:d.originalError)===null||m===void 0?void 0:m.code)||c.code)===4902&&typeof e!="number"){if(!this.provider)throw new Error("No provider");return this.provider.request({method:"wallet_addEthereumChain",params:[Object.assign(Object.assign({},e),{chainId:u})]})}throw c}).then(()=>this.activate(a))})).catch(o=>{throw i==null||i(),o})})}watchAsset({address:e,symbol:r,decimals:n,image:i}){return Qi(this,void 0,void 0,function*(){if(!this.provider)throw new Error("No provider");return this.provider.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,symbol:r,decimals:n,image:i}}}).then(o=>{if(!o)throw new Error("Rejected");return!0})})}}rw=cl.MetaMask=WN;const[nw,Fh]=Wu.initializeConnector(t=>new rw({actions:t}));function GN(t){const e=t.split("."),r=new Uint8Array(t.length+e.length);let n=0;for(const i of e){const o=i.length;r[n]=o,n++;for(let s=0;si.toString(16).padStart(2,"0")).join("")}`}const Bm=/^\d+\.\d+\.\d+$/,VN=({app:t,packageName:e,publisherId:r,goBack:n})=>{var d,m,g,v,x,N,E,w;const[i,o]=L.useState({name:((d=t==null?void 0:t.metadata)==null?void 0:d.name)||"",description:((m=t==null?void 0:t.metadata)==null?void 0:m.description)||"",image:((g=t==null?void 0:t.metadata)==null?void 0:g.image)||"",external_url:((v=t==null?void 0:t.metadata)==null?void 0:v.external_url)||"",animation_url:((x=t==null?void 0:t.metadata)==null?void 0:x.animation_url)||"",package_name:e,current_version:"",publisher:r,mirrors:[r]}),[s,l]=L.useState(Object.entries(((E=(N=t==null?void 0:t.metadata)==null?void 0:N.properties)==null?void 0:E.code_hashes)||{}).concat([["",((w=t==null?void 0:t.state)==null?void 0:w.our_version)||""]])),a=(b,T)=>{o({...i,[b]:T})};L.useEffect(()=>{a("package_name",e)},[e]),L.useEffect(()=>{a("publisher",r)},[r]);const u=L.useCallback(()=>{const b=s.reduce((H,[Q,J])=>(H[Q]=J,H),{});if(Bm.test(i.current_version))if(b[i.current_version]){if(!Object.keys(b).reduce((H,Q)=>H&&Bm.test(Q),!0)){window.alert("Code hashes must be a JSON object with valid version keys");return}}else{window.alert(`Code hashes must include current version (${i.current_version})`);return}else{window.alert("Current version must be in the format x.y.z");return}const T=JSON.stringify({name:i.name,description:i.description,image:i.image,external_url:i.external_url,animation_url:i.animation_url,properties:{package_name:i.package_name,current_version:i.current_version,publisher:i.publisher,mirrors:i.mirrors,code_hashes:b}}),B=new Blob([T],{type:"application/json"}),D=URL.createObjectURL(B),$=document.createElement("a");$.href=D,$.download=i.package_name+"_"+i.publisher+"_metadata.json",$.click(),URL.revokeObjectURL(D)},[i,s]),c=()=>{o({name:"",description:"",image:"",external_url:"",animation_url:"",package_name:"",current_version:"",publisher:"",mirrors:[]}),l([])};return C.jsxs("form",{className:"col card metadata",style:{gap:"0.5em"},children:[C.jsx("h3",{children:"Fill out metadata"}),C.jsxs("div",{className:"col label",children:[C.jsx("label",{className:"metadata-label",children:"Name"}),C.jsx("input",{type:"text",placeholder:"Name",value:i.name,onChange:b=>a("name",b.target.value)})]}),C.jsxs("div",{className:"col label",children:[C.jsx("label",{className:"metadata-label",children:"Description"}),C.jsx("input",{type:"text",placeholder:"Description",value:i.description,onChange:b=>a("description",b.target.value)})]}),C.jsxs("div",{className:"col label",children:[C.jsx("label",{className:"metadata-label",children:"Image URL"}),C.jsx("input",{type:"text",placeholder:"Image URL",value:i.image,onChange:b=>a("image",b.target.value)})]}),C.jsxs("div",{className:"col label",children:[C.jsx("label",{className:"metadata-label",children:"External URL"}),C.jsx("input",{type:"text",placeholder:"External URL",value:i.external_url,onChange:b=>a("external_url",b.target.value)})]}),C.jsxs("div",{className:"col label",children:[C.jsx("label",{className:"metadata-label",children:"Animation URL"}),C.jsx("input",{type:"text",placeholder:"Animation URL",value:i.animation_url,onChange:b=>a("animation_url",b.target.value)})]}),C.jsxs("div",{className:"col label",children:[C.jsx("label",{className:"metadata-label",children:"Package Name"}),C.jsx("input",{type:"text",placeholder:"Package Name",value:i.package_name,onChange:b=>a("package_name",b.target.value)})]}),C.jsxs("div",{className:"col label",children:[C.jsx("label",{className:"metadata-label",children:"Current Version"}),C.jsx("input",{type:"text",placeholder:"Current Version",value:i.current_version,onChange:b=>a("current_version",b.target.value)})]}),C.jsxs("div",{className:"col label",children:[C.jsx("label",{className:"metadata-label",children:"Publisher"}),C.jsx("input",{type:"text",placeholder:"Publisher",value:i.publisher,onChange:b=>a("publisher",b.target.value)})]}),C.jsxs("div",{className:"col label",children:[C.jsx("label",{className:"metadata-label",children:"Mirrors (separated by commas)"}),C.jsx("input",{type:"text",placeholder:"Mirrors (separated by commas)",value:i.mirrors.join(","),onChange:b=>a("mirrors",b.target.value.split(",").map(T=>T.trim()))})]}),C.jsxs("div",{className:"col",style:{gap:"0.5em",width:"calc(80% + 20px)",marginLeft:"1.25em"},children:[C.jsxs("div",{className:"row",style:{gap:"0.5em",marginTop:0,justifyContent:"space-between",width:"100%"},children:[C.jsx("h4",{style:{margin:0},children:"Code Hashes"}),C.jsx("button",{type:"button",onClick:()=>l([...s,["",""]]),style:{height:"2em",lineHeight:"1em"},children:"Add code hash"})]}),s.map(([b,T],B,D)=>C.jsxs("div",{className:"row",style:{gap:"0.5em",marginTop:0,width:"100%"},children:[C.jsx("input",{type:"text",placeholder:"Version",value:b,onChange:$=>l(H=>{const Q=[...H];return Q[B][0]=$.target.value,Q}),style:{flex:1}}),C.jsx("input",{type:"text",placeholder:"Hash",value:T,onChange:$=>l(H=>{const Q=[...H];return Q[B][1]=$.target.value,Q}),style:{flex:5}}),D.length>1&&C.jsx("button",{type:"button",onClick:()=>l($=>$.filter((H,Q)=>Q!==B)),style:{fontSize:"2em",height:32,lineHeight:"1em",padding:"0 0.2em"},children:"×"})]},B+"_code_hash"))]}),C.jsxs("div",{className:"row",style:{gap:"0.5em",margin:"1em 0"},children:[C.jsx("button",{type:"button",onClick:u,children:"Download JSON"}),C.jsx("button",{type:"button",onClick:c,children:"Clear Form"}),C.jsx("button",{type:"button",onClick:n,children:"Done"})]})]})},{useIsActivating:KN}=Fh;function QN({provider:t,packageAbi:e}){var X;const{state:r}=Ru(),{listedApps:n}=Qo(),{account:i,isActive:o}=Wu.useWeb3React(),s=KN(),[l,a]=L.useState(""),[u,c]=L.useState(),[d,m]=L.useState(!1),[g,v]=L.useState(""),[x,N]=L.useState(((X=window.our)==null?void 0:X.node)||""),[E,w]=L.useState(""),[b,T]=L.useState(""),[B,D]=L.useState(!1);L.useEffect(()=>{const ie=r==null?void 0:r.app;ie&&(v(ie.package),N(ie.publisher),D(!0))},[r]);const $=L.useCallback(async()=>{await nw.activate().catch(()=>{});try{Om(du)}catch(ie){console.error(ie)}},[]),H=L.useCallback(async()=>{if(!E){T("");return}try{const M=await(await fetch(E)).text();JSON.parse(M);const f=ut(mr(M));T(f)}catch{window.alert("Error calculating metadata hash. Please ensure the URL is valid and the metadata is in JSON format.")}},[E]),Q=L.useCallback(async ie=>{var f;ie.preventDefault(),ie.stopPropagation();let M=b;try{if(!M){const S=await fetch(E);await S.json();const _=await S.text();M=ut(mr(_))}a("Please confirm the transaction in your wallet");const p=GN(x);await Om(du);const A=await(B?e.updateMetadata(G.from(gS(["string","bytes"],[g,p])),E,M):e.registerApp(g,p,E,M));await new Promise(S=>setTimeout(S,2e3)),a("Publishing package..."),await A.wait(),c({packageName:g,publisherId:x}),v(""),N(((f=window.our)==null?void 0:f.node)||x),w(""),T(""),D(!1)}catch(p){console.error(p),window.alert("Error publishing package. Please ensure the package name and publisher ID are valid, and the metadata is in JSON format.")}finally{a("")}},[g,B,x,E,b,e,c,v,N,w,T,D]),J=L.useCallback(async()=>{B||g&&x&&n.find(ie=>ie.package===g&&ie.publisher===x)&&D(!0)},[n,g,x,B,D]);return C.jsxs("div",{style:{width:"100%"},children:[C.jsx(Ju,{hideSearch:!0,onBack:d?()=>m(!1):void 0}),C.jsxs("div",{className:"row between",children:[C.jsx("h3",{style:{marginBottom:"0.5em"},children:"Publish Package"}),!!i&&C.jsxs("div",{style:{textAlign:"right",lineHeight:1.5},children:[" ","Connected as"," ",(i==null?void 0:i.slice(0,6))+"..."+(i==null?void 0:i.slice(i.length-6))]})]}),l?C.jsx("div",{className:"col center",children:C.jsx(xd,{msg:l})}):u?C.jsxs("div",{className:"col center",children:[C.jsx("h3",{style:{marginBottom:"0.5em"},children:"Package Published!"}),C.jsxs("div",{style:{marginBottom:"0.5em"},children:[C.jsx("strong",{children:"Package Name:"})," ",u.packageName]}),C.jsxs("div",{style:{marginBottom:"0.5em"},children:[C.jsx("strong",{children:"Publisher ID:"})," ",u.publisherId]}),C.jsx("button",{className:"my-pkg-btn row",style:{marginTop:"1em"},onClick:()=>c(void 0),children:"Publish Another Package"})]}):d?C.jsx(VN,{packageName:g,publisherId:x,app:r==null?void 0:r.app,goBack:()=>m(!1)}):!i||!o?C.jsxs(C.Fragment,{children:[C.jsx("h4",{style:{},children:"Please connect your wallet to publish a package"}),C.jsx("button",{className:"my-pkg-btn row",onClick:$,children:"Connect Wallet"})]}):s?C.jsx(xd,{msg:"Approve connection in your wallet"}):C.jsxs("form",{className:"new card col",style:{flex:1,overflowY:"scroll"},onSubmit:Q,children:[C.jsxs("div",{className:"row between",style:{cursor:"pointer",padding:"0.5em",margin:"0 0 0 -0.5em"},onClick:()=>D(!B),children:[C.jsx("input",{type:"checkbox",checked:B,readOnly:!0}),C.jsx("label",{htmlFor:"update",style:{cursor:"pointer"},children:"Update existing package"})]}),C.jsxs("div",{className:"col f-width",children:[C.jsx("label",{htmlFor:"package-name",children:"Package Name"}),C.jsx("input",{style:{minWidth:"80%"},id:"package-name",type:"text",required:!0,placeholder:"my-package",value:g,onChange:ie=>v(ie.target.value),onBlur:J})]}),C.jsxs("div",{className:"col f-width",children:[C.jsx("label",{htmlFor:"publisher-id",children:"Publisher ID"}),C.jsx("input",{style:{minWidth:"80%"},id:"publisher-id",type:"text",required:!0,value:x,onChange:ie=>N(ie.target.value),onBlur:J})]}),C.jsxs("div",{className:"col f-width",children:[C.jsx("label",{htmlFor:"metadata-url",children:"Metadata URL"}),C.jsx("input",{style:{minWidth:"80%"},id:"metadata-url",type:"text",required:!0,value:E,onChange:ie=>w(ie.target.value),onBlur:H,placeholder:"https://github/my-org/my-repo/metadata.json"}),C.jsxs("div",{style:{textAlign:"left",margin:"0.5em 0 0"},children:["Metadata is a JSON file that describes your package.",C.jsx("br",{})," You can"," ",C.jsx("a",{onClick:()=>m(!0),style:{cursor:"pointer"},children:"fill out a template here"}),"."]})]}),C.jsxs("div",{className:"col f-width",children:[C.jsx("label",{htmlFor:"metadata-hash",children:"Metadata Hash"}),C.jsx("input",{style:{minWidth:"80%"},readOnly:!0,id:"metadata-hash",type:"text",value:b,onChange:ie=>T(ie.target.value),placeholder:"Calculated automatically from metadata URL"})]}),C.jsx("button",{type:"submit",className:"primary",children:"Publish"})]})]})}var JN={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const YN=[[nw,Fh]],{useProvider:XN}=Fh,ZN="https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",Is="/main:app_store:sys";window.our&&(window.our.process=Is==null?void 0:Is.replace("/",""));const e4=`${JN.VITE_NODE_URL||"http://localhost:8080"}${Is}`;function t4(){const t=XN(),[e,r]=L.useState(!0),[n,i]=L.useState(Ed.connect(Rm[Sa.SEPOLIA],new vi(ZN)));if(L.useEffect(()=>{t==null||t.getNetwork().then(s=>{s.chainId===Sa.SEPOLIA&&i(Ed.connect(Rm[Sa.SEPOLIA],t.getSigner()))})},[t]),L.useEffect(()=>{},[]),!e)return C.jsxs("div",{className:"node-not-connected",children:[C.jsx("h2",{style:{color:"red"},children:"Node not connected"}),C.jsxs("h4",{children:["You need to start a node at ",e4," before you can use this UI in development."]})]});const o={provider:t,packageAbi:n};return C.jsx(Wu.Web3ReactProvider,{connectors:YN,children:C.jsx(Sx,{basename:Is,children:C.jsxs(Ax,{children:[C.jsx(ms,{path:"/",element:C.jsx(ON,{...o})}),C.jsx(ms,{path:Sd,element:C.jsx(LN,{...o})}),C.jsx(ms,{path:"/app-details/:id",element:C.jsx(BN,{...o})}),C.jsx(ms,{path:"/publish",element:C.jsx(QN,{...o})})]})})})}ff.createRoot(document.getElementById("root")).render(C.jsx(qr.StrictMode,{children:C.jsx(t4,{})})); + */var Gu=L,CS=PS;function MS(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var IS=typeof Object.is=="function"?Object.is:MS,RS=CS.useSyncExternalStore,TS=Gu.useRef,OS=Gu.useEffect,LS=Gu.useMemo,BS=Gu.useDebugValue;C1.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var o=TS(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=LS(function(){function a(g){if(!u){if(u=!0,c=g,g=n(g),i!==void 0&&s.hasValue){var v=s.value;if(i(v,g))return d=v}return d=g}if(v=d,IS(c,g))return v;var E=n(g);return i!==void 0&&i(v,E)?v:(c=g,d=E)}var u=!1,c,d,m=r===void 0?null:r;return[function(){return a(e())},m===null?void 0:function(){return a(m())}]},[e,r,n,i]);var l=RS(t,o[0],o[1]);return OS(function(){s.hasValue=!0,s.value=l},[l]),BS(l),l};P1.exports=C1;var jS=P1.exports;const Vu=Uo(jS),{useSyncExternalStoreWithSelector:DS}=Vu;function R1(t,e=t.getState,r){const n=DS(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return L.useDebugValue(n),n}const dm=t=>{const e=typeof t=="function"?N1(t):t,r=(n,i)=>R1(e,n,i);return Object.assign(r,e),r},T1=t=>t?dm(t):dm;var US=t=>T1(t);const FS=Object.freeze(Object.defineProperty({__proto__:null,create:T1,createStore:N1,default:US,useStore:R1},Symbol.toStringTag,{value:"Module"})),zS=Fo(FS);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createWeb3ReactStoreAndActions=t.MAX_SAFE_CHAIN_ID=void 0;const e=vS,r=zS;t.MAX_SAFE_CHAIN_ID=0xfffffffffffec;function n(l){if(!Number.isInteger(l)||l<=0||l>t.MAX_SAFE_CHAIN_ID)throw new Error(`Invalid chainId ${l}`)}function i(l){return(0,e.getAddress)(l)}const o={chainId:void 0,accounts:void 0,activating:!1};function s(){const l=(0,r.createStore)()(()=>o);let a=0;function u(){const m=++a;return l.setState(Object.assign(Object.assign({},o),{activating:!0})),()=>{a===m&&l.setState({activating:!1})}}function c(m){if(m.chainId!==void 0&&n(m.chainId),m.accounts!==void 0)for(let g=0;g{var v,E;const N=(v=m.chainId)!==null&&v!==void 0?v:g.chainId,x=(E=m.accounts)!==null&&E!==void 0?E:g.accounts;let w=g.activating;return w&&N&&x&&(w=!1),{chainId:N,accounts:x,activating:w}})}function d(){a++,l.setState(o)}return[l,{startActivation:u,update:c,resetState:d}]}t.createWeb3ReactStoreAndActions=s})(k1);var $S={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const hm=t=>{let e;const r=new Set,n=(a,u)=>{const c=typeof a=="function"?a(e):a;if(!Object.is(c,e)){const d=e;e=u??typeof c!="object"?c:Object.assign({},e,c),r.forEach(m=>m(e,d))}},i=()=>e,l={setState:n,getState:i,subscribe:a=>(r.add(a),()=>r.delete(a)),destroy:()=>{($S?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,i,l),l},jh=t=>t?hm(t):hm,{useSyncExternalStoreWithSelector:HS}=Vu;function O1(t,e=t.getState,r){const n=HS(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return L.useDebugValue(n),n}const pm=t=>{const e=typeof t=="function"?jh(t):t,r=(n,i)=>O1(e,n,i);return Object.assign(r,e),r},L1=t=>t?pm(t):pm;var qS=t=>L1(t);const WS=Object.freeze(Object.defineProperty({__proto__:null,create:L1,createStore:jh,default:qS,useStore:O1},Symbol.toStringTag,{value:"Module"})),GS=Fo(WS),{useSyncExternalStoreWithSelector:VS}=Vu;function B1(t,e=t.getState,r){const n=VS(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return L.useDebugValue(n),n}const mm=(t,e)=>{const r=jh(t),n=(i,o=e)=>B1(r,i,o);return Object.assign(n,r),n},KS=(t,e)=>t?mm(t,e):mm,QS=Object.freeze(Object.defineProperty({__proto__:null,createWithEqualityFn:KS,useStoreWithEqualityFn:B1},Symbol.toStringTag,{value:"Module"})),JS=Fo(QS),YS=Fo(uS);var XS=Fe&&Fe.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),ZS=Fe&&Fe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ek=Fe&&Fe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&XS(e,t,r);return ZS(e,t),e},tk=Fe&&Fe.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.getPriorityConnector=Cn.getSelectedConnector=Cn.initializeConnector=void 0;const rk=k1,go=L,gm=GS,nk=JS;let So;function ik(){return tk(this,void 0,void 0,function*(){if(So===void 0)try{const{Web3Provider:t}=yield Promise.resolve().then(()=>ek(YS));So=t}catch{console.debug("@ethersproject/providers not available"),So=null}})}function ok(t){const[e,r]=(0,rk.createWeb3ReactStoreAndActions)(),n=t(r),i=dk(e),o=hk(i),s=pk(n,i,o);return[n,Object.assign(Object.assign(Object.assign({},i),o),s),e]}Cn.initializeConnector=ok;function sk({chainId:t,accounts:e,activating:r}){return!!(t&&e&&!r)}function j1(...t){function e(d){const m=t.findIndex(([g])=>d===g);if(m===-1)throw new Error("Connector not found");return m}function r(d){const m=t[e(d)][2];if(!m)throw new Error("Stores not passed");return m}function n(d){return t.map(([,{useChainId:g}])=>g())[e(d)]}function i(d){return t.map(([,{useAccounts:g}])=>g())[e(d)]}function o(d){return t.map(([,{useIsActivating:g}])=>g())[e(d)]}function s(d){return t.map(([,{useAccount:g}])=>g())[e(d)]}function l(d){return t.map(([,{useIsActive:g}])=>g())[e(d)]}function a(d,m){const g=e(d);return t.map(([,{useProvider:E}],N)=>E(m,N===g))[g]}function u(d,m){const g=e(d);return t.map(([,{useENSNames:E}],N)=>E(N===g?m:void 0))[g]}function c(d,m){const g=e(d);return t.map(([,{useENSName:E}],N)=>E(N===g?m:void 0))[g]}return{useSelectedStore:r,useSelectedChainId:n,useSelectedAccounts:i,useSelectedIsActivating:o,useSelectedAccount:s,useSelectedIsActive:l,useSelectedProvider:a,useSelectedENSNames:u,useSelectedENSName:c}}Cn.getSelectedConnector=j1;function lk(...t){const{useSelectedStore:e,useSelectedChainId:r,useSelectedAccounts:n,useSelectedIsActivating:i,useSelectedAccount:o,useSelectedIsActive:s,useSelectedProvider:l,useSelectedENSNames:a,useSelectedENSName:u}=j1(...t);function c(){const B=t.map(([,{useIsActive:D}])=>D()).findIndex(D=>D);return t[B===-1?0:B][0]}function d(){return e(c())}function m(){return r(c())}function g(){return n(c())}function v(){return i(c())}function E(){return o(c())}function N(){return s(c())}function x(T){return l(c(),T)}function w(T){return a(c(),T)}function b(T){return u(c(),T)}return{useSelectedStore:e,useSelectedChainId:r,useSelectedAccounts:n,useSelectedIsActivating:i,useSelectedAccount:o,useSelectedIsActive:s,useSelectedProvider:l,useSelectedENSNames:a,useSelectedENSName:u,usePriorityConnector:c,usePriorityStore:d,usePriorityChainId:m,usePriorityAccounts:g,usePriorityIsActivating:v,usePriorityAccount:E,usePriorityIsActive:N,usePriorityProvider:x,usePriorityENSNames:w,usePriorityENSName:b}}Cn.getPriorityConnector=lk;const ak=({chainId:t})=>t,uk=({accounts:t})=>t,ck=({activating:t})=>t,fk=(t,e)=>t===void 0&&e===void 0||t!==void 0&&t.length===(e==null?void 0:e.length)&&t.every((r,n)=>r===e[n]);function dk(t){function e(){return(0,gm.useStore)(t,ak)}function r(){return(0,nk.useStoreWithEqualityFn)(t,uk,fk)}function n(){return(0,gm.useStore)(t,ck)}return{useChainId:e,useAccounts:r,useIsActivating:n}}function hk({useChainId:t,useAccounts:e,useIsActivating:r}){function n(){var o;return(o=e())===null||o===void 0?void 0:o[0]}function i(){const o=t(),s=e(),l=r();return sk({chainId:o,accounts:s,activating:l})}return{useAccount:n,useIsActive:i}}function vm(t,e=[]){const[r,n]=(0,go.useState)();return(0,go.useEffect)(()=>{if(t&&e.length){let i=!1;return Promise.all(e.map(o=>t.lookupAddress(o))).then(o=>{i||n(o)}).catch(o=>{i||(console.debug("Could not fetch ENS names",o),n(new Array(e.length).fill(null)))}),()=>{i=!0,n(void 0)}}},[t,e]),r??new Array(e.length).fill(void 0)}function pk(t,{useAccounts:e,useChainId:r},{useAccount:n,useIsActive:i}){function o(a,u=!0){const c=i(),d=r(),[m,g]=(0,go.useState)(So!==void 0);return(0,go.useEffect)(()=>{if(m)return;let v=!1;return ik().then(()=>{v||g(!0)}),()=>{v=!0}},[m]),(0,go.useMemo)(()=>{if(u){if(t.customProvider)return t.customProvider;if(So&&t.provider)return new So(t.provider,a)}},[m,u,c,d,a])}function s(a){const u=e();return vm(a,u)}function l(a){var u;const c=n(),d=(0,go.useMemo)(()=>c===void 0?void 0:[c],[c]);return(u=vm(a,d))===null||u===void 0?void 0:u[0]}return{useProvider:o,useENSNames:s,useENSName:l}}var Ku={},D1={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(a,u,c){this.fn=a,this.context=u,this.once=c||!1}function o(a,u,c,d,m){if(typeof c!="function")throw new TypeError("The listener must be a function");var g=new i(c,d||a,m),v=r?r+u:u;return a._events[v]?a._events[v].fn?a._events[v]=[a._events[v],g]:a._events[v].push(g):(a._events[v]=g,a._eventsCount++),a}function s(a,u){--a._eventsCount===0?a._events=new n:delete a._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],c,d;if(this._eventsCount===0)return u;for(d in c=this._events)e.call(c,d)&&u.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},l.prototype.listeners=function(u){var c=r?r+u:u,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var m=0,g=d.length,v=new Array(g);me),this.eth_accounts=jest.fn(e=>e),this.eth_requestAccounts=jest.fn(e=>e)}request(e){if(!this.chainId)return Promise.reject(new Error);switch(e.method){case"eth_chainId":return Promise.resolve(this.eth_chainId(this.chainId));case"eth_accounts":return Promise.resolve(this.eth_accounts(this.accounts));case"eth_requestAccounts":return Promise.resolve(this.eth_requestAccounts(this.accounts));default:throw new Error(`Method not supported on mock: ${JSON.stringify(e)}`)}}emitConnect(e){this.emit("connect",{chainId:e})}emitDisconnect(e){this.emit("disconnect",e)}emitChainChanged(e){this.emit("chainChanged",e)}emitAccountsChanged(e){this.emit("accountsChanged",e)}}Ku.MockEIP1193Provider=vk;var Do={},yk=Fe&&Fe.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),wk=Fe&&Fe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xk=Fe&&Fe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&yk(e,t,r);return wk(e,t),e};Object.defineProperty(Do,"__esModule",{value:!0});Do.useWeb3React=Do.Web3ReactProvider=void 0;const su=xk(L),Ek=Cn,U1=(0,su.createContext)(void 0);function bk({children:t,connectors:e,connectorOverride:r,network:n,lookupENS:i=!0}){const o=(0,su.useRef)(e);if(e.length!=o.current.length||e.some((Q,X)=>{const ie=o.current[X];return Q[0]!==ie[0]}))throw new Error("The connectors prop passed to Web3ReactProvider must be referentially static. If connectors is changing, try providing a key prop to Web3ReactProvider that changes every time connectors changes.");const s=(0,Ek.getPriorityConnector)(...e),{usePriorityConnector:l,useSelectedChainId:a,useSelectedAccounts:u,useSelectedIsActivating:c,useSelectedAccount:d,useSelectedIsActive:m,useSelectedProvider:g,useSelectedENSNames:v,useSelectedENSName:E}=s,N=l(),x=r??N,w=a(x),b=u(x),T=c(x),B=d(x),D=m(x),$=g(x,n),H=v(x,i?$:void 0),Y=E(x,i?$:void 0);return su.default.createElement(U1.Provider,{value:{connector:x,chainId:w,accounts:b,isActivating:T,account:B,isActive:D,provider:$,ENSNames:H,ENSName:Y,hooks:s}},t)}Do.Web3ReactProvider=bk;function Ak(){const t=(0,su.useContext)(U1);if(!t)throw Error("useWeb3React can only be used within the Web3ReactProvider component");return t}Do.useWeb3React=Ak;(function(t){var e=Fe&&Fe.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=Fe&&Fe.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Cn,t),r(Ku,t),r(Do,t)})(Wu);const sf=[{type:"function",name:"UPGRADE_INTERFACE_VERSION",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"approve",inputs:[{name:"to",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"apps",inputs:[{name:"",type:"uint256",internalType:"uint256"}],outputs:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherKnsNodeId",type:"bytes32",internalType:"bytes32"},{name:"metadataUrl",type:"string",internalType:"string"},{name:"metadataHash",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"balanceOf",inputs:[{name:"owner",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"contractURI",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"getApproved",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getInitializedVersion",inputs:[],outputs:[{name:"",type:"uint64",internalType:"uint64"}],stateMutability:"view"},{type:"function",name:"getPackageId",inputs:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherName",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"pure"},{type:"function",name:"getPackageInfo",inputs:[{name:"package",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"tuple",internalType:"struct IKinodeAppStore.PackageInfo",components:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherKnsNodeId",type:"bytes32",internalType:"bytes32"},{name:"metadataUrl",type:"string",internalType:"string"},{name:"metadataHash",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"getPackageInfo",inputs:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherName",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"tuple",internalType:"struct IKinodeAppStore.PackageInfo",components:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherKnsNodeId",type:"bytes32",internalType:"bytes32"},{name:"metadataUrl",type:"string",internalType:"string"},{name:"metadataHash",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"initialize",inputs:[{name:"_knsResolver",type:"address",internalType:"contract KNSRegistryResolver"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"isApprovedForAll",inputs:[{name:"owner",type:"address",internalType:"address"},{name:"operator",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"knsResolver",inputs:[],outputs:[{name:"",type:"address",internalType:"contract KNSRegistryResolver"}],stateMutability:"view"},{type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"ownerOf",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"proxiableUUID",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"registerApp",inputs:[{name:"packageName",type:"string",internalType:"string"},{name:"publisherName",type:"bytes",internalType:"bytes"},{name:"metadataUrl",type:"string",internalType:"string"},{name:"metadataHash",type:"bytes32",internalType:"bytes32"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"renounceOwnership",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"safeTransferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"safeTransferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setApprovalForAll",inputs:[{name:"operator",type:"address",internalType:"address"},{name:"approved",type:"bool",internalType:"bool"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"tokenURI",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"transferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"transferOwnership",inputs:[{name:"newOwner",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"unlistPacakge",inputs:[{name:"package",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"updateContractURI",inputs:[{name:"uri",type:"string",internalType:"string"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"updateMetadata",inputs:[{name:"package",type:"uint256",internalType:"uint256"},{name:"metadataUrl",type:"string",internalType:"string"},{name:"metadataHash",type:"bytes32",internalType:"bytes32"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"upgradeToAndCall",inputs:[{name:"newImplementation",type:"address",internalType:"address"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"payable"},{type:"event",name:"AppMetadataUpdated",inputs:[{name:"package",type:"uint256",indexed:!0,internalType:"uint256"},{name:"metadataUrl",type:"string",indexed:!1,internalType:"string"},{name:"metadataHash",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"AppRegistered",inputs:[{name:"package",type:"uint256",indexed:!0,internalType:"uint256"},{name:"packageName",type:"string",indexed:!1,internalType:"string"},{name:"publisherName",type:"bytes",indexed:!1,internalType:"bytes"},{name:"metadataUrl",type:"string",indexed:!1,internalType:"string"},{name:"metadataHash",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"Approval",inputs:[{name:"owner",type:"address",indexed:!0,internalType:"address"},{name:"approved",type:"address",indexed:!0,internalType:"address"},{name:"tokenId",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ApprovalForAll",inputs:[{name:"owner",type:"address",indexed:!0,internalType:"address"},{name:"operator",type:"address",indexed:!0,internalType:"address"},{name:"approved",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"Initialized",inputs:[{name:"version",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"OwnershipTransferred",inputs:[{name:"previousOwner",type:"address",indexed:!0,internalType:"address"},{name:"newOwner",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"Transfer",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"tokenId",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"Upgraded",inputs:[{name:"implementation",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"error",name:"AddressEmptyCode",inputs:[{name:"target",type:"address",internalType:"address"}]},{type:"error",name:"ERC1967InvalidImplementation",inputs:[{name:"implementation",type:"address",internalType:"address"}]},{type:"error",name:"ERC1967NonPayable",inputs:[]},{type:"error",name:"ERC721IncorrectOwner",inputs:[{name:"sender",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"},{name:"owner",type:"address",internalType:"address"}]},{type:"error",name:"ERC721InsufficientApproval",inputs:[{name:"operator",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"}]},{type:"error",name:"ERC721InvalidApprover",inputs:[{name:"approver",type:"address",internalType:"address"}]},{type:"error",name:"ERC721InvalidOperator",inputs:[{name:"operator",type:"address",internalType:"address"}]},{type:"error",name:"ERC721InvalidOwner",inputs:[{name:"owner",type:"address",internalType:"address"}]},{type:"error",name:"ERC721InvalidReceiver",inputs:[{name:"receiver",type:"address",internalType:"address"}]},{type:"error",name:"ERC721InvalidSender",inputs:[{name:"sender",type:"address",internalType:"address"}]},{type:"error",name:"ERC721NonexistentToken",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}]},{type:"error",name:"FailedInnerCall",inputs:[]},{type:"error",name:"InvalidInitialization",inputs:[]},{type:"error",name:"NotInitializing",inputs:[]},{type:"error",name:"OwnableInvalidOwner",inputs:[{name:"owner",type:"address",internalType:"address"}]},{type:"error",name:"OwnableUnauthorizedAccount",inputs:[{name:"account",type:"address",internalType:"address"}]},{type:"error",name:"UUPSUnauthorizedCallContext",inputs:[]},{type:"error",name:"UUPSUnsupportedProxiableUUID",inputs:[{name:"slot",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"Unauthorized",inputs:[]}];class xd{static createInterface(){return new ud(sf)}static connect(e,r){return new v3(e,sf,r)}}zh(xd,"abi",sf);var F1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ym=qr.createContext&&qr.createContext(F1),_k=["attr","size","title"];function Sk(t,e){if(t==null)return{};var r=kk(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function kk(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o=0)&&(r[i]=t[i]);return r}function lu(){return lu=Object.assign?Object.assign.bind():function(t){for(var e=1;eqr.createElement(e.tag,au({key:r},e.attr),z1(e.child)))}function zn(t){return e=>qr.createElement(Mk,lu({attr:au({},t.attr)},e),z1(t.child))}function Mk(t){var e=r=>{var{attr:n,size:i,title:o}=t,s=Sk(t,_k),l=i||r.size||"1em",a;return r.className&&(a=r.className),t.className&&(a=(a?a+" ":"")+t.className),qr.createElement("svg",lu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,s,{className:a,style:au(au({color:t.color||r.color},r.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&qr.createElement("title",null,o),t.children)};return ym!==void 0?qr.createElement(ym.Consumer,null,r=>e(r)):e(F1)}function Ik(t){return zn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"},child:[]}]})(t)}function Rk(t){return zn({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"},child:[]}]})(t)}function Tk(t){return zn({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"},child:[]}]})(t)}function Ok(t){return zn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"},child:[]}]})(t)}function Lk(t){return zn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"},child:[]}]})(t)}function Bk(t){return zn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(t)}function jk(t){return zn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(t)}function $1(t){return zn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"},child:[]}]})(t)}function Dk(t){return zn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm101.8-262.2L295.6 256l62.2 62.2c4.7 4.7 4.7 12.3 0 17l-22.6 22.6c-4.7 4.7-12.3 4.7-17 0L256 295.6l-62.2 62.2c-4.7 4.7-12.3 4.7-17 0l-22.6-22.6c-4.7-4.7-4.7-12.3 0-17l62.2-62.2-62.2-62.2c-4.7-4.7-4.7-12.3 0-17l22.6-22.6c4.7-4.7 12.3-4.7 17 0l62.2 62.2 62.2-62.2c4.7-4.7 12.3-4.7 17 0l22.6 22.6c4.7 4.7 4.7 12.3 0 17z"},child:[]}]})(t)}var Uk={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const xm=t=>{let e;const r=new Set,n=(a,u)=>{const c=typeof a=="function"?a(e):a;if(!Object.is(c,e)){const d=e;e=u??(typeof c!="object"||c===null)?c:Object.assign({},e,c),r.forEach(m=>m(e,d))}},i=()=>e,l={setState:n,getState:i,subscribe:a=>(r.add(a),()=>r.delete(a)),destroy:()=>{(Uk?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,i,l),l},Fk=t=>t?xm(t):xm;var H1={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:zk}=qr,{useSyncExternalStoreWithSelector:$k}=Vu;let Em=!1;function Hk(t,e=t.getState,r){(H1?"production":void 0)!=="production"&&r&&!Em&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Em=!0);const n=$k(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return zk(n),n}const bm=t=>{(H1?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Fk(t):t,r=(n,i)=>Hk(e,n,i);return Object.assign(r,e),r},qk=t=>t?bm(t):bm;var Wk={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};function q1(t,e){let r;try{r=t()}catch{return}return{getItem:i=>{var o;const s=a=>a===null?null:JSON.parse(a,e==null?void 0:e.reviver),l=(o=r.getItem(i))!=null?o:null;return l instanceof Promise?l.then(s):s(l)},setItem:(i,o)=>r.setItem(i,JSON.stringify(o,e==null?void 0:e.replacer)),removeItem:i=>r.removeItem(i)}}const sl=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return sl(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return sl(n)(r)}}}},Gk=(t,e)=>(r,n,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:N=>N,version:0,merge:(N,x)=>({...x,...N}),...e},s=!1;const l=new Set,a=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return t((...N)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...N)},n,i);const c=sl(o.serialize),d=()=>{const N=o.partialize({...n()});let x;const w=c({state:N,version:o.version}).then(b=>u.setItem(o.name,b)).catch(b=>{x=b});if(x)throw x;return w},m=i.setState;i.setState=(N,x)=>{m(N,x),d()};const g=t((...N)=>{r(...N),d()},n,i);let v;const E=()=>{var N;if(!u)return;s=!1,l.forEach(w=>w(n()));const x=((N=o.onRehydrateStorage)==null?void 0:N.call(o,n()))||void 0;return sl(u.getItem.bind(u))(o.name).then(w=>{if(w)return o.deserialize(w)}).then(w=>{if(w)if(typeof w.version=="number"&&w.version!==o.version){if(o.migrate)return o.migrate(w.state,w.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return w.state}).then(w=>{var b;return v=o.merge(w,(b=n())!=null?b:g),r(v,!0),d()}).then(()=>{x==null||x(v,void 0),s=!0,a.forEach(w=>w(v))}).catch(w=>{x==null||x(void 0,w)})};return i.persist={setOptions:N=>{o={...o,...N},N.getStorage&&(u=N.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>E(),hasHydrated:()=>s,onHydrate:N=>(l.add(N),()=>{l.delete(N)}),onFinishHydration:N=>(a.add(N),()=>{a.delete(N)})},E(),v||g},Vk=(t,e)=>(r,n,i)=>{let o={storage:q1(()=>localStorage),partialize:E=>E,version:0,merge:(E,N)=>({...N,...E}),...e},s=!1;const l=new Set,a=new Set;let u=o.storage;if(!u)return t((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...E)},n,i);const c=()=>{const E=o.partialize({...n()});return u.setItem(o.name,{state:E,version:o.version})},d=i.setState;i.setState=(E,N)=>{d(E,N),c()};const m=t((...E)=>{r(...E),c()},n,i);let g;const v=()=>{var E,N;if(!u)return;s=!1,l.forEach(w=>{var b;return w((b=n())!=null?b:m)});const x=((N=o.onRehydrateStorage)==null?void 0:N.call(o,(E=n())!=null?E:m))||void 0;return sl(u.getItem.bind(u))(o.name).then(w=>{if(w)if(typeof w.version=="number"&&w.version!==o.version){if(o.migrate)return o.migrate(w.state,w.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return w.state}).then(w=>{var b;return g=o.merge(w,(b=n())!=null?b:m),r(g,!0),c()}).then(()=>{x==null||x(g,void 0),g=n(),s=!0,a.forEach(w=>w(g))}).catch(w=>{x==null||x(void 0,w)})};return i.persist={setOptions:E=>{o={...o,...E},E.storage&&(u=E.storage)},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>s,onHydrate:E=>(l.add(E),()=>{l.delete(E)}),onFinishHydration:E=>(a.add(E),()=>{a.delete(E)})},o.skipHydration||v(),g||m},Kk=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((Wk?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Gk(t,e)):Vk(t,e),Qk=Kk;var jr=(t=>(t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.ACCEPTED=202]="ACCEPTED",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",t[t.FOUND=302]="FOUND",t[t.SEE_OTHER=303]="SEE_OTHER",t[t.NOT_MODIFIED=304]="NOT_MODIFIED",t[t.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",t[t.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",t[t.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t))(jr||{});const Ee=t=>`${t.package}:${t.publisher}`,Vi=t=>{var e;return((e=t.metadata)==null?void 0:e.name)||Ee(t)},lf=t=>{var e,r;return t.publisher==="sys"?"system":(e=t.state)!=null&&e.our_version&&!((r=t.state)!=null&&r.capsApproved)?"downloaded":t.metadata?"installed":"local"},or="/main:app_store:sys",Zl=(t,e)=>t.package===e.package&&t.publisher===e.publisher,Jo=qk()(Qk((t,e)=>({myApps:{downloaded:[],installed:[],local:[],system:[]},listedApps:[],searchResults:[],query:"",getMyApps:async()=>{const i=(await(await fetch(`${or}/apps`)).json()).reduce((o,s)=>{const l=lf(s);return o[l].push(s),o},{downloaded:[],installed:[],local:[],system:[]});return t(()=>({myApps:i})),i},getListedApps:async()=>{const n=await(await fetch(`${or}/apps/listed`)).json();return t({listedApps:n}),n},getMyApp:async r=>{const i=await(await fetch(`${or}/apps/${Ee(r)}`)).json(),o=lf(i),s=e().myApps;s[o]=s[o].map(a=>Zl(a,i)?i:a);const l=[...e().listedApps].map(a=>Zl(a,i)?i:a);return t({myApps:s,listedApps:l}),i},installApp:async r=>{if((await fetch(`${or}/apps/${Ee(r)}/caps`,{method:"POST"})).status!==jr.OK)throw new Error(`Failed to approve caps for app: ${Ee(r)}`);if((await fetch(`${or}/apps/${Ee(r)}`,{method:"POST"})).status!==jr.CREATED)throw new Error(`Failed to install app: ${Ee(r)}`)},updateApp:async r=>{if((await fetch(`${or}/apps/${Ee(r)}`,{method:"PUT"})).status!==jr.NO_CONTENT)throw new Error(`Failed to update app: ${Ee(r)}`)},uninstallApp:async r=>{if(!confirm(`Are you sure you want to remove ${Ee(r)}?`))return;if((await fetch(`${or}/apps/${Ee(r)}`,{method:"DELETE"})).status!==jr.NO_CONTENT)throw new Error(`Failed to remove app: ${Ee(r)}`);const i={...e().myApps},o=lf(r);i[o]=i[o].filter(l=>!Zl(l,r));const s=e().listedApps.map(l=>Zl(l,r)?{...l,state:void 0,installed:!1}:l);t({myApps:i,listedApps:s})},getListedApp:async r=>{const n=await fetch(`${or}/apps/listed/${r}`);if(n.status!==jr.OK)throw new Error(`Failed to get app: ${r}`);return await n.json()},downloadApp:async(r,n)=>{if((await fetch(`${or}/apps/listed/${Ee(r)}`,{method:"POST",body:JSON.stringify({download_from:n})})).status!==jr.CREATED)throw new Error(`Failed to get app: ${Ee(r)}`)},getCaps:async r=>{const n=await fetch(`${or}/apps/${Ee(r)}/caps`);if(n.status!==jr.OK)throw new Error(`Failed to get app: ${Ee(r)}`);return(await n.json())[0]},approveCaps:async r=>{if((await fetch(`${or}/apps/${Ee(r)}/caps`,{method:"POST"})).status!==jr.OK)throw new Error(`Failed to get app: ${Ee(r)}`)},setMirroring:async(r,n)=>{if((await fetch(`${or}/apps/${Ee(r)}/mirror`,{method:n?"PUT":"DELETE"})).status!==jr.OK)throw new Error(`Failed to start mirror: ${Ee(r)}`);e().getMyApp(r)},setAutoUpdate:async(r,n)=>{if((await fetch(`${or}/apps/${Ee(r)}/auto-update`,{method:n?"PUT":"DELETE"})).status!==jr.OK)throw new Error(`Failed to change auto update: ${Ee(r)}`);e().getMyApp(r)},get:e,set:t}),{name:"app_store",storage:q1(()=>sessionStorage)}));function W1({app:t,size:e="medium",...r}){var i,o,s,l,a;const n=vl();return P.jsxs("div",{...r,className:`app-header row ${e} ${r.className||""}`,onClick:()=>n(`/app-details/${Ee(t)}`),children:[P.jsx("img",{src:((i=t.metadata)==null?void 0:i.image)||"https://png.pngtree.com/png-vector/20190215/ourmid/pngtree-vector-question-mark-icon-png-image_515448.jpg",alt:"app icon"}),P.jsxs("div",{className:"col title",children:[P.jsx("div",{className:"app-name ellipsis",children:((o=t.metadata)==null?void 0:o.name)||Ee(t)}),((s=t.metadata)==null?void 0:s.description)&&e!=="large"&&P.jsx("div",{className:"ellipsis",children:(a=(l=t.metadata)==null?void 0:l.description)==null?void 0:a.slice(0,100)})]})]})}const Jk=({show:t,hide:e,hideClose:r=!1,title:n,...i})=>{const o=s=>{s.stopPropagation()};return t?P.jsx("div",{className:`modal-backdrop ${t?"show":""}`,onClick:e,children:P.jsxs("div",{...i,className:`col modal ${i.className||""}`,onClick:o,children:[!!n&&P.jsx("h4",{className:"modal-title",children:n}),!r&&P.jsx(Bk,{className:"close",onClick:e}),P.jsx("div",{className:"col modal-content",onClick:o,children:i.children})]})}):null};function Ed({msg:t}){return P.jsxs("div",{id:"loading",className:"col center",children:[P.jsx("h4",{children:t}),P.jsxs("div",{id:"loader",children:[" ",P.jsx("div",{})," ",P.jsx("div",{})," ",P.jsx("div",{})," ",P.jsx("div",{})," "]})]})}function G1({app:t,...e}){var Q,X,ie,M,f,p,A;const{updateApp:r,downloadApp:n,installApp:i,getCaps:o,getMyApp:s}=Jo(),[l,a]=L.useState(!1),[u,c]=L.useState(((ie=(X=(Q=t.metadata)==null?void 0:Q.properties)==null?void 0:X.mirrors)==null?void 0:ie[0])||"Other"),[d,m]=L.useState(""),[g,v]=L.useState([]),[E,N]=L.useState(""),{clean:x,installed:w,downloaded:b,updatable:T}=L.useMemo(()=>{var h,C,Z,y;const _=(Object.entries(((C=(h=t==null?void 0:t.metadata)==null?void 0:h.properties)==null?void 0:C.code_hashes)||{}).find(([j])=>{var U,F;return j===((F=(U=t.metadata)==null?void 0:U.properties)==null?void 0:F.current_version)})||[])[1],I=t.installed,R=!!t.state,k=!!((Z=t.state)!=null&&Z.our_version&&_)&&((y=t.state)==null?void 0:y.our_version)!==_&&t.publisher!==window.our.node;return{clean:!I&&!R&&!k,installed:I,downloaded:R,updatable:k}},[t]);L.useEffect(()=>{var S,_,I;c(((I=(_=(S=t.metadata)==null?void 0:S.properties)==null?void 0:_.mirrors)==null?void 0:I[0])||"Other")},[(f=(M=t.metadata)==null?void 0:M.properties)==null?void 0:f.mirrors]);const B=L.useCallback(async()=>{w&&!T?window.alert("App is installed"):(b&&o(t).then(S=>{v(S.request_capabilities)}),a(!0))},[t,w,b,T,a,o]),D=L.useCallback(async S=>{S.preventDefault(),S.stopPropagation();const _=u==="Other"?d:u;if(!_){window.alert("Please select a mirror");return}try{N(`Downloading ${Vi(t)}...`),await n(t,_);const I=setInterval(()=>{s(t).then(()=>{N(""),a(!1),clearInterval(I)}).catch(console.log)},2e3)}catch(I){console.error(I),window.alert(`Failed to download app from ${_}, please try a different mirror.`),N("")}},[u,d,t,n,s]),$=L.useCallback(async()=>{try{N(`Installing ${Vi(t)}...`),await i(t);const S=setInterval(()=>{s(t).then(_=>{_.installed&&(N(""),a(!1),clearInterval(S))}).catch(console.log)},2e3)}catch(S){console.error(S),window.alert("Failed to install, please try again."),N("")}},[t,i,s]),H=L.useCallback(async()=>{try{N(`Updating ${Vi(t)}...`),await r(t);const S=setInterval(()=>{s(t).then(_=>{_.installed&&(N(""),a(!1),clearInterval(S))}).catch(console.log)},2e3)}catch(S){console.error(S),window.alert("Failed to update, please try again."),N("")}},[t,r,s]),Y=Vi(t);return P.jsxs(P.Fragment,{children:[P.jsx("button",{...e,type:"button",className:`small action-btn ${e.className||""}`,onClick:B,children:w&&T?"Update":w?"Installed":b?"Install":"Download"}),P.jsx(Jk,{show:l,hide:()=>a(!1),children:E?P.jsx(Ed,{msg:E}):x?P.jsxs("form",{className:"col",style:{alignItems:"center",gap:"1em"},onSubmit:D,children:[P.jsxs("h4",{children:["Download '",Y,"'"]}),P.jsx("h5",{style:{margin:0},children:"Select Mirror"}),P.jsx("select",{value:u,onChange:S=>c(S.target.value),children:(((A=(p=t.metadata)==null?void 0:p.properties)==null?void 0:A.mirrors)||[]).concat(["Other"]).map(S=>P.jsx("option",{value:S,children:S},S))}),u==="Other"&&P.jsx("input",{type:"text",value:d,onChange:S=>m(S.target.value),placeholder:"Mirror, i.e. 'template.os'",style:{padding:"0.5em",maxWidth:240,width:"100%"},required:!0,autoFocus:!0}),P.jsx("button",{type:"submit",children:"Download"})]}):b?P.jsxs(P.Fragment,{children:[P.jsx("h4",{children:"Approve App Permissions"}),P.jsxs("h5",{style:{margin:0},children:[Vi(t)," needs the following permissions:"]}),P.jsx("ul",{className:"col",style:{alignItems:"flex-start"},children:g.map(S=>P.jsx("li",{children:S},S))}),P.jsx("button",{type:"button",onClick:$,children:"Approve & Install"})]}):P.jsxs(P.Fragment,{children:[P.jsx("h4",{children:"Approve App Permissions"}),P.jsxs("h5",{style:{margin:0},children:[Vi(t)," needs the following permissions:"]}),P.jsx("br",{}),P.jsx("ul",{className:"col",style:{alignItems:"flex-start"},children:g.map(S=>P.jsx("li",{children:S},S))}),P.jsx("button",{type:"button",onClick:H,children:"Approve & Update"})]})})]})}const V1=t=>!!t&&t[0]==="o",Am=Qs.unstable_batchedUpdates||(t=>t()),Ki=(t,e,r=1e-4)=>Math.abs(t-e)t===!0||!!(t&&t[e]),hr=(t,e)=>typeof t=="function"?t(e):t,K1="_szhsinMenu",Yk=t=>t[K1],Xk=(t,e)=>Object.defineProperty(e,K1,{value:t}),Qu=(t,e)=>(e&&Object.keys(e).forEach(r=>{const n=t[r],i=e[r];typeof i=="function"&&n?t[r]=(...o)=>{i(...o),n(...o)}:t[r]=i}),t),Zk=t=>{if(typeof t!="string")return{top:0,right:0,bottom:0,left:0};const e=t.trim().split(/\s+/,4).map(parseFloat),r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?r:e[1];return{top:r,right:n,bottom:isNaN(e[2])?r:e[2],left:isNaN(e[3])?n:e[3]}},af=t=>{for(;t;){if(t=t.parentNode,!t||t===document.body||!t.parentNode)return;const{overflow:e,overflowX:r,overflowY:n}=getComputedStyle(t);if(/auto|scroll|overlay|hidden/.test(e+n+r))return t}};function Q1(t,e){return{"aria-disabled":t||void 0,tabIndex:e?0:-1}}function _m(t,e){for(let r=0;rL.useMemo(()=>{const i=e?`${t}__${e}`:t;let o=i;r&&Object.keys(r).forEach(l=>{const a=r[l];a&&(o+=` ${i}--${a===!0?l:`${l}-${a}`}`)});let s=typeof n=="function"?n(r):n;return typeof s=="string"&&(s=s.trim(),s&&(o+=` ${s}`)),o},[t,e,r,n]),eN="szh-menu-container",Aa="szh-menu",tN="szh-menu-button",rN="arrow",nN="item",J1=L.createContext(),Y1=L.createContext({}),Sm=L.createContext({}),X1=L.createContext({}),iN=L.createContext({}),Dh=L.createContext({}),$r=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Et=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),ul=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Ms=Object.freeze({FIRST:"first",LAST:"last"}),oN=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),uf="absolute",sN="presentation",Z1="menuitem",km={"aria-hidden":!0,role:Z1},lN=Xk("MenuButton",L.forwardRef(function({className:e,isOpen:r,disabled:n,children:i,...o},s){const l=L.useMemo(()=>({open:r}),[r]);return P.jsx("button",{"aria-haspopup":!0,"aria-expanded":r,"aria-disabled":n||void 0,type:"button",disabled:n,...o,ref:s,className:al({block:tN,modifiers:l,className:e}),children:i})})),aN=({className:t,containerRef:e,containerProps:r,children:n,isOpen:i,theming:o,transition:s,onClose:l})=>{const a=ll(s,"item"),u=({key:d})=>{switch(d){case $r.ESC:hr(l,{key:d,reason:ul.CANCEL});break}},c=d=>{i&&!d.currentTarget.contains(d.relatedTarget)&&hr(l,{reason:ul.BLUR})};return P.jsx("div",{...Qu({onKeyDown:u,onBlur:c},r),className:al({block:eN,modifiers:L.useMemo(()=>({theme:o,itemTransition:a}),[o,a]),className:t}),style:{position:"absolute",...r==null?void 0:r.style},ref:e,children:n})},uN=()=>{let t,e=0;return{toggle:r=>{r?e++:e--,e=Math.max(e,0)},on:(r,n,i)=>{e?t||(t=setTimeout(()=>{t=0,n()},r)):i==null||i()},off:()=>{t&&(clearTimeout(t),t=0)}}},cN=(t,e)=>{const[r,n]=L.useState(),o=L.useRef({items:[],hoverIndex:-1,sorted:!1}).current,s=L.useCallback((a,u)=>{const{items:c}=o;if(!a)o.items=[];else if(u)c.push(a);else{const d=c.indexOf(a);d>-1&&(c.splice(d,1),a.contains(document.activeElement)&&(e.current.focus(),n()))}o.hoverIndex=-1,o.sorted=!1},[o,e]),l=L.useCallback((a,u,c)=>{const{items:d,hoverIndex:m}=o,g=()=>{if(o.sorted)return;const N=t.current.querySelectorAll(".szh-menu__item");d.sort((x,w)=>_m(N,x)-_m(N,w)),o.sorted=!0};let v=-1,E;switch(a){case Et.RESET:break;case Et.SET:E=u;break;case Et.UNSET:E=N=>N===u?void 0:N;break;case Et.FIRST:g(),v=0,E=d[v];break;case Et.LAST:g(),v=d.length-1,E=d[v];break;case Et.SET_INDEX:g(),v=c,E=d[v];break;case Et.INCREASE:g(),v=m,v<0&&(v=d.indexOf(u)),v++,v>=d.length&&(v=0),E=d[v];break;case Et.DECREASE:g(),v=m,v<0&&(v=d.indexOf(u)),v--,v<0&&(v=d.length-1),E=d[v];break}E||(v=-1),n(E),o.hoverIndex=v},[t,o]);return{hoverItem:r,dispatch:l,updateItems:s}},fN=(t,e,r,n)=>{const i=e.current.getBoundingClientRect(),o=t.current.getBoundingClientRect(),s=r===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:r.getBoundingClientRect(),l=Zk(n),a=v=>v+o.left-s.left-l.left,u=v=>v+o.left+i.width-s.right+l.right,c=v=>v+o.top-s.top-l.top,d=v=>v+o.top+i.height-s.bottom+l.bottom;return{menuRect:i,containerRect:o,getLeftOverflow:a,getRightOverflow:u,getTopOverflow:c,getBottomOverflow:d,confineHorizontally:v=>{let E=a(v);if(E<0)v-=E;else{const N=u(v);N>0&&(v-=N,E=a(v),E<0&&(v-=E))}return v},confineVertically:v=>{let E=c(v);if(E<0)v-=E;else{const N=d(v);N>0&&(v-=N,E=c(v),E<0&&(v-=E))}return v}}},dN=({arrowRef:t,menuY:e,anchorRect:r,containerRect:n,menuRect:i})=>{let o=r.top-n.top-e+r.height/2;const s=t.current.offsetHeight*1.25;return o=Math.max(s,o),o=Math.min(o,i.height-s),o},hN=({anchorRect:t,containerRect:e,menuRect:r,placeLeftorRightY:n,placeLeftX:i,placeRightX:o,getLeftOverflow:s,getRightOverflow:l,confineHorizontally:a,confineVertically:u,arrowRef:c,arrow:d,direction:m,position:g})=>{let v=m,E=n;g!=="initial"&&(E=u(E),g==="anchor"&&(E=Math.min(E,t.bottom-e.top),E=Math.max(E,t.top-e.top-r.height)));let N,x,w;return v==="left"?(N=i,g!=="initial"&&(x=s(N),x<0&&(w=l(o),(w<=0||-x>w)&&(N=o,v="right")))):(N=o,g!=="initial"&&(w=l(N),w>0&&(x=s(i),(x>=0||-x{let o=r.left-n.left-e+r.width/2;const s=t.current.offsetWidth*1.25;return o=Math.max(s,o),o=Math.min(o,i.width-s),o},mN=({anchorRect:t,containerRect:e,menuRect:r,placeToporBottomX:n,placeTopY:i,placeBottomY:o,getTopOverflow:s,getBottomOverflow:l,confineHorizontally:a,confineVertically:u,arrowRef:c,arrow:d,direction:m,position:g})=>{let v=m==="top"?"top":"bottom",E=n;g!=="initial"&&(E=a(E),g==="anchor"&&(E=Math.min(E,t.right-e.left),E=Math.max(E,t.left-e.left-r.width)));let N,x,w;return v==="top"?(N=i,g!=="initial"&&(x=s(N),x<0&&(w=l(o),(w<=0||-x>w)&&(N=o,v="bottom")))):(N=o,g!=="initial"&&(w=l(N),w>0&&(x=s(i),(x>=0||-x{const{menuRect:u,containerRect:c}=a,d=r==="left"||r==="right";let m=d?n:i,g=d?i:n;if(t){const B=l.current;d?m+=B.offsetWidth:g+=B.offsetHeight}const v=s.left-c.left-u.width-m,E=s.right-c.left+m,N=s.top-c.top-u.height-g,x=s.bottom-c.top+g;let w,b;e==="end"?(w=s.right-c.left-u.width,b=s.bottom-c.top-u.height):e==="center"?(w=s.left-c.left-(u.width-s.width)/2,b=s.top-c.top-(u.height-s.height)/2):(w=s.left-c.left,b=s.top-c.top),w+=m,b+=g;const T={...a,anchorRect:s,placeLeftX:v,placeRightX:E,placeLeftorRightY:b,placeTopY:N,placeBottomY:x,placeToporBottomX:w,arrowRef:l,arrow:t,direction:r,position:o};switch(r){case"left":case"right":return hN(T);case"top":case"bottom":default:return mN(T)}},_a=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?L.useLayoutEffect:L.useEffect;function Nm(t,e){typeof t=="function"?t(e):t.current=e}const Uh=(t,e)=>L.useMemo(()=>t?e?r=>{Nm(t,r),Nm(e,r)}:t:e,[t,e]),Pm=-9999,vN=({ariaLabel:t,menuClassName:e,menuStyle:r,arrow:n,arrowProps:i={},anchorPoint:o,anchorRef:s,containerRef:l,containerProps:a,focusProps:u,externalRef:c,parentScrollingRef:d,align:m="start",direction:g="bottom",position:v="auto",overflow:E="visible",setDownOverflow:N,repositionFlag:x,captureFocus:w=!0,state:b,endTransition:T,isDisabled:B,menuItemFocus:D,gap:$=0,shift:H=0,children:Y,onClose:Q,...X})=>{const[ie,M]=L.useState({x:Pm,y:Pm}),[f,p]=L.useState({}),[A,S]=L.useState(),[_,I]=L.useState(g),[R]=L.useState(uN),[k,h]=L.useReducer(ne=>ne+1,1),{transition:C,boundingBoxRef:Z,boundingBoxPadding:y,rootMenuRef:j,rootAnchorRef:U,scrollNodesRef:F,reposition:W,viewScroll:oe,submenuCloseDelay:J}=L.useContext(Dh),{submenuCtx:V,reposSubmenu:Je=x}=L.useContext(Sm),K=L.useRef(null),le=L.useRef(),Qr=L.useRef(),Te=L.useRef(!1),Ne=L.useRef({width:0,height:0}),Jr=L.useRef(()=>{}),{hoverItem:Pe,dispatch:ce,updateItems:wr}=cN(K,le),fe=V1(b),Oe=ll(C,"open"),Yr=ll(C,"close"),me=F.current,ze=ne=>{switch(ne.key){case $r.HOME:ce(Et.FIRST);break;case $r.END:ce(Et.LAST);break;case $r.UP:ce(Et.DECREASE,Pe);break;case $r.DOWN:ce(Et.INCREASE,Pe);break;case $r.SPACE:ne.target&&ne.target.className.indexOf(Aa)!==-1&&ne.preventDefault();return;default:return}ne.preventDefault(),ne.stopPropagation()},gn=()=>{b==="closing"&&S(),hr(T)},$e=ne=>{ne.stopPropagation(),R.on(J,()=>{ce(Et.RESET),le.current.focus()})},He=ne=>{ne.target===ne.currentTarget&&R.off()},Ht=L.useCallback(ne=>{var ot;const ge=s?(ot=s.current)==null?void 0:ot.getBoundingClientRect():o?{left:o.x,right:o.x,top:o.y,bottom:o.y,width:0,height:0}:null;if(!ge)return;me.menu||(me.menu=(Z?Z.current:af(j.current))||window);const de=fN(l,K,me.menu,y);let{arrowX:rt,arrowY:Ae,x:_e,y:Ct,computedDirection:Me}=gN({arrow:n,align:m,direction:g,gap:$,shift:H,position:v,anchorRect:ge,arrowRef:Qr,positionHelpers:de});const{menuRect:De}=de;let Kt=De.height;if(!ne&&E!=="visible"){const{getTopOverflow:Ve,getBottomOverflow:Ke}=de;let Qt,Ie;const Ue=Ne.current.height,xr=Ke(Ct);if(xr>0||Ki(xr,0)&&Ki(Kt,Ue))Qt=Kt-xr,Ie=xr;else{const ke=Ve(Ct);(ke<0||Ki(ke,0)&&Ki(Kt,Ue))&&(Qt=Kt+ke,Ie=0-ke,Qt>=0&&(Ct-=ke))}Qt>=0?(Kt=Qt,S({height:Qt,overflowAmt:Ie})):S()}n&&p({x:rt,y:Ae}),M({x:_e,y:Ct}),I(Me),Ne.current={width:De.width,height:Kt}},[n,m,y,g,$,H,v,E,o,s,l,Z,j,me]);_a(()=>{fe&&(Ht(),Te.current&&h()),Te.current=fe,Jr.current=Ht},[fe,Ht,Je]),_a(()=>{A&&!N&&(K.current.scrollTop=0)},[A,N]),_a(()=>wr,[wr]),L.useEffect(()=>{let{menu:ne}=me;if(!fe||!ne)return;if(ne=ne.addEventListener?ne:window,!me.anchors){me.anchors=[];let rt=af(U&&U.current);for(;rt&&rt!==ne;)me.anchors.push(rt),rt=af(rt)}let ot=oe;if(me.anchors.length&&ot==="initial"&&(ot="auto"),ot==="initial")return;const ge=()=>{ot==="auto"?Am(()=>Ht(!0)):hr(Q,{reason:ul.SCROLL})},de=me.anchors.concat(oe!=="initial"?ne:[]);return de.forEach(rt=>rt.addEventListener("scroll",ge)),()=>de.forEach(rt=>rt.removeEventListener("scroll",ge))},[U,me,fe,Q,oe,Ht]);const Le=!!A&&A.overflowAmt>0;L.useEffect(()=>{if(Le||!fe||!d)return;const ne=()=>Am(Ht),ot=d.current;return ot.addEventListener("scroll",ne),()=>ot.removeEventListener("scroll",ne)},[fe,Le,d,Ht]),L.useEffect(()=>{if(typeof ResizeObserver!="function"||W==="initial")return;const ne=new ResizeObserver(([ge])=>{const{borderBoxSize:de,target:rt}=ge;let Ae,_e;if(de){const{inlineSize:Ct,blockSize:Me}=de[0]||de;Ae=Ct,_e=Me}else{const Ct=rt.getBoundingClientRect();Ae=Ct.width,_e=Ct.height}Ae===0||_e===0||Ki(Ae,Ne.current.width,1)&&Ki(_e,Ne.current.height,1)||Qs.flushSync(()=>{Jr.current(),h()})}),ot=K.current;return ne.observe(ot,{box:"border-box"}),()=>ne.unobserve(ot)},[W]),L.useEffect(()=>{if(!fe){ce(Et.RESET),Yr||S();return}const{position:ne,alwaysUpdate:ot}=D||{},ge=()=>{ne===Ms.FIRST?ce(Et.FIRST):ne===Ms.LAST?ce(Et.LAST):ne>=-1&&ce(Et.SET_INDEX,void 0,ne)};if(ot)ge();else if(w){const de=setTimeout(()=>{const rt=K.current;rt&&!rt.contains(document.activeElement)&&(le.current.focus(),ge())},Oe?170:100);return()=>clearTimeout(de)}},[fe,Oe,Yr,w,D,ce]);const qe=L.useMemo(()=>({isParentOpen:fe,submenuCtx:R,dispatch:ce,updateItems:wr}),[fe,R,ce,wr]);let Rr,Ce;A&&(N?Ce=A.overflowAmt:Rr=A.height);const We=L.useMemo(()=>({reposSubmenu:k,submenuCtx:R,overflow:E,overflowAmt:Ce,parentMenuRef:K,parentDir:_}),[k,R,E,Ce,_]),vn=Rr>=0?{maxHeight:Rr,overflow:E}:void 0,Be=L.useMemo(()=>({state:b,dir:_}),[b,_]),Ge=L.useMemo(()=>({dir:_}),[_]),yn=al({block:Aa,element:rN,modifiers:Ge,className:i.className}),je=P.jsxs("ul",{role:"menu","aria-label":t,...Q1(B),...Qu({onPointerEnter:V==null?void 0:V.off,onPointerMove:$e,onPointerLeave:He,onKeyDown:ze,onAnimationEnd:gn},X),ref:Uh(c,K),className:al({block:Aa,modifiers:Be,className:e}),style:{...r,...vn,margin:0,display:b==="closed"?"none":void 0,position:uf,left:ie.x,top:ie.y},children:[P.jsx("li",{tabIndex:-1,style:{position:uf,left:0,top:0,display:"block",outline:"none"},ref:le,...km,...u}),n&&P.jsx("li",{...km,...i,className:yn,style:{display:"block",position:uf,left:f.x,top:f.y,...i.style},ref:Qr}),P.jsx(Sm.Provider,{value:We,children:P.jsx(Y1.Provider,{value:qe,children:P.jsx(J1.Provider,{value:Pe,children:hr(Y,Be)})})})]});return a?P.jsx(aN,{...a,isOpen:fe,children:je}):je},yN=L.forwardRef(function({"aria-label":e,className:r,containerProps:n,initialMounted:i,unmountOnClose:o,transition:s,transitionTimeout:l,boundingBoxRef:a,boundingBoxPadding:u,reposition:c="auto",submenuOpenDelay:d=300,submenuCloseDelay:m=150,viewScroll:g="initial",portal:v,theming:E,onItemClick:N,...x},w){const b=L.useRef(null),T=L.useRef({}),{anchorRef:B,state:D,onClose:$}=x,H=L.useMemo(()=>({initialMounted:i,unmountOnClose:o,transition:s,transitionTimeout:l,boundingBoxRef:a,boundingBoxPadding:u,rootMenuRef:b,rootAnchorRef:B,scrollNodesRef:T,reposition:c,viewScroll:g,submenuOpenDelay:d,submenuCloseDelay:m}),[i,o,s,l,B,a,u,c,g,d,m]),Y=L.useMemo(()=>({handleClick(X,ie){X.stopPropagation||hr(N,X);let M=X.keepOpen;M===void 0&&(M=ie&&X.key===$r.SPACE),M||hr($,{value:X.value,key:X.key,reason:ul.CLICK})},handleClose(X){hr($,{key:X,reason:ul.CLICK})}}),[N,$]);if(!D)return null;const Q=P.jsx(Dh.Provider,{value:H,children:P.jsx(X1.Provider,{value:Y,children:P.jsx(vN,{...x,ariaLabel:e||"Menu",externalRef:w,containerRef:b,containerProps:{className:r,containerRef:b,containerProps:n,theming:E,transition:s,onClose:$}})})});return v===!0&&typeof document<"u"?Qs.createPortal(Q,document.body):v?v.target?Qs.createPortal(Q,v.target):v.stablePosition?null:Q:Q}),bd=0,Ad=1,uu=2,cu=3,fu=4,wN=5,ew=6,xN=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],tw=t=>({_s:t,status:xN[t],isEnter:tfu}),_d=t=>t?ew:wN,EN=(t,e)=>{switch(t){case Ad:case bd:return uu;case fu:case cu:return _d(e)}},bN=t=>typeof t=="object"?[t.enter,t.exit]:[t,t],AN=(t,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||t(e+1)},0),Cm=(t,e,r,n,i)=>{clearTimeout(n.current);const o=tw(t);e(o),r.current=o,i&&i({current:o})},_N=({enter:t=!0,exit:e=!0,preEnter:r,preExit:n,timeout:i,initialEntered:o,mountOnEnter:s,unmountOnExit:l,onStateChange:a}={})=>{const[u,c]=L.useState(()=>tw(o?uu:_d(s))),d=L.useRef(u),m=L.useRef(),[g,v]=bN(i),E=L.useCallback(()=>{const x=EN(d.current._s,l);x&&Cm(x,c,d,m,a)},[a,l]),N=L.useCallback(x=>{const w=T=>{switch(Cm(T,c,d,m,a),T){case Ad:g>=0&&(m.current=setTimeout(E,g));break;case fu:v>=0&&(m.current=setTimeout(E,v));break;case bd:case cu:m.current=AN(w,T);break}},b=d.current.isEnter;typeof x!="boolean"&&(x=!b),x?!b&&w(t?r?bd:Ad:uu):b&&w(e?n?cu:fu:_d(l))},[E,a,t,e,r,n,g,v,l]);return L.useEffect(()=>()=>clearTimeout(m.current),[]),[u,N,E]},SN=({initialOpen:t,initialMounted:e,unmountOnClose:r,transition:n,transitionTimeout:i=500}={})=>{const[{status:o},s,l]=_N({initialEntered:t,mountOnEnter:!e,unmountOnExit:r,timeout:i,enter:ll(n,"open"),exit:ll(n,"close")});return[{state:oN[o],endTransition:l},s]},kN=t=>{const[e,r]=SN(t),[n,i]=L.useState(),o=(s,l)=>{i({position:s,alwaysUpdate:l}),r(!0)};return[{menuItemFocus:n,...e},r,o]},NN=(t,e)=>{const[r]=L.useState({});return{onMouseDown:()=>{r.v=t&&t!=="closed"},onClick:n=>r.v?r.v=!1:e(!0,n)}},PN=(t,e)=>{const r=L.useRef(e);L.useEffect(()=>{r.current!==e&&hr(t,{open:e}),r.current=e},[t,e])},CN=L.forwardRef(function({"aria-label":e,captureFocus:r,initialOpen:n,menuButton:i,instanceRef:o,onMenuChange:s,...l},a){const[u,c,d]=kN(l),{state:m}=u,g=V1(m),v=L.useRef(null),E=NN(m,(B,D)=>d(D.detail?void 0:Ms.FIRST)),N=L.useCallback(B=>{c(!1),B.key&&v.current.focus()},[c]),x=B=>{switch(B.key){case $r.UP:d(Ms.LAST);break;case $r.DOWN:d(Ms.FIRST);break;default:return}B.preventDefault()},w=hr(i,{open:g});if(!w||!w.type)throw new Error("Menu requires a menuButton prop.");const b={ref:Uh(w.ref,v),...Qu({onKeyDown:x,...E},w.props)};Yk(w.type)==="MenuButton"&&(b.isOpen=g);const T=L.cloneElement(w,b);return PN(s,g),L.useImperativeHandle(o,()=>({openMenu:d,closeMenu:()=>c(!1)})),P.jsxs(L.Fragment,{children:[T,P.jsx(yN,{...l,...u,"aria-label":e||(typeof w.props.children=="string"?w.props.children:"Menu"),anchorRef:v,ref:a,onClose:N})]})}),MN=(t,e)=>{const r=L.memo(e),n=L.forwardRef((i,o)=>{const s=L.useRef(null);return P.jsx(r,{...i,itemRef:s,externalRef:o,isHovering:L.useContext(J1)===s.current})});return n.displayName=`WithHovering(${t})`,n},IN=(t,e,r)=>{_a(()=>{if(t)return;const n=e.current;return r(n,!0),()=>{r(n)}},[t,e,r])},RN=(t,e,r,n)=>{const{submenuCloseDelay:i}=L.useContext(Dh),{isParentOpen:o,submenuCtx:s,dispatch:l,updateItems:a}=L.useContext(Y1),u=()=>{!r&&!n&&l(Et.SET,t.current)},c=()=>{!n&&l(Et.UNSET,t.current)},d=v=>{r&&!v.currentTarget.contains(v.relatedTarget)&&c()},m=v=>{n||(v.stopPropagation(),s.on(i,u,u))},g=(v,E)=>{s.off(),!E&&c()};return IN(n,t,a),L.useEffect(()=>{r&&o&&e.current&&e.current.focus()},[e,r,o]),{setHover:u,onBlur:d,onPointerMove:m,onPointerLeave:g}},Qi=MN("MenuItem",function({className:e,value:r,href:n,type:i,checked:o,disabled:s,children:l,onClick:a,isHovering:u,itemRef:c,externalRef:d,...m}){const g=!!s,{setHover:v,...E}=RN(c,c,u,g),N=L.useContext(X1),x=L.useContext(iN),w=i==="radio",b=i==="checkbox",T=!!n&&!g&&!w&&!b,B=w?x.value===r:b?!!o:!1,D=X=>{if(g){X.stopPropagation(),X.preventDefault();return}const ie={value:r,syntheticEvent:X};X.key!==void 0&&(ie.key=X.key),b&&(ie.checked=!B),w&&(ie.name=x.name),hr(a,ie),w&&hr(x.onRadioChange,ie),N.handleClick(ie,b||w)},$=X=>{if(u)switch(X.key){case $r.ENTER:X.preventDefault();case $r.SPACE:T?c.current.click():D(X)}},H=L.useMemo(()=>({type:i,disabled:g,hover:u,checked:B,anchor:T}),[i,g,u,B,T]),Y=Qu({...E,onPointerDown:v,onKeyDown:$,onClick:D},m),Q={role:w?"menuitemradio":b?"menuitemcheckbox":Z1,"aria-checked":w||b?B:void 0,...Q1(g,u),...Y,ref:Uh(d,c),className:al({block:Aa,element:nN,modifiers:H,className:e}),children:L.useMemo(()=>hr(l,H),[l,H])};return T?P.jsx("li",{role:sN,children:P.jsx("a",{href:n,...Q})}):P.jsx("li",{...Q})});function Mm({...t}){return P.jsx(CN,{...t,className:"dropdown "+t.className,menuButton:P.jsx(lN,{className:"small",children:P.jsx(Lk,{style:{marginBottom:"-0.125em"}})}),children:t.children})}function TN({app:t}){var s,l,a,u,c;const{uninstallApp:e,setMirroring:r,setAutoUpdate:n}=Jo(),i=vl();return!t.state?t.metadata?P.jsxs(Mm,{children:[((s=t.metadata)==null?void 0:s.description)&&P.jsx(Qi,{className:"action-entry",onClick:()=>i(`/app-details/${Ee(t)}`),children:"View Details"}),((l=t.metadata)==null?void 0:l.external_url)&&P.jsx(Qi,{children:P.jsx("a",{style:{color:"inherit",whiteSpace:"nowrap",cursor:"pointer",marginTop:"0.25em"},target:"_blank",href:(a=t.metadata)==null?void 0:a.external_url,children:"View Site"})})]}):P.jsx("div",{style:{width:38}}):P.jsxs(Mm,{children:[P.jsx(Qi,{className:"action-entry",onClick:()=>i(`/app-details/${Ee(t)}`),children:"View Details"}),t.installed&&P.jsxs(P.Fragment,{children:[P.jsx(Qi,{className:"action-entry",onClick:()=>e(t),children:"Uninstall"}),P.jsxs(Qi,{className:"action-entry",onClick:()=>{var d;return r(t,!((d=t.state)!=null&&d.mirroring))},children:[(u=t.state)!=null&&u.mirroring?"Stop":"Start"," Mirroring"]}),P.jsxs(Qi,{className:"action-entry",onClick:()=>{var d;return n(t,!((d=t.state)!=null&&d.auto_update))},children:[(c=t.state)!=null&&c.auto_update?"Disable":"Enable"," Auto Update"]})]})]})}function ys({app:t,...e}){var r;return L.createElement("div",{...e,key:Ee(t),className:"app-entry row between"},P.jsx(W1,{app:t,size:"small"}),P.jsxs("div",{className:"app-actions row",children:[!((r=t.state)!=null&&r.caps_approved)&&P.jsx(G1,{app:t,style:{marginRight:"1em"}}),P.jsx(TN,{app:t})]}))}const Sd="/my-apps";function Ju({value:t="",onChange:e=()=>null,onBack:r,hideSearch:n=!1}){const i=vl(),o=Ru(),s=qr.useRef(null),l=o.key!=="default",a=o.pathname===Sd;return P.jsxs("div",{className:"search-header row between",children:[o.pathname!=="/"?P.jsx("button",{className:"back-btn col center",onClick:()=>{r?r():i(l?-1:"/")},children:P.jsx(Ik,{})}):P.jsx("button",{className:"back-btn col center",onClick:()=>i("/publish"),children:P.jsx($1,{})}),!n&&P.jsxs("div",{className:"searchbar row",children:[P.jsx(jk,{className:"search-icon",onClick:()=>{var u;return(u=s.current)==null?void 0:u.focus()}}),P.jsx("input",{ref:s,onChange:u=>e(u.target.value),value:t,placeholder:"Search for apps..."}),t.length>0&&P.jsx(Dk,{className:"search-icon",style:{margin:"0 -0.25em 0 0.25em"},onClick:()=>e("")})]}),P.jsx("div",{className:"row",children:P.jsxs("button",{className:`my-pkg-btn row ${a?"selected":""}`,onClick:()=>i(a?-1:Sd),children:[P.jsx(Ok,{style:{marginRight:"0.5em"}}),"My Packages"]})})]})}function ON(t){const{listedApps:e,getListedApps:r}=Jo(),[n,i]=L.useState("Recently published"),[o,s]=L.useState(""),[l,a]=L.useState(e),[u,c]=L.useState(1),d=L.useMemo(()=>Array.from({length:Math.ceil(l.length/10)},(v,E)=>E+1),[l]);L.useEffect(()=>{const v=(u-1)*10,E=v+10;a(e.slice(v,E))},[e]),L.useEffect(()=>{r().then(v=>{a(Object.values(v))}).catch(v=>console.error(v))},[]);const m=L.useCallback(async v=>{},[]),g=L.useCallback(v=>{s(v);const E=e.filter(N=>{var x,w,b,T;return N.package.toLowerCase().includes(v.toLowerCase())||((w=(x=N.metadata)==null?void 0:x.description)==null?void 0:w.toLowerCase().includes(v.toLowerCase()))||((T=(b=N.metadata)==null?void 0:b.description)==null?void 0:T.toLowerCase().includes(v.toLowerCase()))},[e]);a(E)},[e]);return P.jsxs("div",{style:{width:"100%"},children:[P.jsx(Ju,{value:o,onChange:g}),P.jsxs("div",{className:"row between page-title",children:[P.jsx("h4",{children:"New"}),P.jsxs("select",{value:n,onChange:v=>{i(v.target.value),m(v.target.value)},children:[P.jsx("option",{children:"Recently published"}),P.jsx("option",{children:"Most popular"}),P.jsx("option",{children:"Best rating"}),P.jsx("option",{children:"Recently updated"})]})]}),P.jsxs("div",{className:"new card col",style:{flex:1,overflowY:"scroll",gap:"1em"},children:[l.map(v=>{var E;return P.jsx(ys,{app:v},Ee(v)+(((E=v.state)==null?void 0:E.our_version)||""))}),d.length>1&&P.jsxs("div",{className:"row",style:{alignSelf:"center"},children:[u!==d[0]&&P.jsx(Rk,{onClick:()=>c(u-1)}),d.map(v=>P.jsx("div",{className:`page-selector ${v===u?"selected":""}`,onClick:()=>c(v),children:v},`page-${v}`)),u!==d[d.length-1]&&P.jsx(Tk,{onClick:()=>c(u+1)})]})]})]})}function LN(t){const{myApps:e,getMyApps:r}=Jo(),n=vl(),[i,o]=L.useState(""),[s,l]=L.useState(e);L.useEffect(()=>{r().then(l).catch(u=>console.error(u))},[]);const a=L.useCallback(u=>{o(u);const c=Object.keys(e).reduce((d,m)=>(d[m]=e[m].filter(g=>{var v,E,N,x;return g.package.toLowerCase().includes(u.toLowerCase())||((E=(v=g.metadata)==null?void 0:v.description)==null?void 0:E.toLowerCase().includes(u.toLowerCase()))||((x=(N=g.metadata)==null?void 0:N.description)==null?void 0:x.toLowerCase().includes(u.toLowerCase()))}),d),{downloaded:[],installed:[],local:[],system:[]});l(c)},[e]);return L.useEffect(()=>{i?a(i):l(e)},[e]),P.jsxs("div",{style:{width:"100%",height:"100%"},children:[P.jsx(Ju,{value:i,onChange:a}),P.jsxs("div",{className:"row between page-title",children:[P.jsx("h4",{style:{marginBottom:"0.5em"},children:"My Packages"}),P.jsxs("button",{className:"row",onClick:()=>n("/publish"),children:[P.jsx($1,{style:{marginRight:"0.5em"}}),"Publish Package"]})]}),P.jsx("div",{className:"my-apps-list",children:P.jsxs("div",{className:"new card col",style:{gap:"1em"},children:[P.jsx("h4",{children:"Downloaded"}),(s.downloaded||[]).map(u=>P.jsx(ys,{app:u},Ee(u))),P.jsx("h4",{children:"Installed"}),(s.installed||[]).map(u=>P.jsx(ys,{app:u},Ee(u))),P.jsx("h4",{children:"Local"}),(s.local||[]).map(u=>P.jsx(ys,{app:u},Ee(u))),P.jsx("h4",{children:"System"}),(s.system||[]).map(u=>P.jsx(ys,{app:u},Ee(u)))]})})]})}function BN(t){var m,g,v,E,N,x,w,b;const{myApps:e,listedApps:r,getListedApp:n}=Jo(),i=vl(),o=aE(),[s,l]=L.useState(void 0);L.useEffect(()=>{const T=e.local.find(B=>Ee(B)===o.id);if(T)return l(T);if(o.id){const B=r.find(D=>Ee(D)===o.id);B?l(B):n(o.id).then(D=>l(D)).catch(console.error)}},[o.id]);const a=L.useCallback(()=>{i("/publish",{state:{app:s}})},[s,i]),u=L.useMemo(()=>{var T,B;return((B=(T=s==null?void 0:s.metadata)==null?void 0:T.properties)==null?void 0:B.current_version)||"Unknown"},[s]),c=Object.entries(((g=(m=s==null?void 0:s.metadata)==null?void 0:m.properties)==null?void 0:g.code_hashes)||{}),d=((v=s==null?void 0:s.state)==null?void 0:v.our_version)||(c[(c.length||1)-1]||["",""])[1];return P.jsxs("div",{style:{width:"100%"},children:[P.jsx(Ju,{value:"",onChange:()=>null,hideSearch:!0}),P.jsx("div",{className:"card",style:{marginTop:"1em"},children:s?P.jsxs(P.Fragment,{children:[P.jsxs("div",{className:"row between",children:[P.jsx(W1,{app:s,size:"large"}),P.jsx(G1,{app:s,style:{marginRight:"0.5em"}})]}),P.jsxs("div",{className:"col",style:{marginTop:"1em"},children:[P.jsxs("div",{className:"app-details row",children:[P.jsx("div",{className:"title",children:"Description"}),P.jsx("div",{className:"value",children:(((E=s.metadata)==null?void 0:E.description)||"No description given").slice(0,2e3)})]}),P.jsxs("div",{className:"app-details row",children:[P.jsx("div",{className:"title",children:"Publisher"}),P.jsx("div",{className:"value underline",children:s.publisher})]}),P.jsxs("div",{className:"app-details row",children:[P.jsx("div",{className:"title",children:"Version"}),P.jsx("div",{className:"value",children:u})]}),P.jsxs("div",{className:"app-details row",children:[P.jsx("div",{className:"title",children:"Mirrors"}),P.jsx("div",{className:"col",children:(((x=(N=s.metadata)==null?void 0:N.properties)==null?void 0:x.mirrors)||[]).map((T,B)=>P.jsx("div",{className:"value underline",children:T},B+T))})]}),P.jsxs("div",{className:"app-details row",children:[P.jsx("div",{className:"title",children:"Hash"}),P.jsx("div",{className:"value",style:{wordBreak:"break-all"},children:d})]})]}),P.jsx("div",{className:"app-screenshots row",children:(((b=(w=s.metadata)==null?void 0:w.properties)==null?void 0:b.screenshots)||[]).map((T,B)=>P.jsx("img",{src:T},B+T))}),s.installed&&P.jsx("button",{type:"button",onClick:a,children:"Publish"})]}):P.jsxs(P.Fragment,{children:[P.jsx("h4",{children:"App details not found for "}),P.jsx("h4",{children:o.id})]})})]})}var Sa=(t=>(t[t.SEPOLIA=11155111]="SEPOLIA",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",t[t.LOCAL=1337]="LOCAL",t))(Sa||{});const du="0xaa36a7",Im="0xa",Rm={11155111:"0x18c39eB547A0060C6034f8bEaFB947D1C16eADF1"},jN="4902",Tm={[du]:{chainId:du,chainName:"Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.sepolia.org"],blockExplorerUrls:["https://sepolia.etherscan.io"]},[Im]:{chainId:Im,chainName:"Optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.optimism.io"],blockExplorerUrls:["https://optimistic.etherscan.io"]}},DN=t=>{switch(t){case"1":case"0x1":return"Ethereum";case"10":case"a":case"0xa":return"Optimism";case"42161":return"Arbitrum";case"11155111":case"aa36a7":case"0xaa36a7":return"Sepolia";default:return"Unknown"}},Om=async t=>{var r,n,i;let e=await((r=window.ethereum)==null?void 0:r.request({method:"net_version"}).catch(()=>"1"));if(e="0x"+(typeof e=="string"?e.replace(/^0x/,""):e.toString(16)),!Tm[t]){console.error(`Invalid chain ID: ${t}`);return}if(t!==e)try{await((n=window.ethereum)==null?void 0:n.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]}))}catch(o){if(String(o).includes(jN))await((i=window.ethereum)==null?void 0:i.request({method:"wallet_addEthereumChain",params:[Tm[t]]}));else throw window.alert(`You must enable the ${DN(t)} network in your wallet.`),new Error(`User cancelled connection to ${t}`)}};var cl={},Yu={};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.Connector=void 0;class UN{constructor(e,r){this.actions=e,this.onError=r}resetState(){this.actions.resetState()}}Yu.Connector=UN;var cf,Lm;function FN(){if(Lm)return cf;Lm=1;function t({mustBeMetaMask:e=!1,silent:r=!1,timeout:n=3e3}={}){o();let i=!1;return new Promise(s=>{window.ethereum?l():(window.addEventListener("ethereum#initialized",l,{once:!0}),setTimeout(()=>{l()},n));function l(){if(i)return;i=!0,window.removeEventListener("ethereum#initialized",l);const{ethereum:a}=window;a&&(!e||a.isMetaMask)?s(a):(!r&&console.error("@metamask/detect-provider:",e&&a?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum."),s(null))}});function o(){if(typeof e!="boolean")throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if(typeof r!="boolean")throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if(typeof n!="number")throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}}return cf=t,cf}var zN=Fe&&Fe.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),$N=Fe&&Fe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HN=Fe&&Fe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&zN(e,t,r);return $N(e,t),e},Ji=Fe&&Fe.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(c){try{u(n.next(c))}catch(d){s(d)}}function a(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):i(c.value).then(l,a)}u((n=n.apply(t,e||[])).next())})};Object.defineProperty(cl,"__esModule",{value:!0});var rw=cl.MetaMask=cl.NoMetaMaskError=void 0;const qN=Yu;class fl extends Error{constructor(){super("MetaMask not installed"),this.name=fl.name,Object.setPrototypeOf(this,fl.prototype)}}cl.NoMetaMaskError=fl;function ea(t){return Number.parseInt(t,16)}class WN extends qN.Connector{constructor({actions:e,options:r,onError:n}){super(e,n),this.options=r}isomorphicInitialize(){return Ji(this,void 0,void 0,function*(){if(!this.eagerConnection)return this.eagerConnection=Promise.resolve().then(()=>HN(FN())).then(e=>Ji(this,void 0,void 0,function*(){var r,n;const i=yield e.default(this.options);i&&(this.provider=i,!((r=this.provider.providers)===null||r===void 0)&&r.length&&(this.provider=(n=this.provider.providers.find(o=>o.isMetaMask))!==null&&n!==void 0?n:this.provider.providers[0]),this.provider.on("connect",({chainId:o})=>{this.actions.update({chainId:ea(o)})}),this.provider.on("disconnect",o=>{var s;if(o.code===1013){console.debug('MetaMask logged connection error 1013: "Try again later"');return}this.actions.resetState(),(s=this.onError)===null||s===void 0||s.call(this,o)}),this.provider.on("chainChanged",o=>{this.actions.update({chainId:ea(o)})}),this.provider.on("accountsChanged",o=>{o.length===0?this.actions.resetState():this.actions.update({accounts:o})}))}))})}connectEagerly(){return Ji(this,void 0,void 0,function*(){const e=this.actions.startActivation();try{if(yield this.isomorphicInitialize(),!this.provider)return e();const r=yield this.provider.request({method:"eth_accounts"});if(!r.length)throw new Error("No accounts returned");const n=yield this.provider.request({method:"eth_chainId"});this.actions.update({chainId:ea(n),accounts:r})}catch(r){console.debug("Could not connect eagerly",r),this.actions.resetState()}})}activate(e){var r,n;return Ji(this,void 0,void 0,function*(){let i;return!((n=(r=this.provider)===null||r===void 0?void 0:r.isConnected)===null||n===void 0)&&n.call(r)||(i=this.actions.startActivation()),this.isomorphicInitialize().then(()=>Ji(this,void 0,void 0,function*(){if(!this.provider)throw new fl;const o=yield this.provider.request({method:"eth_requestAccounts"}),s=yield this.provider.request({method:"eth_chainId"}),l=ea(s),a=typeof e=="number"?e:e==null?void 0:e.chainId;if(!a||l===a)return this.actions.update({chainId:l,accounts:o});const u=`0x${a.toString(16)}`;return this.provider.request({method:"wallet_switchEthereumChain",params:[{chainId:u}]}).catch(c=>{var d,m;if((((m=(d=c.data)===null||d===void 0?void 0:d.originalError)===null||m===void 0?void 0:m.code)||c.code)===4902&&typeof e!="number"){if(!this.provider)throw new Error("No provider");return this.provider.request({method:"wallet_addEthereumChain",params:[Object.assign(Object.assign({},e),{chainId:u})]})}throw c}).then(()=>this.activate(a))})).catch(o=>{throw i==null||i(),o})})}watchAsset({address:e,symbol:r,decimals:n,image:i}){return Ji(this,void 0,void 0,function*(){if(!this.provider)throw new Error("No provider");return this.provider.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,symbol:r,decimals:n,image:i}}}).then(o=>{if(!o)throw new Error("Rejected");return!0})})}}rw=cl.MetaMask=WN;const[nw,Fh]=Wu.initializeConnector(t=>new rw({actions:t}));function GN(t){const e=t.split("."),r=new Uint8Array(t.length+e.length);let n=0;for(const i of e){const o=i.length;r[n]=o,n++;for(let s=0;si.toString(16).padStart(2,"0")).join("")}`}const Bm=/^\d+\.\d+\.\d+$/,VN=({app:t,packageName:e,publisherId:r,goBack:n})=>{var d,m,g,v,E,N,x,w;const[i,o]=L.useState({name:((d=t==null?void 0:t.metadata)==null?void 0:d.name)||"",description:((m=t==null?void 0:t.metadata)==null?void 0:m.description)||"",image:((g=t==null?void 0:t.metadata)==null?void 0:g.image)||"",external_url:((v=t==null?void 0:t.metadata)==null?void 0:v.external_url)||"",animation_url:((E=t==null?void 0:t.metadata)==null?void 0:E.animation_url)||"",package_name:e,current_version:"",publisher:r,mirrors:[r]}),[s,l]=L.useState(Object.entries(((x=(N=t==null?void 0:t.metadata)==null?void 0:N.properties)==null?void 0:x.code_hashes)||{}).concat([["",((w=t==null?void 0:t.state)==null?void 0:w.our_version)||""]])),a=(b,T)=>{o({...i,[b]:T})};L.useEffect(()=>{a("package_name",e)},[e]),L.useEffect(()=>{a("publisher",r)},[r]);const u=L.useCallback(()=>{const b=s.reduce((H,[Y,Q])=>(H[Y]=Q,H),{});if(Bm.test(i.current_version))if(b[i.current_version]){if(!Object.keys(b).reduce((H,Y)=>H&&Bm.test(Y),!0)){window.alert("Code hashes must be a JSON object with valid version keys");return}}else{window.alert(`Code hashes must include current version (${i.current_version})`);return}else{window.alert("Current version must be in the format x.y.z");return}const T=JSON.stringify({name:i.name,description:i.description,image:i.image,external_url:i.external_url,animation_url:i.animation_url,properties:{package_name:i.package_name,current_version:i.current_version,publisher:i.publisher,mirrors:i.mirrors,code_hashes:b}}),B=new Blob([T],{type:"application/json"}),D=URL.createObjectURL(B),$=document.createElement("a");$.href=D,$.download=i.package_name+"_"+i.publisher+"_metadata.json",$.click(),URL.revokeObjectURL(D)},[i,s]),c=()=>{o({name:"",description:"",image:"",external_url:"",animation_url:"",package_name:"",current_version:"",publisher:"",mirrors:[]}),l([])};return P.jsxs("form",{className:"col card metadata",style:{gap:"0.5em"},children:[P.jsx("h4",{children:"Fill out metadata"}),P.jsxs("div",{className:"col label",children:[P.jsx("label",{className:"metadata-label",children:"Name"}),P.jsx("input",{type:"text",placeholder:"Name",value:i.name,onChange:b=>a("name",b.target.value)})]}),P.jsxs("div",{className:"col label",children:[P.jsx("label",{className:"metadata-label",children:"Description"}),P.jsx("input",{type:"text",placeholder:"Description",value:i.description,onChange:b=>a("description",b.target.value)})]}),P.jsxs("div",{className:"col label",children:[P.jsx("label",{className:"metadata-label",children:"Image URL"}),P.jsx("input",{type:"text",placeholder:"Image URL",value:i.image,onChange:b=>a("image",b.target.value)})]}),P.jsxs("div",{className:"col label",children:[P.jsx("label",{className:"metadata-label",children:"External URL"}),P.jsx("input",{type:"text",placeholder:"External URL",value:i.external_url,onChange:b=>a("external_url",b.target.value)})]}),P.jsxs("div",{className:"col label",children:[P.jsx("label",{className:"metadata-label",children:"Animation URL"}),P.jsx("input",{type:"text",placeholder:"Animation URL",value:i.animation_url,onChange:b=>a("animation_url",b.target.value)})]}),P.jsxs("div",{className:"col label",children:[P.jsx("label",{className:"metadata-label",children:"Package Name"}),P.jsx("input",{type:"text",placeholder:"Package Name",value:i.package_name,onChange:b=>a("package_name",b.target.value)})]}),P.jsxs("div",{className:"col label",children:[P.jsx("label",{className:"metadata-label",children:"Current Version"}),P.jsx("input",{type:"text",placeholder:"Current Version",value:i.current_version,onChange:b=>a("current_version",b.target.value)})]}),P.jsxs("div",{className:"col label",children:[P.jsx("label",{className:"metadata-label",children:"Publisher"}),P.jsx("input",{type:"text",placeholder:"Publisher",value:i.publisher,onChange:b=>a("publisher",b.target.value)})]}),P.jsxs("div",{className:"col label",children:[P.jsx("label",{className:"metadata-label",children:"Mirrors (separated by commas)"}),P.jsx("input",{type:"text",placeholder:"Mirrors (separated by commas)",value:i.mirrors.join(","),onChange:b=>a("mirrors",b.target.value.split(",").map(T=>T.trim()))})]}),P.jsxs("div",{className:"col label",style:{gap:"0.5em"},children:[P.jsxs("div",{className:"row",style:{gap:"0.5em",marginTop:0,justifyContent:"space-between",width:"100%"},children:[P.jsx("h5",{style:{margin:0},children:"Code Hashes"}),P.jsx("button",{type:"button",onClick:()=>l([...s,["",""]]),className:"small",children:"Add code hash"})]}),s.map(([b,T],B,D)=>P.jsxs("div",{className:"row",style:{gap:"0.5em",marginTop:0,width:"100%"},children:[P.jsx("input",{type:"text",placeholder:"Version",value:b,onChange:$=>l(H=>{const Y=[...H];return Y[B][0]=$.target.value,Y}),style:{flex:1}}),P.jsx("input",{type:"text",placeholder:"Hash",value:T,onChange:$=>l(H=>{const Y=[...H];return Y[B][1]=$.target.value,Y}),style:{flex:5}}),D.length>1&&P.jsx("button",{type:"button",onClick:()=>l($=>$.filter((H,Y)=>Y!==B)),style:{fontSize:"2em",height:32,lineHeight:"1em",padding:"0 0.2em"},children:"×"})]},B+"_code_hash"))]}),P.jsxs("div",{className:"row",style:{gap:"0.5em",margin:"1em 0"},children:[P.jsx("button",{type:"button",onClick:u,children:"Download JSON"}),P.jsx("button",{type:"button",onClick:c,children:"Clear Form"}),P.jsx("button",{type:"button",onClick:n,children:"Done"})]})]})};function KN({readOnly:t=!1,checked:e,setChecked:r}){return P.jsxs("div",{style:{position:"relative"},children:[P.jsx("input",{type:"checkbox",id:"checked",name:"checked",checked:e,onChange:n=>r&&r(n.target.checked),autoFocus:!0,readOnly:t}),e&&P.jsx("span",{onClick:()=>r&&r(!1),className:"checkmark",children:"✓"})]})}const{useIsActivating:QN}=Fh;function JN({provider:t,packageAbi:e}){var X;const{state:r}=Ru(),{listedApps:n}=Jo(),{account:i,isActive:o}=Wu.useWeb3React(),s=QN(),[l,a]=L.useState(""),[u,c]=L.useState(),[d,m]=L.useState(!1),[g,v]=L.useState(""),[E,N]=L.useState(((X=window.our)==null?void 0:X.node)||""),[x,w]=L.useState(""),[b,T]=L.useState(""),[B,D]=L.useState(!1);L.useEffect(()=>{const ie=r==null?void 0:r.app;ie&&(v(ie.package),N(ie.publisher),D(!0))},[r]);const $=L.useCallback(async()=>{await nw.activate().catch(()=>{});try{Om(du)}catch(ie){console.error(ie)}},[]),H=L.useCallback(async()=>{if(!x){T("");return}try{const M=await(await fetch(x)).text();JSON.parse(M);const f=ut(mr(M));T(f)}catch{window.alert("Error calculating metadata hash. Please ensure the URL is valid and the metadata is in JSON format.")}},[x]),Y=L.useCallback(async ie=>{var f;ie.preventDefault(),ie.stopPropagation();let M=b;try{if(!M){const S=await fetch(x);await S.json();const _=await S.text();M=ut(mr(_))}a("Please confirm the transaction in your wallet");const p=GN(E);await Om(du);const A=await(B?e.updateMetadata(G.from(gS(["string","bytes"],[g,p])),x,M):e.registerApp(g,p,x,M));await new Promise(S=>setTimeout(S,2e3)),a("Publishing package..."),await A.wait(),c({packageName:g,publisherId:E}),v(""),N(((f=window.our)==null?void 0:f.node)||E),w(""),T(""),D(!1)}catch(p){console.error(p),window.alert("Error publishing package. Please ensure the package name and publisher ID are valid, and the metadata is in JSON format.")}finally{a("")}},[g,B,E,x,b,e,c,v,N,w,T,D]),Q=L.useCallback(async()=>{B||g&&E&&n.find(ie=>ie.package===g&&ie.publisher===E)&&D(!0)},[n,g,E,B,D]);return P.jsxs("div",{style:{width:"100%"},children:[P.jsx(Ju,{hideSearch:!0,onBack:d?()=>m(!1):void 0}),P.jsxs("div",{className:"row between page-title",children:[P.jsx("h4",{children:"Publish Package"}),!!i&&P.jsxs("div",{style:{textAlign:"right",lineHeight:1.5},children:[" ","Connected as"," ",(i==null?void 0:i.slice(0,6))+"..."+(i==null?void 0:i.slice(i.length-6))]})]}),l?P.jsx("div",{className:"col center",children:P.jsx(Ed,{msg:l})}):u?P.jsxs("div",{className:"col center",children:[P.jsx("h4",{style:{marginBottom:"0.5em"},children:"Package Published!"}),P.jsxs("div",{style:{marginBottom:"0.5em"},children:[P.jsx("strong",{children:"Package Name:"})," ",u.packageName]}),P.jsxs("div",{style:{marginBottom:"0.5em"},children:[P.jsx("strong",{children:"Publisher ID:"})," ",u.publisherId]}),P.jsx("button",{className:"my-pkg-btn row",style:{marginTop:"1em"},onClick:()=>c(void 0),children:"Publish Another Package"})]}):d?P.jsx(VN,{packageName:g,publisherId:E,app:r==null?void 0:r.app,goBack:()=>m(!1)}):!i||!o?P.jsxs(P.Fragment,{children:[P.jsx("h4",{style:{},children:"Please connect your wallet to publish a package"}),P.jsx("button",{className:"connect-wallet row",onClick:$,children:"Connect Wallet"})]}):s?P.jsx(Ed,{msg:"Approve connection in your wallet"}):P.jsxs("form",{className:"new card col",style:{flex:1,overflowY:"scroll"},onSubmit:Y,children:[P.jsxs("div",{className:"row between",style:{cursor:"pointer",padding:"0.5em",margin:"0 0 0 -0.5em"},onClick:()=>D(!B),children:[P.jsx(KN,{checked:B,readOnly:!0}),P.jsx("label",{htmlFor:"update",style:{cursor:"pointer",marginLeft:8},children:"Update existing package"})]}),P.jsxs("div",{className:"col f-width",children:[P.jsx("label",{htmlFor:"package-name",children:"Package Name"}),P.jsx("input",{style:{minWidth:"80%"},id:"package-name",type:"text",required:!0,placeholder:"my-package",value:g,onChange:ie=>v(ie.target.value),onBlur:Q})]}),P.jsxs("div",{className:"col f-width",children:[P.jsx("label",{htmlFor:"publisher-id",children:"Publisher ID"}),P.jsx("input",{style:{minWidth:"80%"},id:"publisher-id",type:"text",required:!0,value:E,onChange:ie=>N(ie.target.value),onBlur:Q})]}),P.jsxs("div",{className:"col f-width",children:[P.jsx("label",{htmlFor:"metadata-url",children:"Metadata URL"}),P.jsx("input",{style:{minWidth:"80%"},id:"metadata-url",type:"text",required:!0,value:x,onChange:ie=>w(ie.target.value),onBlur:H,placeholder:"https://github/my-org/my-repo/metadata.json"}),P.jsxs("div",{style:{textAlign:"left",margin:"0.5em 0 0"},children:["Metadata is a JSON file that describes your package.",P.jsx("br",{})," You can"," ",P.jsx("a",{onClick:()=>m(!0),style:{cursor:"pointer",textDecoration:"underline"},children:"fill out a template here"}),"."]})]}),P.jsxs("div",{className:"col f-width",children:[P.jsx("label",{htmlFor:"metadata-hash",children:"Metadata Hash"}),P.jsx("input",{style:{minWidth:"80%"},readOnly:!0,id:"metadata-hash",type:"text",value:b,onChange:ie=>T(ie.target.value),placeholder:"Calculated automatically from metadata URL"})]}),P.jsx("button",{type:"submit",className:"primary",children:"Publish"})]})]})}var YN={VITE_SEPOLIA_RPC_URL:"https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",VITE_OPTIMISM_RPC_URL:"https://mainnet.optimism.io/",BASE_URL:"/main:app_store:sys",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const XN=[[nw,Fh]],{useProvider:ZN}=Fh,e4="https://eth-sepolia.g.alchemy.com/v2/IyK9MyYxeSXOxLbdpI44d_Ayw58WH2M7",Is="/main:app_store:sys";window.our&&(window.our.process=Is==null?void 0:Is.replace("/",""));const t4=`${YN.VITE_NODE_URL||"http://localhost:8080"}${Is}`;function r4(){const t=ZN(),[e,r]=L.useState(!0),[n,i]=L.useState(xd.connect(Rm[Sa.SEPOLIA],new vi(e4)));if(L.useEffect(()=>{t==null||t.getNetwork().then(s=>{s.chainId===Sa.SEPOLIA&&i(xd.connect(Rm[Sa.SEPOLIA],t.getSigner()))})},[t]),L.useEffect(()=>{},[]),!e)return P.jsxs("div",{className:"node-not-connected",children:[P.jsx("h2",{style:{color:"red"},children:"Node not connected"}),P.jsxs("h4",{children:["You need to start a node at ",t4," before you can use this UI in development."]})]});const o={provider:t,packageAbi:n};return P.jsx(Wu.Web3ReactProvider,{connectors:XN,children:P.jsx(SE,{basename:Is,children:P.jsxs(AE,{children:[P.jsx(ms,{path:"/",element:P.jsx(ON,{...o})}),P.jsx(ms,{path:Sd,element:P.jsx(LN,{...o})}),P.jsx(ms,{path:"/app-details/:id",element:P.jsx(BN,{...o})}),P.jsx(ms,{path:"/publish",element:P.jsx(JN,{...o})})]})})})}ff.createRoot(document.getElementById("root")).render(P.jsx(qr.StrictMode,{children:P.jsx(r4,{})})); diff --git a/kinode/packages/app_store/pkg/ui/assets/index-SoWN8KT-.css b/kinode/packages/app_store/pkg/ui/assets/index-SoWN8KT-.css deleted file mode 100644 index 13459ccc7..000000000 --- a/kinode/packages/app_store/pkg/ui/assets/index-SoWN8KT-.css +++ /dev/null @@ -1 +0,0 @@ -#root{max-width:700px;margin:0 auto;padding:2rem;text-align:center;width:75%;max-height:calc(100vh - 64px);min-height:calc(100vh - 64px)}.row{display:flex;flex-direction:row;align-items:center}.row.center{justify-content:center}.row.between{justify-content:space-between}.row.around{justify-content:space-around}.col{display:flex;flex-direction:column;align-items:flex-start}.col.center{align-items:center}.card{background-color:var(--bg-gray-light);border-radius:.75em;border:1px solid var(--bg-gray-medium);padding:1em}button.unstyled{background-color:transparent;border:none;cursor:pointer;padding:.25em;height:auto}button.unstyled:hover{background-color:transparent}.searchbar{background-color:#000;border:.125em solid black;height:2.25em;padding:0 1em;border-radius:40px;flex:1}.searchbar>input{border:none;height:1.5em;margin-left:.5em;background-color:#000;flex:1}.my-pkg-btn{margin-left:1em}.my-pkg-btn.selected{background-color:var(--bg-gray-medium)}button.action-btn{color:var(--btn-blue)}button.action-btn:hover{transform:scale(1.05)}.app-header{cursor:pointer;width:calc(100% - 9em);justify-content:flex-start}.app-header:hover{text-decoration:underline}.app-header.small>img{height:3em;margin-right:.5em;border-radius:.375em}.app-header>img{height:3em;margin-right:.5em;border-radius:.375em}.app-header.large>img{height:5em;margin-right:1em;border-radius:.5em}.app-header.large .app-name{font-size:1.5em}.app-entry{margin-bottom:.5em;padding:.125em;width:100%}.app-actions{margin-right:.5em}.dropdown{cursor:pointer;position:relative}.dropdown>ul{background-color:var(--bg-gray-solid);padding:.5em 1em;border-radius:.5em;align-items:flex-start;text-align:left}.dropdown .dropdown-header{align-self:flex-end}.dropdown .dropdown-list{position:absolute;top:1em;right:-.5em}.page-selector{margin:.25em .5em}.page-selector.selected{font-weight:900}.back-btn{margin-right:1em;justify-content:center;width:2.5em}.app-details{margin-top:.5em;align-items:flex-start}.app-details .title{width:8em;text-align:left}.app-details .value{margin-bottom:.5em;text-align:left;max-width:calc(100% - 8em)}.app-details .value.underline{text-decoration:underline}.app-details .value.permission{background-color:var(--bg-gray-medium);border-radius:2em;padding:.25em .5em;margin-bottom:.5em}.app-screenshots{margin-top:.5em;overflow-x:scroll;max-width:100%}.app-screenshots>img{margin-right:1em;max-height:10em;max-width:100%;border-radius:.5em;border:1px solid var(--bg-gray-medium)}.search-icon{cursor:pointer;color:var(--bg-gray-solid);font-size:1.25em}.f-width{width:100%}#loading h3{text-align:center}#loader{display:inline-block;position:relative;width:48px;height:48px;margin-top:16px}#loader div{box-sizing:border-box;display:block;position:absolute;width:36px;height:36px;margin:6px;border:6px solid #fff;border-radius:50%;animation:loader 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}#loader div:nth-child(1){animation-delay:-.45s}#loader div:nth-child(2){animation-delay:-.3s}#loader div:nth-child(3){animation-delay:-.15s}@keyframes loader{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.action-entry{margin-bottom:.25em;color:inherit;white-space:nowrap;cursor:pointer;padding:.25em}.action-entry:hover{transform:scale(1.05);font-weight:700}.action-entry:first-child{margin-top:.25em}.my-apps-list{flex:1;height:100%;overflow-y:scroll;max-height:calc(100vh - 10em);border-radius:.5em}@media (prefers-color-scheme: light){.searchbar{background-color:#fff;border-color:var(--bg-gray-medium)}.searchbar>input{background-color:#fff}#loader div{border-color:#000 transparent transparent transparent}}@media (prefers-color-scheme: dark){.app-details .value{color:#fff}}.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.title{width:calc(100% - 4em)}.title>div{max-width:100%}.modal-backdrop{background-color:#0003;position:fixed;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:3;min-height:10em;min-width:20em}.modal-backdrop .close{position:absolute;top:.5em;right:.5em;font-size:18px;font-weight:200;cursor:pointer;transform:rotate(45deg)}.modal{position:relative;background-color:#fff;color:#000;border-radius:8px;padding:24px;line-height:24px;max-width:500px;min-width:300px}.modal .modal-content select{color:#000}.modal .modal-content button{background-color:var(--btn-blue)}.modal .modal-title{margin-top:0;margin-bottom:.5em}.modal .modal-content{align-items:center;width:100%;gap:1em}form.new{gap:1em}form.metadata{gap:.5em;align-items:center}form.metadata input{width:100%}form.metadata .row{margin-top:1em}form.metadata .col.label{width:80%}:root{font-family:Montserrat,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:var(--text-light);background-color:var(--bg-black);font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--k-red: #a30101;--k-darkred: #4d0c0c;--k-lightred: #dd0207;--k-petal: #e94f33;--k-lightpetal: #f0907f;--k-yellow: #e6b95e;--k-beige: #e5c4a1;--k-green: #0f6f4c;--k-darkgreen: #29322f;--k-lightgreen: #a0a271;--k-mediumgreen: #424031;--k-black: #281b13;--bg-black: #191919;--bg-gray-light: rgba(200, 200, 200, .2);--bg-gray-medium: rgba(127, 127, 127, .5);--bg-gray-solid: rgba(127, 127, 127, 1);--full-black: rgba(0, 0, 0, 1);--text-light: rgba(255,255,255,.7);--btn-blue: #4E9EFD;--medium-gray: rgb(101,101,101)}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}h1{font-size:3.2em;line-height:1.1}h2,h3,h4,h5,h6{text-align:left}ul{list-style:none;padding:0;margin:0}button{border-radius:2em;border:1px solid transparent;padding:.5em 1em;background-color:var(--bg-gray-light);color:var(--text-light);font-size:1em;font-weight:500;font-family:inherit;cursor:pointer;transition:background-color .25s;height:2.5em}button:hover{background-color:var(--bg-gray-medium)}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}input{padding:.25em .5em;font-size:1rem}input:focus-visible{outline:var(--text-light) auto 1px}select{padding:.25em .5em;font-size:.9rem;border:none;background-color:transparent}@media (prefers-color-scheme: light){:root{color:var(--bg-black);background-color:#fff}a:hover{color:#747bff}button{color:var(--bg-black);background-color:var(--bg-gray-medium)}button:hover{background-color:var(--bg-gray-light)}input:focus-visible{outline:-webkit-focus-ring-color auto 1px}select{border:1px solid var(--bg-gray-solid);border-radius:.25em}input:focus-visible{outline:var(--text-dark) auto 1px}} diff --git a/kinode/packages/app_store/pkg/ui/assets/index-jnOcECnM.css b/kinode/packages/app_store/pkg/ui/assets/index-jnOcECnM.css new file mode 100644 index 000000000..c9edae766 --- /dev/null +++ b/kinode/packages/app_store/pkg/ui/assets/index-jnOcECnM.css @@ -0,0 +1 @@ +#root{max-width:700px;margin:0 auto;padding:2rem;text-align:center;width:75%;max-height:calc(100vh - 64px);min-height:calc(100vh - 64px)}.row.center{justify-content:center}.row.between{justify-content:space-between}.row.around{justify-content:space-around}.col{display:flex;flex-direction:column;align-items:flex-start}.col.center{align-items:center}.card{background-color:var(--input-background);border-radius:.75em;border:1px solid var(--orange-medium);padding:1em}button.action-btn{min-width:100px}button.small{padding:.25em .5em;height:auto}.searchbar{height:2.25em;padding:.5em 1em;border-radius:16px;flex:1;background-color:var(--input-background);text-align:left}.searchbar>input{border:none;height:1.5em;margin-left:.5em;flex:1}button.connect-wallet{margin:1em auto 0}.my-pkg-btn{margin-left:1em}.my-pkg-btn.selected{background-color:var(--bg-gray-medium)}.app-header{cursor:pointer;width:calc(100% - 9em);justify-content:flex-start}.app-header:hover{text-decoration:underline}.app-header.large:hover{text-decoration:none;cursor:default}.app-header.small>img{height:3em;margin-right:1em;border-radius:.375em}.app-header>img{height:3em;margin-right:1em;border-radius:.375em}.app-header.large>img{height:5em;margin-right:1em;border-radius:.5em}.app-header.large .app-name{font-size:1.5em}.app-entry{padding:.125em;width:100%}.app-actions{margin-right:.5em}.dropdown{cursor:pointer;position:relative}.dropdown>ul{background-color:var(--orange-medium);padding:.5em 1em;border-radius:.5em;align-items:flex-start;text-align:left;border:1px solid var(--orange-medium)}.dropdown .dropdown-header{align-self:flex-end}.dropdown .dropdown-list{position:absolute;top:1em;right:-.5em}.page-selector{margin:.25em .5em}.page-selector.selected{font-weight:900}.back-btn{margin-right:1em;justify-content:center;width:2.5em}.app-details{margin-top:.5em;align-items:flex-start}.app-details .title{width:8em;text-align:left}.app-details .value{margin-bottom:.5em;text-align:left;max-width:calc(100% - 8em)}.app-details .value.underline{text-decoration:underline}.app-details .value.permission{background-color:var(--bg-gray-medium);border-radius:2em;padding:.25em .5em;margin-bottom:.5em}.app-screenshots{margin-top:.5em;overflow-x:scroll;max-width:100%}.app-screenshots>img{margin-right:1em;max-height:10em;max-width:100%;border-radius:.5em;border:1px solid var(--bg-gray-medium)}.search-icon{cursor:pointer;color:var(--bg-gray-solid);font-size:1.25em}.f-width{width:100%}#loading h3{text-align:center}#loader{display:inline-block;position:relative;width:48px;height:48px;margin-top:16px}#loader div{box-sizing:border-box;display:block;position:absolute;width:36px;height:36px;margin:6px;border:6px solid #fff;border-radius:50%;animation:loader 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}#loader div:nth-child(1){animation-delay:-.45s}#loader div:nth-child(2){animation-delay:-.3s}#loader div:nth-child(3){animation-delay:-.15s}@keyframes loader{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.action-entry{margin-bottom:.25em;color:inherit;white-space:nowrap;cursor:pointer;padding:.25em}.action-entry:hover{transform:scale(1.05)}.action-entry:first-child{margin-top:.25em}.my-apps-list{flex:1;height:100%;overflow-y:scroll;max-height:calc(100vh - 10em);border-radius:.5em}.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.title{width:calc(100% - 4em)}.title>div{max-width:100%}.modal-backdrop{background-color:#0000004d;position:fixed;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:3;min-height:10em;min-width:20em}.modal-backdrop .close{position:absolute;top:.5em;right:.5em;font-size:18px;font-weight:200;cursor:pointer;transform:rotate(45deg)}.modal{position:relative;background-color:var(--dark-background);color:#000;border-radius:8px;padding:24px;line-height:24px;max-width:500px;min-width:300px;color:var(--text-light)}.modal .modal-title{margin-top:0;margin-bottom:.5em}.modal .modal-content{align-items:center;width:100%;gap:1em}form.new{gap:1em}form.metadata{gap:.5em;align-items:center}form.metadata input{width:100%}form.metadata .row{margin-top:1em}form.metadata .col.label{width:80%}.page-title{align-items:center;margin:1em 0}@tailwind base;@tailwind components;@tailwind utilities;:root{--text-light: #FFF5D9;--text-dark: #22211F;--text-orange: #FF7533;--orange-light: #F36822;--orange-medium: #F35422;--orange-burnt: #E25F35;--medium-gray: #7E7E7E;--gray-button: rgba(253, 245, 220, .25);--dark-background: rgb(130, 59, 28);--input-background: rgba(243, 84, 34, .25)}body{margin:0;padding:2em;font-size:16px;color:var(--text-light);font-weight:400;background:url(/main:app_store:sys/assets/background-a451R5-M.jpg) no-repeat center center fixed;background-size:cover;background-color:var(--dark-background);height:100vh;width:100vw;overflow-y:scroll}body,h1,h2,h3,h4,h5,h6,p,a,button,input{font-family:Barlow Condensed,sans-serif}h1,h2,h3,h4,h5,h6{line-height:1.5em;font-weight:500;margin:0}h1{font-size:64px}h2{font-size:48px}h3{font-size:36px}h4{font-size:24px}h5{font-size:20px}h6{font-size:16px}.col{display:flex;flex-direction:column}.row{display:flex;flex-direction:row;align-items:center}input,button{all:unset}input[type=text],input[type=password],input[type=checkbox]{padding:1em;border:1px solid var(--orange-medium);border-radius:8px;box-sizing:border-box;font-size:1em;background-color:var(--input-background);color:var(--text-light);text-align:left}input[type=text],input[type=password]{width:100%}input[type=checkbox]{padding:.25em .8em;cursor:pointer}input[type=checkbox]:checked{background-color:var(--orange-medium)}.checkmark{position:absolute;left:4px;font-size:24px;top:-5px;cursor:pointer}::placeholder{color:var(--text-light)}::-webkit-input-placeholder::placeholder{color:var(--text-light)}::-moz-placeholder::placeholder{color:var(--text-light)}::-ms-input-placeholder{color:var(--text-light)}label{font-size:20px}button,[type=button],[type=reset],[type=submit]{padding:.75em 1em;margin:0;font-weight:500;border-width:1px;border-style:solid;border-color:var(--orange-medium);border-radius:8px;background:var(--orange-medium);box-sizing:border-box;cursor:pointer;font-size:1.125em;transition:all .1s;box-shadow:0 1px 2px var(--orange-light);color:var(--text-light)}button.alt{background-color:var(--text-light);color:var(--text-dark);border-color:var(--text-light);box-shadow:0 1px 2px var(--text-light)}button:hover{opacity:.9;box-shadow:none}button:disabled{background-color:var(--medium-gray);border:1px solid var(--medium-gray);box-shadow:0 1px 2px var(--medium-gray);opacity:.7;cursor:not-allowed}ul,li{all:unset}select{padding:.25em 2em .25em .5em;font-size:.9rem;border:1px solid var(--orange-medium);background-color:var(--input-background);color:var(--text-light);border-radius:8px;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FFF5D9'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20d='M6%209l6%206%206-6'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right 8px center;background-size:16px;-webkit-appearance:none;-moz-appearance:none;appearance:none} diff --git a/kinode/packages/app_store/pkg/ui/index.html b/kinode/packages/app_store/pkg/ui/index.html index 421609d98..ae554635b 100644 --- a/kinode/packages/app_store/pkg/ui/index.html +++ b/kinode/packages/app_store/pkg/ui/index.html @@ -1,27 +1,26 @@ - - - - Package Store - - - - - - - - - - - -
- - + + + + + Package Store + + + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/kinode/packages/chess/pkg/ui/assets/index-067d0bfd.js b/kinode/packages/chess/pkg/ui/assets/index-237df385.js similarity index 95% rename from kinode/packages/chess/pkg/ui/assets/index-067d0bfd.js rename to kinode/packages/chess/pkg/ui/assets/index-237df385.js index 6fefc92b0..8c1e1fa5d 100644 --- a/kinode/packages/chess/pkg/ui/assets/index-067d0bfd.js +++ b/kinode/packages/chess/pkg/ui/assets/index-237df385.js @@ -1,4 +1,4 @@ -var mh=Object.defineProperty;var vh=(e,t,n)=>t in e?mh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var be=(e,t,n)=>(vh(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function uc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ac={exports:{}},so={},cc={exports:{}},z={};/** +var mh=Object.defineProperty;var vh=(e,t,n)=>t in e?mh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ze=(e,t,n)=>(vh(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function uc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ac={exports:{}},so={},cc={exports:{}},b={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var mh=Object.defineProperty;var vh=(e,t,n)=>t in e?mh(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Wr=Symbol.for("react.element"),yh=Symbol.for("react.portal"),Sh=Symbol.for("react.fragment"),wh=Symbol.for("react.strict_mode"),Ch=Symbol.for("react.profiler"),Eh=Symbol.for("react.provider"),kh=Symbol.for("react.context"),_h=Symbol.for("react.forward_ref"),xh=Symbol.for("react.suspense"),Oh=Symbol.for("react.memo"),Th=Symbol.for("react.lazy"),ku=Symbol.iterator;function Dh(e){return e===null||typeof e!="object"?null:(e=ku&&e[ku]||e["@@iterator"],typeof e=="function"?e:null)}var dc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fc=Object.assign,hc={};function Kn(e,t,n){this.props=e,this.context=t,this.refs=hc,this.updater=n||dc}Kn.prototype.isReactComponent={};Kn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function pc(){}pc.prototype=Kn.prototype;function Cl(e,t,n){this.props=e,this.context=t,this.refs=hc,this.updater=n||dc}var El=Cl.prototype=new pc;El.constructor=Cl;fc(El,Kn.prototype);El.isPureReactComponent=!0;var _u=Array.isArray,gc=Object.prototype.hasOwnProperty,kl={current:null},mc={key:!0,ref:!0,__self:!0,__source:!0};function vc(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)gc.call(t,r)&&!mc.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1t in e?mh(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var jh=E,Rh=Symbol.for("react.element"),Mh=Symbol.for("react.fragment"),Ah=Object.prototype.hasOwnProperty,zh=jh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bh={key:!0,ref:!0,__self:!0,__source:!0};function Sc(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Ah.call(t,r)&&!bh.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Rh,type:e,key:o,ref:s,props:i,_owner:zh.current}}so.Fragment=Mh;so.jsx=Sc;so.jsxs=Sc;ac.exports=so;var v=ac.exports,Cs={},wc={exports:{}},Re={},Cc={exports:{}},Ec={};/** + */var jh=E,Rh=Symbol.for("react.element"),Mh=Symbol.for("react.fragment"),Ah=Object.prototype.hasOwnProperty,bh=jh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,zh={key:!0,ref:!0,__self:!0,__source:!0};function Sc(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Ah.call(t,r)&&!zh.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Rh,type:e,key:o,ref:s,props:i,_owner:bh.current}}so.Fragment=Mh;so.jsx=Sc;so.jsxs=Sc;ac.exports=so;var v=ac.exports,Cs={},wc={exports:{}},Re={},Cc={exports:{}},Ec={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var mh=Object.defineProperty;var vh=(e,t,n)=>t in e?mh(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(D,L){var j=D.length;D.push(L);e:for(;0>>1,X=D[H];if(0>>1;Hi(ft,j))Gei(vn,ft)?(D[H]=vn,D[Ge]=j,H=Ge):(D[H]=ft,D[A]=j,H=A);else if(Gei(vn,j))D[H]=vn,D[Ge]=j,H=Ge;else break e}}return L}function i(D,L){var j=D.sortIndex-L.sortIndex;return j!==0?j:D.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],a=[],g=1,p=null,f=3,S=!1,m=!1,y=!1,C=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(D){for(var L=n(a);L!==null;){if(L.callback===null)r(a);else if(L.startTime<=D)r(a),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(a)}}function w(D){if(y=!1,h(D),!m)if(n(u)!==null)m=!0,Ce(k);else{var L=n(a);L!==null&&dt(w,L.startTime-D)}}function k(D,L){m=!1,y&&(y=!1,d(T),T=-1),S=!0;var j=f;try{for(h(L),p=n(u);p!==null&&(!(p.expirationTime>L)||D&&!$());){var H=p.callback;if(typeof H=="function"){p.callback=null,f=p.priorityLevel;var X=H(p.expirationTime<=L);L=e.unstable_now(),typeof X=="function"?p.callback=X:p===n(u)&&r(u),h(L)}else r(u);p=n(u)}if(p!==null)var ot=!0;else{var A=n(a);A!==null&&dt(w,A.startTime-L),ot=!1}return ot}finally{p=null,f=j,S=!1}}var O=!1,x=null,T=-1,b=5,M=-1;function $(){return!(e.unstable_now()-MD||125H?(D.sortIndex=j,t(a,D),n(u)===null&&D===n(a)&&(y?(d(T),T=-1):y=!0,dt(w,j-H))):(D.sortIndex=X,t(u,D),m||S||(m=!0,Ce(k))),D},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(D){var L=f;return function(){var j=f;f=L;try{return D.apply(this,arguments)}finally{f=j}}}})(Ec);Cc.exports=Ec;var Fh=Cc.exports;/** + */(function(e){function t(D,L){var j=D.length;D.push(L);e:for(;0>>1,X=D[H];if(0>>1;Hi(ft,j))Gei(vn,ft)?(D[H]=vn,D[Ge]=j,H=Ge):(D[H]=ft,D[A]=j,H=A);else if(Gei(vn,j))D[H]=vn,D[Ge]=j,H=Ge;else break e}}return L}function i(D,L){var j=D.sortIndex-L.sortIndex;return j!==0?j:D.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],a=[],g=1,p=null,f=3,S=!1,m=!1,y=!1,C=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(D){for(var L=n(a);L!==null;){if(L.callback===null)r(a);else if(L.startTime<=D)r(a),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(a)}}function w(D){if(y=!1,h(D),!m)if(n(u)!==null)m=!0,Ce(k);else{var L=n(a);L!==null&&dt(w,L.startTime-D)}}function k(D,L){m=!1,y&&(y=!1,d(T),T=-1),S=!0;var j=f;try{for(h(L),p=n(u);p!==null&&(!(p.expirationTime>L)||D&&!$());){var H=p.callback;if(typeof H=="function"){p.callback=null,f=p.priorityLevel;var X=H(p.expirationTime<=L);L=e.unstable_now(),typeof X=="function"?p.callback=X:p===n(u)&&r(u),h(L)}else r(u);p=n(u)}if(p!==null)var ot=!0;else{var A=n(a);A!==null&&dt(w,A.startTime-L),ot=!1}return ot}finally{p=null,f=j,S=!1}}var O=!1,x=null,T=-1,z=5,M=-1;function $(){return!(e.unstable_now()-MD||125H?(D.sortIndex=j,t(a,D),n(u)===null&&D===n(a)&&(y?(d(T),T=-1):y=!0,dt(w,j-H))):(D.sortIndex=X,t(u,D),m||S||(m=!0,Ce(k))),D},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(D){var L=f;return function(){var j=f;f=L;try{return D.apply(this,arguments)}finally{f=j}}}})(Ec);Cc.exports=Ec;var Fh=Cc.exports;/** * @license React * react-dom.production.min.js * @@ -34,10 +34,10 @@ var mh=Object.defineProperty;var vh=(e,t,n)=>t in e?mh(e,t,{enumerable:!0,config `+Fo+e}var $o=!1;function Uo(e,t){if(!e||$o)return"";$o=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(a){var r=a}Reflect.construct(e,[],t)}else{try{t.call()}catch(a){r=a}e.call(t.prototype)}else{try{throw Error()}catch(a){r=a}e()}}catch(a){if(a&&r&&typeof a.stack=="string"){for(var i=a.stack.split(` `),o=r.stack.split(` `),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var u=` -`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{$o=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?lr(e):""}function Bh(e){switch(e.tag){case 5:return lr(e.type);case 16:return lr("Lazy");case 13:return lr("Suspense");case 19:return lr("SuspenseList");case 0:case 2:case 15:return e=Uo(e.type,!1),e;case 11:return e=Uo(e.type.render,!1),e;case 1:return e=Uo(e.type,!0),e;default:return""}}function Os(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case En:return"Fragment";case Cn:return"Portal";case ks:return"Profiler";case Dl:return"StrictMode";case _s:return"Suspense";case xs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Oc:return(e.displayName||"Context")+".Consumer";case xc:return(e._context.displayName||"Context")+".Provider";case Pl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ll:return t=e.displayName||null,t!==null?t:Os(e.type)||"Memo";case Lt:t=e._payload,e=e._init;try{return Os(e(t))}catch{}}return null}function Vh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Os(t);case 8:return t===Dl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Kt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Dc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qh(e){var t=Dc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ni(e){e._valueTracker||(e._valueTracker=Qh(e))}function Pc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Dc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ts(e,t){var n=t.checked;return Y({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Kt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Lc(e,t){t=t.checked,t!=null&&Tl(e,"checked",t,!1)}function Ds(e,t){Lc(e,t);var n=Kt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ps(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ps(e,t.type,Kt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Lu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ps(e,t,n){(t!=="number"||Mi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ur=Array.isArray;function jn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ri.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _r(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fr={animationIterationCount:!0,aspectRatio:!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,gridArea:!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},Kh=["Webkit","ms","Moz","O"];Object.keys(fr).forEach(function(e){Kh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fr[t]=fr[e]})});function Rc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fr.hasOwnProperty(e)&&fr[e]?(""+t).trim():t+"px"}function Mc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Rc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var qh=Y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ns(e,t){if(t){if(qh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function js(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rs=null;function Il(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ms=null,Rn=null,Mn=null;function ju(e){if(e=Qr(e)){if(typeof Ms!="function")throw Error(_(280));var t=e.stateNode;t&&(t=fo(t),Ms(e.stateNode,e.type,t))}}function Ac(e){Rn?Mn?Mn.push(e):Mn=[e]:Rn=e}function zc(){if(Rn){var e=Rn,t=Mn;if(Mn=Rn=null,ju(e),t)for(e=0;e>>=0,e===0?32:31-(op(e)/sp|0)|0}var ii=64,oi=4194304;function ar(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Fi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=ar(l):(o&=s,o!==0&&(r=ar(o)))}else s=n&~i,s!==0?r=ar(s):o!==0&&(r=ar(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Br(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nt(t),e[t]=n}function cp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=pr),Hu=String.fromCharCode(32),Wu=!1;function rd(e,t){switch(e){case"keyup":return bp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function id(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kn=!1;function $p(e,t){switch(e){case"compositionend":return id(t);case"keypress":return t.which!==32?null:(Wu=!0,Hu);case"textInput":return e=t.data,e===Hu&&Wu?null:e;default:return null}}function Up(e,t){if(kn)return e==="compositionend"||!Fl&&rd(e,t)?(e=td(),ki=Al=At=null,kn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ku(n)}}function ud(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ud(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ad(){for(var e=window,t=Mi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mi(e.document)}return t}function $l(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Yp(e){var t=ad(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ud(n.ownerDocument.documentElement,n)){if(r!==null&&$l(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=qu(n,o);var s=qu(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,_n=null,Us=null,mr=null,Hs=!1;function Gu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hs||_n==null||_n!==Mi(r)||(r=_n,"selectionStart"in r&&$l(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),mr&&Lr(mr,r)||(mr=r,r=Hi(Us,"onSelect"),0Tn||(e.current=qs[Tn],qs[Tn]=null,Tn--)}function W(e,t){Tn++,qs[Tn]=e.current,e.current=t}var qt={},me=Yt(qt),xe=Yt(!1),un=qt;function $n(e,t){var n=e.type.contextTypes;if(!n)return qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Oe(e){return e=e.childContextTypes,e!=null}function Bi(){V(xe),V(me)}function na(e,t,n){if(me.current!==qt)throw Error(_(168));W(me,t),W(xe,n)}function yd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(_(108,Vh(e)||"Unknown",i));return Y({},n,r)}function Vi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qt,un=me.current,W(me,e),W(xe,xe.current),!0}function ra(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=yd(e,t,un),r.__reactInternalMemoizedMergedChildContext=e,V(xe),V(me),W(me,e)):V(xe),W(xe,n)}var gt=null,ho=!1,ts=!1;function Sd(e){gt===null?gt=[e]:gt.push(e)}function u0(e){ho=!0,Sd(e)}function Xt(){if(!ts&>!==null){ts=!0;var e=0,t=U;try{var n=gt;for(U=1;e>=s,i-=s,mt=1<<32-nt(t)+i|n<T?(b=x,x=null):b=x.sibling;var M=f(d,x,h[T],w);if(M===null){x===null&&(x=b);break}e&&x&&M.alternate===null&&t(d,x),c=o(M,c,T),O===null?k=M:O.sibling=M,O=M,x=b}if(T===h.length)return n(d,x),Q&&Jt(d,T),k;if(x===null){for(;TT?(b=x,x=null):b=x.sibling;var $=f(d,x,M.value,w);if($===null){x===null&&(x=b);break}e&&x&&$.alternate===null&&t(d,x),c=o($,c,T),O===null?k=$:O.sibling=$,O=$,x=b}if(M.done)return n(d,x),Q&&Jt(d,T),k;if(x===null){for(;!M.done;T++,M=h.next())M=p(d,M.value,w),M!==null&&(c=o(M,c,T),O===null?k=M:O.sibling=M,O=M);return Q&&Jt(d,T),k}for(x=r(d,x);!M.done;T++,M=h.next())M=S(x,d,T,M.value,w),M!==null&&(e&&M.alternate!==null&&x.delete(M.key===null?T:M.key),c=o(M,c,T),O===null?k=M:O.sibling=M,O=M);return e&&x.forEach(function(K){return t(d,K)}),Q&&Jt(d,T),k}function C(d,c,h,w){if(typeof h=="object"&&h!==null&&h.type===En&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case ti:e:{for(var k=h.key,O=c;O!==null;){if(O.key===k){if(k=h.type,k===En){if(O.tag===7){n(d,O.sibling),c=i(O,h.props.children),c.return=d,d=c;break e}}else if(O.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Lt&&ca(k)===O.type){n(d,O.sibling),c=i(O,h.props),c.ref=tr(d,O,h),c.return=d,d=c;break e}n(d,O);break}else t(d,O);O=O.sibling}h.type===En?(c=sn(h.props.children,d.mode,w,h.key),c.return=d,d=c):(w=Ii(h.type,h.key,h.props,null,d.mode,w),w.ref=tr(d,c,h),w.return=d,d=w)}return s(d);case Cn:e:{for(O=h.key;c!==null;){if(c.key===O)if(c.tag===4&&c.stateNode.containerInfo===h.containerInfo&&c.stateNode.implementation===h.implementation){n(d,c.sibling),c=i(c,h.children||[]),c.return=d,d=c;break e}else{n(d,c);break}else t(d,c);c=c.sibling}c=as(h,d.mode,w),c.return=d,d=c}return s(d);case Lt:return O=h._init,C(d,c,O(h._payload),w)}if(ur(h))return m(d,c,h,w);if(Yn(h))return y(d,c,h,w);fi(d,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,c!==null&&c.tag===6?(n(d,c.sibling),c=i(c,h),c.return=d,d=c):(n(d,c),c=us(h,d.mode,w),c.return=d,d=c),s(d)):n(d,c)}return C}var Hn=Td(!0),Dd=Td(!1),Kr={},ct=Yt(Kr),Rr=Yt(Kr),Mr=Yt(Kr);function rn(e){if(e===Kr)throw Error(_(174));return e}function Gl(e,t){switch(W(Mr,t),W(Rr,e),W(ct,Kr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Is(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Is(t,e)}V(ct),W(ct,t)}function Wn(){V(ct),V(Rr),V(Mr)}function Pd(e){rn(Mr.current);var t=rn(ct.current),n=Is(t,e.type);t!==n&&(W(Rr,e),W(ct,n))}function Yl(e){Rr.current===e&&(V(ct),V(Rr))}var q=Yt(0);function Xi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ns=[];function Xl(){for(var e=0;en?n:4,e(!0);var r=rs.transition;rs.transition={};try{e(!1),t()}finally{U=n,rs.transition=r}}function Vd(){return Ke().memoizedState}function f0(e,t,n){var r=Bt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qd(e))Kd(t,n);else if(n=kd(e,t,n,r),n!==null){var i=ye();rt(n,e,r,i),qd(n,t,r)}}function h0(e,t,n){var r=Bt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qd(e))Kd(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,it(l,s)){var u=t.interleaved;u===null?(i.next=i,Kl(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=kd(e,t,i,r),n!==null&&(i=ye(),rt(n,e,r,i),qd(n,t,r))}}function Qd(e){var t=e.alternate;return e===G||t!==null&&t===G}function Kd(e,t){vr=Zi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,jl(e,n)}}var Ji={readContext:Qe,useCallback:fe,useContext:fe,useEffect:fe,useImperativeHandle:fe,useInsertionEffect:fe,useLayoutEffect:fe,useMemo:fe,useReducer:fe,useRef:fe,useState:fe,useDebugValue:fe,useDeferredValue:fe,useTransition:fe,useMutableSource:fe,useSyncExternalStore:fe,useId:fe,unstable_isNewReconciler:!1},p0={readContext:Qe,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Qe,useEffect:fa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ti(4194308,4,$d.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ti(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ti(4,2,e,t)},useMemo:function(e,t){var n=lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=f0.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:da,useDebugValue:nu,useDeferredValue:function(e){return lt().memoizedState=e},useTransition:function(){var e=da(!1),t=e[0];return e=d0.bind(null,e[1]),lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=G,i=lt();if(Q){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),le===null)throw Error(_(349));cn&30||Nd(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,fa(Rd.bind(null,r,o,e),[e]),r.flags|=2048,br(9,jd.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=lt(),t=le.identifierPrefix;if(Q){var n=vt,r=mt;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ar++,0")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{$o=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?lr(e):""}function Bh(e){switch(e.tag){case 5:return lr(e.type);case 16:return lr("Lazy");case 13:return lr("Suspense");case 19:return lr("SuspenseList");case 0:case 2:case 15:return e=Uo(e.type,!1),e;case 11:return e=Uo(e.type.render,!1),e;case 1:return e=Uo(e.type,!0),e;default:return""}}function Os(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case En:return"Fragment";case Cn:return"Portal";case ks:return"Profiler";case Dl:return"StrictMode";case _s:return"Suspense";case xs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Oc:return(e.displayName||"Context")+".Consumer";case xc:return(e._context.displayName||"Context")+".Provider";case Pl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ll:return t=e.displayName||null,t!==null?t:Os(e.type)||"Memo";case Lt:t=e._payload,e=e._init;try{return Os(e(t))}catch{}}return null}function Vh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Os(t);case 8:return t===Dl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Kt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Dc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qh(e){var t=Dc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ni(e){e._valueTracker||(e._valueTracker=Qh(e))}function Pc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Dc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ts(e,t){var n=t.checked;return Y({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Kt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Lc(e,t){t=t.checked,t!=null&&Tl(e,"checked",t,!1)}function Ds(e,t){Lc(e,t);var n=Kt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ps(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ps(e,t.type,Kt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Lu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ps(e,t,n){(t!=="number"||Mi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ur=Array.isArray;function jn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ri.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _r(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fr={animationIterationCount:!0,aspectRatio:!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,gridArea:!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},Kh=["Webkit","ms","Moz","O"];Object.keys(fr).forEach(function(e){Kh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fr[t]=fr[e]})});function Rc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fr.hasOwnProperty(e)&&fr[e]?(""+t).trim():t+"px"}function Mc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Rc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var qh=Y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ns(e,t){if(t){if(qh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function js(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rs=null;function Il(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ms=null,Rn=null,Mn=null;function ju(e){if(e=Qr(e)){if(typeof Ms!="function")throw Error(_(280));var t=e.stateNode;t&&(t=fo(t),Ms(e.stateNode,e.type,t))}}function Ac(e){Rn?Mn?Mn.push(e):Mn=[e]:Rn=e}function bc(){if(Rn){var e=Rn,t=Mn;if(Mn=Rn=null,ju(e),t)for(e=0;e>>=0,e===0?32:31-(op(e)/sp|0)|0}var ii=64,oi=4194304;function ar(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Fi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=ar(l):(o&=s,o!==0&&(r=ar(o)))}else s=n&~i,s!==0?r=ar(s):o!==0&&(r=ar(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Br(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nt(t),e[t]=n}function cp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=pr),Hu=String.fromCharCode(32),Wu=!1;function rd(e,t){switch(e){case"keyup":return zp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function id(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kn=!1;function $p(e,t){switch(e){case"compositionend":return id(t);case"keypress":return t.which!==32?null:(Wu=!0,Hu);case"textInput":return e=t.data,e===Hu&&Wu?null:e;default:return null}}function Up(e,t){if(kn)return e==="compositionend"||!Fl&&rd(e,t)?(e=td(),ki=Al=At=null,kn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ku(n)}}function ud(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ud(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ad(){for(var e=window,t=Mi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mi(e.document)}return t}function $l(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Yp(e){var t=ad(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ud(n.ownerDocument.documentElement,n)){if(r!==null&&$l(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=qu(n,o);var s=qu(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,_n=null,Us=null,mr=null,Hs=!1;function Gu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hs||_n==null||_n!==Mi(r)||(r=_n,"selectionStart"in r&&$l(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),mr&&Lr(mr,r)||(mr=r,r=Hi(Us,"onSelect"),0Tn||(e.current=qs[Tn],qs[Tn]=null,Tn--)}function W(e,t){Tn++,qs[Tn]=e.current,e.current=t}var qt={},me=Yt(qt),xe=Yt(!1),un=qt;function $n(e,t){var n=e.type.contextTypes;if(!n)return qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Oe(e){return e=e.childContextTypes,e!=null}function Bi(){V(xe),V(me)}function na(e,t,n){if(me.current!==qt)throw Error(_(168));W(me,t),W(xe,n)}function yd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(_(108,Vh(e)||"Unknown",i));return Y({},n,r)}function Vi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qt,un=me.current,W(me,e),W(xe,xe.current),!0}function ra(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=yd(e,t,un),r.__reactInternalMemoizedMergedChildContext=e,V(xe),V(me),W(me,e)):V(xe),W(xe,n)}var gt=null,ho=!1,ts=!1;function Sd(e){gt===null?gt=[e]:gt.push(e)}function u0(e){ho=!0,Sd(e)}function Xt(){if(!ts&>!==null){ts=!0;var e=0,t=U;try{var n=gt;for(U=1;e>=s,i-=s,mt=1<<32-nt(t)+i|n<T?(z=x,x=null):z=x.sibling;var M=f(d,x,h[T],w);if(M===null){x===null&&(x=z);break}e&&x&&M.alternate===null&&t(d,x),c=o(M,c,T),O===null?k=M:O.sibling=M,O=M,x=z}if(T===h.length)return n(d,x),Q&&Jt(d,T),k;if(x===null){for(;TT?(z=x,x=null):z=x.sibling;var $=f(d,x,M.value,w);if($===null){x===null&&(x=z);break}e&&x&&$.alternate===null&&t(d,x),c=o($,c,T),O===null?k=$:O.sibling=$,O=$,x=z}if(M.done)return n(d,x),Q&&Jt(d,T),k;if(x===null){for(;!M.done;T++,M=h.next())M=p(d,M.value,w),M!==null&&(c=o(M,c,T),O===null?k=M:O.sibling=M,O=M);return Q&&Jt(d,T),k}for(x=r(d,x);!M.done;T++,M=h.next())M=S(x,d,T,M.value,w),M!==null&&(e&&M.alternate!==null&&x.delete(M.key===null?T:M.key),c=o(M,c,T),O===null?k=M:O.sibling=M,O=M);return e&&x.forEach(function(K){return t(d,K)}),Q&&Jt(d,T),k}function C(d,c,h,w){if(typeof h=="object"&&h!==null&&h.type===En&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case ti:e:{for(var k=h.key,O=c;O!==null;){if(O.key===k){if(k=h.type,k===En){if(O.tag===7){n(d,O.sibling),c=i(O,h.props.children),c.return=d,d=c;break e}}else if(O.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Lt&&ca(k)===O.type){n(d,O.sibling),c=i(O,h.props),c.ref=tr(d,O,h),c.return=d,d=c;break e}n(d,O);break}else t(d,O);O=O.sibling}h.type===En?(c=sn(h.props.children,d.mode,w,h.key),c.return=d,d=c):(w=Ii(h.type,h.key,h.props,null,d.mode,w),w.ref=tr(d,c,h),w.return=d,d=w)}return s(d);case Cn:e:{for(O=h.key;c!==null;){if(c.key===O)if(c.tag===4&&c.stateNode.containerInfo===h.containerInfo&&c.stateNode.implementation===h.implementation){n(d,c.sibling),c=i(c,h.children||[]),c.return=d,d=c;break e}else{n(d,c);break}else t(d,c);c=c.sibling}c=as(h,d.mode,w),c.return=d,d=c}return s(d);case Lt:return O=h._init,C(d,c,O(h._payload),w)}if(ur(h))return m(d,c,h,w);if(Yn(h))return y(d,c,h,w);fi(d,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,c!==null&&c.tag===6?(n(d,c.sibling),c=i(c,h),c.return=d,d=c):(n(d,c),c=us(h,d.mode,w),c.return=d,d=c),s(d)):n(d,c)}return C}var Hn=Td(!0),Dd=Td(!1),Kr={},ct=Yt(Kr),Rr=Yt(Kr),Mr=Yt(Kr);function rn(e){if(e===Kr)throw Error(_(174));return e}function Gl(e,t){switch(W(Mr,t),W(Rr,e),W(ct,Kr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Is(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Is(t,e)}V(ct),W(ct,t)}function Wn(){V(ct),V(Rr),V(Mr)}function Pd(e){rn(Mr.current);var t=rn(ct.current),n=Is(t,e.type);t!==n&&(W(Rr,e),W(ct,n))}function Yl(e){Rr.current===e&&(V(ct),V(Rr))}var q=Yt(0);function Xi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ns=[];function Xl(){for(var e=0;en?n:4,e(!0);var r=rs.transition;rs.transition={};try{e(!1),t()}finally{U=n,rs.transition=r}}function Vd(){return Ke().memoizedState}function f0(e,t,n){var r=Bt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qd(e))Kd(t,n);else if(n=kd(e,t,n,r),n!==null){var i=ye();rt(n,e,r,i),qd(n,t,r)}}function h0(e,t,n){var r=Bt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qd(e))Kd(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,it(l,s)){var u=t.interleaved;u===null?(i.next=i,Kl(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=kd(e,t,i,r),n!==null&&(i=ye(),rt(n,e,r,i),qd(n,t,r))}}function Qd(e){var t=e.alternate;return e===G||t!==null&&t===G}function Kd(e,t){vr=Zi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,jl(e,n)}}var Ji={readContext:Qe,useCallback:fe,useContext:fe,useEffect:fe,useImperativeHandle:fe,useInsertionEffect:fe,useLayoutEffect:fe,useMemo:fe,useReducer:fe,useRef:fe,useState:fe,useDebugValue:fe,useDeferredValue:fe,useTransition:fe,useMutableSource:fe,useSyncExternalStore:fe,useId:fe,unstable_isNewReconciler:!1},p0={readContext:Qe,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Qe,useEffect:fa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ti(4194308,4,$d.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ti(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ti(4,2,e,t)},useMemo:function(e,t){var n=lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=f0.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:da,useDebugValue:nu,useDeferredValue:function(e){return lt().memoizedState=e},useTransition:function(){var e=da(!1),t=e[0];return e=d0.bind(null,e[1]),lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=G,i=lt();if(Q){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),le===null)throw Error(_(349));cn&30||Nd(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,fa(Rd.bind(null,r,o,e),[e]),r.flags|=2048,zr(9,jd.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=lt(),t=le.identifierPrefix;if(Q){var n=vt,r=mt;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ar++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ut]=t,e[jr]=r,rf(e,t,!1,!1),t.stateNode=e;e:{switch(s=js(n,r),n){case"dialog":B("cancel",e),B("close",e),i=r;break;case"iframe":case"object":case"embed":B("load",e),i=r;break;case"video":case"audio":for(i=0;iVn&&(t.flags|=128,r=!0,nr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Xi(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Q)return he(t),null}else 2*J()-o.renderingStartTime>Vn&&n!==1073741824&&(t.flags|=128,r=!0,nr(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=J(),t.sibling=null,n=q.current,W(q,r?n&1|2:n&1),t):(he(t),null);case 22:case 23:return uu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Le&1073741824&&(he(t),t.subtreeFlags&6&&(t.flags|=8192)):he(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function E0(e,t){switch(Hl(t),t.tag){case 1:return Oe(t.type)&&Bi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(),V(xe),V(me),Xl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Yl(t),null;case 13:if(V(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Un()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(q),null;case 4:return Wn(),null;case 10:return Ql(t.type._context),null;case 22:case 23:return uu(),null;case 24:return null;default:return null}}var pi=!1,ge=!1,k0=typeof WeakSet=="function"?WeakSet:Set,P=null;function In(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Z(e,t,r)}else n.current=null}function sl(e,t,n){try{n()}catch(r){Z(e,t,r)}}var Ca=!1;function _0(e,t){if(Ws=$i,e=ad(),$l(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,u=-1,a=0,g=0,p=e,f=null;t:for(;;){for(var S;p!==n||i!==0&&p.nodeType!==3||(l=s+i),p!==o||r!==0&&p.nodeType!==3||(u=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(S=p.firstChild)!==null;)f=p,p=S;for(;;){if(p===e)break t;if(f===n&&++a===i&&(l=s),f===o&&++g===r&&(u=s),(S=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=S}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Bs={focusedElem:e,selectionRange:n},$i=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,C=m.memoizedState,d=t.stateNode,c=d.getSnapshotBeforeUpdate(t.elementType===t.type?y:Je(t.type,y),C);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(w){Z(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return m=Ca,Ca=!1,m}function yr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&sl(t,n,o)}i=i.next}while(i!==r)}}function mo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ll(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function lf(e){var t=e.alternate;t!==null&&(e.alternate=null,lf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ut],delete t[jr],delete t[Ks],delete t[s0],delete t[l0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function uf(e){return e.tag===5||e.tag===3||e.tag===4}function Ea(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ul(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Wi));else if(r!==4&&(e=e.child,e!==null))for(ul(e,t,n),e=e.sibling;e!==null;)ul(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}var ue=null,et=!1;function Tt(e,t,n){for(n=n.child;n!==null;)af(e,t,n),n=n.sibling}function af(e,t,n){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(lo,n)}catch{}switch(n.tag){case 5:ge||In(n,t);case 6:var r=ue,i=et;ue=null,Tt(e,t,n),ue=r,et=i,ue!==null&&(et?(e=ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ue.removeChild(n.stateNode));break;case 18:ue!==null&&(et?(e=ue,n=n.stateNode,e.nodeType===8?es(e.parentNode,n):e.nodeType===1&&es(e,n),Dr(e)):es(ue,n.stateNode));break;case 4:r=ue,i=et,ue=n.stateNode.containerInfo,et=!0,Tt(e,t,n),ue=r,et=i;break;case 0:case 11:case 14:case 15:if(!ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&sl(n,t,s),i=i.next}while(i!==r)}Tt(e,t,n);break;case 1:if(!ge&&(In(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Z(n,t,l)}Tt(e,t,n);break;case 21:Tt(e,t,n);break;case 22:n.mode&1?(ge=(r=ge)||n.memoizedState!==null,Tt(e,t,n),ge=r):Tt(e,t,n);break;default:Tt(e,t,n)}}function ka(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new k0),t.forEach(function(r){var i=j0.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ze(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=J()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*O0(r/1960))-r,10e?16:e,zt===null)var r=!1;else{if(e=zt,zt=null,no=0,F&6)throw Error(_(331));var i=F;for(F|=4,P=e.current;P!==null;){var o=P,s=o.child;if(P.flags&16){var l=o.deletions;if(l!==null){for(var u=0;uJ()-su?on(e,0):ou|=n),Te(e,t)}function vf(e,t){t===0&&(e.mode&1?(t=oi,oi<<=1,!(oi&130023424)&&(oi=4194304)):t=1);var n=ye();e=Ct(e,t),e!==null&&(Br(e,t,n),Te(e,n))}function N0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vf(e,n)}function j0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),vf(e,n)}var yf;yf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xe.current)_e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _e=!1,w0(e,t,n);_e=!!(e.flags&131072)}else _e=!1,Q&&t.flags&1048576&&wd(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Di(e,t),e=t.pendingProps;var i=$n(t,me.current);zn(t,n),i=Jl(null,t,r,e,i,n);var o=eu();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oe(r)?(o=!0,Vi(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ql(t),i.updater=po,t.stateNode=i,i._reactInternals=t,Js(t,r,e,n),t=nl(null,t,r,!0,o,n)):(t.tag=0,Q&&o&&Ul(t),ve(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Di(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=M0(r),e=Je(r,e),i){case 0:t=tl(null,t,r,e,n);break e;case 1:t=ya(null,t,r,e,n);break e;case 11:t=ma(null,t,r,e,n);break e;case 14:t=va(null,t,r,Je(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),tl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),ya(e,t,r,i,n);case 3:e:{if(ef(t),e===null)throw Error(_(387));r=t.pendingProps,o=t.memoizedState,i=o.element,_d(e,t),Yi(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Bn(Error(_(423)),t),t=Sa(e,t,r,n,i);break e}else if(r!==i){i=Bn(Error(_(424)),t),t=Sa(e,t,r,n,i);break e}else for(Ie=Ut(t.stateNode.containerInfo.firstChild),Ne=t,Q=!0,tt=null,n=Dd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Un(),r===i){t=Et(e,t,n);break e}ve(e,t,r,n)}t=t.child}return t;case 5:return Pd(t),e===null&&Ys(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Vs(r,i)?s=null:o!==null&&Vs(r,o)&&(t.flags|=32),Jd(e,t),ve(e,t,s,n),t.child;case 6:return e===null&&Ys(t),null;case 13:return tf(e,t,n);case 4:return Gl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hn(t,null,r,n):ve(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),ma(e,t,r,i,n);case 7:return ve(e,t,t.pendingProps,n),t.child;case 8:return ve(e,t,t.pendingProps.children,n),t.child;case 12:return ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,W(qi,r._currentValue),r._currentValue=s,o!==null)if(it(o.value,s)){if(o.children===i.children&&!xe.current){t=Et(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=yt(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var g=a.pending;g===null?u.next=u:(u.next=g.next,g.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Xs(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(_(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Xs(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ve(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,zn(t,n),i=Qe(i),r=r(i),t.flags|=1,ve(e,t,r,n),t.child;case 14:return r=t.type,i=Je(r,t.pendingProps),i=Je(r.type,i),va(e,t,r,i,n);case 15:return Xd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),Di(e,t),t.tag=1,Oe(r)?(e=!0,Vi(t)):e=!1,zn(t,n),Od(t,r,i),Js(t,r,i,n),nl(null,t,r,!0,e,n);case 19:return nf(e,t,n);case 22:return Zd(e,t,n)}throw Error(_(156,t.tag))};function Sf(e,t){return Bc(e,t)}function R0(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Be(e,t,n,r){return new R0(e,t,n,r)}function cu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function M0(e){if(typeof e=="function")return cu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pl)return 11;if(e===Ll)return 14}return 2}function Vt(e,t){var n=e.alternate;return n===null?(n=Be(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ii(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")cu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case En:return sn(n.children,i,o,t);case Dl:s=8,i|=8;break;case ks:return e=Be(12,n,t,i|2),e.elementType=ks,e.lanes=o,e;case _s:return e=Be(13,n,t,i),e.elementType=_s,e.lanes=o,e;case xs:return e=Be(19,n,t,i),e.elementType=xs,e.lanes=o,e;case Tc:return yo(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xc:s=10;break e;case Oc:s=9;break e;case Pl:s=11;break e;case Ll:s=14;break e;case Lt:s=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Be(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function sn(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function yo(e,t,n,r){return e=Be(22,e,r,t),e.elementType=Tc,e.lanes=n,e.stateNode={isHidden:!1},e}function us(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function as(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function A0(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wo(0),this.expirationTimes=Wo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function du(e,t,n,r,i,o,s,l,u){return e=new A0(e,t,n,l,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Be(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ql(o),e}function z0(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kf)}catch(e){console.error(e)}}kf(),wc.exports=Re;var H0=wc.exports,Ia=H0;Cs.createRoot=Ia.createRoot,Cs.hydrateRoot=Ia.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function ss(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function el(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var v0=typeof WeakMap=="function"?WeakMap:Map;function Gd(e,t,n){n=yt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){to||(to=!0,cl=r),el(e,t)},n}function Yd(e,t,n){n=yt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){el(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){el(e,t),typeof r!="function"&&(Wt===null?Wt=new Set([this]):Wt.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function ha(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new v0;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=I0.bind(null,e,t,n),t.then(e,e))}function pa(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ga(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yt(-1,1),t.tag=2,Ht(n,t,1))),n.lanes|=1),e)}var y0=kt.ReactCurrentOwner,_e=!1;function ve(e,t,n,r){t.child=e===null?Dd(t,null,n,r):Hn(t,e.child,n,r)}function ma(e,t,n,r,i){n=n.render;var o=t.ref;return bn(t,i),r=Jl(e,t,n,r,o,i),n=eu(),e!==null&&!_e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Et(e,t,i)):(Q&&n&&Ul(t),t.flags|=1,ve(e,t,r,i),t.child)}function va(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!cu(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Xd(e,t,o,r,i)):(e=Ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Lr,n(s,r)&&e.ref===t.ref)return Et(e,t,i)}return t.flags|=1,e=Vt(o,r),e.ref=t.ref,e.return=t,t.child=e}function Xd(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Lr(o,r)&&e.ref===t.ref)if(_e=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(_e=!0);else return t.lanes=e.lanes,Et(e,t,i)}return tl(e,t,n,r,i)}function Zd(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},W(Nn,Le),Le|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,W(Nn,Le),Le|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,W(Nn,Le),Le|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,W(Nn,Le),Le|=r;return ve(e,t,i,n),t.child}function Jd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function tl(e,t,n,r,i){var o=Oe(n)?un:me.current;return o=$n(t,o),bn(t,i),n=Jl(e,t,n,r,o,i),r=eu(),e!==null&&!_e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Et(e,t,i)):(Q&&r&&Ul(t),t.flags|=1,ve(e,t,n,i),t.child)}function ya(e,t,n,r,i){if(Oe(n)){var o=!0;Vi(t)}else o=!1;if(bn(t,i),t.stateNode===null)Di(e,t),Od(t,n,r),Js(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var u=s.context,a=n.contextType;typeof a=="object"&&a!==null?a=Qe(a):(a=Oe(n)?un:me.current,a=$n(t,a));var g=n.getDerivedStateFromProps,p=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||u!==a)&&aa(t,s,r,a),It=!1;var f=t.memoizedState;s.state=f,Yi(t,r,s,i),u=t.memoizedState,l!==r||f!==u||xe.current||It?(typeof g=="function"&&(Zs(t,n,g,r),u=t.memoizedState),(l=It||ua(t,n,l,r,f,u,a))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=a,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,_d(e,t),l=t.memoizedProps,a=t.type===t.elementType?l:Je(t.type,l),s.props=a,p=t.pendingProps,f=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=Qe(u):(u=Oe(n)?un:me.current,u=$n(t,u));var S=n.getDerivedStateFromProps;(g=typeof S=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==p||f!==u)&&aa(t,s,r,u),It=!1,f=t.memoizedState,s.state=f,Yi(t,r,s,i);var m=t.memoizedState;l!==p||f!==m||xe.current||It?(typeof S=="function"&&(Zs(t,n,S,r),m=t.memoizedState),(a=It||ua(t,n,a,r,f,m,u)||!1)?(g||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),s.props=r,s.state=m,s.context=u,r=a):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return nl(e,t,n,r,o,i)}function nl(e,t,n,r,i,o){Jd(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&ra(t,n,!1),Et(e,t,o);r=t.stateNode,y0.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Hn(t,e.child,null,o),t.child=Hn(t,null,l,o)):ve(e,t,l,o),t.memoizedState=r.state,i&&ra(t,n,!0),t.child}function ef(e){var t=e.stateNode;t.pendingContext?na(e,t.pendingContext,t.pendingContext!==t.context):t.context&&na(e,t.context,!1),Gl(e,t.containerInfo)}function Sa(e,t,n,r,i){return Un(),Wl(i),t.flags|=256,ve(e,t,n,r),t.child}var rl={dehydrated:null,treeContext:null,retryLane:0};function il(e){return{baseLanes:e,cachePool:null,transitions:null}}function tf(e,t,n){var r=t.pendingProps,i=q.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),W(q,i&1),e===null)return Ys(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=yo(s,r,0,null),e=sn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=il(n),t.memoizedState=rl,e):ru(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return S0(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Vt(i,u),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=Vt(l,o):(o=sn(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?il(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=rl,r}return o=e.child,e=o.sibling,r=Vt(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ru(e,t){return t=yo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function hi(e,t,n,r){return r!==null&&Wl(r),Hn(t,e.child,null,n),e=ru(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function S0(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=ss(Error(_(422))),hi(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=yo({mode:"visible",children:r.children},i,0,null),o=sn(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Hn(t,e.child,null,s),t.child.memoizedState=il(s),t.memoizedState=rl,o);if(!(t.mode&1))return hi(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(_(419)),r=ss(o,r,void 0),hi(e,t,s,r)}if(l=(s&e.childLanes)!==0,_e||l){if(r=le,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Ct(e,i),rt(r,e,i,-1))}return au(),r=ss(Error(_(421))),hi(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=N0.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ie=Ut(i.nextSibling),Ne=t,Q=!0,tt=null,e!==null&&(Ue[He++]=mt,Ue[He++]=vt,Ue[He++]=an,mt=e.id,vt=e.overflow,an=t),t=ru(t,r.children),t.flags|=4096,t)}function wa(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xs(e.return,t,n)}function ls(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function nf(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ve(e,t,r.children,n),r=q.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wa(e,n,t);else if(e.tag===19)wa(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(W(q,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Xi(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ls(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Xi(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ls(t,!0,n,null,o);break;case"together":ls(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Di(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Et(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),dn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=Vt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function w0(e,t,n){switch(t.tag){case 3:ef(t),Un();break;case 5:Pd(t);break;case 1:Oe(t.type)&&Vi(t);break;case 4:Gl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;W(qi,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(W(q,q.current&1),t.flags|=128,null):n&t.child.childLanes?tf(e,t,n):(W(q,q.current&1),e=Et(e,t,n),e!==null?e.sibling:null);W(q,q.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return nf(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),W(q,q.current),r)break;return null;case 22:case 23:return t.lanes=0,Zd(e,t,n)}return Et(e,t,n)}var rf,ol,of,sf;rf=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ol=function(){};of=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,rn(ct.current);var o=null;switch(n){case"input":i=Ts(e,i),r=Ts(e,r),o=[];break;case"select":i=Y({},i,{value:void 0}),r=Y({},r,{value:void 0}),o=[];break;case"textarea":i=Ls(e,i),r=Ls(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Wi)}Ns(n,r);var s;n=null;for(a in i)if(!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&i[a]!=null)if(a==="style"){var l=i[a];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(kr.hasOwnProperty(a)?o||(o=[]):(o=o||[]).push(a,null));for(a in r){var u=r[a];if(l=i!=null?i[a]:void 0,r.hasOwnProperty(a)&&u!==l&&(u!=null||l!=null))if(a==="style")if(l){for(s in l)!l.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&l[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(o||(o=[]),o.push(a,n)),n=u;else a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(o=o||[]).push(a,u)):a==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(a,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(kr.hasOwnProperty(a)?(u!=null&&a==="onScroll"&&B("scroll",e),o||l===u||(o=[])):(o=o||[]).push(a,u))}n&&(o=o||[]).push("style",n);var a=o;(t.updateQueue=a)&&(t.flags|=4)}};sf=function(e,t,n,r){n!==r&&(t.flags|=4)};function nr(e,t){if(!Q)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function he(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function C0(e,t,n){var r=t.pendingProps;switch(Hl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return he(t),null;case 1:return Oe(t.type)&&Bi(),he(t),null;case 3:return r=t.stateNode,Wn(),V(xe),V(me),Xl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(di(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,tt!==null&&(hl(tt),tt=null))),ol(e,t),he(t),null;case 5:Yl(t);var i=rn(Mr.current);if(n=t.type,e!==null&&t.stateNode!=null)of(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return he(t),null}if(e=rn(ct.current),di(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ut]=t,r[jr]=o,e=(t.mode&1)!==0,n){case"dialog":B("cancel",r),B("close",r);break;case"iframe":case"object":case"embed":B("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ut]=t,e[jr]=r,rf(e,t,!1,!1),t.stateNode=e;e:{switch(s=js(n,r),n){case"dialog":B("cancel",e),B("close",e),i=r;break;case"iframe":case"object":case"embed":B("load",e),i=r;break;case"video":case"audio":for(i=0;iVn&&(t.flags|=128,r=!0,nr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Xi(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Q)return he(t),null}else 2*J()-o.renderingStartTime>Vn&&n!==1073741824&&(t.flags|=128,r=!0,nr(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=J(),t.sibling=null,n=q.current,W(q,r?n&1|2:n&1),t):(he(t),null);case 22:case 23:return uu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Le&1073741824&&(he(t),t.subtreeFlags&6&&(t.flags|=8192)):he(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function E0(e,t){switch(Hl(t),t.tag){case 1:return Oe(t.type)&&Bi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(),V(xe),V(me),Xl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Yl(t),null;case 13:if(V(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Un()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(q),null;case 4:return Wn(),null;case 10:return Ql(t.type._context),null;case 22:case 23:return uu(),null;case 24:return null;default:return null}}var pi=!1,ge=!1,k0=typeof WeakSet=="function"?WeakSet:Set,P=null;function In(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Z(e,t,r)}else n.current=null}function sl(e,t,n){try{n()}catch(r){Z(e,t,r)}}var Ca=!1;function _0(e,t){if(Ws=$i,e=ad(),$l(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,u=-1,a=0,g=0,p=e,f=null;t:for(;;){for(var S;p!==n||i!==0&&p.nodeType!==3||(l=s+i),p!==o||r!==0&&p.nodeType!==3||(u=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(S=p.firstChild)!==null;)f=p,p=S;for(;;){if(p===e)break t;if(f===n&&++a===i&&(l=s),f===o&&++g===r&&(u=s),(S=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=S}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Bs={focusedElem:e,selectionRange:n},$i=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,C=m.memoizedState,d=t.stateNode,c=d.getSnapshotBeforeUpdate(t.elementType===t.type?y:Je(t.type,y),C);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(w){Z(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return m=Ca,Ca=!1,m}function yr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&sl(t,n,o)}i=i.next}while(i!==r)}}function mo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ll(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function lf(e){var t=e.alternate;t!==null&&(e.alternate=null,lf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ut],delete t[jr],delete t[Ks],delete t[s0],delete t[l0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function uf(e){return e.tag===5||e.tag===3||e.tag===4}function Ea(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ul(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Wi));else if(r!==4&&(e=e.child,e!==null))for(ul(e,t,n),e=e.sibling;e!==null;)ul(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}var ue=null,et=!1;function Tt(e,t,n){for(n=n.child;n!==null;)af(e,t,n),n=n.sibling}function af(e,t,n){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(lo,n)}catch{}switch(n.tag){case 5:ge||In(n,t);case 6:var r=ue,i=et;ue=null,Tt(e,t,n),ue=r,et=i,ue!==null&&(et?(e=ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ue.removeChild(n.stateNode));break;case 18:ue!==null&&(et?(e=ue,n=n.stateNode,e.nodeType===8?es(e.parentNode,n):e.nodeType===1&&es(e,n),Dr(e)):es(ue,n.stateNode));break;case 4:r=ue,i=et,ue=n.stateNode.containerInfo,et=!0,Tt(e,t,n),ue=r,et=i;break;case 0:case 11:case 14:case 15:if(!ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&sl(n,t,s),i=i.next}while(i!==r)}Tt(e,t,n);break;case 1:if(!ge&&(In(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Z(n,t,l)}Tt(e,t,n);break;case 21:Tt(e,t,n);break;case 22:n.mode&1?(ge=(r=ge)||n.memoizedState!==null,Tt(e,t,n),ge=r):Tt(e,t,n);break;default:Tt(e,t,n)}}function ka(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new k0),t.forEach(function(r){var i=j0.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ze(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=J()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*O0(r/1960))-r,10e?16:e,bt===null)var r=!1;else{if(e=bt,bt=null,no=0,F&6)throw Error(_(331));var i=F;for(F|=4,P=e.current;P!==null;){var o=P,s=o.child;if(P.flags&16){var l=o.deletions;if(l!==null){for(var u=0;uJ()-su?on(e,0):ou|=n),Te(e,t)}function vf(e,t){t===0&&(e.mode&1?(t=oi,oi<<=1,!(oi&130023424)&&(oi=4194304)):t=1);var n=ye();e=Ct(e,t),e!==null&&(Br(e,t,n),Te(e,n))}function N0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vf(e,n)}function j0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),vf(e,n)}var yf;yf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xe.current)_e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _e=!1,w0(e,t,n);_e=!!(e.flags&131072)}else _e=!1,Q&&t.flags&1048576&&wd(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Di(e,t),e=t.pendingProps;var i=$n(t,me.current);bn(t,n),i=Jl(null,t,r,e,i,n);var o=eu();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oe(r)?(o=!0,Vi(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ql(t),i.updater=po,t.stateNode=i,i._reactInternals=t,Js(t,r,e,n),t=nl(null,t,r,!0,o,n)):(t.tag=0,Q&&o&&Ul(t),ve(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Di(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=M0(r),e=Je(r,e),i){case 0:t=tl(null,t,r,e,n);break e;case 1:t=ya(null,t,r,e,n);break e;case 11:t=ma(null,t,r,e,n);break e;case 14:t=va(null,t,r,Je(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),tl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),ya(e,t,r,i,n);case 3:e:{if(ef(t),e===null)throw Error(_(387));r=t.pendingProps,o=t.memoizedState,i=o.element,_d(e,t),Yi(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Bn(Error(_(423)),t),t=Sa(e,t,r,n,i);break e}else if(r!==i){i=Bn(Error(_(424)),t),t=Sa(e,t,r,n,i);break e}else for(Ie=Ut(t.stateNode.containerInfo.firstChild),Ne=t,Q=!0,tt=null,n=Dd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Un(),r===i){t=Et(e,t,n);break e}ve(e,t,r,n)}t=t.child}return t;case 5:return Pd(t),e===null&&Ys(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Vs(r,i)?s=null:o!==null&&Vs(r,o)&&(t.flags|=32),Jd(e,t),ve(e,t,s,n),t.child;case 6:return e===null&&Ys(t),null;case 13:return tf(e,t,n);case 4:return Gl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hn(t,null,r,n):ve(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),ma(e,t,r,i,n);case 7:return ve(e,t,t.pendingProps,n),t.child;case 8:return ve(e,t,t.pendingProps.children,n),t.child;case 12:return ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,W(qi,r._currentValue),r._currentValue=s,o!==null)if(it(o.value,s)){if(o.children===i.children&&!xe.current){t=Et(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=yt(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var g=a.pending;g===null?u.next=u:(u.next=g.next,g.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Xs(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(_(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Xs(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ve(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,bn(t,n),i=Qe(i),r=r(i),t.flags|=1,ve(e,t,r,n),t.child;case 14:return r=t.type,i=Je(r,t.pendingProps),i=Je(r.type,i),va(e,t,r,i,n);case 15:return Xd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),Di(e,t),t.tag=1,Oe(r)?(e=!0,Vi(t)):e=!1,bn(t,n),Od(t,r,i),Js(t,r,i,n),nl(null,t,r,!0,e,n);case 19:return nf(e,t,n);case 22:return Zd(e,t,n)}throw Error(_(156,t.tag))};function Sf(e,t){return Bc(e,t)}function R0(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Be(e,t,n,r){return new R0(e,t,n,r)}function cu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function M0(e){if(typeof e=="function")return cu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pl)return 11;if(e===Ll)return 14}return 2}function Vt(e,t){var n=e.alternate;return n===null?(n=Be(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ii(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")cu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case En:return sn(n.children,i,o,t);case Dl:s=8,i|=8;break;case ks:return e=Be(12,n,t,i|2),e.elementType=ks,e.lanes=o,e;case _s:return e=Be(13,n,t,i),e.elementType=_s,e.lanes=o,e;case xs:return e=Be(19,n,t,i),e.elementType=xs,e.lanes=o,e;case Tc:return yo(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xc:s=10;break e;case Oc:s=9;break e;case Pl:s=11;break e;case Ll:s=14;break e;case Lt:s=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Be(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function sn(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function yo(e,t,n,r){return e=Be(22,e,r,t),e.elementType=Tc,e.lanes=n,e.stateNode={isHidden:!1},e}function us(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function as(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function A0(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wo(0),this.expirationTimes=Wo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function du(e,t,n,r,i,o,s,l,u){return e=new A0(e,t,n,l,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Be(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ql(o),e}function b0(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kf)}catch(e){console.error(e)}}kf(),wc.exports=Re;var H0=wc.exports,Ia=H0;Cs.createRoot=Ia.createRoot,Cs.hydrateRoot=Ia.hydrateRoot;/** * @license * Copyright (c) 2023, Jeff Hlywa (jhlywa@gmail.com) * All rights reserved. @@ -62,13 +62,13 @@ Error generating stack: `+o.message+` * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - */const pe="w",$e="b",oe="p",pl="n",Ni="b",dr="r",Nt="q",ne="k",cs="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",Ee=-1,W0={NORMAL:"n",CAPTURE:"c",BIG_PAWN:"b",EP_CAPTURE:"e",PROMOTION:"p",KSIDE_CASTLE:"k",QSIDE_CASTLE:"q"},I={NORMAL:1,CAPTURE:2,BIG_PAWN:4,EP_CAPTURE:8,PROMOTION:16,KSIDE_CASTLE:32,QSIDE_CASTLE:64},R={a8:0,b8:1,c8:2,d8:3,e8:4,f8:5,g8:6,h8:7,a7:16,b7:17,c7:18,d7:19,e7:20,f7:21,g7:22,h7:23,a6:32,b6:33,c6:34,d6:35,e6:36,f6:37,g6:38,h6:39,a5:48,b5:49,c5:50,d5:51,e5:52,f5:53,g5:54,h5:55,a4:64,b4:65,c4:66,d4:67,e4:68,f4:69,g4:70,h4:71,a3:80,b3:81,c3:82,d3:83,e3:84,f3:85,g3:86,h3:87,a2:96,b2:97,c2:98,d2:99,e2:100,f2:101,g2:102,h2:103,a1:112,b1:113,c1:114,d1:115,e1:116,f1:117,g1:118,h1:119},ds={b:[16,32,17,15],w:[-16,-32,-17,-15]},Na={n:[-18,-33,-31,-14,18,33,31,14],b:[-17,-15,17,15],r:[-16,1,16,-1],q:[-17,-16,-15,1,17,16,15,-1],k:[-17,-16,-15,1,17,16,15,-1]},B0=[20,0,0,0,0,0,0,24,0,0,0,0,0,0,20,0,0,20,0,0,0,0,0,24,0,0,0,0,0,20,0,0,0,0,20,0,0,0,0,24,0,0,0,0,20,0,0,0,0,0,0,20,0,0,0,24,0,0,0,20,0,0,0,0,0,0,0,0,20,0,0,24,0,0,20,0,0,0,0,0,0,0,0,0,0,20,2,24,2,20,0,0,0,0,0,0,0,0,0,0,0,2,53,56,53,2,0,0,0,0,0,0,24,24,24,24,24,24,56,0,56,24,24,24,24,24,24,0,0,0,0,0,0,2,53,56,53,2,0,0,0,0,0,0,0,0,0,0,0,20,2,24,2,20,0,0,0,0,0,0,0,0,0,0,20,0,0,24,0,0,20,0,0,0,0,0,0,0,0,20,0,0,0,24,0,0,0,20,0,0,0,0,0,0,20,0,0,0,0,24,0,0,0,0,20,0,0,0,0,20,0,0,0,0,0,24,0,0,0,0,0,20,0,0,20,0,0,0,0,0,0,24,0,0,0,0,0,0,20],V0=[17,0,0,0,0,0,0,16,0,0,0,0,0,0,15,0,0,17,0,0,0,0,0,16,0,0,0,0,0,15,0,0,0,0,17,0,0,0,0,16,0,0,0,0,15,0,0,0,0,0,0,17,0,0,0,16,0,0,0,15,0,0,0,0,0,0,0,0,17,0,0,16,0,0,15,0,0,0,0,0,0,0,0,0,0,17,0,16,0,15,0,0,0,0,0,0,0,0,0,0,0,0,17,16,15,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,-15,-16,-17,0,0,0,0,0,0,0,0,0,0,0,0,-15,0,-16,0,-17,0,0,0,0,0,0,0,0,0,0,-15,0,0,-16,0,0,-17,0,0,0,0,0,0,0,0,-15,0,0,0,-16,0,0,0,-17,0,0,0,0,0,0,-15,0,0,0,0,-16,0,0,0,0,-17,0,0,0,0,-15,0,0,0,0,0,-16,0,0,0,0,0,-17,0,0,-15,0,0,0,0,0,0,-16,0,0,0,0,0,0,-17],Q0={p:1,n:2,b:4,r:8,q:16,k:32},K0="pnbrqkPNBRQK",ja=[pl,Ni,dr,Nt],q0=7,G0=6,Y0=1,X0=0,vi={[ne]:I.KSIDE_CASTLE,[Nt]:I.QSIDE_CASTLE},Dt={w:[{square:R.a1,flag:I.QSIDE_CASTLE},{square:R.h1,flag:I.KSIDE_CASTLE}],b:[{square:R.a8,flag:I.QSIDE_CASTLE},{square:R.h8,flag:I.KSIDE_CASTLE}]},Z0={b:Y0,w:G0},J0=["1-0","0-1","1/2-1/2","*"];function ln(e){return e>>4}function $r(e){return e&15}function _f(e){return"0123456789".indexOf(e)!==-1}function Pe(e){const t=$r(e),n=ln(e);return"abcdefgh".substring(t,t+1)+"87654321".substring(n,n+1)}function ir(e){return e===pe?$e:pe}function eg(e){const t=e.split(/\s+/);if(t.length!==6)return{ok:!1,error:"Invalid FEN: must contain six space-delimited fields"};const n=parseInt(t[5],10);if(isNaN(n)||n<=0)return{ok:!1,error:"Invalid FEN: move number must be a positive integer"};const r=parseInt(t[4],10);if(isNaN(r)||r<0)return{ok:!1,error:"Invalid FEN: half move counter number must be a non-negative integer"};if(!/^(-|[abcdefgh][36])$/.test(t[3]))return{ok:!1,error:"Invalid FEN: en-passant square is invalid"};if(/[^kKqQ-]/.test(t[2]))return{ok:!1,error:"Invalid FEN: castling availability is invalid"};if(!/^(w|b)$/.test(t[1]))return{ok:!1,error:"Invalid FEN: side-to-move is invalid"};const i=t[0].split("/");if(i.length!==8)return{ok:!1,error:"Invalid FEN: piece data does not contain 8 '/'-delimited rows"};for(let s=0;s1)return{ok:!1,error:`Invalid FEN: too many ${s} kings`}}return Array.from(i[0]+i[7]).some(s=>s.toUpperCase()==="P")?{ok:!1,error:"Invalid FEN: some pawns are on the edge rows"}:{ok:!0}}function tg(e,t){const n=e.from,r=e.to,i=e.piece;let o=0,s=0,l=0;for(let u=0,a=t.length;u0?s>0&&l>0?Pe(n):l>0?Pe(n).charAt(1):Pe(n).charAt(0):""}function Pt(e,t,n,r,i,o=void 0,s=I.NORMAL){const l=ln(r);if(i===oe&&(l===q0||l===X0))for(let u=0;u="a"&&t<="h"?e.match(/[a-h]\d.*[a-h]\d/)?void 0:oe:(t=t.toLowerCase(),t==="o"?ne:t)}function fs(e){return e.replace(/=/,"").replace(/[+#]?[?!]*$/,"")}function Ma(e){return e.split(" ").slice(0,4).join(" ")}class ng{constructor(t=cs){be(this,"_board",new Array(128));be(this,"_turn",pe);be(this,"_header",{});be(this,"_kings",{w:Ee,b:Ee});be(this,"_epSquare",-1);be(this,"_halfMoves",0);be(this,"_moveNumber",0);be(this,"_history",[]);be(this,"_comments",{});be(this,"_castling",{w:0,b:0});be(this,"_positionCounts",{});this.load(t)}clear({preserveHeaders:t=!1}={}){this._board=new Array(128),this._kings={w:Ee,b:Ee},this._turn=pe,this._castling={w:0,b:0},this._epSquare=Ee,this._halfMoves=0,this._moveNumber=1,this._history=[],this._comments={},this._header=t?this._header:{},delete this._header.SetUp,delete this._header.FEN,this._positionCounts=new Proxy({},{get:(n,r)=>r==="length"?Object.keys(n).length:(n==null?void 0:n[Ma(r)])||0,set:(n,r,i)=>{const o=Ma(r);return i===0?delete n[o]:n[o]=i,!0}})}removeHeader(t){t in this._header&&delete this._header[t]}load(t,{skipValidation:n=!1,preserveHeaders:r=!1}={}){let i=t.split(/\s+/);if(i.length>=2&&i.length<6){const l=["-","-","0","1"];t=i.concat(l.slice(-(6-i.length))).join(" ")}if(i=t.split(/\s+/),!n){const{ok:l,error:u}=eg(t);if(!l)throw new Error(u)}const o=i[0];let s=0;this.clear({preserveHeaders:r});for(let l=0;l-1&&(this._castling.w|=I.KSIDE_CASTLE),i[2].indexOf("Q")>-1&&(this._castling.w|=I.QSIDE_CASTLE),i[2].indexOf("k")>-1&&(this._castling.b|=I.KSIDE_CASTLE),i[2].indexOf("q")>-1&&(this._castling.b|=I.QSIDE_CASTLE),this._epSquare=i[3]==="-"?Ee:R[i[3]],this._halfMoves=parseInt(i[4],10),this._moveNumber=parseInt(i[5],10),this._updateSetup(t),this._positionCounts[t]++}fen(){var o,s;let t=0,n="";for(let l=R.a8;l<=R.h1;l++){if(this._board[l]){t>0&&(n+=t,t=0);const{color:u,type:a}=this._board[l];n+=u===pe?a.toUpperCase():a.toLowerCase()}else t++;l+1&136&&(t>0&&(n+=t),l!==R.h1&&(n+="/"),t=0,l+=8)}let r="";this._castling[pe]&I.KSIDE_CASTLE&&(r+="K"),this._castling[pe]&I.QSIDE_CASTLE&&(r+="Q"),this._castling[$e]&I.KSIDE_CASTLE&&(r+="k"),this._castling[$e]&I.QSIDE_CASTLE&&(r+="q"),r=r||"-";let i="-";if(this._epSquare!==Ee){const l=this._epSquare+(this._turn===pe?16:-16),u=[l+1,l-1];for(const a of u){if(a&136)continue;const g=this._turn;if(((o=this._board[a])==null?void 0:o.color)===g&&((s=this._board[a])==null?void 0:s.type)===oe){this._makeMove({color:g,from:a,to:this._epSquare,piece:oe,captured:oe,flags:I.EP_CAPTURE});const p=!this._isKingAttacked(g);if(this._undoMove(),p){i=Pe(this._epSquare);break}}}}return[n,this._turn,r,i,this._halfMoves,this._moveNumber].join(" ")}_updateSetup(t){this._history.length>0||(t!==cs?(this._header.SetUp="1",this._header.FEN=t):(delete this._header.SetUp,delete this._header.FEN))}reset(){this.load(cs)}get(t){return this._board[R[t]]||!1}put({type:t,color:n},r){return this._put({type:t,color:n},r)?(this._updateCastlingRights(),this._updateEnPassantSquare(),this._updateSetup(this.fen()),!0):!1}_put({type:t,color:n},r){if(K0.indexOf(t.toLowerCase())===-1||!(r in R))return!1;const i=R[r];if(t==ne&&!(this._kings[n]==Ee||this._kings[n]==i))return!1;const o=this._board[i];return o&&o.type===ne&&(this._kings[o.color]=Ee),this._board[i]={type:t,color:n},t===ne&&(this._kings[n]=i),!0}remove(t){const n=this.get(t);return delete this._board[R[t]],n&&n.type===ne&&(this._kings[n.color]=Ee),this._updateCastlingRights(),this._updateEnPassantSquare(),this._updateSetup(this.fen()),n}_updateCastlingRights(){var r,i,o,s,l,u,a,g,p,f,S,m;const t=((r=this._board[R.e1])==null?void 0:r.type)===ne&&((i=this._board[R.e1])==null?void 0:i.color)===pe,n=((o=this._board[R.e8])==null?void 0:o.type)===ne&&((s=this._board[R.e8])==null?void 0:s.color)===$e;(!t||((l=this._board[R.a1])==null?void 0:l.type)!==dr||((u=this._board[R.a1])==null?void 0:u.color)!==pe)&&(this._castling.w&=~I.QSIDE_CASTLE),(!t||((a=this._board[R.h1])==null?void 0:a.type)!==dr||((g=this._board[R.h1])==null?void 0:g.color)!==pe)&&(this._castling.w&=~I.KSIDE_CASTLE),(!n||((p=this._board[R.a8])==null?void 0:p.type)!==dr||((f=this._board[R.a8])==null?void 0:f.color)!==$e)&&(this._castling.b&=~I.QSIDE_CASTLE),(!n||((S=this._board[R.h8])==null?void 0:S.type)!==dr||((m=this._board[R.h8])==null?void 0:m.color)!==$e)&&(this._castling.b&=~I.KSIDE_CASTLE)}_updateEnPassantSquare(){var o,s;if(this._epSquare===Ee)return;const t=this._epSquare+(this._turn===pe?-16:16),n=this._epSquare+(this._turn===pe?16:-16),r=[n+1,n-1];if(this._board[t]!==null||this._board[this._epSquare]!==null||((o=this._board[n])==null?void 0:o.color)!==ir(this._turn)||((s=this._board[n])==null?void 0:s.type)!==oe){this._epSquare=Ee;return}const i=l=>{var u,a;return!(l&136)&&((u=this._board[l])==null?void 0:u.color)===this._turn&&((a=this._board[l])==null?void 0:a.type)===oe};r.some(i)||(this._epSquare=Ee)}_attacked(t,n){for(let r=R.a8;r<=R.h1;r++){if(r&136){r+=7;continue}if(this._board[r]===void 0||this._board[r].color!==t)continue;const i=this._board[r],o=r-n;if(o===0)continue;const s=o+119;if(B0[s]&Q0[i.type]){if(i.type===oe){if(o>0){if(i.color===pe)return!0}else if(i.color===$e)return!0;continue}if(i.type==="n"||i.type==="k")return!0;const l=V0[s];let u=r+l,a=!1;for(;u!==n;){if(this._board[u]!=null){a=!0;break}u+=l}if(!a)return!0}}return!1}_isKingAttacked(t){const n=this._kings[t];return n===-1?!1:this._attacked(ir(t),n)}isAttacked(t,n){return this._attacked(n,R[t])}isCheck(){return this._isKingAttacked(this._turn)}inCheck(){return this.isCheck()}isCheckmate(){return this.isCheck()&&this._moves().length===0}isStalemate(){return!this.isCheck()&&this._moves().length===0}isInsufficientMaterial(){const t={b:0,n:0,r:0,q:0,k:0,p:0},n=[];let r=0,i=0;for(let o=R.a8;o<=R.h1;o++){if(i=(i+1)%2,o&136){o+=7;continue}const s=this._board[o];s&&(t[s.type]=s.type in t?t[s.type]+1:1,s.type===Ni&&n.push(i),r++)}if(r===2)return!0;if(r===3&&(t[Ni]===1||t[pl]===1))return!0;if(r===t[Ni]+2){let o=0;const s=n.length;for(let l=0;l=3}isDraw(){return this._halfMoves>=100||this.isStalemate()||this.isInsufficientMaterial()||this.isThreefoldRepetition()}isGameOver(){return this.isCheckmate()||this.isStalemate()||this.isDraw()}moves({verbose:t=!1,square:n=void 0,piece:r=void 0}={}){const i=this._moves({square:n,piece:r});return t?i.map(o=>this._makePretty(o)):i.map(o=>this._moveToSan(o,i))}_moves({legal:t=!0,piece:n=void 0,square:r=void 0}={}){var S;const i=r?r.toLowerCase():void 0,o=n==null?void 0:n.toLowerCase(),s=[],l=this._turn,u=ir(l);let a=R.a8,g=R.h1,p=!1;if(i)if(i in R)a=g=R[i],p=!0;else return[];for(let m=a;m<=g;m++){if(m&136){m+=7;continue}if(!this._board[m]||this._board[m].color===u)continue;const{type:y}=this._board[m];let C;if(y===oe){if(o&&o!==y)continue;C=m+ds[l][0],this._board[C]||(Pt(s,l,m,C,oe),C=m+ds[l][1],Z0[l]===ln(m)&&!this._board[C]&&Pt(s,l,m,C,oe,void 0,I.BIG_PAWN));for(let d=2;d<4;d++)C=m+ds[l][d],!(C&136)&&(((S=this._board[C])==null?void 0:S.color)===u?Pt(s,l,m,C,oe,this._board[C].type,I.CAPTURE):C===this._epSquare&&Pt(s,l,m,C,oe,oe,I.EP_CAPTURE))}else{if(o&&o!==y)continue;for(let d=0,c=Na[y].length;d>4}function $r(e){return e&15}function _f(e){return"0123456789".indexOf(e)!==-1}function Pe(e){const t=$r(e),n=ln(e);return"abcdefgh".substring(t,t+1)+"87654321".substring(n,n+1)}function ir(e){return e===pe?$e:pe}function eg(e){const t=e.split(/\s+/);if(t.length!==6)return{ok:!1,error:"Invalid FEN: must contain six space-delimited fields"};const n=parseInt(t[5],10);if(isNaN(n)||n<=0)return{ok:!1,error:"Invalid FEN: move number must be a positive integer"};const r=parseInt(t[4],10);if(isNaN(r)||r<0)return{ok:!1,error:"Invalid FEN: half move counter number must be a non-negative integer"};if(!/^(-|[abcdefgh][36])$/.test(t[3]))return{ok:!1,error:"Invalid FEN: en-passant square is invalid"};if(/[^kKqQ-]/.test(t[2]))return{ok:!1,error:"Invalid FEN: castling availability is invalid"};if(!/^(w|b)$/.test(t[1]))return{ok:!1,error:"Invalid FEN: side-to-move is invalid"};const i=t[0].split("/");if(i.length!==8)return{ok:!1,error:"Invalid FEN: piece data does not contain 8 '/'-delimited rows"};for(let s=0;s1)return{ok:!1,error:`Invalid FEN: too many ${s} kings`}}return Array.from(i[0]+i[7]).some(s=>s.toUpperCase()==="P")?{ok:!1,error:"Invalid FEN: some pawns are on the edge rows"}:{ok:!0}}function tg(e,t){const n=e.from,r=e.to,i=e.piece;let o=0,s=0,l=0;for(let u=0,a=t.length;u0?s>0&&l>0?Pe(n):l>0?Pe(n).charAt(1):Pe(n).charAt(0):""}function Pt(e,t,n,r,i,o=void 0,s=I.NORMAL){const l=ln(r);if(i===oe&&(l===q0||l===X0))for(let u=0;u="a"&&t<="h"?e.match(/[a-h]\d.*[a-h]\d/)?void 0:oe:(t=t.toLowerCase(),t==="o"?ne:t)}function fs(e){return e.replace(/=/,"").replace(/[+#]?[?!]*$/,"")}function Ma(e){return e.split(" ").slice(0,4).join(" ")}class ng{constructor(t=cs){ze(this,"_board",new Array(128));ze(this,"_turn",pe);ze(this,"_header",{});ze(this,"_kings",{w:Ee,b:Ee});ze(this,"_epSquare",-1);ze(this,"_halfMoves",0);ze(this,"_moveNumber",0);ze(this,"_history",[]);ze(this,"_comments",{});ze(this,"_castling",{w:0,b:0});ze(this,"_positionCounts",{});this.load(t)}clear({preserveHeaders:t=!1}={}){this._board=new Array(128),this._kings={w:Ee,b:Ee},this._turn=pe,this._castling={w:0,b:0},this._epSquare=Ee,this._halfMoves=0,this._moveNumber=1,this._history=[],this._comments={},this._header=t?this._header:{},delete this._header.SetUp,delete this._header.FEN,this._positionCounts=new Proxy({},{get:(n,r)=>r==="length"?Object.keys(n).length:(n==null?void 0:n[Ma(r)])||0,set:(n,r,i)=>{const o=Ma(r);return i===0?delete n[o]:n[o]=i,!0}})}removeHeader(t){t in this._header&&delete this._header[t]}load(t,{skipValidation:n=!1,preserveHeaders:r=!1}={}){let i=t.split(/\s+/);if(i.length>=2&&i.length<6){const l=["-","-","0","1"];t=i.concat(l.slice(-(6-i.length))).join(" ")}if(i=t.split(/\s+/),!n){const{ok:l,error:u}=eg(t);if(!l)throw new Error(u)}const o=i[0];let s=0;this.clear({preserveHeaders:r});for(let l=0;l-1&&(this._castling.w|=I.KSIDE_CASTLE),i[2].indexOf("Q")>-1&&(this._castling.w|=I.QSIDE_CASTLE),i[2].indexOf("k")>-1&&(this._castling.b|=I.KSIDE_CASTLE),i[2].indexOf("q")>-1&&(this._castling.b|=I.QSIDE_CASTLE),this._epSquare=i[3]==="-"?Ee:R[i[3]],this._halfMoves=parseInt(i[4],10),this._moveNumber=parseInt(i[5],10),this._updateSetup(t),this._positionCounts[t]++}fen(){var o,s;let t=0,n="";for(let l=R.a8;l<=R.h1;l++){if(this._board[l]){t>0&&(n+=t,t=0);const{color:u,type:a}=this._board[l];n+=u===pe?a.toUpperCase():a.toLowerCase()}else t++;l+1&136&&(t>0&&(n+=t),l!==R.h1&&(n+="/"),t=0,l+=8)}let r="";this._castling[pe]&I.KSIDE_CASTLE&&(r+="K"),this._castling[pe]&I.QSIDE_CASTLE&&(r+="Q"),this._castling[$e]&I.KSIDE_CASTLE&&(r+="k"),this._castling[$e]&I.QSIDE_CASTLE&&(r+="q"),r=r||"-";let i="-";if(this._epSquare!==Ee){const l=this._epSquare+(this._turn===pe?16:-16),u=[l+1,l-1];for(const a of u){if(a&136)continue;const g=this._turn;if(((o=this._board[a])==null?void 0:o.color)===g&&((s=this._board[a])==null?void 0:s.type)===oe){this._makeMove({color:g,from:a,to:this._epSquare,piece:oe,captured:oe,flags:I.EP_CAPTURE});const p=!this._isKingAttacked(g);if(this._undoMove(),p){i=Pe(this._epSquare);break}}}}return[n,this._turn,r,i,this._halfMoves,this._moveNumber].join(" ")}_updateSetup(t){this._history.length>0||(t!==cs?(this._header.SetUp="1",this._header.FEN=t):(delete this._header.SetUp,delete this._header.FEN))}reset(){this.load(cs)}get(t){return this._board[R[t]]||!1}put({type:t,color:n},r){return this._put({type:t,color:n},r)?(this._updateCastlingRights(),this._updateEnPassantSquare(),this._updateSetup(this.fen()),!0):!1}_put({type:t,color:n},r){if(K0.indexOf(t.toLowerCase())===-1||!(r in R))return!1;const i=R[r];if(t==ne&&!(this._kings[n]==Ee||this._kings[n]==i))return!1;const o=this._board[i];return o&&o.type===ne&&(this._kings[o.color]=Ee),this._board[i]={type:t,color:n},t===ne&&(this._kings[n]=i),!0}remove(t){const n=this.get(t);return delete this._board[R[t]],n&&n.type===ne&&(this._kings[n.color]=Ee),this._updateCastlingRights(),this._updateEnPassantSquare(),this._updateSetup(this.fen()),n}_updateCastlingRights(){var r,i,o,s,l,u,a,g,p,f,S,m;const t=((r=this._board[R.e1])==null?void 0:r.type)===ne&&((i=this._board[R.e1])==null?void 0:i.color)===pe,n=((o=this._board[R.e8])==null?void 0:o.type)===ne&&((s=this._board[R.e8])==null?void 0:s.color)===$e;(!t||((l=this._board[R.a1])==null?void 0:l.type)!==dr||((u=this._board[R.a1])==null?void 0:u.color)!==pe)&&(this._castling.w&=~I.QSIDE_CASTLE),(!t||((a=this._board[R.h1])==null?void 0:a.type)!==dr||((g=this._board[R.h1])==null?void 0:g.color)!==pe)&&(this._castling.w&=~I.KSIDE_CASTLE),(!n||((p=this._board[R.a8])==null?void 0:p.type)!==dr||((f=this._board[R.a8])==null?void 0:f.color)!==$e)&&(this._castling.b&=~I.QSIDE_CASTLE),(!n||((S=this._board[R.h8])==null?void 0:S.type)!==dr||((m=this._board[R.h8])==null?void 0:m.color)!==$e)&&(this._castling.b&=~I.KSIDE_CASTLE)}_updateEnPassantSquare(){var o,s;if(this._epSquare===Ee)return;const t=this._epSquare+(this._turn===pe?-16:16),n=this._epSquare+(this._turn===pe?16:-16),r=[n+1,n-1];if(this._board[t]!==null||this._board[this._epSquare]!==null||((o=this._board[n])==null?void 0:o.color)!==ir(this._turn)||((s=this._board[n])==null?void 0:s.type)!==oe){this._epSquare=Ee;return}const i=l=>{var u,a;return!(l&136)&&((u=this._board[l])==null?void 0:u.color)===this._turn&&((a=this._board[l])==null?void 0:a.type)===oe};r.some(i)||(this._epSquare=Ee)}_attacked(t,n){for(let r=R.a8;r<=R.h1;r++){if(r&136){r+=7;continue}if(this._board[r]===void 0||this._board[r].color!==t)continue;const i=this._board[r],o=r-n;if(o===0)continue;const s=o+119;if(B0[s]&Q0[i.type]){if(i.type===oe){if(o>0){if(i.color===pe)return!0}else if(i.color===$e)return!0;continue}if(i.type==="n"||i.type==="k")return!0;const l=V0[s];let u=r+l,a=!1;for(;u!==n;){if(this._board[u]!=null){a=!0;break}u+=l}if(!a)return!0}}return!1}_isKingAttacked(t){const n=this._kings[t];return n===-1?!1:this._attacked(ir(t),n)}isAttacked(t,n){return this._attacked(n,R[t])}isCheck(){return this._isKingAttacked(this._turn)}inCheck(){return this.isCheck()}isCheckmate(){return this.isCheck()&&this._moves().length===0}isStalemate(){return!this.isCheck()&&this._moves().length===0}isInsufficientMaterial(){const t={b:0,n:0,r:0,q:0,k:0,p:0},n=[];let r=0,i=0;for(let o=R.a8;o<=R.h1;o++){if(i=(i+1)%2,o&136){o+=7;continue}const s=this._board[o];s&&(t[s.type]=s.type in t?t[s.type]+1:1,s.type===Ni&&n.push(i),r++)}if(r===2)return!0;if(r===3&&(t[Ni]===1||t[pl]===1))return!0;if(r===t[Ni]+2){let o=0;const s=n.length;for(let l=0;l=3}isDraw(){return this._halfMoves>=100||this.isStalemate()||this.isInsufficientMaterial()||this.isThreefoldRepetition()}isGameOver(){return this.isCheckmate()||this.isStalemate()||this.isDraw()}moves({verbose:t=!1,square:n=void 0,piece:r=void 0}={}){const i=this._moves({square:n,piece:r});return t?i.map(o=>this._makePretty(o)):i.map(o=>this._moveToSan(o,i))}_moves({legal:t=!0,piece:n=void 0,square:r=void 0}={}){var S;const i=r?r.toLowerCase():void 0,o=n==null?void 0:n.toLowerCase(),s=[],l=this._turn,u=ir(l);let a=R.a8,g=R.h1,p=!1;if(i)if(i in R)a=g=R[i],p=!0;else return[];for(let m=a;m<=g;m++){if(m&136){m+=7;continue}if(!this._board[m]||this._board[m].color===u)continue;const{type:y}=this._board[m];let C;if(y===oe){if(o&&o!==y)continue;C=m+ds[l][0],this._board[C]||(Pt(s,l,m,C,oe),C=m+ds[l][1],Z0[l]===ln(m)&&!this._board[C]&&Pt(s,l,m,C,oe,void 0,I.BIG_PAWN));for(let d=2;d<4;d++)C=m+ds[l][d],!(C&136)&&(((S=this._board[C])==null?void 0:S.color)===u?Pt(s,l,m,C,oe,this._board[C].type,I.CAPTURE):C===this._epSquare&&Pt(s,l,m,C,oe,oe,I.EP_CAPTURE))}else{if(o&&o!==y)continue;for(let d=0,c=Na[y].length;d{const S=this._comments[this.fen()];if(typeof S<"u"){const m=f.length>0?" ":"";f=`${f}${m}{${S}}`}return f},s=[];for(;this._history.length>0;)s.push(this._undoMove());const l=[];let u="";for(s.length===0&&l.push(o(""));s.length>0;){u=o(u);const f=s.pop();if(!f)break;if(!this._history.length&&f.color==="b"){const S=`${this._moveNumber}. ...`;u=u?`${u} ${S}`:S}else f.color==="w"&&(u.length&&l.push(u),u=this._moveNumber+".");u=u+" "+this._moveToSan(f,this._moves({legal:!0})),this._makeMove(f)}if(u.length&&l.push(o(u)),typeof this._header.Result<"u"&&l.push(this._header.Result),n===0)return r.join("")+l.join(" ");const a=function(){return r.length>0&&r[r.length-1]===" "?(r.pop(),!0):!1},g=function(f,S){for(const m of S.split(" "))if(m){if(f+m.length>n){for(;a();)f--;r.push(t),f=0}r.push(m),f+=m.length,r.push(" "),f++}return a()&&f--,f};let p=0;for(let f=0;fn&&l[f].includes("{")){p=g(p,l[f]);continue}p+l[f].length>n&&f!==0?(r[r.length-1]===" "&&r.pop(),r.push(t),p=0):f!==0&&(r.push(" "),p++),r.push(l[f]),p+=l[f].length}return r.join("")}header(...t){for(let n=0;n0&&(w[O]=x)}return w}t=t.trim();const l=new RegExp("^(\\[((?:"+i(r)+")|.)*\\])((?:\\s*"+i(r)+"){2}|(?:\\s*"+i(r)+")*$)").exec(t),u=l&&l.length>=2?l[1]:"";this.reset();const a=o(u);let g="";for(const h in a)h.toLowerCase()==="fen"&&(g=a[h]),this.header(h,a[h]);if(!n)g&&this.load(g,{preserveHeaders:!0});else if(a.SetUp==="1"){if(!("FEN"in a))throw new Error("Invalid PGN: FEN tag must be supplied with SetUp tag");this.load(a.FEN,{preserveHeaders:!0})}function p(h){return Array.from(h).map(function(w){return w.charCodeAt(0)<128?w.charCodeAt(0).toString(16):encodeURIComponent(w).replace(/%/g,"").toLowerCase()}).join("")}function f(h){return h.length==0?"":decodeURIComponent("%"+(h.match(/.{1,2}/g)||[]).join("%"))}const S=function(h){return h=h.replace(new RegExp(i(r),"g")," "),`{${p(h.slice(1,h.length-1))}}`},m=function(h){if(h.startsWith("{")&&h.endsWith("}"))return f(h.slice(1,h.length-1))};let y=t.replace(u,"").replace(new RegExp(`({[^}]*})+?|;([^${i(r)}]*)`,"g"),function(h,w,k){return w!==void 0?S(w):" "+S(`{${k.slice(1)}}`)}).replace(new RegExp(i(r),"g")," ");const C=/(\([^()]+\))+?/g;for(;C.test(y);)y=y.replace(C,"");y=y.replace(/\d+\.(\.\.)?/g,""),y=y.replace(/\.\.\./g,""),y=y.replace(/\$\d+/g,"");let d=y.trim().split(new RegExp(/\s+/));d=d.filter(h=>h!=="");let c="";for(let h=0;h-1)c=d[h];else throw new Error(`Invalid move in PGN: ${d[h]}`);else c="",this._makeMove(k),this._positionCounts[this.fen()]++}c&&Object.keys(this._header).length&&!this._header.Result&&this.header("Result",c)}_moveToSan(t,n){let r="";if(t.flags&I.KSIDE_CASTLE)r="O-O";else if(t.flags&I.QSIDE_CASTLE)r="O-O-O";else{if(t.piece!==oe){const i=tg(t,n);r+=t.piece.toUpperCase()+i}t.flags&(I.CAPTURE|I.EP_CAPTURE)&&(t.piece===oe&&(r+=Pe(t.from)[0]),r+="x"),r+=Pe(t.to),t.promotion&&(r+="="+t.promotion.toUpperCase())}return this._makeMove(t),this.isCheck()&&(this.isCheckmate()?r+="#":r+="+"),this._undoMove(),r}_moveFromSan(t,n=!1){const r=fs(t);let i=Ra(r),o=this._moves({legal:!0,piece:i});for(let f=0,S=o.length;f0&&(w[O]=x)}return w}t=t.trim();const l=new RegExp("^(\\[((?:"+i(r)+")|.)*\\])((?:\\s*"+i(r)+"){2}|(?:\\s*"+i(r)+")*$)").exec(t),u=l&&l.length>=2?l[1]:"";this.reset();const a=o(u);let g="";for(const h in a)h.toLowerCase()==="fen"&&(g=a[h]),this.header(h,a[h]);if(!n)g&&this.load(g,{preserveHeaders:!0});else if(a.SetUp==="1"){if(!("FEN"in a))throw new Error("Invalid PGN: FEN tag must be supplied with SetUp tag");this.load(a.FEN,{preserveHeaders:!0})}function p(h){return Array.from(h).map(function(w){return w.charCodeAt(0)<128?w.charCodeAt(0).toString(16):encodeURIComponent(w).replace(/%/g,"").toLowerCase()}).join("")}function f(h){return h.length==0?"":decodeURIComponent("%"+(h.match(/.{1,2}/g)||[]).join("%"))}const S=function(h){return h=h.replace(new RegExp(i(r),"g")," "),`{${p(h.slice(1,h.length-1))}}`},m=function(h){if(h.startsWith("{")&&h.endsWith("}"))return f(h.slice(1,h.length-1))};let y=t.replace(u,"").replace(new RegExp(`({[^}]*})+?|;([^${i(r)}]*)`,"g"),function(h,w,k){return w!==void 0?S(w):" "+S(`{${k.slice(1)}}`)}).replace(new RegExp(i(r),"g")," ");const C=/(\([^()]+\))+?/g;for(;C.test(y);)y=y.replace(C,"");y=y.replace(/\d+\.(\.\.)?/g,""),y=y.replace(/\.\.\./g,""),y=y.replace(/\$\d+/g,"");let d=y.trim().split(new RegExp(/\s+/));d=d.filter(h=>h!=="");let c="";for(let h=0;h-1)c=d[h];else throw new Error(`Invalid move in PGN: ${d[h]}`);else c="",this._makeMove(k),this._positionCounts[this.fen()]++}c&&Object.keys(this._header).length&&!this._header.Result&&this.header("Result",c)}_moveToSan(t,n){let r="";if(t.flags&I.KSIDE_CASTLE)r="O-O";else if(t.flags&I.QSIDE_CASTLE)r="O-O-O";else{if(t.piece!==oe){const i=tg(t,n);r+=t.piece.toUpperCase()+i}t.flags&(I.CAPTURE|I.EP_CAPTURE)&&(t.piece===oe&&(r+=Pe(t.from)[0]),r+="x"),r+=Pe(t.to),t.promotion&&(r+="="+t.promotion.toUpperCase())}return this._makeMove(t),this.isCheck()&&(this.isCheckmate()?r+="#":r+="+"),this._undoMove(),r}_moveFromSan(t,n=!1){const r=fs(t);let i=Ra(r),o=this._moves({legal:!0,piece:i});for(let f=0,S=o.length;f0?r+=this.perft(t-1):r++),this._undoMove();return r}_makePretty(t){const{color:n,piece:r,from:i,to:o,flags:s,captured:l,promotion:u}=t;let a="";for(const S in I)I[S]&s&&(a+=W0[S]);const g=Pe(i),p=Pe(o),f={color:n,piece:r,from:g,to:p,san:this._moveToSan(t,this._moves({legal:!0})),flags:a,lan:g+p,before:this.fen(),after:""};return this._makeMove(t),f.after=this.fen(),this._undoMove(),l&&(f.captured=l),u&&(f.promotion=u,f.lan+=u),f}turn(){return this._turn}board(){const t=[];let n=[];for(let r=R.a8;r<=R.h1;r++)this._board[r]==null?n.push(null):n.push({square:Pe(r),type:this._board[r].type,color:this._board[r].color}),r+1&136&&(t.push(n),n=[],r+=8);return t}squareColor(t){if(t in R){const n=R[t];return(ln(n)+$r(n))%2===0?"light":"dark"}return null}history({verbose:t=!1}={}){const n=[],r=[];for(;this._history.length>0;)n.push(this._undoMove());for(;;){const i=n.pop();if(!i)break;t?r.push(this._makePretty(i)):r.push(this._moveToSan(i,this._moves())),this._makeMove(i)}return r}_pruneComments(){const t=[],n={},r=i=>{i in this._comments&&(n[i]=this._comments[i])};for(;this._history.length>0;)t.push(this._undoMove());for(r(this.fen());;){const i=t.pop();if(!i)break;this._makeMove(i),r(this.fen())}this._comments=n}getComment(){return this._comments[this.fen()]}setComment(t){this._comments[this.fen()]=t.replace("{","[").replace("}","]")}deleteComment(){const t=this._comments[this.fen()];return delete this._comments[this.fen()],t}getComments(){return this._pruneComments(),Object.keys(this._comments).map(t=>({fen:t,comment:this._comments[t]}))}deleteComments(){return this._pruneComments(),Object.keys(this._comments).map(t=>{const n=this._comments[t];return delete this._comments[t],{fen:t,comment:n}})}setCastlingRights(t,n){for(const i of[ne,Nt])n[i]!==void 0&&(n[i]?this._castling[t]|=vi[i]:this._castling[t]&=~vi[i]);this._updateCastlingRights();const r=this.getCastlingRights(t);return(n[ne]===void 0||n[ne]===r[ne])&&(n[Nt]===void 0||n[Nt]===r[Nt])}getCastlingRights(t){return{[ne]:(this._castling[t]&vi[ne])!==0,[Nt]:(this._castling[t]&vi[Nt])!==0}}moveNumber(){return this._moveNumber}}function rg(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Fe(1));return n(Of)(e,t)}if(typeof e!="function")throw new Error(Fe(2));var i=e,o=t,s=[],l=s,u=!1;function a(){l===s&&(l=s.slice())}function g(){if(u)throw new Error(Fe(3));return o}function p(y){if(typeof y!="function")throw new Error(Fe(4));if(u)throw new Error(Fe(5));var C=!0;return a(),l.push(y),function(){if(C){if(u)throw new Error(Fe(6));C=!1,a();var c=l.indexOf(y);l.splice(c,1),s=null}}}function f(y){if(!ig(y))throw new Error(Fe(7));if(typeof y.type>"u")throw new Error(Fe(8));if(u)throw new Error(Fe(9));try{u=!0,o=i(o,y)}finally{u=!1}for(var C=s=l,d=0;dr&&r[i]?r[i]:n||null,e)}function lg(e,t){return e.filter(n=>n!==t)}function Tf(e){return typeof e=="object"}function ug(e,t){const n=new Map,r=o=>{n.set(o,n.has(o)?n.get(o)+1:1)};e.forEach(r),t.forEach(r);const i=[];return n.forEach((o,s)=>{o===1&&i.push(s)}),i}function ag(e,t){return e.filter(n=>t.indexOf(n)>-1)}const gu="dnd-core/INIT_COORDS",ko="dnd-core/BEGIN_DRAG",mu="dnd-core/PUBLISH_DRAG_SOURCE",_o="dnd-core/HOVER",xo="dnd-core/DROP",Oo="dnd-core/END_DRAG";function ba(e,t){return{type:gu,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const cg={type:gu,payload:{clientOffset:null,sourceClientOffset:null}};function dg(e){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:s}=r,l=e.getMonitor(),u=e.getRegistry();e.dispatch(ba(o)),fg(n,l,u);const a=gg(n,l);if(a==null){e.dispatch(cg);return}let g=null;if(o){if(!s)throw new Error("getSourceClientOffset must be defined");hg(s),g=s(a)}e.dispatch(ba(o,g));const f=u.getSource(a).beginDrag(l,a);if(f==null)return;pg(f),u.pinSource(a);const S=u.getSourceType(a);return{type:ko,payload:{itemType:S,item:f,sourceId:a,clientOffset:o||null,sourceClientOffset:g||null,isSourcePublic:!!i}}}}function fg(e,t,n){N(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(r){N(n.getSource(r),"Expected sourceIds to be registered.")})}function hg(e){N(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function pg(e){N(Tf(e),"Item must be an object.")}function gg(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function mg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vg(e){for(var t=1;t{const u=wg(s,l,i,r),a={type:xo,payload:{dropResult:vg({},n,u)}};e.dispatch(a)})}}function Sg(e){N(e.isDragging(),"Cannot call drop while not dragging."),N(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function wg(e,t,n,r){const i=n.getTarget(e);let o=i?i.drop(r,e):void 0;return Cg(o),typeof o>"u"&&(o=t===0?{}:r.getDropResult()),o}function Cg(e){N(typeof e>"u"||Tf(e),"Drop result must either be an object or undefined.")}function Eg(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function kg(e){return function(){const n=e.getMonitor(),r=e.getRegistry();_g(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:Oo}}}function _g(e){N(e.isDragging(),"Cannot call endDrag while not dragging.")}function gl(e,t){return t===null?e===null:Array.isArray(e)?e.some(n=>n===t):e===t}function xg(e){return function(n,{clientOffset:r}={}){Og(n);const i=n.slice(0),o=e.getMonitor(),s=e.getRegistry(),l=o.getItemType();return Dg(i,s,l),Tg(i,o,s),Pg(i,o,s),{type:_o,payload:{targetIds:i,clientOffset:r||null}}}}function Og(e){N(Array.isArray(e),"Expected targetIds to be an array.")}function Tg(e,t,n){N(t.isDragging(),"Cannot call hover while not dragging."),N(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r=0;r--){const i=e[r],o=t.getTargetType(i);gl(o,n)||e.splice(r,1)}}function Pg(e,t,n){e.forEach(function(r){n.getTarget(r).hover(t,r)})}function Lg(e){return function(){if(e.getMonitor().isDragging())return{type:mu}}}function Ig(e){return{beginDrag:dg(e),publishDragSource:Lg(e),hover:xg(e),drop:yg(e),endDrag:kg(e)}}class Ng{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:n}=this.store;function r(o){return(...s)=>{const l=o.apply(t,s);typeof l<"u"&&n(l)}}const i=Ig(this);return Object.keys(i).reduce((o,s)=>{const l=i[s];return o[s]=r(l),o},{})}dispatch(t){this.store.dispatch(t)}constructor(t,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}}function jg(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Df(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rg(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:Df(jg(t,r),n)}function Mg(e){const{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:Df(t,n)}const Cr=[],vu=[];Cr.__IS_NONE__=!0;vu.__IS_ALL__=!0;function Ag(e,t){return e===Cr?!1:e===vu||typeof t>"u"?!0:ag(t,e).length>0}class zg{subscribeToStateChange(t,n={}){const{handlerIds:r}=n;N(typeof t=="function","listener must be a function."),N(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const s=this.store.getState(),l=s.stateId;try{l===i||l===i+1&&!Ag(s.dirtyHandlerIds,r)||t()}finally{i=l}};return this.store.subscribe(o)}subscribeToOffsetChange(t){N(typeof t=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,t())};return this.store.subscribe(r)}canDragSource(t){if(!t)return!1;const n=this.registry.getSource(t);return N(n,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:n.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const n=this.registry.getTarget(t);if(N(n,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(t),i=this.getItemType();return gl(r,i)&&n.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const n=this.registry.getSource(t,!0);if(N(n,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(t),i=this.getItemType();return r!==i?!1:n.isDragging(this,t)}isOverTarget(t,n={shallow:!1}){if(!t)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),o=this.getItemType();if(o&&!gl(i,o))return!1;const s=this.getTargetIds();if(!s.length)return!1;const l=s.indexOf(t);return r?l===s.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Rg(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Mg(this.store.getState().dragOffset)}constructor(t,n){this.store=t,this.registry=n}}const Fa=typeof global<"u"?global:self,Pf=Fa.MutationObserver||Fa.WebKitMutationObserver;function Lf(e){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),e()}}}function bg(e){let t=1;const n=new Pf(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const Fg=typeof Pf=="function"?bg:Lf;class $g{enqueueTask(t){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.indexthis.capacity){for(let r=0,i=t.length-this.index;r{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Fg(this.flush),this.requestErrorThrow=Lf(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Ug{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,n){this.onError=t,this.release=n,this.task=null}}class Hg{create(t){const n=this.freeTasks,r=n.length?n.pop():new Ug(this.onError,i=>n[n.length]=i);return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}const If=new $g,Wg=new Hg(If.registerPendingError);function Bg(e){If.enqueueTask(Wg.create(e))}const yu="dnd-core/ADD_SOURCE",Su="dnd-core/ADD_TARGET",wu="dnd-core/REMOVE_SOURCE",To="dnd-core/REMOVE_TARGET";function Vg(e){return{type:yu,payload:{sourceId:e}}}function Qg(e){return{type:Su,payload:{targetId:e}}}function Kg(e){return{type:wu,payload:{sourceId:e}}}function qg(e){return{type:To,payload:{targetId:e}}}function Gg(e){N(typeof e.canDrag=="function","Expected canDrag to be a function."),N(typeof e.beginDrag=="function","Expected beginDrag to be a function."),N(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Yg(e){N(typeof e.canDrop=="function","Expected canDrop to be a function."),N(typeof e.hover=="function","Expected hover to be a function."),N(typeof e.drop=="function","Expected beginDrag to be a function.")}function ml(e,t){if(t&&Array.isArray(e)){e.forEach(n=>ml(n,!1));return}N(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var We;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(We||(We={}));let Xg=0;function Zg(){return Xg++}function Jg(e){const t=Zg().toString();switch(e){case We.SOURCE:return`S${t}`;case We.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function $a(e){switch(e[0]){case"S":return We.SOURCE;case"T":return We.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Ua(e,t){const n=e.entries();let r=!1;do{const{done:i,value:[,o]}=n.next();if(o===t)return!0;r=!!i}while(!r);return!1}class e1{addSource(t,n){ml(t),Gg(n);const r=this.addHandler(We.SOURCE,t,n);return this.store.dispatch(Vg(r)),r}addTarget(t,n){ml(t,!0),Yg(n);const r=this.addHandler(We.TARGET,t,n);return this.store.dispatch(Qg(r)),r}containsHandler(t){return Ua(this.dragSources,t)||Ua(this.dropTargets,t)}getSource(t,n=!1){return N(this.isSourceId(t),"Expected a valid source ID."),n&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return N(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return N(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return N(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return $a(t)===We.SOURCE}isTargetId(t){return $a(t)===We.TARGET}removeSource(t){N(this.getSource(t),"Expected an existing source."),this.store.dispatch(Kg(t)),Bg(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){N(this.getTarget(t),"Expected an existing target."),this.store.dispatch(qg(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const n=this.getSource(t);N(n,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=n}unpinSource(){N(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,n,r){const i=Jg(t);return this.types.set(i,n),t===We.SOURCE?this.dragSources.set(i,r):t===We.TARGET&&this.dropTargets.set(i,r),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const t1=(e,t)=>e===t;function n1(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function r1(e,t,n=t1){if(e.length!==t.length)return!1;for(let r=0;r0||!r1(n,r)))return Cr;const s=r[r.length-1],l=n[n.length-1];return s!==l&&(s&&i.push(s),l&&i.push(l)),i}function o1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s1(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function S1(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}let Wa=0;const ji=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var w1=E.memo(function(t){var{children:n}=t,r=y1(t,["children"]);const[i,o]=C1(r);return E.useEffect(()=>{if(o){const s=Nf();return++Wa,()=>{--Wa===0&&(s[ji]=null)}}},[]),v.jsx(xf.Provider,{value:i,children:n})});function C1(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=E1(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}function E1(e,t=Nf(),n,r){const i=t;return i[ji]||(i[ji]={dragDropManager:m1(e,t,n,r)}),i[ji]}function Nf(){return typeof global<"u"?global:window}var k1=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const hn=typeof window<"u"?E.useLayoutEffect:E.useEffect;function jf(e,t,n){const[r,i]=E.useState(()=>t(e)),o=E.useCallback(()=>{const s=t(e);k1(r,s)||(i(s),n&&n())},[r,e,n]);return hn(o),[r,o]}function _1(e,t,n){const[r,i]=jf(e,t,n);return hn(function(){const s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),r}function Rf(e,t,n){return _1(t,e||(()=>({})),()=>n.reconnect())}function Mf(e,t){const n=[...t||[]];return t==null&&typeof e!="function"&&n.push(e),E.useMemo(()=>typeof e=="function"?e():e,n)}function x1(e){return E.useMemo(()=>e.hooks.dragSource(),[e])}function O1(e){return E.useMemo(()=>e.hooks.dragPreview(),[e])}let ps=!1,gs=!1;class T1{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){N(!ps,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ps=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{ps=!1}}isDragging(){if(!this.sourceId)return!1;N(!gs,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return gs=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{gs=!1}}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,n){return this.internalMonitor.isOverTarget(t,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let ms=!1;class D1{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}canDrop(){if(!this.targetId)return!1;N(!ms,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return ms=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ms=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function P1(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function L1(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function vl(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let u=0;u, or turn it into a drag source or a drop target itself.`)}function N1(e){return(t=null,n=null)=>{if(!E.isValidElement(t)){const o=t;return e(o,n),o}const r=t;return I1(r),j1(r,n?o=>e(o,n):e)}}function Af(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const i=N1(r);t[n]=()=>i}}),t}function Ba(e,t){typeof e=="function"?e(t):e.current=t}function j1(e,t){const n=e.ref;return N(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?E.cloneElement(e,{ref:r=>{Ba(n,r),Ba(t,r)}}):E.cloneElement(e,{ref:t})}class R1{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?t?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),n):(this.lastConnectedDragSource=t,n):n}reconnectDragPreview(t=!1){const n=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!vl(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!vl(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=Af({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,yl(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,yl(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class M1{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!vl(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=Af({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,yl(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function mn(){const{dragDropManager:e}=E.useContext(xf);return N(e!=null,"Expected drag drop context"),e}function A1(e,t){const n=mn(),r=E.useMemo(()=>new R1(n.getBackend()),[n]);return hn(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),hn(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function z1(){const e=mn();return E.useMemo(()=>new T1(e),[e])}class b1{beginDrag(){const t=this.spec,n=this.monitor;let r=null;return typeof t.item=="object"?r=t.item:typeof t.item=="function"?r=t.item(n):r={},r??null}canDrag(){const t=this.spec,n=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(n):!0}isDragging(t,n){const r=this.spec,i=this.monitor,{isDragging:o}=r;return o?o(i):n===t.getSourceId()}endDrag(){const t=this.spec,n=this.monitor,r=this.connector,{end:i}=t;i&&i(n.getItem(),n),r.reconnect()}constructor(t,n,r){this.spec=t,this.monitor=n,this.connector=r}}function F1(e,t,n){const r=E.useMemo(()=>new b1(e,t,n),[t,n]);return E.useEffect(()=>{r.spec=e},[e]),r}function $1(e){return E.useMemo(()=>{const t=e.type;return N(t!=null,"spec.type must be defined"),t},[e])}function U1(e,t,n){const r=mn(),i=F1(e,t,n),o=$1(e);hn(function(){if(o!=null){const[l,u]=L1(o,i,r);return t.receiveHandlerId(l),n.receiveHandlerId(l),u}},[r,t,n,i,o])}function H1(e,t){const n=Mf(e,t);N(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=z1(),i=A1(n.options,n.previewOptions);return U1(n,r,i),[Rf(n.collect,r,i),x1(i),O1(i)]}function W1(e){const n=mn().getMonitor(),[r,i]=jf(n,e);return E.useEffect(()=>n.subscribeToOffsetChange(i)),E.useEffect(()=>n.subscribeToStateChange(i)),r}function B1(e){return E.useMemo(()=>e.hooks.dropTarget(),[e])}function V1(e){const t=mn(),n=E.useMemo(()=>new M1(t.getBackend()),[t]);return hn(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function Q1(){const e=mn();return E.useMemo(()=>new D1(e),[e])}function K1(e){const{accept:t}=e;return E.useMemo(()=>(N(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class q1{canDrop(){const t=this.spec,n=this.monitor;return t.canDrop?t.canDrop(n.getItem(),n):!0}hover(){const t=this.spec,n=this.monitor;t.hover&&t.hover(n.getItem(),n)}drop(){const t=this.spec,n=this.monitor;if(t.drop)return t.drop(n.getItem(),n)}constructor(t,n){this.spec=t,this.monitor=n}}function G1(e,t){const n=E.useMemo(()=>new q1(e,t),[t]);return E.useEffect(()=>{n.spec=e},[e]),n}function Y1(e,t,n){const r=mn(),i=G1(e,t),o=K1(e);hn(function(){const[l,u]=P1(o,i,r);return t.receiveHandlerId(l),n.receiveHandlerId(l),u},[r,t,i,n,o.map(s=>s.toString()).join("|")])}function X1(e,t){const n=Mf(e,t),r=Q1(),i=V1(n.options);return Y1(n,r,i),[Rf(n.collect,r,i),B1(i)]}function zf(e){let t=null;return()=>(t==null&&(t=e()),t)}function Z1(e,t){return e.filter(n=>n!==t)}function J1(e,t){const n=new Set,r=o=>n.add(o);e.forEach(r),t.forEach(r);const i=[];return n.forEach(o=>i.push(o)),i}class em{enter(t){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=J1(this.entered.filter(r),[t]),n===0&&this.entered.length>0}leave(t){const n=this.entered.length;return this.entered=Z1(this.entered.filter(this.isNodeInDocument),t),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class tm{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const i=this.config.exposeProperties[r];i!=null&&(n[r]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,n){return n===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const bf="__NATIVE_FILE__",Ff="__NATIVE_URL__",$f="__NATIVE_TEXT__",Uf="__NATIVE_HTML__";var Va=Object.freeze({__proto__:null,FILE:bf,HTML:Uf,TEXT:$f,URL:Ff});function vs(e,t,n){const r=t.reduce((i,o)=>i||e.getData(o),"");return r??n}const Sl={[bf]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Uf]:{exposeProperties:{html:(e,t)=>vs(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Ff]:{exposeProperties:{urls:(e,t)=>vs(e,t,"").split(` -`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[$f]:{exposeProperties:{text:(e,t)=>vs(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function nm(e,t){const n=Sl[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new tm(n);return r.loadDataTransfer(t),r}function ys(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Sl).filter(n=>{const r=Sl[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const rm=zf(()=>/firefox/i.test(navigator.userAgent)),Hf=zf(()=>!!window.safari);class Qa{interpolate(t){const{xs:n,ys:r,c1s:i,c2s:o,c3s:s}=this;let l=n.length-1;if(t===n[l])return r[l];let u=0,a=s.length-1,g;for(;u<=a;){g=Math.floor(.5*(u+a));const S=n[g];if(St)a=g-1;else return r[g]}l=Math.max(0,a);const p=t-n[l],f=p*p;return r[l]+i[l]*p+o[l]*f+s[l]*p*f}constructor(t,n){const{length:r}=t,i=[];for(let S=0;St[S]{let O=new Qa([0,.5,1],[u.y,u.y/g*m,u.y+m-g]).interpolate(f);return Hf()&&o&&(O+=(window.devicePixelRatio-1)*m),O},C=()=>new Qa([0,.5,1],[u.x,u.x/a*S,u.x+S-a]).interpolate(p),{offsetX:d,offsetY:c}=i,h=d===0||d,w=c===0||c;return{x:h?d:C(),y:w?c:y()}}let um=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,n){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=n}};function am(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ka(e){for(var t=1;t{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,n,r){this.sourceNodes.set(t,n),this.sourceNodeOptions.set(t,r);const i=s=>this.handleDragStart(s,t),o=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",o),n.setAttribute("draggable","false")}}connectDropTarget(t,n){const r=s=>this.handleDragEnter(s,t),i=s=>this.handleDragOver(s,t),o=s=>this.handleDrop(s,t);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",o),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",o)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(t);return Ka({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(t);return Ka({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Va).some(n=>Va[n]===t)}beginDragNativeItem(t,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=nm(t,n),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,n){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(t,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(t,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(t,n){this.dropTargetIds.unshift(n)}constructor(t,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&Wf(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const s=yi(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:l}=i,u=ys(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const g=this.monitor.getSourceId(),p=this.sourceNodes.get(g),f=this.sourcePreviewNodes.get(g)||p;if(f){const{anchorX:S,anchorY:m,offsetX:y,offsetY:C}=this.getCurrentSourcePreviewNodeOptions(),h=lm(p,f,s,{anchorX:S,anchorY:m},{offsetX:y,offsetY:C});l.setDragImage(f,h.x,h.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:a}=this.getCurrentSourcePreviewNodeOptions();a?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(u)this.beginDragNativeItem(u);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,u=ys(l);u&&this.beginDragNativeItem(u,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,o.length>0&&this.actions.hover(o,{clientOffset:yi(i)}),o.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=yi(i),this.scheduleHover(o),(o||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;i.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}else ys(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:yi(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const o=i.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(i.preventDefault(),o.dragDrop()))},this.options=new um(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new em(this.isNodeInDocument)}}let Si;function dm(){return Si||(Si=new Image,Si.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Si}const fm=function(t,n,r){return new cm(t,n,r)};var Qt;(function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"})(Qt||(Qt={}));class hm{get delay(){var t;return(t=this.args.delay)!==null&&t!==void 0?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return(t=this.args.ignoreContextMenu)!==null&&t!==void 0?t:!1}get enableHoverOutsideTarget(){var t;return(t=this.args.enableHoverOutsideTarget)!==null&&t!==void 0?t:!1}get enableKeyboardEvents(){var t;return(t=this.args.enableKeyboardEvents)!==null&&t!==void 0?t:!1}get enableMouseEvents(){var t;return(t=this.args.enableMouseEvents)!==null&&t!==void 0?t:!1}get enableTouchEvents(){var t;return(t=this.args.enableTouchEvents)!==null&&t!==void 0?t:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,n,r,i;return(i=(r=(t=this.args)===null||t===void 0?void 0:t.delayTouchStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&i!==void 0?i:0}get delayMouseStart(){var t,n,r,i;return(i=(r=(t=this.args)===null||t===void 0?void 0:t.delayMouseStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&i!==void 0?i:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var t;if(!((t=this.context)===null||t===void 0)&&t.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var t;return((t=this.args)===null||t===void 0?void 0:t.rootElement)||this.document}constructor(t,n){this.args=t,this.context=n}}function pm(e,t,n,r){return Math.sqrt(Math.pow(Math.abs(n-e),2)+Math.pow(Math.abs(r-t),2))}function gm(e,t,n,r,i){if(!i)return!1;const o=Math.atan2(r-t,n-e)*180/Math.PI+180;for(let s=0;s=l.start)&&(l.end==null||o<=l.end))return!0}return!1}const mm={Left:1,Right:2,Center:4},vm={Left:0,Center:1,Right:2};function Ss(e){return e.button===void 0||e.button===vm.Left}function ym(e){return e.buttons===void 0||(e.buttons&mm.Left)===0}function Bf(e){return!!e.targetTouches}const Sm=1;function wm(e){const t=e.nodeType===Sm?e:e.parentElement;if(!t)return;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Cm(e,t){if(e.targetTouches.length===1)return oo(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return oo(e.touches[0])}function oo(e,t){return Bf(e)?Cm(e,t):{x:e.clientX,y:e.clientY}}const qa=(()=>{let e=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return e=!0,!0}}))}catch{}return e})(),or={[Qt.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[Qt.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[Qt.keyboard]:{keydown:"keydown"}};class Er{profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;t&&(N(!Er.isSetUp,"Cannot have two Touch backends at the same time."),Er.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;t&&(Er.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,n,r,i=!1){const o=qa?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){const l=or[s][n];l&&t.addEventListener(l,r,o)})}removeEventListener(t,n,r,i=!1){const o=qa?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){const l=or[s][n];l&&t.removeEventListener(l,r,o)})}connectDragSource(t,n){const r=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,n),this.addEventListener(n,"start",r),()=>{this.sourceNodes.delete(t),this.removeEventListener(n,"start",r)}}connectDragPreview(t,n,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,n),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,n){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const i=o=>{if(!this.document||!r||!this.monitor.isDragging())return;let s;switch(o.type){case or.mouse.move:s={x:o.clientX,y:o.clientY};break;case or.touch.move:var l,u;s={x:((l=o.touches[0])===null||l===void 0?void 0:l.clientX)||0,y:((u=o.touches[0])===null||u===void 0?void 0:u.clientY)||0};break}const a=s!=null?this.document.elementFromPoint(s.x,s.y):void 0,g=a&&n.contains(a);if(a===n||g)return this.handleMove(o,t)};return this.addEventListener(this.document.body,"move",i),this.targetNodes.set(t,n),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",i))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!t||!t.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,n,r){this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&wm(o)},this.handleTopMoveStartCapture=i=>{Ss(i)&&(this.moveStartSourceIds=[])},this.handleMoveStart=i=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(i)},this.handleTopMoveStart=i=>{if(!Ss(i))return;const o=oo(i);o&&(Bf(i)&&(this.lastTargetTouchFallback=i.targetTouches[0]),this._mouseClientOffset=o),this.waitingForDelay=!1},this.handleTopMoveStartDelay=i=>{if(!Ss(i))return;const o=i.type===or.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,i),o),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(i,o)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(o)},this.handleTopMove=i=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:o,dragOverTargetIds:s}=this,l=this.options.enableHoverOutsideTarget,u=oo(i,this.lastTargetTouchFallback);if(!u)return;if(this._isScrolling||!this.monitor.isDragging()&&gm(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,u.x,u.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&o&&pm(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,u.x,u.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(o,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const a=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(a),this.actions.publishDragSource(),i.cancelable&&i.preventDefault();const g=(s||[]).map(m=>this.targetNodes.get(m)).filter(m=>!!m),p=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(u.x,u.y,g):this.document.elementsFromPoint(u.x,u.y),f=[];for(const m in p){if(!p.hasOwnProperty(m))continue;let y=p[m];for(y!=null&&f.push(y);y;)y=y.parentElement,y&&f.indexOf(y)===-1&&f.push(y)}const S=f.filter(m=>g.indexOf(m)>-1).map(m=>this._getDropTargetId(m)).filter(m=>!!m).filter((m,y,C)=>C.indexOf(m)===y);if(l)for(const m in this.targetNodes){const y=this.targetNodes.get(m);if(a&&y&&y.contains(a)&&S.indexOf(m)===-1){S.unshift(m);break}}S.reverse(),this.actions.hover(S,{clientOffset:u})},this._getDropTargetId=i=>{const o=this.targetNodes.keys();let s=o.next();for(;s.done===!1;){const l=s.value;if(i===this.targetNodes.get(l))return l;s=o.next()}},this.handleTopMoveEndCapture=i=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!ym(i)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}i.cancelable&&i.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=i=>{i.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new hm(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Qt.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Qt.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Qt.keyboard)}}const Em=function(t,n={},r={}){return new Er(t,n,r)},Ur="abcdefgh".split(""),Ri={a8:"bR",b8:"bN",c8:"bB",d8:"bQ",e8:"bK",f8:"bB",g8:"bN",h8:"bR",a7:"bP",b7:"bP",c7:"bP",d7:"bP",e7:"bP",f7:"bP",g7:"bP",h7:"bP",a2:"wP",b2:"wP",c2:"wP",d2:"wP",e2:"wP",f2:"wP",g2:"wP",h2:"wP",a1:"wR",b1:"wN",c1:"wB",d1:"wQ",e1:"wK",f1:"wB",g1:"wN",h1:"wR"},km={a:0,b:1,c:2,d:3,e:4,f:5,g:6,h:7},_m={a:7,b:6,c:5,d:4,e:3,f:2,g:1,h:0},xm=[7,6,5,4,3,2,1,0],Om=[0,1,2,3,4,5,6,7],Ga={wP:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsx("path",{d:"m 22.5,9 c -2.21,0 -4,1.79 -4,4 0,0.89 0.29,1.71 0.78,2.38 C 17.33,16.5 16,18.59 16,21 c 0,2.03 0.94,3.84 2.41,5.03 C 15.41,27.09 11,31.58 11,39.5 H 34 C 34,31.58 29.59,27.09 26.59,26.03 28.06,24.84 29,23.03 29,21 29,18.59 27.67,16.5 25.72,15.38 26.21,14.71 26.5,13.89 26.5,13 c 0,-2.21 -1.79,-4 -4,-4 z",style:{opacity:"1",fill:"#ffffff",fillOpacity:"1",fillRule:"nonzero",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}})})),wR:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"#ffffff",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 34,14 L 31,17 L 14,17 L 11,14"}),v.jsx("path",{d:"M 31,17 L 31,29.5 L 14,29.5 L 14,17",style:{strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 31,29.5 L 32.5,32 L 12.5,32 L 14,29.5"}),v.jsx("path",{d:"M 11,14 L 34,14",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}})]}))})),wN:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18",style:{fill:"#ffffff",stroke:"#000000"}}),v.jsx("path",{d:"M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10",style:{fill:"#ffffff",stroke:"#000000"}}),v.jsx("path",{d:"M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z",transform:"matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)",style:{fill:"#000000",stroke:"#000000"}})]}))})),wB:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillRule:"evenodd",fillOpacity:"1",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsxs("g",Object.assign({style:{fill:"#ffffff",stroke:"#000000",strokeLinecap:"butt"}},{children:[v.jsx("path",{d:"M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.65,38.99 6.68,38.97 6,38 C 7.35,36.54 9,36 9,36 z"}),v.jsx("path",{d:"M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z"}),v.jsx("path",{d:"M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z"})]})),v.jsx("path",{d:"M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}})]}))})),wQ:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"#ffffff",stroke:"#000000",strokeWidth:"1.5",strokeLinejoin:"round"}},{children:[v.jsx("path",{d:"M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.7,10.9 L 25.5,24.5 L 22.5,10 L 19.5,24.5 L 14.3,10.9 L 14,25 L 6.5,13.5 L 9,26 z"}),v.jsx("path",{d:"M 9,26 C 9,28 10.5,28 11.5,30 C 12.5,31.5 12.5,31 12,33.5 C 10.5,34.5 11,36 11,36 C 9.5,37.5 11,38.5 11,38.5 C 17.5,39.5 27.5,39.5 34,38.5 C 34,38.5 35.5,37.5 34,36 C 34,36 34.5,34.5 33,33.5 C 32.5,31 32.5,31.5 33.5,30 C 34.5,28 36,28 36,26 C 27.5,24.5 17.5,24.5 9,26 z"}),v.jsx("path",{d:"M 11.5,30 C 15,29 30,29 33.5,30",style:{fill:"none"}}),v.jsx("path",{d:"M 12,33.5 C 18,32.5 27,32.5 33,33.5",style:{fill:"none"}}),v.jsx("circle",{cx:"6",cy:"12",r:"2"}),v.jsx("circle",{cx:"14",cy:"9",r:"2"}),v.jsx("circle",{cx:"22.5",cy:"8",r:"2"}),v.jsx("circle",{cx:"31",cy:"9",r:"2"}),v.jsx("circle",{cx:"39",cy:"12",r:"2"})]}))})),wK:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22.5,11.63 L 22.5,6",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 20,8 L 25,8",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25",style:{fill:"#ffffff",stroke:"#000000",strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 12.5,37 C 18,40.5 27,40.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 20,16 10.5,13 6.5,19.5 C 3.5,25.5 12.5,30 12.5,30 L 12.5,37",style:{fill:"#ffffff",stroke:"#000000"}}),v.jsx("path",{d:"M 12.5,30 C 18,27 27,27 32.5,30",style:{fill:"none",stroke:"#000000"}}),v.jsx("path",{d:"M 12.5,33.5 C 18,30.5 27,30.5 32.5,33.5",style:{fill:"none",stroke:"#000000"}}),v.jsx("path",{d:"M 12.5,37 C 18,34 27,34 32.5,37",style:{fill:"none",stroke:"#000000"}})]}))})),bP:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsx("path",{d:"m 22.5,9 c -2.21,0 -4,1.79 -4,4 0,0.89 0.29,1.71 0.78,2.38 C 17.33,16.5 16,18.59 16,21 c 0,2.03 0.94,3.84 2.41,5.03 C 15.41,27.09 11,31.58 11,39.5 H 34 C 34,31.58 29.59,27.09 26.59,26.03 28.06,24.84 29,23.03 29,21 29,18.59 27.67,16.5 25.72,15.38 26.21,14.71 26.5,13.89 26.5,13 c 0,-2.21 -1.79,-4 -4,-4 z",style:{opacity:"1",fill:"#000000",fillOpacity:"1",fillRule:"nonzero",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}})})),bR:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"#000000",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12.5,32 L 14,29.5 L 31,29.5 L 32.5,32 L 12.5,32 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 14,29.5 L 14,16.5 L 31,16.5 L 31,29.5 L 14,29.5 z ",style:{strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 14,16.5 L 11,14 L 34,14 L 31,16.5 L 14,16.5 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14 L 11,14 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12,35.5 L 33,35.5 L 33,35.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 13,31.5 L 32,31.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 14,29.5 L 31,29.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 14,16.5 L 31,16.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 11,14 L 34,14",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}})]}))})),bN:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z",style:{fill:"#ffffff",stroke:"#ffffff"}}),v.jsx("path",{d:"M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z",transform:"matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)",style:{fill:"#ffffff",stroke:"#ffffff"}}),v.jsx("path",{d:"M 24.55,10.4 L 24.1,11.85 L 24.6,12 C 27.75,13 30.25,14.49 32.5,18.75 C 34.75,23.01 35.75,29.06 35.25,39 L 35.2,39.5 L 37.45,39.5 L 37.5,39 C 38,28.94 36.62,22.15 34.25,17.66 C 31.88,13.17 28.46,11.02 25.06,10.5 L 24.55,10.4 z ",style:{fill:"#ffffff",stroke:"none"}})]}))})),bB:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillRule:"evenodd",fillOpacity:"1",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsxs("g",Object.assign({style:{fill:"#000000",stroke:"#000000",strokeLinecap:"butt"}},{children:[v.jsx("path",{d:"M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.65,38.99 6.68,38.97 6,38 C 7.35,36.54 9,36 9,36 z"}),v.jsx("path",{d:"M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z"}),v.jsx("path",{d:"M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z"})]})),v.jsx("path",{d:"M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18",style:{fill:"none",stroke:"#ffffff",strokeLinejoin:"miter"}})]}))})),bQ:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"#000000",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}},{children:[v.jsx("path",{d:"M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.7,10.9 L 25.5,24.5 L 22.5,10 L 19.5,24.5 L 14.3,10.9 L 14,25 L 6.5,13.5 L 9,26 z",style:{strokeLinecap:"butt",fill:"#000000"}}),v.jsx("path",{d:"m 9,26 c 0,2 1.5,2 2.5,4 1,1.5 1,1 0.5,3.5 -1.5,1 -1,2.5 -1,2.5 -1.5,1.5 0,2.5 0,2.5 6.5,1 16.5,1 23,0 0,0 1.5,-1 0,-2.5 0,0 0.5,-1.5 -1,-2.5 -0.5,-2.5 -0.5,-2 0.5,-3.5 1,-2 2.5,-2 2.5,-4 -8.5,-1.5 -18.5,-1.5 -27,0 z"}),v.jsx("path",{d:"M 11.5,30 C 15,29 30,29 33.5,30"}),v.jsx("path",{d:"m 12,33.5 c 6,-1 15,-1 21,0"}),v.jsx("circle",{cx:"6",cy:"12",r:"2"}),v.jsx("circle",{cx:"14",cy:"9",r:"2"}),v.jsx("circle",{cx:"22.5",cy:"8",r:"2"}),v.jsx("circle",{cx:"31",cy:"9",r:"2"}),v.jsx("circle",{cx:"39",cy:"12",r:"2"}),v.jsx("path",{d:"M 11,38.5 A 35,35 1 0 0 34,38.5",style:{fill:"none",stroke:"#000000",strokeLinecap:"butt"}}),v.jsxs("g",Object.assign({style:{fill:"none",stroke:"#ffffff"}},{children:[v.jsx("path",{d:"M 11,29 A 35,35 1 0 1 34,29"}),v.jsx("path",{d:"M 12.5,31.5 L 32.5,31.5"}),v.jsx("path",{d:"M 11.5,34.5 A 35,35 1 0 0 33.5,34.5"}),v.jsx("path",{d:"M 10.5,37.5 A 35,35 1 0 0 34.5,37.5"})]}))]}))})),bK:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22.5,11.63 L 22.5,6",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"},id:"path6570"}),v.jsx("path",{d:"M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25",style:{fill:"#000000",fillOpacity:"1",strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 12.5,37 C 18,40.5 27,40.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 20,16 10.5,13 6.5,19.5 C 3.5,25.5 12.5,30 12.5,30 L 12.5,37",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 20,8 L 25,8",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 32,29.5 C 32,29.5 40.5,25.5 38.03,19.85 C 34.15,14 25,18 22.5,24.5 L 22.5,26.6 L 22.5,24.5 C 20,18 10.85,14 6.97,19.85 C 4.5,25.5 13,29.5 13,29.5",style:{fill:"none",stroke:"#ffffff"}}),v.jsx("path",{d:"M 12.5,30 C 18,27 27,27 32.5,30 M 12.5,33.5 C 18,30.5 27,30.5 32.5,33.5 M 12.5,37 C 18,34 27,34 32.5,37",style:{fill:"none",stroke:"#ffffff"}})]}))}))};function wl(e,t,n){const r=t/8,i=e==="white"?km:_m,o=e==="white"?xm:Om,s=i[n[0]]*r+r/2,l=o[parseInt(n[1],10)-1]*r+r/2;return{x:s,y:l}}function Ya(e){let t=!1;return Object.keys(Ri).forEach(n=>{e[n]!==Ri[n]&&(t=!0)}),Object.keys(e).forEach(n=>{Ri[n]!==e[n]&&(t=!0)}),t}function Tm(e,t){const n={removed:{},added:{}};return Object.keys(e).forEach(r=>{t[r]!==e[r]&&(n.removed[r]=e[r])}),Object.keys(t).forEach(r=>{e[r]!==t[r]&&(n.added[r]=t[r])}),n}function Xa(e){return e==="start"?Ri:typeof e=="string"?Dm(e):e}function Dm(e){if(!Pm(e))return{};e=e.replace(/ .+$/,"");const t=e.split("/"),n={};let r=8;for(let i=0;i<8;i++){const o=t[i].split("");let s=0;for(let l=0;l{const[i,o]=E.useState([]),[s,l]=E.useState([]),[u,a]=E.useState();E.useEffect(()=>{Array.isArray(e)&&o(e==null?void 0:e.filter(m=>m[0]!==m[1]))},[e]),E.useEffect(()=>{n==null||n(s)},[s]);function g(){l([]),a(void 0)}const p=(m,y)=>{t&&a([m,y,r])},f=[...s,...i];return{arrows:f,newArrow:u,clearArrows:g,drawNewArrow:p,setArrows:l,onArrowDrawEnd:(m,y)=>{if(m===y||!t)return;let C;const d=[m,y,r];f.every(([h,w])=>!(h===m&&w===y))?C=[...s,d]:C=s.filter(([h,w])=>!(h===m&&w===y)),a(void 0),l(C)}}},Vf=E.createContext({}),_t=()=>E.useContext(Vf),jm=E.forwardRef(({allowDragOutsideBoard:e=!0,animationDuration:t=300,areArrowsAllowed:n=!0,arePiecesDraggable:r=!0,arePremovesAllowed:i=!1,autoPromoteToQueen:o=!1,boardOrientation:s="white",boardWidth:l,children:u,clearPremovesOnRightClick:a=!0,customArrows:g,customArrowColor:p="rgb(255,170,0)",customBoardStyle:f,customDarkSquareStyle:S={backgroundColor:"#B58863"},customDropSquareStyle:m={boxShadow:"inset 0 0 1px 6px rgba(255,255,255,0.75)"},customLightSquareStyle:y={backgroundColor:"#F0D9B5"},customPieces:C,customPremoveDarkSquareStyle:d={backgroundColor:"#A42323"},customPremoveLightSquareStyle:c={backgroundColor:"#BD2828"},customSquare:h="div",customSquareStyles:w,dropOffBoardAction:k="snapback",id:O=0,isDraggablePiece:x=()=>!0,getPositionObject:T=()=>{},onArrowsChange:b=()=>{},onDragOverSquare:M=()=>{},onMouseOutSquare:$=()=>{},onMouseOverSquare:K=()=>{},onPieceClick:Ae=()=>{},onPieceDragBegin:ze=()=>{},onPieceDragEnd:qe=()=>{},onPieceDrop:Ce=()=>!0,onPromotionCheck:dt=(Zt,xt,qr)=>(qr==="wP"&&Zt[1]==="7"&&xt[1]==="8"||qr==="bP"&&Zt[1]==="2"&&xt[1]==="1")&&Math.abs(Zt.charCodeAt(0)-xt.charCodeAt(0))<=1,onPromotionPieceSelect:D,onSquareClick:L=()=>{},onSquareRightClick:j=()=>{},position:H="start",promotionDialogVariant:X="default",promotionToSquare:ot=null,showBoardNotation:A=!0,showPromotionDialog:ft=!1,snapToCursor:Ge=!0},vn)=>{const[Zt,xt]=E.useState(Xa(H)),[qr,Zf]=E.useState({removed:{},added:{}}),[Po,yn]=E.useState(void 0),[Jf,Lo]=E.useState(ft&&!o),[eh,Cu]=E.useState(null),[th,Io]=E.useState(ot),[Eu,No]=E.useState([]),Ot=E.useRef(Eu),[jo,Gr]=E.useState(),[nh,rh]=E.useState(Object.assign(Object.assign({},Ga),C)),[ih,Yr]=E.useState(!1),[Ro,oh]=E.useState(),[Xr,Zr]=E.useState(!1);E.useImperativeHandle(vn,()=>({clearPremoves(ee=!0){Jr(ee)}})),E.useEffect(()=>{rh(Object.assign(Object.assign({},Ga),C))},[C]),E.useEffect(()=>{Lo(ft),Io(ot)},[ot,ft]),E.useEffect(()=>{var ee,de,Ye;zo();const De=Xa(H),ht=Tm(Zt,De),Xe=((ee=Object.keys(ht.added))===null||ee===void 0?void 0:ee.length)<=2?(Ye=(de=Object.entries(ht.added))===null||de===void 0?void 0:de[0])===null||Ye===void 0?void 0:Ye[1][0]:void 0;if(Xr)xt(De),Zr(!1),i&&Ao(Xe),Ro&&clearTimeout(Ro);else if(ih)xt(De),Zr(!1),i&&Ao(Xe);else{Ya(De)&&Po!==void 0?yn(Xe):Ya(De)?yn(void 0):yn("b"),Zf(ht),Zr(!0);const gh=setTimeout(()=>{xt(De),Zr(!1),i&&Ao(Xe)},t);oh(gh)}return Yr(!1),T(De),Mo(),()=>{clearTimeout(Ro)}},[H]);const{arrows:sh,newArrow:lh,clearArrows:Mo,drawNewArrow:uh,onArrowDrawEnd:ah}=Nm(g,n,b,p);function ch(ee,de,Ye,De){if(ee===de)return;if(Mo(),i&&Xr||i&&(Po===Ye[0]||Ot.current.filter(Xe=>Xe.piece[0]===Ye[0]).length>0)){const Xe=[...Ot.current];Xe.push({sourceSq:ee,targetSq:de,piece:Ye}),Ot.current=Xe,No([...Xe]),zo();return}if(!i&&Xr)return;const ht=Object.assign({},Zt);Yr(!!De),yn(Ye[0]),Ce.length?Ce(ee,de,Ye)||(Jr(),Yr(!1)):(k==="trash"&&!de&&delete ht[ee],delete ht[ee],ht[de]=Ye,xt(ht)),zo(),T(ht)}function Ao(ee){if(Ot.current.length===0)return;const de=Ot.current[0];if(de.piece[0]!==void 0&&de.piece[0]!==ee&&Ce.length)if(yn(de.piece[0]),Yr(!0),Ce(de.sourceSq,de.targetSq,de.piece)){const De=[...Ot.current];De.shift(),Ot.current=De,No([...De])}else Jr()}function Jr(ee=!0){ee&&yn(void 0),Ot.current=[],No([])}function zo(){Cu(null),Io(null),Lo(!1)}function dh(ee){Gr(ee)}function fh(ee){if(jo){if(jo===ee){Gr(void 0),a&&Jr(!1),j(ee);return}}else Gr(void 0)}function hh(){Gr(void 0)}const ph={animationDuration:t,arePiecesDraggable:r,arePremovesAllowed:i,boardOrientation:s,boardWidth:l,customArrowColor:p,customBoardStyle:f,customDarkSquareStyle:S,customDropSquareStyle:m,customLightSquareStyle:y,customPremoveDarkSquareStyle:d,customPremoveLightSquareStyle:c,customSquare:h,customSquareStyles:w,id:O,isDraggablePiece:x,onDragOverSquare:M,onMouseOutSquare:$,onMouseOverSquare:K,onPieceClick:Ae,onPieceDragBegin:ze,onPieceDragEnd:qe,onPieceDrop:Ce,onPromotionCheck:dt,onPromotionPieceSelect:D,onSquareClick:L,showBoardNotation:A,snapToCursor:Ge,promotionDialogVariant:X,allowDragOutsideBoard:e,arrows:sh,newArrow:lh,onArrowDrawEnd:ah,chessPieces:nh,clearArrows:Mo,drawNewArrow:uh,clearCurrentRightClickDown:hh,currentPosition:Zt,handleSetPosition:ch,isWaitingForAnimation:Xr,lastPieceColour:Po,onRightClickDown:dh,onRightClickUp:fh,positionDifferences:qr,promoteFromSquare:eh,promoteToSquare:th,premoves:Eu,setPromoteFromSquare:Cu,setPromoteToSquare:Io,setShowPromoteDialog:Lo,showPromoteDialog:Jf,autoPromoteToQueen:o,currentRightClickDown:jo};return v.jsx(Vf.Provider,Object.assign({value:ph},{children:u}))});function Rm({row:e,col:t}){const{boardOrientation:n,boardWidth:r,customDarkSquareStyle:i,customLightSquareStyle:o}=_t(),s=o.backgroundColor,l=i.backgroundColor,u=t===0,a=e===7,g=u&&a;function p(){return n==="white"?8-e:e+1}function f(){return n==="black"?Ur[7-t]:Ur[t]}function S(){return v.jsxs(v.Fragment,{children:[v.jsx("div",Object.assign({style:Object.assign(Object.assign({zIndex:3,position:"absolute"},{color:s}),Ja(r))},{children:p()})),v.jsx("div",Object.assign({style:Object.assign(Object.assign({zIndex:3,position:"absolute"},{color:s}),Za(r))},{children:f()}))]})}function m(){return v.jsx("div",Object.assign({style:Object.assign(Object.assign({userSelect:"none",zIndex:3,position:"absolute"},{color:t%2!==0?l:s}),Za(r))},{children:f()}))}function y(){return v.jsx("div",Object.assign({style:Object.assign(Object.assign({userSelect:"none",zIndex:3,position:"absolute"},n==="black"?{color:e%2===0?l:s}:{color:e%2===0?l:s}),Ja(r))},{children:p()}))}return g?S():a?m():u?y():null}const Za=e=>({alignSelf:"flex-end",paddingLeft:e/8-e/48,fontSize:e/48}),Ja=e=>({alignSelf:"flex-start",paddingRight:e/8-e/48,fontSize:e/48});function ec({isPremovedPiece:e=!1,piece:t,square:n,squares:r}){const{animationDuration:i,arePiecesDraggable:o,arePremovesAllowed:s,boardWidth:l,boardOrientation:u,chessPieces:a,currentPosition:g,id:p,isDraggablePiece:f,isWaitingForAnimation:S,onPieceClick:m,onPieceDragBegin:y,onPieceDragEnd:C,positionDifferences:d,premoves:c,onPromotionCheck:h}=_t(),[w,k]=E.useState({opacity:1,zIndex:5,touchAction:"none",cursor:o&&f({piece:t,sourceSquare:n})?"-webkit-grab":"default"}),[{canDrag:O,isDragging:x},T,b]=H1(()=>({type:"piece",item:()=>(y(t,n),{piece:t,square:n,id:p}),end:()=>C(t,n),collect:$=>({canDrag:f({piece:t,sourceSquare:n}),isDragging:!!$.isDragging()})}),[t,n,g,p]);b(dm(),{captureDraggingState:!0}),E.useEffect(()=>{k($=>Object.assign(Object.assign({},$),{opacity:x?0:1}))},[x]),E.useEffect(()=>{if(!s)return;let $=!1;!e&&c.find(K=>K.targetSq===n)&&($=!0),c.find(K=>K.sourceSq===n&&K.piece===t)&&($=!0),k(K=>Object.assign(Object.assign({},K),{display:$?"none":"unset"}))},[g,c]),E.useEffect(()=>{var $;const K=($=d.removed)===null||$===void 0?void 0:$[n];if(!d.added||!K)return;const Ae=Object.entries(d.added).find(([ze,qe])=>qe===K||h(n,ze,K));if(S&&K&&Ae&&!e){const ze=n,qe=Ae[0];if(ze&&qe){const Ce=l/8;k(dt=>Object.assign(Object.assign({},dt),{transform:`translate(${(u==="black"?-1:1)*(qe.charCodeAt(0)-ze.charCodeAt(0))*Ce}px, ${(u==="black"?-1:1)*(Number(ze[1])-Number(qe[1]))*Ce}px)`,transition:`transform ${i}ms`,zIndex:6}))}}},[d]),E.useEffect(()=>{const{sourceSq:$}=M();$&&k(K=>Object.assign(Object.assign({},K),{transform:"translate(0px, 0px)",transition:"transform 0ms"}))},[g]),E.useEffect(()=>{k($=>Object.assign(Object.assign({},$),{cursor:o&&f({piece:t,sourceSquare:n})?"-webkit-grab":"default"}))},[n,g,o]);function M(){return{sourceSq:r[n]}}return v.jsx("div",Object.assign({ref:o&&O?T:null,onClick:()=>m(t),"data-piece":t,style:w},{children:typeof a[t]=="function"?a[t]({squareWidth:l/8,isDragging:x,square:n}):v.jsx("svg",Object.assign({viewBox:"1 1 43 43",width:l/8,height:l/8},{children:v.jsx("g",{children:a[t]})}))}))}function Mm({square:e,squareColor:t,setSquares:n,squareHasPremove:r,children:i}){const o=E.useRef(null),{autoPromoteToQueen:s,boardWidth:l,boardOrientation:u,clearArrows:a,currentPosition:g,currentRightClickDown:p,customBoardStyle:f,customDarkSquareStyle:S,customDropSquareStyle:m,customLightSquareStyle:y,customPremoveDarkSquareStyle:C,customPremoveLightSquareStyle:d,customSquare:c,customSquareStyles:h,drawNewArrow:w,handleSetPosition:k,isWaitingForAnimation:O,lastPieceColour:x,onArrowDrawEnd:T,onDragOverSquare:b,onMouseOutSquare:M,onMouseOverSquare:$,onPieceDrop:K,onPromotionCheck:Ae,onRightClickDown:ze,onRightClickUp:qe,onSquareClick:Ce,setPromoteFromSquare:dt,setPromoteToSquare:D,setShowPromoteDialog:L}=_t(),[{isOver:j},H]=X1(()=>({accept:"piece",drop:X,collect:A=>({isOver:!!A.isOver()})}),[e,g,K,O,x]);function X(A){Ae(A.square,e,A.piece)?s?k(A.square,e,A.piece[0]==="w"?"wQ":"bQ"):(dt(A.square),D(e),L(!0)):k(A.square,e,A.piece,!0)}E.useEffect(()=>{if(o.current){const{x:A,y:ft}=o.current.getBoundingClientRect();n(Ge=>Object.assign(Object.assign({},Ge),{[e]:{x:A,y:ft}}))}},[l,u]);const ot=Object.assign(Object.assign(Object.assign(Object.assign({},Am(e,u,f)),t==="black"?S:y),r&&(t==="black"?C:d)),j&&m);return v.jsx("div",Object.assign({ref:H,style:ot,"data-square-color":t,"data-square":e,onMouseOver:A=>{A.buttons===2&&p&&w(p,e),!(A.relatedTarget&&A.currentTarget.contains(A.relatedTarget))&&$(e)},onMouseOut:A=>{A.relatedTarget&&A.currentTarget.contains(A.relatedTarget)||M(e)},onMouseDown:A=>{A.button===2&&ze(e)},onMouseUp:A=>{A.button===2&&(p&&T(p,e),qe(e))},onDragEnter:()=>b(e),onClick:()=>{Ce(e),a()},onContextMenu:A=>{A.preventDefault()}},{children:typeof c=="string"?v.jsx(c,Object.assign({ref:o,style:Object.assign(Object.assign(Object.assign({},nc(l)),tc),!r&&(h==null?void 0:h[e]))},{children:i})):v.jsx(c,Object.assign({ref:o,square:e,squareColor:t,style:Object.assign(Object.assign(Object.assign({},nc(l)),tc),!r&&(h==null?void 0:h[e]))},{children:i}))}))}const tc={display:"flex",justifyContent:"center"},nc=e=>({width:e/8,height:e/8}),Am=(e,t,n)=>n!=null&&n.borderRadius?e==="a1"?t==="white"?{borderBottomLeftRadius:n.borderRadius}:{borderTopRightRadius:n.borderRadius}:e==="a8"?t==="white"?{borderTopLeftRadius:n.borderRadius}:{borderBottomRightRadius:n.borderRadius}:e==="h1"?t==="white"?{borderBottomRightRadius:n.borderRadius}:{borderTopLeftRadius:n.borderRadius}:e==="h8"?t==="white"?{borderTopRightRadius:n.borderRadius}:{borderBottomLeftRadius:n.borderRadius}:{}:{};function zm(){const[e,t]=E.useState({}),{boardOrientation:n,boardWidth:r,currentPosition:i,id:o,premoves:s,showBoardNotation:l}=_t();return v.jsx("div",Object.assign({"data-boardid":o},{children:[...Array(8)].map((u,a)=>v.jsx("div",Object.assign({style:{display:"flex",flexWrap:"nowrap",width:r}},{children:[...Array(8)].map((g,p)=>{const f=n==="black"?Ur[7-p]+(a+1):Ur[p]+(8-a),S=p%2===a%2?"white":"black",m=s.find(C=>C.sourceSq===f||C.targetSq===f),y=s.find(C=>C.targetSq===f);return v.jsxs(Mm,Object.assign({square:f,squareColor:S,setSquares:t,squareHasPremove:!!m},{children:[i[f]&&v.jsx(ec,{piece:i[f],square:f,squares:e}),y&&v.jsx(ec,{isPremovedPiece:!0,piece:y.piece,square:f,squares:e}),l&&v.jsx(Rm,{row:a,col:p})]}),`${p}${a}`)})}),a.toString()))}))}const bm=()=>{const{arrows:e,newArrow:t,boardOrientation:n,boardWidth:r,customArrowColor:i}=_t(),o=[...e,t].filter(Boolean);return v.jsx("svg",Object.assign({width:r,height:r,style:{position:"absolute",top:"0",left:"0",pointerEvents:"none",zIndex:"10"}},{children:o.map((s,l)=>{const[u,a,g]=s;if(u===a)return null;const p=wl(n,r,u),f=wl(n,r,a);let S=r/32;const m=l===e.length;e.some(h=>h[0]!==u&&h[1]===a)&&!m&&(S=r/16);const y=f.x-p.x,C=f.y-p.y,d=Math.hypot(C,y),c={x:p.x+y*(d-S)/d,y:p.y+C*(d-S)/d};return v.jsxs(E.Fragment,{children:[v.jsx("marker",Object.assign({id:`arrowhead-${l}`,markerWidth:"2",markerHeight:"2.5",refX:"1.25",refY:"1.25",orient:"auto"},{children:v.jsx("polygon",{points:"0.3 0, 2 1.25, 0.3 2.5",fill:g??i})})),v.jsx("line",{x1:p.x,y1:p.y,x2:c.x,y2:c.y,opacity:m?"0.5":"0.65",stroke:g??i,strokeWidth:m?.9*r/40:r/40,markerEnd:`url(#arrowhead-${l})`})]},`${u}-${a}${m?"-active":""}`)})}))};function Fm({option:e}){const[t,n]=E.useState(!1),{boardWidth:r,chessPieces:i,customDarkSquareStyle:o,customLightSquareStyle:s,handleSetPosition:l,onPromotionPieceSelect:u,promoteFromSquare:a,promoteToSquare:g,promotionDialogVariant:p}=_t(),f=()=>{switch(e[1]){case"Q":return o.backgroundColor;case"R":return s.backgroundColor;case"N":return p==="default"?s.backgroundColor:o.backgroundColor;case"B":return p==="default"?o.backgroundColor:s.backgroundColor}};return v.jsx("div",Object.assign({onClick:()=>{u!=null&&u.length?u(e):l(a,g,e,!0)},onMouseOver:()=>n(!0),onMouseOut:()=>n(!1),"data-piece":e,style:{cursor:"pointer",backgroundColor:t?f():`${f()}aa`,borderRadius:"4px",transition:"all 0.1s ease-out"}},{children:typeof i[e]=="function"?v.jsx("div",Object.assign({style:{transition:"all 0.1s ease-out",transform:t?"scale(1)":"scale(0.85)"}},{children:i[e]({squareWidth:r/8,isDragging:!1})})):v.jsx("svg",Object.assign({viewBox:"1 1 43 43",width:r/8,height:r/8,style:{transition:"all 0.1s ease-out",transform:t?"scale(1)":"scale(0.85)"}},{children:v.jsx("g",{children:i[e]})}))}))}function $m(){const{boardOrientation:e,boardWidth:t,promotionDialogVariant:n,promoteToSquare:r}=_t(),i=(r==null?void 0:r[1])==="1"?"b":"w",o=[`${i??"w"}Q`,`${i??"w"}R`,`${i??"w"}N`,`${i??"w"}B`],s={default:{display:"grid",gridTemplateColumns:"1fr 1fr",transform:`translate(${-t/8}px, ${-t/8}px)`},vertical:{transform:`translate(${-t/16}px, ${-t/16}px)`},modal:{display:"flex",justifyContent:"center",alignItems:"center",transform:`translate(0px, ${3*t/8}px)`,width:"100%",height:`${t/4}px`,top:0,backgroundColor:"white",left:0}},l=wl(e,t,r||"a8");return v.jsx("div",Object.assign({style:Object.assign({position:"absolute",top:`${l==null?void 0:l.y}px`,left:`${l==null?void 0:l.x}px`,zIndex:1e3},s[n]),title:"Choose promotion piece"},{children:o.map(u=>v.jsx(Fm,{option:u},u))}))}const Um={whiteKing:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"crisp-edges"},viewBox:"0 0 4210 12970",x:"0px",y:"0px",fillRule:"evenodd",clipRule:"evenodd",width:"250",height:"250"},{children:v.jsx("g",{children:v.jsx("path",{style:{fill:"black",fillRule:"nonzero"},d:"M2105 0c169,0 286,160 249,315l200 0c-172,266 -231,479 -256,792 315,-24 530,-86 792,-255l0 897c-265,-171 -479,-231 -792,-256 18,234 75,495 185,682l339 0c233,0 369,269 225,456l545 0 -595 1916c130,94 158,275 59,402 465,0 416,568 51,568l-334 0 465 2867 332 0c250,0 381,306 199,485 162,63 273,220 273,399l0 633 168 0 0 475c-1403,0 -2807,0 -4210,0l0 -475 167 0 0 -633c0,-179 112,-336 274,-399 -181,-178 -52,-485 199,-485l332 0 465 -2867 -335 0c-353,0 -418,-568 51,-568 -98,-127 -70,-308 59,-402l-594 -1916c181,0 363,0 545,0 -144,-187 -9,-456 225,-456l339 0c110,-187 167,-448 185,-682 -315,25 -530,87 -793,256l0 -897c266,171 480,231 793,255 -25,-315 -87,-529 -256,-792l199 0c-36,-155 81,-315 250,-315zm-1994 10012l0 253 3988 0 0 -253c-1330,0 -2659,0 -3988,0zm484 -1060c-174,0 -316,142 -316,316l0 633 3652 0 0 -633c0,-174 -142,-316 -316,-316 -1007,0 -2013,0 -3020,0zm45 -457c-230,0 -225,345 0,345l2930 0c230,0 225,-345 0,-345 -977,0 -1953,0 -2930,0zm2020 -2978l-1111 0 -465 2867 2041 0 -465 -2867zm-1558 -456c-229,0 -224,345 0,345 669,0 1337,0 2005,0 230,0 225,-345 0,-345 -668,0 -1336,0 -2005,0zm1730 -457l-1454 0c-229,0 -224,345 0,345l1454 0c229,0 224,-345 0,-345zm-2064 -1862l544 1751c529,0 1057,0 1586,0l544 -1751c-892,0 -1783,0 -2674,0zm1085 -567l504 0c-126,-247 -163,-526 -177,-800 273,15 553,52 800,177l0 -504c-247,126 -527,163 -800,177 14,-273 51,-552 177,-799 -168,0 -336,0 -504,0 125,247 162,526 177,799 -274,-14 -553,-51 -800,-177l0 504c247,-125 527,-162 800,-177 -15,274 -52,553 -177,800zm969 111l-1434 0c-230,0 -225,345 0,345l1434 0c230,0 225,-345 0,-345zm-717 -2175c-105,0 -175,109 -133,204l266 0c42,-96 -30,-205 -133,-204z"})})}))};function Hm({children:e}){try{return v.jsx(v.Fragment,{children:e})}catch(t){return console.log(t),v.jsx(Qf,{showError:!0})}}function Qf({showError:e=!1}){return v.jsxs("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}},{children:[v.jsx("div",Object.assign({style:{width:250,height:250,transform:"rotate(90deg)"}},{children:Um.whiteKing})),e&&v.jsx("h1",{children:"Something went wrong"})]}))}function Wm(){const e=E.useRef(null),{boardWidth:t,clearCurrentRightClickDown:n,onPromotionPieceSelect:r,setShowPromoteDialog:i,showPromoteDialog:o,customBoardStyle:s}=_t();return E.useEffect(()=>{function l(u){e.current&&!e.current.contains(u.target)&&n()}return document.addEventListener("mouseup",l),()=>{document.removeEventListener("mouseup",l)}},[]),t?v.jsx("div",Object.assign({style:{perspective:"1000px"}},{children:v.jsxs("div",Object.assign({ref:e,style:Object.assign(Object.assign({position:"relative"},Bm(t)),s)},{children:[v.jsx(zm,{}),v.jsx(bm,{}),o&&v.jsxs(v.Fragment,{children:[v.jsx("div",{onClick:()=>{i(!1),r==null||r()},style:{position:"absolute",top:"0",left:"0",zIndex:"100",backgroundColor:"rgba(22,21,18,.7)",width:t,height:t}}),v.jsx($m,{})]})]}))})):v.jsx(Qf,{})}const Bm=e=>({cursor:"default",height:e,width:e});function Vm({boardContainer:e}){const{boardWidth:t,chessPieces:n,id:r,snapToCursor:i,allowDragOutsideBoard:o}=_t(),s=W1(f=>({item:f.getItem(),clientOffset:f.getClientOffset(),sourceClientOffset:f.getSourceClientOffset(),isDragging:f.isDragging()})),{isDragging:l,item:u,clientOffset:a,sourceClientOffset:g}=s,p=E.useCallback((f,S)=>{if(!f||!S)return{display:"none"};let{x:m,y}=i?f:S;const C=t/8/2;if(i&&(m-=C,y-=C),!o){const{left:c,top:h}=e,w=c-C,k=h-C,O=c+t-C,x=h+t-C;m=Math.max(w,Math.min(m,O)),y=Math.max(k,Math.min(y,x))}const d=`translate(${m}px, ${y}px)`;return{transform:d,WebkitTransform:d,touchAction:"none"}},[t,o,i,e]);return l&&u.id===r?v.jsx("div",Object.assign({style:{position:"fixed",pointerEvents:"none",zIndex:10,left:0,top:0}},{children:v.jsx("div",Object.assign({style:p(a,g)},{children:typeof n[u.piece]=="function"?n[u.piece]({squareWidth:t/8,isDragging:!0}):v.jsx("svg",Object.assign({viewBox:"1 1 43 43",width:t/8,height:t/8},{children:v.jsx("g",{children:n[u.piece]})}))}))})):null}const Qm=E.forwardRef((e,t)=>{const{customDndBackend:n,customDndBackendOptions:r}=e,i=rg(e,["customDndBackend","customDndBackendOptions"]),[o,s]=E.useState(),[l,u]=E.useState(!1),[a,g]=E.useState(!1),[p,f]=E.useState(e.boardWidth),S=E.useRef(null),m=E.useRef(null),[y,C]=E.useState({left:0,top:0}),d=E.useMemo(()=>{var h;return(h=S.current)===null||h===void 0?void 0:h.getBoundingClientRect()},[S.current]);E.useEffect(()=>{C({left:d!=null&&d.left?d==null?void 0:d.left:0,top:d!=null&&d.top?d==null?void 0:d.top:0})},[d]),E.useEffect(()=>{g("ontouchstart"in window),u(!0),s(window)},[]),E.useEffect(()=>{var h;if(e.boardWidth===void 0&&(!((h=S.current)===null||h===void 0)&&h.offsetWidth)){const w=new ResizeObserver(()=>{var k;f((k=S.current)===null||k===void 0?void 0:k.offsetWidth)});return w.observe(S.current),()=>{w.disconnect()}}},[S.current,o]);const c=n||(a?Em:fm);return l&&o?v.jsx(Hm,{children:v.jsxs("div",Object.assign({ref:m,style:{display:"flex",flexDirection:"column",width:"100%"}},{children:[v.jsx("div",{ref:S,style:{width:"100%"}}),v.jsx(w1,Object.assign({backend:c,context:o,options:n?r:void 0},{children:p&&v.jsxs(jm,Object.assign({boardWidth:p},i,{ref:t},{children:[v.jsx(Vm,{boardContainer:y}),v.jsx(Wm,{})]}))}))]}))}):null});var rc=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function l(g){try{a(r.next(g))}catch(p){s(p)}}function u(g){try{a(r.throw(g))}catch(p){s(p)}}function a(g){g.done?o(g.value):i(g.value).then(l,u)}a((r=r.apply(e,t||[])).next())})};const Km=e=>{const[t,n,r]=e.split(":");return{process_name:t,package_name:n,publisher_node:r}};function sr(e){const t=document.cookie.split(";");for(let n=0;nnull,onOpen:s=()=>null,onClose:l=()=>null,onError:u=()=>null}){this._encrypt=a=>null,this._decrypt=a=>{},this.send=({data:a})=>{sr(`kinode-auth_${this.nodeId}`),sr(`kinode-ws-auth_${this.nodeId}`),this._ws.send(ic(a))},this.fetchJson=(a,g)=>rc(this,void 0,void 0,function*(){return console.log("Fetching JSON:",a),yield(yield fetch(a,g)).json()}),this._secret=void 0,this.processId=Km(n),this.channelId=r,this.nodeId=t,this._ws=new WebSocket(i),this._ws.onmessage=a=>rc(this,void 0,void 0,function*(){o(a.data,this)}),this._ws.onopen=a=>{console.log(`${t}`,sr(`kinode-auth_${t}`),sr(`kinode-ws-auth_${t}`)),this._ws.send(ic({auth_token:sr(`kinode-auth_${t}`),target_process:n,encrypted:!1})),s(a,this)},this._ws.onclose=l,this._ws.onerror=u}}const oc=e=>{let t;const n=new Set,r=(u,a)=>{const g=typeof u=="function"?u(t):u;if(!Object.is(g,t)){const p=t;t=a??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(f=>f(t,p))}},i=()=>t,l={setState:r,getState:i,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{n.clear()}};return t=e(r,i,l),l},Gm=e=>e?oc(e):oc;var Kf={exports:{}},qf={},Gf={exports:{}},Yf={};/** +`,t+=" a b c d e f g h",t}perft(t){const n=this._moves({legal:!1});let r=0;const i=this._turn;for(let o=0,s=n.length;o0?r+=this.perft(t-1):r++),this._undoMove();return r}_makePretty(t){const{color:n,piece:r,from:i,to:o,flags:s,captured:l,promotion:u}=t;let a="";for(const S in I)I[S]&s&&(a+=W0[S]);const g=Pe(i),p=Pe(o),f={color:n,piece:r,from:g,to:p,san:this._moveToSan(t,this._moves({legal:!0})),flags:a,lan:g+p,before:this.fen(),after:""};return this._makeMove(t),f.after=this.fen(),this._undoMove(),l&&(f.captured=l),u&&(f.promotion=u,f.lan+=u),f}turn(){return this._turn}board(){const t=[];let n=[];for(let r=R.a8;r<=R.h1;r++)this._board[r]==null?n.push(null):n.push({square:Pe(r),type:this._board[r].type,color:this._board[r].color}),r+1&136&&(t.push(n),n=[],r+=8);return t}squareColor(t){if(t in R){const n=R[t];return(ln(n)+$r(n))%2===0?"light":"dark"}return null}history({verbose:t=!1}={}){const n=[],r=[];for(;this._history.length>0;)n.push(this._undoMove());for(;;){const i=n.pop();if(!i)break;t?r.push(this._makePretty(i)):r.push(this._moveToSan(i,this._moves())),this._makeMove(i)}return r}_pruneComments(){const t=[],n={},r=i=>{i in this._comments&&(n[i]=this._comments[i])};for(;this._history.length>0;)t.push(this._undoMove());for(r(this.fen());;){const i=t.pop();if(!i)break;this._makeMove(i),r(this.fen())}this._comments=n}getComment(){return this._comments[this.fen()]}setComment(t){this._comments[this.fen()]=t.replace("{","[").replace("}","]")}deleteComment(){const t=this._comments[this.fen()];return delete this._comments[this.fen()],t}getComments(){return this._pruneComments(),Object.keys(this._comments).map(t=>({fen:t,comment:this._comments[t]}))}deleteComments(){return this._pruneComments(),Object.keys(this._comments).map(t=>{const n=this._comments[t];return delete this._comments[t],{fen:t,comment:n}})}setCastlingRights(t,n){for(const i of[ne,Nt])n[i]!==void 0&&(n[i]?this._castling[t]|=vi[i]:this._castling[t]&=~vi[i]);this._updateCastlingRights();const r=this.getCastlingRights(t);return(n[ne]===void 0||n[ne]===r[ne])&&(n[Nt]===void 0||n[Nt]===r[Nt])}getCastlingRights(t){return{[ne]:(this._castling[t]&vi[ne])!==0,[Nt]:(this._castling[t]&vi[Nt])!==0}}moveNumber(){return this._moveNumber}}function rg(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Fe(1));return n(Of)(e,t)}if(typeof e!="function")throw new Error(Fe(2));var i=e,o=t,s=[],l=s,u=!1;function a(){l===s&&(l=s.slice())}function g(){if(u)throw new Error(Fe(3));return o}function p(y){if(typeof y!="function")throw new Error(Fe(4));if(u)throw new Error(Fe(5));var C=!0;return a(),l.push(y),function(){if(C){if(u)throw new Error(Fe(6));C=!1,a();var c=l.indexOf(y);l.splice(c,1),s=null}}}function f(y){if(!ig(y))throw new Error(Fe(7));if(typeof y.type>"u")throw new Error(Fe(8));if(u)throw new Error(Fe(9));try{u=!0,o=i(o,y)}finally{u=!1}for(var C=s=l,d=0;dr&&r[i]?r[i]:n||null,e)}function lg(e,t){return e.filter(n=>n!==t)}function Tf(e){return typeof e=="object"}function ug(e,t){const n=new Map,r=o=>{n.set(o,n.has(o)?n.get(o)+1:1)};e.forEach(r),t.forEach(r);const i=[];return n.forEach((o,s)=>{o===1&&i.push(s)}),i}function ag(e,t){return e.filter(n=>t.indexOf(n)>-1)}const gu="dnd-core/INIT_COORDS",ko="dnd-core/BEGIN_DRAG",mu="dnd-core/PUBLISH_DRAG_SOURCE",_o="dnd-core/HOVER",xo="dnd-core/DROP",Oo="dnd-core/END_DRAG";function za(e,t){return{type:gu,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const cg={type:gu,payload:{clientOffset:null,sourceClientOffset:null}};function dg(e){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:s}=r,l=e.getMonitor(),u=e.getRegistry();e.dispatch(za(o)),fg(n,l,u);const a=gg(n,l);if(a==null){e.dispatch(cg);return}let g=null;if(o){if(!s)throw new Error("getSourceClientOffset must be defined");hg(s),g=s(a)}e.dispatch(za(o,g));const f=u.getSource(a).beginDrag(l,a);if(f==null)return;pg(f),u.pinSource(a);const S=u.getSourceType(a);return{type:ko,payload:{itemType:S,item:f,sourceId:a,clientOffset:o||null,sourceClientOffset:g||null,isSourcePublic:!!i}}}}function fg(e,t,n){N(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(r){N(n.getSource(r),"Expected sourceIds to be registered.")})}function hg(e){N(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function pg(e){N(Tf(e),"Item must be an object.")}function gg(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function mg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vg(e){for(var t=1;t{const u=wg(s,l,i,r),a={type:xo,payload:{dropResult:vg({},n,u)}};e.dispatch(a)})}}function Sg(e){N(e.isDragging(),"Cannot call drop while not dragging."),N(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function wg(e,t,n,r){const i=n.getTarget(e);let o=i?i.drop(r,e):void 0;return Cg(o),typeof o>"u"&&(o=t===0?{}:r.getDropResult()),o}function Cg(e){N(typeof e>"u"||Tf(e),"Drop result must either be an object or undefined.")}function Eg(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function kg(e){return function(){const n=e.getMonitor(),r=e.getRegistry();_g(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:Oo}}}function _g(e){N(e.isDragging(),"Cannot call endDrag while not dragging.")}function gl(e,t){return t===null?e===null:Array.isArray(e)?e.some(n=>n===t):e===t}function xg(e){return function(n,{clientOffset:r}={}){Og(n);const i=n.slice(0),o=e.getMonitor(),s=e.getRegistry(),l=o.getItemType();return Dg(i,s,l),Tg(i,o,s),Pg(i,o,s),{type:_o,payload:{targetIds:i,clientOffset:r||null}}}}function Og(e){N(Array.isArray(e),"Expected targetIds to be an array.")}function Tg(e,t,n){N(t.isDragging(),"Cannot call hover while not dragging."),N(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r=0;r--){const i=e[r],o=t.getTargetType(i);gl(o,n)||e.splice(r,1)}}function Pg(e,t,n){e.forEach(function(r){n.getTarget(r).hover(t,r)})}function Lg(e){return function(){if(e.getMonitor().isDragging())return{type:mu}}}function Ig(e){return{beginDrag:dg(e),publishDragSource:Lg(e),hover:xg(e),drop:yg(e),endDrag:kg(e)}}class Ng{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:n}=this.store;function r(o){return(...s)=>{const l=o.apply(t,s);typeof l<"u"&&n(l)}}const i=Ig(this);return Object.keys(i).reduce((o,s)=>{const l=i[s];return o[s]=r(l),o},{})}dispatch(t){this.store.dispatch(t)}constructor(t,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}}function jg(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Df(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rg(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:Df(jg(t,r),n)}function Mg(e){const{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:Df(t,n)}const Cr=[],vu=[];Cr.__IS_NONE__=!0;vu.__IS_ALL__=!0;function Ag(e,t){return e===Cr?!1:e===vu||typeof t>"u"?!0:ag(t,e).length>0}class bg{subscribeToStateChange(t,n={}){const{handlerIds:r}=n;N(typeof t=="function","listener must be a function."),N(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const s=this.store.getState(),l=s.stateId;try{l===i||l===i+1&&!Ag(s.dirtyHandlerIds,r)||t()}finally{i=l}};return this.store.subscribe(o)}subscribeToOffsetChange(t){N(typeof t=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,t())};return this.store.subscribe(r)}canDragSource(t){if(!t)return!1;const n=this.registry.getSource(t);return N(n,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:n.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const n=this.registry.getTarget(t);if(N(n,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(t),i=this.getItemType();return gl(r,i)&&n.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const n=this.registry.getSource(t,!0);if(N(n,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(t),i=this.getItemType();return r!==i?!1:n.isDragging(this,t)}isOverTarget(t,n={shallow:!1}){if(!t)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),o=this.getItemType();if(o&&!gl(i,o))return!1;const s=this.getTargetIds();if(!s.length)return!1;const l=s.indexOf(t);return r?l===s.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Rg(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Mg(this.store.getState().dragOffset)}constructor(t,n){this.store=t,this.registry=n}}const Fa=typeof global<"u"?global:self,Pf=Fa.MutationObserver||Fa.WebKitMutationObserver;function Lf(e){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),e()}}}function zg(e){let t=1;const n=new Pf(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const Fg=typeof Pf=="function"?zg:Lf;class $g{enqueueTask(t){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.indexthis.capacity){for(let r=0,i=t.length-this.index;r{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Fg(this.flush),this.requestErrorThrow=Lf(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Ug{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,n){this.onError=t,this.release=n,this.task=null}}class Hg{create(t){const n=this.freeTasks,r=n.length?n.pop():new Ug(this.onError,i=>n[n.length]=i);return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}const If=new $g,Wg=new Hg(If.registerPendingError);function Bg(e){If.enqueueTask(Wg.create(e))}const yu="dnd-core/ADD_SOURCE",Su="dnd-core/ADD_TARGET",wu="dnd-core/REMOVE_SOURCE",To="dnd-core/REMOVE_TARGET";function Vg(e){return{type:yu,payload:{sourceId:e}}}function Qg(e){return{type:Su,payload:{targetId:e}}}function Kg(e){return{type:wu,payload:{sourceId:e}}}function qg(e){return{type:To,payload:{targetId:e}}}function Gg(e){N(typeof e.canDrag=="function","Expected canDrag to be a function."),N(typeof e.beginDrag=="function","Expected beginDrag to be a function."),N(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Yg(e){N(typeof e.canDrop=="function","Expected canDrop to be a function."),N(typeof e.hover=="function","Expected hover to be a function."),N(typeof e.drop=="function","Expected beginDrag to be a function.")}function ml(e,t){if(t&&Array.isArray(e)){e.forEach(n=>ml(n,!1));return}N(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var We;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(We||(We={}));let Xg=0;function Zg(){return Xg++}function Jg(e){const t=Zg().toString();switch(e){case We.SOURCE:return`S${t}`;case We.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function $a(e){switch(e[0]){case"S":return We.SOURCE;case"T":return We.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Ua(e,t){const n=e.entries();let r=!1;do{const{done:i,value:[,o]}=n.next();if(o===t)return!0;r=!!i}while(!r);return!1}class e1{addSource(t,n){ml(t),Gg(n);const r=this.addHandler(We.SOURCE,t,n);return this.store.dispatch(Vg(r)),r}addTarget(t,n){ml(t,!0),Yg(n);const r=this.addHandler(We.TARGET,t,n);return this.store.dispatch(Qg(r)),r}containsHandler(t){return Ua(this.dragSources,t)||Ua(this.dropTargets,t)}getSource(t,n=!1){return N(this.isSourceId(t),"Expected a valid source ID."),n&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return N(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return N(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return N(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return $a(t)===We.SOURCE}isTargetId(t){return $a(t)===We.TARGET}removeSource(t){N(this.getSource(t),"Expected an existing source."),this.store.dispatch(Kg(t)),Bg(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){N(this.getTarget(t),"Expected an existing target."),this.store.dispatch(qg(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const n=this.getSource(t);N(n,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=n}unpinSource(){N(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,n,r){const i=Jg(t);return this.types.set(i,n),t===We.SOURCE?this.dragSources.set(i,r):t===We.TARGET&&this.dropTargets.set(i,r),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const t1=(e,t)=>e===t;function n1(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function r1(e,t,n=t1){if(e.length!==t.length)return!1;for(let r=0;r0||!r1(n,r)))return Cr;const s=r[r.length-1],l=n[n.length-1];return s!==l&&(s&&i.push(s),l&&i.push(l)),i}function o1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s1(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function S1(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}let Wa=0;const ji=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var w1=E.memo(function(t){var{children:n}=t,r=y1(t,["children"]);const[i,o]=C1(r);return E.useEffect(()=>{if(o){const s=Nf();return++Wa,()=>{--Wa===0&&(s[ji]=null)}}},[]),v.jsx(xf.Provider,{value:i,children:n})});function C1(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=E1(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}function E1(e,t=Nf(),n,r){const i=t;return i[ji]||(i[ji]={dragDropManager:m1(e,t,n,r)}),i[ji]}function Nf(){return typeof global<"u"?global:window}var k1=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const hn=typeof window<"u"?E.useLayoutEffect:E.useEffect;function jf(e,t,n){const[r,i]=E.useState(()=>t(e)),o=E.useCallback(()=>{const s=t(e);k1(r,s)||(i(s),n&&n())},[r,e,n]);return hn(o),[r,o]}function _1(e,t,n){const[r,i]=jf(e,t,n);return hn(function(){const s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),r}function Rf(e,t,n){return _1(t,e||(()=>({})),()=>n.reconnect())}function Mf(e,t){const n=[...t||[]];return t==null&&typeof e!="function"&&n.push(e),E.useMemo(()=>typeof e=="function"?e():e,n)}function x1(e){return E.useMemo(()=>e.hooks.dragSource(),[e])}function O1(e){return E.useMemo(()=>e.hooks.dragPreview(),[e])}let ps=!1,gs=!1;class T1{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){N(!ps,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ps=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{ps=!1}}isDragging(){if(!this.sourceId)return!1;N(!gs,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return gs=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{gs=!1}}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,n){return this.internalMonitor.isOverTarget(t,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let ms=!1;class D1{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}canDrop(){if(!this.targetId)return!1;N(!ms,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return ms=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ms=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function P1(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function L1(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function vl(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let u=0;u, or turn it into a drag source or a drop target itself.`)}function N1(e){return(t=null,n=null)=>{if(!E.isValidElement(t)){const o=t;return e(o,n),o}const r=t;return I1(r),j1(r,n?o=>e(o,n):e)}}function Af(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const i=N1(r);t[n]=()=>i}}),t}function Ba(e,t){typeof e=="function"?e(t):e.current=t}function j1(e,t){const n=e.ref;return N(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?E.cloneElement(e,{ref:r=>{Ba(n,r),Ba(t,r)}}):E.cloneElement(e,{ref:t})}class R1{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?t?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),n):(this.lastConnectedDragSource=t,n):n}reconnectDragPreview(t=!1){const n=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!vl(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!vl(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=Af({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,yl(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,yl(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class M1{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!vl(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=Af({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,yl(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function mn(){const{dragDropManager:e}=E.useContext(xf);return N(e!=null,"Expected drag drop context"),e}function A1(e,t){const n=mn(),r=E.useMemo(()=>new R1(n.getBackend()),[n]);return hn(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),hn(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function b1(){const e=mn();return E.useMemo(()=>new T1(e),[e])}class z1{beginDrag(){const t=this.spec,n=this.monitor;let r=null;return typeof t.item=="object"?r=t.item:typeof t.item=="function"?r=t.item(n):r={},r??null}canDrag(){const t=this.spec,n=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(n):!0}isDragging(t,n){const r=this.spec,i=this.monitor,{isDragging:o}=r;return o?o(i):n===t.getSourceId()}endDrag(){const t=this.spec,n=this.monitor,r=this.connector,{end:i}=t;i&&i(n.getItem(),n),r.reconnect()}constructor(t,n,r){this.spec=t,this.monitor=n,this.connector=r}}function F1(e,t,n){const r=E.useMemo(()=>new z1(e,t,n),[t,n]);return E.useEffect(()=>{r.spec=e},[e]),r}function $1(e){return E.useMemo(()=>{const t=e.type;return N(t!=null,"spec.type must be defined"),t},[e])}function U1(e,t,n){const r=mn(),i=F1(e,t,n),o=$1(e);hn(function(){if(o!=null){const[l,u]=L1(o,i,r);return t.receiveHandlerId(l),n.receiveHandlerId(l),u}},[r,t,n,i,o])}function H1(e,t){const n=Mf(e,t);N(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=b1(),i=A1(n.options,n.previewOptions);return U1(n,r,i),[Rf(n.collect,r,i),x1(i),O1(i)]}function W1(e){const n=mn().getMonitor(),[r,i]=jf(n,e);return E.useEffect(()=>n.subscribeToOffsetChange(i)),E.useEffect(()=>n.subscribeToStateChange(i)),r}function B1(e){return E.useMemo(()=>e.hooks.dropTarget(),[e])}function V1(e){const t=mn(),n=E.useMemo(()=>new M1(t.getBackend()),[t]);return hn(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function Q1(){const e=mn();return E.useMemo(()=>new D1(e),[e])}function K1(e){const{accept:t}=e;return E.useMemo(()=>(N(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class q1{canDrop(){const t=this.spec,n=this.monitor;return t.canDrop?t.canDrop(n.getItem(),n):!0}hover(){const t=this.spec,n=this.monitor;t.hover&&t.hover(n.getItem(),n)}drop(){const t=this.spec,n=this.monitor;if(t.drop)return t.drop(n.getItem(),n)}constructor(t,n){this.spec=t,this.monitor=n}}function G1(e,t){const n=E.useMemo(()=>new q1(e,t),[t]);return E.useEffect(()=>{n.spec=e},[e]),n}function Y1(e,t,n){const r=mn(),i=G1(e,t),o=K1(e);hn(function(){const[l,u]=P1(o,i,r);return t.receiveHandlerId(l),n.receiveHandlerId(l),u},[r,t,i,n,o.map(s=>s.toString()).join("|")])}function X1(e,t){const n=Mf(e,t),r=Q1(),i=V1(n.options);return Y1(n,r,i),[Rf(n.collect,r,i),B1(i)]}function bf(e){let t=null;return()=>(t==null&&(t=e()),t)}function Z1(e,t){return e.filter(n=>n!==t)}function J1(e,t){const n=new Set,r=o=>n.add(o);e.forEach(r),t.forEach(r);const i=[];return n.forEach(o=>i.push(o)),i}class em{enter(t){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=J1(this.entered.filter(r),[t]),n===0&&this.entered.length>0}leave(t){const n=this.entered.length;return this.entered=Z1(this.entered.filter(this.isNodeInDocument),t),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class tm{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const i=this.config.exposeProperties[r];i!=null&&(n[r]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,n){return n===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const zf="__NATIVE_FILE__",Ff="__NATIVE_URL__",$f="__NATIVE_TEXT__",Uf="__NATIVE_HTML__";var Va=Object.freeze({__proto__:null,FILE:zf,HTML:Uf,TEXT:$f,URL:Ff});function vs(e,t,n){const r=t.reduce((i,o)=>i||e.getData(o),"");return r??n}const Sl={[zf]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Uf]:{exposeProperties:{html:(e,t)=>vs(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Ff]:{exposeProperties:{urls:(e,t)=>vs(e,t,"").split(` +`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[$f]:{exposeProperties:{text:(e,t)=>vs(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function nm(e,t){const n=Sl[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new tm(n);return r.loadDataTransfer(t),r}function ys(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Sl).filter(n=>{const r=Sl[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const rm=bf(()=>/firefox/i.test(navigator.userAgent)),Hf=bf(()=>!!window.safari);class Qa{interpolate(t){const{xs:n,ys:r,c1s:i,c2s:o,c3s:s}=this;let l=n.length-1;if(t===n[l])return r[l];let u=0,a=s.length-1,g;for(;u<=a;){g=Math.floor(.5*(u+a));const S=n[g];if(St)a=g-1;else return r[g]}l=Math.max(0,a);const p=t-n[l],f=p*p;return r[l]+i[l]*p+o[l]*f+s[l]*p*f}constructor(t,n){const{length:r}=t,i=[];for(let S=0;St[S]{let O=new Qa([0,.5,1],[u.y,u.y/g*m,u.y+m-g]).interpolate(f);return Hf()&&o&&(O+=(window.devicePixelRatio-1)*m),O},C=()=>new Qa([0,.5,1],[u.x,u.x/a*S,u.x+S-a]).interpolate(p),{offsetX:d,offsetY:c}=i,h=d===0||d,w=c===0||c;return{x:h?d:C(),y:w?c:y()}}let um=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,n){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=n}};function am(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ka(e){for(var t=1;t{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,n,r){this.sourceNodes.set(t,n),this.sourceNodeOptions.set(t,r);const i=s=>this.handleDragStart(s,t),o=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",o),n.setAttribute("draggable","false")}}connectDropTarget(t,n){const r=s=>this.handleDragEnter(s,t),i=s=>this.handleDragOver(s,t),o=s=>this.handleDrop(s,t);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",o),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",o)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(t);return Ka({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(t);return Ka({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Va).some(n=>Va[n]===t)}beginDragNativeItem(t,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=nm(t,n),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,n){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(t,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(t,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(t,n){this.dropTargetIds.unshift(n)}constructor(t,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&Wf(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const s=yi(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:l}=i,u=ys(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const g=this.monitor.getSourceId(),p=this.sourceNodes.get(g),f=this.sourcePreviewNodes.get(g)||p;if(f){const{anchorX:S,anchorY:m,offsetX:y,offsetY:C}=this.getCurrentSourcePreviewNodeOptions(),h=lm(p,f,s,{anchorX:S,anchorY:m},{offsetX:y,offsetY:C});l.setDragImage(f,h.x,h.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:a}=this.getCurrentSourcePreviewNodeOptions();a?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(u)this.beginDragNativeItem(u);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,u=ys(l);u&&this.beginDragNativeItem(u,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,o.length>0&&this.actions.hover(o,{clientOffset:yi(i)}),o.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=yi(i),this.scheduleHover(o),(o||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;i.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}else ys(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:yi(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const o=i.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(i.preventDefault(),o.dragDrop()))},this.options=new um(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new em(this.isNodeInDocument)}}let Si;function dm(){return Si||(Si=new Image,Si.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Si}const fm=function(t,n,r){return new cm(t,n,r)};var Qt;(function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"})(Qt||(Qt={}));class hm{get delay(){var t;return(t=this.args.delay)!==null&&t!==void 0?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return(t=this.args.ignoreContextMenu)!==null&&t!==void 0?t:!1}get enableHoverOutsideTarget(){var t;return(t=this.args.enableHoverOutsideTarget)!==null&&t!==void 0?t:!1}get enableKeyboardEvents(){var t;return(t=this.args.enableKeyboardEvents)!==null&&t!==void 0?t:!1}get enableMouseEvents(){var t;return(t=this.args.enableMouseEvents)!==null&&t!==void 0?t:!1}get enableTouchEvents(){var t;return(t=this.args.enableTouchEvents)!==null&&t!==void 0?t:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,n,r,i;return(i=(r=(t=this.args)===null||t===void 0?void 0:t.delayTouchStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&i!==void 0?i:0}get delayMouseStart(){var t,n,r,i;return(i=(r=(t=this.args)===null||t===void 0?void 0:t.delayMouseStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&i!==void 0?i:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var t;if(!((t=this.context)===null||t===void 0)&&t.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var t;return((t=this.args)===null||t===void 0?void 0:t.rootElement)||this.document}constructor(t,n){this.args=t,this.context=n}}function pm(e,t,n,r){return Math.sqrt(Math.pow(Math.abs(n-e),2)+Math.pow(Math.abs(r-t),2))}function gm(e,t,n,r,i){if(!i)return!1;const o=Math.atan2(r-t,n-e)*180/Math.PI+180;for(let s=0;s=l.start)&&(l.end==null||o<=l.end))return!0}return!1}const mm={Left:1,Right:2,Center:4},vm={Left:0,Center:1,Right:2};function Ss(e){return e.button===void 0||e.button===vm.Left}function ym(e){return e.buttons===void 0||(e.buttons&mm.Left)===0}function Bf(e){return!!e.targetTouches}const Sm=1;function wm(e){const t=e.nodeType===Sm?e:e.parentElement;if(!t)return;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Cm(e,t){if(e.targetTouches.length===1)return oo(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return oo(e.touches[0])}function oo(e,t){return Bf(e)?Cm(e,t):{x:e.clientX,y:e.clientY}}const qa=(()=>{let e=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return e=!0,!0}}))}catch{}return e})(),or={[Qt.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[Qt.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[Qt.keyboard]:{keydown:"keydown"}};class Er{profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;t&&(N(!Er.isSetUp,"Cannot have two Touch backends at the same time."),Er.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;t&&(Er.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,n,r,i=!1){const o=qa?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){const l=or[s][n];l&&t.addEventListener(l,r,o)})}removeEventListener(t,n,r,i=!1){const o=qa?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){const l=or[s][n];l&&t.removeEventListener(l,r,o)})}connectDragSource(t,n){const r=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,n),this.addEventListener(n,"start",r),()=>{this.sourceNodes.delete(t),this.removeEventListener(n,"start",r)}}connectDragPreview(t,n,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,n),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,n){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const i=o=>{if(!this.document||!r||!this.monitor.isDragging())return;let s;switch(o.type){case or.mouse.move:s={x:o.clientX,y:o.clientY};break;case or.touch.move:var l,u;s={x:((l=o.touches[0])===null||l===void 0?void 0:l.clientX)||0,y:((u=o.touches[0])===null||u===void 0?void 0:u.clientY)||0};break}const a=s!=null?this.document.elementFromPoint(s.x,s.y):void 0,g=a&&n.contains(a);if(a===n||g)return this.handleMove(o,t)};return this.addEventListener(this.document.body,"move",i),this.targetNodes.set(t,n),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",i))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!t||!t.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,n,r){this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&wm(o)},this.handleTopMoveStartCapture=i=>{Ss(i)&&(this.moveStartSourceIds=[])},this.handleMoveStart=i=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(i)},this.handleTopMoveStart=i=>{if(!Ss(i))return;const o=oo(i);o&&(Bf(i)&&(this.lastTargetTouchFallback=i.targetTouches[0]),this._mouseClientOffset=o),this.waitingForDelay=!1},this.handleTopMoveStartDelay=i=>{if(!Ss(i))return;const o=i.type===or.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,i),o),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(i,o)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(o)},this.handleTopMove=i=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:o,dragOverTargetIds:s}=this,l=this.options.enableHoverOutsideTarget,u=oo(i,this.lastTargetTouchFallback);if(!u)return;if(this._isScrolling||!this.monitor.isDragging()&&gm(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,u.x,u.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&o&&pm(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,u.x,u.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(o,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const a=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(a),this.actions.publishDragSource(),i.cancelable&&i.preventDefault();const g=(s||[]).map(m=>this.targetNodes.get(m)).filter(m=>!!m),p=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(u.x,u.y,g):this.document.elementsFromPoint(u.x,u.y),f=[];for(const m in p){if(!p.hasOwnProperty(m))continue;let y=p[m];for(y!=null&&f.push(y);y;)y=y.parentElement,y&&f.indexOf(y)===-1&&f.push(y)}const S=f.filter(m=>g.indexOf(m)>-1).map(m=>this._getDropTargetId(m)).filter(m=>!!m).filter((m,y,C)=>C.indexOf(m)===y);if(l)for(const m in this.targetNodes){const y=this.targetNodes.get(m);if(a&&y&&y.contains(a)&&S.indexOf(m)===-1){S.unshift(m);break}}S.reverse(),this.actions.hover(S,{clientOffset:u})},this._getDropTargetId=i=>{const o=this.targetNodes.keys();let s=o.next();for(;s.done===!1;){const l=s.value;if(i===this.targetNodes.get(l))return l;s=o.next()}},this.handleTopMoveEndCapture=i=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!ym(i)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}i.cancelable&&i.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=i=>{i.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new hm(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Qt.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Qt.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Qt.keyboard)}}const Em=function(t,n={},r={}){return new Er(t,n,r)},Ur="abcdefgh".split(""),Ri={a8:"bR",b8:"bN",c8:"bB",d8:"bQ",e8:"bK",f8:"bB",g8:"bN",h8:"bR",a7:"bP",b7:"bP",c7:"bP",d7:"bP",e7:"bP",f7:"bP",g7:"bP",h7:"bP",a2:"wP",b2:"wP",c2:"wP",d2:"wP",e2:"wP",f2:"wP",g2:"wP",h2:"wP",a1:"wR",b1:"wN",c1:"wB",d1:"wQ",e1:"wK",f1:"wB",g1:"wN",h1:"wR"},km={a:0,b:1,c:2,d:3,e:4,f:5,g:6,h:7},_m={a:7,b:6,c:5,d:4,e:3,f:2,g:1,h:0},xm=[7,6,5,4,3,2,1,0],Om=[0,1,2,3,4,5,6,7],Ga={wP:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsx("path",{d:"m 22.5,9 c -2.21,0 -4,1.79 -4,4 0,0.89 0.29,1.71 0.78,2.38 C 17.33,16.5 16,18.59 16,21 c 0,2.03 0.94,3.84 2.41,5.03 C 15.41,27.09 11,31.58 11,39.5 H 34 C 34,31.58 29.59,27.09 26.59,26.03 28.06,24.84 29,23.03 29,21 29,18.59 27.67,16.5 25.72,15.38 26.21,14.71 26.5,13.89 26.5,13 c 0,-2.21 -1.79,-4 -4,-4 z",style:{opacity:"1",fill:"#ffffff",fillOpacity:"1",fillRule:"nonzero",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}})})),wR:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"#ffffff",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 34,14 L 31,17 L 14,17 L 11,14"}),v.jsx("path",{d:"M 31,17 L 31,29.5 L 14,29.5 L 14,17",style:{strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 31,29.5 L 32.5,32 L 12.5,32 L 14,29.5"}),v.jsx("path",{d:"M 11,14 L 34,14",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}})]}))})),wN:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18",style:{fill:"#ffffff",stroke:"#000000"}}),v.jsx("path",{d:"M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10",style:{fill:"#ffffff",stroke:"#000000"}}),v.jsx("path",{d:"M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z",transform:"matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)",style:{fill:"#000000",stroke:"#000000"}})]}))})),wB:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillRule:"evenodd",fillOpacity:"1",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsxs("g",Object.assign({style:{fill:"#ffffff",stroke:"#000000",strokeLinecap:"butt"}},{children:[v.jsx("path",{d:"M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.65,38.99 6.68,38.97 6,38 C 7.35,36.54 9,36 9,36 z"}),v.jsx("path",{d:"M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z"}),v.jsx("path",{d:"M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z"})]})),v.jsx("path",{d:"M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}})]}))})),wQ:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"#ffffff",stroke:"#000000",strokeWidth:"1.5",strokeLinejoin:"round"}},{children:[v.jsx("path",{d:"M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.7,10.9 L 25.5,24.5 L 22.5,10 L 19.5,24.5 L 14.3,10.9 L 14,25 L 6.5,13.5 L 9,26 z"}),v.jsx("path",{d:"M 9,26 C 9,28 10.5,28 11.5,30 C 12.5,31.5 12.5,31 12,33.5 C 10.5,34.5 11,36 11,36 C 9.5,37.5 11,38.5 11,38.5 C 17.5,39.5 27.5,39.5 34,38.5 C 34,38.5 35.5,37.5 34,36 C 34,36 34.5,34.5 33,33.5 C 32.5,31 32.5,31.5 33.5,30 C 34.5,28 36,28 36,26 C 27.5,24.5 17.5,24.5 9,26 z"}),v.jsx("path",{d:"M 11.5,30 C 15,29 30,29 33.5,30",style:{fill:"none"}}),v.jsx("path",{d:"M 12,33.5 C 18,32.5 27,32.5 33,33.5",style:{fill:"none"}}),v.jsx("circle",{cx:"6",cy:"12",r:"2"}),v.jsx("circle",{cx:"14",cy:"9",r:"2"}),v.jsx("circle",{cx:"22.5",cy:"8",r:"2"}),v.jsx("circle",{cx:"31",cy:"9",r:"2"}),v.jsx("circle",{cx:"39",cy:"12",r:"2"})]}))})),wK:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22.5,11.63 L 22.5,6",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 20,8 L 25,8",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25",style:{fill:"#ffffff",stroke:"#000000",strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 12.5,37 C 18,40.5 27,40.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 20,16 10.5,13 6.5,19.5 C 3.5,25.5 12.5,30 12.5,30 L 12.5,37",style:{fill:"#ffffff",stroke:"#000000"}}),v.jsx("path",{d:"M 12.5,30 C 18,27 27,27 32.5,30",style:{fill:"none",stroke:"#000000"}}),v.jsx("path",{d:"M 12.5,33.5 C 18,30.5 27,30.5 32.5,33.5",style:{fill:"none",stroke:"#000000"}}),v.jsx("path",{d:"M 12.5,37 C 18,34 27,34 32.5,37",style:{fill:"none",stroke:"#000000"}})]}))})),bP:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsx("path",{d:"m 22.5,9 c -2.21,0 -4,1.79 -4,4 0,0.89 0.29,1.71 0.78,2.38 C 17.33,16.5 16,18.59 16,21 c 0,2.03 0.94,3.84 2.41,5.03 C 15.41,27.09 11,31.58 11,39.5 H 34 C 34,31.58 29.59,27.09 26.59,26.03 28.06,24.84 29,23.03 29,21 29,18.59 27.67,16.5 25.72,15.38 26.21,14.71 26.5,13.89 26.5,13 c 0,-2.21 -1.79,-4 -4,-4 z",style:{opacity:"1",fill:"#000000",fillOpacity:"1",fillRule:"nonzero",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}})})),bR:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"#000000",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12.5,32 L 14,29.5 L 31,29.5 L 32.5,32 L 12.5,32 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 14,29.5 L 14,16.5 L 31,16.5 L 31,29.5 L 14,29.5 z ",style:{strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 14,16.5 L 11,14 L 34,14 L 31,16.5 L 14,16.5 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14 L 11,14 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12,35.5 L 33,35.5 L 33,35.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 13,31.5 L 32,31.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 14,29.5 L 31,29.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 14,16.5 L 31,16.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 11,14 L 34,14",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}})]}))})),bN:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z",style:{fill:"#ffffff",stroke:"#ffffff"}}),v.jsx("path",{d:"M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z",transform:"matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)",style:{fill:"#ffffff",stroke:"#ffffff"}}),v.jsx("path",{d:"M 24.55,10.4 L 24.1,11.85 L 24.6,12 C 27.75,13 30.25,14.49 32.5,18.75 C 34.75,23.01 35.75,29.06 35.25,39 L 35.2,39.5 L 37.45,39.5 L 37.5,39 C 38,28.94 36.62,22.15 34.25,17.66 C 31.88,13.17 28.46,11.02 25.06,10.5 L 24.55,10.4 z ",style:{fill:"#ffffff",stroke:"none"}})]}))})),bB:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillRule:"evenodd",fillOpacity:"1",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsxs("g",Object.assign({style:{fill:"#000000",stroke:"#000000",strokeLinecap:"butt"}},{children:[v.jsx("path",{d:"M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.65,38.99 6.68,38.97 6,38 C 7.35,36.54 9,36 9,36 z"}),v.jsx("path",{d:"M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z"}),v.jsx("path",{d:"M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z"})]})),v.jsx("path",{d:"M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18",style:{fill:"none",stroke:"#ffffff",strokeLinejoin:"miter"}})]}))})),bQ:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"#000000",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}},{children:[v.jsx("path",{d:"M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.7,10.9 L 25.5,24.5 L 22.5,10 L 19.5,24.5 L 14.3,10.9 L 14,25 L 6.5,13.5 L 9,26 z",style:{strokeLinecap:"butt",fill:"#000000"}}),v.jsx("path",{d:"m 9,26 c 0,2 1.5,2 2.5,4 1,1.5 1,1 0.5,3.5 -1.5,1 -1,2.5 -1,2.5 -1.5,1.5 0,2.5 0,2.5 6.5,1 16.5,1 23,0 0,0 1.5,-1 0,-2.5 0,0 0.5,-1.5 -1,-2.5 -0.5,-2.5 -0.5,-2 0.5,-3.5 1,-2 2.5,-2 2.5,-4 -8.5,-1.5 -18.5,-1.5 -27,0 z"}),v.jsx("path",{d:"M 11.5,30 C 15,29 30,29 33.5,30"}),v.jsx("path",{d:"m 12,33.5 c 6,-1 15,-1 21,0"}),v.jsx("circle",{cx:"6",cy:"12",r:"2"}),v.jsx("circle",{cx:"14",cy:"9",r:"2"}),v.jsx("circle",{cx:"22.5",cy:"8",r:"2"}),v.jsx("circle",{cx:"31",cy:"9",r:"2"}),v.jsx("circle",{cx:"39",cy:"12",r:"2"}),v.jsx("path",{d:"M 11,38.5 A 35,35 1 0 0 34,38.5",style:{fill:"none",stroke:"#000000",strokeLinecap:"butt"}}),v.jsxs("g",Object.assign({style:{fill:"none",stroke:"#ffffff"}},{children:[v.jsx("path",{d:"M 11,29 A 35,35 1 0 1 34,29"}),v.jsx("path",{d:"M 12.5,31.5 L 32.5,31.5"}),v.jsx("path",{d:"M 11.5,34.5 A 35,35 1 0 0 33.5,34.5"}),v.jsx("path",{d:"M 10.5,37.5 A 35,35 1 0 0 34.5,37.5"})]}))]}))})),bK:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22.5,11.63 L 22.5,6",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"},id:"path6570"}),v.jsx("path",{d:"M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25",style:{fill:"#000000",fillOpacity:"1",strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 12.5,37 C 18,40.5 27,40.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 20,16 10.5,13 6.5,19.5 C 3.5,25.5 12.5,30 12.5,30 L 12.5,37",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 20,8 L 25,8",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 32,29.5 C 32,29.5 40.5,25.5 38.03,19.85 C 34.15,14 25,18 22.5,24.5 L 22.5,26.6 L 22.5,24.5 C 20,18 10.85,14 6.97,19.85 C 4.5,25.5 13,29.5 13,29.5",style:{fill:"none",stroke:"#ffffff"}}),v.jsx("path",{d:"M 12.5,30 C 18,27 27,27 32.5,30 M 12.5,33.5 C 18,30.5 27,30.5 32.5,33.5 M 12.5,37 C 18,34 27,34 32.5,37",style:{fill:"none",stroke:"#ffffff"}})]}))}))};function wl(e,t,n){const r=t/8,i=e==="white"?km:_m,o=e==="white"?xm:Om,s=i[n[0]]*r+r/2,l=o[parseInt(n[1],10)-1]*r+r/2;return{x:s,y:l}}function Ya(e){let t=!1;return Object.keys(Ri).forEach(n=>{e[n]!==Ri[n]&&(t=!0)}),Object.keys(e).forEach(n=>{Ri[n]!==e[n]&&(t=!0)}),t}function Tm(e,t){const n={removed:{},added:{}};return Object.keys(e).forEach(r=>{t[r]!==e[r]&&(n.removed[r]=e[r])}),Object.keys(t).forEach(r=>{e[r]!==t[r]&&(n.added[r]=t[r])}),n}function Xa(e){return e==="start"?Ri:typeof e=="string"?Dm(e):e}function Dm(e){if(!Pm(e))return{};e=e.replace(/ .+$/,"");const t=e.split("/"),n={};let r=8;for(let i=0;i<8;i++){const o=t[i].split("");let s=0;for(let l=0;l{const[i,o]=E.useState([]),[s,l]=E.useState([]),[u,a]=E.useState();E.useEffect(()=>{Array.isArray(e)&&o(e==null?void 0:e.filter(m=>m[0]!==m[1]))},[e]),E.useEffect(()=>{n==null||n(s)},[s]);function g(){l([]),a(void 0)}const p=(m,y)=>{t&&a([m,y,r])},f=[...s,...i];return{arrows:f,newArrow:u,clearArrows:g,drawNewArrow:p,setArrows:l,onArrowDrawEnd:(m,y)=>{if(m===y||!t)return;let C;const d=[m,y,r];f.every(([h,w])=>!(h===m&&w===y))?C=[...s,d]:C=s.filter(([h,w])=>!(h===m&&w===y)),a(void 0),l(C)}}},Vf=E.createContext({}),_t=()=>E.useContext(Vf),jm=E.forwardRef(({allowDragOutsideBoard:e=!0,animationDuration:t=300,areArrowsAllowed:n=!0,arePiecesDraggable:r=!0,arePremovesAllowed:i=!1,autoPromoteToQueen:o=!1,boardOrientation:s="white",boardWidth:l,children:u,clearPremovesOnRightClick:a=!0,customArrows:g,customArrowColor:p="rgb(255,170,0)",customBoardStyle:f,customDarkSquareStyle:S={backgroundColor:"#B58863"},customDropSquareStyle:m={boxShadow:"inset 0 0 1px 6px rgba(255,255,255,0.75)"},customLightSquareStyle:y={backgroundColor:"#F0D9B5"},customPieces:C,customPremoveDarkSquareStyle:d={backgroundColor:"#A42323"},customPremoveLightSquareStyle:c={backgroundColor:"#BD2828"},customSquare:h="div",customSquareStyles:w,dropOffBoardAction:k="snapback",id:O=0,isDraggablePiece:x=()=>!0,getPositionObject:T=()=>{},onArrowsChange:z=()=>{},onDragOverSquare:M=()=>{},onMouseOutSquare:$=()=>{},onMouseOverSquare:K=()=>{},onPieceClick:Ae=()=>{},onPieceDragBegin:be=()=>{},onPieceDragEnd:qe=()=>{},onPieceDrop:Ce=()=>!0,onPromotionCheck:dt=(Zt,xt,qr)=>(qr==="wP"&&Zt[1]==="7"&&xt[1]==="8"||qr==="bP"&&Zt[1]==="2"&&xt[1]==="1")&&Math.abs(Zt.charCodeAt(0)-xt.charCodeAt(0))<=1,onPromotionPieceSelect:D,onSquareClick:L=()=>{},onSquareRightClick:j=()=>{},position:H="start",promotionDialogVariant:X="default",promotionToSquare:ot=null,showBoardNotation:A=!0,showPromotionDialog:ft=!1,snapToCursor:Ge=!0},vn)=>{const[Zt,xt]=E.useState(Xa(H)),[qr,Zf]=E.useState({removed:{},added:{}}),[Po,yn]=E.useState(void 0),[Jf,Lo]=E.useState(ft&&!o),[eh,Cu]=E.useState(null),[th,Io]=E.useState(ot),[Eu,No]=E.useState([]),Ot=E.useRef(Eu),[jo,Gr]=E.useState(),[nh,rh]=E.useState(Object.assign(Object.assign({},Ga),C)),[ih,Yr]=E.useState(!1),[Ro,oh]=E.useState(),[Xr,Zr]=E.useState(!1);E.useImperativeHandle(vn,()=>({clearPremoves(ee=!0){Jr(ee)}})),E.useEffect(()=>{rh(Object.assign(Object.assign({},Ga),C))},[C]),E.useEffect(()=>{Lo(ft),Io(ot)},[ot,ft]),E.useEffect(()=>{var ee,de,Ye;bo();const De=Xa(H),ht=Tm(Zt,De),Xe=((ee=Object.keys(ht.added))===null||ee===void 0?void 0:ee.length)<=2?(Ye=(de=Object.entries(ht.added))===null||de===void 0?void 0:de[0])===null||Ye===void 0?void 0:Ye[1][0]:void 0;if(Xr)xt(De),Zr(!1),i&&Ao(Xe),Ro&&clearTimeout(Ro);else if(ih)xt(De),Zr(!1),i&&Ao(Xe);else{Ya(De)&&Po!==void 0?yn(Xe):Ya(De)?yn(void 0):yn("b"),Zf(ht),Zr(!0);const gh=setTimeout(()=>{xt(De),Zr(!1),i&&Ao(Xe)},t);oh(gh)}return Yr(!1),T(De),Mo(),()=>{clearTimeout(Ro)}},[H]);const{arrows:sh,newArrow:lh,clearArrows:Mo,drawNewArrow:uh,onArrowDrawEnd:ah}=Nm(g,n,z,p);function ch(ee,de,Ye,De){if(ee===de)return;if(Mo(),i&&Xr||i&&(Po===Ye[0]||Ot.current.filter(Xe=>Xe.piece[0]===Ye[0]).length>0)){const Xe=[...Ot.current];Xe.push({sourceSq:ee,targetSq:de,piece:Ye}),Ot.current=Xe,No([...Xe]),bo();return}if(!i&&Xr)return;const ht=Object.assign({},Zt);Yr(!!De),yn(Ye[0]),Ce.length?Ce(ee,de,Ye)||(Jr(),Yr(!1)):(k==="trash"&&!de&&delete ht[ee],delete ht[ee],ht[de]=Ye,xt(ht)),bo(),T(ht)}function Ao(ee){if(Ot.current.length===0)return;const de=Ot.current[0];if(de.piece[0]!==void 0&&de.piece[0]!==ee&&Ce.length)if(yn(de.piece[0]),Yr(!0),Ce(de.sourceSq,de.targetSq,de.piece)){const De=[...Ot.current];De.shift(),Ot.current=De,No([...De])}else Jr()}function Jr(ee=!0){ee&&yn(void 0),Ot.current=[],No([])}function bo(){Cu(null),Io(null),Lo(!1)}function dh(ee){Gr(ee)}function fh(ee){if(jo){if(jo===ee){Gr(void 0),a&&Jr(!1),j(ee);return}}else Gr(void 0)}function hh(){Gr(void 0)}const ph={animationDuration:t,arePiecesDraggable:r,arePremovesAllowed:i,boardOrientation:s,boardWidth:l,customArrowColor:p,customBoardStyle:f,customDarkSquareStyle:S,customDropSquareStyle:m,customLightSquareStyle:y,customPremoveDarkSquareStyle:d,customPremoveLightSquareStyle:c,customSquare:h,customSquareStyles:w,id:O,isDraggablePiece:x,onDragOverSquare:M,onMouseOutSquare:$,onMouseOverSquare:K,onPieceClick:Ae,onPieceDragBegin:be,onPieceDragEnd:qe,onPieceDrop:Ce,onPromotionCheck:dt,onPromotionPieceSelect:D,onSquareClick:L,showBoardNotation:A,snapToCursor:Ge,promotionDialogVariant:X,allowDragOutsideBoard:e,arrows:sh,newArrow:lh,onArrowDrawEnd:ah,chessPieces:nh,clearArrows:Mo,drawNewArrow:uh,clearCurrentRightClickDown:hh,currentPosition:Zt,handleSetPosition:ch,isWaitingForAnimation:Xr,lastPieceColour:Po,onRightClickDown:dh,onRightClickUp:fh,positionDifferences:qr,promoteFromSquare:eh,promoteToSquare:th,premoves:Eu,setPromoteFromSquare:Cu,setPromoteToSquare:Io,setShowPromoteDialog:Lo,showPromoteDialog:Jf,autoPromoteToQueen:o,currentRightClickDown:jo};return v.jsx(Vf.Provider,Object.assign({value:ph},{children:u}))});function Rm({row:e,col:t}){const{boardOrientation:n,boardWidth:r,customDarkSquareStyle:i,customLightSquareStyle:o}=_t(),s=o.backgroundColor,l=i.backgroundColor,u=t===0,a=e===7,g=u&&a;function p(){return n==="white"?8-e:e+1}function f(){return n==="black"?Ur[7-t]:Ur[t]}function S(){return v.jsxs(v.Fragment,{children:[v.jsx("div",Object.assign({style:Object.assign(Object.assign({zIndex:3,position:"absolute"},{color:s}),Ja(r))},{children:p()})),v.jsx("div",Object.assign({style:Object.assign(Object.assign({zIndex:3,position:"absolute"},{color:s}),Za(r))},{children:f()}))]})}function m(){return v.jsx("div",Object.assign({style:Object.assign(Object.assign({userSelect:"none",zIndex:3,position:"absolute"},{color:t%2!==0?l:s}),Za(r))},{children:f()}))}function y(){return v.jsx("div",Object.assign({style:Object.assign(Object.assign({userSelect:"none",zIndex:3,position:"absolute"},n==="black"?{color:e%2===0?l:s}:{color:e%2===0?l:s}),Ja(r))},{children:p()}))}return g?S():a?m():u?y():null}const Za=e=>({alignSelf:"flex-end",paddingLeft:e/8-e/48,fontSize:e/48}),Ja=e=>({alignSelf:"flex-start",paddingRight:e/8-e/48,fontSize:e/48});function ec({isPremovedPiece:e=!1,piece:t,square:n,squares:r}){const{animationDuration:i,arePiecesDraggable:o,arePremovesAllowed:s,boardWidth:l,boardOrientation:u,chessPieces:a,currentPosition:g,id:p,isDraggablePiece:f,isWaitingForAnimation:S,onPieceClick:m,onPieceDragBegin:y,onPieceDragEnd:C,positionDifferences:d,premoves:c,onPromotionCheck:h}=_t(),[w,k]=E.useState({opacity:1,zIndex:5,touchAction:"none",cursor:o&&f({piece:t,sourceSquare:n})?"-webkit-grab":"default"}),[{canDrag:O,isDragging:x},T,z]=H1(()=>({type:"piece",item:()=>(y(t,n),{piece:t,square:n,id:p}),end:()=>C(t,n),collect:$=>({canDrag:f({piece:t,sourceSquare:n}),isDragging:!!$.isDragging()})}),[t,n,g,p]);z(dm(),{captureDraggingState:!0}),E.useEffect(()=>{k($=>Object.assign(Object.assign({},$),{opacity:x?0:1}))},[x]),E.useEffect(()=>{if(!s)return;let $=!1;!e&&c.find(K=>K.targetSq===n)&&($=!0),c.find(K=>K.sourceSq===n&&K.piece===t)&&($=!0),k(K=>Object.assign(Object.assign({},K),{display:$?"none":"unset"}))},[g,c]),E.useEffect(()=>{var $;const K=($=d.removed)===null||$===void 0?void 0:$[n];if(!d.added||!K)return;const Ae=Object.entries(d.added).find(([be,qe])=>qe===K||h(n,be,K));if(S&&K&&Ae&&!e){const be=n,qe=Ae[0];if(be&&qe){const Ce=l/8;k(dt=>Object.assign(Object.assign({},dt),{transform:`translate(${(u==="black"?-1:1)*(qe.charCodeAt(0)-be.charCodeAt(0))*Ce}px, ${(u==="black"?-1:1)*(Number(be[1])-Number(qe[1]))*Ce}px)`,transition:`transform ${i}ms`,zIndex:6}))}}},[d]),E.useEffect(()=>{const{sourceSq:$}=M();$&&k(K=>Object.assign(Object.assign({},K),{transform:"translate(0px, 0px)",transition:"transform 0ms"}))},[g]),E.useEffect(()=>{k($=>Object.assign(Object.assign({},$),{cursor:o&&f({piece:t,sourceSquare:n})?"-webkit-grab":"default"}))},[n,g,o]);function M(){return{sourceSq:r[n]}}return v.jsx("div",Object.assign({ref:o&&O?T:null,onClick:()=>m(t),"data-piece":t,style:w},{children:typeof a[t]=="function"?a[t]({squareWidth:l/8,isDragging:x,square:n}):v.jsx("svg",Object.assign({viewBox:"1 1 43 43",width:l/8,height:l/8},{children:v.jsx("g",{children:a[t]})}))}))}function Mm({square:e,squareColor:t,setSquares:n,squareHasPremove:r,children:i}){const o=E.useRef(null),{autoPromoteToQueen:s,boardWidth:l,boardOrientation:u,clearArrows:a,currentPosition:g,currentRightClickDown:p,customBoardStyle:f,customDarkSquareStyle:S,customDropSquareStyle:m,customLightSquareStyle:y,customPremoveDarkSquareStyle:C,customPremoveLightSquareStyle:d,customSquare:c,customSquareStyles:h,drawNewArrow:w,handleSetPosition:k,isWaitingForAnimation:O,lastPieceColour:x,onArrowDrawEnd:T,onDragOverSquare:z,onMouseOutSquare:M,onMouseOverSquare:$,onPieceDrop:K,onPromotionCheck:Ae,onRightClickDown:be,onRightClickUp:qe,onSquareClick:Ce,setPromoteFromSquare:dt,setPromoteToSquare:D,setShowPromoteDialog:L}=_t(),[{isOver:j},H]=X1(()=>({accept:"piece",drop:X,collect:A=>({isOver:!!A.isOver()})}),[e,g,K,O,x]);function X(A){Ae(A.square,e,A.piece)?s?k(A.square,e,A.piece[0]==="w"?"wQ":"bQ"):(dt(A.square),D(e),L(!0)):k(A.square,e,A.piece,!0)}E.useEffect(()=>{if(o.current){const{x:A,y:ft}=o.current.getBoundingClientRect();n(Ge=>Object.assign(Object.assign({},Ge),{[e]:{x:A,y:ft}}))}},[l,u]);const ot=Object.assign(Object.assign(Object.assign(Object.assign({},Am(e,u,f)),t==="black"?S:y),r&&(t==="black"?C:d)),j&&m);return v.jsx("div",Object.assign({ref:H,style:ot,"data-square-color":t,"data-square":e,onMouseOver:A=>{A.buttons===2&&p&&w(p,e),!(A.relatedTarget&&A.currentTarget.contains(A.relatedTarget))&&$(e)},onMouseOut:A=>{A.relatedTarget&&A.currentTarget.contains(A.relatedTarget)||M(e)},onMouseDown:A=>{A.button===2&&be(e)},onMouseUp:A=>{A.button===2&&(p&&T(p,e),qe(e))},onDragEnter:()=>z(e),onClick:()=>{Ce(e),a()},onContextMenu:A=>{A.preventDefault()}},{children:typeof c=="string"?v.jsx(c,Object.assign({ref:o,style:Object.assign(Object.assign(Object.assign({},nc(l)),tc),!r&&(h==null?void 0:h[e]))},{children:i})):v.jsx(c,Object.assign({ref:o,square:e,squareColor:t,style:Object.assign(Object.assign(Object.assign({},nc(l)),tc),!r&&(h==null?void 0:h[e]))},{children:i}))}))}const tc={display:"flex",justifyContent:"center"},nc=e=>({width:e/8,height:e/8}),Am=(e,t,n)=>n!=null&&n.borderRadius?e==="a1"?t==="white"?{borderBottomLeftRadius:n.borderRadius}:{borderTopRightRadius:n.borderRadius}:e==="a8"?t==="white"?{borderTopLeftRadius:n.borderRadius}:{borderBottomRightRadius:n.borderRadius}:e==="h1"?t==="white"?{borderBottomRightRadius:n.borderRadius}:{borderTopLeftRadius:n.borderRadius}:e==="h8"?t==="white"?{borderTopRightRadius:n.borderRadius}:{borderBottomLeftRadius:n.borderRadius}:{}:{};function bm(){const[e,t]=E.useState({}),{boardOrientation:n,boardWidth:r,currentPosition:i,id:o,premoves:s,showBoardNotation:l}=_t();return v.jsx("div",Object.assign({"data-boardid":o},{children:[...Array(8)].map((u,a)=>v.jsx("div",Object.assign({style:{display:"flex",flexWrap:"nowrap",width:r}},{children:[...Array(8)].map((g,p)=>{const f=n==="black"?Ur[7-p]+(a+1):Ur[p]+(8-a),S=p%2===a%2?"white":"black",m=s.find(C=>C.sourceSq===f||C.targetSq===f),y=s.find(C=>C.targetSq===f);return v.jsxs(Mm,Object.assign({square:f,squareColor:S,setSquares:t,squareHasPremove:!!m},{children:[i[f]&&v.jsx(ec,{piece:i[f],square:f,squares:e}),y&&v.jsx(ec,{isPremovedPiece:!0,piece:y.piece,square:f,squares:e}),l&&v.jsx(Rm,{row:a,col:p})]}),`${p}${a}`)})}),a.toString()))}))}const zm=()=>{const{arrows:e,newArrow:t,boardOrientation:n,boardWidth:r,customArrowColor:i}=_t(),o=[...e,t].filter(Boolean);return v.jsx("svg",Object.assign({width:r,height:r,style:{position:"absolute",top:"0",left:"0",pointerEvents:"none",zIndex:"10"}},{children:o.map((s,l)=>{const[u,a,g]=s;if(u===a)return null;const p=wl(n,r,u),f=wl(n,r,a);let S=r/32;const m=l===e.length;e.some(h=>h[0]!==u&&h[1]===a)&&!m&&(S=r/16);const y=f.x-p.x,C=f.y-p.y,d=Math.hypot(C,y),c={x:p.x+y*(d-S)/d,y:p.y+C*(d-S)/d};return v.jsxs(E.Fragment,{children:[v.jsx("marker",Object.assign({id:`arrowhead-${l}`,markerWidth:"2",markerHeight:"2.5",refX:"1.25",refY:"1.25",orient:"auto"},{children:v.jsx("polygon",{points:"0.3 0, 2 1.25, 0.3 2.5",fill:g??i})})),v.jsx("line",{x1:p.x,y1:p.y,x2:c.x,y2:c.y,opacity:m?"0.5":"0.65",stroke:g??i,strokeWidth:m?.9*r/40:r/40,markerEnd:`url(#arrowhead-${l})`})]},`${u}-${a}${m?"-active":""}`)})}))};function Fm({option:e}){const[t,n]=E.useState(!1),{boardWidth:r,chessPieces:i,customDarkSquareStyle:o,customLightSquareStyle:s,handleSetPosition:l,onPromotionPieceSelect:u,promoteFromSquare:a,promoteToSquare:g,promotionDialogVariant:p}=_t(),f=()=>{switch(e[1]){case"Q":return o.backgroundColor;case"R":return s.backgroundColor;case"N":return p==="default"?s.backgroundColor:o.backgroundColor;case"B":return p==="default"?o.backgroundColor:s.backgroundColor}};return v.jsx("div",Object.assign({onClick:()=>{u!=null&&u.length?u(e):l(a,g,e,!0)},onMouseOver:()=>n(!0),onMouseOut:()=>n(!1),"data-piece":e,style:{cursor:"pointer",backgroundColor:t?f():`${f()}aa`,borderRadius:"4px",transition:"all 0.1s ease-out"}},{children:typeof i[e]=="function"?v.jsx("div",Object.assign({style:{transition:"all 0.1s ease-out",transform:t?"scale(1)":"scale(0.85)"}},{children:i[e]({squareWidth:r/8,isDragging:!1})})):v.jsx("svg",Object.assign({viewBox:"1 1 43 43",width:r/8,height:r/8,style:{transition:"all 0.1s ease-out",transform:t?"scale(1)":"scale(0.85)"}},{children:v.jsx("g",{children:i[e]})}))}))}function $m(){const{boardOrientation:e,boardWidth:t,promotionDialogVariant:n,promoteToSquare:r}=_t(),i=(r==null?void 0:r[1])==="1"?"b":"w",o=[`${i??"w"}Q`,`${i??"w"}R`,`${i??"w"}N`,`${i??"w"}B`],s={default:{display:"grid",gridTemplateColumns:"1fr 1fr",transform:`translate(${-t/8}px, ${-t/8}px)`},vertical:{transform:`translate(${-t/16}px, ${-t/16}px)`},modal:{display:"flex",justifyContent:"center",alignItems:"center",transform:`translate(0px, ${3*t/8}px)`,width:"100%",height:`${t/4}px`,top:0,backgroundColor:"white",left:0}},l=wl(e,t,r||"a8");return v.jsx("div",Object.assign({style:Object.assign({position:"absolute",top:`${l==null?void 0:l.y}px`,left:`${l==null?void 0:l.x}px`,zIndex:1e3},s[n]),title:"Choose promotion piece"},{children:o.map(u=>v.jsx(Fm,{option:u},u))}))}const Um={whiteKing:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"crisp-edges"},viewBox:"0 0 4210 12970",x:"0px",y:"0px",fillRule:"evenodd",clipRule:"evenodd",width:"250",height:"250"},{children:v.jsx("g",{children:v.jsx("path",{style:{fill:"black",fillRule:"nonzero"},d:"M2105 0c169,0 286,160 249,315l200 0c-172,266 -231,479 -256,792 315,-24 530,-86 792,-255l0 897c-265,-171 -479,-231 -792,-256 18,234 75,495 185,682l339 0c233,0 369,269 225,456l545 0 -595 1916c130,94 158,275 59,402 465,0 416,568 51,568l-334 0 465 2867 332 0c250,0 381,306 199,485 162,63 273,220 273,399l0 633 168 0 0 475c-1403,0 -2807,0 -4210,0l0 -475 167 0 0 -633c0,-179 112,-336 274,-399 -181,-178 -52,-485 199,-485l332 0 465 -2867 -335 0c-353,0 -418,-568 51,-568 -98,-127 -70,-308 59,-402l-594 -1916c181,0 363,0 545,0 -144,-187 -9,-456 225,-456l339 0c110,-187 167,-448 185,-682 -315,25 -530,87 -793,256l0 -897c266,171 480,231 793,255 -25,-315 -87,-529 -256,-792l199 0c-36,-155 81,-315 250,-315zm-1994 10012l0 253 3988 0 0 -253c-1330,0 -2659,0 -3988,0zm484 -1060c-174,0 -316,142 -316,316l0 633 3652 0 0 -633c0,-174 -142,-316 -316,-316 -1007,0 -2013,0 -3020,0zm45 -457c-230,0 -225,345 0,345l2930 0c230,0 225,-345 0,-345 -977,0 -1953,0 -2930,0zm2020 -2978l-1111 0 -465 2867 2041 0 -465 -2867zm-1558 -456c-229,0 -224,345 0,345 669,0 1337,0 2005,0 230,0 225,-345 0,-345 -668,0 -1336,0 -2005,0zm1730 -457l-1454 0c-229,0 -224,345 0,345l1454 0c229,0 224,-345 0,-345zm-2064 -1862l544 1751c529,0 1057,0 1586,0l544 -1751c-892,0 -1783,0 -2674,0zm1085 -567l504 0c-126,-247 -163,-526 -177,-800 273,15 553,52 800,177l0 -504c-247,126 -527,163 -800,177 14,-273 51,-552 177,-799 -168,0 -336,0 -504,0 125,247 162,526 177,799 -274,-14 -553,-51 -800,-177l0 504c247,-125 527,-162 800,-177 -15,274 -52,553 -177,800zm969 111l-1434 0c-230,0 -225,345 0,345l1434 0c230,0 225,-345 0,-345zm-717 -2175c-105,0 -175,109 -133,204l266 0c42,-96 -30,-205 -133,-204z"})})}))};function Hm({children:e}){try{return v.jsx(v.Fragment,{children:e})}catch(t){return console.log(t),v.jsx(Qf,{showError:!0})}}function Qf({showError:e=!1}){return v.jsxs("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}},{children:[v.jsx("div",Object.assign({style:{width:250,height:250,transform:"rotate(90deg)"}},{children:Um.whiteKing})),e&&v.jsx("h1",{children:"Something went wrong"})]}))}function Wm(){const e=E.useRef(null),{boardWidth:t,clearCurrentRightClickDown:n,onPromotionPieceSelect:r,setShowPromoteDialog:i,showPromoteDialog:o,customBoardStyle:s}=_t();return E.useEffect(()=>{function l(u){e.current&&!e.current.contains(u.target)&&n()}return document.addEventListener("mouseup",l),()=>{document.removeEventListener("mouseup",l)}},[]),t?v.jsx("div",Object.assign({style:{perspective:"1000px"}},{children:v.jsxs("div",Object.assign({ref:e,style:Object.assign(Object.assign({position:"relative"},Bm(t)),s)},{children:[v.jsx(bm,{}),v.jsx(zm,{}),o&&v.jsxs(v.Fragment,{children:[v.jsx("div",{onClick:()=>{i(!1),r==null||r()},style:{position:"absolute",top:"0",left:"0",zIndex:"100",backgroundColor:"rgba(22,21,18,.7)",width:t,height:t}}),v.jsx($m,{})]})]}))})):v.jsx(Qf,{})}const Bm=e=>({cursor:"default",height:e,width:e});function Vm({boardContainer:e}){const{boardWidth:t,chessPieces:n,id:r,snapToCursor:i,allowDragOutsideBoard:o}=_t(),s=W1(f=>({item:f.getItem(),clientOffset:f.getClientOffset(),sourceClientOffset:f.getSourceClientOffset(),isDragging:f.isDragging()})),{isDragging:l,item:u,clientOffset:a,sourceClientOffset:g}=s,p=E.useCallback((f,S)=>{if(!f||!S)return{display:"none"};let{x:m,y}=i?f:S;const C=t/8/2;if(i&&(m-=C,y-=C),!o){const{left:c,top:h}=e,w=c-C,k=h-C,O=c+t-C,x=h+t-C;m=Math.max(w,Math.min(m,O)),y=Math.max(k,Math.min(y,x))}const d=`translate(${m}px, ${y}px)`;return{transform:d,WebkitTransform:d,touchAction:"none"}},[t,o,i,e]);return l&&u.id===r?v.jsx("div",Object.assign({style:{position:"fixed",pointerEvents:"none",zIndex:10,left:0,top:0}},{children:v.jsx("div",Object.assign({style:p(a,g)},{children:typeof n[u.piece]=="function"?n[u.piece]({squareWidth:t/8,isDragging:!0}):v.jsx("svg",Object.assign({viewBox:"1 1 43 43",width:t/8,height:t/8},{children:v.jsx("g",{children:n[u.piece]})}))}))})):null}const Qm=E.forwardRef((e,t)=>{const{customDndBackend:n,customDndBackendOptions:r}=e,i=rg(e,["customDndBackend","customDndBackendOptions"]),[o,s]=E.useState(),[l,u]=E.useState(!1),[a,g]=E.useState(!1),[p,f]=E.useState(e.boardWidth),S=E.useRef(null),m=E.useRef(null),[y,C]=E.useState({left:0,top:0}),d=E.useMemo(()=>{var h;return(h=S.current)===null||h===void 0?void 0:h.getBoundingClientRect()},[S.current]);E.useEffect(()=>{C({left:d!=null&&d.left?d==null?void 0:d.left:0,top:d!=null&&d.top?d==null?void 0:d.top:0})},[d]),E.useEffect(()=>{g("ontouchstart"in window),u(!0),s(window)},[]),E.useEffect(()=>{var h;if(e.boardWidth===void 0&&(!((h=S.current)===null||h===void 0)&&h.offsetWidth)){const w=new ResizeObserver(()=>{var k;f((k=S.current)===null||k===void 0?void 0:k.offsetWidth)});return w.observe(S.current),()=>{w.disconnect()}}},[S.current,o]);const c=n||(a?Em:fm);return l&&o?v.jsx(Hm,{children:v.jsxs("div",Object.assign({ref:m,style:{display:"flex",flexDirection:"column",width:"100%"}},{children:[v.jsx("div",{ref:S,style:{width:"100%"}}),v.jsx(w1,Object.assign({backend:c,context:o,options:n?r:void 0},{children:p&&v.jsxs(jm,Object.assign({boardWidth:p},i,{ref:t},{children:[v.jsx(Vm,{boardContainer:y}),v.jsx(Wm,{})]}))}))]}))}):null});var rc=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function l(g){try{a(r.next(g))}catch(p){s(p)}}function u(g){try{a(r.throw(g))}catch(p){s(p)}}function a(g){g.done?o(g.value):i(g.value).then(l,u)}a((r=r.apply(e,t||[])).next())})};const Km=e=>{const[t,n,r]=e.split(":");return{process_name:t,package_name:n,publisher_node:r}};function sr(e){const t=document.cookie.split(";");for(let n=0;nnull,onOpen:s=()=>null,onClose:l=()=>null,onError:u=()=>null}){this._encrypt=a=>null,this._decrypt=a=>{},this.send=({data:a})=>{sr(`kinode-auth_${this.nodeId}`),sr(`kinode-ws-auth_${this.nodeId}`),this._ws.send(ic(a))},this.fetchJson=(a,g)=>rc(this,void 0,void 0,function*(){return console.log("Fetching JSON:",a),yield(yield fetch(a,g)).json()}),this._secret=void 0,this.processId=Km(n),this.channelId=r,this.nodeId=t,this._ws=new WebSocket(i),this._ws.onmessage=a=>rc(this,void 0,void 0,function*(){o(a.data,this)}),this._ws.onopen=a=>{console.log(`${t}`,sr(`kinode-auth_${t}`),sr(`kinode-ws-auth_${t}`)),this._ws.send(ic({auth_token:sr(`kinode-auth_${t}`),target_process:n,encrypted:!1})),s(a,this)},this._ws.onclose=l,this._ws.onerror=u}}const oc=e=>{let t;const n=new Set,r=(u,a)=>{const g=typeof u=="function"?u(t):u;if(!Object.is(g,t)){const p=t;t=a??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(f=>f(t,p))}},i=()=>t,l={setState:r,getState:i,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{n.clear()}};return t=e(r,i,l),l},Gm=e=>e?oc(e):oc;var Kf={exports:{}},qf={},Gf={exports:{}},Yf={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -84,4 +84,4 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Do=E,sv=ov;function lv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var uv=typeof Object.is=="function"?Object.is:lv,av=sv.useSyncExternalStore,cv=Do.useRef,dv=Do.useEffect,fv=Do.useMemo,hv=Do.useDebugValue;qf.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=cv(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=fv(function(){function u(S){if(!a){if(a=!0,g=S,S=r(S),i!==void 0&&s.hasValue){var m=s.value;if(i(m,S))return p=m}return p=S}if(m=p,uv(g,S))return m;var y=r(S);return i!==void 0&&i(m,y)?m:(g=S,p=y)}var a=!1,g,p,f=n===void 0?null:n;return[function(){return u(t())},f===null?void 0:function(){return u(f())}]},[t,n,r,i]);var l=av(e,o[0],o[1]);return dv(function(){s.hasValue=!0,s.value=l},[l]),hv(l),l};Kf.exports=qf;var pv=Kf.exports;const gv=uc(pv),{useDebugValue:mv}=yc,{useSyncExternalStoreWithSelector:vv}=gv;function yv(e,t=e.getState,n){const r=vv(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return mv(r),r}const sc=e=>{const t=typeof e=="function"?Gm(e):e,n=(r,i)=>yv(t,r,i);return Object.assign(n,t),n},Sv=e=>e?sc(e):sc;function Xf(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const s=u=>u===null?null:JSON.parse(u,t==null?void 0:t.reviver),l=(o=n.getItem(i))!=null?o:null;return l instanceof Promise?l.then(s):s(l)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,t==null?void 0:t.replacer)),removeItem:i=>n.removeItem(i)}}const Hr=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Hr(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Hr(r)(n)}}}},wv=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:C=>C,version:0,merge:(C,d)=>({...d,...C}),...t},s=!1;const l=new Set,u=new Set;let a;try{a=o.getStorage()}catch{}if(!a)return e((...C)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...C)},r,i);const g=Hr(o.serialize),p=()=>{const C=o.partialize({...r()});let d;const c=g({state:C,version:o.version}).then(h=>a.setItem(o.name,h)).catch(h=>{d=h});if(d)throw d;return c},f=i.setState;i.setState=(C,d)=>{f(C,d),p()};const S=e((...C)=>{n(...C),p()},r,i);let m;const y=()=>{var C;if(!a)return;s=!1,l.forEach(c=>c(r()));const d=((C=o.onRehydrateStorage)==null?void 0:C.call(o,r()))||void 0;return Hr(a.getItem.bind(a))(o.name).then(c=>{if(c)return o.deserialize(c)}).then(c=>{if(c)if(typeof c.version=="number"&&c.version!==o.version){if(o.migrate)return o.migrate(c.state,c.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return c.state}).then(c=>{var h;return m=o.merge(c,(h=r())!=null?h:S),n(m,!0),p()}).then(()=>{d==null||d(m,void 0),s=!0,u.forEach(c=>c(m))}).catch(c=>{d==null||d(void 0,c)})};return i.persist={setOptions:C=>{o={...o,...C},C.getStorage&&(a=C.getStorage())},clearStorage:()=>{a==null||a.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:C=>(l.add(C),()=>{l.delete(C)}),onFinishHydration:C=>(u.add(C),()=>{u.delete(C)})},y(),m||S},Cv=(e,t)=>(n,r,i)=>{let o={storage:Xf(()=>localStorage),partialize:y=>y,version:0,merge:(y,C)=>({...C,...y}),...t},s=!1;const l=new Set,u=new Set;let a=o.storage;if(!a)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...y)},r,i);const g=()=>{const y=o.partialize({...r()});return a.setItem(o.name,{state:y,version:o.version})},p=i.setState;i.setState=(y,C)=>{p(y,C),g()};const f=e((...y)=>{n(...y),g()},r,i);let S;const m=()=>{var y,C;if(!a)return;s=!1,l.forEach(c=>{var h;return c((h=r())!=null?h:f)});const d=((C=o.onRehydrateStorage)==null?void 0:C.call(o,(y=r())!=null?y:f))||void 0;return Hr(a.getItem.bind(a))(o.name).then(c=>{if(c)if(typeof c.version=="number"&&c.version!==o.version){if(o.migrate)return o.migrate(c.state,c.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return c.state}).then(c=>{var h;return S=o.merge(c,(h=r())!=null?h:f),n(S,!0),g()}).then(()=>{d==null||d(S,void 0),S=r(),s=!0,u.forEach(c=>c(S))}).catch(c=>{d==null||d(void 0,c)})};return i.persist={setOptions:y=>{o={...o,...y},y.storage&&(a=y.storage)},clearStorage:()=>{a==null||a.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:y=>(l.add(y),()=>{l.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},o.skipHydration||m(),S||f},Ev=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?wv(e,t):Cv(e,t),kv=Ev,_v=Sv()(kv((e,t)=>({games:{},handleWsMessage:n=>{if(typeof n=="string")try{const{kind:r,data:i}=JSON.parse(n);r==="game_update"&&e({games:{...t().games,[i.id]:i}})}catch(r){console.error("Error parsing WebSocket message",r)}else{const r=new FileReader;r.onload=function(i){var o;if(typeof((o=i==null?void 0:i.target)==null?void 0:o.result)=="string")try{const{kind:s,data:l}=JSON.parse(i.target.result);s==="game_update"&&e({games:{...t().games,[l.id]:l}})}catch(s){console.error("Error parsing WebSocket message",s)}},r.readAsText(n)}},set:e}),{name:"chess",storage:Xf(()=>localStorage)}));const Mt="/chess:chess:sys";window.our&&(window.our.process=Mt==null?void 0:Mt.replace("/",""));const lc=(e,t)=>(e.turns||0)%2===0?t===e.white:t===e.black,xv=void 0;function Ov(){const{games:e,handleWsMessage:t,set:n}=_v(),[r,i]=E.useState("new"),[o,s]=E.useState(""),l=E.useRef(null),[u,a]=E.useState(560-20),g=new ResizeObserver(d=>{for(let c of d)a(Math.min(c.contentRect.width,c.contentRect.height)-16)});l.current&&g.observe(l.current);const p=E.useMemo(()=>e[r]?{...e[r],game:new ng(e[r].board)}:void 0,[e,r]),f=E.useMemo(()=>((p==null?void 0:p.turns)||0)%2===0?`${p==null?void 0:p.white} (white)`:`${p==null?void 0:p.black} (black)`,[p]);E.useEffect(()=>{new qm({uri:xv,nodeId:window.our.node,processId:window.our.process,onMessage:t}),fetch(`${Mt}/games`).then(d=>d.json()).then(d=>{n({games:d})}).catch(console.error)},[]);const S=E.useCallback(async d=>{d.preventDefault();try{const c=await fetch(`${Mt}/games`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:o})}).then(w=>{if(w.status===409)throw e[o]?i(o):alert("Game already exists, please refresh the page and select it."),new Error("Game already exists");if(w.status===503)throw alert(`${o} may be offline, please confirm it is online and try again.`),new Error("Player offline");if(w.status===400)throw alert("Please enter a valid player ID"),new Error("Invalid player ID");if(w.status>399)throw alert("There was an error creating the game. Please try again."),new Error("Error creating game");return w.json()}),h={...e};h[c.id]=c,n({games:h}),i(o),s("")}catch(c){console.error(c)}},[e,o,s,n]),m=E.useCallback((d,c)=>{if(!p||!lc(p,window.our.node))return!1;const h={from:d,to:c,promotion:"q"},w={...p};if(w.game.move(h)===null)return!1;w.board=w.game.fen();const O={...e};return O[p.id]=w,n({games:O}),fetch(`${Mt}/games`,{method:"PUT",body:JSON.stringify({id:p.id,move:d+c})}).then(x=>x.json()).then(x=>{const T={...e};T[p.id]=x,n({games:T})}).catch(x=>{console.error(x),alert("There was an error making your move. Please try again");const T={...e},b={...p};b.game.undo(),T[p.id]=b,n({games:T})}),!0},[p,e,n]),y=E.useCallback(d=>{d.preventDefault(),d.stopPropagation(),p&&window.confirm("Are you sure you want to resign this game?")&&fetch(`${Mt}/games?id=${p.id}`,{method:"DELETE"}).then(c=>c.json()).then(c=>{const h={...e};h[p.id]=c,n({games:h})}).catch(c=>{console.error(c),alert("There was an error resigning the game. Please try again")})},[p]),C=E.useCallback(async d=>{if(d.preventDefault(),d.stopPropagation(),!!p)try{const c=await fetch(`${Mt}/games`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:p.id})}).then(w=>w.json()),h={...e};h[c.id]=c,n({games:h})}catch(c){console.error(c),alert("You could not create the game. Please make sure your current game with this player (if any) has ended and try again.")}},[p]);return v.jsx("div",{className:"flex flex-col justify-center items-center",style:{height:"100%"},children:v.jsxs("div",{className:"flex flex-col justify-center",style:{maxHeight:"100vh",maxWidth:"800px",height:"100%",width:"100%",position:"relative"},children:[v.jsxs("a",{href:"/",className:"absolute top-6 left-0 ml-2",style:{fontSize:24},onClick:d=>{d.preventDefault(),window.history.back()},children:[v.jsx("span",{style:{fontSize:18,marginBottom:4},children:"◀"})," Back"]}),v.jsxs("h4",{className:"m-4 row justify-center",children:["Chess by",v.jsxs("svg",{width:"180",height:"20",viewBox:"0 0 580 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[v.jsxs("g",{"clip-path":"url(#clip0_6_641)",children:[v.jsx("path",{d:"M0.824922 1.07031L0.794922 70.0703H14.7949L14.8049 1.07031H0.824922Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M16.5947 36.8803L41.2547 1.07031H58.2447L33.1647 36.8803L61.2447 70.0703H42.9947L16.5947 36.8803Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M119.885 1.07031H105.765V70.0703H119.885V1.07031Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M173.185 1.07031V70.0703H186.775V26.8303L224.045 70.0703H234.825V1.07031H221.325V45.6803L183.445 1.07031H173.185Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M342.465 8.86C333.025 0.15 321.645 0 318.535 0C315.475 0 303.575 0.22 294.005 9.52C283.845 19.4 283.805 32.24 283.795 35.66C283.785 39.3 283.895 49.03 290.805 57.99C300.855 71.02 316.695 71.31 318.535 71.32C321.375 71.32 334.185 71 343.965 60.66C353.065 51.04 353.265 39.4 353.275 35.66C353.275 32.49 353.305 18.86 342.455 8.86H342.465ZM318.435 58.01C307.095 58.01 297.895 47.95 297.895 35.54C297.895 23.13 307.085 13.07 318.435 13.07C329.785 13.07 338.975 23.13 338.975 35.54C338.975 47.95 329.785 58.01 318.435 58.01Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M450.495 12.0802C444.975 5.46023 437.135 0.990234 427.955 0.990234C417.555 0.990234 405.295 1.07023 402.295 1.07023V69.9802C405.285 69.9802 417.555 70.0602 427.955 70.0602C445.525 70.0602 458.445 53.4102 459.065 36.8602C459.395 28.0102 456.185 18.9002 450.495 12.0802ZM440.085 49.9502C436.895 53.8702 432.705 56.6902 427.665 57.5602C424.025 58.1902 420.095 57.8302 416.405 57.8302C416.405 50.4002 416.405 42.9802 416.405 35.5502V13.2202C423.795 13.2202 430.525 12.7002 436.605 17.6002C440.275 20.5602 442.925 24.7102 444.165 29.2402C444.525 30.5402 444.765 31.8802 444.875 33.2302C445.395 39.3702 443.995 45.1402 440.085 49.9502Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M508.135 0.990234V70.0602H552.715V57.9302H522.035V40.4202H547.125V28.0702H521.995V13.3202H552.715V0.990234H508.135Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M574.835 66.0398H572.745L571.015 63.0698H569.845V66.0398H567.805V57.5498H571.765C572.845 57.5498 573.865 57.9298 574.425 58.9398C575.205 60.3698 574.665 62.3798 573.105 63.0298C573.725 64.1198 574.225 64.9498 574.845 66.0398H574.835ZM570.375 61.0798H570.845C571.335 61.0798 572.365 61.0798 572.365 60.2898C572.365 59.5598 571.335 59.5598 570.845 59.5598H570.375V61.0798Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M570.964 69.0002C574.913 69.0002 578.114 65.799 578.114 61.8502C578.114 57.9014 574.913 54.7002 570.964 54.7002C567.016 54.7002 563.814 57.9014 563.814 61.8502C563.814 65.799 567.016 69.0002 570.964 69.0002Z",stroke:"#FFF5D9","stroke-width":"2.2",strokeMiterlimit:"10"})]}),v.jsx("defs",{children:v.jsx("clipPath",{id:"clip0_6_641",children:v.jsx("rect",{width:"578.41",height:"71.32",fill:"white",transform:"translate(0.794922)"})})})]})]}),v.jsxs("div",{className:"flex flex-row justify-between items-center",style:{height:"100%"},children:[Object.keys(e).length>0&&v.jsxs("div",{className:"flex flex-col games items-center",style:{width:"25%",height:"100%",gap:"1em",padding:"1em"},children:[v.jsx("h4",{className:"m-2",children:"Games"}),v.jsx("button",{className:"small",style:{width:"100%"},onClick:()=>i("new"),children:"New"}),v.jsx("div",{className:"flex flex-col overflow-scroll",style:{width:"100%"},children:Object.values(e).map(d=>v.jsx("div",{onClick:()=>i(d==null?void 0:d.id),className:`game-entry ${r!==(d==null?void 0:d.id)&&lc(d,window.our.node)?"is-turn":""} ${r===(d==null?void 0:d.id)?"selected":""} ${d!=null&&d.ended?"ended":""}`,children:d==null?void 0:d.id},d==null?void 0:d.id))})]}),v.jsx("div",{className:"flex flex-col justify-center items-center game",style:{width:"72%",height:"100%"},ref:l,children:r==="new"||!p?v.jsxs(v.Fragment,{children:[v.jsx("h3",{children:"Start New Game"}),v.jsx("h5",{className:"mb-8 orange-text",children:"(game creator will be white)"}),v.jsxs("form",{onSubmit:S,className:"flex flex-col justify-center mb-40",style:{maxWidth:400},children:[v.jsx("label",{className:"mb-2",style:{alignSelf:"flex-start",fontWeight:"600"},children:"Player ID"}),v.jsx("input",{className:"border rounded p-2 mb-2",style:{minWidth:300},type:"text",placeholder:"Player ID",value:o,onChange:d=>s(d.target.value)}),v.jsx("button",{type:"submit",children:"Start Game"})]})]}):v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex flex-row justify-between items-center w-full px-4 pb-2 gap-4",children:[v.jsx("h4",{children:r}),v.jsx("h5",{children:p!=null&&p.ended?"Game Ended":`Turn: ${f}`}),p!=null&&p.ended?v.jsx("button",{className:"small mt-2",onClick:C,children:"Rematch"}):v.jsx("button",{className:"small mt-2",onClick:y,children:"Resign"})]}),v.jsx("div",{children:v.jsx(Qm,{boardWidth:u-16,position:p==null?void 0:p.game.fen(),onPieceDrop:m,boardOrientation:(p==null?void 0:p.white)===window.our.node?"white":"black"})})]})})]})]})})}Cs.createRoot(document.getElementById("root")).render(v.jsx(yc.StrictMode,{children:v.jsx(Ov,{})})); + */var Do=E,sv=ov;function lv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var uv=typeof Object.is=="function"?Object.is:lv,av=sv.useSyncExternalStore,cv=Do.useRef,dv=Do.useEffect,fv=Do.useMemo,hv=Do.useDebugValue;qf.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=cv(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=fv(function(){function u(S){if(!a){if(a=!0,g=S,S=r(S),i!==void 0&&s.hasValue){var m=s.value;if(i(m,S))return p=m}return p=S}if(m=p,uv(g,S))return m;var y=r(S);return i!==void 0&&i(m,y)?m:(g=S,p=y)}var a=!1,g,p,f=n===void 0?null:n;return[function(){return u(t())},f===null?void 0:function(){return u(f())}]},[t,n,r,i]);var l=av(e,o[0],o[1]);return dv(function(){s.hasValue=!0,s.value=l},[l]),hv(l),l};Kf.exports=qf;var pv=Kf.exports;const gv=uc(pv),{useDebugValue:mv}=yc,{useSyncExternalStoreWithSelector:vv}=gv;function yv(e,t=e.getState,n){const r=vv(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return mv(r),r}const sc=e=>{const t=typeof e=="function"?Gm(e):e,n=(r,i)=>yv(t,r,i);return Object.assign(n,t),n},Sv=e=>e?sc(e):sc;function Xf(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const s=u=>u===null?null:JSON.parse(u,t==null?void 0:t.reviver),l=(o=n.getItem(i))!=null?o:null;return l instanceof Promise?l.then(s):s(l)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,t==null?void 0:t.replacer)),removeItem:i=>n.removeItem(i)}}const Hr=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Hr(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Hr(r)(n)}}}},wv=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:C=>C,version:0,merge:(C,d)=>({...d,...C}),...t},s=!1;const l=new Set,u=new Set;let a;try{a=o.getStorage()}catch{}if(!a)return e((...C)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...C)},r,i);const g=Hr(o.serialize),p=()=>{const C=o.partialize({...r()});let d;const c=g({state:C,version:o.version}).then(h=>a.setItem(o.name,h)).catch(h=>{d=h});if(d)throw d;return c},f=i.setState;i.setState=(C,d)=>{f(C,d),p()};const S=e((...C)=>{n(...C),p()},r,i);let m;const y=()=>{var C;if(!a)return;s=!1,l.forEach(c=>c(r()));const d=((C=o.onRehydrateStorage)==null?void 0:C.call(o,r()))||void 0;return Hr(a.getItem.bind(a))(o.name).then(c=>{if(c)return o.deserialize(c)}).then(c=>{if(c)if(typeof c.version=="number"&&c.version!==o.version){if(o.migrate)return o.migrate(c.state,c.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return c.state}).then(c=>{var h;return m=o.merge(c,(h=r())!=null?h:S),n(m,!0),p()}).then(()=>{d==null||d(m,void 0),s=!0,u.forEach(c=>c(m))}).catch(c=>{d==null||d(void 0,c)})};return i.persist={setOptions:C=>{o={...o,...C},C.getStorage&&(a=C.getStorage())},clearStorage:()=>{a==null||a.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:C=>(l.add(C),()=>{l.delete(C)}),onFinishHydration:C=>(u.add(C),()=>{u.delete(C)})},y(),m||S},Cv=(e,t)=>(n,r,i)=>{let o={storage:Xf(()=>localStorage),partialize:y=>y,version:0,merge:(y,C)=>({...C,...y}),...t},s=!1;const l=new Set,u=new Set;let a=o.storage;if(!a)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...y)},r,i);const g=()=>{const y=o.partialize({...r()});return a.setItem(o.name,{state:y,version:o.version})},p=i.setState;i.setState=(y,C)=>{p(y,C),g()};const f=e((...y)=>{n(...y),g()},r,i);let S;const m=()=>{var y,C;if(!a)return;s=!1,l.forEach(c=>{var h;return c((h=r())!=null?h:f)});const d=((C=o.onRehydrateStorage)==null?void 0:C.call(o,(y=r())!=null?y:f))||void 0;return Hr(a.getItem.bind(a))(o.name).then(c=>{if(c)if(typeof c.version=="number"&&c.version!==o.version){if(o.migrate)return o.migrate(c.state,c.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return c.state}).then(c=>{var h;return S=o.merge(c,(h=r())!=null?h:f),n(S,!0),g()}).then(()=>{d==null||d(S,void 0),S=r(),s=!0,u.forEach(c=>c(S))}).catch(c=>{d==null||d(void 0,c)})};return i.persist={setOptions:y=>{o={...o,...y},y.storage&&(a=y.storage)},clearStorage:()=>{a==null||a.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:y=>(l.add(y),()=>{l.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},o.skipHydration||m(),S||f},Ev=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?wv(e,t):Cv(e,t),kv=Ev,_v=Sv()(kv((e,t)=>({games:{},handleWsMessage:n=>{if(typeof n=="string")try{const{kind:r,data:i}=JSON.parse(n);r==="game_update"&&e({games:{...t().games,[i.id]:i}})}catch(r){console.error("Error parsing WebSocket message",r)}else{const r=new FileReader;r.onload=function(i){var o;if(typeof((o=i==null?void 0:i.target)==null?void 0:o.result)=="string")try{const{kind:s,data:l}=JSON.parse(i.target.result);s==="game_update"&&e({games:{...t().games,[l.id]:l}})}catch(s){console.error("Error parsing WebSocket message",s)}},r.readAsText(n)}},set:e}),{name:"chess",storage:Xf(()=>localStorage)}));const Mt="/chess:chess:sys";window.our&&(window.our.process=Mt==null?void 0:Mt.replace("/",""));const lc=(e,t)=>(e.turns||0)%2===0?t===e.white:t===e.black,xv=void 0;function Ov(){const{games:e,handleWsMessage:t,set:n}=_v(),[r,i]=E.useState("new"),[o,s]=E.useState(""),l=E.useRef(null),[u,a]=E.useState(560-20),g=new ResizeObserver(d=>{for(let c of d)a(Math.min(c.contentRect.width,c.contentRect.height)-16)});l.current&&g.observe(l.current);const p=E.useMemo(()=>e[r]?{...e[r],game:new ng(e[r].board)}:void 0,[e,r]),f=E.useMemo(()=>((p==null?void 0:p.turns)||0)%2===0?`${p==null?void 0:p.white} (white)`:`${p==null?void 0:p.black} (black)`,[p]);E.useEffect(()=>{new qm({uri:xv,nodeId:window.our.node,processId:window.our.process,onMessage:t}),fetch(`${Mt}/games`).then(d=>d.json()).then(d=>{n({games:d})}).catch(console.error)},[]);const S=E.useCallback(async d=>{d.preventDefault();try{const c=await fetch(`${Mt}/games`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:o})}).then(w=>{if(w.status===409)throw e[o]?i(o):alert("Game already exists, please refresh the page and select it."),new Error("Game already exists");if(w.status===503)throw alert(`${o} may be offline, please confirm it is online and try again.`),new Error("Player offline");if(w.status===400)throw alert("Please enter a valid player ID"),new Error("Invalid player ID");if(w.status>399)throw alert("There was an error creating the game. Please try again."),new Error("Error creating game");return w.json()}),h={...e};h[c.id]=c,n({games:h}),i(o),s("")}catch(c){console.error(c)}},[e,o,s,n]),m=E.useCallback((d,c)=>{if(!p||!lc(p,window.our.node))return!1;const h={from:d,to:c,promotion:"q"},w={...p};if(w.game.move(h)===null)return!1;w.board=w.game.fen();const O={...e};return O[p.id]=w,n({games:O}),fetch(`${Mt}/games`,{method:"PUT",body:JSON.stringify({id:p.id,move:d+c})}).then(x=>x.json()).then(x=>{const T={...e};T[p.id]=x,n({games:T})}).catch(x=>{console.error(x),alert("There was an error making your move. Please try again");const T={...e},z={...p};z.game.undo(),T[p.id]=z,n({games:T})}),!0},[p,e,n]),y=E.useCallback(d=>{d.preventDefault(),d.stopPropagation(),p&&window.confirm("Are you sure you want to resign this game?")&&fetch(`${Mt}/games?id=${p.id}`,{method:"DELETE"}).then(c=>c.json()).then(c=>{const h={...e};h[p.id]=c,n({games:h})}).catch(c=>{console.error(c),alert("There was an error resigning the game. Please try again")})},[p]),C=E.useCallback(async d=>{if(d.preventDefault(),d.stopPropagation(),!!p)try{const c=await fetch(`${Mt}/games`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:p.id})}).then(w=>w.json()),h={...e};h[c.id]=c,n({games:h})}catch(c){console.error(c),alert("You could not create the game. Please make sure your current game with this player (if any) has ended and try again.")}},[p]);return v.jsx("div",{className:"flex flex-col justify-center items-center",style:{height:"100%"},children:v.jsxs("div",{className:"flex flex-col justify-center",style:{maxHeight:"100vh",maxWidth:"800px",height:"100%",width:"100%",position:"relative"},children:[v.jsxs("a",{href:"/",className:"absolute top-6 left-0 ml-2",style:{fontSize:24},onClick:d=>{d.preventDefault(),window.history.back()},children:[v.jsx("span",{style:{fontSize:18,marginBottom:4},children:"◀"})," Back"]}),v.jsxs("h4",{className:"m-4 row justify-center",children:["Chess by",v.jsxs("svg",{width:"180",height:"20",viewBox:"0 0 580 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[v.jsxs("g",{"clip-path":"url(#clip0_6_641)",children:[v.jsx("path",{d:"M0.824922 1.07031L0.794922 70.0703H14.7949L14.8049 1.07031H0.824922Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M16.5947 36.8803L41.2547 1.07031H58.2447L33.1647 36.8803L61.2447 70.0703H42.9947L16.5947 36.8803Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M119.885 1.07031H105.765V70.0703H119.885V1.07031Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M173.185 1.07031V70.0703H186.775V26.8303L224.045 70.0703H234.825V1.07031H221.325V45.6803L183.445 1.07031H173.185Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M342.465 8.86C333.025 0.15 321.645 0 318.535 0C315.475 0 303.575 0.22 294.005 9.52C283.845 19.4 283.805 32.24 283.795 35.66C283.785 39.3 283.895 49.03 290.805 57.99C300.855 71.02 316.695 71.31 318.535 71.32C321.375 71.32 334.185 71 343.965 60.66C353.065 51.04 353.265 39.4 353.275 35.66C353.275 32.49 353.305 18.86 342.455 8.86H342.465ZM318.435 58.01C307.095 58.01 297.895 47.95 297.895 35.54C297.895 23.13 307.085 13.07 318.435 13.07C329.785 13.07 338.975 23.13 338.975 35.54C338.975 47.95 329.785 58.01 318.435 58.01Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M450.495 12.0802C444.975 5.46023 437.135 0.990234 427.955 0.990234C417.555 0.990234 405.295 1.07023 402.295 1.07023V69.9802C405.285 69.9802 417.555 70.0602 427.955 70.0602C445.525 70.0602 458.445 53.4102 459.065 36.8602C459.395 28.0102 456.185 18.9002 450.495 12.0802ZM440.085 49.9502C436.895 53.8702 432.705 56.6902 427.665 57.5602C424.025 58.1902 420.095 57.8302 416.405 57.8302C416.405 50.4002 416.405 42.9802 416.405 35.5502V13.2202C423.795 13.2202 430.525 12.7002 436.605 17.6002C440.275 20.5602 442.925 24.7102 444.165 29.2402C444.525 30.5402 444.765 31.8802 444.875 33.2302C445.395 39.3702 443.995 45.1402 440.085 49.9502Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M508.135 0.990234V70.0602H552.715V57.9302H522.035V40.4202H547.125V28.0702H521.995V13.3202H552.715V0.990234H508.135Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M574.835 66.0398H572.745L571.015 63.0698H569.845V66.0398H567.805V57.5498H571.765C572.845 57.5498 573.865 57.9298 574.425 58.9398C575.205 60.3698 574.665 62.3798 573.105 63.0298C573.725 64.1198 574.225 64.9498 574.845 66.0398H574.835ZM570.375 61.0798H570.845C571.335 61.0798 572.365 61.0798 572.365 60.2898C572.365 59.5598 571.335 59.5598 570.845 59.5598H570.375V61.0798Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M570.964 69.0002C574.913 69.0002 578.114 65.799 578.114 61.8502C578.114 57.9014 574.913 54.7002 570.964 54.7002C567.016 54.7002 563.814 57.9014 563.814 61.8502C563.814 65.799 567.016 69.0002 570.964 69.0002Z",stroke:"#FFF5D9","stroke-width":"2.2",strokeMiterlimit:"10"})]}),v.jsx("defs",{children:v.jsx("clipPath",{id:"clip0_6_641",children:v.jsx("rect",{width:"578.41",height:"71.32",fill:"white",transform:"translate(0.794922)"})})})]})]}),v.jsxs("div",{className:"flex flex-row justify-between items-center",style:{height:"100%"},children:[Object.keys(e).length>0&&v.jsxs("div",{className:"flex flex-col games items-center",style:{width:"25%",height:"100%",gap:"1em",padding:"1em"},children:[v.jsx("h4",{className:"m-2",children:"Games"}),v.jsx("button",{className:"small",style:{width:"100%"},onClick:()=>i("new"),children:"New"}),v.jsx("div",{className:"flex flex-col overflow-scroll",style:{width:"100%"},children:Object.values(e).map(d=>v.jsx("div",{onClick:()=>i(d==null?void 0:d.id),className:`game-entry ${r!==(d==null?void 0:d.id)&&lc(d,window.our.node)?"is-turn":""} ${r===(d==null?void 0:d.id)?"selected":""} ${d!=null&&d.ended?"ended":""}`,children:d==null?void 0:d.id},d==null?void 0:d.id))})]}),v.jsx("div",{className:"flex flex-col justify-center items-center game",style:{width:Object.keys(e).length>0?"calc(75% - 16px)":"100%",height:"100%"},ref:l,children:r==="new"||!p?v.jsxs(v.Fragment,{children:[v.jsx("h3",{children:"Start New Game"}),v.jsx("h5",{className:"mb-8 orange-text",children:"(game creator will be white)"}),v.jsxs("form",{onSubmit:S,className:"flex flex-col justify-center mb-40",style:{maxWidth:400},children:[v.jsx("label",{className:"mb-2",style:{alignSelf:"flex-start",fontWeight:"600"},children:"Player ID"}),v.jsx("input",{className:"border rounded p-2 mb-2",style:{minWidth:300},type:"text",placeholder:"Player ID",value:o,onChange:d=>s(d.target.value)}),v.jsx("button",{type:"submit",children:"Start Game"})]})]}):v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex flex-row justify-between items-center w-full px-4 pb-2 gap-4",children:[v.jsx("h4",{children:r}),v.jsx("h5",{children:p!=null&&p.ended?"Game Ended":`Turn: ${f}`}),p!=null&&p.ended?v.jsx("button",{className:"small mt-2",onClick:C,children:"Rematch"}):v.jsx("button",{className:"small mt-2",onClick:y,children:"Resign"})]}),v.jsx("div",{children:v.jsx(Qm,{boardWidth:u-16,position:p==null?void 0:p.game.fen(),onPieceDrop:m,boardOrientation:(p==null?void 0:p.white)===window.our.node?"white":"black"})})]})})]})]})})}Cs.createRoot(document.getElementById("root")).render(v.jsx(yc.StrictMode,{children:v.jsx(Ov,{})})); diff --git a/kinode/packages/chess/pkg/ui/index.html b/kinode/packages/chess/pkg/ui/index.html index 64a8fb70f..ca2155391 100644 --- a/kinode/packages/chess/pkg/ui/index.html +++ b/kinode/packages/chess/pkg/ui/index.html @@ -14,7 +14,7 @@ Chess - + diff --git a/kinode/packages/homepage/homepage/src/index.html b/kinode/packages/homepage/homepage/src/index.html index 251f85618..c3cacdd83 100644 --- a/kinode/packages/homepage/homepage/src/index.html +++ b/kinode/packages/homepage/homepage/src/index.html @@ -242,9 +242,9 @@
${our}
-
-

Welcome to

- +
+

Welcome to

+ Welcome to - + Welcome - Kinode
\ No newline at end of file +Welcome - Kinode
\ No newline at end of file diff --git a/kinode/src/register-ui/build/static/css/main.054f6f32.css b/kinode/src/register-ui/build/static/css/main.054f6f32.css deleted file mode 100644 index a2a71f624..000000000 --- a/kinode/src/register-ui/build/static/css/main.054f6f32.css +++ /dev/null @@ -1 +0,0 @@ -:root{--text-light:#fff5d9;--text-dark:#22211f;--text-orange:#ff7533;--orange-light:#f36822;--orange-medium:#f35422;--medium-gray:7E7E7E;--gray-button:#fdf5dc40;--input-background:#f3542240}body{background-color:#fdf5dc40;background-color:var(--gray-button);background:url(/static/media/background.01d2427cfc21fb685016.jpg) no-repeat 50% fixed;background-size:cover;color:#fff5d9;color:var(--text-light);font-size:16px;font-weight:400;height:100vh;margin:0;overflow-y:scroll;padding:2em;width:100vw}a,body,button,h1,h2,h3,h4,h5,h6,input,p{font-family:Barlow Condensed,sans-serif}h1,h2,h3,h4,h5,h6{font-weight:500;line-height:1.5em;margin:0}h1{font-size:64px}h2{font-size:48px}h3{font-size:36px}h4{font-size:24px}h5{font-size:20px}h6{font-size:16px}.col{flex-direction:column}.col,.row{align-items:center;display:flex}.row{flex-direction:row}input{all:unset}input[type=checkbox],input[type=password],input[type=text]{background-color:#f3542240;background-color:var(--input-background);border:1px solid #f35422;border:1px solid var(--orange-medium);border-radius:8px;box-sizing:border-box;color:#fff5d9;color:var(--text-light);font-size:1em;padding:1em}input[type=password],input[type=text]{width:100%}input[type=checkbox]{cursor:pointer;padding:.25em .8em}input[type=checkbox]:checked{background-color:#f35422;background-color:var(--orange-medium)}.checkmark{cursor:pointer;font-size:24px;left:4px;position:absolute;top:-5px}::placeholder{color:#fff5d9;color:var(--text-light)}::-moz-placeholder::placeholder{color:#fff5d9;color:var(--text-light)}::-ms-input-placeholder{color:#fff5d9;color:var(--text-light)}label{font-size:20px}button{background:#f35422;background:var(--orange-medium);border:1px solid #f35422;border-color:var(--orange-medium);border-radius:8px;box-shadow:0 1px 2px #f36822;box-shadow:0 1px 2px var(--orange-light);box-sizing:border-box;color:#fff5d9;color:var(--text-light);cursor:pointer;font-size:1.125em;font-weight:500;margin:0;padding:.75em 1em;transition:all .1s;width:100%}button.alt{background-color:#fff5d9;background-color:var(--text-light);border-color:#fff5d9;border-color:var(--text-light);box-shadow:0 1px 2px #fff5d9;box-shadow:0 1px 2px var(--text-light);color:#22211f;color:var(--text-dark)}button:hover{box-shadow:none;opacity:.9}button:disabled{background-color:70000000E7E;background-color:var(--medium-gray);border:70000000e7e solid;border:1px solid var(--medium-gray);box-shadow:0 1px 2px 70000000E7E;box-shadow:0 1px 2px var(--medium-gray);cursor:not-allowed;opacity:.7}#signup-page{display:flex;flex:1 1;justify-content:center;padding-bottom:2em}.key-err{color:red;font-size:20px;margin-top:.5em;text-align:center;word-break:break-all}.label-row,.login-row{align-self:flex-start}.label-row{margin:.5em 0}.tooltip-container{cursor:pointer;display:inline-block;position:relative}.tooltip-button{font-size:16px;height:1em;line-height:.5em;margin-left:.5em;padding:4px 2px 0;text-align:center;width:1em}.tooltip-button,.tooltip-button.chain{border:2px solid #fff;border-radius:50%}.tooltip-button.chain{height:1.5em;margin:0 0 0 1em;padding:0;width:1.5em}.tooltip-button.chain img{height:100%;width:100%}.tooltip-content{background-color:#555;border-radius:6px;color:#fff;font-size:1rem;font-weight:500;left:50%;line-height:1.5em;margin-left:-60px;min-width:200px;opacity:0;padding:.5em;position:absolute;text-align:center;top:125%;transition:opacity .3s;visibility:hidden;z-index:1}.tooltip-content.left{left:auto;right:0}.tooltip-content:after{border:5px solid;border-color:#0000 #0000 #555;bottom:100%;content:"";left:30%;margin-left:-5px;position:absolute}.tooltip-container:hover .tooltip-content{opacity:1;visibility:visible}.sepolia{filter:grayscale(100%)}#signup-form{gap:32px;max-width:calc(100vw - 2em);padding:1em;width:calc(420px + 2em)}#signup-form-header{margin-bottom:1em}#signup-form-header button{max-width:calc(100vw - 2em);width:calc(420px + 2em)}#current-address{font-family:Courier New,Courier,monospace;font-size:1.25em;font-weight:600;margin-left:1em}.current-username{border:1px solid #fff;border-radius:4px;cursor:pointer;margin:1em 0;padding:.5em}.current-username:hover{background-color:#fff;border:1px solid #fff;color:#027}#connect-wallet{max-width:420px}#wallet-required-message{line-height:1.5em;max-width:500px;text-align:center}#loading h3{text-align:center}#loader{display:inline-block;height:48px;margin-top:16px;position:relative;width:48px}#loader div{animation:loader 1.2s cubic-bezier(.5,0,.5,1) infinite;border:6px solid #0000;border-radius:50%;border-top-color:#fff;box-sizing:border-box;display:block;height:36px;margin:6px;position:absolute;width:36px}#loader div:first-child{animation-delay:-.45s}#loader div:nth-child(2){animation-delay:-.3s}#loader div:nth-child(3){animation-delay:-.15s}@keyframes loader{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.connect-modal{align-items:center;display:flex;justify-content:center}.connect-modal-content{background:#027;border-radius:15px;height:200px;padding:20px;position:fixed;top:120px;width:400px}.overlay-modal{background-color:#ffffff40;inset:0;position:fixed}.signup-form{max-width:400px;width:50vw}.direct-node-message{line-height:1.5em;margin-left:2em}.name-validity{color:red}.more-info-direct{cursor:pointer;margin:0 1em;text-decoration:underline}.more-info-direct:hover{color:#f36822;color:var(--orange-light)}a{color:#f35422;color:var(--orange-medium);text-decoration:none}a:hover{color:#f36822;color:var(--orange-light)}.reset-networking{cursor:pointer;font-size:1.25em;margin-left:.5em;margin-top:1em;text-decoration:underline;width:100%}.reset-networking:hover{color:#f36822;color:var(--orange-light)}.name-err{color:red;line-height:1.5em;margin-bottom:1em}.chain-button{align-items:center;background-color:#fdf5dc40;background-color:var(--gray-button);border:none;border-radius:2.5em;box-shadow:none;color:#fff5d9;color:var(--text-light);display:flex;flex-direction:row;font-family:Barlow Condensed,sans-serif;font-weight:300;justify-content:center;margin:0;padding:.4em .25em}.chain-button:hover{opacity:.9}.chain-button.monospace{font-family:Courier New,Courier,monospace}.network-icon{height:1.5em;margin-right:.5em;width:1.5em}.os{margin-left:.2em} \ No newline at end of file diff --git a/kinode/src/register-ui/build/static/css/main.a386e724.css b/kinode/src/register-ui/build/static/css/main.a386e724.css new file mode 100644 index 000000000..501dc89f1 --- /dev/null +++ b/kinode/src/register-ui/build/static/css/main.a386e724.css @@ -0,0 +1 @@ +:root{--text-light:#fff5d9;--text-dark:#22211f;--text-orange:#ff7533;--orange-light:#f36822;--orange-medium:#f35422;--medium-gray:7E7E7E;--gray-button:hsla(45,89%,93%,.25);--input-background:rgba(243,84,34,.25)}body{background-color:hsla(45,89%,93%,.25);background-color:var(--gray-button);background:url(/static/media/background.01d2427cfc21fb685016.jpg) no-repeat 50% fixed;background-size:cover;color:#fff5d9;color:var(--text-light);font-size:16px;font-weight:400;height:100vh;margin:0;overflow-y:scroll;padding:2em;width:100vw}a,body,button,h1,h2,h3,h4,h5,h6,input,p{font-family:Barlow Condensed,sans-serif}h1,h2,h3,h4,h5,h6{font-weight:500;line-height:1.5em;margin:0}h1{font-size:64px}h2{font-size:48px}h3{font-size:36px}h4{font-size:24px}h5{font-size:20px}h6{font-size:16px}.col{flex-direction:column}.col,.row{align-items:center;display:flex}.row{flex-direction:row}input{all:unset}input[type=checkbox],input[type=password],input[type=text]{background-color:rgba(243,84,34,.25);background-color:var(--input-background);border:1px solid #f35422;border:1px solid var(--orange-medium);border-radius:8px;box-sizing:border-box;color:#fff5d9;color:var(--text-light);font-size:1em;padding:1em}input[type=password],input[type=text]{width:100%}input[type=checkbox]{cursor:pointer;padding:.25em .8em}input[type=checkbox]:checked{background-color:#f35422;background-color:var(--orange-medium)}.checkmark{cursor:pointer;font-size:24px;left:4px;position:absolute;top:-5px}::-webkit-input-placeholder{color:#fff5d9;color:var(--text-light)}::placeholder{color:#fff5d9;color:var(--text-light)}::-webkit-input-placeholder::-webkit-input-placeholder{color:#fff5d9;color:var(--text-light)}::-webkit-input-placeholder::placeholder{color:#fff5d9;color:var(--text-light)}::-moz-placeholder::placeholder{color:#fff5d9;color:var(--text-light)}::-ms-input-placeholder{color:#fff5d9;color:var(--text-light)}label{font-size:20px}button{background:#f35422;background:var(--orange-medium);border:1px solid #f35422;border-color:var(--orange-medium);border-radius:8px;box-shadow:0 1px 2px #f36822;box-shadow:0 1px 2px var(--orange-light);box-sizing:border-box;color:#fff5d9;color:var(--text-light);cursor:pointer;font-size:1.125em;font-weight:500;margin:0;padding:.75em 1em;transition:all .1s;width:100%}button.alt{background-color:#fff5d9;background-color:var(--text-light);border-color:#fff5d9;border-color:var(--text-light);box-shadow:0 1px 2px #fff5d9;box-shadow:0 1px 2px var(--text-light);color:#22211f;color:var(--text-dark)}button:hover{box-shadow:none;opacity:.9}button:disabled{background-color:70000000E7E;background-color:var(--medium-gray);border:70000000e7e solid;border:1px solid var(--medium-gray);box-shadow:0 1px 2px 70000000E7E;box-shadow:0 1px 2px var(--medium-gray);cursor:not-allowed;opacity:.7}#signup-page{display:flex;flex:1 1;justify-content:center;padding-bottom:2em}.key-err{color:red;font-size:20px;margin-top:.5em;text-align:center;word-break:break-all}.label-row,.login-row{align-self:flex-start}.label-row{margin:.5em 0}.tooltip-container{cursor:pointer;display:inline-block;position:relative}.tooltip-button{font-size:16px;height:1em;line-height:.5em;margin-left:.5em;padding:4px 2px 0;text-align:center;width:1em}.tooltip-button,.tooltip-button.chain{border:2px solid #fff;border-radius:50%}.tooltip-button.chain{height:1.5em;margin:0 0 0 1em;padding:0;width:1.5em}.tooltip-button.chain img{height:100%;width:100%}.tooltip-content{background-color:#555;border-radius:6px;color:#fff;font-size:1rem;font-weight:500;left:50%;line-height:1.5em;margin-left:-60px;min-width:200px;opacity:0;padding:.5em;position:absolute;text-align:center;top:125%;transition:opacity .3s;visibility:hidden;z-index:1}.tooltip-content.left{left:auto;right:0}.tooltip-content:after{border:5px solid transparent;border-bottom-color:#555;bottom:100%;content:"";left:30%;margin-left:-5px;position:absolute}.tooltip-container:hover .tooltip-content{opacity:1;visibility:visible}.sepolia{-webkit-filter:grayscale(100%);filter:grayscale(100%)}#signup-form{gap:32px;max-width:calc(100vw - 2em);padding:1em;width:calc(420px + 2em)}#signup-form-header{margin-bottom:1em}#signup-form-header button{max-width:calc(100vw - 2em);width:calc(420px + 2em)}#current-address{font-family:Courier New,Courier,monospace;font-size:1.25em;font-weight:600;margin-left:1em}.current-username{border:1px solid #fff;border-radius:4px;cursor:pointer;margin:1em 0;padding:.5em}.current-username:hover{background-color:#fff;border:1px solid #fff;color:#027}#connect-wallet{max-width:420px}#wallet-required-message{line-height:1.5em;max-width:500px;text-align:center}#loading h3{text-align:center}#loader{display:inline-block;height:48px;margin-top:16px;position:relative;width:48px}#loader div{-webkit-animation:loader 1.2s cubic-bezier(.5,0,.5,1) infinite;animation:loader 1.2s cubic-bezier(.5,0,.5,1) infinite;border:6px solid transparent;border-radius:50%;border-top-color:#fff;box-sizing:border-box;display:block;height:36px;margin:6px;position:absolute;width:36px}#loader div:first-child{-webkit-animation-delay:-.45s;animation-delay:-.45s}#loader div:nth-child(2){-webkit-animation-delay:-.3s;animation-delay:-.3s}#loader div:nth-child(3){-webkit-animation-delay:-.15s;animation-delay:-.15s}@-webkit-keyframes loader{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loader{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.connect-modal{align-items:center;display:flex;justify-content:center}.connect-modal-content{background:#027;border-radius:15px;height:200px;padding:20px;position:fixed;top:120px;width:400px}.overlay-modal{background-color:hsla(0,0%,100%,.25);inset:0;position:fixed}.signup-form{max-width:400px;width:50vw}.direct-node-message{line-height:1.5em;margin-left:2em}.name-validity{color:red}.more-info-direct{cursor:pointer;margin:0 1em;text-decoration:underline}.more-info-direct:hover{color:#f36822;color:var(--orange-light)}a{color:#f35422;color:var(--orange-medium);text-decoration:none}a:hover{color:#f36822;color:var(--orange-light)}.reset-networking{cursor:pointer;font-size:1.25em;margin-left:.5em;margin-top:1em;text-decoration:underline;width:100%}.reset-networking:hover{color:#f36822;color:var(--orange-light)}.name-err{color:red;line-height:1.5em;margin-bottom:1em}.chain-button{align-items:center;background-color:hsla(45,89%,93%,.25);background-color:var(--gray-button);border:none;border-radius:2.5em;box-shadow:none;color:#fff5d9;color:var(--text-light);display:flex;flex-direction:row;font-family:Barlow Condensed,sans-serif;font-weight:300;justify-content:center;margin:0;padding:.4em .25em}.chain-button:hover{opacity:.9}.chain-button.monospace{font-family:Courier New,Courier,monospace}.network-icon{height:1.5em;margin-right:.5em;width:1.5em}.os{margin-left:.2em} \ No newline at end of file diff --git a/kinode/src/register-ui/build/static/js/main.00b7179d.js b/kinode/src/register-ui/build/static/js/main.00b7179d.js deleted file mode 100644 index d95a30639..000000000 --- a/kinode/src/register-ui/build/static/js/main.00b7179d.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.00b7179d.js.LICENSE.txt */ -(()=>{var e={7230:(e,t,r)=>{"use strict";r.d(t,{r:()=>n});const n="abi/5.7.0"},8111:(e,t,r)=>{"use strict";r.d(t,{y:()=>O,D:()=>U});var n=r(4593),i=r(8839),o=r(6376),a=r(7230),s=r(3556),u=r(708);class l extends s.Ue{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=(0,u.getAddress)(t)}catch(r){this._throwError(r.message,t)}return e.writeValue(t)}decode(e){return(0,u.getAddress)((0,n.hexZeroPad)(e.readValue().toHexString(),20))}}class c extends s.Ue{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const f=new o.Logger(a.r);function d(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||f.throwError("cannot encode object for signature with missing names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&f.throwError("cannot encode object for signature with duplicate names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else f.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&f.throwArgumentError("types/value length mismatch","tuple",r);let i=new s.AU(e.wordSize),a=new s.AU(e.wordSize),u=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=a.length;e.encode(a,r);let n=i.writeUpdatableValue();u.push((e=>{n(e+t)}))}else e.encode(i,r)})),u.forEach((e=>{e(i.length)}));let l=e.appendWriter(i);return l+=e.appendWriter(a),l}function h(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),s=n.subReader(r.toNumber());try{i=t.decode(s)}catch(a){if(a.code===o.Logger.errors.BUFFER_OVERRUN)throw a;i=a,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(a){if(a.code===o.Logger.errors.BUFFER_OVERRUN)throw a;i=a,i.baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=i&&r.push(i)}));const i=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let o=0;o{throw e}})}return Object.freeze(r)}class p extends s.Ue{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;re._data.length&&f.throwError("insufficient data length",o.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let n=0;n{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){return d(e,this.coders,t)}decode(e){return e.coerce(this.name,h(e,this.coders))}}var _=r(2820);const C=new o.Logger(a.r),P=new RegExp(/^bytes([0-9]*)$/),N=new RegExp(/^(u?int)([0-9]*)$/);class O{constructor(e){(0,i.defineReadOnly)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new l(e.name);case"bool":return new m(e.name);case"string":return new E(e.name);case"bytes":return new y(e.name);case"array":return new p(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new S((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new v(e.name)}let t=e.type.match(N);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!==0)&&C.throwArgumentError("invalid "+t[1]+" bit length","param",e),new x(r/8,"int"===t[1],e.name)}if(t=e.type.match(P),t){let r=parseInt(t[1]);return(0===r||r>32)&&C.throwArgumentError("invalid bytes length","param",e),new b(r,e.name)}return C.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new s.mP(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new s.AU(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(_.aX.from(e))));return new S(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&C.throwError("types/values length mismatch",o.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(_.aX.from(e)))),n=new S(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const i=e.map((e=>this._getCoder(_.aX.from(e))));return new S(i,"_").decode(this._getReader((0,n.arrayify)(t),r))}}const U=new O},3556:(e,t,r)=>{"use strict";r.d(t,{$v:()=>l,AU:()=>f,Ue:()=>c,mP:()=>d});var n=r(4593),i=r(2151),o=r(8839),a=r(6376),s=r(7230);const u=new a.Logger(s.r);function l(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let o in n){const a=e.slice();a.push(o);try{r(a,n[o])}catch(i){t.push({path:a,error:i})}}};return r([],e),t}class c{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){u.throwArgumentError(e,this.localName,t)}}class f{constructor(e){(0,o.defineReadOnly)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,n.hexConcat)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,n.concat)(e._data))}writeBytes(e){let t=(0,n.arrayify)(e);const r=t.length%this.wordSize;return r&&(t=(0,n.concat)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,n.arrayify)(i.gH.from(e));return t.length>this.wordSize&&u.throwError("value out-of-bounds",a.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,n.concat)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class d{constructor(e,t,r,i){(0,o.defineReadOnly)(this,"_data",(0,n.arrayify)(e)),(0,o.defineReadOnly)(this,"wordSize",t||32),(0,o.defineReadOnly)(this,"_coerceFunc",r),(0,o.defineReadOnly)(this,"allowLoose",i),this._offset=0}get data(){return(0,n.hexlify)(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):d.coerce(e,t)}_peekBytes(e,t,r){let 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:u.throwError("data out-of-bounds",a.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new d(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return i.gH.from(this.readBytes(this.wordSize))}}},2820:(e,t,r)=>{"use strict";r.d(t,{$o:()=>h,FK:()=>y,Pw:()=>x,Zp:()=>b,aX:()=>m,bp:()=>S,hc:()=>k});var n=r(2151),i=r(8839),o=r(6376),a=r(7230);const s=new o.Logger(a.r),u={};let l={calldata:!0,memory:!0,storage:!0},c={calldata:!0,memory:!0};function f(e,t){if("bytes"===e||"string"===e){if(l[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&c[t])return!0;return(l[t]||"payable"===t)&&s.throwArgumentError("invalid modifier","name",t),!1}function d(e,t){for(let r in t)(0,i.defineReadOnly)(e,r,t[r])}const h=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class m{constructor(e,t){e!==u&&s.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),d(this,t);let r=this.type.match(p);d(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:m.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json){let 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((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==h.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===h.full?", ":",")+")"):t+=this.type,e!==h.sighash&&(!0===this.indexed&&(t+=" indexed"),e===h.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"===typeof e?m.fromString(e,t):m.fromObject(e)}static fromObject(e){return m.isParamType(e)?e:new m(u,{name:e.name||null,type:_(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(m.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){s.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},a=o;for(let s=0;sm.fromString(e,t)))}class y{constructor(e,t){e!==u&&s.throwError("use a static from method",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),d(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return y.isFragment(e)?e:"string"===typeof e?y.fromString(e):y.fromObject(e)}static fromObject(e){if(y.isFragment(e))return e;switch(e.type){case"function":return k.fromObject(e);case"event":return b.fromObject(e);case"constructor":return x.fromObject(e);case"error":return S.fromObject(e);case"fallback":case"receive":return null}return s.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?b.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?k.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?x.fromString(e.trim()):"error"===e.split(" ")[0]?S.fromString(e.substring(5).trim()):s.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class b extends y{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"===typeof e?b.fromString(e):b.fromObject(e)}static fromObject(e){if(b.isEventFragment(e))return e;"event"!==e.type&&s.throwArgumentError("invalid event object","value",e);const t={name:P(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(m.fromObject):[],type:"event"};return new b(u,t)}static fromString(e){let t=e.match(N);t||s.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:s.warn("unknown modifier: "+e)}})),b.fromObject({name:t[1].trim(),anonymous:r,inputs:g(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function v(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&s.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||s.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=n.gH.from(r[1]),r[0]):e}function w(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((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){let 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&&s.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&s.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||s.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&&s.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&&s.throwArgumentError("unable to determine stateMutability","value",e),t}class x extends y{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.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((t=>JSON.parse(t.format(e))))});e===h.sighash&&s.throwError("cannot format a constructor for sighash",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"===typeof e?x.fromString(e):x.fromObject(e)}static fromObject(e){if(x.isConstructorFragment(e))return e;"constructor"!==e.type&&s.throwArgumentError("invalid constructor object","value",e);let t=A(e);t.constant&&s.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(m.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.gH.from(e.gas):null};return new x(u,r)}static fromString(e){let t={type:"constructor"},r=(e=v(e,t)).match(N);return r&&"constructor"===r[1].trim()||s.throwArgumentError("invalid constructor string","value",e),t.inputs=g(r[2].trim(),!1),w(r[3].trim(),t),x.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class k extends x{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.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((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"===typeof e?k.fromString(e):k.fromObject(e)}static fromObject(e){if(k.isFunctionFragment(e))return e;"function"!==e.type&&s.throwArgumentError("invalid function object","value",e);let t=A(e);const r={type:e.type,name:P(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(m.fromObject):[],outputs:e.outputs?e.outputs.map(m.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.gH.from(e.gas):null};return new k(u,r)}static fromString(e){let t={type:"function"},r=(e=v(e,t)).split(" returns ");r.length>2&&s.throwArgumentError("invalid function string","value",e);let n=r[0].match(N);if(n||s.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&P(t.name),t.inputs=g(n[2],!1),w(n[3].trim(),t),r.length>1){let n=r[1].match(N);""==n[1].trim()&&""==n[3].trim()||s.throwArgumentError("unexpected tokens","value",e),t.outputs=g(n[2],!1)}else t.outputs=[];return k.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function E(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||s.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}class S extends y{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",t.trim()}static from(e){return"string"===typeof e?S.fromString(e):S.fromObject(e)}static fromObject(e){if(S.isErrorFragment(e))return e;"error"!==e.type&&s.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:P(e.name),inputs:e.inputs?e.inputs.map(m.fromObject):[]};return E(new S(u,t))}static fromString(e){let t={type:"error"},r=e.match(N);return r||s.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&P(t.name),t.inputs=g(r[2],!1),E(S.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function _(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const C=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function P(e){return e&&e.match(C)||s.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}const N=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},7565:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbiCoder:()=>i.y,ConstructorFragment:()=>n.Pw,ErrorFragment:()=>n.bp,EventFragment:()=>n.Zp,FormatTypes:()=>n.$o,Fragment:()=>n.FK,FunctionFragment:()=>n.hc,Indexed:()=>o.wu,Interface:()=>o.KA,LogDescription:()=>o.FW,ParamType:()=>n.aX,TransactionDescription:()=>o.dJ,checkResultErrors:()=>a.$v,defaultAbiCoder:()=>i.D});var n=r(2820),i=r(8111),o=r(8718),a=r(3556)},8718:(e,t,r)=>{"use strict";r.d(t,{FW:()=>p,KA:()=>w,dJ:()=>m,wu:()=>y});var n=r(708),i=r(2151),o=r(4593),a=r(2162),s=r(5172),u=r(8839),l=r(8111),c=r(2820),f=r(6376),d=r(7230);const h=new f.Logger(d.r);class p extends u.Description{}class m extends u.Description{}class g extends u.Description{}class y extends u.Description{static isIndexed(e){return!(!e||!e._isIndexed)}}const b={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function v(e,t){const r=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return r.error=t,r}class w{constructor(e){let t=[];t="string"===typeof e?JSON.parse(e):e,(0,u.defineReadOnly)(this,"fragments",t.map((e=>c.FK.from(e))).filter((e=>null!=e))),(0,u.defineReadOnly)(this,"_abiCoder",(0,u.getStatic)(new.target,"getAbiCoder")()),(0,u.defineReadOnly)(this,"functions",{}),(0,u.defineReadOnly)(this,"errors",{}),(0,u.defineReadOnly)(this,"events",{}),(0,u.defineReadOnly)(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void h.warn("duplicate definition - constructor"):void(0,u.defineReadOnly)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?h.warn("duplicate definition - "+r):t[r]=e})),this.deploy||(0,u.defineReadOnly)(this,"deploy",c.Pw.from({payable:!1,type:"constructor"})),(0,u.defineReadOnly)(this,"_isInterface",!0)}format(e){e||(e=c.$o.full),e===c.$o.sighash&&h.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===c.$o.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return l.D}static getAddress(e){return(0,n.getAddress)(e)}static getSighash(e){return(0,o.hexDataSlice)((0,a.id)(e.format()),0,4)}static getEventTopic(e){return(0,a.id)(e.format())}getFunction(e){if((0,o.isHexString)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];h.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching function","name",t):r.length>1&&h.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[c.hc.fromString(e).format()];return t||h.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];h.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching event","name",t):r.length>1&&h.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[c.Zp.fromString(e).format()];return t||h.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,o.isHexString)(e)){const t=(0,u.getStatic)(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}h.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching error","name",t):r.length>1&&h.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[c.hc.fromString(e).format()];return t||h.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"===typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(r){throw t}}return(0,u.getStatic)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"===typeof e&&(e=this.getEvent(e)),(0,u.getStatic)(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"===typeof e&&(e=this.getError(e));const r=(0,o.arrayify)(t);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,o.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"===typeof e&&(e=this.getError(e)),(0,o.hexlify)((0,o.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"===typeof e&&(e=this.getFunction(e));const r=(0,o.arrayify)(t);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,o.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,o.hexlify)((0,o.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"===typeof e&&(e=this.getFunction(e));let r=(0,o.arrayify)(t),n=null,i="",a=null,s=null,u=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(l){}break;case 4:{const e=(0,o.hexlify)(r.slice(0,4)),t=b[e];if(t)a=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,u=t.signature,t.reason&&(n=a[0]),"Error"===s?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(a[0])):"Panic"===s&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(a[0]));else try{const t=this.getError(e);a=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,u=t.format()}catch(l){}break}}return h.throwError("call revert exception"+i,f.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,o.hexlify)(t),errorArgs:a,errorName:s,errorSignature:u,reason:n})}encodeFunctionResult(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,o.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"===typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&h.throwError("too many arguments for "+e.format(),f.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?(0,a.id)(t):"bytes"===e.type?(0,s.keccak256)((0,o.hexlify)(t)):("bool"===e.type&&"boolean"===typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=i.gH.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,o.hexZeroPad)((0,o.hexlify)(t),32));for(t.forEach(((t,i)=>{let o=e.inputs[i];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?h.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((e=>n(o,e)))):r.push(n(o,t)):null!=t&&h.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"===typeof e&&(e=this.getEvent(e));const r=[],n=[],i=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&h.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const u=t[o];if(e.indexed)if("string"===e.type)r.push((0,a.id)(u));else if("bytes"===e.type)r.push((0,s.keccak256)(u));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[u]))}else n.push(e),i.push(u)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(e,t,r){if("string"===typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);(0,o.isHexString)(r[0],32)&&r[0].toLowerCase()===t||h.throwError("fragment/topic mismatch",f.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],i=[],a=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(c.aX.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(n.push(e),a.push(!1)):(i.push(e),a.push(!1))}));let s=null!=r?this._abiCoder.decode(n,(0,o.concat)(r)):null,u=this._abiCoder.decode(i,t,!0),l=[],d=0,p=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==s)l[t]=new y({_isIndexed:!0,hash:null});else if(a[t])l[t]=new y({_isIndexed:!0,hash:s[p++]});else try{l[t]=s[p++]}catch(r){l[t]=r}else try{l[t]=u[d++]}catch(r){l[t]=r}if(e.name&&null==l[e.name]){const r=l[t];r instanceof Error?Object.defineProperty(l,e.name,{enumerable:!0,get:()=>{throw v("property ".concat(JSON.stringify(e.name)),r)}}):l[e.name]=r}}));for(let o=0;o{throw v("index ".concat(o),e)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new m({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:i.gH.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new p({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=(0,o.hexlify)(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new g({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}},5864:(e,t,r)=>{"use strict";r.d(t,{Rj:()=>u,Kq:()=>l});var n=r(2151),i=(r(4593),r(8839)),o=r(6376);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())}))};const s=new o.Logger("abstract-provider/5.7.0");class u extends i.Description{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class l{constructor(){s.checkAbstract(new.target,l),(0,i.defineReadOnly)(this,"_isProvider",!0)}getFeeData(){return a(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield(0,i.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,o=null,a=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,a=n.gH.from("1500000000"),o=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:r,maxFeePerGas:o,maxPriorityFeePerGas:a,gasPrice:t}}))}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}},2493:(e,t,r)=>{"use strict";r.d(t,{l:()=>l,J:()=>c});var n=r(8839),i=r(6376);var o=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())}))};const a=new i.Logger("abstract-signer/5.7.0"),s=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],u=[i.Logger.errors.INSUFFICIENT_FUNDS,i.Logger.errors.NONCE_EXPIRED,i.Logger.errors.REPLACEMENT_UNDERPRICED];class l{constructor(){a.checkAbstract(new.target,l),(0,n.defineReadOnly)(this,"_isSigner",!0)}getBalance(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return o(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return o(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return o(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return o(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const r in e)-1===s.indexOf(r)&&a.throwArgumentError("invalid transaction key: "+r,"transaction",e);const t=(0,n.shallowCopy)(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&a.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return o(this,void 0,void 0,(function*(){const t=yield(0,n.resolveProperties)(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>o(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&a.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||a.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):a.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&a.throwError("network does not support EIP-1559",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):a.throwError("failed to get consistent fee data",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(u.indexOf(e.code)>=0)throw e;return a.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&a.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield(0,n.resolveProperties)(t)}))}_checkProvider(e){this.provider||a.throwError("missing provider",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class c extends l{constructor(e,t){super(),(0,n.defineReadOnly)(this,"address",e),(0,n.defineReadOnly)(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then((()=>{a.throwError(e,i.Logger.errors.UNSUPPORTED_OPERATION,{operation:t})}))}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new c(this.address,e)}}},708:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getAddress:()=>h,getContractAddress:()=>g,getCreate2Address:()=>y,getIcapAddress:()=>m,isAddress:()=>p});var n=r(4593),i=r(2151),o=r(5172),a=r(1742);const s=new(r(6376).Logger)("address/5.7.0");function u(e){(0,n.isHexString)(e,20)||s.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=t[n].charCodeAt(0);const i=(0,n.arrayify)((0,o.keccak256)(r));for(let n=0;n<40;n+=2)i[n>>1]>>4>=8&&(t[n]=t[n].toUpperCase()),(15&i[n>>1])>=8&&(t[n+1]=t[n+1].toUpperCase());return"0x"+t.join("")}const l={};for(let b=0;b<10;b++)l[String(b)]=String(b);for(let b=0;b<26;b++)l[String.fromCharCode(65+b)]=String(10+b);const c=Math.floor((f=9007199254740991,Math.log10?Math.log10(f):Math.log(f)/Math.LN10));var f;function d(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>l[e])).join("");for(;t.length>=c;){let e=t.substring(0,c);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function h(e){let 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)!==d(e)&&s.throwArgumentError("bad icap checksum","address",e),t=(0,i.Os)(e.substring(4));t.length<40;)t="0"+t;t=u("0x"+t)}else s.throwArgumentError("invalid address","address",e);return t}function p(e){try{return h(e),!0}catch(t){}return!1}function m(e){let t=(0,i.ii)(h(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+d("XE00"+t)+t}function g(e){let t=null;try{t=h(e.from)}catch(u){s.throwArgumentError("missing from address","transaction",e)}const r=(0,n.stripZeros)((0,n.arrayify)(i.gH.from(e.nonce).toHexString()));return h((0,n.hexDataSlice)((0,o.keccak256)((0,a.encode)([t,r])),12))}function y(e,t,r){return 32!==(0,n.hexDataLength)(t)&&s.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.hexDataLength)(r)&&s.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),h((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",h(e),t,r])),12))}},817:(e,t,r)=>{"use strict";r.d(t,{D:()=>i,l:()=>o});var n=r(4593);function i(e){e=atob(e);const t=[];for(let r=0;r{"use strict";r.r(t),r.d(t,{decode:()=>n.D,encode:()=>n.l});var n=r(817)},1084:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Base32:()=>a,Base58:()=>s,BaseX:()=>o});var n=r(4593),i=r(8839);class o{constructor(e){(0,i.defineReadOnly)(this,"alphabet",e),(0,i.defineReadOnly)(this,"base",e.length),(0,i.defineReadOnly)(this,"_alphabetMap",{}),(0,i.defineReadOnly)(this,"_leader",e.charAt(0));for(let t=0;t0;)r.push(e%this.base),e=e/this.base|0}let i="";for(let n=0;0===t[n]&&n=0;--n)i+=this.alphabet[r[n]];return i}decode(e){if("string"!==typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r>=8;for(;i>0;)t.push(255&i),i>>=8}for(let r=0;e[r]===this._leader&&r{"use strict";r.d(t,{r:()=>n});const n="bignumber/5.7.0"},2151:(e,t,r)=>{"use strict";r.d(t,{Os:()=>v,YR:()=>d,gH:()=>p,ii:()=>w});var n=r(2914),i=r.n(n),o=r(4593),a=r(6376),s=r(3969),u=i().BN;const l=new a.Logger(s.r),c={},f=9007199254740991;function d(e){return null!=e&&(p.isBigNumber(e)||"number"===typeof e&&e%1===0||"string"===typeof e&&!!e.match(/^-?[0-9]+$/)||(0,o.isHexString)(e)||"bigint"===typeof e||(0,o.isBytes)(e))}let h=!1;class p{constructor(e,t){e!==c&&l.throwError("cannot call constructor directly; use BigNumber.from",a.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return g(y(this).fromTwos(e))}toTwos(e){return g(y(this).toTwos(e))}abs(){return"-"===this._hex[0]?p.from(this._hex.substring(1)):this}add(e){return g(y(this).add(y(e)))}sub(e){return g(y(this).sub(y(e)))}div(e){return p.from(e).isZero()&&b("division-by-zero","div"),g(y(this).div(y(e)))}mul(e){return g(y(this).mul(y(e)))}mod(e){const t=y(e);return t.isNeg()&&b("division-by-zero","mod"),g(y(this).umod(t))}pow(e){const t=y(e);return t.isNeg()&&b("negative-power","pow"),g(y(this).pow(t))}and(e){const t=y(e);return(this.isNegative()||t.isNeg())&&b("unbound-bitwise-result","and"),g(y(this).and(t))}or(e){const t=y(e);return(this.isNegative()||t.isNeg())&&b("unbound-bitwise-result","or"),g(y(this).or(t))}xor(e){const t=y(e);return(this.isNegative()||t.isNeg())&&b("unbound-bitwise-result","xor"),g(y(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&b("negative-width","mask"),g(y(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&b("negative-width","shl"),g(y(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&b("negative-width","shr"),g(y(this).shrn(e))}eq(e){return y(this).eq(y(e))}lt(e){return y(this).lt(y(e))}lte(e){return y(this).lte(y(e))}gt(e){return y(this).gt(y(e))}gte(e){return y(this).gte(y(e))}isNegative(){return"-"===this._hex[0]}isZero(){return y(this).isZero()}toNumber(){try{return y(this).toNumber()}catch(e){b("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return l.throwError("this platform does not support BigInt",a.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?h||(h=!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()",a.Logger.errors.UNEXPECTED_ARGUMENT,{}):l.throwError("BigNumber.toString does not accept parameters",a.Logger.errors.UNEXPECTED_ARGUMENT,{})),y(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof p)return e;if("string"===typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new p(c,m(e)):e.match(/^-?[0-9]+$/)?new p(c,m(new u(e))):l.throwArgumentError("invalid BigNumber string","value",e);if("number"===typeof e)return e%1&&b("underflow","BigNumber.from",e),(e>=f||e<=-f)&&b("overflow","BigNumber.from",e),p.from(String(e));const t=e;if("bigint"===typeof t)return p.from(t.toString());if((0,o.isBytes)(t))return p.from((0,o.hexlify)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"===typeof e)return p.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"===typeof e&&((0,o.isHexString)(e)||"-"===e[0]&&(0,o.isHexString)(e.substring(1))))return p.from(e)}return l.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}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 p.from(m(e))}function y(e){const t=p.from(e).toHexString();return"-"===t[0]?new u("-"+t.substring(3),16):new u(t.substring(2),16)}function b(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),l.throwError(e,a.Logger.errors.NUMERIC_FAULT,n)}function v(e){return new u(e,36).toString(16)}function w(e){return new u(e,16).toString(36)}},4593:(e,t,r)=>{"use strict";r.r(t),r.d(t,{arrayify:()=>l,concat:()=>c,hexConcat:()=>b,hexDataLength:()=>g,hexDataSlice:()=>y,hexStripZeros:()=>w,hexValue:()=>v,hexZeroPad:()=>A,hexlify:()=>m,isBytes:()=>u,isBytesLike:()=>a,isHexString:()=>h,joinSignature:()=>k,splitSignature:()=>x,stripZeros:()=>f,zeroPad:()=>d});const n=new(r(6376).Logger)("bytes/5.7.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return h(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(let t=0;t=256)return!1}return!0}function l(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),o(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),h(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",e));const i=[];for(let e=0;el(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),o(n)}function f(e){let t=l(e);if(0===t.length)return t;let r=0;for(;rt&&n.throwArgumentError("value out of range","value",arguments[0]);const 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)}const p="0123456789abcdef";function m(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=p[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"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(u(e)){let t="0x";for(let r=0;r>4]+p[15&n]}return t}return n.throwArgumentError("invalid hexlify value","value",e)}function g(e){if("string"!==typeof e)e=m(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function y(e,t,r){return"string"!==typeof e?e=m(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 b(e){let t="0x";return e.forEach((e=>{t+=m(e).substring(2)})),t}function v(e){const t=w(m(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!==typeof e&&(e=m(e)),h(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let 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 x(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(e)){let 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]):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=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){const r=d(l(t._vs),32);t._vs=m(r);const i=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const o=m(r);null==t.s?t.s=o:t.s!==o&&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{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&h(t.r)?t.r=A(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=A(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);const r=l(t.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const i=m(r);t._vs&&(h(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=A(t._vs,32)),null==t._vs?t._vs=i:t._vs!==i&&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 m(c([(e=x(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},3988:(e,t,r)=>{"use strict";r.d(t,{Is:()=>s,XK:()=>o,eR:()=>i,pD:()=>a});var n=r(2151);const i=n.gH.from(-1),o=n.gH.from(0),a=n.gH.from(1),s=n.gH.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},1660:(e,t,r)=>{"use strict";r.d(t,{j:()=>n});const n="0x0000000000000000000000000000000000000000000000000000000000000000"},2064:(e,t,r)=>{"use strict";r.d(t,{r:()=>n});const n="hash/5.7.0"},2162:(e,t,r)=>{"use strict";r.d(t,{id:()=>o});var n=r(5172),i=r(8523);function o(e){return(0,n.keccak256)((0,i.YW)(e))}},135:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_TypedDataEncoder:()=>a.z,dnsEncode:()=>i.Wh,ensNormalize:()=>i.Q8,hashMessage:()=>o.A,id:()=>n.id,isValidName:()=>i.uV,messagePrefix:()=>o.o,namehash:()=>i.kM});var n=r(2162),i=r(412),o=r(6552),a=r(8076)},6552:(e,t,r)=>{"use strict";r.d(t,{A:()=>s,o:()=>a});var n=r(4593),i=r(5172),o=r(8523);const a="\x19Ethereum Signed Message:\n";function s(e){return"string"===typeof e&&(e=(0,o.YW)(e)),(0,i.keccak256)((0,n.concat)([(0,o.YW)(a),(0,o.YW)(String(e.length)),e]))}},412:(e,t,r)=>{"use strict";r.d(t,{Wh:()=>B,Q8:()=>M,uV:()=>R,kM:()=>I});var n=r(4593),i=r(8523),o=r(5172),a=r(6376),s=r(2064);function u(e,t){null==t&&(t=1);const r=[],n=r.forEach,i=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?i(e,t-1):r.push(e)}))};return i(e,t),r}function l(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let w=1;w>--u&1}const f=Math.pow(2,31),d=f>>>1,h=d>>1,p=f-1;let m=0;for(let w=0;w<31;w++)m=m<<1|c();let g=[],y=0,b=f;for(;;){let e=Math.floor(((m-y+1)*i-1)/b),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|c(),a=a<<1^d,s=(s^d)<<1|d|1;y=a,b=1+s-a}let v=n-4;return g.map((t=>{switch(t-v){case 3:return v+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return v+256+(e[s++]<<8|e[s++]);case 1:return v+e[s++];default:return t-1}}))}(e))}function c(e){return 1&e?~e>>1:e>>1}function f(e,t){let r=Array(e);for(let n=0,i=-1;nt[e])):r}function p(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let i=0;in[t].push(e)));return n}function m(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return u(p(i.length,1+e,t).map(((e,t)=>{const o=e[0],a=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*n;return[o+t*r,a.map((e=>e+i))]}))})))}function g(e,t){return p(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const y=l((0,r(817).D)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),b=new Set(h(y)),v=new Set(h(y)),w=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(m(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(g(r,e))}return function(e){const t={};for(let r=0;re-t));return function r(){let n=[];for(;;){let i=h(e,t);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let i=e(),o=i%3;i=i/3|0;let a=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:a,save:1==i,check:2==i}}()}(y),x=45,k=95;function E(e){return(0,i.dg)(e)}function S(e){return e.filter((e=>65039!=e))}function _(e){for(let r of e.split(".")){let e=E(r);try{for(let t=e.lastIndexOf(k)-1;t>=0;t--)if(e[t]!==k)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===x&&e[3]===x)throw new Error("invalid label extension")}catch(t){throw new Error('Invalid label "'.concat(r,'": ').concat(t.message))}}return e}function C(e){return _(function(e,t){let r=E(e).reverse(),n=[];for(;r.length;){let e=P(r);if(e){n.push(...t(e));continue}let i=r.pop();if(b.has(i)){n.push(i);continue}if(v.has(i))continue;let o=w[i];if(!o)throw new Error("Disallowed codepoint: 0x".concat(i.toString(16).toUpperCase()));n.push(...o)}return _((i=String.fromCodePoint(...n),i.normalize("NFC")));var i}(e,S))}function P(e,t){var r;let n,i,o=A,a=[],s=e.length;for(t&&(t.length=0);s;){let u=e[--s];if(o=null===(r=o.branches.find((e=>e.set.has(u))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=u;else if(o.check&&u===i)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(...e.slice(s).reverse()),e.length=s)}return n}const N=new a.Logger(s.r),O=new Uint8Array(32);function U(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function T(e){const t=(0,i.YW)(C(e)),r=[];if(0===e.length)return r;let n=0;for(let i=0;i=t.length)throw new Error("invalid ENS name; empty component");return r.push(U(t.slice(n))),r}function M(e){return T(e).map((e=>(0,i._v)(e))).join(".")}function R(e){try{return 0!==T(e).length}catch(t){}return!1}function I(e){"string"!==typeof e&&N.throwArgumentError("invalid ENS name; not a string","name",e);let t=O;const r=T(e);for(;r.length;)t=(0,o.keccak256)((0,n.concat)([t,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(t)}function B(e){return(0,n.hexlify)((0,n.concat)(T(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}O.fill(0)},8076:(e,t,r)=>{"use strict";r.d(t,{z:()=>_});var n=r(708),i=r(2151),o=r(4593),a=r(5172),s=r(8839),u=r(6376),l=r(2064),c=r(2162),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())}))};const d=new u.Logger(l.r),h=new Uint8Array(32);h.fill(0);const p=i.gH.from(-1),m=i.gH.from(0),g=i.gH.from(1),y=i.gH.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const b=(0,o.hexZeroPad)(g.toHexString(),32),v=(0,o.hexZeroPad)(m.toHexString(),32),w={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},A=["name","version","chainId","verifyingContract","salt"];function x(e){return function(t){return"string"!==typeof t&&d.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}const k={name:x("name"),version:x("version"),chainId:function(e){try{return i.gH.from(e).toString()}catch(t){}return d.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(t){}return d.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=(0,o.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,o.hexlify)(t)}catch(t){}return d.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function E(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!==0||n>256||t[2]&&t[2]!==String(n))&&d.throwArgumentError("invalid numeric width","type",e);const a=y.mask(r?n-1:n),s=r?a.add(g).mul(p):m;return function(t){const r=i.gH.from(t);return(r.lt(s)||r.gt(a))&&d.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,o.hexZeroPad)(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&d.throwArgumentError("invalid bytes width","type",e),function(t){return(0,o.arrayify)(t).length!==r&&d.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){const t=(0,o.arrayify)(e),r=t.length%32;return r?(0,o.hexConcat)([t,h.slice(r)]):(0,o.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,o.hexZeroPad)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?b:v};case"bytes":return function(e){return(0,a.keccak256)(e)};case"string":return function(e){return(0,c.id)(e)}}return null}function S(e,t){return"".concat(e,"(").concat(t.map((e=>{let{name:t,type:r}=e;return r+" "+t})).join(","),")")}class _{constructor(e){(0,s.defineReadOnly)(this,"types",Object.freeze((0,s.deepCopy)(e))),(0,s.defineReadOnly)(this,"_encoderCache",{}),(0,s.defineReadOnly)(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const o in e){const n={};e[o].forEach((i=>{n[i.name]&&d.throwArgumentError("duplicate variable name ".concat(JSON.stringify(i.name)," in ").concat(JSON.stringify(o)),"types",e),n[i.name]=!0;const a=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===o&&d.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",e);E(a)||(r[a]||d.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",e),r[a].push(o),t[o][a]=!0)}))}const i=Object.keys(r).filter((e=>0===r[e].length));0===i.length?d.throwArgumentError("missing primary type","types",e):i.length>1&&d.throwArgumentError("ambiguous primary types or unused types: ".concat(i.map((e=>JSON.stringify(e))).join(", ")),"types",e),(0,s.defineReadOnly)(this,"primaryType",i[0]),function i(o,a){a[o]&&d.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",e),a[o]=!0,Object.keys(t[o]).forEach((e=>{r[e]&&(i(e,a),Object.keys(a).forEach((t=>{n[t][e]=!0})))})),delete a[o]}(this.primaryType,{});for(const o in n){const t=Object.keys(n[o]);t.sort(),this._types[o]=S(o,e[o])+t.map((t=>S(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=E(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(a.keccak256)),(0,a.keccak256)((0,o.hexConcat)(i))}}const r=this.types[e];if(r){const t=(0,c.id)(this._types[e]);return e=>{const n=r.map((t=>{let{name:r,type:n}=t;const i=this.getEncoder(n)(e[r]);return this._types[n]?(0,a.keccak256)(i):i}));return n.unshift(t),(0,o.hexConcat)(n)}}return d.throwArgumentError("unknown type: ".concat(e),"type",e)}encodeType(e){const t=this._types[e];return t||d.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,a.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(E(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],i=parseInt(n[3]);return i>=0&&t.length!==i&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const i=this.types[e];return i?i.reduce(((e,n)=>{let{name:i,type:o}=n;return e[i]=this._visit(o,t[i],r),e}),{}):d.throwArgumentError("unknown type: ".concat(e),"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new _(e)}static getPrimaryType(e){return _.from(e).primaryType}static hashStruct(e,t,r){return _.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=w[r];n||d.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(r)),"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>A.indexOf(e.name)-A.indexOf(t.name))),_.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,o.hexConcat)(["0x1901",_.hashDomain(e),_.from(t).hash(r)])}static hash(e,t,r){return(0,a.keccak256)(_.encode(e,t,r))}static resolveNames(e,t,r,n){return f(this,void 0,void 0,(function*(){e=(0,s.shallowCopy)(e);const i={};e.verifyingContract&&!(0,o.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const a=_.from(t);a.visit(r,((e,t)=>("address"!==e||(0,o.isHexString)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=yield n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=a.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){_.hashDomain(e);const n={},a=[];A.forEach((t=>{const r=e[t];null!=r&&(n[t]=k[t](r),a.push({name:t,type:w[t]}))}));const u=_.from(t),l=(0,s.shallowCopy)(t);return l.EIP712Domain?d.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):l.EIP712Domain=a,u.encode(r),{types:l,domain:n,primaryType:u.primaryType,message:u.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,o.hexlify)((0,o.arrayify)(t));if(e.match(/^u?int/))return i.gH.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&d.throwArgumentError("invalid string","value",t),t}return d.throwArgumentError("unsupported type","type",e)}))}}}},5343:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HDNode:()=>U,defaultPath:()=>O,entropyToMnemonic:()=>R,getAccountPath:()=>B,isValidMnemonic:()=>I,mnemonicToEntropy:()=>M,mnemonicToSeed:()=>T});var n=r(1084),i=r(4593),o=r(2151),a=r(8523),s=r(9761),u=r(8839),l=r(724),c=r(7260),f=r(6910),d=r(31),h=r(2162),p=r(6376);const m=new p.Logger("wordlists/5.7.0");class g{constructor(e){m.checkAbstract(new.target,g),(0,u.defineReadOnly)(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let r=0;r<2048;r++){const n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return(0,h.id)(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}let y=null;function b(e){if(null==y&&(y="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==g.check(e)))throw y=null,new Error("BIP39 Wordlist for en (English) FAILED")}const v=new class extends g{constructor(){super("en")}getWord(e){return b(this),y[e]}getWordIndex(e){return b(this),y.indexOf(e)}};g.register(v);const w={en:v},A=new p.Logger("hdnode/5.7.0"),x=o.gH.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),k=(0,a.YW)("Bitcoin seed"),E=2147483648;function S(e){return(1<=256)throw new Error("Depth too large!");return C((0,i.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,i.hexlify)(this.depth),this.parentFingerprint,(0,i.hexZeroPad)((0,i.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,i.concat)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new U(N,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~E));const r=new Uint8Array(37);if(e&E){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set((0,i.arrayify)(this.privateKey),1),t&&(t+="'")}else r.set((0,i.arrayify)(this.publicKey));for(let i=24;i>=0;i-=8)r[33+(i>>3)]=e>>24-i&255;const n=(0,i.arrayify)((0,c.L5)(f.q.sha512,this.chainCode,r)),a=n.slice(0,32),s=n.slice(32);let u=null,d=null;if(this.privateKey)u=_(o.gH.from(a).add(this.privateKey).mod(x));else{d=new l.SigningKey((0,i.hexlify)(a))._addPoint(this.publicKey)}let h=t;const p=this.mnemonic;return p&&(h=Object.freeze({phrase:p.phrase,path:t,locale:p.locale||"en"})),new U(N,u,d,this.fingerprint,_(s),e,this.depth+1,h)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let n=0;n=E)throw new Error("invalid path index - "+e);r=r._derive(E+t)}else{if(!e.match(/^[0-9]+$/))throw new Error("invalid path component - "+e);{const t=parseInt(e);if(t>=E)throw new Error("invalid path index - "+e);r=r._derive(t)}}}return r}static _fromSeed(e,t){const r=(0,i.arrayify)(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=(0,i.arrayify)((0,c.L5)(f.q.sha512,k,r));return new U(N,_(n.slice(0,32)),null,"0x00000000",_(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=R(M(e,r=P(r)),r),U._fromSeed(T(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return U._fromSeed(e,null)}static fromExtendedKey(e){const t=n.Base58.decode(e);82===t.length&&C(t.slice(0,78))===e||A.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],o=(0,i.hexlify)(t.slice(5,9)),a=parseInt((0,i.hexlify)(t.slice(9,13)).substring(2),16),s=(0,i.hexlify)(t.slice(13,45)),u=t.slice(45,78);switch((0,i.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new U(N,null,(0,i.hexlify)(u),o,s,a,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==u[0])break;return new U(N,(0,i.hexlify)(u.slice(1)),null,o,s,a,r,null)}return A.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function T(e,t){t||(t="");const r=(0,a.YW)("mnemonic"+t,a.dz.NFKD);return(0,s.A)((0,a.YW)(e,a.dz.NFKD),r,2048,64,"sha512")}function M(e,t){t=P(t),A.checkNormalize();const r=t.split(e);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=(0,i.arrayify)(new Uint8Array(Math.ceil(11*r.length/8)));let o=0;for(let i=0;i>3]|=1<<7-o%8),o++}const a=32*r.length/3,s=S(r.length/3);if(((0,i.arrayify)((0,c.sc)(n.slice(0,a/8)))[0]&s)!==(n[n.length-1]&s))throw new Error("invalid checksum");return(0,i.hexlify)(n.slice(0,a/8))}function R(e,t){if(t=P(t),(e=(0,i.arrayify)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let 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);const o=e.length/4,a=(0,i.arrayify)((0,c.sc)(e))[0]&S(o);return r[r.length-1]<<=o,r[r.length-1]|=a>>8-o,t.join(r.map((e=>t.getWord(e))))}function I(e,t){try{return M(e,t),!0}catch(r){}return!1}function B(e){return("number"!==typeof e||e<0||e>=E||e%1)&&A.throwArgumentError("invalid account index","index",e),"m/44'/60'/".concat(e,"'/0/0")}},8591:(e,t,r)=>{"use strict";r.d(t,{r:()=>n});const n="json-wallets/5.7.0"},6623:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptCrowdsale:()=>g,decryptJsonWallet:()=>A,decryptJsonWalletSync:()=>x,decryptKeystore:()=>w.Yc,decryptKeystoreSync:()=>w.xQ,encryptKeystore:()=>w.w,getJsonWalletAddress:()=>v,isCrowdsaleWallet:()=>y,isKeystoreWallet:()=>b});var n=r(8726),i=r.n(n),o=r(708),a=r(4593),s=r(5172),u=r(9761),l=r(8523),c=r(8839),f=r(6376),d=r(8591),h=r(6243);const p=new f.Logger(d.r);class m extends c.Description{isCrowdsaleAccount(e){return!(!e||!e._isCrowdsaleAccount)}}function g(e,t){const r=JSON.parse(e);t=(0,h.Qq)(t);const n=(0,o.getAddress)((0,h.oe)(r,"ethaddr")),c=(0,h.m0)((0,h.oe)(r,"encseed"));c&&c.length%16===0||p.throwArgumentError("invalid encseed","json",e);const f=(0,a.arrayify)((0,u.A)(t,t,2e3,32,"sha256")).slice(0,16),d=c.slice(0,16),g=c.slice(16),y=new(i().ModeOfOperation.cbc)(f,d),b=i().padding.pkcs7.strip((0,a.arrayify)(y.decrypt(g)));let v="";for(let i=0;i{"use strict";r.d(t,{Yc:()=>C,w:()=>P,xQ:()=>_});var n=r(8726),i=r.n(n),o=r(4097),a=r.n(o),s=r(708),u=r(4593),l=r(5343),c=r(5172),f=r(9761),d=r(9531),h=r(8839),p=r(31),m=r(6243),g=r(6376),y=r(8591),b=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())}))};const v=new g.Logger(y.r);function w(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}class A extends h.Description{isKeystoreAccount(e){return!(!e||!e._isKeystoreAccount)}}function x(e,t){const r=(0,m.m0)((0,m.oe)(e,"crypto/ciphertext"));if((0,u.hexlify)((0,c.keccak256)((0,u.concat)([t.slice(16,32),r]))).substring(2)!==(0,m.oe)(e,"crypto/mac").toLowerCase())throw new Error("invalid password");const n=function(e,t,r){if("aes-128-ctr"===(0,m.oe)(e,"crypto/cipher")){const n=(0,m.m0)((0,m.oe)(e,"crypto/cipherparams/iv")),o=new(i().Counter)(n),a=new(i().ModeOfOperation.ctr)(t,o);return(0,u.arrayify)(a.decrypt(r))}return null}(e,t.slice(0,16),r);n||v.throwError("unsupported cipher",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=t.slice(32,64),a=(0,p.computeAddress)(n);if(e.address){let t=e.address.toLowerCase();if("0x"!==t.substring(0,2)&&(t="0x"+t),(0,s.getAddress)(t)!==a)throw new Error("address mismatch")}const f={_isKeystoreAccount:!0,address:a,privateKey:(0,u.hexlify)(n)};if("0.1"===(0,m.oe)(e,"x-ethers/version")){const t=(0,m.m0)((0,m.oe)(e,"x-ethers/mnemonicCiphertext")),r=(0,m.m0)((0,m.oe)(e,"x-ethers/mnemonicCounter")),n=new(i().Counter)(r),a=new(i().ModeOfOperation.ctr)(o,n),s=(0,m.oe)(e,"x-ethers/path")||l.defaultPath,c=(0,m.oe)(e,"x-ethers/locale")||"en",h=(0,u.arrayify)(a.decrypt(t));try{const e=(0,l.entropyToMnemonic)(h,c),t=l.HDNode.fromMnemonic(e,null,c).derivePath(s);if(t.privateKey!=f.privateKey)throw new Error("mnemonic mismatch");f.mnemonic=t.mnemonic}catch(d){if(d.code!==g.Logger.errors.INVALID_ARGUMENT||"wordlist"!==d.argument)throw d}}return new A(f)}function k(e,t,r,n,i){return(0,u.arrayify)((0,f.A)(e,t,r,n,i))}function E(e,t,r,n,i){return Promise.resolve(k(e,t,r,n,i))}function S(e,t,r,n,i){const o=(0,m.Qq)(t),a=(0,m.oe)(e,"crypto/kdf");if(a&&"string"===typeof a){const t=function(e,t){return v.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===a.toLowerCase()){const r=(0,m.m0)((0,m.oe)(e,"crypto/kdfparams/salt")),s=parseInt((0,m.oe)(e,"crypto/kdfparams/n")),u=parseInt((0,m.oe)(e,"crypto/kdfparams/r")),l=parseInt((0,m.oe)(e,"crypto/kdfparams/p"));s&&u&&l||t("kdf",a),0!==(s&s-1)&&t("N",s);const c=parseInt((0,m.oe)(e,"crypto/kdfparams/dklen"));return 32!==c&&t("dklen",c),n(o,r,s,u,l,64,i)}if("pbkdf2"===a.toLowerCase()){const n=(0,m.m0)((0,m.oe)(e,"crypto/kdfparams/salt"));let i=null;const a=(0,m.oe)(e,"crypto/kdfparams/prf");"hmac-sha256"===a?i="sha256":"hmac-sha512"===a?i="sha512":t("prf",a);const s=parseInt((0,m.oe)(e,"crypto/kdfparams/c")),u=parseInt((0,m.oe)(e,"crypto/kdfparams/dklen"));return 32!==u&&t("dklen",u),r(o,n,s,u,i)}}return v.throwArgumentError("unsupported key-derivation function","kdf",a)}function _(e,t){const r=JSON.parse(e);return x(r,S(r,t,k,a().syncScrypt))}function C(e,t,r){return b(this,void 0,void 0,(function*(){const n=JSON.parse(e);return x(n,yield S(n,t,E,a().scrypt,r))}))}function P(e,t,r,n){try{if((0,s.getAddress)(e.address)!==(0,p.computeAddress)(e.privateKey))throw new Error("address/privateKey mismatch");if(w(e)){const t=e.mnemonic;if(l.HDNode.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||l.defaultPath).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(_){return Promise.reject(_)}"function"!==typeof r||n||(n=r,r={}),r||(r={});const o=(0,u.arrayify)(e.privateKey),f=(0,m.Qq)(t);let h=null,g=null,y=null;if(w(e)){const t=e.mnemonic;h=(0,u.arrayify)((0,l.mnemonicToEntropy)(t.phrase,t.locale||"en")),g=t.path||l.defaultPath,y=t.locale||"en"}let b=r.client;b||(b="ethers.js");let v=null;v=r.salt?(0,u.arrayify)(r.salt):(0,d.p)(32);let A=null;if(r.iv){if(A=(0,u.arrayify)(r.iv),16!==A.length)throw new Error("invalid iv")}else A=(0,d.p)(16);let x=null;if(r.uuid){if(x=(0,u.arrayify)(r.uuid),16!==x.length)throw new Error("invalid uuid")}else x=(0,d.p)(16);let k=1<<17,E=8,S=1;return r.scrypt&&(r.scrypt.N&&(k=r.scrypt.N),r.scrypt.r&&(E=r.scrypt.r),r.scrypt.p&&(S=r.scrypt.p)),a().scrypt(f,v,k,E,S,64,n).then((t=>{const r=(t=(0,u.arrayify)(t)).slice(0,16),n=t.slice(16,32),a=t.slice(32,64),s=new(i().Counter)(A),l=new(i().ModeOfOperation.ctr)(r,s),f=(0,u.arrayify)(l.encrypt(o)),p=(0,c.keccak256)((0,u.concat)([n,f])),w={address:e.address.substring(2).toLowerCase(),id:(0,m.QT)(x),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,u.hexlify)(A).substring(2)},ciphertext:(0,u.hexlify)(f).substring(2),kdf:"scrypt",kdfparams:{salt:(0,u.hexlify)(v).substring(2),n:k,dklen:32,p:S,r:E},mac:p.substring(2)}};if(h){const e=(0,d.p)(16),t=new(i().Counter)(e),r=new(i().ModeOfOperation.ctr)(a,t),n=(0,u.arrayify)(r.encrypt(h)),o=new Date,s=o.getUTCFullYear()+"-"+(0,m.Sp)(o.getUTCMonth()+1,2)+"-"+(0,m.Sp)(o.getUTCDate(),2)+"T"+(0,m.Sp)(o.getUTCHours(),2)+"-"+(0,m.Sp)(o.getUTCMinutes(),2)+"-"+(0,m.Sp)(o.getUTCSeconds(),2)+".0Z";w["x-ethers"]={client:b,gethFilename:"UTC--"+s+"--"+w.address,mnemonicCounter:(0,u.hexlify)(e).substring(2),mnemonicCiphertext:(0,u.hexlify)(n).substring(2),path:g,locale:y,version:"0.1"}}return JSON.stringify(w)}))}},6243:(e,t,r)=>{"use strict";r.d(t,{QT:()=>l,Qq:()=>s,Sp:()=>a,m0:()=>o,oe:()=>u});var n=r(4593),i=r(8523);function o(e){return"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,n.arrayify)(e)}function a(e,t){for(e=String(e);e.length255)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("")}}}(),l={16:10,24:12,32:14},c=[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],f=[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],d=[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],h=[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],m=[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],g=[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],y=[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],v=[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],A=[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],k=[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 S(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^f[a>>8&255]<<16^f[255&a]<<8^f[a>>24&255]^c[s]<<24,s+=1,8!=i)for(t=1;t>8&255]<<8^f[a>>16&255]<<16^f[a>>24&255]<<24;for(t=i/2+1;t>2,h=u%4,this._Ke[d][h]=o[t],this._Kd[e-d][h]=o[t++],u++}for(var d=1;d>24&255]^x[a>>16&255]^k[a>>8&255]^E[255&a]},_.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=S(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]^m[n[(i+2)%4]>>8&255]^g[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&(f[n[i]>>24&255]^s>>24),u[4*i+1]=255&(f[n[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(f[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(f[255&n[(i+3)%4]]^s);return u},_.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=S(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]^v[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&(d[n[i]>>24&255]^s>>24),u[4*i+1]=255&(d[n[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(d[255&n[(i+1)%4]]^s);return u};var C=function(e){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new _(e)};C.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},U.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},U.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var T=function(e,t){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof U||(t=new U(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new _(e)};T.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{"use strict";r.r(t),r.d(t,{keccak256:()=>a});var n=r(7674),i=r.n(n),o=r(4593);function a(e){return"0x"+i().keccak_256((0,o.arrayify)(e))}},6376:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ErrorCode:()=>c,LogLevel:()=>l,Logger:()=>d});let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let a=o.default,s=null;const u=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var l,c;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(l||(l={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(c||(c={}));const f="0123456789abcdef";class d{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",e),a>o[r]||console.log.apply(console,t)}debug(){for(var e=arguments.length,t=new Array(e),r=0;r{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=f[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(s){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push("code=".concat(t)),n.push("version=".concat(this.version));const o=e;let a="";switch(t){case c.NUMERIC_FAULT:{a="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":a+="-"+t;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.UNPREDICTABLE_GAS_LIMIT:a=t}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(r).forEach((function(e){s[e]=r[e]})),s}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,d.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(e,t){"number"===typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return s||(s=new d("logger/5.7.0")),s}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?a=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=c,d.levels=l},6057:(e,t,r)=>{"use strict";r.d(t,{N:()=>c});const n=new(r(6376).Logger)("networks/5.7.1");function i(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(i){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(i){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(i){}if(t.PocketProvider&&"-"!==r.pocket){const o=["goerli","ropsten","rinkeby","sepolia"];try{const i=new t.PocketProvider(e,r.pocket);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(i){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(i){}if(t.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new t.AnkrProvider(e,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(i){}if(0===n.length)return null;if(t.FallbackProvider){let 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 i(e)},t}function o(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return o(e,t)},r}const 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")},l={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 c(e){if(null==e)return null;if("number"===typeof e){for(const t in l){const r=l[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){const t=l[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=l[e.name];if(!t)return"number"!==typeof e.chainId&&n.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&n.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var i;return null==r&&t._defaultProvider&&(r=(i=t._defaultProvider)&&"function"===typeof i.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}},9761:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(4593),i=r(7260);function o(e,t,r,o,a){let s;e=(0,n.arrayify)(e),t=(0,n.arrayify)(t);let u=1;const l=new Uint8Array(o),c=new Uint8Array(t.length+4);let f,d;c.set(t);for(let h=1;h<=u;h++){c[t.length]=h>>24&255,c[t.length+1]=h>>16&255,c[t.length+2]=h>>8&255,c[t.length+3]=255&h;let p=(0,n.arrayify)((0,i.L5)(a,e,c));s||(s=p.length,d=new Uint8Array(s),u=Math.ceil(o/s),f=o-(u-1)*s),d.set(p);for(let t=1;t{"use strict";r.r(t),r.d(t,{Description:()=>m,checkProperties:()=>l,deepCopy:()=>p,defineReadOnly:()=>a,getStatic:()=>s,resolveProperties:()=>u,shallowCopy:()=>c});var n=r(6376);var i=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())}))};const o=new n.Logger("properties/5.7.0");function a(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function s(e,t){for(let 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 u(e){return i(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function l(e,t){e&&"object"===typeof e||o.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((r=>{t[r]||o.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function c(e){const t={};for(const r in e)t[r]=e[r];return t}const f={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function d(e){if(void 0===e||null===e||f[typeof e])return!0;if(Array.isArray(e)||"object"===typeof e){if(!Object.isFrozen(e))return!1;const r=Object.keys(e);for(let n=0;np(e))));if("object"===typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&a(t,r,p(n))}return t}return o.throwArgumentError("Cannot deepCopy ".concat(typeof e),"object",e)}function p(e){return h(e)}class m{constructor(e){for(const t in e)this[t]=p(e[t])}}},658:(e,t,r)=>{"use strict";r.d(t,{r:()=>n});const n="providers/5.7.2"},8664:(e,t,r)=>{"use strict";r.d(t,{DJ:()=>q,xR:()=>D});var n=r(5864),i=r(817),o=r(1084),a=r(2151),s=r(4593),u=r(1660),l=r(412),c=r(6057),f=r(8839),d=r(7260),h=r(8523),p=r(5268),m=r(5240),g=r.n(m),y=r(6376),b=r(658),v=r(6928),w=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())}))};const A=new y.Logger(b.r);function x(e){return null==e?"null":(32!==(0,s.hexDataLength)(e)&&A.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function k(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[x(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return x(e)})).join("&")}function E(e){if("string"===typeof e){if(e=e.toLowerCase(),32===(0,s.hexDataLength)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+k(e);if(n.Rj.isForkEvent(e))throw A.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+k(e.topics||[])}throw new Error("invalid event - "+e)}function S(){return(new Date).getTime()}function _(e){return new Promise((t=>{setTimeout(t,e)}))}const C=["block","network","pending","poll"];class P{constructor(e,t,r){(0,f.defineReadOnly)(this,"tag",e),(0,f.defineReadOnly)(this,"listener",t),(0,f.defineReadOnly)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const i={};return r.length>0&&(i.topics=r),t&&"*"!==t&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||C.indexOf(this.tag)>=0}}const N={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 O(e){return(0,s.hexZeroPad)(a.gH.from(e).toHexString(),32)}function U(e){return o.Base58.encode((0,s.concat)([e,(0,s.hexDataSlice)((0,d.sc)((0,d.sc)(e)),0,4)]))}const T=new RegExp("^(ipfs)://(.*)$","i"),M=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),T,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function R(e,t){try{return(0,h._v)(I(e,t))}catch(r){}return null}function I(e,t){if("0x"===e)return null;const r=a.gH.from((0,s.hexDataSlice)(e,t,t+32)).toNumber(),n=a.gH.from((0,s.hexDataSlice)(e,r,r+32)).toNumber();return(0,s.hexDataSlice)(e,r+32,r+32+n)}function B(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):A.throwArgumentError("unsupported IPFS format","link",e),"https://gateway.ipfs.io/ipfs/".concat(e)}function L(e){const t=(0,s.arrayify)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function j(e){if(e.length%32===0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function F(e){const t=[];let r=0;for(let n=0;na.gH.from(e).eq(1))).catch((e=>{if(e.code===y.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return w(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:(0,s.hexConcat)([e,(0,l.kM)(this.name),t||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=(0,s.hexConcat)(["0x9061b923",F([(0,l.Wh)(this.name),r.data])]));try{let e=yield this.provider.call(r);return(0,s.arrayify)(e).length%32===4&&A.throwError("resolver threw error",y.Logger.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=I(e,0)),e}catch(i){if(i.code===y.Logger.errors.CALL_EXCEPTION)return null;throw i}}))}_fetchBytes(e,t){return w(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?I(r,0):null}))}_getAddress(e,t){const r=N[String(e)];if(null==r&&A.throwError("unsupported coin type: ".concat(e),y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")")}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=(0,s.arrayify)(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return U((0,s.concat)([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return U((0,s.concat)([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=g().toWords(n.slice(2));return e.unshift(t),g().encode(r.prefix,e)}}return null}getAddress(e){return w(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||e===u.j?null:this.provider.formatter.callAddress(e)}catch(n){if(n.code===y.Logger.errors.CALL_EXCEPTION)return null;throw n}const t=yield this._fetchBytes("0xf1cb7e06",O(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&A.throwError("invalid or unsupported coin data",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")"),coinType:e,data:t}),r}))}getAvatar(){return w(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;re[t]))}return A.throwError("invalid or unsupported content hash data",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return w(this,void 0,void 0,(function*(){let t=(0,h.YW)(e);t=(0,s.concat)([O(64),O(t.length),t]),t.length%32!==0&&(t=(0,s.concat)([t,(0,s.hexZeroPad)("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",(0,s.hexlify)(t));return null==r||"0x"===r?null:(0,h._v)(r)}))}}let z=null,H=1;class q extends n.Kq{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,f.defineReadOnly)(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=(0,f.getStatic)(new.target,"getNetwork")(e);t?((0,f.defineReadOnly)(this,"_network",t),this.emit("network",t,null)):A.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return w(this,void 0,void 0,(function*(){if(null==this._network){let t=null;if(this._networkPromise)try{t=yield this._networkPromise}catch(e){}null==t&&(t=yield this.detectNetwork()),t||A.throwError("no network detected",y.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=t:(0,f.defineReadOnly)(this,"_network",t),this.emit("network",t,null))}return this._network}))}get ready(){return(0,p.poll)((()=>this._ready().then((e=>e),(e=>{if(e.code!==y.Logger.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==z&&(z=new v.ZA),z}static getNetwork(e){return(0,c.N)(null==e?"homestead":e)}ccipReadFetch(e,t,r){return w(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let e=0;e=0?null:JSON.stringify({data:i,sender:n}),u=yield(0,p.fetchJson)({url:a,errorPassThrough:!0},s,((e,t)=>(e.status=t.statusCode,e)));if(u.data)return u.data;const l=u.message||"unknown error";if(u.status>=400&&u.status<500)return A.throwError("response not found during CCIP fetch: ".concat(l),y.Logger.errors.SERVER_ERROR,{url:t,errorMessage:l});o.push(l)}return A.throwError("error encountered during CCIP fetch: ".concat(o.map((e=>JSON.stringify(e))).join(", ")),y.Logger.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(e){return w(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(S()-r.respTime<=e)return r.blockNumber;break}catch(n){if(this._internalBlockNumber===t)break}}const t=S(),r=(0,f.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((e=>{let{blockNumber:n,networkError:i}=e;if(i)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),i;const o=S();return n=a.gH.from(n).toNumber(),n{this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return w(this,void 0,void 0,(function*(){const e=H++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(n){return void this.emit("error",n)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)A.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(r,")")),this.emit("error",A.makeError("network block skew detected",y.Logger.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(o)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return w(this,void 0,void 0,(function*(){return A.throwError("provider does not support network detection",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return w(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,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",t,e),yield _(0),this._network;const r=A.makeError("underlying network changed",y.Logger.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){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((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=S();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return w(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return w(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise(((i,o)=>{const a=[];let s=!1;const u=function(){return!!s||(s=!0,a.forEach((e=>{e()})),!1)},l=e=>{e.confirmations{this.removeListener(e,l)})),n){let r=n.startBlock,i=null;const l=a=>w(this,void 0,void 0,(function*(){s||(yield _(1e3),this.getTransactionCount(n.from).then((c=>w(this,void 0,void 0,(function*(){if(!s){if(c<=n.nonce)r=a;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=r-3,i{s||this.once("block",l)})))}));if(s)return;this.once("block",l),a.push((()=>{this.removeListener("block",l)}))}if("number"===typeof r&&r>0){const e=setTimeout((()=>{u()||o(A.makeError("timeout exceeded",y.Logger.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),a.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return w(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return a.gH.from(e)}catch(t){return A.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,f.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return a.gH.from(n)}catch(i){return A.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:i})}}))}getTransactionCount(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,f.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return a.gH.from(n).toNumber()}catch(i){return A.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:i})}}))}getCode(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,f.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return(0,s.hexlify)(n)}catch(i){return A.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:i})}}))}getStorageAt(e,t,r){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield(0,f.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>(0,s.hexValue)(e)))}),i=yield this.perform("getStorageAt",n);try{return(0,s.hexlify)(i)}catch(o){return A.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:o})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==(0,s.hexDataLength)(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&A.throwError("Transaction hash mismatch from Provider.sendTransaction.",y.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>w(this,void 0,void 0,(function*(){let i;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(i={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const o=yield this._waitForTransaction(e.hash,t,n,i);return null==o&&0===t?null:(this._emitted["t:"+e.hash]=o.blockNumber,0===o.status&&A.throwError("transaction failed",y.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)})),n}sendTransaction(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>(0,s.hexlify)(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(i){throw i.transaction=r,i.transactionHash=r.hash,i}}))}_getTransactionRequest(e){return w(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?a.gH.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?(0,s.hexlify)(e):null)))})),this.formatter.transactionRequest(yield(0,f.resolveProperties)(r))}))}_getFilter(e){return w(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield(0,f.resolveProperties)(t))}))}_call(e,t,r){return w(this,void 0,void 0,(function*(){r>=10&&A.throwError("CCIP read exceeded maximum redirections",y.Logger.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,i=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===i.substring(0,10)&&(0,s.hexDataLength)(i)%32===4)try{const o=(0,s.hexDataSlice)(i,4),u=(0,s.hexDataSlice)(o,0,32);a.gH.from(u).eq(n)||A.throwError("CCIP Read sender did not match",y.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const l=[],c=a.gH.from((0,s.hexDataSlice)(o,32,64)).toNumber(),f=a.gH.from((0,s.hexDataSlice)(o,c,c+32)).toNumber(),d=(0,s.hexDataSlice)(o,c+32);for(let t=0;tw(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let n=0;nthis._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,p.poll)((()=>w(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,p.poll)((()=>w(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield(0,f.resolveProperties)({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),v.ZA.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return w(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return w(this,void 0,void 0,(function*(){if("number"===typeof(e=yield e)&&e<0){e%1&&A.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return w(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new D(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return w(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||A.throwError("network does not support ENS",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+(0,l.kM)(e).substring(2)});return this.formatter.callAddress(t)}catch(n){}return null}))}resolveName(e){return w(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(r){if((0,s.isHexString)(e))throw r}"string"!==typeof e&&A.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return w(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=R(yield this.call({to:r,data:"0x691f3431"+(0,l.kM)(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return w(this,void 0,void 0,(function*(){let t=null;if((0,s.isHexString)(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",i=yield this._getResolver(r,"getAvatar");if(!i)return null;t=new D(this,i,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(n){if(n.code!==y.Logger.errors.CALL_EXCEPTION)throw n}try{const e=R(yield this.call({to:i,data:"0x691f3431"+(0,l.kM)(r).substring(2)}),0);t=yield this.getResolver(e)}catch(n){if(n.code!==y.Logger.errors.CALL_EXCEPTION)throw n;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return A.throwError(e+" not implemented",y.Logger.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new P(E(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ne.tag!==a||(setTimeout((()=>{e.listener.apply(this,r)}),0),i=!0,!e.once||(o.push(e),!1)))),o.forEach((e=>{this._stopEvent(e)})),i}listenerCount(e){if(!e)return this._events.length;let t=E(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=E(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,i=E(e);return this._events=this._events.filter((e=>e.tag!==i||e.listener!=t||(!!n||(n=!0,r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=E(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}},6928:(e,t,r)=>{"use strict";r.d(t,{ZA:()=>f,fw:()=>d,ws:()=>h,Zd:()=>m});var n=r(708),i=r(2151),o=r(4593);var a=r(8839),s=r(31),u=r(6376),l=r(658);const c=new u.Logger(l.r);class f{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),s=this.hex.bind(this),u=this.number.bind(this),l=this.type.bind(this);return e.transaction={hash:o,type:l,accessList:f.allowNull(this.accessList.bind(this),null),blockHash:f.allowNull(o,null),blockNumber:f.allowNull(u,null),transactionIndex:f.allowNull(u,null),confirmations:f.allowNull(u,null),from:t,gasPrice:f.allowNull(r),maxPriorityFeePerGas:f.allowNull(r),maxFeePerGas:f.allowNull(r),gasLimit:r,to:f.allowNull(t,null),value:r,nonce:u,data:i,r:f.allowNull(this.uint256),s:f.allowNull(this.uint256),v:f.allowNull(u),creates:f.allowNull(t,null),raw:f.allowNull(i)},e.transactionRequest={from:f.allowNull(t),nonce:f.allowNull(u),gasLimit:f.allowNull(r),gasPrice:f.allowNull(r),maxPriorityFeePerGas:f.allowNull(r),maxFeePerGas:f.allowNull(r),to:f.allowNull(t),value:f.allowNull(r),data:f.allowNull((e=>this.data(e,!0))),type:f.allowNull(u),accessList:f.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:o,address:t,topics:f.arrayOf(o),data:i,logIndex:u,blockHash:o},e.receipt={to:f.allowNull(this.address,null),from:f.allowNull(this.address,null),contractAddress:f.allowNull(t,null),transactionIndex:u,root:f.allowNull(s),gasUsed:r,logsBloom:f.allowNull(i),blockHash:o,transactionHash:o,logs:f.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:f.allowNull(u,null),cumulativeGasUsed:r,effectiveGasPrice:f.allowNull(r),status:f.allowNull(u),type:l},e.block={hash:f.allowNull(o),parentHash:o,number:u,timestamp:u,nonce:f.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:f.allowNull(t),extraData:i,transactions:f.allowNull(f.arrayOf(o)),baseFeePerGas:f.allowNull(r)},e.blockWithTransactions=(0,a.shallowCopy)(e.block),e.blockWithTransactions.transactions=f.allowNull(f.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:f.allowNull(n,void 0),toBlock:f.allowNull(n,void 0),blockHash:f.allowNull(o,void 0),address:f.allowNull(t,void 0),topics:f.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:f.allowNull(u),blockHash:f.allowNull(o),transactionIndex:u,removed:f.allowNull(this.boolean.bind(this)),address:t,data:f.allowFalsish(i,"0x"),topics:f.arrayOf(o),transactionHash:o,logIndex:u},e}accessList(e){return(0,s.accessListify)(e||[])}number(e){return"0x"===e?0:i.gH.from(e).toNumber()}type(e){return"0x"===e||null==e?0:i.gH.from(e).toNumber()}bigNumber(e){return i.gH.from(e)}boolean(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)}hex(e,t){return"string"===typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,o.isHexString)(e))?e.toLowerCase():c.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return(0,n.getAddress)(e)}callAddress(e){if(!(0,o.isHexString)(e,32))return null;const t=(0,n.getAddress)((0,o.hexDataSlice)(e,12));return"0x0000000000000000000000000000000000000000"===t?null:t}contractAddress(e){return(0,n.getContractAddress)(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"===typeof e||(0,o.isHexString)(e))return(0,o.hexValue)(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==(0,o.hexDataLength)(r)?c.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=i.gH.from(e);try{return t.toNumber()}catch(r){}return null}uint256(e){if(!(0,o.isHexString)(e))throw new Error("invalid uint256");return(0,o.hexZeroPad)(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=f.check(t,e);return n._difficulty=null==r?null:i.gH.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return f.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&i.gH.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=f.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;(0,o.isHexString)(r)&&(r=i.gH.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),(0,o.isHexString)(r)&&(r=i.gH.from(r).toNumber()),"number"!==typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!==typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return(0,s.parse)(e)}receiptLog(e){return f.check(this.formats.receiptLog,e)}receipt(e){const t=f.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=i.gH.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&c.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):c.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&c.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return f.check(this.formats.filter,e)}filterLog(e){return f.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const i in e)try{const n=e[i](t[i]);void 0!==n&&(r[i]=n)}catch(n){throw n.checkKey=i,n.checkValue=t[i],n}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}function d(e){return e&&"function"===typeof e.isCommunityResource}function h(e){return d(e)&&e.isCommunityResource()}let p=!1;function m(){p||(p=!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("=========================="))}},1947:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AlchemyProvider:()=>E,AlchemyWebSocketProvider:()=>k,AnkrProvider:()=>P,BaseProvider:()=>o.DJ,CloudflareProvider:()=>U,EtherscanProvider:()=>H,FallbackProvider:()=>ie,Formatter:()=>s.ZA,InfuraProvider:()=>le,InfuraWebSocketProvider:()=>ue,IpcProvider:()=>oe,JsonRpcBatchProvider:()=>ce,JsonRpcProvider:()=>l.F,JsonRpcSigner:()=>l.c,NodesmithProvider:()=>de,PocketProvider:()=>me,Provider:()=>n.Kq,Resolver:()=>o.xR,StaticJsonRpcProvider:()=>v,UrlJsonRpcProvider:()=>w,Web3Provider:()=>ve,WebSocketProvider:()=>g,getDefaultProvider:()=>Ae,getNetwork:()=>i.N,isCommunityResourcable:()=>s.fw,isCommunityResource:()=>s.ws,showThrottleMessage:()=>s.Zd});var n=r(5864),i=r(6057),o=r(8664),a=r(8839),s=r(6928),u=r(2151),l=r(6255),c=r(6376),f=r(658);let d=null;try{if(d=WebSocket,null==d)throw new Error("inject please")}catch(xe){const e=new c.Logger(f.r);d=function(){e.throwError("WebSockets not supported in this environment",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}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())}))};const p=new c.Logger(f.r);let m=1;class g extends l.F{constructor(e,t){"any"===t&&p.throwError("WebSocketProvider does not support 'any' network yet",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"===typeof e?e:"_websocket",t),this._pollingInterval=-1,this._wsReady=!1,"string"===typeof e?(0,a.defineReadOnly)(this,"_websocket",new d(this.connection.url)):(0,a.defineReadOnly)(this,"_websocket",e),(0,a.defineReadOnly)(this,"_requests",{}),(0,a.defineReadOnly)(this,"_subs",{}),(0,a.defineReadOnly)(this,"_subIds",{}),(0,a.defineReadOnly)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((e=>{this.websocket.send(this._requests[e].payload)}))},this.websocket.onmessage=e=>{const t=e.data,r=JSON.parse(t);if(null!=r.id){const e=String(r.id),n=this._requests[e];if(delete this._requests[e],void 0!==r.result)n.callback(null,r.result),this.emit("debug",{action:"response",request:JSON.parse(n.payload),response:r.result,provider:this});else{let e=null;r.error?(e=new Error(r.error.message||"unknown error"),(0,a.defineReadOnly)(e,"code",r.error.code||null),(0,a.defineReadOnly)(e,"response",t)):e=new Error("unknown error"),n.callback(e,void 0),this.emit("debug",{action:"response",error:e,request:JSON.parse(n.payload),provider:this})}}else if("eth_subscription"===r.method){const e=this._subs[r.params.subscription];e&&e.processFunc(r.params.result)}else console.warn("this should not happen")};const r=setInterval((()=>{this.emit("poll")}),1e3);r.unref&&r.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){p.throwError("cannot reset events block on WebSocketProvider",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){p.throwError("cannot set polling interval on WebSocketProvider",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return h(this,void 0,void 0,(function*(){return null}))}set polling(e){e&&p.throwError("cannot set polling on WebSocketProvider",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){const r=m++;return new Promise(((n,i)=>{const o=JSON.stringify({method:e,params:t,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(r)]={callback:function(e,t){return e?i(e):n(t)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,r){return h(this,void 0,void 0,(function*(){let n=this._subIds[e];null==n&&(n=Promise.all(t).then((e=>this.send("eth_subscribe",e))),this._subIds[e]=n);const i=yield n;this._subs[i]={tag:e,processFunc:r}}))}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],(e=>{const t=u.gH.from(e.number).toNumber();this._emitted.block=t,this.emit("block",t)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(e=>{this.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(t=>{null==t.removed&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))}));break;case"tx":{const t=e=>{const t=e.hash;this.getTransactionReceipt(t).then((e=>{e&&this.emit(t,e)}))};t(e),this._subscribe("tx",["newHeads"],(e=>{this._events.filter((e=>"tx"===e.type)).forEach(t)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}_stopEvent(e){let t=e.tag;if("tx"===e.type){if(this._events.filter((e=>"tx"===e.type)).length)return;t="tx"}else if(this.listenerCount(e.event))return;const r=this._subIds[t];r&&(delete this._subIds[t],r.then((e=>{this._subs[e]&&(delete this._subs[e],this.send("eth_unsubscribe",[e]))})))}destroy(){return h(this,void 0,void 0,(function*(){this.websocket.readyState===d.CONNECTING&&(yield new Promise((e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}}))),this.websocket.close(1e3)}))}}var y=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())}))};const b=new c.Logger(f.r);class v extends l.F{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return y(this,void 0,void 0,(function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||b.throwError("no network detected",c.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,a.defineReadOnly)(this,"_network",t),this.emit("network",t,null))),t}))}}class w extends v{constructor(e,t){b.checkAbstract(new.target,w),e=(0,a.getStatic)(new.target,"getNetwork")(e),t=(0,a.getStatic)(new.target,"getApiKey")(t);super((0,a.getStatic)(new.target,"getUrl")(e,t),e),"string"===typeof t?(0,a.defineReadOnly)(this,"apiKey",t):null!=t&&Object.keys(t).forEach((e=>{(0,a.defineReadOnly)(this,e,t[e])}))}_startPending(){b.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return b.throwError("API provider does not support signing",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return b.throwError("not implemented; sub-classes must override getUrl",c.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const A=new c.Logger(f.r),x="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class k extends g{constructor(e,t){const r=new E(e,t);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),(0,a.defineReadOnly)(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===x}}class E extends w{static getWebSocketProvider(e,t){return new k(e,t)}static getApiKey(e){return null==e?x:(e&&"string"!==typeof e&&A.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let 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:A.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:(e,r)=>(t===x&&(0,s.Zd)(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===x}}const S=new c.Logger(f.r),_="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function C(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 S.throwArgumentError("unsupported network","name",e)}class P extends w{isCommunityResource(){return this.apiKey===_}static getApiKey(e){return null==e?_:e}static getUrl(e,t){null==t&&(t=_);const r={allowGzip:!0,url:"https://"+C(e.name)+t,throttleCallback:(e,r)=>(t.apiKey===_&&(0,s.Zd)(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}var N=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())}))};const O=new c.Logger(f.r);class U extends w{static getApiKey(e){return null!=e&&O.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let r=null;if("homestead"===e.name)r="https://cloudflare-eth.com/";else O.throwArgumentError("unsupported network","network",arguments[0]);return r}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return N(this,void 0,void 0,(function*(){if("getBlockNumber"===e){return(yield r.perform.call(this,"getBlock",{blockTag:"latest"})).number}return r.perform.call(this,e,t)}))}}var T=r(4593),M=r(31),R=r(5268),I=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())}))};const B=new c.Logger(f.r);function L(e){const t={};for(let r in e){if(null==e[r])continue;let n=e[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?(0,T.hexValue)((0,T.hexlify)(n)):"accessList"===r?"["+(0,M.accessListify)(n).map((e=>'{address:"'.concat(e.address,'",storageKeys:["').concat(e.storageKeys.join('","'),'"]}'))).join(",")+"]":(0,T.hexlify)(n),t[r]=n)}return t}function j(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/)){const 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 F(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){const t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){const t=new Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){const t=new Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function D(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function z(e,t,r){if("call"===e&&t.code===c.Logger.errors.SERVER_ERROR){const e=t.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let r=e.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),(0,T.isHexString)(r))return r;B.throwError("missing revert data in call exception",c.Logger.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let n=t.message;throw t.code===c.Logger.errors.SERVER_ERROR&&(t.error&&"string"===typeof t.error.message?n=t.error.message:"string"===typeof t.body?n=t.body:"string"===typeof t.responseText&&(n=t.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&B.throwError("insufficient funds for intrinsic transaction cost",c.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&B.throwError("nonce has already been used",c.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),n.match(/another transaction with same nonce/)&&B.throwError("replacement fee too low",c.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&B.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",c.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}class H extends o.DJ{constructor(e,t){super(e),(0,a.defineReadOnly)(this,"baseUrl",this.getBaseUrl()),(0,a.defineReadOnly)(this,"apiKey",t||null)}getBaseUrl(){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 B.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){const r=Object.keys(t).reduce(((e,r)=>{const 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)}getPostUrl(){return"".concat(this.baseUrl,"/api")}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,r){return I(this,void 0,void 0,(function*(){const n=r?this.getPostUrl():this.getUrl(e,t),i=r?this.getPostData(e,t):null,o="proxy"===e?F:j;this.emit("debug",{action:"request",request:n,provider:this});const u={url:n,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&(0,s.Zd)(),Promise.resolve(!0))};let l=null;i&&(u.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(i).map((e=>"".concat(e,"=").concat(i[e]))).join("&"));const c=yield(0,R.fetchJson)(u,l,o||F);return this.emit("debug",{action:"response",request:n,response:(0,a.deepCopy)(c),provider:this}),c}))}detectNetwork(){return I(this,void 0,void 0,(function*(){return this.network}))}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return I(this,void 0,void 0,(function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((e=>z("sendTransaction",e,t.signedTransaction)));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if("latest"!==t.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const e=L(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(xe){return z("call",xe,t.transaction)}}case"estimateGas":{const e=L(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(xe){return z("estimateGas",xe,t.transaction)}}case"getLogs":{const e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=D(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=D(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&B.throwError("unsupported topic count",c.Logger.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){const r=t.filter.topics[0];"string"===typeof r&&66===r.length||B.throwError("unsupported topic format",c.Logger.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r}const r=yield this.fetch("logs",e);let n={};for(let t=0;t{["contractAddress","to"].forEach((function(t){""==e[t]&&delete e[t]})),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);const t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t}))}))}isCommunityResource(){return null==this.apiKey}}var q=r(7085),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())}))};const W=new c.Logger(f.r);function V(){return(new Date).getTime()}function G(e){let t=null;for(let r=0;rt?null:(n+i)/2}function J(e){if(null===e)return"null";if("number"===typeof e||"boolean"===typeof e)return JSON.stringify(e);if("string"===typeof e)return e;if(u.gH.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((e=>J(e))));if("object"===typeof e){const t=Object.keys(e);return t.sort(),"{"+t.map((t=>{let r=e[t];return r="function"===typeof r?"[function]":J(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}let Y=1;function X(e){let t=null,r=null,n=new Promise((n=>{t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:e=>(n=n.then(e),n)}}const Z=[c.Logger.errors.CALL_EXCEPTION,c.Logger.errors.INSUFFICIENT_FUNDS,c.Logger.errors.NONCE_EXPIRED,c.Logger.errors.REPLACEMENT_UNDERPRICED,c.Logger.errors.UNPREDICTABLE_GAS_LIMIT],$=["address","args","errorArgs","errorSignature","method","transaction"];function ee(e,t){const r={weight:e.weight};return Object.defineProperty(r,"provider",{get:()=>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 te(e,t,r){let n=J;switch(t){case"getBlockNumber":return function(t){const r=t.map((e=>e.result));let n=Q(t.map((e=>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){const t=e.map((e=>e.result));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return Q(e.map((e=>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=(0,a.shallowCopy)(e)).confirmations=-1,J(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=(0,a.shallowCopy)(e)).transactions=e.transactions.map((e=>((e=(0,a.shallowCopy)(e)).confirmations=-1,e))),J(e))}:function(e){return null==e?null:J(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){const n={};r.forEach((t=>{const r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));const i=Object.keys(n);for(let e=0;e=t)return r.result}}}(n,e.quorum)}function re(e,t){return K(this,void 0,void 0,(function*(){const r=e.provider;return null!=r.blockNumber&&r.blockNumber>=t||-1===t?r:(0,R.poll)((()=>new Promise(((n,i)=>{setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))),{oncePoll:r})}))}function ne(e,t,r,n){return K(this,void 0,void 0,(function*(){let i=e.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&(0,T.isHexString)(n.blockTag)&&(i=yield re(e,t)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&(0,T.isHexString)(n.blockTag)&&(i=yield re(e,t)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&(0,T.isHexString)(n.blockTag)&&(i=yield re(e,t)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&(0,T.isHexString)(n.blockTag)&&(i=yield re(e,t)),"call"===r&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&(0,T.isHexString)(r.fromBlock)||r.toBlock&&(0,T.isHexString)(r.toBlock))&&(i=yield re(e,t)),i.getLogs(r)}}return W.throwError("unknown method error",c.Logger.errors.UNKNOWN_ERROR,{method:r,params:n})}))}class ie extends o.DJ{constructor(e,t){0===e.length&&W.throwArgumentError("missing providers","providers",e);const r=e.map(((e,t)=>{if(n.Kq.isProvider(e)){const t=(0,s.ws)(e)?2e3:750,r=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:r})}const r=(0,a.shallowCopy)(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=(0,s.ws)(e)?2e3:750),null==r.weight&&(r.weight=1);const i=r.weight;return(i%1||i>512||i<1)&&W.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(t,"].weight"),i),Object.freeze(r)})),i=r.reduce(((e,t)=>e+t.weight),0);null==t?t=i/2:t>i&&W.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let o=G(r.map((e=>e.provider.network)));null==o&&(o=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then(e,t)}),0)}))),super(o),(0,a.defineReadOnly)(this,"providerConfigs",Object.freeze(r)),(0,a.defineReadOnly)(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return K(this,void 0,void 0,(function*(){return G(yield Promise.all(this.providerConfigs.map((e=>e.provider.getNetwork()))))}))}perform(e,t){return K(this,void 0,void 0,(function*(){if("sendTransaction"===e){const e=yield Promise.all(this.providerConfigs.map((e=>e.provider.sendTransaction(t.signedTransaction).then((e=>e.hash),(e=>e)))));for(let t=0;te.priority-t.priority));const i=this._highestBlockNumber;let o=0,s=!0;for(;;){const u=V();let l=n.filter((e=>e.runner&&u-e.starte+t.weight),0);for(;l{r.staller=null})),r.runner=ne(r,i,e,t).then((n=>{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:ee(r,V()),request:{method:e,params:(0,a.deepCopy)(t)},provider:this})}),(n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:ee(r,V()),request:{method:e,params:(0,a.deepCopy)(t)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:ee(r,null),request:{method:e,params:(0,a.deepCopy)(t)},provider:this}),l+=r.weight}const c=[];n.forEach((e=>{!e.done&&e.runner&&(c.push(e.runner),e.staller&&c.push(e.staller.getPromise()))})),c.length&&(yield Promise.race(c));const f=n.filter((e=>e.done&&null==e.error));if(f.length>=this.quorum){const e=r(f);if(void 0!==e)return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),e;s||(yield X(100).getPromise()),s=!1}const d=n.reduce(((e,t)=>{if(!t.done||null==t.error)return e;const r=t.error.code;return Z.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{});if(Object.keys(d).forEach((e=>{const t=d[e];if(t.weight{e.staller&&e.staller.cancel(),e.cancelled=!0}));const r=t.error,i={};$.forEach((e=>{null!=r[e]&&(i[e]=r[e])})),W.throwError(r.reason||r.message,e,i)})),0===n.filter((e=>!e.done)).length)break}return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),W.throwError("failed to meet quorum",c.Logger.errors.SERVER_ERROR,{method:e,params:t,results:n.map((e=>ee(e))),provider:this})}))}}const oe=null,ae=new c.Logger(f.r),se="84842078b09946638c03157f83405213";class ue extends g{constructor(e,t){const r=new le(e,t),n=r.connection;n.password&&ae.throwError("INFURA WebSocket project secrets unsupported",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});super(n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),e),(0,a.defineReadOnly)(this,"apiKey",r.projectId),(0,a.defineReadOnly)(this,"projectId",r.projectId),(0,a.defineReadOnly)(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===se}}class le extends w{static getWebSocketProvider(e,t){return new ue(e,t)}static getApiKey(e){const t={apiKey:se,projectId:se,projectSecret:null};return null==e||("string"===typeof e?t.projectId=e:null!=e.projectSecret?(ae.assertArgument("string"===typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),ae.assertArgument("string"===typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:ae.throwError("unsupported network",c.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===se&&(0,s.Zd)(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}isCommunityResource(){return this.projectId===se}}class ce extends l.F{send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const n={request:r,resolve:null,reject:null},i=new Promise(((e,t)=>{n.resolve=e,n.reject=t}));return this._pendingBatch.push(n),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const t=e.map((e=>e.request));return this.emit("debug",{action:"requestBatch",request:(0,a.deepCopy)(t),provider:this}),(0,R.fetchJson)(this.connection,JSON.stringify(t)).then((r=>{this.emit("debug",{action:"response",request:t,response:r,provider:this}),e.forEach(((e,t)=>{const n=r[t];if(n.error){const t=new Error(n.error.message);t.code=n.error.code,t.data=n.error.data,e.reject(t)}else e.resolve(n.result)}))}),(r=>{this.emit("debug",{action:"response",error:r,request:t,provider:this}),e.forEach((e=>{e.reject(r)}))}))}),10)),i}}const fe=new c.Logger(f.r);class de extends w{static getApiKey(e){return e&&"string"!==typeof e&&fe.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){fe.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:fe.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}const he=new c.Logger(f.r),pe="62e1ad51b37b8e00394bda3b";class me extends w{static getApiKey(e){const t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=pe:"string"===typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:he.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:he.throwError("unsupported network",c.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={headers:{},url:"https://".concat(r,"/v1/lb/").concat(t.applicationId)};return null!=t.applicationSecretKey&&(n.user="",n.password=t.applicationSecretKey),n}isCommunityResource(){return this.applicationId===pe}}const ge=new c.Logger(f.r);let ye=1;function be(e,t){const r="Web3LegacyFetcher";return function(e,n){const i={method:e,params:n,id:ye++,jsonrpc:"2.0"};return new Promise(((e,n)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,a.deepCopy)(i),provider:this}),t(i,((t,o)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:i,provider:this}),n(t);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:o,provider:this}),o.error){const e=new Error(o.error.message);return e.code=o.error.code,e.data=o.error.data,n(e)}e(o.result)}))}))}}class ve extends l.F{constructor(e,t){null==e&&ge.throwArgumentError("missing provider","provider",e);let r=null,n=null,i=null;"function"===typeof e?(r="unknown:",n=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),i=e,e.request?(""===r&&(r="eip-1193:"),n=function(e){return function(t,r){null==r&&(r=[]);const n={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,a.deepCopy)(n),provider:this}),e.request(n).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:e,provider:this}),e}))}}(e)):e.sendAsync?n=be(0,e.sendAsync.bind(e)):e.send?n=be(0,e.send.bind(e)):ge.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),(0,a.defineReadOnly)(this,"jsonRpcFetchFunc",n),(0,a.defineReadOnly)(this,"provider",i)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}const we=new c.Logger(f.r);function Ae(e,t){if(null==e&&(e="homestead"),"string"===typeof e){const t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1].toLowerCase()){case"http":case"https":return new l.F(e);case"ws":case"wss":return new g(e);default:we.throwArgumentError("unsupported URL scheme","network",e)}}const r=(0,i.N)(e);return r&&r._defaultProvider||we.throwError("unsupported getDefaultProvider network",c.Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:ie,AlchemyProvider:E,AnkrProvider:P,CloudflareProvider:U,EtherscanProvider:H,InfuraProvider:le,JsonRpcProvider:l.F,NodesmithProvider:de,PocketProvider:me,Web3Provider:ve,IpcProvider:oe},t)}},6255:(e,t,r)=>{"use strict";r.d(t,{F:()=>_,c:()=>k});var n=r(2493),i=r(2151),o=r(4593),a=r(8076),s=r(8839),u=r(8523),l=r(31),c=r(5268),f=r(6376),d=r(658),h=r(8664),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())}))};const m=new f.Logger(d.r),g=["call","estimateGas"];function y(e,t){if(null==e)return null;if("string"===typeof e.message&&e.message.match("reverted")){const r=(0,o.isHexString)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"===typeof e){for(const r in e){const n=y(e[r],t);if(n)return n}return null}if("string"===typeof e)try{return y(JSON.parse(e),t)}catch(r){}return null}function b(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=y(t,!0);if(e)return e.data;m.throwError("missing revert data in call exception; Transaction reverted without a reason string",f.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=y(t.body,!1);null==r&&(r=y(t,!1)),r&&m.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",f.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===f.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(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&m.throwError("insufficient funds for intrinsic transaction cost",f.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&m.throwError("nonce has already been used",f.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&m.throwError("replacement fee too low",f.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&m.throwError("legacy pre-eip-155 transactions not supported",f.Logger.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),g.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&m.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",f.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function v(e){return new Promise((function(t){setTimeout(t,e)}))}function w(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function A(e){return e?e.toLowerCase():e}const x={};class k extends n.l{constructor(e,t,r){if(super(),e!==x)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,s.defineReadOnly)(this,"provider",t),null==r&&(r=0),"string"===typeof r?((0,s.defineReadOnly)(this,"_address",this.provider.formatter.address(r)),(0,s.defineReadOnly)(this,"_index",null)):"number"===typeof r?((0,s.defineReadOnly)(this,"_index",r),(0,s.defineReadOnly)(this,"_address",null)):m.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return m.throwError("cannot alter JSON-RPC Signer connection",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new E(x,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&m.throwError("unknown account #"+this._index,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=(0,s.shallowCopy)(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=(0,s.shallowCopy)(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>p(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&m.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),(0,s.resolveProperties)({tx:(0,s.resolveProperties)(e),sender:t}).then((t=>{let{tx:r,sender:n}=t;null!=r.from?r.from.toLowerCase()!==n&&m.throwArgumentError("from address mismatch","transaction",e):r.from=n;const i=this.provider.constructor.hexlifyTransaction(r,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then((e=>e),(e=>("string"===typeof e.message&&e.message.match(/user denied/i)&&m.throwError("user rejected transaction",f.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:r}),b("sendTransaction",e,i))))}))}signTransaction(e){return m.throwError("signing transactions is unsupported",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return p(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield(0,c.poll)((()=>p(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(n){throw n.transactionHash=r,n}}))}signMessage(e){return p(this,void 0,void 0,(function*(){const t="string"===typeof e?(0,u.YW)(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,o.hexlify)(t),r.toLowerCase()])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&m.throwError("user rejected signing",f.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),n}}))}_legacySignMessage(e){return p(this,void 0,void 0,(function*(){const t="string"===typeof e?(0,u.YW)(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,o.hexlify)(t)])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&m.throwError("user rejected signing",f.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),n}}))}_signTypedData(e,t,r){return p(this,void 0,void 0,(function*(){const n=yield a.z.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(a.z.getPayload(n.domain,t,n.value))])}catch(o){throw"string"===typeof o.message&&o.message.match(/user denied/i)&&m.throwError("user rejected signing",f.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),o}}))}unlock(e){return p(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class E extends k{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const S={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class _ extends h.DJ{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=(0,s.getStatic)(this.constructor,"defaultUrl")()),"string"===typeof e?(0,s.defineReadOnly)(this,"connection",Object.freeze({url:e})):(0,s.defineReadOnly)(this,"connection",Object.freeze((0,s.shallowCopy)(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return p(this,void 0,void 0,(function*(){yield v(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(t){}}if(null!=e){const r=(0,s.getStatic)(this.constructor,"getNetwork");try{return r(i.gH.from(e).toNumber())}catch(t){return m.throwError("could not detect network",f.Logger.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return m.throwError("could not detect network",f.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new k(x,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,s.deepCopy)(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const i=(0,c.fetchJson)(this.connection,JSON.stringify(r),w).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=i,setTimeout((()=>{this._cache[e]=null}),0)),i}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[A(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[A(t.address),t.blockTag]];case"getCode":return["eth_getCode",[A(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[A(t.address),(0,o.hexZeroPad)(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",[(0,s.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,s.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=A(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return p(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&i.gH.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=(0,s.shallowCopy)(t)).transaction=(0,s.shallowCopy)(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&m.throwError(e+" not implemented",f.Logger.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(n){return b(e,n,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const 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;let 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 v(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=(0,s.shallowCopy)(S);if(t)for(const i in t)t[i]&&(r[i]=!0);(0,s.checkProperties)(e,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=(0,o.hexValue)(i.gH.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(n[t]=(0,o.hexlify)(e[t]))})),e.accessList&&(n.accessList=(0,l.accessListify)(e.accessList)),n}}},340:(e,t,r)=>{"use strict";r.r(t),r.d(t,{randomBytes:()=>n.p,shuffled:()=>i.A});var n=r(9531),i=r(7085)},9531:(e,t,r)=>{"use strict";r.d(t,{p:()=>u});var n=r(4593),i=r(6376);const o=new i.Logger("random/5.7.0");const a=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof r.g)return r.g;throw new Error("unable to locate global object")}();let s=a.crypto||a.msCrypto;function u(e){(e<=0||e>1024||e%1||e!=e)&&o.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return s.getRandomValues(t),(0,n.arrayify)(t)}s&&s.getRandomValues||(o.warn("WARNING: Missing strong random number source"),s={getRandomValues:function(e){return o.throwError("no secure random source avaialble",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},7085:(e,t,r)=>{"use strict";function n(e){for(let t=(e=e.slice()).length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}r.d(t,{A:()=>n})},1742:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>d,encode:()=>l});var n=r(4593),i=r(6376);const o=new i.Logger("rlp/5.7.0");function a(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function s(e,t,r){let n=0;for(let 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){const r=e[t]-247;t+1+r>e.length&&o.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});const n=s(e,t+1,r);return t+1+r+n>e.length&&o.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});const a=s(e,t+1,r);t+1+r+a>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r+a,result:(0,n.hexlify)(e.slice(t+1+r,t+1+r+a))}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:(0,n.hexlify)(e.slice(t+1,t+1+r))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}function d(e){const t=(0,n.arrayify)(e),r=f(t,0);return r.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),r.result}},5191:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SupportedAlgorithm:()=>i.q,computeHmac:()=>n.L5,ripemd160:()=>n.HE,sha256:()=>n.sc,sha512:()=>n.Zf});var n=r(7260),i=r(6910)},7260:(e,t,r)=>{"use strict";r.d(t,{L5:()=>d,HE:()=>l,sc:()=>c,Zf:()=>f});var n=r(9166),i=r.n(n),o=r(4593),a=r(6910),s=r(6376);const u=new s.Logger("sha2/5.7.0");function l(e){return"0x"+i().ripemd160().update((0,o.arrayify)(e)).digest("hex")}function c(e){return"0x"+i().sha256().update((0,o.arrayify)(e)).digest("hex")}function f(e){return"0x"+i().sha512().update((0,o.arrayify)(e)).digest("hex")}function d(e,t,r){return a.q[e]||u.throwError("unsupported algorithm "+e,s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+i().hmac(i()[e],(0,o.arrayify)(t)).update((0,o.arrayify)(r)).digest("hex")}},6910:(e,t,r)=>{"use strict";var n;r.d(t,{q:()=>n}),function(e){e.sha256="sha256",e.sha512="sha512"}(n||(n={}))},724:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SigningKey:()=>Q,computePublicKey:()=>Y,recoverPublicKey:()=>J});var n=r(2914),i=r.n(n),o=r(9166),a=r.n(o);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:"undefined"!==typeof self&&self;function s(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===t||null===t)&&r.path)}},e(r,r.exports),r.exports}var u=l;function l(e,t){if(!e)throw new Error(t||"Assertion failed")}l.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var c=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}})),f=s((function(e,t){var r=t;r.assert=u,r.toArray=c.toArray,r.zero2=c.zero2,r.toHex=c.toHex,r.encode=c.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,l=t.andln(3)+o&3;3===u&&(u=-1),3===l&&(l=-1),a=0===(1&u)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==l?u:-u,r[0].push(a),s=0===(1&l)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?l:-l,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())(e,"hex","le")}})),d=f.getNAF,h=f.getJSF,p=f.assert;function m(e,t){this.type=e,this.p=new(i())(t.p,16),this.red=t.prime?i().red(t.prime):i().mont(this.p),this.zero=new(i())(0).toRed(this.red),this.one=new(i())(1).toRed(this.red),this.two=new(i())(2).toRed(this.red),this.n=t.n&&new(i())(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 g=m;function y(e,t){this.curve=e,this.type=t,this.precomputed=null}m.prototype.point=function(){throw new Error("Not implemented")},m.prototype.validate=function(){throw new Error("Not implemented")},m.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=d(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+n[u];s.push(a)}for(var l=this.jpoint(null,null,null),c=this.jpoint(null,null,null),f=i;f>0;f--){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 l=o[s];p(0!==l),a="affine"===e.type?l>0?a.mixedAdd(i[l-1>>1]):a.mixedAdd(i[-l-1>>1].neg()):l>0?a.add(i[l-1>>1]):a.add(i[-l-1>>1].neg())}return"affine"===e.type?a.toP():a},m.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,u=this._wnafT1,l=this._wnafT2,c=this._wnafT3,f=0;for(o=0;o=1;o-=2){var m=o-1,g=o;if(1===u[m]&&1===u[g]){var y=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(y[1]=t[m].add(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].add(t[g].neg())):(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=h(r[m],r[g]);for(f=Math.max(v[0].length,f),c[m]=new Array(f),c[g]=new Array(f),a=0;a=0;o--){for(var E=0;o>=0;){var S=!0;for(a=0;a=0&&E++,x=x.dblp(E),o<0)break;for(a=0;a0?s=l[a][_-1>>1]:_<0&&(s=l[a][-_-1>>1].neg()),x="affine"===s.type?x.mixedAdd(s):x.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},y.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),l=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(l).neg()}},w.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)},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())(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(k,g.BasePoint),w.prototype.jpoint=function(e,t,r){return new k(this,e,t,r)},k.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)},k.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},k.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 l=s.redSqr(),c=l.redMul(s),f=n.redMul(l),d=u.redSqr().redIAdd(c).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},k.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(),l=u.redMul(a),c=r.redMul(u),f=s.redSqr().redIAdd(l).redISub(c).redISub(c),d=s.redMul(c.redISub(f)).redISub(i.redMul(l)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},k.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}},k.prototype.inspect=function(){return this.isInfinity()?"":""},k.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var E=s((function(e,t){var r=t;r.base=g,r.short=A,r.mont=null,r.edwards=null})),S=s((function(e,t){var r,n=t,i=f.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().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().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().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().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().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().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().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().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function _(e){if(!(this instanceof _))return new _(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=c.toArray(e.entropy,e.entropyEnc||"hex"),r=c.toArray(e.nonce,e.nonceEnc||"hex"),n=c.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 C=_;_.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},_.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=c.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var U=f.assert;function T(e,t){if(e instanceof T)return e;this._importDER(e,t)||(U(e.r&&e.s,"Signature without r or s"),this.r=new(i())(e.r,16),this.s=new(i())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var M=T;function R(){this.place=0}function I(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 B(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)}}T.prototype._importDER=function(e,t){e=f.toArray(e,t);var r=new R;if(48!==e[r.place++])return!1;var n=I(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=I(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=I(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),this.s=new(i())(u),this.recoveryParam=null,!0},T.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=B(t),r=B(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];L(n,t.length),(n=n.concat(t)).push(2),L(n,r.length);var i=n.concat(r),o=[48];return L(o,i.length),o=o.concat(i),f.encode(o,e)};var j=function(){throw new Error("unsupported")},F=f.assert;function D(e){if(!(this instanceof D))return new D(e);"string"===typeof e&&(F(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}var z=D;D.prototype.keyPair=function(e){return new O(this,e)},D.prototype.keyFromPrivate=function(e,t){return O.fromPrivate(this,e,t)},D.prototype.keyFromPublic=function(e,t){return O.fromPublic(this,e,t)},D.prototype.genKeyPair=function(e){e||(e={});for(var t=new C({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||j(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 o=new(i())(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},D.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},D.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())(e,16));for(var o=this.n.byteLength(),a=t.getPrivate().toArray("be",o),s=e.toArray("be",o),u=new C({hash:this.hash,entropy:a,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new(i())(1)),c=0;;c++){var f=n.k?n.k(c):new(i())(u.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(l)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var m=f.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(d.getY().isOdd()?1:0)|(0!==h.cmp(p)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new M({r:p,s:m,recoveryParam:g})}}}}}},D.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(i())(e,16)),r=this.keyFromPublic(r,n);var o=(t=new M(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),l=u.mul(e).umod(this.n),c=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(l,r.getPublic(),c)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(l,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},D.prototype.recoverPubKey=function(e,t,r,n){F((3&r)===r,"The recovery param is more than two bits"),t=new M(t,n);var o=this.n,a=new(i())(e),s=t.r,u=t.s,l=1&r,c=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");s=c?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var f=t.r.invm(o),d=o.sub(a).mul(f).umod(o),h=u.mul(f).umod(o);return this.g.mulAdd(d,s,h)},D.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new M(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=f,r.rand=function(){throw new Error("unsupported")},r.curve=E,r.curves=S,r.ec=z,r.eddsa=null})).ec,q=r(4593),K=r(8839);const W=new(r(6376).Logger)("signing-key/5.7.0");let V=null;function G(){return V||(V=new H("secp256k1")),V}class Q{constructor(e){(0,K.defineReadOnly)(this,"curve","secp256k1"),(0,K.defineReadOnly)(this,"privateKey",(0,q.hexlify)(e)),32!==(0,q.hexDataLength)(this.privateKey)&&W.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=G().keyFromPrivate((0,q.arrayify)(this.privateKey));(0,K.defineReadOnly)(this,"publicKey","0x"+t.getPublic(!1,"hex")),(0,K.defineReadOnly)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),(0,K.defineReadOnly)(this,"_isSigningKey",!0)}_addPoint(e){const t=G().keyFromPublic((0,q.arrayify)(this.publicKey)),r=G().keyFromPublic((0,q.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=G().keyFromPrivate((0,q.arrayify)(this.privateKey)),r=(0,q.arrayify)(e);32!==r.length&&W.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return(0,q.splitSignature)({recoveryParam:n.recoveryParam,r:(0,q.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,q.hexZeroPad)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=G().keyFromPrivate((0,q.arrayify)(this.privateKey)),r=G().keyFromPublic((0,q.arrayify)(Y(e)));return(0,q.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function J(e,t){const r=(0,q.splitSignature)(t),n={r:(0,q.arrayify)(r.r),s:(0,q.arrayify)(r.s)};return"0x"+G().recoverPubKey((0,q.arrayify)(e),n,r.recoveryParam).encode("hex",!1)}function Y(e,t){const r=(0,q.arrayify)(e);if(32===r.length){const e=new Q(r);return t?"0x"+G().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,q.hexlify)(r):"0x"+G().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+G().keyFromPublic(r).getPublic(!0,"hex"):(0,q.hexlify)(r):W.throwArgumentError("invalid public or private key","key","[REDACTED]")}},6035:(e,t,r)=>{"use strict";r.r(t),r.d(t,{keccak256:()=>g,pack:()=>m,sha256:()=>y});var n=r(2151),i=r(4593),o=r(5172),a=r(7260),s=r(8523),u=r(6376);const l=new RegExp("^bytes([0-9]+)$"),c=new RegExp("^(u?int)([0-9]*)$"),f=new RegExp("^(.*)\\[([0-9]*)\\]$"),d="0000000000000000000000000000000000000000000000000000000000000000",h=new u.Logger("solidity/5.7.0");function p(e,t,r){switch(e){case"address":return r?(0,i.zeroPad)(t,32):(0,i.arrayify)(t);case"string":return(0,s.YW)(t);case"bytes":return(0,i.arrayify)(t);case"bool":return t=t?"0x01":"0x00",r?(0,i.zeroPad)(t,32):(0,i.arrayify)(t)}let o=e.match(c);if(o){let a=parseInt(o[2]||"256");return(o[2]&&String(a)!==o[2]||a%8!==0||0===a||a>256)&&h.throwArgumentError("invalid number type","type",e),r&&(a=256),t=n.gH.from(t).toTwos(a),(0,i.zeroPad)(t,a/8)}if(o=e.match(l),o){const n=parseInt(o[1]);return(String(n)!==o[1]||0===n||n>32)&&h.throwArgumentError("invalid bytes type","type",e),(0,i.arrayify)(t).byteLength!==n&&h.throwArgumentError("invalid value for ".concat(e),"value",t),r?(0,i.arrayify)((t+d).substring(0,66)):t}if(o=e.match(f),o&&Array.isArray(t)){const r=o[1];parseInt(o[2]||String(t.length))!=t.length&&h.throwArgumentError("invalid array length for ".concat(e),"value",t);const n=[];return t.forEach((function(e){n.push(p(r,e,!0))})),(0,i.concat)(n)}return h.throwArgumentError("invalid type","type",e)}function m(e,t){e.length!=t.length&&h.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(p(e,t[n]))})),(0,i.hexlify)((0,i.concat)(r))}function g(e,t){return(0,o.keccak256)(m(e,t))}function y(e,t){return(0,a.sc)(m(e,t))}},4223:(e,t,r)=>{"use strict";r.r(t),r.d(t,{UnicodeNormalizationForm:()=>o.dz,Utf8ErrorFuncs:()=>o.d5,Utf8ErrorReason:()=>o._E,_toEscapedUtf8String:()=>o.Wj,formatBytes32String:()=>a,nameprep:()=>b,parseBytes32String:()=>s,toUtf8Bytes:()=>o.YW,toUtf8CodePoints:()=>o.dg,toUtf8String:()=>o._v});var n=r(1660),i=r(4593),o=r(8523);function a(e){const t=(0,o.YW)(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.j]).slice(0,32))}function s(e){const 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");let r=31;for(;0===t[r-1];)r--;return(0,o._v)(t.slice(0,r))}function u(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach((e=>{let i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function l(e){let t=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=t+parseInt(r[0],16);return t=parseInt(r[1],16),{l:n,h:t}}))}function c(e,t){let r=0;for(let n=0;n=r&&e<=r+i.h&&(e-r)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}const f=l("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"),d="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),h=[{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}],p=u("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"),m=u("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"),g=u("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");let t=[];for(let r=0;r{if(d.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=c(e,h);if(t)return[e+t.s];let r=p[e];if(r)return r;let n=m[e];return n?[e+n[0]]:g[e]||null}(e);return t||[e]})),t=r.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=(0,o.dg)((0,o.H5)(t),o.dz.NFKC),t.forEach((e=>{if(c(e,y))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(c(e,f))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=(0,o.H5)(t);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}},8523:(e,t,r)=>{"use strict";r.d(t,{dz:()=>o,d5:()=>u,_E:()=>a,Wj:()=>d,H5:()=>h,YW:()=>c,dg:()=>m,_v:()=>p});var n=r(4593);const i=new(r(6376).Logger)("strings/5.7.0");var o,a;function s(e,t,r,n,i){if(e===a.BAD_PREFIX||e===a.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6===2;n++)e++;return e}return e===a.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(o||(o={})),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"}(a||(a={}));const u=Object.freeze({error:function(e,t,r,n,o){return i.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:s,replace:function(e,t,r,n,i){return e===a.OVERLONG?(n.push(i),0):(n.push(65533),s(e,t,r))}});function l(e,t){null==t&&(t=u.error),e=(0,n.arrayify)(e);const r=[];let i=0;for(;i>7===0){r.push(n);continue}let o=null,s=null;if(192===(224&n))o=1,s=127;else if(224===(240&n))o=2,s=2047;else{if(240!==(248&n)){i+=t(128===(192&n)?a.UNEXPECTED_CONTINUE:a.BAD_PREFIX,i-1,e,r);continue}o=3,s=65535}if(i-1+o>=e.length){i+=t(a.OVERRUN,i-1,e,r);continue}let u=n&(1<<8-o-1)-1;for(let l=0;l1114111?i+=t(a.OUT_OF_RANGE,i-1-o,e,r,u):u>=55296&&u<=57343?i+=t(a.UTF16_SURROGATE,i-1-o,e,r,u):u<=s?i+=t(a.OVERLONG,i-1-o,e,r,u):r.push(u))}return r}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.current;t!=o.current&&(i.checkNormalize(),e=e.normalize(t));let r=[];for(let n=0;n>6|192),r.push(63&t|128);else if(55296==(64512&t)){n++;const i=e.charCodeAt(n);if(n>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&t)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(t>>12|224),r.push(t>>6&63|128),r.push(63&t|128)}return(0,n.arrayify)(r)}function f(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function d(e,t){return'"'+l(e,t).map((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?f(e):f(55296+((e-=65536)>>10&1023))+f(56320+(1023&e))})).join("")+'"'}function h(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function p(e,t){return h(l(e,t))}function m(e){return l(c(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.current))}},31:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TransactionTypes:()=>h,accessListify:()=>x,computeAddress:()=>b,parse:()=>P,recoverAddress:()=>v,serialize:()=>_});var n=r(708),i=r(2151),o=r(4593),a=r(3988),s=r(5172),u=r(8839),l=r(1742),c=r(724),f=r(6376);const d=new f.Logger("transactions/5.7.0");var h;function p(e){return"0x"===e?null:(0,n.getAddress)(e)}function m(e){return"0x"===e?a.XK:i.gH.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(h||(h={}));const g=[{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 b(e){const t=(0,c.computePublicKey)(e);return(0,n.getAddress)((0,o.hexDataSlice)((0,s.keccak256)((0,o.hexDataSlice)(t,1)),12))}function v(e,t){return b((0,c.recoverPublicKey)((0,o.arrayify)(e),t))}function w(e,t){const r=(0,o.stripZeros)(i.gH.from(e).toHexString());return r.length>32&&d.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function A(e,t){return{address:(0,n.getAddress)(e),storageKeys:(t||[]).map(((t,r)=>(32!==(0,o.hexDataLength)(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(((e,t)=>Array.isArray(e)?(e.length>2&&d.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),A(e[0],e[1])):A(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return A(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function k(e){return x(e).map((e=>[e.address,e.storageKeys]))}function E(e,t){if(null!=e.gasPrice){const t=i.gH.from(e.gasPrice),r=i.gH.from(e.maxFeePerGas||0);t.eq(r)||d.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[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?(0,n.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",k(e.accessList||[])];if(t){const e=(0,o.splitSignature)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(e.r)),r.push((0,o.stripZeros)(e.s))}return(0,o.hexConcat)(["0x02",l.encode(r)])}function S(e,t){const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",k(e.accessList||[])];if(t){const e=(0,o.splitSignature)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(e.r)),r.push((0,o.stripZeros)(e.s))}return(0,o.hexConcat)(["0x01",l.encode(r)])}function _(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){(0,u.checkProperties)(e,y);const r=[];g.forEach((function(t){let n=e[t.name]||[];const i={};t.numeric&&(i.hexPad="left"),n=(0,o.arrayify)((0,o.hexlify)(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=(0,o.stripZeros)(n),n.length>t.maxLength&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push((0,o.hexlify)(n))}));let n=0;if(null!=e.chainId?(n=e.chainId,"number"!==typeof n&&d.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!(0,o.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,o.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return l.encode(r);const i=(0,o.splitSignature)(t);let a=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),a+=2*n+8,i.v>28&&i.v!==a&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==a&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,o.hexlify)(a)),r.push((0,o.stripZeros)((0,o.arrayify)(i.r))),r.push((0,o.stripZeros)((0,o.arrayify)(i.s))),l.encode(r)}(e,t);switch(e.type){case 1:return S(e,t);case 2:return E(e,t)}return d.throwError("unsupported transaction type: ".concat(e.type),f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function C(e,t,r){try{const r=m(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(n){d.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,o.hexZeroPad)(t[1],32),e.s=(0,o.hexZeroPad)(t[2],32);try{const t=(0,s.keccak256)(r(e));e.from=v(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(n){}}function P(e){const t=(0,o.arrayify)(e);if(t[0]>127)return function(e){const t=l.decode(e);9!==t.length&&6!==t.length&&d.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:m(t[0]).toNumber(),gasPrice:m(t[1]),gasLimit:m(t[2]),to:p(t[3]),value:m(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=i.gH.from(t[6]).toNumber()}catch(n){return r}if(r.r=(0,o.hexZeroPad)(t[7],32),r.s=(0,o.hexZeroPad)(t[8],32),i.gH.from(r.r).isZero()&&i.gH.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);let i=r.v-27;const a=t.slice(0,6);0!==r.chainId&&(a.push((0,o.hexlify)(r.chainId)),a.push("0x"),a.push("0x"),i-=2*r.chainId+8);const u=(0,s.keccak256)(l.encode(a));try{r.from=v(u,{r:(0,o.hexlify)(r.r),s:(0,o.hexlify)(r.s),recoveryParam:i})}catch(n){}r.hash=(0,s.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=l.decode(e.slice(1));8!==t.length&&11!==t.length&&d.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.hexlify)(e));const r={type:1,chainId:m(t[0]).toNumber(),nonce:m(t[1]).toNumber(),gasPrice:m(t[2]),gasLimit:m(t[3]),to:p(t[4]),value:m(t[5]),data:t[6],accessList:x(t[7])};return 8===t.length||(r.hash=(0,s.keccak256)(e),C(r,t.slice(8),S)),r}(t);case 2:return function(e){const t=l.decode(e.slice(1));9!==t.length&&12!==t.length&&d.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.hexlify)(e));const r=m(t[2]),n=m(t[3]),i={type:2,chainId:m(t[0]).toNumber(),nonce:m(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:m(t[4]),to:p(t[5]),value:m(t[6]),data:t[7],accessList:x(t[8])};return 9===t.length||(i.hash=(0,s.keccak256)(e),C(i,t.slice(9),E)),i}(t)}return d.throwError("unsupported transaction type: ".concat(t[0]),f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},407:(e,t,r)=>{"use strict";r.r(t),r.d(t,{commify:()=>x,formatEther:()=>S,formatUnits:()=>k,parseEther:()=>_,parseUnits:()=>E});var n=r(4593),i=r(6376),o=r(3969),a=r(2151);const s=new i.Logger(o.r),u={},l=a.gH.from(0),c=a.gH.from(-1);function f(e,t,r,n){const o={fault:t,operation:r};return void 0!==n&&(o.value=n),s.throwError(e,i.Logger.errors.NUMERIC_FAULT,o)}let d="0";for(;d.length<256;)d+=d;function h(e){if("number"!==typeof e)try{e=a.gH.from(e).toNumber()}catch(t){}return"number"===typeof e&&e>=0&&e<=256&&!(e%1)?"1"+d.substring(0,e):s.throwArgumentError("invalid decimal size","decimals",e)}function p(e,t){null==t&&(t=0);const r=h(t),n=(e=a.gH.from(e)).lt(l);n&&(e=e.mul(c));let i=e.mod(r).toString();for(;i.length2&&s.throwArgumentError("too many decimal points","value",e);let o=i[0],u=i[1];for(o||(o="0"),u||(u="0");"0"===u[u.length-1];)u=u.substring(0,u.length-1);for(u.length>r.length-1&&f("fractional component exceeds decimals","underflow","parseFixed"),""===u&&(u="0");u.lengthnull==e[t]?n:(typeof e[t]!==r&&s.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&s.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&s.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new g(u,t,r,n)}}class y{constructor(e,t,r,n){e!==u&&s.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&s.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=y.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(b.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=y.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(b.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&s.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=y.from("1"+d.substring(0,e),this.format),n=v.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&s.throwArgumentError("invalid byte width","width",e);const t=a.gH.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,n.hexZeroPad)(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return y.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||(0,a.YR)(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),y.fromString(p(e,t),g.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=g.from(t),i=m(e,r.decimals);!r.signed&&i.lt(l)&&f("unsigned value cannot be negative","overflow","value",e);let o=null;r.signed?o=i.toTwos(r.width).toHexString():(o=i.toHexString(),o=(0,n.hexZeroPad)(o,r.width/8));const a=p(i,r.decimals);return new y(u,o,a,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=g.from(t);if((0,n.arrayify)(e).length>r.width/8)throw new Error("overflow");let i=a.gH.from(e);r.signed&&(i=i.fromTwos(r.width));const o=i.toTwos((r.signed?0:1)+r.width).toHexString(),s=p(i,r.decimals);return new y(u,o,s,r)}static from(e,t){if("string"===typeof e)return y.fromString(e,t);if((0,n.isBytes)(e))return y.fromBytes(e,t);try{return y.fromValue(e,0,t)}catch(r){if(r.code!==i.Logger.errors.INVALID_ARGUMENT)throw r}return s.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const b=y.from(1),v=y.from("0.5"),w=new i.Logger("units/5.7.0"),A=["wei","kwei","mwei","gwei","szabo","finney","ether"];function x(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&w.throwArgumentError("invalid value","value",e);let 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");let i="";for(2===t.length&&(i="."+(t[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);const o=[];for(;r.length;){if(r.length<=3){o.unshift(r);break}{const e=r.length-3;o.unshift(r.substring(e)),r=r.substring(0,e)}}return n+o.join(",")+i}function k(e,t){if("string"===typeof t){const e=A.indexOf(t);-1!==e&&(t=3*e)}return p(e,null!=t?t:18)}function E(e,t){if("string"!==typeof e&&w.throwArgumentError("value must be a string","value",e),"string"===typeof t){const e=A.indexOf(t);-1!==e&&(t=3*e)}return m(e,null!=t?t:18)}function S(e){return k(e,18)}function _(e){return E(e,18)}},6195:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Wallet:()=>w,verifyMessage:()=>A,verifyTypedData:()=>x});var n=r(708),i=r(5864),o=r(2493),a=r(4593),s=r(6552),u=r(8076),l=r(5343),c=r(5172),f=r(8839),d=r(9531),h=r(724),p=r(4576),m=r(6623),g=r(31),y=r(6376);var b=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())}))};const v=new y.Logger("wallet/5.7.0");class w extends o.l{constructor(e,t){if(super(),null!=(r=e)&&(0,a.isHexString)(r.privateKey,32)&&null!=r.address){const t=new h.SigningKey(e.privateKey);if((0,f.defineReadOnly)(this,"_signingKey",(()=>t)),(0,f.defineReadOnly)(this,"address",(0,g.computeAddress)(this.publicKey)),this.address!==(0,n.getAddress)(e.address)&&v.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;(0,f.defineReadOnly)(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||l.defaultPath,locale:t.locale||"en"})));const r=this.mnemonic,n=l.HDNode.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);(0,g.computeAddress)(n.privateKey)!==this.address&&v.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,f.defineReadOnly)(this,"_mnemonic",(()=>null))}else{if(h.SigningKey.isSigningKey(e))"secp256k1"!==e.curve&&v.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,f.defineReadOnly)(this,"_signingKey",(()=>e));else{"string"===typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new h.SigningKey(e);(0,f.defineReadOnly)(this,"_signingKey",(()=>t))}(0,f.defineReadOnly)(this,"_mnemonic",(()=>null)),(0,f.defineReadOnly)(this,"address",(0,g.computeAddress)(this.publicKey))}var r;t&&!i.Kq.isProvider(t)&&v.throwArgumentError("invalid provider","provider",t),(0,f.defineReadOnly)(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new w(this,e)}signTransaction(e){return(0,f.resolveProperties)(e).then((t=>{null!=t.from&&((0,n.getAddress)(t.from)!==this.address&&v.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest((0,c.keccak256)((0,g.serialize)(t)));return(0,g.serialize)(t,r)}))}signMessage(e){return b(this,void 0,void 0,(function*(){return(0,a.joinSignature)(this._signingKey().signDigest((0,s.A)(e)))}))}_signTypedData(e,t,r){return b(this,void 0,void 0,(function*(){const n=yield u.z.resolveNames(e,t,r,(e=>(null==this.provider&&v.throwError("cannot resolve ENS names without a provider",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return(0,a.joinSignature)(this._signingKey().signDigest(u.z.hash(n.domain,t,n.value)))}))}encrypt(e,t,r){if("function"!==typeof t||r||(r=t,t={}),r&&"function"!==typeof r)throw new Error("invalid callback");return t||(t={}),(0,p.w)(this,e,t,r)}static createRandom(e){let t=(0,d.p)(16);e||(e={}),e.extraEntropy&&(t=(0,a.arrayify)((0,a.hexDataSlice)((0,c.keccak256)((0,a.concat)([t,e.extraEntropy])),0,16)));const r=(0,l.entropyToMnemonic)(t,e.locale);return w.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return(0,m.decryptJsonWallet)(e,t,r).then((e=>new w(e)))}static fromEncryptedJsonSync(e,t){return new w((0,m.decryptJsonWalletSync)(e,t))}static fromMnemonic(e,t,r){return t||(t=l.defaultPath),new w(l.HDNode.fromMnemonic(e,null,r).derivePath(t))}}function A(e,t){return(0,g.recoverAddress)((0,s.A)(e),t)}function x(e,t,r,n){return(0,g.recoverAddress)(u.z.hash(e,t,r),n)}},5268:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_fetchData:()=>p,fetchJson:()=>m,poll:()=>g});var n=r(817),i=r(4593),o=r(8839),a=r(8523),s=r(6376);var u=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 l(e,t){return u(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),o=yield n.arrayBuffer(),a={};return n.headers.forEach?n.headers.forEach(((e,t)=>{a[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{a[e.toLowerCase()]=n.headers.get(e)})),{headers:a,statusCode:n.status,statusMessage:n.statusText,body:(0,i.arrayify)(new Uint8Array(o))}}))}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())}))};const f=new s.Logger("web/5.7.1");function d(e){return new Promise((t=>{setTimeout(t,e)}))}function h(e,t){if(null==e)return null;if("string"===typeof e)return e;if((0,i.isBytesLike)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,a._v)(e)}catch(r){}return(0,i.hexlify)(e)}return e}function p(e,t,r){const i="object"===typeof e&&null!=e.throttleLimit?e.throttleLimit:12;f.assertArgument(i>0&&i%1===0,"invalid connection throttle limit","connection.throttleLimit",i);const u="object"===typeof e?e.throttleCallback:null,p="object"===typeof e&&"number"===typeof e.throttleSlotInterval?e.throttleSlotInterval:100;f.assertArgument(p>0&&p%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",p);const m="object"===typeof e&&!!e.errorPassThrough,g={};let y=null;const b={method:"GET"};let v=!1,w=12e4;if("string"===typeof e)y=e;else if("object"===typeof e){if(null!=e&&null!=e.url||f.throwArgumentError("missing URL","connection.url",e),y=e.url,"number"===typeof e.timeout&&e.timeout>0&&(w=e.timeout),e.headers)for(const t in e.headers)g[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(v=!0);if(b.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==y.substring(0,6)&&!0!==e.allowInsecureAuthentication&&f.throwError("basic authentication requires a secure https url",s.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:y,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;g.authorization={key:"Authorization",value:"Basic "+(0,n.l)((0,a.YW)(t))}}null!=e.skipFetchSetup&&(b.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(b.fetchOptions=(0,o.shallowCopy)(e.fetchOptions))}const A=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),x=y?y.match(A):null;if(x)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":x[1]||"text/plain"},body:x[2]?(0,n.D)(x[3]):(k=x[3],(0,a.YW)(k.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(C){f.throwError("processing response error",s.Logger.errors.SERVER_ERROR,{body:h(x[1],x[2]),error:C,requestBody:null,requestMethod:"GET",url:y})}var k;t&&(b.method="POST",b.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)}));const E={};Object.keys(g).forEach((e=>{const t=g[e];E[t.key]=t.value})),b.headers=E;const S=function(){let e=null;return{promise:new Promise((function(t,r){w&&(e=setTimeout((()=>{null!=e&&(e=null,r(f.makeError("timeout",s.Logger.errors.TIMEOUT,{requestBody:h(b.body,E["content-type"]),requestMethod:b.method,timeout:w,url:y})))}),w))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),_=function(){return c(this,void 0,void 0,(function*(){for(let e=0;e=300)&&(S.cancel(),f.throwError("bad response",s.Logger.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:h(n,t.headers?t.headers["content-type"]:null),requestBody:h(b.body,E["content-type"]),requestMethod:b.method,url:y})),r)try{const e=yield r(n,t);return S.cancel(),e}catch(C){if(C.throttleRetry&&e"content-type"===e.toLowerCase())).length||(r.headers=(0,o.shallowCopy)(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return p(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse((0,a._v)(e))}catch(i){f.throwError("invalid JSON",s.Logger.errors.SERVER_ERROR,{body:e,error:i})}return r&&(n=r(n,t)),n}))}function g(e,t){return t||(t={}),null==(t=(0,o.shallowCopy)(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let i=null,o=!1;const a=()=>!o&&(o=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout((()=>{a()&&n(new Error("timeout"))}),t.timeout));const s=t.retryLimit;let u=0;!function i(){return e().then((function(e){if(void 0!==e)a()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!o){if(u++,u>s)return void(a()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));et.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null}),(function(e){a()&&n(e)}))}()}))}},9757:e=>{"use strict";e.exports=function(){let{mustBeMetaMask:e=!1,silent:t=!1,timeout:r=3e3}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(){if("boolean"!==typeof e)throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if("boolean"!==typeof t)throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if("number"!==typeof r)throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}();let n=!1;return new Promise((i=>{function o(){if(n)return;n=!0,window.removeEventListener("ethereum#initialized",o);const{ethereum:r}=window;if(!r||e&&!r.isMetaMask){const n=e&&r?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum.";!t&&console.error("@metamask/detect-provider:",n),i(null)}else i(r)}window.ethereum?o():(window.addEventListener("ethereum#initialized",o,{once:!0}),setTimeout((()=>{o()}),r))}))}},6676:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],u=o[1],l=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),c=0,f=u>0?a-4:a;for(r=0;r>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[c++]=255&t);1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,l=n-i;sl?l:s+a));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]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(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},5240:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<32;n++){var i=t.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function o(e){var t=e>>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 a(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(t=o(t),r=0;rt)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var s=(e=n).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var u=e.slice(0,s),l=e.slice(s+1);if(l.length<6)return"Data too short";var c=a(u);if("string"===typeof c)return c;for(var f=[],d=0;d=l.length||f.push(p)}return 1!==c?"Invalid checksum for "+e:{prefix:u,words:f}}function u(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<n)throw new TypeError("Exceeds length limit");var i=a(e=e.toLowerCase());if("string"===typeof i)throw new Error(i);for(var s=e+"1",u=0;u>5!==0)throw new Error("Non 5-bit word");i=o(i)^l,s+=t.charAt(l)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){s+=t.charAt(i>>5*(5-u)&31)}return s},toWordsUnsafe:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},2914:function(e,t,r){!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(7790).Buffer}catch(P){}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 l(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u=49?l-49+10:l>=17?l-17+10:l,n(l>=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,c=r;c1&&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")]=f}catch(P){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){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"],h=[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?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 l=h[e],c=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(c).toString(e);r=(f=f.idivn(c)).isZero()?m+r:d[l-m.length]+m+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 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 l=1;l>>26,f=67108863&u,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=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,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],y=8191&g,b=g>>>13,v=0|a[3],w=8191&v,A=v>>>13,x=0|a[4],k=8191&x,E=x>>>13,S=0|a[5],_=8191&S,C=S>>>13,P=0|a[6],N=8191&P,O=P>>>13,U=0|a[7],T=8191&U,M=U>>>13,R=0|a[8],I=8191&R,B=R>>>13,L=0|a[9],j=8191&L,F=L>>>13,D=0|s[0],z=8191&D,H=D>>>13,q=0|s[1],K=8191&q,W=q>>>13,V=0|s[2],G=8191&V,Q=V>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>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,le=se>>>13,ce=0|s[8],fe=8191&ce,de=ce>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(l+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,z)|0))<<13)|0;l=((o=Math.imul(d,H))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(m,z)|0,o=Math.imul(m,H);var ye=(l+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,K)|0))<<13)|0;l=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,H))+Math.imul(b,z)|0,o=Math.imul(b,H),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,W)|0;var be=(l+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(A,z)|0,o=Math.imul(A,H),n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,Q)|0;var ve=(l+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(d,Y)|0))<<13)|0;l=((o=o+Math.imul(d,X)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,H))+Math.imul(E,z)|0,o=Math.imul(E,H),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,Q)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var we=(l+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,H))+Math.imul(C,z)|0,o=Math.imul(C,H),n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0;var Ae=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,H))+Math.imul(O,z)|0,o=Math.imul(O,H),n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(C,K)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,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(m,re)|0,o=o+Math.imul(m,ne)|0;var xe=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,H))+Math.imul(M,z)|0,o=Math.imul(M,H),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,Q)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,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(m,oe)|0,o=o+Math.imul(m,ae)|0;var ke=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,H))+Math.imul(B,z)|0,o=Math.imul(B,H),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,W)|0,n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,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(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,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,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var Ee=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,z),i=(i=Math.imul(j,H))+Math.imul(F,z)|0,o=Math.imul(F,H),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(M,G)|0,o=o+Math.imul(M,Q)|0,n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,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(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Se=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;l=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,W))+Math.imul(F,K)|0,o=Math.imul(F,W),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,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(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,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,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var _e=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,Q))+Math.imul(F,G)|0,o=Math.imul(F,Q),n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,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(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Ce=(l+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;l=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,Y),i=(i=Math.imul(j,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,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(_,le)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,le)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(E,fe)|0,o=o+Math.imul(E,de)|0;var Pe=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,le)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Ne=(l+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(E,pe)|0))<<13)|0;l=((o=o+Math.imul(E,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,le)|0,n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(l+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(C,pe)|0))<<13)|0;l=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,le)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(M,fe)|0,o=o+Math.imul(M,de)|0;var Ue=(l+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(O,pe)|0))<<13)|0;l=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(F,ue)|0,o=Math.imul(F,le),n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,de)|0;var Te=(l+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(M,pe)|0))<<13)|0;l=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Me=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;l=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863;var Re=(l+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return l=((o=Math.imul(F,me))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=Ae,u[6]=xe,u[7]=ke,u[8]=Ee,u[9]=Se,u[10]=_e,u[11]=Ce,u[12]=Pe,u[13]=Ne,u[14]=Oe,u[15]=Ue,u[16]=Te,u[17]=Me,u[18]=Re,0!==l&&(u[19]=l,r.length++),r};function y(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 y(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.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?y(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.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,l=0;l=0&&(0!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),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 l=0;l=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}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),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(f)),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(l)}},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 l=0,c=1;0===(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0===(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >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 w={k256:null,p224:null,p192:null,p25519:null};function A(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(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){A.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 C(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)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.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},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(x,A),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},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 k;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return w[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):(c(e,e.umod(this.m)._forceRed(this)),e)},_.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(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=t.words[n],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(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 C(e)},i(C,_),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.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)},C.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)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},3325:(e,t,r)=>{"use strict";const n=r(6676),i=r(6897),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=u,t.IS=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return l(e,t,r)}function l(e,t,r){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=s(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!==typeof e.length||Y(e.length)?s(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),s(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let 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 l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128===(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128===(192&r)&&128===(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128===(192&r)&&128===(192&n)&&128===(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),l=this.slice(n,i),c=e.slice(t,r);for(let u=0;u>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return k(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)}};const C=4096;function P(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let o=t;or)throw new RangeError("Trying to access beyond buffer length")}function M(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,i){H(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function I(e,t,r,n,i){H(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function B(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 L(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Z((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||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 e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Z((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||T(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){M(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){M(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Z((function(e){return R(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Z((function(e){return I(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Z((function(e){return R(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Z((function(e){return I(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(i=t;i=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function H(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?">= 0".concat(n," and < 2").concat(n," ** ").concat(8*(o+1)).concat(n):">= -(2".concat(n," ** ").concat(8*(o+1)-1).concat(n,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(n):">= ".concat(t).concat(n," and <= ").concat(r).concat(n),new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||K(t,e.length-(r+1))}(n,i,o)}function q(e,t){if("number"!==typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,r){if(Math.floor(e)!==e)throw q(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"===typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=" It must be ".concat(t,". Received ").concat(i),n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a55295&&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 G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function Q(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!==e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"===typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},2129:e=>{var t=function(){"use strict";function e(t,n,i,o){"object"===typeof n&&(i=n.depth,o=n.prototype,n.filter,n=n.circular);var a=[],s=[],u="undefined"!=typeof Buffer;return"undefined"==typeof n&&(n=!0),"undefined"==typeof i&&(i=1/0),function t(i,l){if(null===i)return null;if(0==l)return i;var c,f;if("object"!=typeof i)return i;if(e.__isArray(i))c=[];else if(e.__isRegExp(i))c=new RegExp(i.source,r(i)),i.lastIndex&&(c.lastIndex=i.lastIndex);else if(e.__isDate(i))c=new Date(i.getTime());else{if(u&&Buffer.isBuffer(i))return c=Buffer.allocUnsafe?Buffer.allocUnsafe(i.length):new Buffer(i.length),i.copy(c),c;"undefined"==typeof o?(f=Object.getPrototypeOf(i),c=Object.create(f)):(c=Object.create(o),f=o)}if(n){var d=a.indexOf(i);if(-1!=d)return s[d];a.push(i),s.push(c)}for(var h in i){var p;f&&(p=Object.getOwnPropertyDescriptor(f,h)),p&&null==p.set||(c[h]=t(i[h],l-1))}return c}(t,i)}function t(e){return Object.prototype.toString.call(e)}function r(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return e.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},e.__objToStr=t,e.__isDate=function(e){return"object"===typeof e&&"[object Date]"===t(e)},e.__isArray=function(e){return"object"===typeof e&&"[object Array]"===t(e)},e.__isRegExp=function(e){return"object"===typeof e&&"[object RegExp]"===t(e)},e.__getRegExpFlags=r,e}();e.exports&&(e.exports=t)},8665:(e,t,r)=>{var n=r(2958),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,l=a[s].labels;delete a[s].channels,delete a[s].labels,Object.defineProperty(a[s],"channels",{value:u}),Object.defineProperty(a[s],"labels",{value:l})}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,l=Math.max(a,s,u),c=l-Math.min(a,s,u),f=function(e){return(l-e)/6/c+.5};return 0===c?i=o=0:(o=c/l,t=f(a),r=f(s),n=f(u),a===l?i=n-r:s===l?i=1/3+t-n:u===l&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*l]},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 l=n[u],c=(o=e,a=l,Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)+Math.pow(o[2]-a[2],2));c.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 l=0;l<3;l++)(n=a+1/3*-(l-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[l]=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,l=e[1]/100,c=e[2]/100,f=l+c;switch(f>1&&(l/=f,c/=f),n=6*u-(t=Math.floor(6*u)),0!==(1&t)&&(n=1-n),i=l+n*((r=1-c)-l),t){default:case 6:case 0:o=r,a=i,s=l;break;case 1:o=i,a=r,s=l;break;case 2:o=l,a=r,s=i;break;case 3:o=l,a=i,s=r;break;case 4:o=i,a=l,s=r;break;case 5:o=r,a=l,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]}},6180:(e,t,r)=>{var n=r(8665),i=r(3357),o={};Object.keys(n).forEach((function(e){o[e]={},Object.defineProperty(o[e],"channels",{value:n[e].channels}),Object.defineProperty(o[e],"labels",{value:n[e].labels});var t=i(e);Object.keys(t).forEach((function(r){var n=t[r];o[e][r]=function(e){var t=function(t){if(void 0===t||null===t)return t;arguments.length>1&&(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},3357:(e,t,r)=>{var n=r(8665);function i(e){var t=function(){for(var e={},t=Object.keys(n),r=t.length,i=0;i{"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]}},2465:(e,t,r)=>{var n=r(2958);function i(e){if(e){var t=[0,0,0],r=1,i=e.match(/^#([a-fA-F0-9]{3})$/);if(i){i=i[1];for(var o=0;o{var n=r(2129),i=r(6180),o=r(2465),a=function(e){if(e instanceof a)return e;if(!(this instanceof a))return new a(e);var t;if(this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},"string"===typeof e)if(t=o.getRgba(e))this.setValues("rgb",t);else if(t=o.getHsla(e))this.setValues("hsl",t);else{if(!(t=o.getHwb(e)))throw new Error('Unable to parse color from string "'+e+'"');this.setValues("hwb",t)}else if("object"===typeof e)if(void 0!==(t=e).r||void 0!==t.red)this.setValues("rgb",t);else if(void 0!==t.l||void 0!==t.lightness)this.setValues("hsl",t);else if(void 0!==t.v||void 0!==t.value)this.setValues("hsv",t);else if(void 0!==t.w||void 0!==t.whiteness)this.setValues("hwb",t);else{if(void 0===t.c&&void 0===t.cyan)throw new Error("Unable to parse color from object "+JSON.stringify(e));this.setValues("cmyk",t)}};a.prototype={rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){return 1!==this.values.alpha?this.values.hwb.concat([this.values.alpha]):this.values.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){return this.values.rgb.concat([this.values.alpha])},rgbaArrayNormalized:function(){for(var e=this.values.rgb,t=[],r=0;r<3;r++)t[r]=e[r]/255;return t.push(this.values.alpha),t},hslaArray:function(){return this.values.hsl.concat([this.values.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return o.hexString(this.values.rgb)},rgbString:function(){return o.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return o.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return o.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return o.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return o.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return o.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return o.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){return this.values.rgb[0]<<16|this.values.rgb[1]<<8|this.values.rgb[2]},luminosity:function(){for(var e=this.values.rgb,t=[],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":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){return this.values.hsl[2]+=this.values.hsl[2]*e,this.setValues("hsl",this.values.hsl),this},darken:function(e){return this.values.hsl[2]-=this.values.hsl[2]*e,this.setValues("hsl",this.values.hsl),this},saturate:function(e){return this.values.hsl[1]+=this.values.hsl[1]*e,this.setValues("hsl",this.values.hsl),this},desaturate:function(e){return this.values.hsl[1]-=this.values.hsl[1]*e,this.setValues("hsl",this.values.hsl),this},whiten:function(e){return this.values.hwb[1]+=this.values.hwb[1]*e,this.setValues("hwb",this.values.hwb),this},blacken:function(e){return this.values.hwb[2]+=this.values.hwb[2]*e,this.setValues("hwb",this.values.hwb),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){return this.setValues("alpha",this.values.alpha-this.values.alpha*e),this},opaquer:function(e){return this.setValues("alpha",this.values.alpha+this.values.alpha*e),this},rotate:function(e){var t=this.values.hsl[0];return t=(t=(t+e)%360)<0?360+t:t,this.values.hsl[0]=t,this.setValues("hsl",this.values.hsl),this},mix:function(e,t){var r=this,n=e,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 this.rgb(s*r.red()+u*n.red(),s*r.green()+u*n.green(),s*r.blue()+u*n.blue()).alpha(r.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var e=new a;return e.values=n(this.values),e}},a.prototype.getValues=function(e){for(var t={},r=0;r{var n=r(2928).keccak_256,i=r(2645);function o(e){return e?i.toUnicode(e,{useStd3ASCII:!0,transitional:!1}):e}t.t=function(e){for(var t="",r=0;r<32;r++)t+="00";if(name=o(e),name){var i=name.split(".");for(r=i.length-1;r>=0;r--){var a=n(i[r]);t=n(new Buffer(t+a,"hex"))}}return"0x"+t}},2928:(e,t,r)=>{!function(){"use strict";var t="object"===typeof window?window:{};!t.JS_SHA3_NO_NODE_JS&&"object"===typeof process&&process.versions&&process.versions.node&&(t=r.g);for(var n=!t.JS_SHA3_NO_COMMON_JS&&e.exports,i="0123456789abcdef".split(""),o=[0,8,16,24],a=[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],s=[224,256,384,512],u=["hex","buffer","arrayBuffer","array"],l=function(e,t,r){return function(n){return new w(e,t,e).update(n)[r]()}},c=function(e,t,r){return function(n,i){return new w(e,t,i).update(n)[r]()}},f=function(e,t){var r=l(e,t,"hex");r.create=function(){return new w(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}w.prototype.update=function(e){var t="string"!==typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,a=this.blocks,s=this.byteCount,u=this.blockCount,l=0,c=this.s;l>2]|=e[l]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(a[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=a[u],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+i[15&e]+i[e>>12&15]+i[e>>8&15]+i[e>>20&15]+i[e>>16&15]+i[e>>28&15]+i[e>>24&15];s%t===0&&(A(r),a=0)}return o&&(e=r[a],o>0&&(u+=i[e>>4&15]+i[15&e]),o>1&&(u+=i[e>>12&15]+i[e>>8&15]),o>2&&(u+=i[e>>20&15]+i[e>>16&15])),u},w.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&&A(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 A=function(e){var t,r,n,i,o,s,u,l,c,f,d,h,p,m,g,y,b,v,w,A,x,k,E,S,_,C,P,N,O,U,T,M,R,I,B,L,j,F,D,z,H,q,K,W,V,G,Q,J,Y,X,Z,$,ee,te,re,ne,ie,oe,ae,se,ue,le,ce;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],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],l=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],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=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=i^(l<<1|c>>>31),r=o^(c<<1|l>>>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^(f<<1|d>>>31),r=u^(d<<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=l^(h<<1|p>>>31),r=c^(p<<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=d^(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,m=e[0],g=e[1],G=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,N=e[20]<<3|e[21]>>>29,O=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,K=e[41]<<18|e[40]>>>14,I=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,U=e[33]<<13|e[32]>>>19,T=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,M=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=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,W=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,P=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,k=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=m^~y&v,e[1]=g^~b&w,e[10]=S^~C&N,e[11]=_^~P&O,e[20]=I^~L&F,e[21]=B^~j&D,e[30]=W^~G&J,e[31]=V^~Q&Y,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~v&A,e[3]=b^~w&x,e[12]=C^~N&U,e[13]=P^~O&T,e[22]=L^~F&z,e[23]=j^~D&H,e[32]=G^~J&X,e[33]=Q^~Y&Z,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&k,e[5]=w^~x&E,e[14]=N^~U&M,e[15]=O^~T&R,e[24]=F^~z&q,e[25]=D^~H&K,e[34]=J^~X&$,e[35]=Y^~Z&ee,e[44]=oe^~se&le,e[45]=ae^~ue&ce,e[6]=A^~k&m,e[7]=x^~E&g,e[16]=U^~M&S,e[17]=T^~R&_,e[26]=z^~q&I,e[27]=H^~K&B,e[36]=X^~$&W,e[37]=Z^~ee&V,e[46]=se^~le&te,e[47]=ue^~ce&re,e[8]=k^~m&y,e[9]=E^~g&b,e[18]=M^~S&C,e[19]=R^~_&P,e[28]=q^~I&L,e[29]=K^~B&j,e[38]=$^~W&G,e[39]=ee^~V&Q,e[48]=le^~te&ne,e[49]=ce^~re&ie,e[0]^=a[n],e[1]^=a[n+1]};if(n)e.exports=h;else for(m=0;m{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!==typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i{var n;!function(){"use strict";var i=!("undefined"===typeof window||!window.document||!window.document.createElement),o={canUseDOM:i,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen};void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},9166:(e,t,r)=>{var n=t;n.utils=r(328),n.common=r(6876),n.sha=r(3131),n.ripemd=r(18),n.hmac=r(2054),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},6876:(e,t,r)=>{"use strict";var n=r(328),i=r(7599);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;o{"use strict";var n=r(328),i=r(7599);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(328),i=r(6876),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,l=i.BlockHash;function c(){if(!(this instanceof c))return new c;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(c,l),t.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],l=this.h[3],c=this.h[4],b=r,v=n,w=i,A=l,x=c,k=0;k<80;k++){var E=a(o(u(r,f(k,n,i,l),e[p[k]+t],d(k)),g[k]),c);r=c,c=l,l=o(i,10),i=n,n=E,E=a(o(u(b,f(79-k,v,w,A),e[m[k]+t],h(k)),y[k]),x),b=x,x=A,A=o(w,10),w=v,v=E}E=s(this.h[1],i,A),this.h[1]=s(this.h[2],l,x),this.h[2]=s(this.h[3],c,b),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,w),this.h[0]=E},c.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],m=[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],g=[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],y=[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]},3131:(e,t,r)=>{"use strict";t.sha1=r(4532),t.sha224=r(5612),t.sha256=r(7273),t.sha384=r(6349),t.sha512=r(6652)},4532:(e,t,r)=>{"use strict";var n=r(328),i=r(6876),o=r(1391),a=n.rotl32,s=n.sum32,u=n.sum32_5,l=o.ft_1,c=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,c),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(328),i=r(7273);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},7273:(e,t,r)=>{"use strict";var n=r(328),i=r(6876),o=r(1391),a=r(7599),s=n.sum32,u=n.sum32_4,l=n.sum32_5,c=o.ch32,f=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,y=[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;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(b,g),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(;n{"use strict";var n=r(328),i=r(6652);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},6652:(e,t,r)=>{"use strict";var n=r(328),i=r(6876),o=r(7599),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,l=n.shr64_lo,c=n.sum64,f=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,y=i.BlockHash,b=[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];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function x(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function k(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function E(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function S(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function _(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function C(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function P(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function N(e,t){var r=s(e,t,1)^s(e,t,8)^l(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=a(e,t,19)^a(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}function U(e,t){var r=s(e,t,19)^s(t,e,29)^l(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,y),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(328).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},328:(e,t,r)=>{"use strict";var n=r(7599),i=r(1596);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,l=t;return u+=(l=l+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,l){var c=0,f=t;return c+=(f=f+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,l){return t+n+o+s+l>>>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}},5626:function(e,t){var r;void 0===(r=function(){return function(){var e=[new Uint32Array([2157250,2157314,2157378,2157442,2157506,2157570,2157634,0,2157698,2157762,2157826,2157890,2157954,0,2158018,0]),new Uint32Array([2179041,6291456,2179073,6291456,2179105,6291456,2179137,6291456,2179169,6291456,2179201,6291456,2179233,6291456,2179265,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,2113729,2197345,2197377,2113825,2197409,2197441,2113921,2197473,2114017,2197505,2197537,2197569,2197601,2197633,2197665]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672,23068672,0,0,0,0,23068672]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064]),new Uint32Array([2196001,2196033,2196065,2196097,2196129,2196161,2196193,2196225,2196257,2196289,2196321,2196353,2196385,2196417,2196449,2196481]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2177025,6291456,2177057,6291456,2177089,6291456,2177121,6291456,2177153,6291456,2177185,6291456,2177217,6291456,2177249,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456]),new Uint32Array([2134435,2134531,2134627,2134723,2134723,2134819,2134819,2134915,2134915,2135011,2105987,2135107,2135203,2135299,2131587,2135395]),new Uint32Array([0,0,0,0,0,0,0,6291456,2168673,2169249,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354,2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354]),new Uint32Array([2125219,2125315,2152834,2152898,2125411,2152962,2153026,2125506,2125507,2125603,2153090,2153154,2153218,2153282,2153346,2105348]),new Uint32Array([2203393,6291456,2203425,6291456,2203457,6291456,2203489,6291456,6291456,6291456,6291456,2203521,6291456,2181281,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,6291456,2145538,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,6291456]),new Uint32Array([2139426,2160834,2160898,2160962,2134242,2161026,2161090,2161154,2161218,2161282,2161346,2161410,2138658,2161474,2161538,2134722]),new Uint32Array([2119939,2124930,2125026,2106658,2125218,2128962,2129058,2129154,2129250,2129346,2129442,2108866,2108770,2150466,2150530,2150594]),new Uint32Array([2201601,6291456,2201633,6291456,2201665,6291456,2201697,6291456,2201729,6291456,2201761,6291456,2201793,6291456,2201825,6291456]),new Uint32Array([2193537,2193569,2193601,2193633,2193665,2193697,2193729,2193761,2193793,2193825,2193857,2193889,2193921,2193953,2193985,2194017]),new Uint32Array([6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2190561,6291456,2190593,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2190625,6291456,2190657,6291456,23068672]),new Uint32Array([2215905,2215937,2215969,2216001,2216033,2216065,2216097,2216129,2216161,2216193,2216225,2216257,2105441,2216289,2216321,2216353]),new Uint32Array([23068672,18884130,23068672,23068672,23068672,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2191233,2191265,2191297,2191329,2191361,2191393,2191425,2117377,2191457,2191489,2191521,2191553,2191585,2191617,2191649,2117953]),new Uint32Array([2132227,2132323,2132419,2132419,2132515,2132515,2132611,2132707,2132707,2132803,2132899,2132899,2132995,2132995,2133091,2133187]),new Uint32Array([0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10609889,10610785,10609921,10610817,2222241]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([2219969,2157121,2157441,2157505,2157889,2157953,2220001,2158465,2158529,10575617,2156994,2157058,2129923,2130019,2157122,2157186]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2185249,6291456,2185281,6291456,2185313,6291456,2185345,6291456,2185377,6291456,2185409,6291456,2185441,6291456,2185473,6291456]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,6291456,0]),new Uint32Array([2183361,6291456,2183393,6291456,2183425,6291456,2183457,6291456,2183489,6291456,2183521,6291456,2183553,6291456,2183585,6291456]),new Uint32Array([2192161,2192193,2192225,2192257,2192289,2192321,2192353,2192385,2192417,2192449,2192481,2192513,2192545,2192577,2192609,2192641]),new Uint32Array([2212001,2212033,2212065,2212097,2212129,2212161,2212193,2212225,2212257,2212289,2212321,2212353,2212385,2212417,2212449,2207265]),new Uint32Array([2249825,2249857,2249889,2249921,2249954,2250018,2250082,2250145,2250177,2250209,2250241,2250274,2250337,2250370,2250433,2250465]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147905,2147969,2148033,2148097,2148161,2148225,2148289,2148353]),new Uint32Array([10485857,6291456,2197217,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2180353,2180385,2144033,2180417,2180449,2180481,2180513,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10610209,10610465,10610241,10610753,10609857]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2223842,2223906,2223970,2224034,2224098,2224162,2224226,2224290,2224354,2224418,2224482,2224546,2224610,2224674,2224738,2224802]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,18923650,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,18923714,23068672,23068672]),new Uint32Array([2126179,2125538,2126275,2126371,2126467,2125634,2126563,2105603,2105604,2125346,2126659,2126755,2126851,2098179,2098181,2098182]),new Uint32Array([2227426,2227490,2227554,2227618,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2192353,2240642,2240642,2240705,2240737,2240737,2240769,2240802,2240866,2240929,2240961,2240993,2241025,2241057,2241089,2241121]),new Uint32Array([6291456,2170881,2170913,2170945,6291456,2170977,6291456,2171009,2171041,6291456,6291456,6291456,2171073,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2132226,2132514,2163586,2132610,2160386,2133090,2133186,2160450,2160514,2160578,2133570,2106178,2160642,2133858,2160706,2160770]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10532162,10532226,10532290,10532354,10532418,10532482,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2098209,2108353,2108193,2108481,2170241,2111713,2105473,2105569,2105601,2112289,2112481,2098305,2108321,0,0,0]),new Uint32Array([2209121,2209153,2209185,2209217,2209249,2209281,2209313,2209345,2209377,2209409,2209441,2209473,2207265,2209505,2209537,2209569]),new Uint32Array([2189025,6291456,2189057,6291456,2189089,6291456,2189121,6291456,2189153,6291456,2189185,6291456,2189217,6291456,2189249,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2165764,2140004]),new Uint32Array([2215105,6291456,2215137,6291456,6291456,2215169,2215201,6291456,6291456,6291456,2215233,2215265,2215297,2215329,2215361,2215393]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,23068672,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([10505091,10505187,10505283,10505379,10505475,10505571,10505667,10505763,10505859,10505955,10506051,10506147,10506243,10506339,10506435,10506531]),new Uint32Array([2229730,2229794,2229858,2229922,2229986,2230050,2230114,2230178,2230242,2230306,2230370,2230434,2230498,2230562,2230626,2230690]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,0,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([6291456,6291456,6291456,6291456,10502115,10502178,10502211,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2190305,6291456,2190337,6291456,2190369,6291456,2190401,6291456,2190433,6291456,2190465,6291456,2190497,6291456,2190529,6291456]),new Uint32Array([2173793,2173985,2174017,6291456,2173761,2173697,6291456,2174689,6291456,2174017,2174721,6291456,6291456,2174753,2174785,2174817]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609,2100033]),new Uint32Array([2132898,2163842,2163906,2133282,2132034,2131938,2137410,2132802,2132706,2164866,2133282,2160578,2165186,2165186,6291456,6291456]),new Uint32Array([10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059,10501155,10501251,10501347,10501443]),new Uint32Array([2163458,2130978,2131074,2131266,2131362,2163522,2160130,2132066,2131010,2131106,2106018,2131618,2131298,2132034,2131938,2137410]),new Uint32Array([2212961,2116993,2212993,2213025,2213057,2213089,2213121,2213153,2213185,2213217,2213249,2209633,2213281,2213313,2213345,2213377]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2113729,2113825,2113921,2114017,2114113,2114209,2114305,2114401,2114497,2114593,2114689,2114785,2114881,2114977,2115073,2115169]),new Uint32Array([2238177,2238209,2238241,2238273,2238305,2238337,2238337,2217537,2238369,2238401,2238433,2238465,2215649,2238497,2238529,2238561]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0]),new Uint32Array([6291456,0,6291456,2145026,0,6291456,2145090,0,6291456,6291456,0,0,23068672,0,23068672,23068672]),new Uint32Array([2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129,2100289]),new Uint32Array([6291456,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0]),new Uint32Array([2187681,2187713,2187745,2187777,2187809,2187841,2187873,2187905,2187937,2187969,2188001,2188033,2188065,2188097,2188129,2188161]),new Uint32Array([0,10554498,10554562,10554626,10554690,10554754,10554818,10554882,10554946,10555010,10555074,6291456,6291456,0,0,0]),new Uint32Array([2235170,2235234,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0]),new Uint32Array([2181153,6291456,2188897,6291456,6291456,2188929,6291456,6291456,6291456,6291456,6291456,6291456,2111905,2100865,2188961,2188993]),new Uint32Array([2100833,2100897,0,0,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,2112289]),new Uint32Array([6291456,2172833,6291456,2172865,2172897,2172929,2172961,6291456,2172993,6291456,2173025,6291456,2173057,6291456,2173089,6291456]),new Uint32Array([6291456,0,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,2190721]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456]),new Uint32Array([2184993,6291456,2185025,6291456,2185057,6291456,2185089,6291456,2185121,6291456,2185153,6291456,2185185,6291456,2185217,6291456]),new Uint32Array([2115265,2115361,2115457,2115553,2115649,2115745,2115841,2115937,2116033,2116129,2116225,2116321,2150658,2150722,2200225,6291456]),new Uint32Array([2168321,6291456,2168353,6291456,2168385,6291456,2168417,6291456,2168449,6291456,2168481,6291456,2168513,6291456,2168545,6291456]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,0,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2186625,0,0,6291456,6291456,2186657,2186689,2186721,2173505,0,10496067,10496163,10496259]),new Uint32Array([2178785,6291456,2178817,6291456,2178849,6291456,2178881,6291456,2178913,6291456,2178945,6291456,2178977,6291456,2179009,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2097152,0,0,0,2097152,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2197857,2197889,2197921,2197953,2197985,2198017,0,0,2198049,2198081,2198113,2198145,2198177,2198209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2098209,2167297,2111137,6291456]),new Uint32Array([2171393,6291456,2171425,6291456,2171457,6291456,2171489,6291456,2171521,6291456,2171553,6291456,2171585,6291456,2171617,6291456]),new Uint32Array([2206753,2206785,2195457,2206817,2206849,2206881,2206913,2197153,2197153,2206945,2117857,2206977,2207009,2207041,2207073,2207105]),new Uint32Array([0,0,0,0,0,0,0,23068672,0,0,0,0,2144834,2144898,0,2144962]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,0,2105505,2098241]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,2202049,6291456,2202081,6291456,2202113,6291456,2202145,6291456,2202177,6291456,2202209,6291456,2202241,6291456]),new Uint32Array([10501155,10501251,10501347,10501443,10501539,10501635,10501731,10501827,10501923,10502019,2141731,2105505,2098177,2155586,2166530,0]),new Uint32Array([2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441]),new Uint32Array([2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330,2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10502307,10502403,10502499,10502595,10502691,10502787,10502883,10502979,10503075,10503171,10503267,10503363,10503459,10503555,10503651,10503747]),new Uint32Array([2179937,2179969,2180001,2180033,2156545,2180065,2156577,2180097,2180129,2180161,2180193,2180225,2180257,2180289,2156737,2180321]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,0,0,6291456,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([2227682,2227746,2227810,2227874,2227938,2228002,2228066,2228130,2228194,2228258,2228322,2228386,2228450,2228514,2228578,2228642]),new Uint32Array([2105601,2169121,2108193,2170049,2181025,2181057,2112481,2108321,2108289,2181089,2170497,2100865,2181121,2173601,2173633,2173665]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180641,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,6291456,0,6291456,0,6291456,0,0,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2178273,6291456,2178305,6291456,2178337,6291456,2178369,6291456,2178401,6291456,2178433,6291456,2178465,6291456,2178497,6291456]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2237377,2237409,2236225,2237441,2237473,2217441,2215521,2215553,2217473,2237505,2237537,2209697,2237569,2215585,2237601,2237633]),new Uint32Array([2221985,2165601,2165601,2165665,2165665,2222017,2222017,2165729,2165729,2158913,2158913,2158913,2158913,2097281,2097281,2105921]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2149634,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2176897,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2176929,6291456,2176961,6291456,2176993,6291456]),new Uint32Array([2172641,6291456,2172673,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2172705,2172737,6291456,2172769,2172801,6291456]),new Uint32Array([2099173,2104196,2121667,2099395,2121763,2152258,2152322,2098946,2152386,2121859,2121955,2099333,2122051,2104324,2099493,2122147]),new Uint32Array([6291456,6291456,6291456,2145794,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2145858,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,0,0,6291456,0]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,0,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2239074,2239138,2239201,2239233,2239265,2239297,2239329,2239361,0,2239393,2239425,2239425,2239458,2239521,2239553,2209569]),new Uint32Array([14680064,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,6291456,23068672]),new Uint32Array([2108321,2108289,2113153,2098209,2180897,2180929,2180961,2111137,2098241,2108353,2170241,2170273,2180993,2105825,6291456,2105473]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146114,6291456,6291456,6291456,0,0,0]),new Uint32Array([2105921,2105921,2105921,2222049,2222049,2130977,2130977,2130977,2130977,2160065,2160065,2160065,2160065,2097729,2097729,2097729]),new Uint32Array([2218145,2214785,2207937,2218177,2218209,2192993,2210113,2212769,2218241,2218273,2216129,2218305,2216161,2218337,2218369,2218401]),new Uint32Array([0,0,0,2156546,2156610,2156674,2156738,2156802,0,0,0,0,0,2156866,23068672,2156930]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2213409,2213441,2213473,2213505,2213537,2213569,2213601,2213633,2213665,2195681,2213697,2213729,2213761,2213793,2213825,2213857]),new Uint32Array([2100033,2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2201857,6291456,2201889,6291456,2201921,6291456,2201953,6291456,2201985,6291456,2202017,6291456,2176193,2176257,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2188193,2188225,2188257,2188289,2188321,2188353,2188385,2188417,2188449,2188481,2188513,2188545,2188577,2188609,2188641,0]),new Uint32Array([10554529,2221089,0,10502113,10562017,10537921,10538049,2221121,2221153,0,0,0,0,0,0,0]),new Uint32Array([2213889,2213921,2213953,2213985,2214017,2214049,2214081,2194177,2214113,2214145,2214177,2214209,2214241,2214273,2214305,2214337]),new Uint32Array([2166978,2167042,2099169,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180545,6291456,6291456,6291456]),new Uint32Array([10518915,10519011,10519107,10519203,2162242,2162306,2159554,2162370,2159362,2159618,2105922,2162434,2159746,2162498,2159810,2159874]),new Uint32Array([2161730,2161794,2135586,2161858,2161922,2137186,2131810,2160290,2135170,2161986,2137954,2162050,2162114,2162178,10518723,10518819]),new Uint32Array([10506627,10506723,10506819,10506915,10507011,10507107,10507203,10507299,10507395,10507491,10507587,10507683,10507779,10507875,10507971,10508067]),new Uint32Array([6291456,23068672,23068672,23068672,0,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2175873,2175905,2175937,2175969,2176001,2176033,2176065,2176097,2176129,2176161,2176193,2176225,2176257,2176289,2176321,2176353]),new Uint32Array([2140006,2140198,2140390,2140582,2140774,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241]),new Uint32Array([0,23068672,0,0,0,0,0,0,0,2145154,2145218,2145282,6291456,0,2145346,0]),new Uint32Array([0,0,0,0,10531458,10495395,2148545,2143201,2173473,2148865,2173505,0,2173537,0,2173569,2149121]),new Uint32Array([10537282,10495683,2148738,2148802,2148866,0,6291456,2148930,2186593,2173473,2148737,2148865,2148802,10495779,10495875,10495971]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2215425,2215457,2215489,2215521,2215553,2215585,2215617,2215649,2215681,2215713,2215745,2215777,2192033,2215809,2215841,2215873]),new Uint32Array([2242049,2242081,2242113,2242145,2242177,2242209,2242241,2242273,2215937,2242305,2242338,2242401,2242433,2242465,2242497,2216001]),new Uint32Array([10554529,2221089,0,0,10562017,10502113,10538049,10537921,2221185,10489601,10489697,10609889,10609921,2141729,2141793,10610273]),new Uint32Array([2141923,2142019,2142115,2142211,2142307,2142403,2142499,2142595,2142691,0,0,0,0,0,0,0]),new Uint32Array([0,2221185,2221217,10609857,10609857,10489601,10489697,10609889,10609921,2141729,2141793,2221345,2221377,2221409,2221441,2187105]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18923970,23068672,23068672,23068672,0,6291456,6291456]),new Uint32Array([2183105,6291456,2183137,6291456,2183169,6291456,2183201,6291456,2183233,6291456,2183265,6291456,2183297,6291456,2183329,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2134434,2134818,2097666,2097186,2097474,2097698,2105986,2131586,2132450,2131874,2131778,2135970,2135778,2161602,2136162,2161666]),new Uint32Array([2236865,2236897,2236930,2236993,2237025,2235681,2237058,2237121,2237153,2237185,2237217,2217281,2237250,2191233,2237313,2237345]),new Uint32Array([2190049,6291456,2190081,6291456,2190113,6291456,2190145,6291456,2190177,6291456,2190209,6291456,2190241,6291456,2190273,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2101922,2102050,2102178,2102306,10498755,10498851,10498947,10499043,10499139,10499235,10499331,10499427,10499523,10489604,10489732,10489860]),new Uint32Array([2166914,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2181601,2170561,2181633,2181665,2170753,2181697,2172897,2170881,2181729,2170913,2172929,2113441,2181761,2181793,2171009,2173761]),new Uint32Array([0,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2248001,2248033,2248066,2248130,2248193,2248226,2248289,2248322,2248385,2248417,2216673,2248450,2248514,2248577,2248610,2248673]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([2169729,6291456,2169761,6291456,2169793,6291456,2169825,6291456,2169857,2169889,6291456,2169921,6291456,2143329,6291456,2098305]),new Uint32Array([2162178,2163202,2163266,2135170,2136226,2161986,2137954,2159426,2159490,2163330,2159554,2163394,2159682,2139522,2136450,2159746]),new Uint32Array([2173953,2173985,0,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2174209,2174241,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,4271169,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2174273]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,2190785,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2189793,6291456,2189825,6291456,2189857,6291456,2189889,6291456,2189921,6291456,2189953,6291456,2189985,6291456,2190017,6291456]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,0,2098305,2108321,2108289,2100865,2113153,2108481,2113345,0,2098209,2111137]),new Uint32Array([2172129,6291456,2172161,6291456,2172193,6291456,2172225,6291456,2172257,6291456,2172289,6291456,2172321,6291456,2172353,6291456]),new Uint32Array([2214753,6291456,2214785,6291456,6291456,2214817,2214849,2214881,2214913,2214945,2214977,2215009,2215041,2215073,2194401,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([10610305,10610337,10575617,2221761,10610401,10610433,10502177,0,10610465,10610497,10610529,10610561,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2187105,2187137,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2199393,2199425,2199457,2199489,2199521,2199553,2199585,2199617,2199649,2199681,2199713,2199745,2199777,2199809,2199841,0]),new Uint32Array([2217249,2217281,2217313,2217345,2217377,2217409,2217441,2217473,2215617,2217505,2217537,2217569,2214753,2217601,2217633,2217665]),new Uint32Array([2170273,2170305,6291456,2170337,2170369,6291456,2170401,2170433,2170465,6291456,6291456,6291456,2170497,2170529,6291456,2170561]),new Uint32Array([2188673,6291456,2188705,2188737,2188769,6291456,6291456,2188801,6291456,2188833,6291456,2188865,6291456,2180929,2181505,2180897]),new Uint32Array([10489988,10490116,10490244,10490372,10490500,10490628,10490756,10490884,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147393,2147457,2147521,2147585,2147649,2147713,2147777,2147841]),new Uint32Array([23068672,23068672,0,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2241153,2241185,2241217,2215809,2241250,2241313,2241345,2241377,2217921,2241377,2241409,2215873,2241441,2241473,2241505,2241537]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220417,2220417,2220449,2220449,2220481,2220481,2220513,2220513,2220545,2220545,2220577,2220577,2220609,2220609,2220641,2220641]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2144002,0,6291456,6291456,0,0,6291456,6291456,6291456]),new Uint32Array([2167105,2167137,2167169,2167201,2167233,2167265,2167297,2167329,2167361,2167393,2167425,2167457,2167489,2167521,2167553,2167585]),new Uint32Array([10575521,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2234146,2234210,2234274,2234338,2234402,2234466,2234530,2234594,2234658,2234722,2234786,2234850,2234914,2234978,2235042,2235106]),new Uint32Array([0,0,0,0,0,0,0,2180577,0,0,0,0,0,2180609,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456]),new Uint32Array([2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2242529,2242561,2242593,2242625,2242657,2242689,2242721,2242753,2207937,2218177,2242785,2242817,2242849,2242882,2242945,2242977]),new Uint32Array([2118049,2105345,2118241,2105441,2118433,2118529,2118625,2118721,2118817,2200257,2200289,2191809,2200321,2200353,2200385,2200417]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2185505,6291456,2185537,6291456,2185569,6291456,2185601,6291456,2185633,6291456,2185665,6291456,2185697,6291456,2185729,6291456]),new Uint32Array([2231970,2232034,2232098,2232162,2232226,2232290,2232354,2232418,2232482,2232546,2232610,2232674,2232738,2232802,2232866,2232930]),new Uint32Array([2218625,2246402,2246466,2246530,2246594,2246657,2246689,2246689,2218657,2219681,2246721,2246753,2246785,2246818,2246881,2208481]),new Uint32Array([2197025,2197057,2197089,2197121,2197153,2197185,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2219137,2216961,2219169,2219201,2219233,2219265,2219297,2217025,2215041,2219329,2217057,2219361,2217089,2219393,2197153,2219426]),new Uint32Array([23068672,23068672,23068672,0,0,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713]),new Uint32Array([2243522,2243585,2243617,2243649,2243681,2210113,2243713,2243746,2243810,2243874,2243937,2243970,2244033,2244065,2244097,2244129]),new Uint32Array([2178017,6291456,2178049,6291456,2178081,6291456,2178113,6291456,2178145,6291456,2178177,6291456,2178209,6291456,2178241,6291456]),new Uint32Array([10553858,2165314,10518722,6291456,10518818,0,10518914,2130690,10519010,2130786,10519106,2130882,10519202,2165378,10554050,2165506]),new Uint32Array([0,0,2135491,2135587,2135683,2135779,2135875,2135971,2135971,2136067,2136163,2136259,2136355,2136355,2136451,2136547]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2220033,2220033,2220065,2220065,2220065,2220065,2220097,2220097,2220097,2220097,2220129,2220129,2220129,2220129,2220161,2220161]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2100897,2100898,2100899,2150018,2100865,2100866,2100867,2100868,2150082,2108481,2109858,2109859,2105569,2105505,2098241,2105601]),new Uint32Array([2097217,2097505,2097505,2097505,2097505,2165570,2165570,2165634,2165634,2165698,2165698,2097858,2097858,0,0,2097152]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10503843,10503939,10504035,10504131,10504227,10504323,10504419,10504515,10504611,10504707,10504803,10504899,10504995,10491140,10491268,0]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,2235297,2220769,2235329,2235361]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2222401,2222433,2222465,10531394,2222497,2222529,2222561,0,2222593,2222625,2222657,2222689,2222721,2222753,2222785,0]),new Uint32Array([2184481,6291456,2184513,6291456,2184545,6291456,2184577,6291456,2184609,6291456,2184641,6291456,2184673,6291456,2184705,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2105570,2156034,2126947,2156098,2153666,2127043,2127139,2156162,0,2127235,2156226,2156290,2156354,2156418,2127331,2127427]),new Uint32Array([2215905,2207041,2153185,2241569,2241601,2241633,2241665,2241697,2241730,2241793,2241825,2241857,2241889,2241921,2241954,2242017]),new Uint32Array([2203777,6291456,2203809,6291456,2203841,6291456,2203873,6291456,2203905,6291456,2173121,2180993,2181249,2203937,2181313,0]),new Uint32Array([2168577,6291456,2168609,6291456,2168641,6291456,2168673,6291456,2168705,6291456,2168737,6291456,2168769,6291456,2168801,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,0,0]),new Uint32Array([2210113,2195521,2210145,2210177,2210209,2210241,2210273,2210305,2210337,2210369,2210401,2210433,2210465,2210497,2210529,2210561]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2228706,2228770,2228834,2228898,2228962,2229026,2229090,2229154,2229218,2229282,2229346,2229410,2229474,2229538,2229602,2229666]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,18874368,18874368,18874368,0,0]),new Uint32Array([2133089,2133281,2133281,2133281,2133281,2160577,2160577,2160577,2160577,2097441,2097441,2097441,2097441,2133857,2133857,2133857]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089]),new Uint32Array([2178529,6291456,2178561,6291456,2178593,6291456,2178625,6291456,2178657,6291456,2178689,6291456,2178721,6291456,2178753,6291456]),new Uint32Array([2221025,2221025,2221057,2221057,2159329,2159329,2159329,2159329,2097217,2097217,2158914,2158914,2158978,2158978,2159042,2159042]),new Uint32Array([2208161,2208193,2208225,2208257,2194433,2208289,2208321,2208353,2208385,2208417,2208449,2208481,2208513,2208545,2208577,2208609]),new Uint32Array([2169217,6291456,2169249,6291456,2169281,6291456,2169313,6291456,2169345,6291456,2169377,6291456,2169409,6291456,2169441,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2133187,2133283,2133283,2133379,2133475,2133571,2133667,2133667,2133763,2133859,2133955,2134051,2134147,2134147,2134243,2134339]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,0]),new Uint32Array([2193089,2193121,2193153,2193185,2117665,2117569,2193217,2193249,2193281,2193313,2193345,2193377,2193409,2193441,2193473,2193505]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184225,6291456,2184257,6291456,2184289,6291456,2184321,6291456,2184353,6291456,2184385,6291456,2184417,6291456,2184449,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2100833,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2200801,2200833,2200865,0]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2181153,2105505,2181185,2167617,2180993]),new Uint32Array([2160002,2160066,2160130,2160194,2160258,2132066,2131010,2131106,2106018,2131618,2160322,2131298,2132034,2131938,2137410,2132226]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2183617,6291456,2183649,6291456,2183681,6291456,2183713,6291456,2183745,6291456,2183777,6291456,2183809,6291456,2183841,6291456]),new Uint32Array([0,6291456,6291456,0,6291456,0,0,6291456,6291456,0,6291456,0,0,6291456,0,0]),new Uint32Array([2250977,2251009,2251041,2251073,2195009,2251106,2251169,2251201,2251233,2251265,2251297,2251330,2251394,2251457,2251489,2251521]),new Uint32Array([2205729,2205761,2205793,2205825,2205857,2205889,2205921,2205953,2205985,2206017,2206049,2206081,2206113,2206145,2206177,2206209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2143170,2168993,6291456,2169025,6291456,2169057,6291456,2169089,6291456,2143234,2169121,6291456,2169153,6291456,2169185,6291456]),new Uint32Array([23068672,23068672,2190689,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2248706,2248769,2248801,2248833,2248865,2248897,2248929,2248962,2249026,2249090,2249154,2240705,2249217,2249249,2249281,2249313]),new Uint32Array([10485857,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10495394,6291456,2098209,6291456,6291456,2097152,6291456,10531394]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([6291456,2186977,6291456,6291456,6291456,6291456,6291456,10537858,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2209601,2209633,2209665,2209697,2209729,2209761,2209793,2209825,2209857,2209889,2209921,2209953,2209985,2210017,2210049,2210081]),new Uint32Array([10501539,10501635,10501731,10501827,10501923,10502019,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2194561,2194593,2194625,2119777,2119873,2194657,2194689,2194721,2194753,2194785,2194817,2194849,2194881,2194913,2194945,2194977]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569]),new Uint32Array([2222818,2222882,2222946,2223010,2223074,2223138,2223202,2223266,2223330,2223394,2223458,2223522,2223586,2223650,2223714,2223778]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672]),new Uint32Array([0,2179553,2179585,2179617,2179649,2144001,2179681,2179713,2179745,2179777,2179809,2156705,2179841,2156833,2179873,2179905]),new Uint32Array([6291456,23068672,6291456,2145602,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,6291456,0,0]),new Uint32Array([2196513,2196545,2196577,2196609,2196641,2196673,2196705,2196737,2196769,2196801,2196833,2196865,2196897,2196929,2196961,2196993]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2177281,6291456,2177313,6291456,2177345,6291456,2177377,6291456,2177409,6291456,2177441,6291456,2177473,6291456,2177505,6291456]),new Uint32Array([2187137,2221473,2221505,2221537,2221569,6291456,6291456,10610209,10610241,10537986,10537986,10537986,10537986,10609857,10609857,10609857]),new Uint32Array([2243009,2243041,2216033,2243074,2243137,2243169,2243201,2219617,2243233,2243265,2243297,2243329,2243362,2243425,2243457,2243489]),new Uint32Array([10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,2097152,4194304,4194304,0,0]),new Uint32Array([2143042,6291456,2143106,2143106,2168833,6291456,2168865,6291456,6291456,2168897,6291456,2168929,6291456,2168961,6291456,2143170]),new Uint32Array([6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2204193,2204225,2204257,2204289,2204321,2204353,2204385,2204417,2204449,2204481,2204513,2204545,2204577,2204609,2204641,2204673]),new Uint32Array([2202753,6291456,2202785,6291456,2202817,6291456,2202849,6291456,2202881,6291456,2202913,6291456,2202945,6291456,2202977,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321]),new Uint32Array([2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842,2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842]),new Uint32Array([2253313,2253346,2253409,2253441,2253473,2253505,2253537,2253569,2253601,2253634,2219393,2253697,2253729,2253761,2253793,2253825]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([2162562,2162626,2131362,2162690,2159938,2160002,2162754,2162818,2160130,2162882,2160194,2160258,2160834,2160898,2161026,2161090]),new Uint32Array([2175361,2175393,2175425,2175457,2175489,2175521,2175553,2175585,2175617,2175649,2175681,2175713,2175745,2175777,2175809,2175841]),new Uint32Array([2253858,2253921,2253954,2254018,2254082,2196737,2254145,2196865,2254177,2254209,2254241,2254273,2197025,2254306,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2202113,2204129,2188705,2204161]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953]),new Uint32Array([2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,0,2108417,0,2111713,2100897,2111905]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2175425,2175489,2175809,2175905,2175937,2175937,2176193,2176417,2180865,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,2143298,2143298,2143298,2143362,2143362,2143362,2143426,2143426,2143426,2171105,6291456,2171137]),new Uint32Array([2120162,2120258,2151618,2151682,2151746,2151810,2151874,2151938,2152002,2120035,2120131,2120227,2152066,2120323,2152130,2120419]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2195361,2142433,2236065,2236097,2236129,2236161,2118241,2117473,2236193,2236225,2236257,2236289,0,0,0,0]),new Uint32Array([2189281,6291456,2189313,6291456,2189345,6291456,2189377,6291456,2189409,6291456,2189441,6291456,2189473,6291456,2189505,6291456]),new Uint32Array([6291456,6291456,2145922,6291456,6291456,6291456,6291456,2145986,6291456,6291456,6291456,6291456,2146050,6291456,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10502113,10562017,10610401,10502177,10610433,10538049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,2186401,0,2186433,0,2186465,0,2186497]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,23068672,23068672]),new Uint32Array([0,0,2198241,2198273,2198305,2198337,2198369,2198401,0,0,2198433,2198465,2198497,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,0,23068672,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,2133281,2097505,2105889,0,2097697,2135777,2097633,2097441]),new Uint32Array([2197889,2197921,2197953,2197985,2198017,2198049,2198081,2198113,2198145,2198177,2198209,2198241,2198273,2198305,2198337,2198369]),new Uint32Array([2132514,2132610,2160386,2133090,2133186,2160450,2160514,2133282,2160578,2133570,2106178,2160642,2133858,2160706,2160770,2134146]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,6291456,23068672,23068672,6291456,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2184737,6291456,2184769,6291456,2184801,6291456,2184833,6291456,2184865,6291456,2184897,6291456,2184929,6291456,2184961,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,2186753,6291456,6291456,6291456,6291456,2186785,2186817,2186849,2173569,2186881,10496355,10495395,10575521]),new Uint32Array([0,0,2097729,0,0,0,0,2106017,0,2097505,0,2097185,0,2135777,2097633,2097441]),new Uint32Array([2189537,6291456,2189569,6291456,2189601,6291456,2189633,6291456,2189665,6291456,2189697,6291456,2189729,6291456,2189761,6291456]),new Uint32Array([2202497,6291456,2202529,6291456,2202561,6291456,2202593,6291456,2202625,6291456,2202657,6291456,2202689,6291456,2202721,6291456]),new Uint32Array([2245217,2218369,2245249,2245282,2245345,2245377,2245410,2245474,2245537,2245569,2245601,2245633,2245665,2245665,2245697,2245729]),new Uint32Array([6291456,0,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,23068672,6291456,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,2097377,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2176641,6291456,2176673,6291456,2176705,6291456,2176737,6291456,2176769,6291456,2176801,6291456,2176833,6291456,2176865,6291456]),new Uint32Array([2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2174369,2174369,0,0,2100833,2100737]),new Uint32Array([2116513,2190817,2190849,2190881,2190913,2190945,2116609,2190977,2191009,2191041,2191073,2117185,2191105,2191137,2191169,2191201]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2167617,2167649,2167681,2167713,2167745,2167777,2167809,6291456,2167841,2167873,2167905,2167937,2167969,2168001,2168033,4240130]),new Uint32Array([2165122,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122,2134562,2132162,2132834,2136866]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2186209,2186241,2186273,2186305,2186337,2186369,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,0,23068672,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([0,10537921,10610689,10610273,10610497,10610529,10610305,10610721,10489601,10489697,10610337,10575617,10554529,2221761,2197217,10496577]),new Uint32Array([2105473,2105569,2105601,2112289,0,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2125346,2153410,2153474,2127394,2153538,2153602,2153666,2153730,2105507,2105476,2153794,2153858,2153922,2153986,2154050,2105794]),new Uint32Array([2200449,2119681,2200481,2153313,2199873,2199905,2199937,2200513,2200545,2200577,2200609,2119105,2119201,2119297,2119393,2119489]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2175777,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2222273,2197217,2221473,2221505,2221089,2222305,2200865,2099681,2104481,2222337,2099905,2120737,2222369,2103713,2100225,2098785]),new Uint32Array([2201377,6291456,2201409,6291456,2201441,6291456,2201473,6291456,2201505,6291456,2201537,6291456,2201569,6291456,6291456,23068672]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([2200897,6291456,2200929,6291456,2200961,6291456,2200993,6291456,2201025,6291456,2180865,6291456,2201057,6291456,2201089,6291456]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2161154,2161410,2138658,2161474,2161538,2097666,2097186,2097474,2162946,2132450,2163010,2163074,2136162,2163138,2161666,2161730]),new Uint32Array([2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953]),new Uint32Array([0,0,0,0,0,0,23068672,23068672,0,0,0,0,2145410,2145474,0,6291456]),new Uint32Array([2244161,2216065,2212769,2244193,2244225,2244257,2244290,2244353,2244385,2244417,2244449,2218273,2244481,2244514,2244577,2244609]),new Uint32Array([2125730,2125699,2125795,2125891,2125987,2154114,2154178,2154242,2154306,2154370,2154434,2154498,2126082,2126178,2126274,2126083]),new Uint32Array([2237665,2237697,2237697,2237697,2237730,2237793,2237825,2237857,2237890,2237953,2237985,2238017,2238049,2238081,2238113,2238145]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150146,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2214369,2238593,2238625,2238657,2238689,2238721,2238753,2238785,2238817,2238850,2238913,2238945,2238977,2235457,2239009,2239041]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2252066,2252130,2252193,2252225,2252257,2252290,2252353,2252385,2252417,2252449,2252481,2252513,2252545,2252578,2252641,2252673]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,2197857]),new Uint32Array([2224866,2224930,2224994,2225058,2225122,2225186,2225250,2225314,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2219490,2219554,2219617,2219649,2219681,2219714,2219778,2219842,2219905,2219937,0,0,0,0,0,0]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665]),new Uint32Array([2220161,2220161,2220193,2220193,2220193,2220193,2220225,2220225,2220225,2220225,2220257,2220257,2220257,2220257,2220289,2220289]),new Uint32Array([2192673,2192705,2192737,2192769,2192801,2192833,2192865,2118049,2192897,2117473,2117761,2192929,2192961,2192993,2193025,2193057]),new Uint32Array([2179297,6291456,2179329,6291456,2179361,6291456,2179393,6291456,2179425,6291456,2179457,6291456,2179489,6291456,2179521,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2235745,2235777,2193633,2235809,2235841,2235873,2235905,2235937,2235969,2116513,2116705,2236001,2200513,2199905,2200545,2236033]),new Uint32Array([2113153,2108481,2113345,2113441,2232993,2233025,0,0,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761]),new Uint32Array([2170593,6291456,2170625,6291456,2170657,6291456,2170689,2170721,6291456,2170753,6291456,6291456,2170785,6291456,2170817,2170849]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2166786,2166850,0,0,0,0]),new Uint32Array([23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,0]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2134562,2132162,2132834,2136866,2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058]),new Uint32Array([6291456,6291456,2098337,2101441,10531458,2153473,6291456,6291456,10531522,2100737,2108193,6291456,2106499,2106595,2106691,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2233122,2233186,2233250,2233314,2233378,2233442,2233506,2233570,2233634,2233698,2233762,2233826,2233890,2233954,2234018,2234082]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2205217,2205249,2205281,2205313,2205345,2205377,2205409,2205441,2205473,2205505,2205537,2205569,2205601,2205633,2205665,2205697]),new Uint32Array([6291456,0,6291456,0,0,0,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([2173601,2173761,2174081,2173569,2174241,2174113,2173953,6291456,2174305,6291456,2174337,6291456,2174369,6291456,2174401,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2152450,2152514,2099653,2104452,2099813,2122243,2099973,2152578,2122339,2122435,2122531,2122627,2122723,2104580,2122819,2152642]),new Uint32Array([2236385,2236417,2236449,2236482,2236545,2215425,2236577,2236609,2236641,2236673,2215457,2236705,2236737,2236770,2215489,2236833]),new Uint32Array([2163394,2159746,2163458,2131362,2163522,2160130,2163778,2132226,2163842,2132898,2163906,2161410,2138658,2097666,2136162,2163650]),new Uint32Array([2218721,2246913,2246946,2216385,2247010,2247074,2215009,2247137,2247169,2216481,2247201,2247233,2247266,2247330,2247330,0]),new Uint32Array([2129730,2129762,2129858,2129731,2129827,2156482,2156482,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0,0,0,0,6291456,0,0]),new Uint32Array([2203969,2204001,2181377,2204033,2204065,6291456,2204097,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2169473,6291456,2169505,6291456,2169537,6291456,2169569,6291456,2169601,6291456,2169633,6291456,2169665,6291456,2169697,6291456]),new Uint32Array([2141542,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220801,2220801,2220801,2220801,2220833,2220833,2220865,2220865,2220865,2220865,2220897,2220897,2220897,2220897,2139873,2139873]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,0,0,0,0,0,0,6291456,0]),new Uint32Array([2214849,2218433,2218465,2218497,2218529,2218561,2214881,2218593,2218625,2218657,2218689,2218721,2218753,2216545,2218785,2218817]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058,2165122,2132802,2132706,2164866]),new Uint32Array([2207649,2207681,2207713,2207745,2207777,2207809,2207841,2207873,2207905,2207937,2207969,2208001,2208033,2208065,2208097,2208129]),new Uint32Array([2123683,2105092,2152706,2123779,2105220,2152770,2100453,2098755,2123906,2124002,2124098,2124194,2124290,2124386,2124482,2124578]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,0,0,0,0,0,0,0,10485857]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([10508163,10508259,10508355,10508451,2200129,2200161,2192737,2200193,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203553,6291456,2203585,6291456,6291456,6291456,2203617,6291456,2203649,6291456,2203681,6291456,2203713,6291456,2203745,6291456]),new Uint32Array([18884449,18884065,23068672,18884417,18884034,18921185,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18874368]),new Uint32Array([2247393,2247426,2247489,2247521,2247553,2247586,2247649,2247681,2247713,2247745,2247777,2247810,2247873,2247905,2247937,2247969]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,2160577,2133857,2235297,0,2235329,0]),new Uint32Array([2182593,6291456,2182625,6291456,2182657,6291456,2182689,6291456,2182721,6291456,2182753,6291456,2182785,6291456,2182817,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102402,2102403,6291456,2110050]),new Uint32Array([2149890,2108323,2149954,6291456,2113441,6291456,2149057,6291456,2113441,6291456,2105473,2167265,2111137,2105505,6291456,2108353]),new Uint32Array([2219105,2219137,2195233,2251554,2251617,2251649,2251681,2251713,2251746,2251810,2251873,2251905,2251937,2251970,2252033,2219169]),new Uint32Array([2203009,6291456,2203041,6291456,2203073,6291456,2203105,6291456,2203137,6291456,2203169,6291456,2203201,6291456,2203233,6291456]),new Uint32Array([2128195,2128291,2128387,2128483,2128579,2128675,2128771,2128867,2128963,2129059,2129155,2129251,2129347,2129443,2129539,2129635]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2140964,2141156,2140966,2141158,2141350]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2225378,2225442,2225506,2225570,2225634,2225698,2225762,2225826,2225890,2225954,2226018,2226082,2226146,2226210,2226274,2226338]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417]),new Uint32Array([2108353,2108417,0,2105601,2108193,2157121,2157313,2157377,2157441,2100897,6291456,2108419,2173953,2173633,2173633,2173953]),new Uint32Array([2111713,2173121,2111905,2098177,2173153,2173185,2173217,2113153,2113345,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2190753]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,2197249,6291456,2117377,2197281,2197313,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,23068672]),new Uint32Array([2173281,6291456,2173313,6291456,2173345,6291456,2173377,6291456,0,0,10532546,6291456,6291456,6291456,10562017,2173441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2159426,2159490,2159554,2159362,2159618,2159682,2139522,2136450,2159746,2159810,2159874,2130978,2131074,2131266,2131362,2159938]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203233,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2203265,6291456,2203297,6291456,2203329,2203361,6291456]),new Uint32Array([6291456,6291456,2148418,2148482,2148546,0,6291456,2148610,2186529,2186561,2148417,2148545,2148482,10495778,2143969,10495778]),new Uint32Array([2134146,2139426,2160962,2134242,2161218,2161282,2161346,2161410,2138658,2134722,2134434,2134818,2097666,2097346,2097698,2105986]),new Uint32Array([2198881,2198913,2198945,2198977,2199009,2199041,2199073,2199105,2199137,2199169,2199201,2199233,2199265,2199297,2199329,2199361]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([10610561,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2183873,6291456,2183905,6291456,2183937,6291456,2183969,6291456,2184001,6291456,2184033,6291456,2184065,6291456,2184097,6291456]),new Uint32Array([2244642,2244706,2244769,2244801,2218305,2244833,2244865,2244897,2244929,2244961,2244993,2245026,2245089,2245122,2245185,0]),new Uint32Array([6291456,6291456,2116513,2116609,2116705,2116801,2199873,2199905,2199937,2199969,2190913,2200001,2200033,2200065,2200097,2191009]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2180673,2180705,2180737,2180769,2180801,2180833,0,0]),new Uint32Array([2098081,2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150402]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,2145666,2145730,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665]),new Uint32Array([2187073,6291456,6291456,6291456,6291456,2098241,2098241,2108353,2100897,2111905,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102404,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2100612,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10485857]),new Uint32Array([2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([2217697,2217729,2217761,2217793,2217825,2217857,2217889,2217921,2217953,2215873,2217985,2215905,2218017,2218049,2218081,2218113]),new Uint32Array([2211233,2218849,2216673,2218881,2218913,2218945,2218977,2219009,2216833,2219041,2215137,2219073,2216865,2209505,2219105,2216897]),new Uint32Array([2240097,2240129,2240161,2240193,2240225,2240257,2240289,2240321,2240353,2240386,2240449,2240481,2240513,2240545,2207905,2240578]),new Uint32Array([6291456,6291456,2202273,6291456,2202305,6291456,2202337,6291456,2202369,6291456,2202401,6291456,2202433,6291456,2202465,6291456]),new Uint32Array([0,23068672,23068672,18923394,23068672,18923458,18923522,18884099,18923586,18884195,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2201121,6291456,2201153,6291456,2201185,6291456,2201217,6291456,2201249,6291456,2201281,6291456,2201313,6291456,2201345,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2211041,2211073,2211105,2211137,2211169,2211201,2211233,2211265,2211297,2211329,2211361,2211393,2211425,2211457,2211489,2211521]),new Uint32Array([2181825,6291456,2181857,6291456,2181889,6291456,2181921,6291456,2181953,6291456,2181985,6291456,2182017,6291456,2182049,6291456]),new Uint32Array([2162337,2097633,2097633,2097633,2097633,2132705,2132705,2132705,2132705,2097153,2097153,2097153,2097153,2133089,2133089,2133089]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,2148545,6291456,2173473,6291456,2148865,6291456,2173505,6291456,2173537,6291456,2173569,6291456,2149121,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2207137,2207169,2207201,2207233,2207265,2207297,2207329,2207361,2207393,2207425,2207457,2207489,2207521,2207553,2207585,2207617]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,23068672,23068672,0,0,0,0,0,0]),new Uint32Array([2198401,2198433,2198465,2198497,0,2198529,2198561,2198593,2198625,2198657,2198689,2198721,2198753,2198785,2198817,2198849]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2216385,2118721,2216417,2216449,2216481,2216513,2216545,2211233,2216577,2216609,2216641,2216673,2216705,2216737,2216737,2216769]),new Uint32Array([2216801,2216833,2216865,2216897,2216929,2216961,2216993,2215169,2217025,2217057,2217089,2217121,2217154,2217217,0,0]),new Uint32Array([2210593,2191809,2210625,2210657,2210689,2210721,2210753,2210785,2210817,2210849,2191297,2210881,2210913,2210945,2210977,2211009]),new Uint32Array([0,0,2105825,0,0,2111905,2105473,0,0,2112289,2108193,2112481,2112577,0,2098305,2108321]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,2097153,2134241,0,2132705,0,0,2131297,0,2133089,0,2133857,0,2220769,0,2235361]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,6291456,6291456,14680064]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2171873,6291456,2171905,6291456,2171937,6291456,2171969,6291456,2172001,6291456,2172033,6291456,2172065,6291456,2172097,6291456]),new Uint32Array([2220929,2220929,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2133857,2134145,2134145,2134145,2134145,2134241,2134241,2134241,2134241,2105889,2105889,2105889,2105889,2097185,2097185,2097185]),new Uint32Array([2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,10499619,10499715,10499811,10499907]),new Uint32Array([0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2144322,2144386,2144450,2144514,2144578,2144642,2144706,2144770]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0,0,2111905,2105473,2105569]),new Uint32Array([2236321,2236353,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2152194,2121283,2103684,2103812,2097986,2098533,2097990,2098693,2098595,2098853,2099013,2103940,2121379,2121475,2121571,2104068]),new Uint32Array([2206241,2206273,2206305,2206337,2206369,2206401,2206433,2206465,2206497,2206529,2206561,2206593,2206625,2206657,2206689,2206721]),new Uint32Array([6291456,6291456,6291456,6291456,16777216,16777216,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,10538818,10538882,6291456,6291456,2150338]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2214369,2214401,2214433,2214465,2214497,2214529,2214561,2214593,2194977,2214625,2195073,2214657,2214689,2214721,6291456,6291456]),new Uint32Array([2097152,2097152,2097152,2097152,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2182081,6291456,2182113,6291456,2182145,6291456,2182177,6291456,2182209,6291456,2182241,6291456,2182273,6291456,2182305,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146881,2146945,2147009,2147073,2147137,2147201,2147265,2147329]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672]),new Uint32Array([0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2122915,2123011,2123107,2104708,2123203,2123299,2123395,2100133,2104836,2100290,2100293,2104962,2104964,2098052,2123491,2123587]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,2171169,6291456,2171201,6291456,2171233,6291456,2171265,6291456,2171297,6291456,2171329,6291456,6291456,2171361,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2148994,2149058,2149122,0,6291456,2149186,2186945,2173537,2148993,2149121,2149058,10531458,10496066,0]),new Uint32Array([2195009,2195041,2195073,2195105,2195137,2195169,2195201,2195233,2195265,2195297,2195329,2195361,2195393,2195425,2195457,2195489]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,0,0,6291456,6291456]),new Uint32Array([2182849,6291456,2182881,6291456,2182913,6291456,2182945,6291456,2182977,6291456,2183009,6291456,2183041,6291456,2183073,6291456]),new Uint32Array([2211553,2210081,2211585,2211617,2211649,2211681,2211713,2211745,2211777,2211809,2209569,2211841,2211873,2211905,2211937,2211969]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2166594,2127298,2166658,2142978,2141827,2166722]),new Uint32Array([2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2185761,2185793,2185825,2185857,2185889,2185921,0,0]),new Uint32Array([6291456,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456]),new Uint32Array([0,0,0,2220961,2220961,2220961,2220961,2144193,2144193,2159201,2159201,2159265,2159265,2144194,2220993,2220993]),new Uint32Array([2192641,2235393,2235425,2152257,2116609,2235457,2235489,2200065,2235521,2235553,2235585,2212449,2235617,2235649,2235681,2235713]),new Uint32Array([2194049,2194081,2194113,2194145,2194177,2194209,2194241,2194273,2194305,2194337,2194369,2194401,2194433,2194465,2194497,2194529]),new Uint32Array([2196673,2208641,2208673,2208705,2208737,2208769,2208801,2208833,2208865,2208897,2208929,2208961,2208993,2209025,2209057,2209089]),new Uint32Array([2191681,2191713,2191745,2191777,2153281,2191809,2191841,2191873,2191905,2191937,2191969,2192001,2192033,2192065,2192097,2192129]),new Uint32Array([2230946,2231010,2231074,2231138,2231202,2231266,2231330,2231394,2231458,2231522,2231586,2231650,2231714,2231778,2231842,2231906]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2185953,2185985,2186017,2186049,2186081,2186113,2186145,2186177]),new Uint32Array([2139811,2139907,2097284,2105860,2105988,2106116,2106244,2097444,2097604,2097155,10485778,10486344,2106372,6291456,0,0]),new Uint32Array([2110051,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2172385,6291456,2172417,6291456,2172449,6291456,2172481,6291456,2172513,6291456,2172545,6291456,2172577,6291456,2172609,6291456]),new Uint32Array([0,0,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2249345,2249377,2249409,2249441,2249473,2249505,2249537,2249570,2210209,2249633,2249665,2249697,2249729,2249761,2249793,2216769]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2187169,2187201,2187233,2187265,2187297,2187329,2187361,2187393,2187425,2187457,2187489,2187521,2187553,2187585,2187617,2187649]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,6291456,6291456,0,0,0,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2182337,6291456,2182369,6291456,2182401,6291456,2182433,6291456,2182465,6291456,2182497,6291456,2182529,6291456,2182561,6291456]),new Uint32Array([2138179,2138275,2138371,2138467,2134243,2134435,2138563,2138659,2138755,2138851,2138947,2139043,2138947,2138755,2139139,2139235]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2250498,2250562,2250625,2250657,2208321,2250689,2250721,2250753,2250785,2250817,2250849,2218945,2250881,2250913,2250945,0]),new Uint32Array([2170369,2105569,2098305,2108481,2173249,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,0,2108193,0,0,0,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2100897,2100897,2105569,2105569,6291456,2112289,2149826,6291456,6291456,2112481,2112577,2098177,2098177,2098177,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,2169953,2169985,6291456,2170017,6291456,2170049,2170081,6291456,2170113,2170145,2170177,6291456,6291456,2170209,2170241]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220641,2220641,2220673,2220673,2220673,2220673,2220705,2220705,2220705,2220705,2220737,2220737,2220737,2220737,2220769,2220769]),new Uint32Array([2127650,2127746,2127842,2127938,2128034,2128130,2128226,2128322,2128418,2127523,2127619,2127715,2127811,2127907,2128003,2128099]),new Uint32Array([2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177]),new Uint32Array([0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2204705,2204737,2204769,2204801,2204833,2204865,2204897,2204929,2204961,2204993,2205025,2205057,2205089,2205121,2205153,2205185]),new Uint32Array([2176385,6291456,2176417,6291456,2176449,6291456,2176481,6291456,2176513,6291456,2176545,6291456,2176577,6291456,2176609,6291456]),new Uint32Array([2195521,2195553,2195585,2195617,2195649,2195681,2117857,2195713,2195745,2195777,2195809,2195841,2195873,2195905,2195937,2195969]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113]),new Uint32Array([2131586,2132450,2135970,2135778,2161602,2136162,2163650,2161794,2135586,2163714,2137186,2131810,2160290,2135170,2097506,2159554]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,0,0,0,0]),new Uint32Array([2116513,2116609,2116705,2116801,2116897,2116993,2117089,2117185,2117281,2117377,2117473,2117569,2117665,2117761,2117857,2117953]),new Uint32Array([2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100802,2101154,2101282,2101410,2101538,2101666,2101794]),new Uint32Array([2100289,2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2098977,2150241,2150305]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,2109955,6291456,6291456,0,0,0,0]),new Uint32Array([18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,0,0]),new Uint32Array([2130979,2131075,2131075,2131171,2131267,2131363,2131459,2131555,2131651,2131651,2131747,2131843,2131939,2132035,2132131,2132227]),new Uint32Array([0,2177793,6291456,2177825,6291456,2177857,6291456,2177889,6291456,2177921,6291456,2177953,6291456,2177985,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2113345,0,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2136643,2136739,2136835,2136931,2137027,2137123,2137219,2137315,2137411,2137507,2137603,2137699,2137795,2137891,2137987,2138083]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2174433,6291456,2174465,6291456,2174497,6291456,2174529,6291456,2174561,6291456,2174593,6291456,2174625,6291456,2174657,6291456]),new Uint32Array([0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([10496547,10496643,2105505,2149698,6291456,10496739,10496835,2170273,6291456,2149762,2105825,2111713,2111713,2111713,2111713,2168673]),new Uint32Array([6291456,2143490,2143490,2143490,2171649,6291456,2171681,2171713,2171745,6291456,2171777,6291456,2171809,6291456,2171841,6291456]),new Uint32Array([2159106,2159106,2159170,2159170,2159234,2159234,2159298,2159298,2159298,2159362,2159362,2159362,2106401,2106401,2106401,2106401]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137]),new Uint32Array([2108417,2181217,2181249,2181281,2170433,2170401,2181313,2181345,2181377,2181409,2181441,2181473,2181505,2181537,2170529,2181569]),new Uint32Array([2218433,2245761,2245793,2245825,2245857,2245890,2245953,2245986,2209665,2246050,2246113,2246146,2246210,2246274,2246337,2246369]),new Uint32Array([2230754,2230818,2230882,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184129,6291456,2184161,6291456,2184193,6291456,6291456,6291456,6291456,6291456,2146818,2183361,6291456,6291456,2142978,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2135170,2097506,2130691,2130787,2130883,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122]),new Uint32Array([2108515,2108611,2100740,2108707,2108803,2108899,2108995,2109091,2109187,2109283,2109379,2109475,2109571,2109667,2109763,2100738]),new Uint32Array([2102788,2102916,2103044,2120515,2103172,2120611,2120707,2098373,2103300,2120803,2120899,2120995,2103428,2103556,2121091,2121187]),new Uint32Array([2158082,2158146,0,2158210,2158274,0,2158338,2158402,2158466,2129922,2158530,2158594,2158658,2158722,2158786,2158850]),new Uint32Array([10499619,10499715,10499811,10499907,10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059]),new Uint32Array([2239585,2239618,2239681,2239713,0,2191969,2239745,2239777,2192033,2239809,2239841,2239874,2239937,2239970,2240033,2240065]),new Uint32Array([2252705,2252738,2252801,2252833,2252865,2252897,2252930,2252994,2253057,2253089,2253121,2253154,2253217,2253250,2219361,2219361]),new Uint32Array([2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,10538050,10538114,10538178,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2226402,2226466,2226530,2226594,2226658,2226722,2226786,2226850,2226914,2226978,2227042,2227106,2227170,2227234,2227298,2227362]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,2144066,2144130,2144194,2144258,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2124674,2124770,2123875,2123971,2124067,2124163,2124259,2124355,2124451,2124547,2124643,2124739,2124835,2124931,2125027,2125123]),new Uint32Array([2168065,6291456,2168097,6291456,2168129,6291456,2168161,6291456,2168193,6291456,2168225,6291456,2168257,6291456,2168289,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2100610,2100611,6291456,2107842,2107843,6291456,6291456,6291456,6291456,10537922,6291456,10537986,6291456]),new Uint32Array([2174849,2174881,2174913,2174945,2174977,2175009,2175041,2175073,2175105,2175137,2175169,2175201,2175233,2175265,2175297,2175329]),new Uint32Array([2154562,2154626,2154690,2154754,2141858,2154818,2154882,2127298,2154946,2127298,2155010,2155074,2155138,2155202,2155266,2155202]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0]),new Uint32Array([2200641,2150786,2150850,2150914,2150978,2151042,2106562,2151106,2150562,2151170,2151234,2151298,2151362,2151426,2151490,2151554]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456]),new Uint32Array([2220289,2220289,2220321,2220321,2220321,2220321,2220353,2220353,2220353,2220353,2220385,2220385,2220385,2220385,2220417,2220417]),new Uint32Array([2155330,2155394,0,2155458,2155522,2155586,2105732,0,2155650,2155714,2155778,2125314,2155842,2155906,2126274,2155970]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0]),new Uint32Array([2097729,2106017,2106017,2106017,2106017,2131297,2131297,2131297,2131297,2106081,2106081,2162049,2162049,2105953,2105953,2162337]),new Uint32Array([2097185,2097697,2097697,2097697,2097697,2135777,2135777,2135777,2135777,2097377,2097377,2097377,2097377,2097601,2097601,2097217]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([2139331,2139427,2139523,2139043,2133571,2132611,2139619,2139715,0,0,0,0,0,0,0,0]),new Uint32Array([2174113,2174145,2100897,2098177,2108289,2100865,2173601,2173633,2173985,2174113,2174145,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,23068672,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,18923778,23068672,23068672,23068672,23068672,18923842,23068672,23068672,23068672,23068672,18923906,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,0,2133857,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2177537,6291456,2177569,6291456,2177601,6291456,2177633,6291456,2177665,6291456,2177697,6291456,2177729,6291456,2177761,6291456]),new Uint32Array([2212481,2212513,2212545,2212577,2197121,2212609,2212641,2212673,2212705,2212737,2212769,2212801,2212833,2212865,2212897,2212929]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2098241,2108353,2170209,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,6291456,2108193,2172417,2112481,2098177]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456])],t=new Uint16Array([616,616,565,147,161,411,330,2,131,131,328,454,241,408,86,86,696,113,285,350,325,301,473,214,639,232,447,64,369,598,124,672,567,223,621,154,107,86,86,86,86,86,86,505,86,68,634,86,218,218,218,218,486,218,218,513,188,608,216,86,217,463,668,85,700,360,184,86,86,86,647,402,153,10,346,718,662,260,145,298,117,1,443,342,138,54,563,86,240,572,218,70,387,86,118,460,641,602,86,86,306,218,86,692,86,86,86,86,86,162,707,86,458,26,86,218,638,86,86,86,86,86,65,449,86,86,306,183,86,58,391,667,86,157,131,131,131,131,86,433,131,406,31,218,247,86,86,693,218,581,351,86,438,295,69,462,45,126,173,650,14,295,69,97,168,187,641,78,523,390,69,108,287,664,173,219,83,295,69,108,431,426,173,694,412,115,628,52,257,398,641,118,501,121,69,579,151,423,173,620,464,121,69,382,151,476,173,27,53,121,86,594,578,226,173,86,632,130,86,96,228,268,641,622,563,86,86,21,148,650,131,131,321,43,144,343,381,531,131,131,178,20,86,399,156,375,164,541,30,60,715,198,92,118,131,131,86,86,306,407,86,280,457,196,488,358,131,131,244,86,86,143,86,86,86,86,86,667,563,86,86,86,86,86,86,86,86,86,86,86,86,86,336,363,86,86,336,86,86,380,678,67,86,86,86,678,86,86,86,512,86,307,86,708,86,86,86,86,86,528,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,563,307,86,86,86,86,86,104,450,337,86,720,86,32,450,397,86,86,86,587,218,558,708,708,293,708,86,86,86,86,86,694,205,86,8,86,86,86,86,549,86,667,697,697,679,86,458,460,86,86,650,86,708,543,86,86,86,245,86,86,86,140,218,127,708,708,458,197,131,131,131,131,500,86,86,483,251,86,306,510,515,86,722,86,86,86,65,201,86,86,483,580,470,86,86,86,368,131,131,131,694,114,110,555,86,86,123,721,163,142,713,418,86,317,675,209,218,218,218,371,545,592,629,490,603,199,46,320,525,680,310,279,388,111,42,252,593,607,235,617,410,377,50,548,135,356,17,520,189,116,392,600,349,332,482,699,690,535,119,106,451,71,152,667,131,218,218,265,671,637,492,504,533,683,269,269,658,86,86,86,86,86,86,86,86,86,491,619,86,86,6,86,86,86,86,86,86,86,86,86,86,86,229,86,86,86,86,86,86,86,86,86,86,86,86,667,86,86,171,131,118,131,656,206,234,571,89,334,670,246,311,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,534,86,86,86,86,86,86,82,86,86,86,86,86,430,86,86,86,86,86,86,86,86,86,599,86,324,86,470,69,640,264,131,626,101,174,86,86,667,233,105,73,374,394,221,204,84,28,326,86,86,471,86,86,86,109,573,86,171,200,200,200,200,218,218,86,86,86,86,460,131,131,131,86,506,86,86,86,86,86,220,404,34,614,47,442,305,25,612,338,601,648,7,344,255,131,131,51,86,312,507,563,86,86,86,86,588,86,86,86,86,86,530,511,86,458,3,435,384,556,522,230,527,86,118,86,86,717,86,137,273,79,181,484,23,93,112,655,249,417,703,370,87,98,313,684,585,155,465,596,481,695,18,416,428,61,701,706,282,643,495,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,86,86,86,171,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,650,131,422,542,420,263,24,172,86,86,86,86,86,566,86,86,132,540,395,353,494,519,19,485,284,472,131,131,131,16,714,86,211,708,86,86,86,694,698,86,86,483,704,708,218,272,86,86,120,86,159,478,86,307,247,86,86,663,597,459,627,667,86,86,277,455,39,302,86,250,86,86,86,271,99,452,306,281,329,400,200,86,86,362,549,352,646,461,323,586,86,86,4,708,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,717,86,518,86,86,650,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,125,554,480,300,613,72,333,288,561,544,604,48,719,91,169,176,590,224,76,191,29,559,560,231,537,166,477,538,256,437,131,131,469,167,40,0,685,266,441,705,239,642,475,568,640,610,299,673,517,318,385,22,202,180,179,359,424,215,90,66,521,653,467,682,453,409,479,88,131,661,35,303,15,262,666,630,712,131,131,618,659,175,218,195,347,193,227,261,150,165,709,546,294,569,710,270,413,376,524,55,242,38,419,529,170,657,3,304,122,379,278,131,651,86,67,576,458,458,131,131,86,86,86,86,86,86,86,118,309,86,86,547,86,86,86,86,667,650,664,131,131,86,86,56,131,131,131,131,131,131,131,131,86,307,86,86,86,664,238,650,86,86,717,86,118,86,86,315,86,59,86,86,574,549,131,131,340,57,436,86,86,86,86,86,86,458,708,499,691,62,86,650,86,86,694,86,86,86,319,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,86,549,694,131,131,131,131,131,131,131,131,131,77,86,86,139,86,502,86,86,86,667,595,131,131,131,86,12,86,13,86,609,131,131,131,131,86,86,86,625,86,669,86,86,182,129,86,5,694,104,86,86,86,86,131,131,86,86,386,171,86,86,86,345,86,324,86,589,86,213,36,131,131,131,131,131,86,86,86,86,104,131,131,131,141,290,80,677,86,86,86,267,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,515,86,86,33,136,669,86,711,515,86,86,550,640,86,104,708,515,86,159,372,717,86,86,444,515,86,86,663,37,86,563,460,86,390,624,702,131,131,131,131,389,59,708,86,86,341,208,708,635,295,69,108,431,508,100,190,131,131,131,131,131,131,131,131,86,86,86,649,516,660,131,131,86,86,86,218,631,708,131,131,131,131,131,131,131,131,131,131,86,86,341,575,238,514,131,131,86,86,86,218,291,708,307,131,86,86,306,367,708,131,131,131,86,378,697,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,615,253,86,86,86,292,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,104,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,69,86,341,553,549,86,307,86,86,645,275,455,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,708,131,131,131,131,131,131,86,86,86,86,86,86,667,460,86,86,86,86,86,86,86,86,86,86,86,86,717,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,104,86,667,459,131,131,131,131,131,131,86,458,225,86,86,86,516,549,11,390,405,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,460,44,218,197,711,515,131,131,131,131,664,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,118,307,104,286,591,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,681,86,86,75,185,314,582,86,358,496,474,86,104,131,86,86,86,86,146,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,171,86,640,131,131,131,131,131,131,131,131,246,503,689,339,674,81,258,415,439,128,562,366,414,246,503,689,583,222,557,316,636,665,186,355,95,670,246,503,689,339,674,557,258,415,439,186,355,95,670,246,503,689,446,644,536,652,331,532,335,440,274,421,297,570,74,425,364,425,606,552,403,509,134,365,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,218,218,218,498,218,218,577,627,551,497,572,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,553,354,236,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,296,455,131,131,456,243,103,86,41,459,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,9,276,158,716,393,564,383,489,401,654,210,654,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,650,86,86,86,86,86,86,717,667,563,563,563,86,549,102,686,133,246,605,86,448,86,86,207,307,131,131,131,641,86,177,611,445,373,194,584,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,307,171,86,86,86,86,86,86,86,717,86,86,86,86,86,460,131,131,650,86,86,86,694,708,86,86,694,86,458,131,131,131,131,131,131,667,694,289,650,667,131,131,86,640,131,131,664,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,460,86,86,86,86,86,86,86,86,86,86,86,86,86,458,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,466,203,149,429,94,432,160,687,539,63,237,283,192,248,348,259,427,526,396,676,254,468,487,212,327,623,49,633,322,493,434,688,357,361,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]);function r(r){return r>=196608?r>=917760&&r<=917999?18874368:0:e[t[r>>4]][15&r]}return{mapStr:"\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064a\u0647 \u0648\u0633\u0644\u0645\u062c\u0644 \u062c\u0644\u0627\u0644\u0647\u30ad\u30ed\u30e1\u30fc\u30c8\u30ebrad\u2215s2\u30a8\u30b9\u30af\u30fc\u30c9\u30ad\u30ed\u30b0\u30e9\u30e0\u30ad\u30ed\u30ef\u30c3\u30c8\u30b0\u30e9\u30e0\u30c8\u30f3\u30af\u30eb\u30bc\u30a4\u30ed\u30b5\u30f3\u30c1\u30fc\u30e0\u30d1\u30fc\u30bb\u30f3\u30c8\u30d4\u30a2\u30b9\u30c8\u30eb\u30d5\u30a1\u30e9\u30c3\u30c9\u30d6\u30c3\u30b7\u30a7\u30eb\u30d8\u30af\u30bf\u30fc\u30eb\u30de\u30f3\u30b7\u30e7\u30f3\u30df\u30ea\u30d0\u30fc\u30eb\u30ec\u30f3\u30c8\u30b2\u30f3\u2032\u2032\u2032\u20321\u204410viii(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)\u222b\u222b\u222b\u222b(\uc624\uc804)(\uc624\ud6c4)\u30a2\u30d1\u30fc\u30c8\u30a2\u30eb\u30d5\u30a1\u30a2\u30f3\u30da\u30a2\u30a4\u30cb\u30f3\u30b0\u30a8\u30fc\u30ab\u30fc\u30ab\u30e9\u30c3\u30c8\u30ab\u30ed\u30ea\u30fc\u30ad\u30e5\u30ea\u30fc\u30ae\u30eb\u30c0\u30fc\u30af\u30ed\u30fc\u30cd\u30b5\u30a4\u30af\u30eb\u30b7\u30ea\u30f3\u30b0\u30d0\u30fc\u30ec\u30eb\u30d5\u30a3\u30fc\u30c8\u30dd\u30a4\u30f3\u30c8\u30de\u30a4\u30af\u30ed\u30df\u30af\u30ed\u30f3\u30e1\u30ac\u30c8\u30f3\u30ea\u30c3\u30c8\u30eb\u30eb\u30fc\u30d6\u30eb\u682a\u5f0f\u4f1a\u793ekcalm\u2215s2c\u2215kg\u0627\u0643\u0628\u0631\u0645\u062d\u0645\u062f\u0635\u0644\u0639\u0645\u0631\u0633\u0648\u0644\u0631\u06cc\u0627\u06441\u204441\u204423\u20444 \u0308\u0301\u0fb2\u0f71\u0f80\u0fb3\u0f71\u0f80 \u0308\u0342 \u0313\u0300 \u0313\u0301 \u0313\u0342 \u0314\u0300 \u0314\u0301 \u0314\u0342 \u0308\u0300\u2035\u2035\u2035a/ca/sc/oc/utelfax1\u204471\u204491\u204432\u204431\u204452\u204453\u204454\u204451\u204465\u204461\u204483\u204485\u204487\u20448xii0\u20443\u222e\u222e\u222e(1)(2)(3)(4)(5)(6)(7)(8)(9)(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)::====(\u1100)(\u1102)(\u1103)(\u1105)(\u1106)(\u1107)(\u1109)(\u110b)(\u110c)(\u110e)(\u110f)(\u1110)(\u1111)(\u1112)(\uac00)(\ub098)(\ub2e4)(\ub77c)(\ub9c8)(\ubc14)(\uc0ac)(\uc544)(\uc790)(\ucc28)(\uce74)(\ud0c0)(\ud30c)(\ud558)(\uc8fc)(\u4e00)(\u4e8c)(\u4e09)(\u56db)(\u4e94)(\u516d)(\u4e03)(\u516b)(\u4e5d)(\u5341)(\u6708)(\u706b)(\u6c34)(\u6728)(\u91d1)(\u571f)(\u65e5)(\u682a)(\u6709)(\u793e)(\u540d)(\u7279)(\u8ca1)(\u795d)(\u52b4)(\u4ee3)(\u547c)(\u5b66)(\u76e3)(\u4f01)(\u8cc7)(\u5354)(\u796d)(\u4f11)(\u81ea)(\u81f3)pte10\u670811\u670812\u6708ergltd\u30a2\u30fc\u30eb\u30a4\u30f3\u30c1\u30a6\u30a9\u30f3\u30aa\u30f3\u30b9\u30aa\u30fc\u30e0\u30ab\u30a4\u30ea\u30ac\u30ed\u30f3\u30ac\u30f3\u30de\u30ae\u30cb\u30fc\u30b1\u30fc\u30b9\u30b3\u30eb\u30ca\u30b3\u30fc\u30dd\u30bb\u30f3\u30c1\u30c0\u30fc\u30b9\u30ce\u30c3\u30c8\u30cf\u30a4\u30c4\u30d1\u30fc\u30c4\u30d4\u30af\u30eb\u30d5\u30e9\u30f3\u30da\u30cb\u30d2\u30d8\u30eb\u30c4\u30da\u30f3\u30b9\u30da\u30fc\u30b8\u30d9\u30fc\u30bf\u30dc\u30eb\u30c8\u30dd\u30f3\u30c9\u30db\u30fc\u30eb\u30db\u30fc\u30f3\u30de\u30a4\u30eb\u30de\u30c3\u30cf\u30de\u30eb\u30af\u30e4\u30fc\u30c9\u30e4\u30fc\u30eb\u30e6\u30a2\u30f3\u30eb\u30d4\u30fc10\u70b911\u70b912\u70b913\u70b914\u70b915\u70b916\u70b917\u70b918\u70b919\u70b920\u70b921\u70b922\u70b923\u70b924\u70b9hpabardm2dm3khzmhzghzthzmm2cm2km2mm3cm3km3kpampagpalogmilmolppmv\u2215ma\u2215m10\u65e511\u65e512\u65e513\u65e514\u65e515\u65e516\u65e517\u65e518\u65e519\u65e520\u65e521\u65e522\u65e523\u65e524\u65e525\u65e526\u65e527\u65e528\u65e529\u65e530\u65e531\u65e5galffiffl\u05e9\u05bc\u05c1\u05e9\u05bc\u05c2 \u064c\u0651 \u064d\u0651 \u064e\u0651 \u064f\u0651 \u0650\u0651 \u0651\u0670\u0640\u064e\u0651\u0640\u064f\u0651\u0640\u0650\u0651\u062a\u062c\u0645\u062a\u062d\u062c\u062a\u062d\u0645\u062a\u062e\u0645\u062a\u0645\u062c\u062a\u0645\u062d\u062a\u0645\u062e\u062c\u0645\u062d\u062d\u0645\u064a\u062d\u0645\u0649\u0633\u062d\u062c\u0633\u062c\u062d\u0633\u062c\u0649\u0633\u0645\u062d\u0633\u0645\u062c\u0633\u0645\u0645\u0635\u062d\u062d\u0635\u0645\u0645\u0634\u062d\u0645\u0634\u062c\u064a\u0634\u0645\u062e\u0634\u0645\u0645\u0636\u062d\u0649\u0636\u062e\u0645\u0637\u0645\u062d\u0637\u0645\u0645\u0637\u0645\u064a\u0639\u062c\u0645\u0639\u0645\u0645\u0639\u0645\u0649\u063a\u0645\u0645\u063a\u0645\u064a\u063a\u0645\u0649\u0641\u062e\u0645\u0642\u0645\u062d\u0642\u0645\u0645\u0644\u062d\u0645\u0644\u062d\u064a\u0644\u062d\u0649\u0644\u062c\u062c\u0644\u062e\u0645\u0644\u0645\u062d\u0645\u062d\u062c\u0645\u062d\u064a\u0645\u062c\u062d\u0645\u062c\u0645\u0645\u062e\u0645\u0645\u062c\u062e\u0647\u0645\u062c\u0647\u0645\u0645\u0646\u062d\u0645\u0646\u062d\u0649\u0646\u062c\u0645\u0646\u062c\u0649\u0646\u0645\u064a\u0646\u0645\u0649\u064a\u0645\u0645\u0628\u062e\u064a\u062a\u062c\u064a\u062a\u062c\u0649\u062a\u062e\u064a\u062a\u062e\u0649\u062a\u0645\u064a\u062a\u0645\u0649\u062c\u0645\u064a\u062c\u062d\u0649\u062c\u0645\u0649\u0633\u062e\u0649\u0635\u062d\u064a\u0634\u062d\u064a\u0636\u062d\u064a\u0644\u062c\u064a\u0644\u0645\u064a\u064a\u062d\u064a\u064a\u062c\u064a\u064a\u0645\u064a\u0645\u0645\u064a\u0642\u0645\u064a\u0646\u062d\u064a\u0639\u0645\u064a\u0643\u0645\u064a\u0646\u062c\u062d\u0645\u062e\u064a\u0644\u062c\u0645\u0643\u0645\u0645\u062c\u062d\u064a\u062d\u062c\u064a\u0645\u062c\u064a\u0641\u0645\u064a\u0628\u062d\u064a\u0633\u062e\u064a\u0646\u062c\u064a\u0635\u0644\u06d2\u0642\u0644\u06d2\ud834\udd58\ud834\udd65\ud834\udd6e\ud834\udd58\ud834\udd65\ud834\udd6f\ud834\udd58\ud834\udd65\ud834\udd70\ud834\udd58\ud834\udd65\ud834\udd71\ud834\udd58\ud834\udd65\ud834\udd72\ud834\uddb9\ud834\udd65\ud834\udd6e\ud834\uddba\ud834\udd65\ud834\udd6e\ud834\uddb9\ud834\udd65\ud834\udd6f\ud834\uddba\ud834\udd65\ud834\udd6f\u3014s\u3015ppv\u3014\u672c\u3015\u3014\u4e09\u3015\u3014\u4e8c\u3015\u3014\u5b89\u3015\u3014\u70b9\u3015\u3014\u6253\u3015\u3014\u76d7\u3015\u3014\u52dd\u3015\u3014\u6557\u3015 \u0304 \u0301 \u0327ssi\u0307ijl\xb7\u02bcnd\u017eljnjdz \u0306 \u0307 \u030a \u0328 \u0303 \u030b \u03b9\u0565\u0582\u0627\u0674\u0648\u0674\u06c7\u0674\u064a\u0674\u0915\u093c\u0916\u093c\u0917\u093c\u091c\u093c\u0921\u093c\u0922\u093c\u092b\u093c\u092f\u093c\u09a1\u09bc\u09a2\u09bc\u09af\u09bc\u0a32\u0a3c\u0a38\u0a3c\u0a16\u0a3c\u0a17\u0a3c\u0a1c\u0a3c\u0a2b\u0a3c\u0b21\u0b3c\u0b22\u0b3c\u0e4d\u0e32\u0ecd\u0eb2\u0eab\u0e99\u0eab\u0ea1\u0f42\u0fb7\u0f4c\u0fb7\u0f51\u0fb7\u0f56\u0fb7\u0f5b\u0fb7\u0f40\u0fb5\u0f71\u0f72\u0f71\u0f74\u0fb2\u0f80\u0fb3\u0f80\u0f92\u0fb7\u0f9c\u0fb7\u0fa1\u0fb7\u0fa6\u0fb7\u0fab\u0fb7\u0f90\u0fb5a\u02be\u1f00\u03b9\u1f01\u03b9\u1f02\u03b9\u1f03\u03b9\u1f04\u03b9\u1f05\u03b9\u1f06\u03b9\u1f07\u03b9\u1f20\u03b9\u1f21\u03b9\u1f22\u03b9\u1f23\u03b9\u1f24\u03b9\u1f25\u03b9\u1f26\u03b9\u1f27\u03b9\u1f60\u03b9\u1f61\u03b9\u1f62\u03b9\u1f63\u03b9\u1f64\u03b9\u1f65\u03b9\u1f66\u03b9\u1f67\u03b9\u1f70\u03b9\u03b1\u03b9\u03ac\u03b9\u1fb6\u03b9 \u0342\u1f74\u03b9\u03b7\u03b9\u03ae\u03b9\u1fc6\u03b9\u1f7c\u03b9\u03c9\u03b9\u03ce\u03b9\u1ff6\u03b9 \u0333!! \u0305???!!?rs\xb0c\xb0fnosmtmivix\u2add\u0338 \u3099 \u309a\u3088\u308a\u30b3\u30c8333435\ucc38\uace0\uc8fc\uc758363738394042444546474849503\u67084\u67085\u67086\u67087\u67088\u67089\u6708hgev\u30ae\u30ac\u30c7\u30b7\u30c9\u30eb\u30ca\u30ce\u30d4\u30b3\u30d3\u30eb\u30da\u30bd\u30db\u30f3\u30ea\u30e9\u30ec\u30e0daauovpciu\u5e73\u6210\u662d\u548c\u5927\u6b63\u660e\u6cbbna\u03bcakakbmbgbpfnf\u03bcf\u03bcgmg\u03bclmldlklfmnm\u03bcmpsns\u03bcsmsnv\u03bcvkvpwnw\u03bcwmwkwk\u03c9m\u03c9bqcccddbgyhainkkktlnlxphprsrsvwbst\u0574\u0576\u0574\u0565\u0574\u056b\u057e\u0576\u0574\u056d\u05d9\u05b4\u05f2\u05b7\u05e9\u05c1\u05e9\u05c2\u05d0\u05b7\u05d0\u05b8\u05d0\u05bc\u05d1\u05bc\u05d2\u05bc\u05d3\u05bc\u05d4\u05bc\u05d5\u05bc\u05d6\u05bc\u05d8\u05bc\u05d9\u05bc\u05da\u05bc\u05db\u05bc\u05dc\u05bc\u05de\u05bc\u05e0\u05bc\u05e1\u05bc\u05e3\u05bc\u05e4\u05bc\u05e6\u05bc\u05e7\u05bc\u05e8\u05bc\u05ea\u05bc\u05d5\u05b9\u05d1\u05bf\u05db\u05bf\u05e4\u05bf\u05d0\u05dc\u0626\u0627\u0626\u06d5\u0626\u0648\u0626\u06c7\u0626\u06c6\u0626\u06c8\u0626\u06d0\u0626\u0649\u0626\u062c\u0626\u062d\u0626\u0645\u0626\u064a\u0628\u062c\u0628\u0645\u0628\u0649\u0628\u064a\u062a\u0649\u062a\u064a\u062b\u062c\u062b\u0645\u062b\u0649\u062b\u064a\u062e\u062d\u0636\u062c\u0636\u0645\u0637\u062d\u0638\u0645\u063a\u062c\u0641\u062c\u0641\u062d\u0641\u0649\u0641\u064a\u0642\u062d\u0642\u0649\u0642\u064a\u0643\u0627\u0643\u062c\u0643\u062d\u0643\u062e\u0643\u0644\u0643\u0649\u0643\u064a\u0646\u062e\u0646\u0649\u0646\u064a\u0647\u062c\u0647\u0649\u0647\u064a\u064a\u0649\u0630\u0670\u0631\u0670\u0649\u0670\u0626\u0631\u0626\u0632\u0626\u0646\u0628\u0632\u0628\u0646\u062a\u0631\u062a\u0632\u062a\u0646\u062b\u0631\u062b\u0632\u062b\u0646\u0645\u0627\u0646\u0631\u0646\u0632\u0646\u0646\u064a\u0631\u064a\u0632\u0626\u062e\u0626\u0647\u0628\u0647\u062a\u0647\u0635\u062e\u0646\u0647\u0647\u0670\u062b\u0647\u0633\u0647\u0634\u0647\u0637\u0649\u0637\u064a\u0639\u0649\u0639\u064a\u063a\u0649\u063a\u064a\u0633\u0649\u0633\u064a\u0634\u0649\u0634\u064a\u0635\u0649\u0635\u064a\u0636\u0649\u0636\u064a\u0634\u062e\u0634\u0631\u0633\u0631\u0635\u0631\u0636\u0631\u0627\u064b \u064b\u0640\u064b\u0640\u0651 \u0652\u0640\u0652\u0644\u0622\u0644\u0623\u0644\u0625\ud834\udd57\ud834\udd650,1,2,3,4,5,6,7,8,9,wzhvsdwcmcmddj\u307b\u304b\u30b3\u30b3\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0135\u0137\u013a\u013c\u013e\u0142\u0144\u0146\u0148\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\xff\u017a\u017c\u0253\u0183\u0185\u0254\u0188\u0256\u0257\u018c\u01dd\u0259\u025b\u0192\u0260\u0263\u0269\u0268\u0199\u026f\u0272\u0275\u01a1\u01a3\u01a5\u0280\u01a8\u0283\u01ad\u0288\u01b0\u028a\u028b\u01b4\u01b6\u0292\u01b9\u01bd\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef\u01f5\u0195\u01bf\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u019e\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233\u2c65\u023c\u019a\u2c66\u0242\u0180\u0289\u028c\u0247\u0249\u024b\u024d\u024f\u0266\u0279\u027b\u0281\u0295\u0371\u0373\u02b9\u0377;\u03f3\u03ad\u03af\u03cc\u03cd\u03b2\u03b3\u03b4\u03b5\u03b6\u03b8\u03ba\u03bb\u03bd\u03be\u03bf\u03c0\u03c1\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03ca\u03cb\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef\u03f8\u03fb\u037b\u037c\u037d\u0450\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045a\u045b\u045c\u045d\u045e\u045f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0529\u052b\u052d\u052f\u0561\u0562\u0563\u0564\u0566\u0567\u0568\u0569\u056a\u056c\u056e\u056f\u0570\u0571\u0572\u0573\u0575\u0577\u0578\u0579\u057a\u057b\u057c\u057d\u057f\u0580\u0581\u0583\u0584\u0585\u0586\u0f0b\u2d27\u2d2d\u10dc\u13f0\u13f1\u13f2\u13f3\u13f4\u13f5\ua64b\u0250\u0251\u1d02\u025c\u1d16\u1d17\u1d1d\u1d25\u0252\u0255\u025f\u0261\u0265\u026a\u1d7b\u029d\u026d\u1d85\u029f\u0271\u0270\u0273\u0274\u0278\u0282\u01ab\u1d1c\u0290\u0291\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff\u1f10\u1f11\u1f12\u1f13\u1f14\u1f15\u1f30\u1f31\u1f32\u1f33\u1f34\u1f35\u1f36\u1f37\u1f40\u1f41\u1f42\u1f43\u1f44\u1f45\u1f51\u1f53\u1f55\u1f57\u1fb0\u1fb1\u1f72\u0390\u1fd0\u1fd1\u1f76\u03b0\u1fe0\u1fe1\u1f7a\u1fe5`\u1f78\u2010+\u2212\u2211\u3008\u3009\u2c30\u2c31\u2c32\u2c33\u2c34\u2c35\u2c36\u2c37\u2c38\u2c39\u2c3a\u2c3b\u2c3c\u2c3d\u2c3e\u2c3f\u2c40\u2c41\u2c42\u2c43\u2c44\u2c45\u2c46\u2c47\u2c48\u2c49\u2c4a\u2c4b\u2c4c\u2c4d\u2c4e\u2c4f\u2c50\u2c51\u2c52\u2c53\u2c54\u2c55\u2c56\u2c57\u2c58\u2c59\u2c5a\u2c5b\u2c5c\u2c5d\u2c5e\u2c61\u026b\u1d7d\u027d\u2c68\u2c6a\u2c6c\u2c73\u2c76\u023f\u0240\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3\u2cec\u2cee\u2cf3\u2d61\u6bcd\u9f9f\u4e28\u4e36\u4e3f\u4e59\u4e85\u4ea0\u4eba\u513f\u5165\u5182\u5196\u51ab\u51e0\u51f5\u5200\u529b\u52f9\u5315\u531a\u5338\u535c\u5369\u5382\u53b6\u53c8\u53e3\u56d7\u58eb\u5902\u590a\u5915\u5973\u5b50\u5b80\u5bf8\u5c0f\u5c22\u5c38\u5c6e\u5c71\u5ddb\u5de5\u5df1\u5dfe\u5e72\u5e7a\u5e7f\u5ef4\u5efe\u5f0b\u5f13\u5f50\u5f61\u5f73\u5fc3\u6208\u6236\u624b\u652f\u6534\u6587\u6597\u65a4\u65b9\u65e0\u66f0\u6b20\u6b62\u6b79\u6bb3\u6bcb\u6bd4\u6bdb\u6c0f\u6c14\u722a\u7236\u723b\u723f\u7247\u7259\u725b\u72ac\u7384\u7389\u74dc\u74e6\u7518\u751f\u7528\u7530\u758b\u7592\u7676\u767d\u76ae\u76bf\u76ee\u77db\u77e2\u77f3\u793a\u79b8\u79be\u7a74\u7acb\u7af9\u7c73\u7cf8\u7f36\u7f51\u7f8a\u7fbd\u8001\u800c\u8012\u8033\u807f\u8089\u81e3\u81fc\u820c\u821b\u821f\u826e\u8272\u8278\u864d\u866b\u8840\u884c\u8863\u897e\u898b\u89d2\u8a00\u8c37\u8c46\u8c55\u8c78\u8c9d\u8d64\u8d70\u8db3\u8eab\u8eca\u8f9b\u8fb0\u8fb5\u9091\u9149\u91c6\u91cc\u9577\u9580\u961c\u96b6\u96b9\u96e8\u9751\u975e\u9762\u9769\u97cb\u97ed\u97f3\u9801\u98a8\u98db\u98df\u9996\u9999\u99ac\u9aa8\u9ad8\u9adf\u9b25\u9b2f\u9b32\u9b3c\u9b5a\u9ce5\u9e75\u9e7f\u9ea5\u9ebb\u9ec3\u9ecd\u9ed1\u9ef9\u9efd\u9f0e\u9f13\u9f20\u9f3b\u9f4a\u9f52\u9f8d\u9f9c\u9fa0.\u3012\u5344\u5345\u1101\u11aa\u11ac\u11ad\u1104\u11b0\u11b1\u11b2\u11b3\u11b4\u11b5\u111a\u1108\u1121\u110a\u110d\u1161\u1162\u1163\u1164\u1165\u1166\u1167\u1168\u1169\u116a\u116b\u116c\u116d\u116e\u116f\u1170\u1171\u1172\u1173\u1174\u1175\u1114\u1115\u11c7\u11c8\u11cc\u11ce\u11d3\u11d7\u11d9\u111c\u11dd\u11df\u111d\u111e\u1120\u1122\u1123\u1127\u1129\u112b\u112c\u112d\u112e\u112f\u1132\u1136\u1140\u1147\u114c\u11f1\u11f2\u1157\u1158\u1159\u1184\u1185\u1188\u1191\u1192\u1194\u119e\u11a1\u4e0a\u4e2d\u4e0b\u7532\u4e19\u4e01\u5929\u5730\u554f\u5e7c\u7b8f\uc6b0\u79d8\u7537\u9069\u512a\u5370\u6ce8\u9805\u5199\u5de6\u53f3\u533b\u5b97\u591c\u30c6\u30cc\u30e2\u30e8\u30f0\u30f1\u30f2\ua641\ua643\ua645\ua647\ua649\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua699\ua69b\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua77a\ua77c\u1d79\ua77f\ua781\ua783\ua785\ua787\ua78c\ua791\ua793\ua797\ua799\ua79b\ua79d\ua79f\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\u026c\u029e\u0287\uab53\ua7b5\ua7b7\uab37\uab52\u13a0\u13a1\u13a2\u13a3\u13a4\u13a5\u13a6\u13a7\u13a8\u13a9\u13aa\u13ab\u13ac\u13ad\u13ae\u13af\u13b0\u13b1\u13b2\u13b3\u13b4\u13b5\u13b6\u13b7\u13b8\u13b9\u13ba\u13bb\u13bc\u13bd\u13be\u13bf\u13c0\u13c1\u13c2\u13c3\u13c4\u13c5\u13c6\u13c7\u13c8\u13c9\u13ca\u13cb\u13cc\u13cd\u13ce\u13cf\u13d0\u13d1\u13d2\u13d3\u13d4\u13d5\u13d6\u13d7\u13d8\u13d9\u13da\u13db\u13dc\u13dd\u13de\u13df\u13e0\u13e1\u13e2\u13e3\u13e4\u13e5\u13e6\u13e7\u13e8\u13e9\u13ea\u13eb\u13ec\u13ed\u13ee\u13ef\u8c48\u66f4\u8cc8\u6ed1\u4e32\u53e5\u5951\u5587\u5948\u61f6\u7669\u7f85\u863f\u87ba\u88f8\u908f\u6a02\u6d1b\u70d9\u73de\u843d\u916a\u99f1\u4e82\u5375\u6b04\u721b\u862d\u9e1e\u5d50\u6feb\u85cd\u8964\u62c9\u81d8\u881f\u5eca\u6717\u6d6a\u72fc\u90ce\u4f86\u51b7\u52de\u64c4\u6ad3\u7210\u76e7\u8606\u865c\u8def\u9732\u9b6f\u9dfa\u788c\u797f\u7da0\u83c9\u9304\u8ad6\u58df\u5f04\u7c60\u807e\u7262\u78ca\u8cc2\u96f7\u58d8\u5c62\u6a13\u6dda\u6f0f\u7d2f\u7e37\u964b\u52d2\u808b\u51dc\u51cc\u7a1c\u7dbe\u83f1\u9675\u8b80\u62cf\u8afe\u4e39\u5be7\u6012\u7387\u7570\u5317\u78fb\u4fbf\u5fa9\u4e0d\u6ccc\u6578\u7d22\u53c3\u585e\u7701\u8449\u8aaa\u6bba\u6c88\u62fe\u82e5\u63a0\u7565\u4eae\u5169\u51c9\u6881\u7ce7\u826f\u8ad2\u91cf\u52f5\u5442\u5eec\u65c5\u6ffe\u792a\u95ad\u9a6a\u9e97\u9ece\u66c6\u6b77\u8f62\u5e74\u6190\u6200\u649a\u6f23\u7149\u7489\u79ca\u7df4\u806f\u8f26\u84ee\u9023\u934a\u5217\u52a3\u54bd\u70c8\u88c2\u5ec9\u5ff5\u637b\u6bae\u7c3e\u7375\u4ee4\u56f9\u5dba\u601c\u73b2\u7469\u7f9a\u8046\u9234\u96f6\u9748\u9818\u4f8b\u79ae\u91b4\u96b8\u60e1\u4e86\u50da\u5bee\u5c3f\u6599\u71ce\u7642\u84fc\u907c\u6688\u962e\u5289\u677b\u67f3\u6d41\u6e9c\u7409\u7559\u786b\u7d10\u985e\u622e\u9678\u502b\u5d19\u6dea\u8f2a\u5f8b\u6144\u6817\u9686\u5229\u540f\u5c65\u6613\u674e\u68a8\u6ce5\u7406\u75e2\u7f79\u88cf\u88e1\u96e2\u533f\u6eba\u541d\u71d0\u7498\u85fa\u96a3\u9c57\u9e9f\u6797\u6dcb\u81e8\u7b20\u7c92\u72c0\u7099\u8b58\u4ec0\u8336\u523a\u5207\u5ea6\u62d3\u7cd6\u5b85\u6d1e\u66b4\u8f3b\u964d\u5ed3\u5140\u55c0\u585a\u6674\u51de\u732a\u76ca\u793c\u795e\u7965\u798f\u9756\u7cbe\u8612\u8af8\u9038\u90fd\u98ef\u98fc\u9928\u9db4\u90de\u96b7\u4fae\u50e7\u514d\u52c9\u52e4\u5351\u559d\u5606\u5668\u5840\u58a8\u5c64\u6094\u6168\u618e\u61f2\u654f\u65e2\u6691\u6885\u6d77\u6e1a\u6f22\u716e\u722b\u7422\u7891\u7949\u7948\u7950\u7956\u798d\u798e\u7a40\u7a81\u7bc0\u7e09\u7e41\u7f72\u8005\u81ed\u8279\u8457\u8910\u8996\u8b01\u8b39\u8cd3\u8d08\u8fb6\u96e3\u97ff\u983b\u6075\ud850\udeee\u8218\u4e26\u51b5\u5168\u4f80\u5145\u5180\u52c7\u52fa\u5555\u5599\u55e2\u58b3\u5944\u5954\u5a62\u5b28\u5ed2\u5ed9\u5f69\u5fad\u60d8\u614e\u6108\u6160\u6234\u63c4\u641c\u6452\u6556\u671b\u6756\u6edb\u6ecb\u701e\u77a7\u7235\u72af\u7471\u7506\u753b\u761d\u761f\u76db\u76f4\u774a\u7740\u78cc\u7ab1\u7c7b\u7d5b\u7f3e\u8352\u83ef\u8779\u8941\u8986\u8abf\u8acb\u8aed\u8b8a\u8f38\u9072\u9199\u9276\u967c\u97db\u980b\u9b12\ud84a\udc4a\ud84a\udc44\ud84c\udfd5\u3b9d\u4018\u4039\ud854\ude49\ud857\udcd0\ud85f\uded3\u9f43\u9f8e\u05e2\u05dd\u0671\u067b\u067e\u0680\u067a\u067f\u0679\u06a4\u06a6\u0684\u0683\u0686\u0687\u068d\u068c\u068e\u0688\u0698\u0691\u06a9\u06af\u06b3\u06b1\u06ba\u06bb\u06c0\u06c1\u06be\u06d3\u06ad\u06cb\u06c5\u06c9\u3001\u3016\u3017\u2014\u2013_{}\u3010\u3011\u300a\u300b\u300c\u300d\u300e\u300f[]#&*-<>\\$%@\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:r}}()}.apply(t,[]))||(e.exports=r)},2645:function(e,t,r){var n,i;n=[r(8717),r(5626)],void 0===(i=function(e,t){return function(e,t){function r(r,n,i){for(var o=[],a=e.ucs2.decode(r),s=0;s>23,d=c>>21&3,h=c>>5&65535,p=31&c,m=t.mapStr.substr(h,p);if(0===d||n&&1&f)throw new Error("Illegal char "+l);1===d?o.push(m):2===d?o.push(i?m:l):3===d&&o.push(l)}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)}function o(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),l=u.join(".");if(s){if(l.length<1||l.length>253)throw new Error("DNS name has wrong length: "+l);for(i=0;i63)throw new Error("DNS label has wrong length: "+c)}}return l}function a(e,t){return void 0===t&&(t={}),n(e,!1,"useStd3ASCII"in t&&t.useStd3ASCII)}return{toUnicode:a,toAscii:o}}(e,t)}.apply(t,n))||(e.exports=i)},6897:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,c=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=d,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=l}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,l=8*o-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,l-=8);e[r+h-p]|=128*m}},1596:e=>{"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},4147:(e,t,r)=>{const n=r(4737),i=r(2038),o=r(4539);e.exports=function(e,t){if("string"!==typeof e)return!1;if(t instanceof Object||(t={}),(e=e.toLowerCase()).endsWith(".")&&(e=e.slice(0,e.length-1)),t.allowUnicode&&(e=n.toASCII(e)),e.length>253)return!1;if(!/^([\u0E00-\u0E7Fa-z0-9-._*]+)$/g.test(e))return!1;if(t.topLevel&&o[e.replace(/\.$/,"")])return!0;const r=e.match(/(.*)\.(([\u0E00-\u0E7Fa-z0-9]+)(\.[a-z0-9]+))/);let a=null,s=null;if(r&&r.length>2&&i[r[2]]&&(a=r[2],s=r[1].split(".")),!s){if(s=e.split("."),s.length<=1)return!1;a=s.pop();if(!/^(?:xn--)?(?!^\d+$)[\u0E00-\u0E7Fa-z0-9]+$/gi.test(a))return!1}if(!1===t.subdomain&&s.length>1)return!1;return s.every((function(e,r){if(t.wildcard&&0===r&&"*"===e&&s.length>1)return!0;let n=/^([\u0E00-\u0E7Fa-zA-Z0-9-_]+)$/g;r===s.length-1&&(n=/^([\u0E00-\u0E7Fa-zA-Z0-9-]+)$/g);const i=(e.match(/--(--)?/g)||[]).length,o=(e.match(/xn--/g)||[]).length;if(r===s.length-1&&i!==o)return!1;return n.test(e)&&e.length<64&&!e.startsWith("-")&&!e.endsWith("-")}))}},4737:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>y,default:()=>A,encode:()=>b,toASCII:()=>w,toUnicode:()=>v,ucs2decode:()=>h,ucs2encode:()=>p});const n=2147483647,i=36,o=/^xn--/,a=/[^\0-\x7F]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,c=String.fromCharCode;function f(e){throw new RangeError(u[e])}function d(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]);const i=function(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}((e=e.replace(s,".")).split("."),t).join(".");return n+i}function h(e){const t=[];let r=0;const n=e.length;for(;r=55296&&i<=56319&&rString.fromCodePoint(...e),m=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},g=function(e,t,r){let n=0;for(e=r?l(e/700):e>>1,e+=l(e/t);e>455;n+=i)e=l(e/35);return l(n+36*e/(e+38))},y=function(e){const t=[],r=e.length;let o=0,a=128,s=72,u=e.lastIndexOf("-");u<0&&(u=0);for(let n=0;n=128&&f("not-basic"),t.push(e.charCodeAt(n));for(let d=u>0?u+1:0;d=r&&f("invalid-input");const u=(c=e.charCodeAt(d++))>=48&&c<58?c-48+26:c>=65&&c<91?c-65:c>=97&&c<123?c-97:i;u>=i&&f("invalid-input"),u>l((n-o)/t)&&f("overflow"),o+=u*t;const h=a<=s?1:a>=s+26?26:a-s;if(ul(n/p)&&f("overflow"),t*=p}const h=t.length+1;s=g(o-u,h,0==u),l(o/h)>n-a&&f("overflow"),a+=l(o/h),o%=h,t.splice(o++,0,a)}var c;return String.fromCodePoint(...t)},b=function(e){const t=[],r=(e=h(e)).length;let o=128,a=0,s=72;for(const n of e)n<128&&t.push(c(n));const u=t.length;let d=u;for(u&&t.push("-");d=o&&tl((n-a)/h)&&f("overflow"),a+=(r-o)*h,o=r;for(const p of e)if(pn&&f("overflow"),p===o){let e=a;for(let r=i;;r+=i){const n=r<=s?1:r>=s+26?26:r-s;if(e{e.exports=["#01888C","#FC7500","#034F5D","#F73F01","#FC1960","#C7144C","#F3C100","#1598F2","#2465E1","#F19E02"]},3823:(e,t,r)=>{var n,i=r(3064),o=r(5649),a=r(922),s=r(1311);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",l(t)),a.attr("stroke","none")}function l(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,d=r.container,h=function(e,t){var r=30*t.random()-c/2;return e.map((function(e){var t=a(e);return t.rotate(r),t.hexString()}))}(s.slice(),n),p=f.rect(0,0,e,e);p.attr("fill",l(h)),p.attr("stroke","none");for(var m=0;m<3;m++)u(f,h,e,m,3);return d};var c=30},5649:(e,t,r)=>{var n=r(483);e.exports=function(e){var t=document.createElement("div");return t.style.borderRadius="50px",t.style.overflow="hidden",t.style.padding="0px",t.style.margin="0px",t.style.width=e+"px",t.style.height=e+"px",t.style.display="inline-block",{paper:n(t,100,100),container:t}}},7674:(e,t,r)=>{var n;!function(){"use strict";var i="input is invalid type",o="object"===typeof window,a=o?window:{};a.JS_SHA3_NO_WINDOW&&(o=!1);var s=!o&&"object"===typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"===typeof process&&process.versions&&process.versions.node?a=r.g:s&&(a=self);var u=!a.JS_SHA3_NO_COMMON_JS&&e.exports,l=r.amdO,c=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,f="0123456789abcdef".split(""),d=[4,1024,262144,67108864],h=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],g=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!c||!a.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 v=function(e,t,r){return function(n){return new R(e,t,e).update(n)[r]()}},w=function(e,t,r){return function(n,i){return new R(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return _["cshake"+e].update(t,n,i,o)[r]()}},x=function(e,t,r){return function(t,n,i,o){return _["kmac"+e].update(t,n,i,o)[r]()}},k=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 I(e,t,r){R.call(this,e,t,r)}R.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(i);if(null===e)throw new Error(i);if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!c||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var n,o,a=this.blocks,s=this.byteCount,u=e.length,l=this.blockCount,f=0,d=this.s;f>2]|=e[f]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(a[n>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=s){for(this.start=n-s,this.block=a[l],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},R.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!c||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n=0,o=e.length;if(t)n=o;else for(var a=0;a=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},R.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]+f[15&e]+f[e>>12&15]+f[e>>8&15]+f[e>>20&15]+f[e>>16&15]+f[e>>28&15]+f[e>>24&15];a%t===0&&(B(r),o=0)}return i&&(e=r[o],s+=f[e>>4&15]+f[15&e],i>1&&(s+=f[e>>12&15]+f[e>>8&15]),i>2&&(s+=f[e>>20&15]+f[e>>16&15])),s},R.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&&B(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},I.prototype=new R,I.prototype.finalize=function(){return this.encode(this.outputBits,!0),R.prototype.finalize.call(this)};var B=function(e){var t,r,n,i,o,a,s,u,l,c,f,d,h,m,g,y,b,v,w,A,x,k,E,S,_,C,P,N,O,U,T,M,R,I,B,L,j,F,D,z,H,q,K,W,V,G,Q,J,Y,X,Z,$,ee,te,re,ne,ie,oe,ae,se,ue,le,ce;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],l=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],f=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=(h=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|l>>>31),r=o^(l<<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^(c<<1|f>>>31),r=s^(f<<1|c>>>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^(d<<1|h>>>31),r=l^(h<<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=c^(i<<1|o>>>31),r=f^(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,m=e[0],g=e[1],G=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,N=e[20]<<3|e[21]>>>29,O=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,K=e[41]<<18|e[40]>>>14,I=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,U=e[33]<<13|e[32]>>>19,T=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,M=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=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,W=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,P=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,k=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=m^~y&v,e[1]=g^~b&w,e[10]=S^~C&N,e[11]=_^~P&O,e[20]=I^~L&F,e[21]=B^~j&D,e[30]=W^~G&J,e[31]=V^~Q&Y,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~v&A,e[3]=b^~w&x,e[12]=C^~N&U,e[13]=P^~O&T,e[22]=L^~F&z,e[23]=j^~D&H,e[32]=G^~J&X,e[33]=Q^~Y&Z,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&k,e[5]=w^~x&E,e[14]=N^~U&M,e[15]=O^~T&R,e[24]=F^~z&q,e[25]=D^~H&K,e[34]=J^~X&$,e[35]=Y^~Z&ee,e[44]=oe^~se&le,e[45]=ae^~ue&ce,e[6]=A^~k&m,e[7]=x^~E&g,e[16]=U^~M&S,e[17]=T^~R&_,e[26]=z^~q&I,e[27]=H^~K&B,e[36]=X^~$&W,e[37]=Z^~ee&V,e[46]=se^~le&te,e[47]=ue^~ce&re,e[8]=k^~m&y,e[9]=E^~g&b,e[18]=M^~S&C,e[19]=R^~_&P,e[28]=q^~I&L,e[29]=K^~B&j,e[38]=$^~W&G,e[39]=ee^~V&Q,e[48]=le^~te&ne,e[49]=ce^~re&ie,e[0]^=p[n],e[1]^=p[n+1]};if(u)e.exports=_;else{for(P=0;P{var t=function(e){void 0==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,e.constructor==Array?this.init_by_array(e,e.length):this.init_seed(e)};t.prototype.init_seed=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},t.prototype.init_by_array=function(e,t){var r,n,i;for(this.init_seed(19650218),r=1,n=0,i=this.N>t?this.N:t;i;i--){var o=this.mt[r-1]^this.mt[r-1]>>>30;this.mt[r]=(this.mt[r]^(1664525*((4294901760&o)>>>16)<<16)+1664525*(65535&o))+e[n]+n,this.mt[r]>>>=0,n++,++r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1),n>=t&&(n=0)}for(i=this.N-1;i;i--){o=this.mt[r-1]^this.mt[r-1]>>>30;this.mt[r]=(this.mt[r]^(1566083941*((4294901760&o)>>>16)<<16)+1566083941*(65535&o))-r,this.mt[r]>>>=0,++r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1)}this.mt[0]=2147483648},t.prototype.random_int=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var r;for(this.mti==this.N+1&&this.init_seed(5489),r=0;r>>1^t[1&e];for(;r>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},t.prototype.random_int31=function(){return this.random_int()>>>1},t.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},t.prototype.random=function(){return this.random_int()*(1/4294967296)},t.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},t.prototype.random_long=function(){return(67108864*(this.random_int()>>>5)+(this.random_int()>>>6))*(1/9007199254740992)},e.exports=t},7599:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},3488:(e,t,r)=>{"use strict";var n=r(3959);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},1942:(e,t,r)=>{e.exports=r(3488)()},3959:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},8717:e=>{"use strict";const t=2147483647,r=36,n=/^xn--/,i=/[^\0-\x7E]/,o=/[\x2E\u3002\uFF0E\uFF61]/g,a={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=Math.floor,u=String.fromCharCode;function l(e){throw new RangeError(a[e])}function c(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]);const i=function(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}((e=e.replace(o,".")).split("."),t).join(".");return n+i}function f(e){const t=[];let r=0;const n=e.length;for(;r=55296&&i<=56319&&r>1,e+=s(e/t);e>455;i+=r)e=s(e/35);return s(i+36*e/(e+38))},p=function(e){const n=[],i=e.length;let o=0,a=128,u=72,c=e.lastIndexOf("-");c<0&&(c=0);for(let t=0;t=128&&l("not-basic"),n.push(e.charCodeAt(t));for(let d=c>0?c+1:0;d=i&&l("invalid-input");const c=(f=e.charCodeAt(d++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:r;(c>=r||c>s((t-o)/n))&&l("overflow"),o+=c*n;const h=a<=u?1:a>=u+26?26:a-u;if(cs(t/p)&&l("overflow"),n*=p}const p=n.length+1;u=h(o-c,p,0==c),s(o/p)>t-a&&l("overflow"),a+=s(o/p),o%=p,n.splice(o++,0,a)}var f;return String.fromCodePoint(...n)},m=function(e){const n=[];let i=(e=f(e)).length,o=128,a=0,c=72;for(const t of e)t<128&&n.push(u(t));let p=n.length,m=p;for(p&&n.push("-");m=o&&ts((t-a)/f)&&l("overflow"),a+=(i-o)*f,o=i;for(const g of e)if(gt&&l("overflow"),g==o){let e=a;for(let t=r;;t+=r){const i=t<=c?1:t>=c+26?26:t-c;if(eString.fromCodePoint(...e)},decode:p,encode:m,toASCII:function(e){return c(e,(function(e){return i.test(e)?"xn--"+m(e):e}))},toUnicode:function(e){return c(e,(function(e){return n.test(e)?p(e.slice(4).toLowerCase()):e}))}};e.exports=g},483:e=>{window,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){var n,i;n=[r(2)],void 0===(i=function(e){function t(n){if(t.is(n,"function"))return r?n():e.on("raphael.DOMload",n);if(t.is(n,O))return t._engine.create[h](t,n.splice(0,3+t.is(n[0],N))).add(n);var i=Array.prototype.slice.call(arguments,0);if(t.is(i[i.length-1],"function")){var o=i.pop();return r?o.call(t._engine.create[h](t,i)):e.on("raphael.DOMload",(function(){o.call(t._engine.create[h](t,i))}))}return t._engine.create[h](t,arguments)}t.version="2.3.0",t.eve=e;var r,n,i,o,a=/[, ]+/,s={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},u=/\{(\d+)\}/g,l="hasOwnProperty",c={doc:document,win:window},f={was:Object.prototype[l].call(c.win,"Raphael"),is:c.win.Raphael},d=function(){this.ca=this.customAttributes={}},h="apply",p="concat",m="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,g="",y=" ",b=String,v="split",w="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[v](y),A={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},x=b.prototype.toLowerCase,k=Math,E=k.max,S=k.min,_=k.abs,C=k.pow,P=k.PI,N="number",O="array",U=Object.prototype.toString,T=(t._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),M={NaN:1,Infinity:1,"-Infinity":1},R=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,I=k.round,B=parseFloat,L=parseInt,j=b.prototype.toUpperCase,F=t._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},D=t._availableAnimAttrs={blur:N,"clip-rect":"csv",cx:N,cy:N,fill:"colour","fill-opacity":N,"font-size":N,height:N,opacity:N,path:"path",r:N,rx:N,ry:N,stroke:"colour","stroke-opacity":N,"stroke-width":N,transform:"transform",width:N,x:N,y:N},z=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,H={hs:1,rg:1},q=/,?([achlmqrstvxz]),?/gi,K=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,W=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,V=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,G=(t._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),Q=function(e,t){return B(e)-B(t)},J=function(e){return e},Y=t._rectPath=function(e,t,r,n,i){return i?[["M",e+i,t],["l",r-2*i,0],["a",i,i,0,0,1,i,i],["l",0,n-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-r,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-n],["a",i,i,0,0,1,i,-i],["z"]]:[["M",e,t],["l",r,0],["l",0,n],["l",-r,0],["z"]]},X=function(e,t,r,n){return null==n&&(n=r),[["M",e,t],["m",0,-n],["a",r,n,0,1,1,0,2*n],["a",r,n,0,1,1,0,-2*n],["z"]]},Z=t._getPath={path:function(e){return e.attr("path")},circle:function(e){var t=e.attrs;return X(t.cx,t.cy,t.r)},ellipse:function(e){var t=e.attrs;return X(t.cx,t.cy,t.rx,t.ry)},rect:function(e){var t=e.attrs;return Y(t.x,t.y,t.width,t.height,t.r)},image:function(e){var t=e.attrs;return Y(t.x,t.y,t.width,t.height)},text:function(e){var t=e._getBBox();return Y(t.x,t.y,t.width,t.height)},set:function(e){var t=e._getBBox();return Y(t.x,t.y,t.width,t.height)}},$=t.mapPath=function(e,t){if(!t)return e;var r,n,i,o,a,s,u;for(i=0,a=(e=Ce(e)).length;i',(ee=te.firstChild).style.behavior="url(#default#VML)",!ee||"object"!=typeof ee.adj)return t.type=g;te=null}function re(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var r in e)e[l](r)&&(t[r]=re(e[r]));return t}t.svg=!(t.vml="VML"==t.type),t._Paper=d,t.fn=n=d.prototype=t.prototype,t._id=0,t.is=function(e,t){return"finite"==(t=x.call(t))?!M[l](+e):"array"==t?e instanceof Array:"null"==t&&null===e||t==typeof e&&null!==e||"object"==t&&e===Object(e)||"array"==t&&Array.isArray&&Array.isArray(e)||U.call(e).slice(8,-1).toLowerCase()==t},t.angle=function(e,r,n,i,o,a){if(null==o){var s=e-n,u=r-i;return s||u?(180+180*k.atan2(-u,-s)/P+360)%360:0}return t.angle(e,r,o,a)-t.angle(n,i,o,a)},t.rad=function(e){return e%360*P/180},t.deg=function(e){return Math.round(180*e/P%360*1e3)/1e3},t.snapTo=function(e,r,n){if(n=t.is(n,"finite")?n:10,t.is(e,O)){for(var i=e.length;i--;)if(_(e[i]-r)<=n)return e[i]}else{var o=r%(e=+e);if(oe-n)return r-o+e}return r},t.createUUID=(i=/[xy]/g,o=function(e){var t=16*k.random()|0;return("x"==e?t:3&t|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(i,o).toUpperCase()}),t.setWindow=function(r){e("raphael.setWindow",t,c.win,r),c.win=r,c.doc=c.win.document,t._engine.initWin&&t._engine.initWin(c.win)};var ne=function(e){if(t.vml){var r,n=/^\s+|\s+$/g;try{var i=new ActiveXObject("htmlfile");i.write(""),i.close(),r=i.body}catch(e){r=createPopup().document.body}var o=r.createTextRange();ne=le((function(e){try{r.style.color=b(e).replace(n,g);var t=o.queryCommandValue("ForeColor");return"#"+("000000"+(t=(255&t)<<16|65280&t|(16711680&t)>>>16).toString(16)).slice(-6)}catch(e){return"none"}}))}else{var a=c.doc.createElement("i");a.title="Rapha\xebl Colour Picker",a.style.display="none",c.doc.body.appendChild(a),ne=le((function(e){return a.style.color=e,c.doc.defaultView.getComputedStyle(a,g).getPropertyValue("color")}))}return ne(e)},ie=function(){return"hsb("+[this.h,this.s,this.b]+")"},oe=function(){return"hsl("+[this.h,this.s,this.l]+")"},ae=function(){return this.hex},se=function(e,r,n){if(null==r&&t.is(e,"object")&&"r"in e&&"g"in e&&"b"in e&&(n=e.b,r=e.g,e=e.r),null==r&&t.is(e,"string")){var i=t.getRGB(e);e=i.r,r=i.g,n=i.b}return(e>1||r>1||n>1)&&(e/=255,r/=255,n/=255),[e,r,n]},ue=function(e,r,n,i){var o={r:e*=255,g:r*=255,b:n*=255,hex:t.rgb(e,r,n),toString:ae};return t.is(i,"finite")&&(o.opacity=i),o};function le(e,t,r){return function n(){var i=Array.prototype.slice.call(arguments,0),o=i.join("\u2400"),a=n.cache=n.cache||{},s=n.count=n.count||[];return a[l](o)?(function(e,t){for(var r=0,n=e.length;r=1e3&&delete a[s.shift()],s.push(o),a[o]=e[h](t,i),r?r(a[o]):a[o])}}function ce(){return this.hex}function fe(e,t){for(var r=[],n=0,i=e.length;i-2*!t>n;n+=2){var o=[{x:+e[n-2],y:+e[n-1]},{x:+e[n],y:+e[n+1]},{x:+e[n+2],y:+e[n+3]},{x:+e[n+4],y:+e[n+5]}];t?n?i-4==n?o[3]={x:+e[0],y:+e[1]}:i-2==n&&(o[2]={x:+e[0],y:+e[1]},o[3]={x:+e[2],y:+e[3]}):o[0]={x:+e[i-2],y:+e[i-1]}:i-4==n?o[3]=o[2]:n||(o[0]={x:+e[n],y:+e[n+1]}),r.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return r}t.color=function(e){var r;return t.is(e,"object")&&"h"in e&&"s"in e&&"b"in e?(r=t.hsb2rgb(e),e.r=r.r,e.g=r.g,e.b=r.b,e.hex=r.hex):t.is(e,"object")&&"h"in e&&"s"in e&&"l"in e?(r=t.hsl2rgb(e),e.r=r.r,e.g=r.g,e.b=r.b,e.hex=r.hex):(t.is(e,"string")&&(e=t.getRGB(e)),t.is(e,"object")&&"r"in e&&"g"in e&&"b"in e?(r=t.rgb2hsl(e),e.h=r.h,e.s=r.s,e.l=r.l,r=t.rgb2hsb(e),e.v=r.b):(e={hex:"none"}).r=e.g=e.b=e.h=e.s=e.v=e.l=-1),e.toString=ae,e},t.hsb2rgb=function(e,t,r,n){var i,o,a,s,u;return this.is(e,"object")&&"h"in e&&"s"in e&&"b"in e&&(r=e.b,t=e.s,n=e.o,e=e.h),s=(u=r*t)*(1-_((e=(e*=360)%360/60)%2-1)),i=o=a=r-u,ue(i+=[u,s,0,0,s,u][e=~~e],o+=[s,u,u,s,0,0][e],a+=[0,0,s,u,u,s][e],n)},t.hsl2rgb=function(e,t,r,n){var i,o,a,s,u;return this.is(e,"object")&&"h"in e&&"s"in e&&"l"in e&&(r=e.l,t=e.s,e=e.h),(e>1||t>1||r>1)&&(e/=360,t/=100,r/=100),s=(u=2*t*(r<.5?r:1-r))*(1-_((e=(e*=360)%360/60)%2-1)),i=o=a=r-u/2,ue(i+=[u,s,0,0,s,u][e=~~e],o+=[s,u,u,s,0,0][e],a+=[0,0,s,u,u,s][e],n)},t.rgb2hsb=function(e,t,r){var n,i;return e=(r=se(e,t,r))[0],t=r[1],r=r[2],{h:((0==(i=(n=E(e,t,r))-S(e,t,r))?null:n==e?(t-r)/i:n==t?(r-e)/i+2:(e-t)/i+4)+360)%6*60/360,s:0==i?0:i/n,b:n,toString:ie}},t.rgb2hsl=function(e,t,r){var n,i,o,a;return e=(r=se(e,t,r))[0],t=r[1],r=r[2],n=((i=E(e,t,r))+(o=S(e,t,r)))/2,{h:((0==(a=i-o)?null:i==e?(t-r)/a:i==t?(r-e)/a+2:(e-t)/a+4)+360)%6*60/360,s:0==a?0:n<.5?a/(2*n):a/(2-2*n),l:n,toString:oe}},t._path2string=function(){return this.join(",").replace(q,"$1")},t._preload=function(e,t){var r=c.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em",r.onload=function(){t.call(this),this.onload=null,c.doc.body.removeChild(this)},r.onerror=function(){c.doc.body.removeChild(this)},c.doc.body.appendChild(r),r.src=e},t.getRGB=le((function(e){if(!e||(e=b(e)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ce};if("none"==e)return{r:-1,g:-1,b:-1,hex:"none",toString:ce};!H[l](e.toLowerCase().substring(0,2))&&"#"!=e.charAt()&&(e=ne(e));var r,n,i,o,a,s,u=e.match(T);return u?(u[2]&&(i=L(u[2].substring(5),16),n=L(u[2].substring(3,5),16),r=L(u[2].substring(1,3),16)),u[3]&&(i=L((a=u[3].charAt(3))+a,16),n=L((a=u[3].charAt(2))+a,16),r=L((a=u[3].charAt(1))+a,16)),u[4]&&(s=u[4][v](z),r=B(s[0]),"%"==s[0].slice(-1)&&(r*=2.55),n=B(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),i=B(s[2]),"%"==s[2].slice(-1)&&(i*=2.55),"rgba"==u[1].toLowerCase().slice(0,4)&&(o=B(s[3])),s[3]&&"%"==s[3].slice(-1)&&(o/=100)),u[5]?(s=u[5][v](z),r=B(s[0]),"%"==s[0].slice(-1)&&(r*=2.55),n=B(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),i=B(s[2]),"%"==s[2].slice(-1)&&(i*=2.55),("deg"==s[0].slice(-3)||"\xb0"==s[0].slice(-1))&&(r/=360),"hsba"==u[1].toLowerCase().slice(0,4)&&(o=B(s[3])),s[3]&&"%"==s[3].slice(-1)&&(o/=100),t.hsb2rgb(r,n,i,o)):u[6]?(s=u[6][v](z),r=B(s[0]),"%"==s[0].slice(-1)&&(r*=2.55),n=B(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),i=B(s[2]),"%"==s[2].slice(-1)&&(i*=2.55),("deg"==s[0].slice(-3)||"\xb0"==s[0].slice(-1))&&(r/=360),"hsla"==u[1].toLowerCase().slice(0,4)&&(o=B(s[3])),s[3]&&"%"==s[3].slice(-1)&&(o/=100),t.hsl2rgb(r,n,i,o)):((u={r:r,g:n,b:i,toString:ce}).hex="#"+(16777216|i|n<<8|r<<16).toString(16).slice(1),t.is(o,"finite")&&(u.opacity=o),u)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ce}}),t),t.hsb=le((function(e,r,n){return t.hsb2rgb(e,r,n).hex})),t.hsl=le((function(e,r,n){return t.hsl2rgb(e,r,n).hex})),t.rgb=le((function(e,t,r){function n(e){return e+.5|0}return"#"+(16777216|n(r)|n(t)<<8|n(e)<<16).toString(16).slice(1)})),t.getColor=function(e){var t=this.getColor.start=this.getColor.start||{h:0,s:1,b:e||.75},r=this.hsb2rgb(t.h,t.s,t.b);return t.h+=.075,t.h>1&&(t.h=0,t.s-=.2,t.s<=0&&(this.getColor.start={h:0,s:1,b:t.b})),r.hex},t.getColor.reset=function(){delete this.start},t.parsePathString=function(e){if(!e)return null;var r=de(e);if(r.arr)return ve(r.arr);var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return t.is(e,O)&&t.is(e[0],O)&&(i=ve(e)),i.length||b(e).replace(K,(function(e,t,r){var o=[],a=t.toLowerCase();if(r.replace(V,(function(e,t){t&&o.push(+t)})),"m"==a&&o.length>2&&(i.push([t][p](o.splice(0,2))),a="l",t="m"==t?"l":"L"),"r"==a)i.push([t][p](o));else for(;o.length>=n[a]&&(i.push([t][p](o.splice(0,n[a]))),n[a]););})),i.toString=t._path2string,r.arr=ve(i),i},t.parseTransformString=le((function(e){if(!e)return null;var r=[];return t.is(e,O)&&t.is(e[0],O)&&(r=ve(e)),r.length||b(e).replace(W,(function(e,t,n){var i=[];x.call(t),n.replace(V,(function(e,t){t&&i.push(+t)})),r.push([t][p](i))})),r.toString=t._path2string,r}),this,(function(e){if(!e)return e;for(var t=[],r=0;r1?1:u<0?0:u)/2,c=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,h=0;h<12;h++){var p=l*c[h]+l,m=he(p,e,r,i,a),g=he(p,t,n,o,s),y=m*m+g*g;d+=f[h]*k.sqrt(y)}return l*d}function me(e,t,r,n,i,o,a,s){if(!(E(e,r)E(i,a)||E(t,n)E(o,s))){var u=(e-r)*(o-s)-(t-n)*(i-a);if(u){var l=((e*n-t*r)*(i-a)-(e-r)*(i*s-o*a))/u,c=((e*n-t*r)*(o-s)-(t-n)*(i*s-o*a))/u,f=+l.toFixed(2),d=+c.toFixed(2);if(!(f<+S(e,r).toFixed(2)||f>+E(e,r).toFixed(2)||f<+S(i,a).toFixed(2)||f>+E(i,a).toFixed(2)||d<+S(t,n).toFixed(2)||d>+E(t,n).toFixed(2)||d<+S(o,s).toFixed(2)||d>+E(o,s).toFixed(2)))return{x:l,y:c}}}}function ge(e,r,n){var i=t.bezierBBox(e),o=t.bezierBBox(r);if(!t.isBBoxIntersect(i,o))return n?0:[];for(var a=pe.apply(0,e),s=pe.apply(0,r),u=E(~~(a/5),1),l=E(~~(s/5),1),c=[],f=[],d={},h=n?0:[],p=0;p=0&&C<=1.001&&P>=0&&P<=1.001&&(n?h++:h.push({x:k.x,y:k.y,t1:S(C,1),t2:S(P,1)}))}}return h}function ye(e,r,n){e=t._path2curve(e),r=t._path2curve(r);for(var i,o,a,s,u,l,c,f,d,h,p=n?0:[],m=0,g=e.length;mb||y=e.x&&t<=e.x2&&r>=e.y&&r<=e.y2},t.isBBoxIntersect=function(e,r){var n=t.isPointInsideBBox;return n(r,e.x,e.y)||n(r,e.x2,e.y)||n(r,e.x,e.y2)||n(r,e.x2,e.y2)||n(e,r.x,r.y)||n(e,r.x2,r.y)||n(e,r.x,r.y2)||n(e,r.x2,r.y2)||(e.xr.x||r.xe.x)&&(e.yr.y||r.ye.y)},t.pathIntersection=function(e,t){return ye(e,t)},t.pathIntersectionNumber=function(e,t){return ye(e,t,1)},t.isPointInsidePath=function(e,r,n){var i=t.pathBBox(e);return t.isPointInsideBBox(i,r,n)&&ye(e,[["M",r,n],["H",i.x2+10]],1)%2==1},t._removedFactory=function(t){return function(){e("raphael.log",null,"Rapha\xebl: you are calling to method \u201c"+t+"\u201d of removed object",t)}};var be=t.pathBBox=function(e){var t=de(e);if(t.bbox)return re(t.bbox);if(!e)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var r,n=0,i=0,o=[],a=[],s=0,u=(e=Ce(e)).length;s1&&(r*=b=k.sqrt(b),n*=b);var w=r*r,A=n*n,x=(o==a?-1:1)*k.sqrt(_((w*A-w*y*y-A*g*g)/(w*y*y+A*g*g))),E=x*r*y/n+(e+s)/2,S=x*-n*g/r+(t+u)/2,C=k.asin(((t-S)/n).toFixed(9)),N=k.asin(((u-S)/n).toFixed(9));(C=eN&&(C-=2*P),!a&&N>C&&(N-=2*P)}var O=N-C;if(_(O)>f){var U=N,T=s,M=u;N=C+f*(a&&N>C?1:-1),s=E+r*k.cos(N),u=S+n*k.sin(N),h=Ee(s,u,r,n,i,0,a,T,M,[N,U,E,S])}O=N-C;var R=k.cos(C),I=k.sin(C),B=k.cos(N),L=k.sin(N),j=k.tan(O/4),F=4/3*r*j,D=4/3*n*j,z=[e,t],H=[e+F*I,t-D*R],q=[s+F*L,u-D*B],K=[s,u];if(H[0]=2*z[0]-H[0],H[1]=2*z[1]-H[1],l)return[H,q,K][p](h);for(var W=[],V=0,G=(h=[H,q,K][p](h).join()[v](",")).length;V"1e12"&&(d=.5),_(p)>"1e12"&&(p=.5),d>0&&d<1&&(u=Se(e,t,r,n,i,o,a,s,d),g.push(u.x),m.push(u.y)),p>0&&p<1&&(u=Se(e,t,r,n,i,o,a,s,p),g.push(u.x),m.push(u.y)),l=o-2*n+t-(s-2*o+n),f=t-n,d=(-(c=2*(n-t)-2*(o-n))+k.sqrt(c*c-4*l*f))/2/l,p=(-c-k.sqrt(c*c-4*l*f))/2/l,_(d)>"1e12"&&(d=.5),_(p)>"1e12"&&(p=.5),d>0&&d<1&&(u=Se(e,t,r,n,i,o,a,s,d),g.push(u.x),m.push(u.y)),p>0&&p<1&&(u=Se(e,t,r,n,i,o,a,s,p),g.push(u.x),m.push(u.y)),{min:{x:S[h](0,g),y:S[h](0,m)},max:{x:E[h](0,g),y:E[h](0,m)}}})),Ce=t._path2curve=le((function(e,t){var r=!t&&de(e);if(!t&&r.curve)return ve(r.curve);for(var n=Ae(e),i=t&&Ae(t),o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s=function(e,t,r){var n,i;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C"][p](Ee[h](0,[t.x,t.y][p](e.slice(1))));break;case"S":"C"==r||"S"==r?(n=2*t.x-t.bx,i=2*t.y-t.by):(n=t.x,i=t.y),e=["C",n,i][p](e.slice(1));break;case"T":"Q"==r||"T"==r?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C"][p](ke(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"][p](ke(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"][p](xe(t.x,t.y,e[1],e[2]));break;case"H":e=["C"][p](xe(t.x,t.y,e[1],t.y));break;case"V":e=["C"][p](xe(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"][p](xe(t.x,t.y,t.X,t.Y))}return e},u=function(e,t){if(e[t].length>7){e[t].shift();for(var r=e[t];r.length;)c[t]="A",i&&(f[t]="A"),e.splice(t++,0,["C"][p](r.splice(0,6)));e.splice(t,1),y=E(n.length,i&&i.length||0)}},l=function(e,t,r,o,a){e&&t&&"M"==e[a][0]&&"M"!=t[a][0]&&(t.splice(a,0,["M",o.x,o.y]),r.bx=0,r.by=0,r.x=e[a][1],r.y=e[a][2],y=E(n.length,i&&i.length||0))},c=[],f=[],d="",m="",g=0,y=E(n.length,i&&i.length||0);g.01;)l=pe(e,t,r,n,i,o,a,s,f+=(li){if(r&&!d.start){if(f+=["C"+(c=Ge(a,s,u[1],u[2],u[3],u[4],u[5],u[6],i-h)).start.x,c.start.y,c.m.x,c.m.y,c.x,c.y],o)return f;d.start=f,f=["M"+c.x,c.y+"C"+c.n.x,c.n.y,c.end.x,c.end.y,u[5],u[6]].join(),h+=l,a=+u[5],s=+u[6];continue}if(!e&&!r)return{x:(c=Ge(a,s,u[1],u[2],u[3],u[4],u[5],u[6],i-h)).x,y:c.y,alpha:c.alpha}}h+=l,a=+u[5],s=+u[6]}f+=u.shift()+u}return d.end=f,(c=e?h:r?d:t.findDotsAtSegment(a,s,u[0],u[1],u[2],u[3],u[4],u[5],1)).alpha&&(c={x:c.x,y:c.y,alpha:c.alpha}),c}},Je=Qe(1),Ye=Qe(),Xe=Qe(0,1);t.getTotalLength=Je,t.getPointAtLength=Ye,t.getSubpath=function(e,t,r){if(this.getTotalLength(e)-r<1e-6)return Xe(e,t).end;var n=Xe(e,r,1);return t?Xe(n,t).end:n},qe.getTotalLength=function(){var e=this.getPath();if(e)return this.node.getTotalLength?this.node.getTotalLength():Je(e)},qe.getPointAtLength=function(e){var t=this.getPath();if(t)return Ye(t,e)},qe.getPath=function(){var e,r=t._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return r&&(e=r(this)),e},qe.getSubpath=function(e,r){var n=this.getPath();if(n)return t.getSubpath(n,e,r)};var Ze=t.easing_formulas={linear:function(e){return e},"<":function(e){return C(e,1.7)},">":function(e){return C(e,.48)},"<>":function(e){var t=.48-e/1.04,r=k.sqrt(.1734+t*t),n=r-t,i=-r-t,o=C(_(n),1/3)*(n<0?-1:1)+C(_(i),1/3)*(i<0?-1:1)+.5;return 3*(1-o)*o*o+o*o*o},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},elastic:function(e){return e==!!e?e:C(2,-10*e)*k.sin(2*P*(e-.075)/.3)+1},bounce:function(e){var t=7.5625,r=2.75;return e<1/r?t*e*e:e<2/r?t*(e-=1.5/r)*e+.75:e<2.5/r?t*(e-=2.25/r)*e+.9375:t*(e-=2.625/r)*e+.984375}};Ze.easeIn=Ze["ease-in"]=Ze["<"],Ze.easeOut=Ze["ease-out"]=Ze[">"],Ze.easeInOut=Ze["ease-in-out"]=Ze["<>"],Ze["back-in"]=Ze.backIn,Ze["back-out"]=Ze.backOut;var $e=[],et=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,16)},tt=function(){for(var r=+new Date,n=0;n<$e.length;n++){var i=$e[n];if(!i.el.removed&&!i.paused){var o,a,s=r-i.start,u=i.ms,c=i.easing,f=i.from,d=i.diff,h=i.to,m=(i.t,i.el),g={},b={};if(i.initstatus?(s=(i.initstatus*i.anim.top-i.prev)/(i.percent-i.prev)*u,i.status=i.initstatus,delete i.initstatus,i.stop&&$e.splice(n--,1)):i.status=(i.prev+(i.percent-i.prev)*(s/u))/i.anim.top,!(s<0))if(s1&&!i.next){for(a in h)h[l](a)&&(b[a]=i.totalOrigin[a]);i.el.attr(b),ot(i.anim,i.el,i.anim.percents[0],null,i.totalOrigin,i.repeat-1)}i.next&&!i.stop&&ot(i.anim,i.el,i.next,null,i.totalOrigin,i.repeat)}}}$e.length&&et(tt)},rt=function(e){return e>255?255:e<0?0:e};function nt(e,t,r,n,i,o){var a=3*t,s=3*(n-t)-a,u=1-a-s,l=3*r,c=3*(i-r)-l,f=1-l-c;function d(e){return((u*e+s)*e+a)*e}return function(e,t){var r=function(e,t){var r,n,i,o,l,c;for(i=e,c=0;c<8;c++){if(o=d(i)-e,_(o)(n=1))return n;for(;ro?r=i:n=i,i=(n-r)/2+r}return i}(e,t);return((f*r+c)*r+l)*r}(e,1/(200*o))}function it(e,t){var r=[],n={};if(this.ms=t,this.times=1,e){for(var i in e)e[l](i)&&(n[B(i)]=e[i],r.push(B(i)));r.sort(Q)}this.anim=n,this.top=r[r.length-1],this.percents=r}function ot(r,n,i,o,s,u){i=B(i);var c,f,d,h,m,g,y=r.ms,w={},A={},x={};if(o)for(E=0,S=$e.length;Eo*r.top){i=r.percents[E],m=r.percents[E-1]||0,y=y/r.top*(i-m),h=r.percents[E+1],c=r.anim[i];break}o&&n.attr(r.anim[r.percents[E]])}if(c){if(f)f.initstatus=o,f.start=new Date-f.ms*o;else{for(var _ in c)if(c[l](_)&&(D[l](_)||n.paper.customAttributes[l](_)))switch(w[_]=n.attr(_),null==w[_]&&(w[_]=F[_]),A[_]=c[_],D[_]){case N:x[_]=(A[_]-w[_])/y;break;case"colour":w[_]=t.getRGB(w[_]);var C=t.getRGB(A[_]);x[_]={r:(C.r-w[_].r)/y,g:(C.g-w[_].g)/y,b:(C.b-w[_].b)/y};break;case"path":var P=Ce(w[_],A[_]),O=P[1];for(w[_]=P[0],x[_]=[],E=0,S=w[_].length;Eu&&(u=f)}!e[u+="%"].callback&&(e[u].callback=i)}return new it(e,r)},qe.animate=function(e,r,n,i){if(this.removed)return i&&i.call(this),this;var o=e instanceof it?e:t.animation(e,r,n,i);return ot(o,this,o.percents[0],null,this.attr()),this},qe.setTime=function(e,t){return e&&null!=t&&this.status(e,S(t,e.ms)/e.ms),this},qe.status=function(e,t){var r,n,i=[],o=0;if(null!=t)return ot(e,this,-1,S(t,1)),this;for(r=$e.length;o1)for(var n=0,i=r.length;n.5)-1;u(d-.5,2)+u(h-.5,2)>.25&&(h=o.sqrt(.25-u(d-.5,2))*i+.5)&&.5!=h&&(h=h.toFixed(5)-1e-5*i)}return f}))).split(/\s*\-\s*/),"linear"==l){var w=i.shift();if(w=-n(w),isNaN(w))return null;var A=[0,0,o.cos(e.rad(w)),o.sin(e.rad(w))],x=1/(a(s(A[2]),s(A[3]))||1);A[2]*=x,A[3]*=x,A[2]<0&&(A[0]=-A[2],A[2]=0),A[3]<0&&(A[1]=-A[3],A[3]=0)}var k=e._parseDots(i);if(!k)return null;if(c=c.replace(/[\(\)\s,\xb0#]/g,"_"),t.gradient&&c!=t.gradient.id&&(m.defs.removeChild(t.gradient),delete t.gradient),!t.gradient){v=g(l+"Gradient",{id:c}),t.gradient=v,g(v,"radial"==l?{fx:d,fy:h}:{x1:A[0],y1:A[1],x2:A[2],y2:A[3],gradientTransform:t.matrix.invert()}),m.defs.appendChild(v);for(var E=0,S=k.length;E1?M.opacity/100:M.opacity});case"stroke":M=e.getRGB(m),u.setAttribute(p,M.hex),"stroke"==p&&M[t]("opacity")&&g(u,{"stroke-opacity":M.opacity>1?M.opacity/100:M.opacity}),"stroke"==p&&n._.arrows&&("startString"in n._.arrows&&w(n,n._.arrows.startString),"endString"in n._.arrows&&w(n,n._.arrows.endString,1));break;case"gradient":("circle"==n.type||"ellipse"==n.type||"r"!=r(m).charAt())&&y(n,m);break;case"opacity":c.gradient&&!c[t]("stroke-opacity")&&g(u,{"stroke-opacity":m>1?m/100:m});case"fill-opacity":if(c.gradient){(R=e._g.doc.getElementById(u.getAttribute("fill").replace(/^url\(#|\)$/g,f)))&&(I=R.getElementsByTagName("stop"),g(I[I.length-1],{"stop-opacity":m}));break}default:"font-size"==p&&(m=i(m,10)+"px");var B=p.replace(/(\-.)/g,(function(e){return e.substring(1).toUpperCase()}));u.style[B]=m,n._.dirty=1,u.setAttribute(p,m)}}E(n,o),u.style.visibility=d},E=function(n,o){if("text"==n.type&&(o[t]("text")||o[t]("font")||o[t]("font-size")||o[t]("x")||o[t]("y"))){var a=n.attrs,s=n.node,u=s.firstChild?i(e._g.doc.defaultView.getComputedStyle(s.firstChild,f).getPropertyValue("font-size"),10):10;if(o[t]("text")){for(a.text=o.text;s.firstChild;)s.removeChild(s.firstChild);for(var l,c=r(o.text).split("\n"),d=[],h=0,p=c.length;h"));var Q=V.getBoundingClientRect();C.W=m.w=(Q.right-Q.left)/100,C.H=m.h=(Q.bottom-Q.top)/100,C.X=m.x,C.Y=m.y+C.H/2,("x"in u||"y"in u)&&(C.path.v=e.format("m{0},{1}l{2},{1}",o(m.x*b),o(m.y*b),o(m.x*b)+1));for(var J=["x","y","text","font","font-family","font-weight","font-style","font-size"],Y=0,X=J.length;Y.25&&(r=i.sqrt(.25-s(t-.5,2))*(2*(r>.5)-1)+.5),l=t+f+r),d}))).split(/\s*\-\s*/),"linear"==u){var c=o.shift();if(c=-n(c),isNaN(c))return null}var h=e._parseDots(o);if(!h)return null;if(t=t.shape||t.node,h.length){t.removeChild(a),a.on=!0,a.method="none",a.color=h[0].color,a.color2=h[h.length-1].color;for(var p=[],m=0,g=h.length;m')}}catch(e){k=function(e){return t.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},e._engine.initWin(e._g.win),e._engine.create=function(){var t=e._getContainer.apply(0,arguments),r=t.container,n=t.height,i=t.width,o=t.x,a=t.y;if(!r)throw new Error("VML container not found.");var s=new e._Paper,u=s.canvas=e._g.doc.createElement("div"),l=u.style;return o=o||0,a=a||0,i=i||512,n=n||342,s.width=i,s.height=n,i==+i&&(i+="px"),n==+n&&(n+="px"),s.coordsize=216e5+f+216e5,s.coordorigin="0 0",s.span=e._g.doc.createElement("span"),s.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",u.appendChild(s.span),l.cssText=e.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",i,n),1==r?(e._g.doc.body.appendChild(u),l.left=o+"px",l.top=a+"px",l.position="absolute"):r.firstChild?r.insertBefore(u,r.firstChild):r.appendChild(u),s.renderfix=function(){},s},e.prototype.clear=function(){e.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=e._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},e.prototype.remove=function(){for(var t in e.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[t]="function"==typeof this[t]?e._removedFactory(t):null;return!0};var N=e.st;for(var O in P)P[t](O)&&!N[t](O)&&(N[O]=function(e){return function(){var t=arguments;return this.forEach((function(r){r[e].apply(r,t)}))}}(O))}}.apply(t,n))||(e.exports=i)}])},8345:(e,t,r)=>{"use strict";var n=r(9950),i=r(5340);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r