diff --git a/votee/assets/index-DttQFJoK.css b/votee/assets/index-DttQFJoK.css new file mode 100644 index 0000000..a920508 --- /dev/null +++ b/votee/assets/index-DttQFJoK.css @@ -0,0 +1 @@ +._layout_1mpeu_1{min-height:100dvh;display:flex;flex-direction:column;justify-content:space-between}._main_1mpeu_8{margin:0 auto;width:100%;max-width:1200px}._header_1mpeu_14{display:flex;justify-content:space-between;vertical-align:middle;align-items:center;padding-top:2.8125rem;padding-bottom:1.5625rem;border-bottom:1px solid var(--white)}._subHeader_1mpeu_24{margin:1.125rem 0 .5625rem;text-align:center;padding:1.875rem 0}@media screen and (max-width: 1000px){._layout_1mpeu_1{padding:2.25rem 1.5rem .25rem}._header_1mpeu_14{align-items:flex-start;padding-top:0;padding-bottom:.8375rem}._subHeader_1mpeu_24{text-align:left;padding:0;margin:.875rem 0}}._button_16xt8_1{width:auto;border-radius:8px;border:1px transparent solid;box-shadow:none;cursor:pointer;font-style:normal;outline:none;text-decoration:none;-webkit-user-select:none;user-select:none;text-transform:none;text-align:center}._button_16xt8_1>label{display:flex;vertical-align:middle;align-items:center;gap:.75rem}._buttonSmall_16xt8_22{font-size:14px;line-height:140%;font-weight:400;padding:.4125rem 1.21875rem;letter-spacing:0}._buttonMedium_16xt8_30{font-size:24px;font-weight:500;line-height:125%;padding:.5rem 2.25rem;letter-spacing:-.03em}._buttonSolid_16xt8_38._buttonPrimary_16xt8_39{background-color:var(--palatinate-blue);color:var(--white)}._buttonSolid_16xt8_38._buttonSecondary_16xt8_44{background-color:var(--white);color:var(--palatinate-blue)}._buttonSolid_16xt8_38._buttonSuccess_16xt8_49{background:var(--green-sheen);color:var(--white);border:1px var(--green-sheen) solid}._buttonOutline_16xt8_56._buttonPrimary_16xt8_39{background-color:var(--palatinate-blue);color:var(--white);border:1px var(--white) solid}._buttonOutline_16xt8_56._buttonSecondary_16xt8_44{background-color:var(--white);color:var(--palatinate-blue);border:1px var(--palatinate-blue) solid}._buttonOutline_16xt8_56._buttonSuccess_16xt8_49{background-color:var(--white);color:var(--green-sheen);border:1px var(--green-sheen) solid}._buttonText_16xt8_76._buttonPrimary_16xt8_39,._buttonText_16xt8_76._buttonSecondary_16xt8_44{background-color:transparent;color:var(--old-silver);border:transparent;text-decoration:underline;text-underline-offset:.5rem;font-size:16px;font-weight:400;line-height:137%;letter-spacing:-.03em;padding:.5rem}._buttonDisabled_16xt8_92{cursor:not-allowed;background-color:var(--bright-gray);opacity:.5}._fullWidth_16xt8_98{width:100%}._jazzIcon_ti0z0_1{display:inline-block}._connectedAccount_1shrx_1{display:flex;justify-items:center;gap:1rem;min-width:350px;max-height:3.75rem;border-radius:12px;background:var(--white);padding:.9375rem .75rem;text-decoration:none;cursor:pointer}._connectedAccountDetails_1shrx_14{display:inline-flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;width:270px;color:var(--navy-blue);text-align:end;margin-bottom:0}._connectedAccountAddress_1shrx_25{flex:1 1 60%;font-family:Roboto Mono Variable,monospace;text-decoration:none;font-size:22px;font-weight:700;line-height:140%;letter-spacing:0;text-align:right}._network_1shrx_36{flex:0 0 40%;overflow:hidden;max-height:28px;font-size:20px;font-weight:400;line-height:140%;letter-spacing:0;text-align:left;text-transform:capitalize}@media screen and (max-width: 1000px){._connectedAccount_1shrx_1{width:32px;min-width:unset;height:32px;min-height:unset;border-radius:50%;padding:.375rem;margin-bottom:.125rem}}._connectWalletBtn_j0ggb_1{height:3.75rem}@media screen and (max-width: 1000px){._connectWalletBtn_j0ggb_1{height:2.125rem;font-size:14px;font-weight:500;line-height:140%;letter-spacing:-.02em;padding:.4375rem .5625rem;border-radius:4px}._connectWalletBtnLabel_j0ggb_16._connectWalletBtnLabel_j0ggb_16{gap:.125rem}}._alert_17r1y_1{text-align:center}._alert_17r1y_1 h2{color:var(--palatinate-blue);margin-top:6rem;margin-bottom:1rem}._alert_17r1y_1 p{max-width:500px;font-size:14px;font-weight:400;line-height:120%;letter-spacing:0;margin:0 auto;margin-bottom:2.375rem}._alert_17r1y_1 ._icon_17r1y_20{margin:0 auto;margin-bottom:1.125rem}._alert_17r1y_1 ._actions_17r1y_25:empty{display:none}._alert_17r1y_1 ._actions_17r1y_25 span{font-size:22px;font-weight:500;line-height:150%;letter-spacing:-.03em;color:var(--palatinate-blue)}._alertError_17r1y_40 svg{color:var(--mystic)}._alertSuccess_17r1y_46 svg{color:var(--green-sheen)}@keyframes _rotating_17r1y_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._alertLoading_17r1y_61 ._icon_17r1y_20{display:flex;justify-content:center;align-items:center;width:106px;height:106px;border-radius:50%;background:linear-gradient(302.43deg,var(--medium-blue) -18.46%,var(--azure) 93.84%)}._alertLoading_17r1y_61 svg{color:var(--white);animation:_rotating_17r1y_1 3s linear infinite}._alertInsufficientBalance_17r1y_78 ._icon_17r1y_20{display:flex;justify-content:center;align-items:center;width:106px;height:106px;border-radius:50%;background:linear-gradient(282.09deg,var(--mystic) 6.24%,var(--rose-red) 102.94%)}._alertInsufficientBalance_17r1y_78 svg{color:var(--white)}@media screen and (max-width: 1000px){._alert_17r1y_1 h2{font-size:22px;font-weight:600;line-height:150%;letter-spacing:-.03em;margin-top:1.5rem;margin-bottom:.5625rem}._alert_17r1y_1 p{font-size:13px;font-weight:400;line-height:17px;letter-spacing:0;text-align:center;margin-bottom:1.5rem}._alert_17r1y_1 ._icon_17r1y_20{margin-bottom:2rem}._alert_17r1y_1 ._actions_17r1y_25 span{font-size:18px;font-weight:500;line-height:122%;letter-spacing:-.03em}}._card_12zm2_1{display:flex;flex-direction:column;margin:0 auto;width:100%;max-width:876px;min-height:704px;padding:2.25rem 4.6875rem 1.875rem;margin-bottom:5rem;border-radius:12px;background:var(--white);box-shadow:0 4px 4px #00000040;color:var(--dark-gunmetal)}@media screen and (max-width: 1000px){._card_12zm2_1{padding:1.375rem;max-width:unset;margin-bottom:1.25rem}}._cardHeaderText_vfkwq_1{font-size:18px;font-weight:400;line-height:23px;letter-spacing:0;text-align:center;margin-bottom:1.5625rem;opacity:.8}._mascotCards_vfkwq_11{display:grid;grid-template-columns:repeat(3,minmax(218px,1fr));grid-gap:2.0625rem;margin-bottom:2.25rem}._mascotCardActions_vfkwq_18{display:flex;justify-content:center;margin-top:auto}._cardAction_vfkwq_24{display:flex;flex-direction:column;justify-content:center;margin-bottom:1.5rem}._cardAction_vfkwq_24>*{align-self:center}._voteBtnLabel_vfkwq_35{justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}._voteBtnLabelDisabled_vfkwq_41{justify-content:center;cursor:not-allowed;-webkit-user-select:none;user-select:none}._cardFooterText_vfkwq_47{font-size:14px;font-weight:500;line-height:21px;letter-spacing:0;text-align:center;color:var(--palatinate-blue)}._insufficientBalanceAlertActions_vfkwq_56{display:flex;flex-direction:column;gap:.75rem}._insufficientBalanceAlertActions_vfkwq_56>*{align-self:center}._cardInfoText_vfkwq_66{font-size:16px;font-weight:600;line-height:150%;letter-spacing:0;text-align:center;margin-top:-1.325rem;margin-bottom:1rem}._landingPageLink_vfkwq_76{color:var(--dark-gunmetal)}._mascotCardSelectBtn_vfkwq_80{min-width:97px}._mascotCardSelectedCheckIcon_vfkwq_84{position:absolute;top:-.9375rem;right:-1.125rem;width:30px;height:30px;border-radius:25%;color:var(--green-sheen);background:var(--white)}@media screen and (max-width: 1000px){._mascotCards_vfkwq_11{grid-template-columns:1fr;grid-auto-flow:row;grid-gap:.875rem;margin-bottom:1.5rem}._headerText_vfkwq_104{font-size:16px;font-weight:400;line-height:130%;letter-spacing:0;text-align:left;margin-top:.625rem;margin-bottom:2rem}._landingPageLink_vfkwq_76{color:var(--white)}._mascotCardActions_vfkwq_18{width:100%}._mascotCardSelectBtn_vfkwq_80{border-radius:4px;font-size:16px;font-weight:400;line-height:137.5%;letter-spacing:0}._cardAction_vfkwq_24>*{align-self:stretch}._cardInfoText_vfkwq_66{margin-top:0}._cardFooterText_vfkwq_47{font-size:16px;font-weight:400;line-height:130%;letter-spacing:-.03em}}._mascotCard_1bkx9_1{position:relative;display:flex;margin:0 auto;width:100%;border-radius:8px;background:var(--white);border:1px var(--palatinate-blue) solid}._mascotCard_1bkx9_1._mascotCardSelected_1bkx9_10{border:3px solid var(--green-sheen)}._mascotCard_1bkx9_1._mascotCardVertical_1bkx9_14{flex-direction:column;justify-content:flex-start;max-width:218px;padding:.625rem 1rem .875rem;text-align:center;box-shadow:0 4px 4px #00000040}._mascotCard_1bkx9_1._mascotCardVertical_1bkx9_14 img{margin-bottom:.75rem;width:182px;height:182px}._mascotCard_1bkx9_1._mascotCardVertical_1bkx9_14:not(._mascotCardSelected_1bkx9_10){padding:.75rem 1.125rem 1rem}._mascotCard_1bkx9_1._mascotCardVertical_1bkx9_14 ._mascotCardDescription_1bkx9_32{margin:0 -.5rem 1.125rem}._mascotCard_1bkx9_1._mascotCardHorizontal_1bkx9_37{position:relative;flex-direction:row;gap:1.3125rem;padding:1.0625rem 1.375rem;text-align:left;align-items:center}._mascotCard_1bkx9_1._mascotCardHorizontal_1bkx9_37 img{width:196px;height:auto}._mascotCardTitle_1bkx9_52{color:var(--palatinate-blue);margin-bottom:.5625rem}._mascotCardDescription_1bkx9_32{font-size:16px;font-weight:400;line-height:120%;letter-spacing:0}@media screen and (max-width: 1000px){._mascotCard_1bkx9_1._mascotCardVertical_1bkx9_14{max-width:unset;align-items:center}._mascotCardDescription_1bkx9_32{font-size:16px;font-weight:400;line-height:120%;letter-spacing:0}}._cardHeaderText_937ca_1{font-size:18px;font-weight:400;line-height:150%;letter-spacing:0;text-align:center;margin-bottom:2rem;opacity:.8}._winningMascot_937ca_11{margin-bottom:2rem}._winningMascotBadge_937ca_15{position:absolute;top:1.0625rem;right:1.625rem;display:flex;align-items:center;gap:.5rem;padding:.25rem .75rem;border-radius:4px;color:var(--white);background-color:var(--green-sheen);font-size:14px;font-weight:500;line-height:150%;letter-spacing:-.03em}._mascotPollData_937ca_32{display:flex;gap:2.125rem;justify-content:space-between;margin-bottom:1.625rem}._cardFooterText_937ca_39{font-size:14px;font-weight:500;line-height:120%;letter-spacing:-.03em;text-align:center;color:var(--palatinate-blue)}._mascotResultsTable_937ca_48{table-layout:fixed;max-height:12.5rem}._mascotResultsTable_937ca_48 tr th:last-child,._mascotResultsTable_937ca_48 tr td:last-child{text-align:right}._mascotResultsTable_937ca_48 tr th:nth-child(2),._mascotResultsTable_937ca_48 tr td:nth-child(2){text-align:center}._answerColName_937ca_65{font-size:16px;font-weight:500;line-height:137%;letter-spacing:-.03em}._answerColName_937ca_65:before{padding-right:10px;content:"⬤";vertical-align:text-bottom}._mascotPollDataPieChart_937ca_78{margin-top:-1.175rem}@media screen and (max-width: 1000px){._headerText_937ca_83{font-size:16px;font-weight:400;line-height:130%;letter-spacing:0;text-align:left;margin-top:.625rem;margin-bottom:2rem}._winningMascotBadge_937ca_15{top:-.875rem;right:-1rem;width:30px;height:30px;padding:0;border-radius:50%;align-items:center;display:flex;justify-content:center}._winningMascotBadge_937ca_15 span{display:none}._mascotPollData_937ca_32{flex-direction:column;gap:1rem}._answerColName_937ca_65:before{content:none}._cardFooterText_937ca_39{font-size:16px;font-weight:400;line-height:130%;letter-spacing:-.03em}}._pieChart_1ctih_1{min-width:240px;height:240px}._pieChartCell_1ctih_6{stroke-width:8px;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0px 7.5px 7.5px rgba(0,0,98,.25))}._table_1lmm4_1{width:100%;max-width:100%;background-color:transparent;border-collapse:collapse}._table_1lmm4_1 thead th{font-size:20px;font-weight:600;line-height:150%;letter-spacing:-.03em;vertical-align:bottom;padding-bottom:1.125rem;border-bottom:1px solid var(--table-border-dark);color:var(--palatinate-blue)}._table_1lmm4_1 tbody tr:not(:last-child){border-bottom:1px solid var(--table-border-light)}._table_1lmm4_1 tbody tr:last-child{border-bottom:1px solid var(--table-border-dark)}._table_1lmm4_1 tbody td{padding-top:.5rem;padding-bottom:.5rem;font-size:16px;font-weight:400;line-height:150%;letter-spacing:-.03em}@font-face{font-family:Figtree Variable;font-style:normal;font-display:swap;font-weight:300 900;src:url(/votee/assets/figtree-latin-ext-wght-normal-Bptc-cl5.woff2) format("woff2-variations");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Figtree Variable;font-style:normal;font-display:swap;font-weight:300 900;src:url(/votee/assets/figtree-latin-wght-normal-tyJnQ6lj.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-cyrillic-ext-wght-normal-DPu6aEAn.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-cyrillic-wght-normal-CK9U7V71.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-greek-wght-normal-C58MjUu-.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-vietnamese-wght-normal-B7nCECYT.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-latin-ext-wght-normal-BWJwKVm9.woff2) format("woff2-variations");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-latin-wght-normal-DGRqvGGI.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--white: #fff;--palatinate-blue: #2c3bd5;--bright-gray: #eae6f0;--dark-gunmetal: #242629;--navy-blue: #000062;--mystic: #d44c7d;--green-sheen: #66bfa0;--azure: #008cff;--rose-red: #cc1e5c;--medium-blue: #0d00d2;--table-border-light: rgba(143, 142, 223, .39);--table-border-dark: rgba(36, 38, 41, .8);--old-silver: #858486}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/figtree-latin-wght-normal-tyJnQ6lj.woff2) format("woff2");unicode-range:U+2026}*,*:before,*:after{box-sizing:border-box}body{margin:0;font-family:Figtree Variable,system-ui,sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:150%;color:var(--white);text-align:left;background-color:var(--palatinate-blue);background-image:url(/votee/background.webp);background-size:cover;background-position:center center;background-repeat:no-repeat;min-height:100dvh}h1,h2,h3,h4,h5,h6,p{margin:0}h1{font-size:56px;font-weight:500;line-height:130%;letter-spacing:-.03em}h2{font-size:30px;font-weight:500;line-height:140%;letter-spacing:-.03em}h3{font-size:26px;font-weight:500;line-height:130%;letter-spacing:-.03em}@media screen and (max-width: 1000px){h1{font-size:32px;font-weight:600;line-height:140%;letter-spacing:-.03em}h3{font-size:22px;font-weight:500;line-height:130%;letter-spacing:-.03em}} diff --git a/votee/assets/index-Fp5UHazu.css b/votee/assets/index-Fp5UHazu.css deleted file mode 100644 index d9c275a..0000000 --- a/votee/assets/index-Fp5UHazu.css +++ /dev/null @@ -1 +0,0 @@ -._layout_1mpeu_1{min-height:100dvh;display:flex;flex-direction:column;justify-content:space-between}._main_1mpeu_8{margin:0 auto;width:100%;max-width:1200px}._header_1mpeu_14{display:flex;justify-content:space-between;vertical-align:middle;align-items:center;padding-top:2.8125rem;padding-bottom:1.5625rem;border-bottom:1px solid var(--white)}._subHeader_1mpeu_24{margin:1.125rem 0 .5625rem;text-align:center;padding:1.875rem 0}@media screen and (max-width: 1000px){._layout_1mpeu_1{padding:2.25rem 1.5rem .25rem}._header_1mpeu_14{align-items:flex-start;padding-top:0;padding-bottom:.8375rem}._subHeader_1mpeu_24{text-align:left;padding:0;margin:.875rem 0}}._button_16xt8_1{width:auto;border-radius:8px;border:1px transparent solid;box-shadow:none;cursor:pointer;font-style:normal;outline:none;text-decoration:none;-webkit-user-select:none;user-select:none;text-transform:none;text-align:center}._button_16xt8_1>label{display:flex;vertical-align:middle;align-items:center;gap:.75rem}._buttonSmall_16xt8_22{font-size:14px;line-height:140%;font-weight:400;padding:.4125rem 1.21875rem;letter-spacing:0}._buttonMedium_16xt8_30{font-size:24px;font-weight:500;line-height:125%;padding:.5rem 2.25rem;letter-spacing:-.03em}._buttonSolid_16xt8_38._buttonPrimary_16xt8_39{background-color:var(--palatinate-blue);color:var(--white)}._buttonSolid_16xt8_38._buttonSecondary_16xt8_44{background-color:var(--white);color:var(--palatinate-blue)}._buttonSolid_16xt8_38._buttonSuccess_16xt8_49{background:var(--green-sheen);color:var(--white);border:1px var(--green-sheen) solid}._buttonOutline_16xt8_56._buttonPrimary_16xt8_39{background-color:var(--palatinate-blue);color:var(--white);border:1px var(--white) solid}._buttonOutline_16xt8_56._buttonSecondary_16xt8_44{background-color:var(--white);color:var(--palatinate-blue);border:1px var(--palatinate-blue) solid}._buttonOutline_16xt8_56._buttonSuccess_16xt8_49{background-color:var(--white);color:var(--green-sheen);border:1px var(--green-sheen) solid}._buttonText_16xt8_76._buttonPrimary_16xt8_39,._buttonText_16xt8_76._buttonSecondary_16xt8_44{background-color:transparent;color:var(--old-silver);border:transparent;text-decoration:underline;text-underline-offset:.5rem;font-size:16px;font-weight:400;line-height:137%;letter-spacing:-.03em;padding:.5rem}._buttonDisabled_16xt8_92{cursor:not-allowed;background-color:var(--bright-gray);opacity:.5}._fullWidth_16xt8_98{width:100%}._jazzIcon_ti0z0_1{display:inline-block}._connectedAccount_64yg7_1{display:flex;justify-items:center;gap:1rem;min-width:350px;max-height:3.75rem;border-radius:12px;background:var(--white);padding:.9375rem .75rem;text-decoration:none;cursor:pointer}._connectedAccountDetails_64yg7_14{display:inline-flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;width:270px;color:var(--navy-blue);text-align:end;margin-bottom:0}._connectedAccountAddress_64yg7_25{flex:1 1 60%;font-family:Roboto Mono Variable,monospace;text-decoration:none;font-size:22px;font-weight:700;line-height:140%;letter-spacing:0;text-align:right}._network_64yg7_36{flex:0 0 40%;overflow:hidden;max-height:28px;font-size:20px;font-weight:400;line-height:140%;letter-spacing:0;text-align:left;text-transform:capitalize}@media screen and (max-width: 1000px){._connectedAccount_64yg7_1{position:relative;width:32px;min-width:unset;height:32px;min-height:unset;border-radius:50%;padding:6px;margin-bottom:0}._connectedAccount_64yg7_1:before{content:"";position:absolute;width:.25px;height:100%;background:#fff;top:0;left:-1rem}}._connectWalletBtn_j0ggb_1{height:3.75rem}@media screen and (max-width: 1000px){._connectWalletBtn_j0ggb_1{height:2.125rem;font-size:14px;font-weight:500;line-height:140%;letter-spacing:-.02em;padding:.4375rem .5625rem;border-radius:4px}._connectWalletBtnLabel_j0ggb_16._connectWalletBtnLabel_j0ggb_16{gap:.125rem}}._alert_qon9n_1{text-align:center}._alert_qon9n_1 h2{color:var(--palatinate-blue);margin-top:6rem;margin-bottom:1rem}._alert_qon9n_1 p{max-width:500px;font-size:14px;font-weight:400;line-height:120%;letter-spacing:0;margin:0 auto;margin-bottom:2.375rem}._alert_qon9n_1 ._icon_qon9n_20{margin:0 auto;margin-bottom:1.125rem}._alert_qon9n_1 ._actions_qon9n_25:empty{display:none}._alert_qon9n_1 ._actions_qon9n_25 span{font-size:22px;font-weight:500;line-height:150%;letter-spacing:-.03em;color:var(--palatinate-blue)}._alertError_qon9n_40 svg{color:var(--mystic)}._alertSuccess_qon9n_46 svg{color:var(--green-sheen)}@keyframes _rotating_qon9n_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._alertLoading_qon9n_61 ._icon_qon9n_20{display:flex;justify-content:center;align-items:center;width:106px;height:106px;border-radius:50%;background:linear-gradient(302.43deg,var(--medium-blue) -18.46%,var(--azure) 93.84%)}._alertLoading_qon9n_61 svg{color:var(--white);animation:_rotating_qon9n_1 3s linear infinite}._alertInsufficientBalance_qon9n_78 ._icon_qon9n_20{display:flex;justify-content:center;align-items:center;width:106px;height:106px;border-radius:50%;background:linear-gradient(282.09deg,var(--mystic) 6.24%,var(--rose-red) 102.94%)}._alertInsufficientBalance_qon9n_78 svg{color:var(--white)}._card_12zm2_1{display:flex;flex-direction:column;margin:0 auto;width:100%;max-width:876px;min-height:704px;padding:2.25rem 4.6875rem 1.875rem;margin-bottom:5rem;border-radius:12px;background:var(--white);box-shadow:0 4px 4px #00000040;color:var(--dark-gunmetal)}@media screen and (max-width: 1000px){._card_12zm2_1{padding:1.375rem;max-width:unset;margin-bottom:1.25rem}}._cardHeaderText_19do9_1{font-size:18px;font-weight:400;line-height:23px;letter-spacing:0;text-align:center;margin-bottom:1.5625rem;opacity:.8}._mascotCards_19do9_11{display:grid;grid-template-columns:repeat(3,minmax(218px,1fr));grid-gap:2.0625rem;margin-bottom:2.25rem}._mascotCardActions_19do9_18{display:flex;justify-content:center;margin-top:auto}._cardAction_19do9_24{display:flex;flex-direction:column;justify-content:center;margin-bottom:1.5rem}._cardAction_19do9_24>*{align-self:center}._voteBtnLabel_19do9_35{justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}._voteBtnLabelDisabled_19do9_41{justify-content:center;cursor:not-allowed;-webkit-user-select:none;user-select:none}._cardFooterText_19do9_47{font-size:14px;font-weight:500;line-height:21px;letter-spacing:0;text-align:center;color:var(--palatinate-blue)}._insufficientBalanceAlertActions_19do9_56{display:flex;flex-direction:column;gap:.75rem}._insufficientBalanceAlertActions_19do9_56>*{align-self:center}._cardInfoText_19do9_66{font-size:16px;font-weight:600;line-height:150%;letter-spacing:0;text-align:center;margin-top:-2rem;margin-bottom:1rem}._landingPageLink_19do9_76{color:var(--dark-gunmetal)}._mascotCardSelectBtn_19do9_80{min-width:97px}._mascotCardSelectedCheckIcon_19do9_84{position:absolute;top:-.9375rem;right:-1.125rem;width:30px;height:30px;border-radius:25%;color:var(--green-sheen);background:var(--white)}@media screen and (max-width: 1000px){._mascotCards_19do9_11{grid-template-columns:1fr;grid-auto-flow:row;grid-gap:.875rem;margin-bottom:1.5rem}._headerText_19do9_104{font-size:16px;font-weight:400;line-height:130%;letter-spacing:0;text-align:left;margin-top:.625rem;margin-bottom:2rem}._landingPageLink_19do9_76{color:var(--white)}._mascotCardActions_19do9_18{width:100%}._mascotCardSelectBtn_19do9_80{border-radius:4px;font-size:16px;font-weight:400;line-height:137.5%;letter-spacing:0}._cardAction_19do9_24>*{align-self:stretch}._cardInfoText_19do9_66{margin-top:0}}._mascotCard_1bkx9_1{position:relative;display:flex;margin:0 auto;width:100%;border-radius:8px;background:var(--white);border:1px var(--palatinate-blue) solid}._mascotCard_1bkx9_1._mascotCardSelected_1bkx9_10{border:3px solid var(--green-sheen)}._mascotCard_1bkx9_1._mascotCardVertical_1bkx9_14{flex-direction:column;justify-content:flex-start;max-width:218px;padding:.625rem 1rem .875rem;text-align:center;box-shadow:0 4px 4px #00000040}._mascotCard_1bkx9_1._mascotCardVertical_1bkx9_14 img{margin-bottom:.75rem;width:182px;height:182px}._mascotCard_1bkx9_1._mascotCardVertical_1bkx9_14:not(._mascotCardSelected_1bkx9_10){padding:.75rem 1.125rem 1rem}._mascotCard_1bkx9_1._mascotCardVertical_1bkx9_14 ._mascotCardDescription_1bkx9_32{margin:0 -.5rem 1.125rem}._mascotCard_1bkx9_1._mascotCardHorizontal_1bkx9_37{position:relative;flex-direction:row;gap:1.3125rem;padding:1.0625rem 1.375rem;text-align:left;align-items:center}._mascotCard_1bkx9_1._mascotCardHorizontal_1bkx9_37 img{width:196px;height:auto}._mascotCardTitle_1bkx9_52{color:var(--palatinate-blue);margin-bottom:.5625rem}._mascotCardDescription_1bkx9_32{font-size:16px;font-weight:400;line-height:120%;letter-spacing:0}@media screen and (max-width: 1000px){._mascotCard_1bkx9_1._mascotCardVertical_1bkx9_14{max-width:unset;align-items:center}._mascotCardDescription_1bkx9_32{font-size:16px;font-weight:400;line-height:120%;letter-spacing:0}}._cardHeaderText_jj4nd_1{font-size:18px;font-weight:400;line-height:150%;letter-spacing:0;text-align:center;margin-bottom:2rem;opacity:.8}._winningMascot_jj4nd_11{margin-bottom:2rem}._winningMascotBadge_jj4nd_15{position:absolute;top:1.0625rem;right:1.625rem;display:flex;align-items:center;gap:.5rem;padding:.25rem .75rem;border-radius:4px;color:var(--white);background-color:var(--green-sheen);font-size:14px;font-weight:500;line-height:150%;letter-spacing:-.03em}._mascotPollData_jj4nd_32{display:flex;gap:2.125rem;justify-content:space-between;margin-bottom:1.625rem}._cardFooterText_jj4nd_39{font-size:14px;font-weight:500;line-height:120%;letter-spacing:-.03em;text-align:center;color:var(--palatinate-blue)}._mascotResultsTable_jj4nd_48{table-layout:fixed;max-height:12.5rem}._mascotResultsTable_jj4nd_48 tr th:last-child,._mascotResultsTable_jj4nd_48 tr td:last-child{text-align:right}._mascotResultsTable_jj4nd_48 tr th:nth-child(2),._mascotResultsTable_jj4nd_48 tr td:nth-child(2){text-align:center}._answerColName_jj4nd_65{font-size:16px;font-weight:500;line-height:137%;letter-spacing:-.03em}._answerColName_jj4nd_65:before{padding-right:10px;content:"⬤";vertical-align:text-bottom}._mascotPollDataPieChart_jj4nd_78{margin-top:-1.175rem}._pieChart_1ctih_1{min-width:240px;height:240px}._pieChartCell_1ctih_6{stroke-width:8px;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0px 7.5px 7.5px rgba(0,0,98,.25))}._table_1lmm4_1{width:100%;max-width:100%;background-color:transparent;border-collapse:collapse}._table_1lmm4_1 thead th{font-size:20px;font-weight:600;line-height:150%;letter-spacing:-.03em;vertical-align:bottom;padding-bottom:1.125rem;border-bottom:1px solid var(--table-border-dark);color:var(--palatinate-blue)}._table_1lmm4_1 tbody tr:not(:last-child){border-bottom:1px solid var(--table-border-light)}._table_1lmm4_1 tbody tr:last-child{border-bottom:1px solid var(--table-border-dark)}._table_1lmm4_1 tbody td{padding-top:.5rem;padding-bottom:.5rem;font-size:16px;font-weight:400;line-height:150%;letter-spacing:-.03em}@font-face{font-family:Figtree Variable;font-style:normal;font-display:swap;font-weight:300 900;src:url(/votee/assets/figtree-latin-ext-wght-normal-Bptc-cl5.woff2) format("woff2-variations");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Figtree Variable;font-style:normal;font-display:swap;font-weight:300 900;src:url(/votee/assets/figtree-latin-wght-normal-tyJnQ6lj.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-cyrillic-ext-wght-normal-DPu6aEAn.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-cyrillic-wght-normal-CK9U7V71.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-greek-wght-normal-C58MjUu-.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-vietnamese-wght-normal-B7nCECYT.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-latin-ext-wght-normal-BWJwKVm9.woff2) format("woff2-variations");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/roboto-mono-latin-wght-normal-DGRqvGGI.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--white: #fff;--palatinate-blue: #2c3bd5;--bright-gray: #eae6f0;--dark-gunmetal: #242629;--navy-blue: #000062;--mystic: #d44c7d;--green-sheen: #66bfa0;--azure: #008cff;--rose-red: #cc1e5c;--medium-blue: #0d00d2;--table-border-light: rgba(143, 142, 223, .39);--table-border-dark: rgba(36, 38, 41, .8);--old-silver: #858486}@font-face{font-family:Roboto Mono Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/votee/assets/figtree-latin-wght-normal-tyJnQ6lj.woff2) format("woff2");unicode-range:U+2026}*,*:before,*:after{box-sizing:border-box}body{margin:0;font-family:Figtree Variable,system-ui,sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:150%;color:var(--white);text-align:left;background-color:var(--palatinate-blue);background-image:url(/votee/background.webp);background-size:cover;background-position:center center;background-repeat:no-repeat;min-height:100dvh}h1,h2,h3,h4,h5,h6,p{margin:0}h1{font-size:56px;font-weight:500;line-height:130%;letter-spacing:-.03em}h2{font-size:30px;font-weight:500;line-height:140%;letter-spacing:-.03em}h3{font-size:26px;font-weight:500;line-height:130%;letter-spacing:-.03em}@media screen and (max-width: 1000px){h1{font-size:32px;font-weight:600;line-height:140%;letter-spacing:-.03em}h3{font-size:22px;font-weight:500;line-height:130%;letter-spacing:-.03em}} diff --git a/votee/assets/index-Q1i2HThr.js b/votee/assets/index-Q1i2HThr.js new file mode 100644 index 0000000..69518dd --- /dev/null +++ b/votee/assets/index-Q1i2HThr.js @@ -0,0 +1,158 @@ +var mH=Object.defineProperty;var vH=(t,e,n)=>e in t?mH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var R=(t,e,n)=>(vH(t,typeof e!="symbol"?e+"":e,n),n),qA=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var v=(t,e,n)=>(qA(t,e,"read from private field"),n?n.call(t):e.get(t)),M=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},O=(t,e,n,r)=>(qA(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var vs=(t,e,n,r)=>({set _(i){O(t,e,i,n)},get _(){return v(t,e,r)}}),ie=(t,e,n)=>(qA(t,e,"access private method"),n);function mM(t,e){for(var n=0;nr[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"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Kg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function bH(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var vM={exports:{}},m2={},bM={exports:{}},Ut={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Km=Symbol.for("react.element"),wH=Symbol.for("react.portal"),xH=Symbol.for("react.fragment"),AH=Symbol.for("react.strict_mode"),EH=Symbol.for("react.profiler"),SH=Symbol.for("react.provider"),PH=Symbol.for("react.context"),OH=Symbol.for("react.forward_ref"),TH=Symbol.for("react.suspense"),CH=Symbol.for("react.memo"),kH=Symbol.for("react.lazy"),$4=Symbol.iterator;function _H(t){return t===null||typeof t!="object"?null:(t=$4&&t[$4]||t["@@iterator"],typeof t=="function"?t:null)}var wM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xM=Object.assign,AM={};function tg(t,e,n){this.props=t,this.context=e,this.refs=AM,this.updater=n||wM}tg.prototype.isReactComponent={};tg.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")};tg.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function EM(){}EM.prototype=tg.prototype;function xS(t,e,n){this.props=t,this.context=e,this.refs=AM,this.updater=n||wM}var AS=xS.prototype=new EM;AS.constructor=xS;xM(AS,tg.prototype);AS.isPureReactComponent=!0;var U4=Array.isArray,SM=Object.prototype.hasOwnProperty,ES={current:null},PM={key:!0,ref:!0,__self:!0,__source:!0};function OM(t,e,n){var r,i={},a=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(a=""+e.key),e)SM.call(e,r)&&!PM.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,we=V[Ae];if(0>>1;Aei(De,pe))sti(Tt,De)?(V[Ae]=Tt,V[st]=pe,Ae=st):(V[Ae]=De,V[nt]=pe,Ae=nt);else if(sti(Tt,pe))V[Ae]=Tt,V[st]=pe,Ae=st;else break e}}return ee}function i(V,ee){var pe=V.sortIndex-ee.sortIndex;return pe!==0?pe:V.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],c=[],u=1,f=null,h=3,d=!1,g=!1,p=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(V){for(var ee=n(c);ee!==null;){if(ee.callback===null)r(c);else if(ee.startTime<=V)r(c),ee.sortIndex=ee.expirationTime,e(l,ee);else break;ee=n(c)}}function A(V){if(p=!1,x(V),!g)if(n(l)!==null)g=!0,H(S);else{var ee=n(c);ee!==null&&re(A,ee.startTime-V)}}function S(V,ee){g=!1,p&&(p=!1,m(C),C=-1),d=!0;var pe=h;try{for(x(ee),f=n(l);f!==null&&(!(f.expirationTime>ee)||V&&!L());){var Ae=f.callback;if(typeof Ae=="function"){f.callback=null,h=f.priorityLevel;var we=Ae(f.expirationTime<=ee);ee=t.unstable_now(),typeof we=="function"?f.callback=we:f===n(l)&&r(l),x(ee)}else r(l);f=n(l)}if(f!==null)var Ye=!0;else{var nt=n(c);nt!==null&&re(A,nt.startTime-ee),Ye=!1}return Ye}finally{f=null,h=pe,d=!1}}var E=!1,T=null,C=-1,N=5,B=-1;function L(){return!(t.unstable_now()-BV||125Ae?(V.sortIndex=pe,e(c,V),n(l)===null&&V===n(c)&&(p?(m(C),C=-1):p=!0,re(A,pe-Ae))):(V.sortIndex=we,e(l,V),g||d||(g=!0,H(S))),V},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(V){var ee=h;return function(){var pe=h;h=ee;try{return V.apply(this,arguments)}finally{h=pe}}}})(_M);kM.exports=_M;var zH=kM.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var NM=F,ua=zH;function xe(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),HE=Object.prototype.hasOwnProperty,HH=/^[: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]*$/,j4={},z4={};function GH(t){return HE.call(z4,t)?!0:HE.call(j4,t)?!1:HH.test(t)?z4[t]=!0:(j4[t]=!0,!1)}function VH(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function QH(t,e,n,r){if(e===null||typeof e>"u"||VH(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 mi(t,e,n,r,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){kr[t]=new mi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];kr[e]=new mi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){kr[t]=new mi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){kr[t]=new mi(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){kr[t]=new mi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){kr[t]=new mi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){kr[t]=new mi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){kr[t]=new mi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){kr[t]=new mi(t,5,!1,t.toLowerCase(),null,!1,!1)});var PS=/[\-:]([a-z])/g;function OS(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(PS,OS);kr[e]=new mi(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(PS,OS);kr[e]=new mi(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(PS,OS);kr[e]=new mi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){kr[t]=new mi(t,1,!1,t.toLowerCase(),null,!1,!1)});kr.xlinkHref=new mi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){kr[t]=new mi(t,1,!1,t.toLowerCase(),null,!0,!0)});function TS(t,e,n,r){var i=kr.hasOwnProperty(e)?kr[e]:null;(i!==null?i.type!==0:r||!(2s||i[o]!==a[s]){var l=` +`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=s);break}}}finally{n6=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Wg(t):""}function KH(t){switch(t.tag){case 5:return Wg(t.type);case 16:return Wg("Lazy");case 13:return Wg("Suspense");case 19:return Wg("SuspenseList");case 0:case 2:case 15:return t=r6(t.type,!1),t;case 11:return t=r6(t.type.render,!1),t;case 1:return t=r6(t.type,!0),t;default:return""}}function KE(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 Kh:return"Fragment";case Qh:return"Portal";case GE:return"Profiler";case CS:return"StrictMode";case VE:return"Suspense";case QE:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case MM:return(t.displayName||"Context")+".Consumer";case RM:return(t._context.displayName||"Context")+".Provider";case kS:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case _S:return e=t.displayName||null,e!==null?e:KE(t.type)||"Memo";case Wl:e=t._payload,t=t._init;try{return KE(t(e))}catch{}}return null}function WH(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 KE(e);case 8:return e===CS?"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 Zc(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function DM(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function JH(t){var e=DM(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ev(t){t._valueTracker||(t._valueTracker=JH(t))}function LM(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=DM(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function gw(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 WE(t,e){var n=e.checked;return Mn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function G4(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Zc(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function $M(t,e){e=e.checked,e!=null&&TS(t,"checked",e,!1)}function JE(t,e){$M(t,e);var n=Zc(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?YE(t,e.type,n):e.hasOwnProperty("defaultValue")&&YE(t,e.type,Zc(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function V4(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function YE(t,e,n){(e!=="number"||gw(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Jg=Array.isArray;function xd(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Sv.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function jy(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var gy={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},YH=["Webkit","ms","Moz","O"];Object.keys(gy).forEach(function(t){YH.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),gy[e]=gy[t]})});function zM(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||gy.hasOwnProperty(t)&&gy[t]?(""+e).trim():e+"px"}function HM(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=zM(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var XH=Mn({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 qE(t,e){if(e){if(XH[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(xe(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(xe(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(xe(61))}if(e.style!=null&&typeof e.style!="object")throw Error(xe(62))}}function e5(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 t5=null;function NS(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var n5=null,Ad=null,Ed=null;function W4(t){if(t=Ym(t)){if(typeof n5!="function")throw Error(xe(280));var e=t.stateNode;e&&(e=A2(e),n5(t.stateNode,t.type,e))}}function GM(t){Ad?Ed?Ed.push(t):Ed=[t]:Ad=t}function VM(){if(Ad){var t=Ad,e=Ed;if(Ed=Ad=null,W4(t),e)for(t=0;t>>=0,t===0?32:31-(lG(t)/cG|0)|0}var Pv=64,Ov=4194304;function Yg(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 bw(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,a=t.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=Yg(s):(a&=o,a!==0&&(r=Yg(a)))}else o=n&~i,o!==0?r=Yg(o):a!==0&&(r=Yg(a));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Wm(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ao(e),t[e]=n}function dG(t,e){var n=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 r=t.eventTimes;for(t=t.expirationTimes;0=my),rT=" ",iT=!1;function fB(t,e){switch(t){case"keyup":return jG.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hB(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Wh=!1;function HG(t,e){switch(t){case"compositionend":return hB(e);case"keypress":return e.which!==32?null:(iT=!0,rT);case"textInput":return t=e.data,t===rT&&iT?null:t;default:return null}}function GG(t,e){if(Wh)return t==="compositionend"||!US&&fB(t,e)?(t=cB(),Nb=DS=Rc=null,Wh=!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:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lT(n)}}function yB(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?yB(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function mB(){for(var t=window,e=gw();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=gw(t.document)}return e}function FS(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 qG(t){var e=mB(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&yB(n.ownerDocument.documentElement,n)){if(r!==null&&FS(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!t.extend&&a>r&&(i=r,r=a,a=i),i=cT(n,a);var o=cT(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jh=null,l5=null,by=null,c5=!1;function uT(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;c5||Jh==null||Jh!==gw(r)||(r=Jh,"selectionStart"in r&&FS(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}),by&&Ky(by,r)||(by=r,r=Aw(l5,"onSelect"),0Zh||(t.current=g5[Zh],g5[Zh]=null,Zh--)}function pn(t,e){Zh++,g5[Zh]=t.current,t.current=e}var qc={},Jr=ru(qc),Ri=ru(!1),Jf=qc;function hp(t,e){var n=t.type.contextTypes;if(!n)return qc;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=e[a];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Mi(t){return t=t.childContextTypes,t!=null}function Sw(){xn(Ri),xn(Jr)}function mT(t,e,n){if(Jr.current!==qc)throw Error(xe(168));pn(Jr,e),pn(Ri,n)}function OB(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(xe(108,WH(t)||"Unknown",i));return Mn({},n,r)}function Pw(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||qc,Jf=Jr.current,pn(Jr,t),pn(Ri,Ri.current),!0}function vT(t,e,n){var r=t.stateNode;if(!r)throw Error(xe(169));n?(t=OB(t,e,Jf),r.__reactInternalMemoizedMergedChildContext=t,xn(Ri),xn(Jr),pn(Jr,t)):xn(Ri),pn(Ri,n)}var Ts=null,E2=!1,m6=!1;function TB(t){Ts===null?Ts=[t]:Ts.push(t)}function fV(t){E2=!0,TB(t)}function iu(){if(!m6&&Ts!==null){m6=!0;var t=0,e=on;try{var n=Ts;for(on=1;t>=o,i-=o,al=1<<32-Ao(e)+i|n<C?(N=T,T=null):N=T.sibling;var B=h(m,T,x[C],A);if(B===null){T===null&&(T=N);break}t&&T&&B.alternate===null&&e(m,T),b=a(B,b,C),E===null?S=B:E.sibling=B,E=B,T=N}if(C===x.length)return n(m,T),En&&wu(m,C),S;if(T===null){for(;CC?(N=T,T=null):N=T.sibling;var L=h(m,T,B.value,A);if(L===null){T===null&&(T=N);break}t&&T&&L.alternate===null&&e(m,T),b=a(L,b,C),E===null?S=L:E.sibling=L,E=L,T=N}if(B.done)return n(m,T),En&&wu(m,C),S;if(T===null){for(;!B.done;C++,B=x.next())B=f(m,B.value,A),B!==null&&(b=a(B,b,C),E===null?S=B:E.sibling=B,E=B);return En&&wu(m,C),S}for(T=r(m,T);!B.done;C++,B=x.next())B=d(T,m,C,B.value,A),B!==null&&(t&&B.alternate!==null&&T.delete(B.key===null?C:B.key),b=a(B,b,C),E===null?S=B:E.sibling=B,E=B);return t&&T.forEach(function(U){return e(m,U)}),En&&wu(m,C),S}function y(m,b,x,A){if(typeof x=="object"&&x!==null&&x.type===Kh&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Av:e:{for(var S=x.key,E=b;E!==null;){if(E.key===S){if(S=x.type,S===Kh){if(E.tag===7){n(m,E.sibling),b=i(E,x.props.children),b.return=m,m=b;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Wl&&PT(S)===E.type){n(m,E.sibling),b=i(E,x.props),b.ref=Tg(m,E,x),b.return=m,m=b;break e}n(m,E);break}else e(m,E);E=E.sibling}x.type===Kh?(b=Lf(x.props.children,m.mode,A,x.key),b.return=m,m=b):(A=Ub(x.type,x.key,x.props,null,m.mode,A),A.ref=Tg(m,b,x),A.return=m,m=A)}return o(m);case Qh:e:{for(E=x.key;b!==null;){if(b.key===E)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(m,b.sibling),b=i(b,x.children||[]),b.return=m,m=b;break e}else{n(m,b);break}else e(m,b);b=b.sibling}b=P6(x,m.mode,A),b.return=m,m=b}return o(m);case Wl:return E=x._init,y(m,b,E(x._payload),A)}if(Jg(x))return g(m,b,x,A);if(Ag(x))return p(m,b,x,A);Rv(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(m,b.sibling),b=i(b,x),b.return=m,m=b):(n(m,b),b=S6(x,m.mode,A),b.return=m,m=b),o(m)):n(m,b)}return y}var pp=BB(!0),DB=BB(!1),Xm={},as=ru(Xm),Xy=ru(Xm),Zy=ru(Xm);function Iu(t){if(t===Xm)throw Error(xe(174));return t}function JS(t,e){switch(pn(Zy,e),pn(Xy,t),pn(as,Xm),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:ZE(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=ZE(e,t)}xn(as),pn(as,e)}function gp(){xn(as),xn(Xy),xn(Zy)}function LB(t){Iu(Zy.current);var e=Iu(as.current),n=ZE(e,t.type);e!==n&&(pn(Xy,t),pn(as,n))}function YS(t){Xy.current===t&&(xn(as),xn(Xy))}var Cn=ru(0);function Nw(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 v6=[];function XS(){for(var t=0;tn?n:4,t(!0);var r=b6.transition;b6.transition={};try{t(!1),e()}finally{on=n,b6.transition=r}}function qB(){return Ga().memoizedState}function gV(t,e,n){var r=Qc(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},e7(t))t7(e,n);else if(n=NB(t,e,n,r),n!==null){var i=pi();Eo(n,t,r,i),n7(n,e,r)}}function yV(t,e,n){var r=Qc(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(e7(t))t7(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var o=e.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Oo(s,o)){var l=e.interleaved;l===null?(i.next=i,KS(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=NB(t,e,i,r),n!==null&&(i=pi(),Eo(n,t,r,i),n7(n,e,r))}}function e7(t){var e=t.alternate;return t===Rn||e!==null&&e===Rn}function t7(t,e){wy=Iw=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function n7(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,RS(t,n)}}var Rw={readContext:Ha,useCallback:Rr,useContext:Rr,useEffect:Rr,useImperativeHandle:Rr,useInsertionEffect:Rr,useLayoutEffect:Rr,useMemo:Rr,useReducer:Rr,useRef:Rr,useState:Rr,useDebugValue:Rr,useDeferredValue:Rr,useTransition:Rr,useMutableSource:Rr,useSyncExternalStore:Rr,useId:Rr,unstable_isNewReconciler:!1},mV={readContext:Ha,useCallback:function(t,e){return Do().memoizedState=[t,e===void 0?null:e],t},useContext:Ha,useEffect:TT,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Bb(4194308,4,WB.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Bb(4194308,4,t,e)},useInsertionEffect:function(t,e){return Bb(4,2,t,e)},useMemo:function(t,e){var n=Do();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Do();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=gV.bind(null,Rn,t),[r.memoizedState,t]},useRef:function(t){var e=Do();return t={current:t},e.memoizedState=t},useState:OT,useDebugValue:nP,useDeferredValue:function(t){return Do().memoizedState=t},useTransition:function(){var t=OT(!1),e=t[0];return t=pV.bind(null,t[1]),Do().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Rn,i=Do();if(En){if(n===void 0)throw Error(xe(407));n=n()}else{if(n=e(),gr===null)throw Error(xe(349));Xf&30||FB(r,e,n)}i.memoizedState=n;var a={value:n,getSnapshot:e};return i.queue=a,TT(zB.bind(null,r,a,t),[t]),r.flags|=2048,t1(9,jB.bind(null,r,a,n,e),void 0,null),n},useId:function(){var t=Do(),e=gr.identifierPrefix;if(En){var n=ol,r=al;n=(r&~(1<<32-Ao(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=qy++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Zo]=e,t[Yy]=r,f7(t,e,!1,!1),e.stateNode=t;e:{switch(o=e5(n,r),n){case"dialog":mn("cancel",t),mn("close",t),i=r;break;case"iframe":case"object":case"embed":mn("load",t),i=r;break;case"video":case"audio":for(i=0;imp&&(e.flags|=128,r=!0,Cg(a,!1),e.lanes=4194304)}else{if(!r)if(t=Nw(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Cg(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!En)return Mr(e),null}else 2*Wn()-a.renderingStartTime>mp&&n!==1073741824&&(e.flags|=128,r=!0,Cg(a,!1),e.lanes=4194304);a.isBackwards?(o.sibling=e.child,e.child=o):(n=a.last,n!==null?n.sibling=o:e.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Wn(),e.sibling=null,n=Cn.current,pn(Cn,r?n&1|2:n&1),e):(Mr(e),null);case 22:case 23:return lP(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?ra&1073741824&&(Mr(e),e.subtreeFlags&6&&(e.flags|=8192)):Mr(e),null;case 24:return null;case 25:return null}throw Error(xe(156,e.tag))}function PV(t,e){switch(zS(e),e.tag){case 1:return Mi(e.type)&&Sw(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return gp(),xn(Ri),xn(Jr),XS(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return YS(e),null;case 13:if(xn(Cn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(xe(340));dp()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return xn(Cn),null;case 4:return gp(),null;case 10:return QS(e.type._context),null;case 22:case 23:return lP(),null;case 24:return null;default:return null}}var Bv=!1,Hr=!1,OV=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function nd(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){jn(t,e,r)}else n.current=null}function T5(t,e,n){try{n()}catch(r){jn(t,e,r)}}var DT=!1;function TV(t,e){if(u5=ww,t=mB(),FS(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,l=-1,c=0,u=0,f=t,h=null;t:for(;;){for(var d;f!==n||i!==0&&f.nodeType!==3||(s=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===t)break t;if(h===n&&++c===i&&(s=o),h===a&&++u===r&&(l=o),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(f5={focusedElem:t,selectionRange:n},ww=!1,Ke=e;Ke!==null;)if(e=Ke,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Ke=t;else for(;Ke!==null;){e=Ke;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var p=g.memoizedProps,y=g.memoizedState,m=e.stateNode,b=m.getSnapshotBeforeUpdate(e.elementType===e.type?p:no(e.type,p),y);m.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(xe(163))}}catch(A){jn(e,e.return,A)}if(t=e.sibling,t!==null){t.return=e.return,Ke=t;break}Ke=e.return}return g=DT,DT=!1,g}function xy(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&T5(e,n,a)}i=i.next}while(i!==r)}}function O2(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function C5(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function p7(t){var e=t.alternate;e!==null&&(t.alternate=null,p7(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Zo],delete e[Yy],delete e[p5],delete e[cV],delete e[uV])),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 g7(t){return t.tag===5||t.tag===3||t.tag===4}function LT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||g7(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 k5(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Ew));else if(r!==4&&(t=t.child,t!==null))for(k5(t,e,n),t=t.sibling;t!==null;)k5(t,e,n),t=t.sibling}function _5(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(_5(t,e,n),t=t.sibling;t!==null;)_5(t,e,n),t=t.sibling}var xr=null,ho=!1;function jl(t,e,n){for(n=n.child;n!==null;)y7(t,e,n),n=n.sibling}function y7(t,e,n){if(is&&typeof is.onCommitFiberUnmount=="function")try{is.onCommitFiberUnmount(v2,n)}catch{}switch(n.tag){case 5:Hr||nd(n,e);case 6:var r=xr,i=ho;xr=null,jl(t,e,n),xr=r,ho=i,xr!==null&&(ho?(t=xr,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):xr.removeChild(n.stateNode));break;case 18:xr!==null&&(ho?(t=xr,n=n.stateNode,t.nodeType===8?y6(t.parentNode,n):t.nodeType===1&&y6(t,n),Vy(t)):y6(xr,n.stateNode));break;case 4:r=xr,i=ho,xr=n.stateNode.containerInfo,ho=!0,jl(t,e,n),xr=r,ho=i;break;case 0:case 11:case 14:case 15:if(!Hr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&T5(n,e,o),i=i.next}while(i!==r)}jl(t,e,n);break;case 1:if(!Hr&&(nd(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){jn(n,e,s)}jl(t,e,n);break;case 21:jl(t,e,n);break;case 22:n.mode&1?(Hr=(r=Hr)||n.memoizedState!==null,jl(t,e,n),Hr=r):jl(t,e,n);break;default:jl(t,e,n)}}function $T(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new OV),e.forEach(function(r){var i=DV.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Za(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~a}if(r=i,r=Wn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kV(r/1960))-r,10t?16:t,Mc===null)var r=!1;else{if(t=Mc,Mc=null,Dw=0,Wt&6)throw Error(xe(331));var i=Wt;for(Wt|=4,Ke=t.current;Ke!==null;){var a=Ke,o=a.child;if(Ke.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lWn()-oP?Df(t,0):aP|=n),Bi(t,e)}function S7(t,e){e===0&&(t.mode&1?(e=Ov,Ov<<=1,!(Ov&130023424)&&(Ov=4194304)):e=1);var n=pi();t=wl(t,e),t!==null&&(Wm(t,e,n),Bi(t,n))}function BV(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),S7(t,n)}function DV(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(xe(314))}r!==null&&r.delete(e),S7(t,n)}var P7;P7=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ri.current)Ni=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ni=!1,EV(t,e,n);Ni=!!(t.flags&131072)}else Ni=!1,En&&e.flags&1048576&&CB(e,Tw,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Db(t,e),t=e.pendingProps;var i=hp(e,Jr.current);Pd(e,n),i=qS(null,e,r,t,i,n);var a=eP();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,Mi(r)?(a=!0,Pw(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,WS(e),i.updater=S2,e.stateNode=i,i._reactInternals=e,w5(e,r,t,n),e=E5(null,e,r,!0,a,n)):(e.tag=0,En&&a&&jS(e),ei(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Db(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=$V(r),t=no(r,t),i){case 0:e=A5(null,e,r,t,n);break e;case 1:e=RT(null,e,r,t,n);break e;case 11:e=NT(null,e,r,t,n);break e;case 14:e=IT(null,e,r,no(r.type,t),n);break e}throw Error(xe(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:no(r,i),A5(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:no(r,i),RT(t,e,r,i,n);case 3:e:{if(l7(e),t===null)throw Error(xe(387));r=e.pendingProps,a=e.memoizedState,i=a.element,IB(t,e),_w(e,r,null,n);var o=e.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=yp(Error(xe(423)),e),e=MT(t,e,r,n,i);break e}else if(r!==i){i=yp(Error(xe(424)),e),e=MT(t,e,r,n,i);break e}else for(oa=Hc(e.stateNode.containerInfo.firstChild),ca=e,En=!0,vo=null,n=DB(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(dp(),r===i){e=xl(t,e,n);break e}ei(t,e,r,n)}e=e.child}return e;case 5:return LB(e),t===null&&m5(e),r=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,h5(r,i)?o=null:a!==null&&h5(r,a)&&(e.flags|=32),s7(t,e),ei(t,e,o,n),e.child;case 6:return t===null&&m5(e),null;case 13:return c7(t,e,n);case 4:return JS(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=pp(e,null,r,n):ei(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:no(r,i),NT(t,e,r,i,n);case 7:return ei(t,e,e.pendingProps,n),e.child;case 8:return ei(t,e,e.pendingProps.children,n),e.child;case 12:return ei(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value,pn(Cw,r._currentValue),r._currentValue=o,a!==null)if(Oo(a.value,o)){if(a.children===i.children&&!Ri.current){e=xl(t,e,n);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=ul(-1,n&-n),l.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),v5(a.return,n,e),s.lanes|=n;break}l=l.next}}else if(a.tag===10)o=a.type===e.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(xe(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),v5(o,n,e),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}ei(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Pd(e,n),i=Ha(i),r=r(i),e.flags|=1,ei(t,e,r,n),e.child;case 14:return r=e.type,i=no(r,e.pendingProps),i=no(r.type,i),IT(t,e,r,i,n);case 15:return a7(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:no(r,i),Db(t,e),e.tag=1,Mi(r)?(t=!0,Pw(e)):t=!1,Pd(e,n),MB(e,r,i),w5(e,r,i,n),E5(null,e,r,!0,t,n);case 19:return u7(t,e,n);case 22:return o7(t,e,n)}throw Error(xe(156,e.tag))};function O7(t,e){return ZM(t,e)}function LV(t,e,n,r){this.tag=t,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $a(t,e,n,r){return new LV(t,e,n,r)}function uP(t){return t=t.prototype,!(!t||!t.isReactComponent)}function $V(t){if(typeof t=="function")return uP(t)?1:0;if(t!=null){if(t=t.$$typeof,t===kS)return 11;if(t===_S)return 14}return 2}function Kc(t,e){var n=t.alternate;return n===null?(n=$a(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ub(t,e,n,r,i,a){var o=2;if(r=t,typeof t=="function")uP(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Kh:return Lf(n.children,i,a,e);case CS:o=8,i|=8;break;case GE:return t=$a(12,n,e,i|2),t.elementType=GE,t.lanes=a,t;case VE:return t=$a(13,n,e,i),t.elementType=VE,t.lanes=a,t;case QE:return t=$a(19,n,e,i),t.elementType=QE,t.lanes=a,t;case BM:return C2(n,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case RM:o=10;break e;case MM:o=9;break e;case kS:o=11;break e;case _S:o=14;break e;case Wl:o=16,r=null;break e}throw Error(xe(130,t==null?t:typeof t,""))}return e=$a(o,n,e,i),e.elementType=t,e.type=r,e.lanes=a,e}function Lf(t,e,n,r){return t=$a(7,t,r,e),t.lanes=n,t}function C2(t,e,n,r){return t=$a(22,t,r,e),t.elementType=BM,t.lanes=n,t.stateNode={isHidden:!1},t}function S6(t,e,n){return t=$a(6,t,null,e),t.lanes=n,t}function P6(t,e,n){return e=$a(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function UV(t,e,n,r,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=a6(0),this.expirationTimes=a6(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=a6(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function fP(t,e,n,r,i,a,o,s,l){return t=new UV(t,e,n,s,l),e===1?(e=1,a===!0&&(e|=8)):e=0,a=$a(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},WS(a),t}function FV(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_7)}catch(t){console.error(t)}}_7(),CM.exports=fa;var gP=CM.exports;const VV=Xt(gP),QV=mM({__proto__:null,default:VV},[gP]);var QT=gP;zE.createRoot=QT.createRoot,zE.hydrateRoot=QT.hydrateRoot;/** + * @remix-run/router v1.15.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function zn(){return zn=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 WV(){return Math.random().toString(36).substr(2,8)}function WT(t,e){return{usr:t.state,key:t.key,idx:e}}function r1(t,e,n,r){return n===void 0&&(n=null),zn({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?ps(e):e,{state:n,key:e&&e.key||r||WV()})}function Zm(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function ps(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function JV(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=Qn.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(zn({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function f(){s=Qn.Pop;let y=u(),m=y==null?null:y-c;c=y,l&&l({action:s,location:p.location,delta:m})}function h(y,m){s=Qn.Push;let b=r1(p.location,y,m);n&&n(b,y),c=u()+1;let x=WT(b,c),A=p.createHref(b);try{o.pushState(x,"",A)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(A)}a&&l&&l({action:s,location:p.location,delta:1})}function d(y,m){s=Qn.Replace;let b=r1(p.location,y,m);n&&n(b,y),c=u();let x=WT(b,c),A=p.createHref(b);o.replaceState(x,"",A),a&&l&&l({action:s,location:p.location,delta:0})}function g(y){let m=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:Zm(y);return b=b.replace(/ $/,"%20"),Dt(m,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,m)}let p={get action(){return s},get location(){return t(i,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(KT,f),l=y,()=>{i.removeEventListener(KT,f),l=null}},createHref(y){return e(i,y)},createURL:g,encodeLocation(y){let m=g(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:d,go(y){return o.go(y)}};return p}var $n;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})($n||($n={}));const YV=new Set(["lazy","caseSensitive","path","id","index","children"]);function XV(t){return t.index===!0}function B5(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((i,a)=>{let o=[...n,a],s=typeof i.id=="string"?i.id:o.join("-");if(Dt(i.index!==!0||!i.children,"Cannot specify children on an index route"),Dt(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),XV(i)){let l=zn({},i,e(i),{id:s});return r[s]=l,l}else{let l=zn({},i,e(i),{id:s,children:void 0});return r[s]=l,i.children&&(l.children=B5(i.children,e,o,r)),l}})}function id(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?ps(e):e,i=qm(r.pathname||"/",n);if(i==null)return null;let a=N7(t);qV(a);let o=null;for(let s=0;o==null&&s{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(Dt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Wc([r,l.relativePath]),u=n.concat(l);a.children&&a.children.length>0&&(Dt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),N7(a.children,e,u,c)),!(a.path==null&&!a.index)&&e.push({path:c,score:oQ(c,a.index),routesMeta:u})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of I7(a.path))i(a,o,l)}),e}function I7(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=I7(r.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function qV(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:sQ(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const eQ=/^:[\w-]+$/,tQ=3,nQ=2,rQ=1,iQ=10,aQ=-2,JT=t=>t==="*";function oQ(t,e){let n=t.split("/"),r=n.length;return n.some(JT)&&(r+=aQ),e&&(r+=nQ),n.filter(i=>!JT(i)).reduce((i,a)=>i+(eQ.test(a)?tQ:a===""?rQ:iQ),r)}function sQ(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function lQ(t,e){let{routesMeta:n}=t,r={},i="/",a=[];for(let o=0;o{let{paramName:h,isOptional:d}=u;if(h==="*"){let p=s[f]||"";o=a.slice(0,a.length-p.length).replace(/(.)\/+$/,"$1")}const g=s[f];return d&&!g?c[h]=void 0:c[h]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:o,pattern:t}}function uQ(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!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 r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function fQ(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}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 qm(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function hQ(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?ps(t):t;return{pathname:n?n.startsWith("/")?n:dQ(n,e):e,search:gQ(r),hash:yQ(i)}}function dQ(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function O6(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function R7(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function yP(t,e){let n=R7(t);return e?n.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function mP(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=ps(t):(i=zn({},t),Dt(!i.pathname||!i.pathname.includes("?"),O6("?","pathname","search",i)),Dt(!i.pathname||!i.pathname.includes("#"),O6("#","pathname","hash",i)),Dt(!i.search||!i.search.includes("#"),O6("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=n;else{let f=e.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?e[f]:"/"}let l=hQ(i,s),c=o&&o!=="/"&&o.endsWith("/"),u=(a||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Wc=t=>t.join("/").replace(/\/\/+/g,"/"),pQ=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),gQ=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,yQ=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class vP{constructor(e,n,r,i){i===void 0&&(i=!1),this.status=e,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function M7(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const B7=["post","put","patch","delete"],mQ=new Set(B7),vQ=["get",...B7],bQ=new Set(vQ),wQ=new Set([301,302,303,307,308]),xQ=new Set([307,308]),T6={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},AQ={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_g={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},D7=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,EQ=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),L7="remix-router-transitions";function SQ(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;Dt(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let Q=t.detectErrorBoundary;i=q=>({hasErrorBoundary:Q(q)})}else i=EQ;let a={},o=B5(t.routes,i,void 0,a),s,l=t.basename||"/",c=zn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},t.future),u=null,f=new Set,h=null,d=null,g=null,p=t.hydrationData!=null,y=id(o,t.history.location,l),m=null;if(y==null){let Q=_a(404,{pathname:t.history.location.pathname}),{matches:q,route:se}=rC(o);y=q,m={[se.id]:Q}}let b,x=y.some(Q=>Q.route.lazy),A=y.some(Q=>Q.route.loader);if(x)b=!1;else if(!A)b=!0;else if(c.v7_partialHydration){let Q=t.hydrationData?t.hydrationData.loaderData:null,q=t.hydrationData?t.hydrationData.errors:null;b=y.every(se=>se.route.loader&&se.route.loader.hydrate!==!0&&(Q&&Q[se.route.id]!==void 0||q&&q[se.route.id]!==void 0))}else b=t.hydrationData!=null;let S,E={historyAction:t.history.action,location:t.history.location,matches:y,initialized:b,navigation:T6,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||m,fetchers:new Map,blockers:new Map},T=Qn.Pop,C=!1,N,B=!1,L=new Map,U=null,j=!1,X=!1,G=[],H=[],re=new Map,V=0,ee=-1,pe=new Map,Ae=new Set,we=new Map,Ye=new Map,nt=new Set,De=new Map,st=new Map,Tt=!1;function ln(){if(u=t.history.listen(Q=>{let{action:q,location:se,delta:Oe}=Q;if(Tt){Tt=!1;return}eh(st.size===0||Oe!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ge=pa({currentLocation:E.location,nextLocation:se,historyAction:q});if(Ge&&Oe!=null){Tt=!0,t.history.go(Oe*-1),Xr(Ge,{state:"blocked",location:se,proceed(){Xr(Ge,{state:"proceeding",proceed:void 0,reset:void 0,location:se}),t.history.go(Oe)},reset(){let xt=new Map(E.blockers);xt.set(Ge,_g),le({blockers:xt})}});return}return ze(q,se)}),n){BQ(e,L);let Q=()=>DQ(e,L);e.addEventListener("pagehide",Q),U=()=>e.removeEventListener("pagehide",Q)}return E.initialized||ze(Qn.Pop,E.location,{initialHydration:!0}),S}function Ee(){u&&u(),U&&U(),f.clear(),N&&N.abort(),E.fetchers.forEach((Q,q)=>Yr(q)),E.blockers.forEach((Q,q)=>zi(q))}function ne(Q){return f.add(Q),()=>f.delete(Q)}function le(Q,q){q===void 0&&(q={}),E=zn({},E,Q);let se=[],Oe=[];c.v7_fetcherPersist&&E.fetchers.forEach((Ge,xt)=>{Ge.state==="idle"&&(nt.has(xt)?Oe.push(xt):se.push(xt))}),[...f].forEach(Ge=>Ge(E,{deletedFetchers:Oe,unstable_viewTransitionOpts:q.viewTransitionOpts,unstable_flushSync:q.flushSync===!0})),c.v7_fetcherPersist&&(se.forEach(Ge=>E.fetchers.delete(Ge)),Oe.forEach(Ge=>Yr(Ge)))}function te(Q,q,se){var Oe,Ge;let{flushSync:xt}=se===void 0?{}:se,pt=E.actionData!=null&&E.navigation.formMethod!=null&&po(E.navigation.formMethod)&&E.navigation.state==="loading"&&((Oe=Q.state)==null?void 0:Oe._isRedirect)!==!0,lt;q.actionData?Object.keys(q.actionData).length>0?lt=q.actionData:lt=null:pt?lt=E.actionData:lt=null;let Ue=q.loaderData?nC(E.loaderData,q.loaderData,q.matches||[],q.errors):E.loaderData,Ct=E.blockers;Ct.size>0&&(Ct=new Map(Ct),Ct.forEach((_,w)=>Ct.set(w,_g)));let P=C===!0||E.navigation.formMethod!=null&&po(E.navigation.formMethod)&&((Ge=Q.state)==null?void 0:Ge._isRedirect)!==!0;s&&(o=s,s=void 0),j||T===Qn.Pop||(T===Qn.Push?t.history.push(Q,Q.state):T===Qn.Replace&&t.history.replace(Q,Q.state));let k;if(T===Qn.Pop){let _=L.get(E.location.pathname);_&&_.has(Q.pathname)?k={currentLocation:E.location,nextLocation:Q}:L.has(Q.pathname)&&(k={currentLocation:Q,nextLocation:E.location})}else if(B){let _=L.get(E.location.pathname);_?_.add(Q.pathname):(_=new Set([Q.pathname]),L.set(E.location.pathname,_)),k={currentLocation:E.location,nextLocation:Q}}le(zn({},q,{actionData:lt,loaderData:Ue,historyAction:T,location:Q,initialized:!0,navigation:T6,revalidation:"idle",restoreScrollPosition:yu(Q,q.matches||E.matches),preventScrollReset:P,blockers:Ct}),{viewTransitionOpts:k,flushSync:xt===!0}),T=Qn.Pop,C=!1,B=!1,j=!1,X=!1,G=[],H=[]}async function Ce(Q,q){if(typeof Q=="number"){t.history.go(Q);return}let se=D5(E.location,E.matches,l,c.v7_prependBasename,Q,c.v7_relativeSplatPath,q==null?void 0:q.fromRouteId,q==null?void 0:q.relative),{path:Oe,submission:Ge,error:xt}=YT(c.v7_normalizeFormMethod,!1,se,q),pt=E.location,lt=r1(E.location,Oe,q&&q.state);lt=zn({},lt,t.history.encodeLocation(lt));let Ue=q&&q.replace!=null?q.replace:void 0,Ct=Qn.Push;Ue===!0?Ct=Qn.Replace:Ue===!1||Ge!=null&&po(Ge.formMethod)&&Ge.formAction===E.location.pathname+E.location.search&&(Ct=Qn.Replace);let P=q&&"preventScrollReset"in q?q.preventScrollReset===!0:void 0,k=(q&&q.unstable_flushSync)===!0,_=pa({currentLocation:pt,nextLocation:lt,historyAction:Ct});if(_){Xr(_,{state:"blocked",location:lt,proceed(){Xr(_,{state:"proceeding",proceed:void 0,reset:void 0,location:lt}),Ce(Q,q)},reset(){let w=new Map(E.blockers);w.set(_,_g),le({blockers:w})}});return}return await ze(Ct,lt,{submission:Ge,pendingError:xt,preventScrollReset:P,replace:q&&q.replace,enableViewTransition:q&&q.unstable_viewTransition,flushSync:k})}function Se(){if(cn(),le({revalidation:"loading"}),E.navigation.state!=="submitting"){if(E.navigation.state==="idle"){ze(E.historyAction,E.location,{startUninterruptedRevalidation:!0});return}ze(T||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation})}}async function ze(Q,q,se){N&&N.abort(),N=null,T=Q,j=(se&&se.startUninterruptedRevalidation)===!0,gu(E.location,E.matches),C=(se&&se.preventScrollReset)===!0,B=(se&&se.enableViewTransition)===!0;let Oe=s||o,Ge=se&&se.overrideNavigation,xt=id(Oe,q,l),pt=(se&&se.flushSync)===!0;if(!xt){let w=_a(404,{pathname:q.pathname}),{matches:I,route:z}=rC(Oe);Ya(),te(q,{matches:I,loaderData:{},errors:{[z.id]:w}},{flushSync:pt});return}if(E.initialized&&!X&&kQ(E.location,q)&&!(se&&se.submission&&po(se.submission.formMethod))){te(q,{matches:xt},{flushSync:pt});return}N=new AbortController;let lt=Ig(t.history,q,N.signal,se&&se.submission),Ue,Ct;if(se&&se.pendingError)Ct={[Sy(xt).route.id]:se.pendingError};else if(se&&se.submission&&po(se.submission.formMethod)){let w=await $e(lt,q,se.submission,xt,{replace:se.replace,flushSync:pt});if(w.shortCircuited)return;Ue=w.pendingActionData,Ct=w.pendingActionError,Ge=C6(q,se.submission),pt=!1,lt=new Request(lt.url,{signal:lt.signal})}let{shortCircuited:P,loaderData:k,errors:_}=await rt(lt,q,xt,Ge,se&&se.submission,se&&se.fetcherSubmission,se&&se.replace,se&&se.initialHydration===!0,pt,Ue,Ct);P||(N=null,te(q,zn({matches:xt},Ue?{actionData:Ue}:{},{loaderData:k,errors:_})))}async function $e(Q,q,se,Oe,Ge){Ge===void 0&&(Ge={}),cn();let xt=RQ(q,se);le({navigation:xt},{flushSync:Ge.flushSync===!0});let pt,lt=$5(Oe,q);if(!lt.route.action&&!lt.route.lazy)pt={type:$n.error,error:_a(405,{method:Q.method,pathname:q.pathname,routeId:lt.route.id})};else if(pt=await Ng("action",Q,lt,Oe,a,i,l,c.v7_relativeSplatPath),Q.signal.aborted)return{shortCircuited:!0};if(Mu(pt)){let Ue;return Ge&&Ge.replace!=null?Ue=Ge.replace:Ue=pt.location===E.location.pathname+E.location.search,await Pe(E,pt,{submission:se,replace:Ue}),{shortCircuited:!0}}if(ad(pt)){let Ue=Sy(Oe,lt.route.id);return(Ge&&Ge.replace)!==!0&&(T=Qn.Push),{pendingActionData:{},pendingActionError:{[Ue.route.id]:pt.error}}}if(Ru(pt))throw _a(400,{type:"defer-action"});return{pendingActionData:{[lt.route.id]:pt.data}}}async function rt(Q,q,se,Oe,Ge,xt,pt,lt,Ue,Ct,P){let k=Oe||C6(q,Ge),_=Ge||xt||oC(k),w=s||o,[I,z]=XT(t.history,E,se,_,q,c.v7_partialHydration&<===!0,X,G,H,nt,we,Ae,w,l,Ct,P);if(Ya(ke=>!(se&&se.some(_e=>_e.route.id===ke))||I&&I.some(_e=>_e.route.id===ke)),ee=++V,I.length===0&&z.length===0){let ke=Ja();return te(q,zn({matches:se,loaderData:{},errors:P||null},Ct?{actionData:Ct}:{},ke?{fetchers:new Map(E.fetchers)}:{}),{flushSync:Ue}),{shortCircuited:!0}}if(!j&&(!c.v7_partialHydration||!lt)){z.forEach(_e=>{let Xe=E.fetchers.get(_e.key),ht=Rg(void 0,Xe?Xe.data:void 0);E.fetchers.set(_e.key,ht)});let ke=Ct||E.actionData;le(zn({navigation:k},ke?Object.keys(ke).length===0?{actionData:null}:{actionData:ke}:{},z.length>0?{fetchers:new Map(E.fetchers)}:{}),{flushSync:Ue})}z.forEach(ke=>{re.has(ke.key)&&ji(ke.key),ke.controller&&re.set(ke.key,ke.controller)});let W=()=>z.forEach(ke=>ji(ke.key));N&&N.signal.addEventListener("abort",W);let{results:ce,loaderResults:ve,fetcherResults:Le}=await nn(E.matches,se,I,z,Q);if(Q.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",W),z.forEach(ke=>re.delete(ke.key));let Te=iC(ce);if(Te){if(Te.idx>=I.length){let ke=z[Te.idx-I.length].key;Ae.add(ke)}return await Pe(E,Te.result,{replace:pt}),{shortCircuited:!0}}let{loaderData:Rt,errors:Re}=tC(E,se,I,ve,P,z,Le,De);De.forEach((ke,_e)=>{ke.subscribe(Xe=>{(Xe||ke.done)&&De.delete(_e)})}),c.v7_partialHydration&<&&E.errors&&Object.entries(E.errors).filter(ke=>{let[_e]=ke;return!I.some(Xe=>Xe.route.id===_e)}).forEach(ke=>{let[_e,Xe]=ke;Re=Object.assign(Re||{},{[_e]:Xe})});let ft=Ja(),at=Ul(ee),vt=ft||at||z.length>0;return zn({loaderData:Rt,errors:Re},vt?{fetchers:new Map(E.fetchers)}:{})}function dt(Q,q,se,Oe){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");re.has(Q)&&ji(Q);let Ge=(Oe&&Oe.unstable_flushSync)===!0,xt=s||o,pt=D5(E.location,E.matches,l,c.v7_prependBasename,se,c.v7_relativeSplatPath,q,Oe==null?void 0:Oe.relative),lt=id(xt,pt,l);if(!lt){Wa(Q,q,_a(404,{pathname:pt}),{flushSync:Ge});return}let{path:Ue,submission:Ct,error:P}=YT(c.v7_normalizeFormMethod,!0,pt,Oe);if(P){Wa(Q,q,P,{flushSync:Ge});return}let k=$5(lt,Ue);if(C=(Oe&&Oe.preventScrollReset)===!0,Ct&&po(Ct.formMethod)){wt(Q,q,Ue,k,lt,Ge,Ct);return}we.set(Q,{routeId:q,path:Ue}),yt(Q,q,Ue,k,lt,Ge,Ct)}async function wt(Q,q,se,Oe,Ge,xt,pt){if(cn(),we.delete(Q),!Oe.route.action&&!Oe.route.lazy){let _e=_a(405,{method:pt.formMethod,pathname:se,routeId:q});Wa(Q,q,_e,{flushSync:xt});return}let lt=E.fetchers.get(Q);Gn(Q,MQ(pt,lt),{flushSync:xt});let Ue=new AbortController,Ct=Ig(t.history,se,Ue.signal,pt);re.set(Q,Ue);let P=V,k=await Ng("action",Ct,Oe,Ge,a,i,l,c.v7_relativeSplatPath);if(Ct.signal.aborted){re.get(Q)===Ue&&re.delete(Q);return}if(c.v7_fetcherPersist&&nt.has(Q)){if(Mu(k)||ad(k)){Gn(Q,Kl(void 0));return}}else{if(Mu(k))if(re.delete(Q),ee>P){Gn(Q,Kl(void 0));return}else return Ae.add(Q),Gn(Q,Rg(pt)),Pe(E,k,{fetcherSubmission:pt});if(ad(k)){Wa(Q,q,k.error);return}}if(Ru(k))throw _a(400,{type:"defer-action"});let _=E.navigation.location||E.location,w=Ig(t.history,_,Ue.signal),I=s||o,z=E.navigation.state!=="idle"?id(I,E.navigation.location,l):E.matches;Dt(z,"Didn't find any matches after fetcher action");let W=++V;pe.set(Q,W);let ce=Rg(pt,k.data);E.fetchers.set(Q,ce);let[ve,Le]=XT(t.history,E,z,pt,_,!1,X,G,H,nt,we,Ae,I,l,{[Oe.route.id]:k.data},void 0);Le.filter(_e=>_e.key!==Q).forEach(_e=>{let Xe=_e.key,ht=E.fetchers.get(Xe),Fe=Rg(void 0,ht?ht.data:void 0);E.fetchers.set(Xe,Fe),re.has(Xe)&&ji(Xe),_e.controller&&re.set(Xe,_e.controller)}),le({fetchers:new Map(E.fetchers)});let Te=()=>Le.forEach(_e=>ji(_e.key));Ue.signal.addEventListener("abort",Te);let{results:Rt,loaderResults:Re,fetcherResults:ft}=await nn(E.matches,z,ve,Le,w);if(Ue.signal.aborted)return;Ue.signal.removeEventListener("abort",Te),pe.delete(Q),re.delete(Q),Le.forEach(_e=>re.delete(_e.key));let at=iC(Rt);if(at){if(at.idx>=ve.length){let _e=Le[at.idx-ve.length].key;Ae.add(_e)}return Pe(E,at.result)}let{loaderData:vt,errors:ke}=tC(E,E.matches,ve,Re,void 0,Le,ft,De);if(E.fetchers.has(Q)){let _e=Kl(k.data);E.fetchers.set(Q,_e)}Ul(W),E.navigation.state==="loading"&&W>ee?(Dt(T,"Expected pending action"),N&&N.abort(),te(E.navigation.location,{matches:z,loaderData:vt,errors:ke,fetchers:new Map(E.fetchers)})):(le({errors:ke,loaderData:nC(E.loaderData,vt,z,ke),fetchers:new Map(E.fetchers)}),X=!1)}async function yt(Q,q,se,Oe,Ge,xt,pt){let lt=E.fetchers.get(Q);Gn(Q,Rg(pt,lt?lt.data:void 0),{flushSync:xt});let Ue=new AbortController,Ct=Ig(t.history,se,Ue.signal);re.set(Q,Ue);let P=V,k=await Ng("loader",Ct,Oe,Ge,a,i,l,c.v7_relativeSplatPath);if(Ru(k)&&(k=await F7(k,Ct.signal,!0)||k),re.get(Q)===Ue&&re.delete(Q),!Ct.signal.aborted){if(nt.has(Q)){Gn(Q,Kl(void 0));return}if(Mu(k))if(ee>P){Gn(Q,Kl(void 0));return}else{Ae.add(Q),await Pe(E,k);return}if(ad(k)){Wa(Q,q,k.error);return}Dt(!Ru(k),"Unhandled fetcher deferred data"),Gn(Q,Kl(k.data))}}async function Pe(Q,q,se){let{submission:Oe,fetcherSubmission:Ge,replace:xt}=se===void 0?{}:se;q.revalidate&&(X=!0);let pt=r1(Q.location,q.location,{_isRedirect:!0});if(Dt(pt,"Expected a location on the redirect navigation"),n){let _=!1;if(q.reloadDocument)_=!0;else if(D7.test(q.location)){const w=t.history.createURL(q.location);_=w.origin!==e.location.origin||qm(w.pathname,l)==null}if(_){xt?e.location.replace(q.location):e.location.assign(q.location);return}}N=null;let lt=xt===!0?Qn.Replace:Qn.Push,{formMethod:Ue,formAction:Ct,formEncType:P}=Q.navigation;!Oe&&!Ge&&Ue&&Ct&&P&&(Oe=oC(Q.navigation));let k=Oe||Ge;if(xQ.has(q.status)&&k&&po(k.formMethod))await ze(lt,pt,{submission:zn({},k,{formAction:q.location}),preventScrollReset:C});else{let _=C6(pt,Oe);await ze(lt,pt,{overrideNavigation:_,fetcherSubmission:Ge,preventScrollReset:C})}}async function nn(Q,q,se,Oe,Ge){let xt=await Promise.all([...se.map(Ue=>Ng("loader",Ge,Ue,q,a,i,l,c.v7_relativeSplatPath)),...Oe.map(Ue=>Ue.matches&&Ue.match&&Ue.controller?Ng("loader",Ig(t.history,Ue.path,Ue.controller.signal),Ue.match,Ue.matches,a,i,l,c.v7_relativeSplatPath):{type:$n.error,error:_a(404,{pathname:Ue.path})})]),pt=xt.slice(0,se.length),lt=xt.slice(se.length);return await Promise.all([aC(Q,se,pt,pt.map(()=>Ge.signal),!1,E.loaderData),aC(Q,Oe.map(Ue=>Ue.match),lt,Oe.map(Ue=>Ue.controller?Ue.controller.signal:null),!0)]),{results:xt,loaderResults:pt,fetcherResults:lt}}function cn(){X=!0,G.push(...Ya()),we.forEach((Q,q)=>{re.has(q)&&(H.push(q),ji(q))})}function Gn(Q,q,se){se===void 0&&(se={}),E.fetchers.set(Q,q),le({fetchers:new Map(E.fetchers)},{flushSync:(se&&se.flushSync)===!0})}function Wa(Q,q,se,Oe){Oe===void 0&&(Oe={});let Ge=Sy(E.matches,q);Yr(Q),le({errors:{[Ge.route.id]:se},fetchers:new Map(E.fetchers)},{flushSync:(Oe&&Oe.flushSync)===!0})}function ms(Q){return c.v7_fetcherPersist&&(Ye.set(Q,(Ye.get(Q)||0)+1),nt.has(Q)&&nt.delete(Q)),E.fetchers.get(Q)||AQ}function Yr(Q){let q=E.fetchers.get(Q);re.has(Q)&&!(q&&q.state==="loading"&&pe.has(Q))&&ji(Q),we.delete(Q),pe.delete(Q),Ae.delete(Q),nt.delete(Q),E.fetchers.delete(Q)}function du(Q){if(c.v7_fetcherPersist){let q=(Ye.get(Q)||0)-1;q<=0?(Ye.delete(Q),nt.add(Q)):Ye.set(Q,q)}else Yr(Q);le({fetchers:new Map(E.fetchers)})}function ji(Q){let q=re.get(Q);Dt(q,"Expected fetch controller: "+Q),q.abort(),re.delete(Q)}function pu(Q){for(let q of Q){let se=ms(q),Oe=Kl(se.data);E.fetchers.set(q,Oe)}}function Ja(){let Q=[],q=!1;for(let se of Ae){let Oe=E.fetchers.get(se);Dt(Oe,"Expected fetcher: "+se),Oe.state==="loading"&&(Ae.delete(se),Q.push(se),q=!0)}return pu(Q),q}function Ul(Q){let q=[];for(let[se,Oe]of pe)if(Oe0}function Fl(Q,q){let se=E.blockers.get(Q)||_g;return st.get(Q)!==q&&st.set(Q,q),se}function zi(Q){E.blockers.delete(Q),st.delete(Q)}function Xr(Q,q){let se=E.blockers.get(Q)||_g;Dt(se.state==="unblocked"&&q.state==="blocked"||se.state==="blocked"&&q.state==="blocked"||se.state==="blocked"&&q.state==="proceeding"||se.state==="blocked"&&q.state==="unblocked"||se.state==="proceeding"&&q.state==="unblocked","Invalid blocker state transition: "+se.state+" -> "+q.state);let Oe=new Map(E.blockers);Oe.set(Q,q),le({blockers:Oe})}function pa(Q){let{currentLocation:q,nextLocation:se,historyAction:Oe}=Q;if(st.size===0)return;st.size>1&&eh(!1,"A router only supports one blocker at a time");let Ge=Array.from(st.entries()),[xt,pt]=Ge[Ge.length-1],lt=E.blockers.get(xt);if(!(lt&<.state==="proceeding")&&pt({currentLocation:q,nextLocation:se,historyAction:Oe}))return xt}function Ya(Q){let q=[];return De.forEach((se,Oe)=>{(!Q||Q(Oe))&&(se.cancel(),q.push(Oe),De.delete(Oe))}),q}function Io(Q,q,se){if(h=Q,g=q,d=se||null,!p&&E.navigation===T6){p=!0;let Oe=yu(E.location,E.matches);Oe!=null&&le({restoreScrollPosition:Oe})}return()=>{h=null,g=null,d=null}}function Xa(Q,q){return d&&d(Q,q.map(Oe=>ZV(Oe,E.loaderData)))||Q.key}function gu(Q,q){if(h&&g){let se=Xa(Q,q);h[se]=g()}}function yu(Q,q){if(h){let se=Xa(Q,q),Oe=h[se];if(typeof Oe=="number")return Oe}return null}function Sh(Q){a={},s=B5(Q,i,void 0,a)}return S={get basename(){return l},get future(){return c},get state(){return E},get routes(){return o},get window(){return e},initialize:ln,subscribe:ne,enableScrollRestoration:Io,navigate:Ce,fetch:dt,revalidate:Se,createHref:Q=>t.history.createHref(Q),encodeLocation:Q=>t.history.encodeLocation(Q),getFetcher:ms,deleteFetcher:du,dispose:Ee,getBlocker:Fl,deleteBlocker:zi,_internalFetchControllers:re,_internalActiveDeferreds:De,_internalSetRoutes:Sh},S}function PQ(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function D5(t,e,n,r,i,a,o,s){let l,c;if(o){l=[];for(let f of e)if(l.push(f),f.route.id===o){c=f;break}}else l=e,c=e[e.length-1];let u=mP(i||".",yP(l,a),qm(t.pathname,n)||t.pathname,s==="path");return i==null&&(u.search=t.search,u.hash=t.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!bP(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Wc([n,u.pathname])),Zm(u)}function YT(t,e,n,r){if(!r||!PQ(r))return{path:n};if(r.formMethod&&!IQ(r.formMethod))return{path:n,error:_a(405,{method:r.formMethod})};let i=()=>({path:n,error:_a(400,{type:"invalid-body"})}),a=r.formMethod||"get",o=t?a.toUpperCase():a.toLowerCase(),s=U7(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!po(o))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((d,g)=>{let[p,y]=g;return""+d+p+"="+y+` +`},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!po(o))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}Dt(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=L5(r.formData),c=r.formData;else if(r.body instanceof FormData)l=L5(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=eC(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=eC(l)}catch{return i()}let u={formMethod:o,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(po(u.formMethod))return{path:n,submission:u};let f=ps(n);return e&&f.search&&bP(f.search)&&l.append("index",""),f.search="?"+l,{path:Zm(f),submission:u}}function OQ(t,e){let n=t;if(e){let r=t.findIndex(i=>i.route.id===e);r>=0&&(n=t.slice(0,r))}return n}function XT(t,e,n,r,i,a,o,s,l,c,u,f,h,d,g,p){let y=p?Object.values(p)[0]:g?Object.values(g)[0]:void 0,m=t.createURL(e.location),b=t.createURL(i),x=p?Object.keys(p)[0]:void 0,S=OQ(n,x).filter((T,C)=>{let{route:N}=T;if(N.lazy)return!0;if(N.loader==null)return!1;if(a)return N.loader.hydrate?!0:e.loaderData[N.id]===void 0&&(!e.errors||e.errors[N.id]===void 0);if(TQ(e.loaderData,e.matches[C],T)||s.some(U=>U===T.route.id))return!0;let B=e.matches[C],L=T;return ZT(T,zn({currentUrl:m,currentParams:B.params,nextUrl:b,nextParams:L.params},r,{actionResult:y,defaultShouldRevalidate:o||m.pathname+m.search===b.pathname+b.search||m.search!==b.search||$7(B,L)}))}),E=[];return u.forEach((T,C)=>{if(a||!n.some(j=>j.route.id===T.routeId)||c.has(C))return;let N=id(h,T.path,d);if(!N){E.push({key:C,routeId:T.routeId,path:T.path,matches:null,match:null,controller:null});return}let B=e.fetchers.get(C),L=$5(N,T.path),U=!1;f.has(C)?U=!1:l.includes(C)?U=!0:B&&B.state!=="idle"&&B.data===void 0?U=o:U=ZT(L,zn({currentUrl:m,currentParams:e.matches[e.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},r,{actionResult:y,defaultShouldRevalidate:o})),U&&E.push({key:C,routeId:T.routeId,path:T.path,matches:N,match:L,controller:new AbortController})}),[S,E]}function TQ(t,e,n){let r=!e||n.route.id!==e.route.id,i=t[n.route.id]===void 0;return r||i}function $7(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function ZT(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function qT(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let i=n[t.id];Dt(i,"No route found in manifest");let a={};for(let o in r){let l=i[o]!==void 0&&o!=="hasErrorBoundary";eh(!l,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!YV.has(o)&&(a[o]=r[o])}Object.assign(i,a),Object.assign(i,zn({},e(i),{lazy:void 0}))}async function Ng(t,e,n,r,i,a,o,s,l){l===void 0&&(l={});let c,u,f,h=p=>{let y,m=new Promise((b,x)=>y=x);return f=()=>y(),e.signal.addEventListener("abort",f),Promise.race([p({request:e,params:n.params,context:l.requestContext}),m])};try{let p=n.route[t];if(n.route.lazy)if(p){let y,m=await Promise.all([h(p).catch(b=>{y=b}),qT(n.route,a,i)]);if(y)throw y;u=m[0]}else if(await qT(n.route,a,i),p=n.route[t],p)u=await h(p);else if(t==="action"){let y=new URL(e.url),m=y.pathname+y.search;throw _a(405,{method:e.method,pathname:m,routeId:n.route.id})}else return{type:$n.data,data:void 0};else if(p)u=await h(p);else{let y=new URL(e.url),m=y.pathname+y.search;throw _a(404,{pathname:m})}Dt(u!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(p){c=$n.error,u=p}finally{f&&e.signal.removeEventListener("abort",f)}if(NQ(u)){let p=u.status;if(wQ.has(p)){let m=u.headers.get("Location");if(Dt(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!D7.test(m))m=D5(new URL(e.url),r.slice(0,r.indexOf(n)+1),o,!0,m,s);else if(!l.isStaticRequest){let b=new URL(e.url),x=m.startsWith("//")?new URL(b.protocol+m):new URL(m),A=qm(x.pathname,o)!=null;x.origin===b.origin&&A&&(m=x.pathname+x.search+x.hash)}if(l.isStaticRequest)throw u.headers.set("Location",m),u;return{type:$n.redirect,status:p,location:m,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(l.isRouteRequest)throw{type:c===$n.error?$n.error:$n.data,response:u};let y;try{let m=u.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?u.body==null?y=null:y=await u.json():y=await u.text()}catch(m){return{type:$n.error,error:m}}return c===$n.error?{type:c,error:new vP(p,u.statusText,y),headers:u.headers}:{type:$n.data,data:y,statusCode:u.status,headers:u.headers}}if(c===$n.error)return{type:c,error:u};if(_Q(u)){var d,g;return{type:$n.deferred,deferredData:u,statusCode:(d=u.init)==null?void 0:d.status,headers:((g=u.init)==null?void 0:g.headers)&&new Headers(u.init.headers)}}return{type:$n.data,data:u}}function Ig(t,e,n,r){let i=t.createURL(U7(e)).toString(),a={signal:n};if(r&&po(r.formMethod)){let{formMethod:o,formEncType:s}=r;a.method=o.toUpperCase(),s==="application/json"?(a.headers=new Headers({"Content-Type":s}),a.body=JSON.stringify(r.json)):s==="text/plain"?a.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?a.body=L5(r.formData):a.body=r.formData}return new Request(i,a)}function L5(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function eC(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function CQ(t,e,n,r,i){let a={},o=null,s,l=!1,c={};return n.forEach((u,f)=>{let h=e[f].route.id;if(Dt(!Mu(u),"Cannot handle redirect results in processLoaderData"),ad(u)){let d=Sy(t,h),g=u.error;r&&(g=Object.values(r)[0],r=void 0),o=o||{},o[d.route.id]==null&&(o[d.route.id]=g),a[h]=void 0,l||(l=!0,s=M7(u.error)?u.error.status:500),u.headers&&(c[h]=u.headers)}else Ru(u)?(i.set(h,u.deferredData),a[h]=u.deferredData.data):a[h]=u.data,u.statusCode!=null&&u.statusCode!==200&&!l&&(s=u.statusCode),u.headers&&(c[h]=u.headers)}),r&&(o=r,a[Object.keys(r)[0]]=void 0),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:c}}function tC(t,e,n,r,i,a,o,s){let{loaderData:l,errors:c}=CQ(e,n,r,i,s);for(let u=0;ur.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function rC(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function _a(t,e){let{pathname:n,routeId:r,method:i,type:a}=e===void 0?{}:e,o="Unknown Server Error",s="Unknown @remix-run/router error";return t===400?(o="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?s="defer() is not supported in actions":a==="invalid-body"&&(s="Unable to encode submission body")):t===403?(o="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):t===404?(o="Not Found",s='No route matches URL "'+n+'"'):t===405&&(o="Method Not Allowed",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new vP(t||500,o,new Error(s),!0)}function iC(t){for(let e=t.length-1;e>=0;e--){let n=t[e];if(Mu(n))return{result:n,idx:e}}}function U7(t){let e=typeof t=="string"?ps(t):t;return Zm(zn({},e,{hash:""}))}function kQ(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Ru(t){return t.type===$n.deferred}function ad(t){return t.type===$n.error}function Mu(t){return(t&&t.type)===$n.redirect}function _Q(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function NQ(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function IQ(t){return bQ.has(t.toLowerCase())}function po(t){return mQ.has(t.toLowerCase())}async function aC(t,e,n,r,i,a){for(let o=0;of.route.id===l.route.id),u=c!=null&&!$7(c,l)&&(a&&a[l.route.id])!==void 0;if(Ru(s)&&(i||u)){let f=r[o];Dt(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await F7(s,f,i).then(h=>{h&&(n[o]=h||n[o])})}}}async function F7(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:$n.data,data:t.deferredData.unwrappedData}}catch(i){return{type:$n.error,error:i}}return{type:$n.data,data:t.deferredData.data}}}function bP(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function $5(t,e){let n=typeof e=="string"?ps(e).search:e.search;if(t[t.length-1].route.index&&bP(n||""))return t[t.length-1];let r=R7(t);return r[r.length-1]}function oC(t){let{formMethod:e,formAction:n,formEncType:r,text:i,formData:a,json:o}=t;if(!(!e||!n||!r)){if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:e,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function C6(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function RQ(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Rg(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function MQ(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Kl(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function BQ(t,e){try{let n=t.sessionStorage.getItem(L7);if(n){let r=JSON.parse(n);for(let[i,a]of Object.entries(r||{}))a&&Array.isArray(a)&&e.set(i,new Set(a||[]))}}catch{}}function DQ(t,e){if(e.size>0){let n={};for(let[r,i]of e)n[r]=[...i];try{t.sessionStorage.setItem(L7,JSON.stringify(n))}catch(r){eh(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + * React Router v6.22.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function i1(){return i1=Object.assign?Object.assign.bind():function(t){for(var e=1;e{s.current=!0}),F.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let f=mP(c,JSON.parse(o),a,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Wc([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,o,a,t])}const $Q=F.createContext(null);function UQ(t){let e=F.useContext(au).outlet;return e&&F.createElement($Q.Provider,{value:t},e)}function FQ(t,e,n,r){tv()||Dt(!1);let{navigator:i}=F.useContext(ev),{matches:a}=F.useContext(au),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=B2(),u;if(e){var f;let y=typeof e=="string"?ps(e):e;l==="/"||(f=y.pathname)!=null&&f.startsWith(l)||Dt(!1),u=y}else u=c;let h=u.pathname||"/",d=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");d="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=id(t,{pathname:d}),p=VQ(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Wc([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Wc([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r);return e&&p?F.createElement(M2.Provider,{value:{location:i1({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Qn.Pop}},p):p}function jQ(){let t=JQ(),e=M7(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return F.createElement(F.Fragment,null,F.createElement("h2",null,"Unexpected Application Error!"),F.createElement("h3",{style:{fontStyle:"italic"}},e),n?F.createElement("pre",{style:i},n):null,null)}const zQ=F.createElement(jQ,null);class HQ extends F.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?F.createElement(au.Provider,{value:this.props.routeContext},F.createElement(z7.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function GQ(t){let{routeContext:e,match:n,children:r}=t,i=F.useContext(R2);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),F.createElement(au.Provider,{value:e},r)}function VQ(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var a;if((a=n)!=null&&a.errors)t=n.matches;else return null}let o=t,s=(i=n)==null?void 0:i.errors;if(s!=null){let u=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id]));u>=0||Dt(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,f,h)=>{let d,g=!1,p=null,y=null;n&&(d=s&&f.route.id?s[f.route.id]:void 0,p=f.route.errorElement||zQ,l&&(c<0&&h===0?(XQ("route-fallback",!1),g=!0,y=null):c===h&&(g=!0,y=f.route.hydrateFallbackElement||null)));let m=e.concat(o.slice(0,h+1)),b=()=>{let x;return d?x=p:g?x=y:f.route.Component?x=F.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=u,F.createElement(GQ,{match:f,routeContext:{outlet:u,matches:m,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?F.createElement(HQ,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:b(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):b()},null)}var V7=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(V7||{}),Uw=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}(Uw||{});function QQ(t){let e=F.useContext(R2);return e||Dt(!1),e}function KQ(t){let e=F.useContext(j7);return e||Dt(!1),e}function WQ(t){let e=F.useContext(au);return e||Dt(!1),e}function Q7(t){let e=WQ(),n=e.matches[e.matches.length-1];return n.route.id||Dt(!1),n.route.id}function JQ(){var t;let e=F.useContext(z7),n=KQ(Uw.UseRouteError),r=Q7(Uw.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function YQ(){let{router:t}=QQ(V7.UseNavigateStable),e=Q7(Uw.UseNavigateStable),n=F.useRef(!1);return H7(()=>{n.current=!0}),F.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,i1({fromRouteId:e},a)))},[t,e])}const sC={};function XQ(t,e,n){!e&&!sC[t]&&(sC[t]=!0)}function K7(t){let{to:e,replace:n,state:r,relative:i}=t;tv()||Dt(!1);let{future:a,static:o}=F.useContext(ev),{matches:s}=F.useContext(au),{pathname:l}=B2(),c=G7(),u=mP(e,yP(s,a.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(u);return F.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:i}),[c,f,i,n,r]),null}function ZQ(t){return UQ(t.context)}function qQ(t){let{basename:e="/",children:n=null,location:r,navigationType:i=Qn.Pop,navigator:a,static:o=!1,future:s}=t;tv()&&Dt(!1);let l=e.replace(/^\/*/,"/"),c=F.useMemo(()=>({basename:l,navigator:a,static:o,future:i1({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof r=="string"&&(r=ps(r));let{pathname:u="/",search:f="",hash:h="",state:d=null,key:g="default"}=r,p=F.useMemo(()=>{let y=qm(u,l);return y==null?null:{location:{pathname:y,search:f,hash:h,state:d,key:g},navigationType:i}},[l,u,f,h,d,g,i]);return p==null?null:F.createElement(ev.Provider,{value:c},F.createElement(M2.Provider,{children:n,value:p}))}new Promise(()=>{});function eK(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:F.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:F.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:F.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** + * React Router DOM v6.22.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Fw(){return Fw=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function tK(t,e){let n=U5(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(a=>{n.append(i,a)})}),n}const nK="6";try{window.__reactRouterVersion=nK}catch{}function rK(t,e){return SQ({basename:e==null?void 0:e.basename,future:Fw({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:KV({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||iK(),routes:t,mapRouteProperties:eK,window:e==null?void 0:e.window}).initialize()}function iK(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=Fw({},e,{errors:aK(e.errors)})),e}function aK(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")n[r]=new vP(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let a=window[i.__subType];if(typeof a=="function")try{let o=new a(i.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let a=new Error(i.message);a.stack="",n[r]=a}}else n[r]=i;return n}const oK=F.createContext({isTransitioning:!1}),sK=F.createContext(new Map),lK="startTransition",lC=BH[lK],cK="flushSync",cC=QV[cK];function uK(t){lC?lC(t):t()}function Mg(t){cC?cC(t):t()}class fK{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function hK(t){let{fallbackElement:e,router:n,future:r}=t,[i,a]=F.useState(n.state),[o,s]=F.useState(),[l,c]=F.useState({isTransitioning:!1}),[u,f]=F.useState(),[h,d]=F.useState(),[g,p]=F.useState(),y=F.useRef(new Map),{v7_startTransition:m}=r||{},b=F.useCallback(T=>{m?uK(T):T()},[m]),x=F.useCallback((T,C)=>{let{deletedFetchers:N,unstable_flushSync:B,unstable_viewTransitionOpts:L}=C;N.forEach(j=>y.current.delete(j)),T.fetchers.forEach((j,X)=>{j.data!==void 0&&y.current.set(X,j.data)});let U=n.window==null||typeof n.window.document.startViewTransition!="function";if(!L||U){B?Mg(()=>a(T)):b(()=>a(T));return}if(B){Mg(()=>{h&&(u&&u.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:L.currentLocation,nextLocation:L.nextLocation})});let j=n.window.document.startViewTransition(()=>{Mg(()=>a(T))});j.finished.finally(()=>{Mg(()=>{f(void 0),d(void 0),s(void 0),c({isTransitioning:!1})})}),Mg(()=>d(j));return}h?(u&&u.resolve(),h.skipTransition(),p({state:T,currentLocation:L.currentLocation,nextLocation:L.nextLocation})):(s(T),c({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}))},[n.window,h,u,y,b]);F.useLayoutEffect(()=>n.subscribe(x),[n,x]),F.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new fK)},[l]),F.useEffect(()=>{if(u&&o&&n.window){let T=o,C=u.promise,N=n.window.document.startViewTransition(async()=>{b(()=>a(T)),await C});N.finished.finally(()=>{f(void 0),d(void 0),s(void 0),c({isTransitioning:!1})}),d(N)}},[b,o,u,n.window]),F.useEffect(()=>{u&&o&&i.location.key===o.location.key&&u.resolve()},[u,h,i.location,o]),F.useEffect(()=>{!l.isTransitioning&&g&&(s(g.state),c({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),p(void 0))},[l.isTransitioning,g]),F.useEffect(()=>{},[]);let A=F.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:T=>n.navigate(T),push:(T,C,N)=>n.navigate(T,{state:C,preventScrollReset:N==null?void 0:N.preventScrollReset}),replace:(T,C,N)=>n.navigate(T,{replace:!0,state:C,preventScrollReset:N==null?void 0:N.preventScrollReset})}),[n]),S=n.basename||"/",E=F.useMemo(()=>({router:n,navigator:A,static:!1,basename:S}),[n,A,S]);return F.createElement(F.Fragment,null,F.createElement(R2.Provider,{value:E},F.createElement(j7.Provider,{value:i},F.createElement(sK.Provider,{value:y.current},F.createElement(oK.Provider,{value:l},F.createElement(qQ,{basename:S,location:i.location,navigationType:i.historyAction,navigator:A,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?F.createElement(dK,{routes:n.routes,future:n.future,state:i}):e))))),null)}function dK(t){let{routes:e,future:n,state:r}=t;return FQ(e,void 0,r,n)}var uC;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(uC||(uC={}));var fC;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(fC||(fC={}));function pK(t){let e=F.useRef(U5(t)),n=F.useRef(!1),r=B2(),i=F.useMemo(()=>tK(r.search,n.current?null:e.current),[r.search]),a=G7(),o=F.useCallback((s,l)=>{const c=U5(typeof s=="function"?s(i):s);n.current=!0,a("?"+c,l)},[a,i]);return[i,o]}const gK="_layout_1mpeu_1",yK="_main_1mpeu_8",mK="_header_1mpeu_14",vK="_subHeader_1mpeu_24",$v={layout:gK,main:yK,header:mK,subHeader:vK},W7=F.createContext({}),ig=()=>{const t=F.useContext(W7);if(Object.keys(t).length===0)throw new Error("[useAppState] Component not wrapped within a Provider");return t},bK={large:{width:153,height:50},small:{width:55,height:18}},wK=()=>{const{state:{isDesktopScreen:t}}=ig(),e=bK[t?"large":"small"];return Z.jsxs("svg",{width:e.width,height:e.height,viewBox:"0 0 153 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Z.jsx("path",{d:"M65.882 36L59.031 20.5H63.712L67.804 30.42L71.896 20.5H76.639L69.757 36H65.882ZM90.2073 34.016C88.616 35.566 86.694 36.341 84.4413 36.341C82.1886 36.341 80.2666 35.566 78.6753 34.016C77.084 32.4453 76.2883 30.5233 76.2883 28.25C76.2883 25.9973 77.084 24.0857 78.6753 22.515C80.2666 20.9443 82.1886 20.159 84.4413 20.159C86.694 20.159 88.616 20.9443 90.2073 22.515C91.7986 24.0857 92.5943 25.9973 92.5943 28.25C92.5943 30.5233 91.7986 32.4453 90.2073 34.016ZM84.4413 32.373C85.5366 32.373 86.446 31.9907 87.1693 31.226C87.9133 30.4407 88.2853 29.4487 88.2853 28.25C88.2853 27.0513 87.9133 26.0697 87.1693 25.305C86.446 24.5197 85.5366 24.127 84.4413 24.127C83.3253 24.127 82.3953 24.5197 81.6513 25.305C80.928 26.0697 80.5663 27.0513 80.5663 28.25C80.5663 29.4487 80.928 30.4407 81.6513 31.226C82.3953 31.9907 83.3253 32.373 84.4413 32.373ZM96.3453 36V18.268H90.4863V13.99H106.792V18.268H100.871V36H96.3453ZM108.973 36V13.99H122.675V18.268H113.468V22.794H120.815V27.072H113.468V31.722H122.675V36H108.973ZM125.663 36V13.99H139.365V18.268H130.158V22.794H137.505V27.072H130.158V31.722H139.365V36H125.663Z",fill:"white"}),Z.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40.438 11.9201C37.0276 7.57101 32.0669 4.81953 26.5305 4.81953C15.8563 4.81953 8.06102 14.7604 8.06102 25.5444C8.06102 33.0444 13.0217 38.6805 18.5581 38.6805C19.0896 38.6805 19.5768 38.6361 20.1083 38.5473C16.3878 35.7959 13.9961 30.8254 13.9961 25.5C13.9961 16.9793 19.7539 10.3669 26.5305 10.3669C33.9272 10.3669 39.065 17.7337 39.065 25.5C39.065 31.2692 36.9833 36.9941 33.3957 41.2101C30.251 44.8935 26.1762 47.2456 21.7028 47.9556C21.7028 47.9556 22.0571 48 22.5443 48C34.9459 48 45 37.926 45 25.5C45 20.3965 43.3169 15.6923 40.438 11.9201ZM37.0276 25.5C37.0276 18 32.0669 12.3639 26.5305 12.3639C25.999 12.3639 25.5118 12.4083 24.9803 12.497C28.7008 15.2041 31.0482 20.1302 31.0482 25.5C31.0482 34.0207 25.2904 40.6331 18.5138 40.6331C11.1171 40.6331 5.97933 33.2663 5.97933 25.5C5.97933 19.7308 8.06102 14.0059 11.6486 9.78994C14.7933 6.10651 18.8681 3.75444 23.3415 3.04438C23.3415 3.04438 22.9872 3 22.4557 3C10.0541 3 0 13.074 0 25.5C0 30.6035 1.68307 35.3077 4.56201 39.0799C7.97244 43.429 12.9774 46.1805 18.4695 46.1805C29.2323 46.2249 37.0276 36.284 37.0276 25.5Z",fill:"white"})]})},J7=F.createContext({}),nv=()=>{const t=F.useContext(J7);if(Object.keys(t).length===0)throw new Error("[useWeb3] Component not wrapped within a Provider");return t};var xK={VITE_NETWORK:"23294",VITE_WEB3_GATEWAY:"https://sapphire.oasis.io",VITE_PROPOSAL_START_TIME:"1710514800",VITE_CONTRACT_ACL_ALLOWALL:"0x393b419347c1F50E03498004801E8d3916816dfb",VITE_CONTRACT_ACL_NATIVEBALANCE:"0xF29071c2054620Ca0faA7F31982b00A05935b345",VITE_CONTRACT_POLLMANAGER:"0x8c577526f3f2e971Be320dd7045FE60b1A0f97A8",VITE_CONTRACT_POLLMANAGER_ACL:"0x393b419347c1F50E03498004801E8d3916816dfb",VITE_PROPOSAL_ID:"0x5197f7eb06c1d0e8ec39b3822f53818b81ee8d400c3cd5994db5fcca050081d3",BASE_URL:"/votee",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const jw=new Map([[23294n,{chainId:"0x5afe",chainName:"Oasis Sapphire",iconUrls:["https://votee.oasis.io/rose.png"],nativeCurrency:{name:"ROSE",symbol:"ROSE",decimals:18},rpcUrls:["https://sapphire.oasis.io/","wss://sapphire.oasis.io/ws"],blockExplorerUrls:["https://explorer.oasis.io/mainnet/sapphire"]}],[23295n,{chainId:"0x5aff",chainName:"Oasis Sapphire Testnet",iconUrls:["https://votee.oasis.io/rose.png"],nativeCurrency:{name:"TEST",symbol:"TEST",decimals:18},rpcUrls:["https://testnet.sapphire.oasis.dev/","wss://testnet.sapphire.oasis.dev/ws"],blockExplorerUrls:["https://explorer.oasis.io/testnet/sapphire"]}]]),AK={"Oasis Sapphire":"Sapphire","Oasis Sapphire Testnet":"Sapphire Testnet"},EK=150000n,Y7=Object.freeze([{name:"Capybara",description:"A friendly capybara with a rose in its hand, symbolizing the interoperability pioneered by the Oasis Network.",imagePath:"https://fakeimg.pl/182x182"},{name:"Desert Owl",description:"A wise owl with scrolls in its claws, symbolizing the knowledge pioneered by the Oasis Network.",imagePath:"https://fakeimg.pl/182x182"},{name:"Fennec Fox",description:"A nimble fox with sunglasses on its eyes, symbolizing the privacy pioneered by the Oasis Network.",imagePath:"https://fakeimg.pl/182x182"}]),SK="https://metamask.io/",PK="https://oasisprotocol.org/blog",{VITE_NETWORK:OK,VITE_PROPOSAL_START_TIME:TK,VITE_WEB3_GATEWAY:hC,VITE_CONTRACT_ACL_ALLOWALL:wPe,VITE_CONTRACT_ACL_NATIVEBALANCE:xPe,VITE_CONTRACT_POLLMANAGER:k6,VITE_CONTRACT_POLLMANAGER_ACL:APe,VITE_PROPOSAL_ID:Uv}=xK,zw=BigInt(OK)??0n,_6=Number(TK)??0,CK="_button_16xt8_1",kK="_buttonSmall_16xt8_22",_K="_buttonMedium_16xt8_30",NK="_buttonSolid_16xt8_38",IK="_buttonPrimary_16xt8_39",RK="_buttonSecondary_16xt8_44",MK="_buttonSuccess_16xt8_49",BK="_buttonOutline_16xt8_56",DK="_buttonText_16xt8_76",LK="_buttonDisabled_16xt8_92",$K="_fullWidth_16xt8_98",So={button:CK,buttonSmall:kK,buttonMedium:_K,buttonSolid:NK,buttonPrimary:IK,buttonSecondary:RK,buttonSuccess:MK,buttonOutline:BK,buttonText:DK,buttonDisabled:LK,fullWidth:$K},UK=/^(0x[a-zA-Z0-9]{4})[a-zA-Z0-9]+([a-zA-Z0-9]{4})$/;class Er{}R(Er,"truncateAddress",e=>{const n=e.match(UK);if(!n||(n==null?void 0:n.length)<=0)return e;const[,r,i]=n;return`${r}…${i}`}),R(Er,"getTransactionUrl",(e,n)=>`${e}/tx/${n}`),R(Er,"getAccountUrl",(e,n)=>`${e}/address/${n}`),R(Er,"clsx",(...e)=>e.map(n=>n?[n]:[]).flat().join(" ")),R(Er,"getNetworkFriendlyName",e=>AK[e]??"Unknown network"),R(Er,"truncate",(e,n=200)=>e.slice(0,n));const FK={small:So.buttonSmall,medium:So.buttonMedium},jK={primary:So.buttonPrimary,secondary:So.buttonSecondary,success:So.buttonSuccess},zK={solid:So.buttonSolid,outline:So.buttonOutline,text:So.buttonText},nl=({className:t,children:e,disabled:n,color:r="primary",size:i="medium",variant:a="solid",fullWidth:o,onClick:s,type:l})=>Z.jsx("button",{className:Er.clsx(t,So.button,n?So.buttonDisabled:void 0,o?So.fullWidth:void 0,jK[r],FK[i],zK[a]),onClick:s,disabled:n,type:l,children:e});class F5 extends Error{constructor(e){super(e)}}var Nl=function(t){t==null&&(t=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,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};Nl.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(((t&4294901760)>>>16)*1812433253<<16)+(t&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};Nl.prototype.init_by_array=function(t,e){var n,r,i;for(this.init_seed(19650218),n=1,r=0,i=this.N>e?this.N:e;i;i--){var a=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((a&4294901760)>>>16)*1664525<<16)+(a&65535)*1664525)+t[r]+r,this.mt[n]>>>=0,n++,r++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),r>=e&&(r=0)}for(i=this.N-1;i;i--){var a=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((a&4294901760)>>>16)*1566083941<<16)+(a&65535)*1566083941)-n,this.mt[n]>>>=0,n++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1)}this.mt[0]=2147483648};Nl.prototype.random_int=function(){var t,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti==this.N+1&&this.init_seed(5489),n=0;n>>1^e[t&1];for(;n>>1^e[t&1];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^e[t&1],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0};Nl.prototype.random_int31=function(){return this.random_int()>>>1};Nl.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};Nl.prototype.random=function(){return this.random_int()*(1/4294967296)};Nl.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};Nl.prototype.random_long=function(){var t=this.random_int()>>>5,e=this.random_int()>>>6;return(t*67108864+e)*(1/9007199254740992)};var HK=Nl;function GK(t,e){var n=document.createElement("div");return n.style.borderRadius="50px",n.style.overflow="hidden",n.style.padding="0px",n.style.margin="0px",n.style.width=""+t+"px",n.style.height=""+t+"px",n.style.display="inline-block",n.style.background=e,{container:n}}var VK=GK,X7={exports:{}};(function(t){var e=function(){function n(l,c,u,f){typeof c=="object"&&(u=c.depth,f=c.prototype,c.filter,c=c.circular);var h=[],d=[],g=typeof Buffer<"u";typeof c>"u"&&(c=!0),typeof u>"u"&&(u=1/0);function p(y,m){if(y===null)return null;if(m==0)return y;var b,x;if(typeof y!="object")return y;if(n.__isArray(y))b=[];else if(n.__isRegExp(y))b=new RegExp(y.source,s(y)),y.lastIndex&&(b.lastIndex=y.lastIndex);else if(n.__isDate(y))b=new Date(y.getTime());else{if(g&&Buffer.isBuffer(y))return Buffer.allocUnsafe?b=Buffer.allocUnsafe(y.length):b=new Buffer(y.length),y.copy(b),b;typeof f>"u"?(x=Object.getPrototypeOf(y),b=Object.create(x)):(b=Object.create(f),x=f)}if(c){var A=h.indexOf(y);if(A!=-1)return d[A];h.push(y),d.push(b)}for(var S in y){var E;x&&(E=Object.getOwnPropertyDescriptor(x,S)),!(E&&E.set==null)&&(b[S]=p(y[S],m-1))}return b}return p(l,u)}n.clonePrototype=function(c){if(c===null)return null;var u=function(){};return u.prototype=c,new u};function r(l){return Object.prototype.toString.call(l)}n.__objToStr=r;function i(l){return typeof l=="object"&&r(l)==="[object Date]"}n.__isDate=i;function a(l){return typeof l=="object"&&r(l)==="[object Array]"}n.__isArray=a;function o(l){return typeof l=="object"&&r(l)==="[object RegExp]"}n.__isRegExp=o;function s(l){var c="";return l.global&&(c+="g"),l.ignoreCase&&(c+="i"),l.multiline&&(c+="m"),c}return n.__getRegExpFlags=s,n}();t.exports&&(t.exports=e)})(X7);var QK=X7.exports,Z7={exports:{}},KK={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]},$f=KK,q7={};for(var N6 in $f)$f.hasOwnProperty(N6)&&(q7[$f[N6]]=N6);var qe=Z7.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 vi in qe)if(qe.hasOwnProperty(vi)){if(!("channels"in qe[vi]))throw new Error("missing channels property: "+vi);if(!("labels"in qe[vi]))throw new Error("missing channel labels property: "+vi);if(qe[vi].labels.length!==qe[vi].channels)throw new Error("channel and label counts mismatch: "+vi);var WK=qe[vi].channels,JK=qe[vi].labels;delete qe[vi].channels,delete qe[vi].labels,Object.defineProperty(qe[vi],"channels",{value:WK}),Object.defineProperty(qe[vi],"labels",{value:JK})}qe.rgb.hsl=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=a-i,s,l,c;return a===i?s=0:e===a?s=(n-r)/o:n===a?s=2+(r-e)/o:r===a&&(s=4+(e-n)/o),s=Math.min(s*60,360),s<0&&(s+=360),c=(i+a)/2,a===i?l=0:c<=.5?l=o/(a+i):l=o/(2-a-i),[s,l*100,c*100]};qe.rgb.hsv=function(t){var e,n,r,i,a,o=t[0]/255,s=t[1]/255,l=t[2]/255,c=Math.max(o,s,l),u=c-Math.min(o,s,l),f=function(h){return(c-h)/6/u+1/2};return u===0?i=a=0:(a=u/c,e=f(o),n=f(s),r=f(l),o===c?i=r-n:s===c?i=1/3+e-r:l===c&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[i*360,a*100,c*100]};qe.rgb.hwb=function(t){var e=t[0],n=t[1],r=t[2],i=qe.rgb.hsl(t)[0],a=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[i,a*100,r*100]};qe.rgb.cmyk=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255,i,a,o,s;return s=Math.min(1-e,1-n,1-r),i=(1-e-s)/(1-s)||0,a=(1-n-s)/(1-s)||0,o=(1-r-s)/(1-s)||0,[i*100,a*100,o*100,s*100]};function YK(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}qe.rgb.keyword=function(t){var e=q7[t];if(e)return e;var n=1/0,r;for(var i in $f)if($f.hasOwnProperty(i)){var a=$f[i],o=YK(t,a);o.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;var i=e*.4124+n*.3576+r*.1805,a=e*.2126+n*.7152+r*.0722,o=e*.0193+n*.1192+r*.9505;return[i*100,a*100,o*100]};qe.rgb.lab=function(t){var e=qe.rgb.xyz(t),n=e[0],r=e[1],i=e[2],a,o,s;return n/=95.047,r/=100,i/=108.883,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,a=116*r-16,o=500*(n-r),s=200*(r-i),[a,o,s]};qe.hsl.rgb=function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100,i,a,o,s,l;if(n===0)return l=r*255,[l,l,l];r<.5?a=r*(1+n):a=r+n-r*n,i=2*r-a,s=[0,0,0];for(var c=0;c<3;c++)o=e+1/3*-(c-1),o<0&&o++,o>1&&o--,6*o<1?l=i+(a-i)*6*o:2*o<1?l=a:3*o<2?l=i+(a-i)*(2/3-o)*6:l=i,s[c]=l*255;return s};qe.hsl.hsv=function(t){var e=t[0],n=t[1]/100,r=t[2]/100,i=n,a=Math.max(r,.01),o,s;return r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a,s=(r+n)/2,o=r===0?2*i/(a+i):2*n/(r+n),[e,o*100,s*100]};qe.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,r=t[2]/100,i=Math.floor(e)%6,a=e-Math.floor(e),o=255*r*(1-n),s=255*r*(1-n*a),l=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,l,o];case 1:return[s,r,o];case 2:return[o,r,l];case 3:return[o,s,r];case 4:return[l,o,r];case 5:return[r,o,s]}};qe.hsv.hsl=function(t){var e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01),a,o,s;return s=(2-n)*r,a=(2-n)*i,o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};qe.hwb.rgb=function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100,i=n+r,a,o,s,l;i>1&&(n/=i,r/=i),a=Math.floor(6*e),o=1-r,s=6*e-a,a&1&&(s=1-s),l=n+s*(o-n);var c,u,f;switch(a){default:case 6:case 0:c=o,u=l,f=n;break;case 1:c=l,u=o,f=n;break;case 2:c=n,u=o,f=l;break;case 3:c=n,u=l,f=o;break;case 4:c=l,u=n,f=o;break;case 5:c=o,u=n,f=l;break}return[c*255,u*255,f*255]};qe.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100,a,o,s;return a=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),[a*255,o*255,s*255]};qe.xyz.rgb=function(t){var e=t[0]/100,n=t[1]/100,r=t[2]/100,i,a,o;return i=e*3.2406+n*-1.5372+r*-.4986,a=e*-.9689+n*1.8758+r*.0415,o=e*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[i*255,a*255,o*255]};qe.xyz.lab=function(t){var e=t[0],n=t[1],r=t[2],i,a,o;return e/=95.047,n/=100,r/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=116*n-16,a=500*(e-n),o=200*(n-r),[i,a,o]};qe.lab.xyz=function(t){var e=t[0],n=t[1],r=t[2],i,a,o;a=(e+16)/116,i=n/500+a,o=a-r/200;var s=Math.pow(a,3),l=Math.pow(i,3),c=Math.pow(o,3);return a=s>.008856?s:(a-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,i*=95.047,a*=100,o*=108.883,[i,a,o]};qe.lab.lch=function(t){var e=t[0],n=t[1],r=t[2],i,a,o;return i=Math.atan2(r,n),a=i*360/2/Math.PI,a<0&&(a+=360),o=Math.sqrt(n*n+r*r),[e,o,a]};qe.lch.lab=function(t){var e=t[0],n=t[1],r=t[2],i,a,o;return o=r/360*2*Math.PI,i=n*Math.cos(o),a=n*Math.sin(o),[e,i,a]};qe.rgb.ansi16=function(t){var e=t[0],n=t[1],r=t[2],i=1 in arguments?arguments[1]:qe.rgb.hsv(t)[2];if(i=Math.round(i/50),i===0)return 30;var a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return i===2&&(a+=60),a};qe.hsv.ansi16=function(t){return qe.rgb.ansi16(qe.hsv.rgb(t),t[2])};qe.rgb.ansi256=function(t){var e=t[0],n=t[1],r=t[2];if(e===n&&n===r)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5);return i};qe.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var n=(~~(t>50)+1)*.5,r=(e&1)*n*255,i=(e>>1&1)*n*255,a=(e>>2&1)*n*255;return[r,i,a]};qe.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var n,r=Math.floor(t/36)/5*255,i=Math.floor((n=t%36)/6)/5*255,a=n%6/5*255;return[r,i,a]};qe.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),n=e.toString(16).toUpperCase();return"000000".substring(n.length)+n};qe.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];e[0].length===3&&(n=n.split("").map(function(s){return s+s}).join(""));var r=parseInt(n,16),i=r>>16&255,a=r>>8&255,o=r&255;return[i,a,o]};qe.rgb.hcg=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),a=Math.min(Math.min(e,n),r),o=i-a,s,l;return o<1?s=a/(1-o):s=0,o<=0?l=0:i===e?l=(n-r)/o%6:i===n?l=2+(r-e)/o:l=4+(e-n)/o+4,l/=6,l%=1,[l*360,o*100,s*100]};qe.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=1,i=0;return n<.5?r=2*e*n:r=2*e*(1-n),r<1&&(i=(n-.5*r)/(1-r)),[t[0],r*100,i*100]};qe.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=e*n,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],r*100,i*100]};qe.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];var i=[0,0,0],a=e%1*6,o=a%1,s=1-o,l=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};qe.hcg.hsv=function(t){var e=t[1]/100,n=t[2]/100,r=e+n*(1-e),i=0;return r>0&&(i=e/r),[t[0],i*100,r*100]};qe.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100,r=n*(1-e)+.5*e,i=0;return r>0&&r<.5?i=e/(2*r):r>=.5&&r<1&&(i=e/(2*(1-r))),[t[0],i*100,r*100]};qe.hcg.hwb=function(t){var e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};qe.hwb.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=1-n,i=r-e,a=0;return i<1&&(a=(r-i)/(1-i)),[t[0],i*100,a*100]};qe.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};qe.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};qe.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};qe.gray.hsl=qe.gray.hsv=function(t){return[0,0,t[0]]};qe.gray.hwb=function(t){return[0,100,t[0]]};qe.gray.cmyk=function(t){return[0,0,0,t[0]]};qe.gray.lab=function(t){return[t[0],0,0]};qe.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,n=(e<<16)+(e<<8)+e,r=n.toString(16).toUpperCase();return"000000".substring(r.length)+r};qe.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]};var eD=Z7.exports,Hw=eD;function XK(){for(var t={},e=Object.keys(Hw),n=e.length,r=0;r1&&(n=Array.prototype.slice.call(arguments)),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function aW(t){var e=function(n){if(n==null)return n;arguments.length>1&&(n=Array.prototype.slice.call(arguments));var r=t(n);if(typeof r=="object")for(var i=r.length,a=0;an?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){return this.values.hsl[2]+=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},darken:function(t){return this.values.hsl[2]-=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},saturate:function(t){return this.values.hsl[1]+=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},desaturate:function(t){return this.values.hsl[1]-=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},whiten:function(t){return this.values.hwb[1]+=this.values.hwb[1]*t,this.setValues("hwb",this.values.hwb),this},blacken:function(t){return this.values.hwb[2]+=this.values.hwb[2]*t,this.setValues("hwb",this.values.hwb),this},greyscale:function(){var t=this.values.rgb,e=t[0]*.3+t[1]*.59+t[2]*.11;return this.setValues("rgb",[e,e,e]),this},clearer:function(t){return this.setValues("alpha",this.values.alpha-this.values.alpha*t),this},opaquer:function(t){return this.setValues("alpha",this.values.alpha+this.values.alpha*t),this},rotate:function(t){var e=this.values.hsl[0];return e=(e+t)%360,e=e<0?360+e:e,this.values.hsl[0]=e,this.setValues("hsl",this.values.hsl),this},mix:function(t,e){var n=this,r=t,i=e===void 0?.5:e,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-s;return this.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue()).alpha(n.alpha()*i+r.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t=new os;return t.values=vW(this.values),t}};os.prototype.getValues=function(t){for(var e={},n=0;n=0&&e<=2}}const MW=({address:t,size:e})=>{const n=F.useRef(null);return F.useEffect(()=>{var r;if(n!=null&&n.current){const i=Cs.jsNumberForAddress(t),a=NW(e,i);(r=n.current)==null||r.replaceChildren(a)}},[e,n,t]),Z.jsx("div",{ref:n,style:{width:e,height:e},className:RW.jazzIcon})},BW=F.memo(MW),DW="_connectedAccount_1shrx_1",LW="_connectedAccountDetails_1shrx_14",$W="_connectedAccountAddress_1shrx_25",UW="_network_1shrx_36",Fv={connectedAccount:DW,connectedAccountDetails:LW,connectedAccountAddress:$W,network:UW},FW=({address:t,chainName:e})=>{const{state:{explorerBaseUrl:n}}=nv(),{state:{isDesktopScreen:r}}=ig(),i=n?Er.getAccountUrl(n,t):void 0,a=Er.getNetworkFriendlyName(e);return Z.jsxs("a",{href:i,className:Fv.connectedAccount,target:"_blank",rel:"nofollow noreferrer",children:[Z.jsx(BW,{size:r?30:20,address:t}),r&&Z.jsxs("p",{className:Fv.connectedAccountDetails,children:[Z.jsx("span",{className:Fv.network,children:a}),Z.jsx("abbr",{title:t,className:Fv.connectedAccountAddress,children:Er.truncateAddress(t)})]})]})},jW="_connectWalletBtn_j0ggb_1",zW="_connectWalletBtnLabel_j0ggb_16",jv={connectWalletBtn:jW,connectWalletBtnLabel:zW},HW=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"})),gC={small:{width:14,height:14},medium:{width:30,height:30},large:{width:64,height:64},xlarge:{width:100,height:100}},ag=({children:t,size:e="medium",width:n,height:r})=>F.cloneElement(t,{...gC[e]?gC[e]:{},...n?{width:n}:{},...r?{height:r}:{}}),lD=({size:t})=>Z.jsx(ag,{size:t,children:Z.jsx(HW,{})}),GW=()=>{const{state:{isDesktopScreen:t},setAppError:e}=ig(),[n,r]=F.useState(!1),[i,a]=F.useState(!0),[o,s]=F.useState(!1),{state:{isConnected:l,account:c,chainName:u},connectWallet:f,switchNetwork:h,isProviderAvailable:d}=nv();F.useEffect(()=>{(async()=>{r(!0),a(await d()),r(!1)})()},[]);const g=async()=>{r(!0);try{await h(),s(!1)}catch(y){e(y)}finally{r(!1)}},p=async()=>{r(!0);try{await f()}catch(y){y instanceof F5?s(!0):e(y)}finally{r(!1)}};return Z.jsxs(Z.Fragment,{children:[!l&&!i&&Z.jsx("a",{href:SK,target:"_blank",rel:"noopener noreferrer",children:Z.jsx(nl,{className:jv.connectWalletBtn,color:"secondary",disabled:n,children:"Install MetaMask"})}),!l&&i&&o&&Z.jsx(nl,{className:jv.connectWalletBtn,color:"secondary",disabled:n,onClick:g,children:"Switch Network"}),!l&&i&&!o&&Z.jsx(nl,{className:jv.connectWalletBtn,color:"secondary",disabled:n,onClick:p,children:Z.jsxs("label",{className:jv.connectWalletBtnLabel,children:["Connect wallet",Z.jsx(lD,{size:t?"medium":"small"})]})}),l&&c&&Z.jsx(FW,{address:c,chainName:u})]})},VW="_alert_17r1y_1",QW="_icon_17r1y_20",KW="_actions_17r1y_25",WW="_alertError_17r1y_40",JW="_alertSuccess_17r1y_46",YW="_alertLoading_17r1y_61",XW="_rotating_17r1y_1",ZW="_alertInsufficientBalance_17r1y_78",Bu={alert:VW,icon:QW,actions:KW,alertError:WW,alertSuccess:JW,alertLoading:YW,rotating:XW,alertInsufficientBalance:ZW},qW="_card_12zm2_1",eJ={card:qW},AP=({children:t,className:e})=>Z.jsx("div",{className:Er.clsx(eJ.card,e),children:t}),tJ=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"})),nJ=()=>Z.jsx(ag,{width:124,height:124,children:Z.jsx(tJ,{})}),rJ=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"})),cD=({size:t})=>Z.jsx(ag,{size:t,children:Z.jsx(rJ,{})}),iJ=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"})),aJ=()=>Z.jsx(ag,{size:"large",children:Z.jsx(iJ,{})}),oJ=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M192,116a12,12,0,1,1-12-12A12,12,0,0,1,192,116ZM152,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm96,48v32a24,24,0,0,1-24,24h-2.36l-16.21,45.38A16,16,0,0,1,190.36,224H177.64a16,16,0,0,1-15.07-10.62L160.65,208h-57.3l-1.92,5.38A16,16,0,0,1,86.36,224H73.64a16,16,0,0,1-15.07-10.62L46,178.22a87.69,87.69,0,0,1-21.44-48.38A16,16,0,0,0,16,144a8,8,0,0,1-16,0,32,32,0,0,1,24.28-31A88.12,88.12,0,0,1,112,32H216a8,8,0,0,1,0,16H194.61a87.93,87.93,0,0,1,30.17,37c.43,1,.85,2,1.25,3A24,24,0,0,1,248,112Zm-16,0a8,8,0,0,0-8-8h-3.66a8,8,0,0,1-7.64-5.6A71.9,71.9,0,0,0,144,48H112A72,72,0,0,0,58.91,168.64a8,8,0,0,1,1.64,2.71L73.64,208H86.36l3.82-10.69A8,8,0,0,1,97.71,192h68.58a8,8,0,0,1,7.53,5.31L177.64,208h12.72l18.11-50.69A8,8,0,0,1,216,152h8a8,8,0,0,0,8-8Z"})),sJ=()=>Z.jsx(ag,{size:"large",children:Z.jsx(oJ,{})}),lJ={error:{header:"Something went wrong",icon:Z.jsx(nJ,{})},success:{header:"Vote cast",icon:Z.jsx(cD,{size:"xlarge"})},loading:{header:"Casting your vote",icon:Z.jsx(aJ,{})},"insufficient-balance":{header:"Insufficient balance",icon:Z.jsx(sJ,{})}},cJ={error:Bu.alertError,success:Bu.alertSuccess,loading:Bu.alertLoading,"insufficient-balance":Bu.alertInsufficientBalance},od=({children:t,type:e,actions:n,headerText:r})=>{const{header:i,icon:a}=lJ[e];return Z.jsx(AP,{className:cJ[e],children:Z.jsxs("div",{className:Bu.alert,children:[Z.jsx("h2",{children:r??i}),Z.jsx("p",{children:t}),Z.jsx("div",{className:Bu.icon,children:a}),Z.jsx("div",{className:Bu.actions,children:n})]})})},uJ=()=>{const{state:{isInitialLoading:t,appError:e},clearAppError:n}=ig();return Z.jsx("div",{className:$v.layout,children:Z.jsxs("main",{className:$v.main,children:[Z.jsxs("header",{className:$v.header,children:[Z.jsx(wK,{}),Z.jsx(GW,{})]}),Z.jsx("section",{className:$v.subHeader,children:Z.jsx("h1",{children:"Oasis Mascot"})}),Z.jsxs("section",{children:[!t&&e&&Z.jsx(od,{type:"error",actions:Z.jsx(nl,{variant:"text",onClick:n,children:"< Go back "}),children:Er.truncate(e)}),t&&Z.jsx(od,{headerText:"Please wait",type:"loading",actions:Z.jsx("span",{children:"Fetching poll..."})}),!t&&!e&&Z.jsx(ZQ,{})]})]})})},fJ="_cardHeaderText_vfkwq_1",hJ="_mascotCards_vfkwq_11",dJ="_mascotCardActions_vfkwq_18",pJ="_cardAction_vfkwq_24",gJ="_voteBtnLabel_vfkwq_35",yJ="_voteBtnLabelDisabled_vfkwq_41",mJ="_cardFooterText_vfkwq_47",vJ="_insufficientBalanceAlertActions_vfkwq_56",bJ="_cardInfoText_vfkwq_66",wJ="_landingPageLink_vfkwq_76",xJ="_mascotCardSelectBtn_vfkwq_80",AJ="_mascotCardSelectedCheckIcon_vfkwq_84",EJ="_headerText_vfkwq_104",Hi={cardHeaderText:fJ,mascotCards:hJ,mascotCardActions:dJ,cardAction:pJ,voteBtnLabel:gJ,voteBtnLabelDisabled:yJ,cardFooterText:mJ,insufficientBalanceAlertActions:vJ,cardInfoText:bJ,landingPageLink:wJ,mascotCardSelectBtn:xJ,mascotCardSelectedCheckIcon:AJ,headerText:EJ},SJ="_mascotCard_1bkx9_1",PJ="_mascotCardSelected_1bkx9_10",OJ="_mascotCardVertical_1bkx9_14",TJ="_mascotCardDescription_1bkx9_32",CJ="_mascotCardHorizontal_1bkx9_37",kJ="_mascotCardTitle_1bkx9_52",sd={mascotCard:SJ,mascotCardSelected:PJ,mascotCardVertical:OJ,mascotCardDescription:TJ,mascotCardHorizontal:CJ,mascotCardTitle:kJ},_J={vertical:sd.mascotCardVertical,horizontal:sd.mascotCardHorizontal},uD=({image:t,title:e,description:n,actions:r,selected:i,orientation:a="vertical"})=>Z.jsxs("div",{className:Er.clsx(sd.mascotCard,i?sd.mascotCardSelected:void 0,_J[a]),children:[t,Z.jsxs("div",{children:[Z.jsx("h3",{className:sd.mascotCardTitle,children:e}),Z.jsx("p",{className:sd.mascotCardDescription,children:n})]}),r]}),NJ=new Intl.DateTimeFormat("en",{timeStyle:"long",dateStyle:"long"});class ld{static intlDateFormat(e){return NJ.format(e)}static unixFormatToDate(e){return new Date(Number(e)*1e3)}}const IJ=()=>{const{state:{isConnected:t,account:e},vote:n,canVoteOnPoll:r}=nv(),{state:{poll:i,previousVote:a,isMobileScreen:o,isDesktopScreen:s},setPreviousVoteForCurrentWallet:l}=ig(),[c]=pK(),u=c.get("choice")??null,f=Cs.toNullableInt(u),h=Cs.isValidMascotChoiceId(f)?f:null,[d,g]=F.useState(h),[p,y]=F.useState("vote"),[m,b]=F.useState(!1),[x,A]=F.useState("");F.useEffect(()=>{y("vote")},[e]),F.useEffect(()=>{Cs.isValidMascotChoiceId(d)||g(a)},[a]);const S=F.useMemo(()=>{if((t||d===null)&&!Cs.isValidMascotChoiceId(a))return Z.jsxs(Z.Fragment,{children:[Z.jsx(Z.Fragment,{children:"Continue"}),s&&Z.jsx(lD,{})]});if(t&&Cs.isValidMascotChoiceId(a))return Z.jsx(Z.Fragment,{children:"Amend your vote"});if(!t&&d!==null)return Z.jsx(Z.Fragment,{children:"Wallet not connected"})},[t,s,a,d]),E=U=>{g(U)},T=async()=>{if(d!==null){b(!0);try{if(!await r()){y("insufficient-balance");return}y("loading"),await n(d),l(d),y("success")}catch(U){console.error(U),A(U.message??JSON.stringify(U)),y("error")}finally{b(!1)}}},C=()=>{y("vote")};if((i==null?void 0:i.active)===!1)return Z.jsx(K7,{to:"/results",replace:!0});const N=m||d===null||!t||a===d,B=Z.jsxs(Z.Fragment,{children:["Select your preferred mascot option. Once you confirm this vote you will not",s?Z.jsx("br",{}):Z.jsx(Z.Fragment,{children:" "}),"be able to retract it. Read more about the campaign"," ",Z.jsx("a",{className:Hi.landingPageLink,href:PK,target:"_blank",rel:"noopener noreferrer",children:"on our website"}),"."]}),L=Z.jsx("p",{className:Hi.cardInfoText,children:"You have already cast your vote. It can be amended below."});return Z.jsxs(Z.Fragment,{children:[p==="loading"&&Z.jsx(od,{type:"loading",actions:Z.jsx("span",{children:"Submitting vote..."}),children:"Your vote is always private, and can be changed until the poll closes."}),p==="error"&&x&&Z.jsx(od,{type:"error",actions:Z.jsx(nl,{disabled:m,onClick:C,children:"Try again"}),children:Er.truncate(x)}),p==="success"&&Z.jsx(od,{type:"success",actions:Z.jsxs("span",{children:["Your vote has successfully submitted.",Z.jsx("br",{}),"Thank you for your participation."]})}),p==="insufficient-balance"&&Z.jsx(od,{type:"insufficient-balance",actions:Z.jsxs("div",{className:Hi.insufficientBalanceAlertActions,children:[Z.jsx(nl,{disabled:m,onClick:T,children:"Try again"}),Z.jsx(nl,{variant:"text",disabled:m,onClick:C,children:"< Cancel "})]}),children:"Please note there is a 100 ROSE threshold in order to cast your vote."}),p==="vote"&&Z.jsxs(Z.Fragment,{children:[o&&Z.jsx("p",{className:Hi.headerText,children:B}),Z.jsxs(AP,{children:[s&&Z.jsx("p",{className:Hi.cardHeaderText,children:B}),Z.jsx("div",{className:Hi.mascotCards,children:Y7.map(({name:U,description:j,imagePath:X},G)=>{const H=G===d;return Z.jsx(uD,{title:U,description:j,image:Z.jsx("img",{alt:U,src:X}),selected:H,actions:Z.jsxs(Z.Fragment,{children:[Z.jsx("div",{className:Hi.mascotCardActions,children:Z.jsxs(nl,{className:Hi.mascotCardSelectBtn,variant:H?"solid":"outline",size:s?"small":"medium",color:H?"success":"secondary",disabled:m,onClick:()=>E(G),fullWidth:o,children:["Select",H?"ed":""]})}),H&&Z.jsx("span",{className:Hi.mascotCardSelectedCheckIcon,children:Z.jsx(cD,{size:"medium"})})]})},U)})}),Z.jsxs("div",{className:Hi.cardAction,children:[(t||d===null)&&Cs.isValidMascotChoiceId(a)&&L,Z.jsx(nl,{disabled:N,onClick:T,children:Z.jsx("label",{className:Er.clsx(N?Hi.voteBtnLabelDisabled:Hi.voteBtnLabel),children:S})})]}),Z.jsxs("p",{className:Hi.cardFooterText,children:["Please note there is a 100 ROSE threshold in order to cast your vote.",!!(i!=null&&i.params.closeTimestamp)&&Z.jsxs(Z.Fragment,{children:[s?Z.jsx("br",{}):Z.jsx(Z.Fragment,{children:" "}),Z.jsxs("span",{children:["Poll closes on ",ld.intlDateFormat(ld.unixFormatToDate(i.params.closeTimestamp))]})]})]})]})]})]})},RJ="6.11.1";function MJ(t,e,n){const r=e.split("|").map(a=>a.trim());for(let a=0;aPromise.resolve(t[r])))).reduce((r,i,a)=>(r[e[a]]=i,r),{})}function gt(t,e,n){for(let r in e){let i=e[r];const a=n?n[r]:null;a&&MJ(i,a,r),Object.defineProperty(t,r,{enumerable:!0,value:i,writable:!1})}}function cd(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(cd).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let n="0x";for(let r=0;r>4],n+=e[t[r]&15];return n}if(typeof t=="object"&&typeof t.toJSON=="function")return cd(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(n=>`${cd(n)}: ${cd(t[n])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Qr(t,e){return t&&t.code===e}function EP(t){return Qr(t,"CALL_EXCEPTION")}function Zn(t,e,n){let r=t;{const a=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will overwrite populated values: ${cd(n)}`);for(const o in n){if(o==="shortMessage")continue;const s=n[o];a.push(o+"="+cd(s))}}a.push(`code=${e}`),a.push(`version=${RJ}`),a.length&&(t+=" ("+a.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(t);break;default:i=new Error(t)}return gt(i,{code:e}),n&&Object.assign(i,n),i.shortMessage==null&>(i,{shortMessage:r}),i}function ye(t,e,n,r){if(!t)throw Zn(e,n,r)}function K(t,e,n,r){ye(t,e,"INVALID_ARGUMENT",{argument:n,value:r})}function fD(t,e,n){n==null&&(n=""),n&&(n=": "+n),ye(t>=e,"missing arguemnt"+n,"MISSING_ARGUMENT",{count:t,expectedCount:e}),ye(t<=e,"too many arguments"+n,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const BJ=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");t.push(e)}catch{}return t},[]);function DJ(t){ye(BJ.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function D2(t,e,n){if(n==null&&(n=""),t!==e){let r=n,i="new";n&&(r+=".",i+=" "+n),ye(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function hD(t,e,n){if(t instanceof Uint8Array)return n?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x([0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((t.length-2)/2);let i=2;for(let a=0;a>4]+yC[i&15]}return n}function Xn(t){return"0x"+t.map(e=>it(e).substring(2)).join("")}function Td(t){return gn(t,!0)?(t.length-2)/2:Jt(t).length}function Un(t,e,n){const r=Jt(t);return n!=null&&n>r.length&&ye(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),it(r.slice(e??0,n??r.length))}function dD(t,e,n){const r=Jt(t);ye(e>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),n?i.set(r,e-r.length):i.set(r,0),it(i)}function th(t,e){return dD(t,e,!0)}function $J(t,e){return dD(t,e,!1)}const L2=BigInt(0),bo=BigInt(1),ud=9007199254740991;function UJ(t,e){const n=$2(t,"value"),r=BigInt(Bt(e,"width"));if(ye(n>>r===L2,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),n>>r-bo){const i=(bo<=-ud&&t<=ud,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(n){K(!1,`invalid BigNumberish string: ${n.message}`,e||"value",t)}}K(!1,"invalid BigNumberish value",e||"value",t)}function $2(t,e){const n=et(t,e);return ye(n>=L2,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),n}const mC="0123456789abcdef";function SP(t){if(t instanceof Uint8Array){let e="0x0";for(const n of t)e+=mC[n>>4],e+=mC[n&15];return BigInt(e)}return et(t)}function Bt(t,e){switch(typeof t){case"bigint":return K(t>=-ud&&t<=ud,"overflow",e||"value",t),Number(t);case"number":return K(Number.isInteger(t),"underflow",e||"value",t),K(t>=-ud&&t<=ud,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return Bt(BigInt(t),e)}catch(n){K(!1,`invalid numeric string: ${n.message}`,e||"value",t)}}K(!1,"invalid numeric value",e||"value",t)}function FJ(t){return Bt(SP(t))}function us(t,e){let r=$2(t,"value").toString(16);if(e==null)r.length%2&&(r="0"+r);else{const i=Bt(e,"width");for(ye(i*2>=r.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});r.length>6===2;o++)a++;return a}return t==="OVERRUN"?n.length-e-1:0}function VJ(t,e,n,r,i){return t==="OVERLONG"?(K(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),yD(t,e,n))}const QJ=Object.freeze({error:GJ,ignore:yD,replace:VJ});function KJ(t,e){e==null&&(e=QJ.error);const n=Jt(t,"bytes"),r=[];let i=0;for(;i>7)){r.push(a);continue}let o=null,s=null;if((a&224)===192)o=1,s=127;else if((a&240)===224)o=2,s=2047;else if((a&248)===240)o=3,s=65535;else{(a&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,n,r):i+=e("BAD_PREFIX",i-1,n,r);continue}if(i-1+o>=n.length){i+=e("OVERRUN",i-1,n,r);continue}let l=a&(1<<8-o-1)-1;for(let c=0;c1114111){i+=e("OUT_OF_RANGE",i-1-o,n,r,l);continue}if(l>=55296&&l<=57343){i+=e("UTF16_SURROGATE",i-1-o,n,r,l);continue}if(l<=s){i+=e("OVERLONG",i-1-o,n,r,l);continue}r.push(l)}}return r}function fl(t,e){K(typeof t=="string","invalid string value","str",t),e!=null&&(DJ(e),t=t.normalize(e));let n=[];for(let r=0;r>6|192),n.push(i&63|128);else if((i&64512)==55296){r++;const a=t.charCodeAt(r);K(r>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128)}else n.push(i>>12|224),n.push(i>>6&63|128),n.push(i&63|128)}return new Uint8Array(n)}function WJ(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Gw(t,e){return WJ(KJ(t,e))}function mD(t){async function e(n,r){const i=n.url.split(":")[0].toLowerCase();ye(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),ye(i==="https"||!n.credentials||n.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let a;if(r){const f=new AbortController;a=f.signal,r.addListener(()=>{f.abort()})}const o={method:n.method,headers:new Headers(Array.from(n)),body:n.body||void 0,signal:a},s=await fetch(n.url,o),l={};s.headers.forEach((f,h)=>{l[h.toLowerCase()]=f});const c=await s.arrayBuffer(),u=c==null?null:new Uint8Array(c);return{statusCode:s.status,statusMessage:s.statusText,headers:l,body:u}}return e}const JJ=12,YJ=250;let wC=mD();const XJ=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),ZJ=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let R6=!1;async function vD(t,e){try{const n=t.match(XJ);if(!n)throw new Error("invalid data");return new Cd(200,"OK",{"content-type":n[1]||"text/plain"},n[2]?zJ(n[3]):eY(n[3]))}catch{return new Cd(599,"BAD REQUEST (invalid data: URI)",{},null,new nh(t))}}function bD(t){async function e(n,r){try{const i=n.match(ZJ);if(!i)throw new Error("invalid link");return new nh(`${t}${i[2]}`)}catch{return new Cd(599,"BAD REQUEST (invalid IPFS URI)",{},null,new nh(n))}}return e}const zv={data:vD,ipfs:bD("https://gateway.ipfs.io/ipfs/")},wD=new WeakMap;var Vu,tc,YR;let qJ=(YR=class{constructor(e){M(this,Vu,void 0);M(this,tc,void 0);O(this,Vu,[]),O(this,tc,!1),wD.set(e,()=>{if(!v(this,tc)){O(this,tc,!0);for(const n of v(this,Vu))setTimeout(()=>{n()},0);O(this,Vu,[])}})}addListener(e){ye(!v(this,tc),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),v(this,Vu).push(e)}get cancelled(){return v(this,tc)}checkSignal(){ye(!this.cancelled,"cancelled","CANCELLED",{})}},Vu=new WeakMap,tc=new WeakMap,YR);function Hv(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var $d,Ud,ao,Ns,Fd,jd,cr,Ji,Is,Qu,Ku,Wu,Lo,Rs,nc,Ju,qg,Zp;let nh=(Zp=class{constructor(e){M(this,Ju);M(this,$d,void 0);M(this,Ud,void 0);M(this,ao,void 0);M(this,Ns,void 0);M(this,Fd,void 0);M(this,jd,void 0);M(this,cr,void 0);M(this,Ji,void 0);M(this,Is,void 0);M(this,Qu,void 0);M(this,Ku,void 0);M(this,Wu,void 0);M(this,Lo,void 0);M(this,Rs,void 0);M(this,nc,void 0);O(this,jd,String(e)),O(this,$d,!1),O(this,Ud,!0),O(this,ao,{}),O(this,Ns,""),O(this,Fd,3e5),O(this,Rs,{slotInterval:YJ,maxAttempts:JJ}),O(this,nc,null)}get url(){return v(this,jd)}set url(e){O(this,jd,String(e))}get body(){return v(this,cr)==null?null:new Uint8Array(v(this,cr))}set body(e){if(e==null)O(this,cr,void 0),O(this,Ji,void 0);else if(typeof e=="string")O(this,cr,fl(e)),O(this,Ji,"text/plain");else if(e instanceof Uint8Array)O(this,cr,e),O(this,Ji,"application/octet-stream");else if(typeof e=="object")O(this,cr,fl(JSON.stringify(e))),O(this,Ji,"application/json");else throw new Error("invalid body")}hasBody(){return v(this,cr)!=null}get method(){return v(this,Ns)?v(this,Ns):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),O(this,Ns,String(e).toUpperCase())}get headers(){const e=Object.assign({},v(this,ao));return v(this,Is)&&(e.authorization=`Basic ${HJ(fl(v(this,Is)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&v(this,Ji)&&(e["content-type"]=v(this,Ji)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,n){v(this,ao)[String(e).toLowerCase()]=String(n)}clearHeaders(){O(this,ao,{})}[Symbol.iterator](){const e=this.headers,n=Object.keys(e);let r=0;return{next:()=>{if(r=0,"timeout must be non-zero","timeout",e),O(this,Fd,e)}get preflightFunc(){return v(this,Qu)||null}set preflightFunc(e){O(this,Qu,e)}get processFunc(){return v(this,Ku)||null}set processFunc(e){O(this,Ku,e)}get retryFunc(){return v(this,Wu)||null}set retryFunc(e){O(this,Wu,e)}get getUrlFunc(){return v(this,nc)||wC}set getUrlFunc(e){O(this,nc,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(v(this,Rs).slotInterval=e.slotInterval),e.maxAttempts!=null&&(v(this,Rs).maxAttempts=e.maxAttempts)}send(){return ye(v(this,Lo)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),O(this,Lo,new qJ(this)),ie(this,Ju,qg).call(this,0,xC()+this.timeout,0,this,new Cd(0,"",{},null,this))}cancel(){ye(v(this,Lo)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=wD.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const n=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();ye(this.method==="GET"&&(n!=="https"||r!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new Zp(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,O(i,ao,Object.assign({},v(this,ao))),v(this,cr)&&O(i,cr,new Uint8Array(v(this,cr))),O(i,Ji,v(this,Ji)),i}clone(){const e=new Zp(this.url);return O(e,Ns,v(this,Ns)),v(this,cr)&&O(e,cr,v(this,cr)),O(e,Ji,v(this,Ji)),O(e,ao,Object.assign({},v(this,ao))),O(e,Is,v(this,Is)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),O(e,Qu,v(this,Qu)),O(e,Ku,v(this,Ku)),O(e,Wu,v(this,Wu)),O(e,nc,v(this,nc)),e}static lockConfig(){R6=!0}static getGateway(e){return zv[e.toLowerCase()]||null}static registerGateway(e,n){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(R6)throw new Error("gateways locked");zv[e]=n}static registerGetUrl(e){if(R6)throw new Error("gateways locked");wC=e}static createGetUrlFunc(e){return mD()}static createDataGateway(){return vD}static createIpfsGatewayFunc(e){return bD(e)}},$d=new WeakMap,Ud=new WeakMap,ao=new WeakMap,Ns=new WeakMap,Fd=new WeakMap,jd=new WeakMap,cr=new WeakMap,Ji=new WeakMap,Is=new WeakMap,Qu=new WeakMap,Ku=new WeakMap,Wu=new WeakMap,Lo=new WeakMap,Rs=new WeakMap,nc=new WeakMap,Ju=new WeakSet,qg=async function(e,n,r,i,a){var u,f,h;if(e>=v(this,Rs).maxAttempts)return a.makeServerError("exceeded maximum retry limit");ye(xC()<=n,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),r>0&&await tY(r);let o=this.clone();const s=(o.url.split(":")[0]||"").toLowerCase();if(s in zv){const d=await zv[s](o.url,Hv(v(i,Lo)));if(d instanceof Cd){let g=d;if(this.processFunc){Hv(v(i,Lo));try{g=await this.processFunc(o,g)}catch(p){(p.throttle==null||typeof p.stall!="number")&&g.makeServerError("error in post-processing function",p).assertOk()}}return g}o=d}this.preflightFunc&&(o=await this.preflightFunc(o));const l=await this.getUrlFunc(o,Hv(v(i,Lo)));let c=new Cd(l.statusCode,l.statusMessage,l.headers,l.body,i);if(c.statusCode===301||c.statusCode===302){try{const d=c.headers.location||"";return ie(u=o.redirect(d),Ju,qg).call(u,e+1,n,0,i,c)}catch{}return c}else if(c.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,c,e))){const d=c.headers["retry-after"];let g=v(this,Rs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof d=="string"&&d.match(/^[1-9][0-9]*$/)&&(g=parseInt(d)),ie(f=o.clone(),Ju,qg).call(f,e+1,n,g,i,c)}if(this.processFunc){Hv(v(i,Lo));try{c=await this.processFunc(o,c)}catch(d){(d.throttle==null||typeof d.stall!="number")&&c.makeServerError("error in post-processing function",d).assertOk();let g=v(this,Rs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return d.stall>=0&&(g=d.stall),ie(h=o.clone(),Ju,qg).call(h,e+1,n,g,i,c)}}return c},Zp);var lm,cm,um,Yi,zd,Yu,fm;let Cd=(fm=class{constructor(e,n,r,i,a){M(this,lm,void 0);M(this,cm,void 0);M(this,um,void 0);M(this,Yi,void 0);M(this,zd,void 0);M(this,Yu,void 0);O(this,lm,e),O(this,cm,n),O(this,um,Object.keys(r).reduce((o,s)=>(o[s.toLowerCase()]=String(r[s]),o),{})),O(this,Yi,i==null?null:new Uint8Array(i)),O(this,zd,a||null),O(this,Yu,{message:""})}toString(){return``}get statusCode(){return v(this,lm)}get statusMessage(){return v(this,cm)}get headers(){return Object.assign({},v(this,um))}get body(){return v(this,Yi)==null?null:new Uint8Array(v(this,Yi))}get bodyText(){try{return v(this,Yi)==null?"":Gw(v(this,Yi))}catch{ye(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{ye(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,n=Object.keys(e);let r=0;return{next:()=>{if(r=0,"invalid stall timeout","stall",n);const r=new Error(e||"throttling requests");throw gt(r,{stall:n,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return v(this,Yi)!=null}get request(){return v(this,zd)}ok(){return v(this,Yu).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:n}=v(this,Yu);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let i=null;try{v(this,Yi)&&(i=Gw(v(this,Yi)))}catch{}ye(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:n,info:{requestUrl:r,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}},lm=new WeakMap,cm=new WeakMap,um=new WeakMap,Yi=new WeakMap,zd=new WeakMap,Yu=new WeakMap,fm);function xC(){return new Date().getTime()}function eY(t){return fl(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,n)=>String.fromCharCode(parseInt(n,16))))}function tY(t){return new Promise(e=>setTimeout(e,t))}function nY(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function AC(t,e,n){let r=0;for(let i=0;i{ye(r<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:r})};if(t[e]>=248){const r=t[e]-247;n(e+1+r);const i=AC(t,e+1,r);return n(e+1+r+i),EC(t,e,e+1+r,r+i)}else if(t[e]>=192){const r=t[e]-192;return n(e+1+r),EC(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;n(e+1+r);const i=AC(t,e+1,r);n(e+1+r+i);const a=it(t.slice(e+1+r,e+1+r+i));return{consumed:1+r+i,result:a}}else if(t[e]>=128){const r=t[e]-128;n(e+1+r);const i=it(t.slice(e+1,e+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:nY(t[e])}}function U2(t){const e=Jt(t,"data"),n=xD(e,0);return K(n.consumed===e.length,"unexpected junk after rlp payload","data",t),n.result}function SC(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function AD(t){if(Array.isArray(t)){let r=[];if(t.forEach(function(a){r=r.concat(AD(a))}),r.length<=55)return r.unshift(192+r.length),r;const i=SC(r.length);return i.unshift(247+i.length),i.concat(r)}const e=Array.prototype.slice.call(Jt(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const n=SC(e.length);return n.unshift(183+n.length),n.concat(e)}const PC="0123456789abcdef";function vp(t){let e="0x";for(const n of AD(t))e+=PC[n>>4],e+=PC[n&15];return e}const si=32,H5=new Uint8Array(si),rY=["then"],Gv={};function Bg(t,e){const n=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw n.error=e,n}var rc,Kf;let ED=(Kf=class extends Array{constructor(...n){const r=n[0];let i=n[1],a=(n[2]||[]).slice(),o=!0;r!==Gv&&(i=n,a=[],o=!1);super(i.length);M(this,rc,void 0);i.forEach((l,c)=>{this[c]=l});const s=a.reduce((l,c)=>(typeof c=="string"&&l.set(c,(l.get(c)||0)+1),l),new Map);if(O(this,rc,Object.freeze(i.map((l,c)=>{const u=a[c];return u!=null&&s.get(u)===1?u:null}))),!!o)return Object.freeze(this),new Proxy(this,{get:(l,c,u)=>{if(typeof c=="string"){if(c.match(/^[0-9]+$/)){const h=Bt(c,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");const d=l[h];return d instanceof Error&&Bg(`index ${h}`,d),d}if(rY.indexOf(c)>=0)return Reflect.get(l,c,u);const f=l[c];if(f instanceof Function)return function(...h){return f.apply(this===u?l:this,h)};if(!(c in l))return l.getValue.apply(this===u?l:this,[c])}return Reflect.get(l,c,u)}})}toArray(){const n=[];return this.forEach((r,i)=>{r instanceof Error&&Bg(`index ${i}`,r),n.push(r)}),n}toObject(){return v(this,rc).reduce((n,r,i)=>(ye(r!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),r in n||(n[r]=this.getValue(r)),n),{})}slice(n,r){n==null&&(n=0),n<0&&(n+=this.length,n<0&&(n=0)),r==null&&(r=this.length),r<0&&(r+=this.length,r<0&&(r=0)),r>this.length&&(r=this.length);const i=[],a=[];for(let o=n;o{v(this,Ms)[e]=OC(n)}}},Ms=new WeakMap,Xu=new WeakMap,Hd=new WeakSet,Fb=function(e){return v(this,Ms).push(e),O(this,Xu,v(this,Xu)+e.length),e.length},XR);var bi,Xi,Zu,qu,ic,hm,V5,i2,SD,dm;let iY=(dm=class{constructor(e,n,r){M(this,hm);M(this,i2);R(this,"allowLoose");M(this,bi,void 0);M(this,Xi,void 0);M(this,Zu,void 0);M(this,qu,void 0);M(this,ic,void 0);gt(this,{allowLoose:!!n}),O(this,bi,ai(e)),O(this,Zu,0),O(this,qu,null),O(this,ic,r??1024),O(this,Xi,0)}get data(){return it(v(this,bi))}get dataLength(){return v(this,bi).length}get consumed(){return v(this,Xi)}get bytes(){return new Uint8Array(v(this,bi))}subReader(e){const n=new dm(v(this,bi).slice(v(this,Xi)+e),this.allowLoose,v(this,ic));return O(n,qu,this),n}readBytes(e,n){let r=ie(this,i2,SD).call(this,0,e,!!n);return ie(this,hm,V5).call(this,e),O(this,Xi,v(this,Xi)+r.length),r.slice(0,e)}readValue(){return SP(this.readBytes(si))}readIndex(){return FJ(this.readBytes(si))}},bi=new WeakMap,Xi=new WeakMap,Zu=new WeakMap,qu=new WeakMap,ic=new WeakMap,hm=new WeakSet,V5=function(e){var n;if(v(this,qu))return ie(n=v(this,qu),hm,V5).call(n,e);O(this,Zu,v(this,Zu)+e),ye(v(this,ic)<1||v(this,Zu)<=v(this,ic)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${v(this,ic)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:ai(v(this,bi)),offset:v(this,Xi),length:e,info:{bytesRead:v(this,Zu),dataLength:this.dataLength}})},i2=new WeakSet,SD=function(e,n,r){let i=Math.ceil(n/si)*si;return v(this,Xi)+i>v(this,bi).length&&(this.allowLoose&&r&&v(this,Xi)+n<=v(this,bi).length?i=n:ye(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:ai(v(this,bi)),length:v(this,bi).length,offset:v(this,Xi)+i})),v(this,bi).slice(v(this,Xi),v(this,Xi)+i)},dm);function Vw(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function PP(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function aY(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Vw(t.outputLen),Vw(t.blockLen)}function bp(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function PD(t,e){PP(t);const n=e.outputLen;if(t.lengtht instanceof Uint8Array,oY=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),B6=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Mo=(t,e)=>t<<32-e|t>>>e,sY=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!sY)throw new Error("Non little-endian hardware is not supported");function lY(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function F2(t){if(typeof t=="string"&&(t=lY(t)),!OD(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function cY(...t){const e=new Uint8Array(t.reduce((r,i)=>r+i.length,0));let n=0;return t.forEach(r=>{if(!OD(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}let OP=class{clone(){return this._cloneInto()}};function TP(t){const e=r=>t().update(F2(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function uY(t=32){if(M6&&typeof M6.getRandomValues=="function")return M6.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class TD extends OP{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,aY(e);const r=F2(n);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,a=new Uint8Array(i);a.set(r.length>i?e.create().update(r).digest():r);for(let o=0;onew TD(t,e).update(n).digest();CP.create=(t,e)=>new TD(t,e);function fY(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),l=r?4:0,c=r?0:4;t.setUint32(e+l,o,r),t.setUint32(e+c,s,r)}class CD extends OP{constructor(e,n,r,i){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=B6(this.buffer)}update(e){bp(this);const{view:n,buffer:r,blockLen:i}=this;e=F2(e);const a=e.length;for(let o=0;oi-o&&(this.process(r,0),o=0);for(let f=o;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft&e^~t&n,dY=(t,e,n)=>t&e^t&n^e&n,pY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),zl=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Hl=new Uint32Array(64);class gY extends CD{constructor(){super(64,32,8,!1),this.A=zl[0]|0,this.B=zl[1]|0,this.C=zl[2]|0,this.D=zl[3]|0,this.E=zl[4]|0,this.F=zl[5]|0,this.G=zl[6]|0,this.H=zl[7]|0}get(){const{A:e,B:n,C:r,D:i,E:a,F:o,G:s,H:l}=this;return[e,n,r,i,a,o,s,l]}set(e,n,r,i,a,o,s,l){this.A=e|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=a|0,this.F=o|0,this.G=s|0,this.H=l|0}process(e,n){for(let f=0;f<16;f++,n+=4)Hl[f]=e.getUint32(n,!1);for(let f=16;f<64;f++){const h=Hl[f-15],d=Hl[f-2],g=Mo(h,7)^Mo(h,18)^h>>>3,p=Mo(d,17)^Mo(d,19)^d>>>10;Hl[f]=p+Hl[f-7]+g+Hl[f-16]|0}let{A:r,B:i,C:a,D:o,E:s,F:l,G:c,H:u}=this;for(let f=0;f<64;f++){const h=Mo(s,6)^Mo(s,11)^Mo(s,25),d=u+h+hY(s,l,c)+pY[f]+Hl[f]|0,p=(Mo(r,2)^Mo(r,13)^Mo(r,22))+dY(r,i,a)|0;u=c,c=l,l=s,s=o+d|0,o=a,a=i,i=r,r=d+p|0}r=r+this.A|0,i=i+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,i,a,o,s,l,c,u)}roundClean(){Hl.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const yY=TP(()=>new gY),Vv=BigInt(2**32-1),Q5=BigInt(32);function kD(t,e=!1){return e?{h:Number(t&Vv),l:Number(t>>Q5&Vv)}:{h:Number(t>>Q5&Vv)|0,l:Number(t&Vv)|0}}function _D(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let i=0;iBigInt(t>>>0)<>>0),vY=(t,e,n)=>t>>>n,bY=(t,e,n)=>t<<32-n|e>>>n,wY=(t,e,n)=>t>>>n|e<<32-n,xY=(t,e,n)=>t<<32-n|e>>>n,AY=(t,e,n)=>t<<64-n|e>>>n-32,EY=(t,e,n)=>t>>>n-32|e<<64-n,SY=(t,e)=>e,PY=(t,e)=>t,ND=(t,e,n)=>t<>>32-n,ID=(t,e,n)=>e<>>32-n,RD=(t,e,n)=>e<>>64-n,MD=(t,e,n)=>t<>>64-n;function OY(t,e,n,r){const i=(e>>>0)+(r>>>0);return{h:t+n+(i/2**32|0)|0,l:i|0}}const TY=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),CY=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,kY=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),_Y=(t,e,n,r,i)=>e+n+r+i+(t/2**32|0)|0,NY=(t,e,n,r,i)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(i>>>0),IY=(t,e,n,r,i,a)=>e+n+r+i+a+(t/2**32|0)|0,Nt={fromBig:kD,split:_D,toBig:mY,shrSH:vY,shrSL:bY,rotrSH:wY,rotrSL:xY,rotrBH:AY,rotrBL:EY,rotr32H:SY,rotr32L:PY,rotlSH:ND,rotlSL:ID,rotlBH:RD,rotlBL:MD,add:OY,add3L:TY,add3H:CY,add4L:kY,add4H:_Y,add5H:IY,add5L:NY},[RY,MY]=Nt.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Gl=new Uint32Array(80),Vl=new Uint32Array(80);class BY extends CD{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:n,Bh:r,Bl:i,Ch:a,Cl:o,Dh:s,Dl:l,Eh:c,El:u,Fh:f,Fl:h,Gh:d,Gl:g,Hh:p,Hl:y}=this;return[e,n,r,i,a,o,s,l,c,u,f,h,d,g,p,y]}set(e,n,r,i,a,o,s,l,c,u,f,h,d,g,p,y){this.Ah=e|0,this.Al=n|0,this.Bh=r|0,this.Bl=i|0,this.Ch=a|0,this.Cl=o|0,this.Dh=s|0,this.Dl=l|0,this.Eh=c|0,this.El=u|0,this.Fh=f|0,this.Fl=h|0,this.Gh=d|0,this.Gl=g|0,this.Hh=p|0,this.Hl=y|0}process(e,n){for(let x=0;x<16;x++,n+=4)Gl[x]=e.getUint32(n),Vl[x]=e.getUint32(n+=4);for(let x=16;x<80;x++){const A=Gl[x-15]|0,S=Vl[x-15]|0,E=Nt.rotrSH(A,S,1)^Nt.rotrSH(A,S,8)^Nt.shrSH(A,S,7),T=Nt.rotrSL(A,S,1)^Nt.rotrSL(A,S,8)^Nt.shrSL(A,S,7),C=Gl[x-2]|0,N=Vl[x-2]|0,B=Nt.rotrSH(C,N,19)^Nt.rotrBH(C,N,61)^Nt.shrSH(C,N,6),L=Nt.rotrSL(C,N,19)^Nt.rotrBL(C,N,61)^Nt.shrSL(C,N,6),U=Nt.add4L(T,L,Vl[x-7],Vl[x-16]),j=Nt.add4H(U,E,B,Gl[x-7],Gl[x-16]);Gl[x]=j|0,Vl[x]=U|0}let{Ah:r,Al:i,Bh:a,Bl:o,Ch:s,Cl:l,Dh:c,Dl:u,Eh:f,El:h,Fh:d,Fl:g,Gh:p,Gl:y,Hh:m,Hl:b}=this;for(let x=0;x<80;x++){const A=Nt.rotrSH(f,h,14)^Nt.rotrSH(f,h,18)^Nt.rotrBH(f,h,41),S=Nt.rotrSL(f,h,14)^Nt.rotrSL(f,h,18)^Nt.rotrBL(f,h,41),E=f&d^~f&p,T=h&g^~h&y,C=Nt.add5L(b,S,T,MY[x],Vl[x]),N=Nt.add5H(C,m,A,E,RY[x],Gl[x]),B=C|0,L=Nt.rotrSH(r,i,28)^Nt.rotrBH(r,i,34)^Nt.rotrBH(r,i,39),U=Nt.rotrSL(r,i,28)^Nt.rotrBL(r,i,34)^Nt.rotrBL(r,i,39),j=r&a^r&s^a&s,X=i&o^i&l^o&l;m=p|0,b=y|0,p=d|0,y=g|0,d=f|0,g=h|0,{h:f,l:h}=Nt.add(c|0,u|0,N|0,B|0),c=s|0,u=l|0,s=a|0,l=o|0,a=r|0,o=i|0;const G=Nt.add3L(B,U,X);r=Nt.add3H(G,N,L,j),i=G|0}({h:r,l:i}=Nt.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:a,l:o}=Nt.add(this.Bh|0,this.Bl|0,a|0,o|0),{h:s,l}=Nt.add(this.Ch|0,this.Cl|0,s|0,l|0),{h:c,l:u}=Nt.add(this.Dh|0,this.Dl|0,c|0,u|0),{h:f,l:h}=Nt.add(this.Eh|0,this.El|0,f|0,h|0),{h:d,l:g}=Nt.add(this.Fh|0,this.Fl|0,d|0,g|0),{h:p,l:y}=Nt.add(this.Gh|0,this.Gl|0,p|0,y|0),{h:m,l:b}=Nt.add(this.Hh|0,this.Hl|0,m|0,b|0),this.set(r,i,a,o,s,l,c,u,f,h,d,g,p,y,m,b)}roundClean(){Gl.fill(0),Vl.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class DY extends BY{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}const LY=TP(()=>new DY),[BD,DD,LD]=[[],[],[]],$Y=BigInt(0),Dg=BigInt(1),UY=BigInt(2),FY=BigInt(7),jY=BigInt(256),zY=BigInt(113);for(let t=0,e=Dg,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],BD.push(2*(5*r+n)),DD.push((t+1)*(t+2)/2%64);let i=$Y;for(let a=0;a<7;a++)e=(e<>FY)*zY)%jY,e&UY&&(i^=Dg<<(Dg<n>32?RD(t,e,n):ND(t,e,n),CC=(t,e,n)=>n>32?MD(t,e,n):ID(t,e,n);function VY(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let o=0;o<10;o++)n[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const s=(o+8)%10,l=(o+2)%10,c=n[l],u=n[l+1],f=TC(c,u,1)^n[s],h=CC(c,u,1)^n[s+1];for(let d=0;d<50;d+=10)t[o+d]^=f,t[o+d+1]^=h}let i=t[2],a=t[3];for(let o=0;o<24;o++){const s=DD[o],l=TC(i,a,s),c=CC(i,a,s),u=BD[o];i=t[u],a=t[u+1],t[u]=l,t[u+1]=c}for(let o=0;o<50;o+=10){for(let s=0;s<10;s++)n[s]=t[o+s];for(let s=0;s<10;s++)t[o+s]^=~n[(s+2)%10]&n[(s+4)%10]}t[0]^=HY[r],t[1]^=GY[r]}n.fill(0)}class kP extends OP{constructor(e,n,r,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Vw(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=oY(this.state)}keccak(){VY(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){bp(this);const{blockLen:n,state:r}=this;e=F2(e);const i=e.length;for(let a=0;a=r&&this.keccak();const o=Math.min(r-this.posOut,a-i);e.set(n.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Vw(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(PD(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:n,suffix:r,outputLen:i,rounds:a,enableXOF:o}=this;return e||(e=new kP(n,r,i,o,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=r,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}const QY=(t,e,n)=>TP(()=>new kP(e,t,n)),$D=QY(1,136,256/8);let UD=!1;const FD=function(t){return $D(t)};let jD=FD;function Sn(t){const e=Jt(t,"data");return it(jD(e))}Sn._=FD;Sn.lock=function(){UD=!0};Sn.register=function(t){if(UD)throw new TypeError("keccak256 is locked");jD=t};Object.freeze(Sn);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const zD=BigInt(0),j2=BigInt(1),KY=BigInt(2),z2=t=>t instanceof Uint8Array,WY=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function wp(t){if(!z2(t))throw new Error("Uint8Array expected");let e="";for(let n=0;nr+i.length,0));let n=0;return t.forEach(r=>{if(!z2(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}function YY(t,e){if(t.length!==e.length)return!1;for(let n=0;nzD;t>>=j2,e+=1);return e}function qY(t,e){return t>>BigInt(e)&j2}const eX=(t,e,n)=>t|(n?j2:zD)<(KY<new Uint8Array(t),kC=t=>Uint8Array.from(t);function GD(t,e,n){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=D6(t),i=D6(t),a=0;const o=()=>{r.fill(1),i.fill(0),a=0},s=(...f)=>n(i,r,...f),l=(f=D6())=>{i=s(kC([0]),f),r=s(),f.length!==0&&(i=s(kC([1]),f),r=s())},c=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const h=[];for(;f{o(),l(f);let d;for(;!(d=h(c()));)l();return o(),d}}const tX={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function rv(t,e,n={}){const r=(i,a,o)=>{const s=tX[a];if(typeof s!="function")throw new Error(`Invalid validator "${a}", expected function`);const l=t[i];if(!(o&&l===void 0)&&!s(l,t))throw new Error(`Invalid param ${String(i)}=${l} (${typeof l}), expected ${a}`)};for(const[i,a]of Object.entries(e))r(i,a,!1);for(const[i,a]of Object.entries(n))r(i,a,!0);return t}const nX=Object.freeze(Object.defineProperty({__proto__:null,bitGet:qY,bitLen:ZY,bitMask:RP,bitSet:eX,bytesToHex:wp,bytesToNumberBE:Ff,bytesToNumberLE:NP,concatBytes:a1,createHmacDrbg:GD,ensureBytes:io,equalBytes:YY,hexToBytes:xp,hexToNumber:_P,numberToBytesBE:Ap,numberToBytesLE:IP,numberToHexUnpadded:HD,numberToVarBytesBE:JY,utf8ToBytes:XY,validateObject:rv},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const pr=BigInt(0),Jn=BigInt(1),Tu=BigInt(2),rX=BigInt(3),K5=BigInt(4),_C=BigInt(5),NC=BigInt(8);BigInt(9);BigInt(16);function Ti(t,e){const n=t%e;return n>=pr?n:e+n}function iX(t,e,n){if(n<=pr||e 0");if(n===Jn)return pr;let r=Jn;for(;e>pr;)e&Jn&&(r=r*t%n),t=t*t%n,e>>=Jn;return r}function ga(t,e,n){let r=t;for(;e-- >pr;)r*=r,r%=n;return r}function W5(t,e){if(t===pr||e<=pr)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=Ti(t,e),r=e,i=pr,a=Jn;for(;n!==pr;){const s=r/n,l=r%n,c=i-a*s;r=n,n=l,i=a,a=c}if(r!==Jn)throw new Error("invert: does not exist");return Ti(i,e)}function aX(t){const e=(t-Jn)/Tu;let n,r,i;for(n=t-Jn,r=0;n%Tu===pr;n/=Tu,r++);for(i=Tu;i(r[i]="function",r),e);return rv(t,n)}function cX(t,e,n){if(n 0");if(n===pr)return t.ONE;if(n===Jn)return e;let r=t.ONE,i=e;for(;n>pr;)n&Jn&&(r=t.mul(r,i)),i=t.sqr(i),n>>=Jn;return r}function uX(t,e){const n=new Array(e.length),r=e.reduce((a,o,s)=>t.is0(o)?a:(n[s]=a,t.mul(a,o)),t.ONE),i=t.inv(r);return e.reduceRight((a,o,s)=>t.is0(o)?a:(n[s]=t.mul(a,n[s]),t.mul(a,o)),i),n}function VD(t,e){const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function fX(t,e,n=!1,r={}){if(t<=pr)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:a}=VD(t,e);if(a>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=oX(t),s=Object.freeze({ORDER:t,BITS:i,BYTES:a,MASK:RP(i),ZERO:pr,ONE:Jn,create:l=>Ti(l,t),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return pr<=l&&ll===pr,isOdd:l=>(l&Jn)===Jn,neg:l=>Ti(-l,t),eql:(l,c)=>l===c,sqr:l=>Ti(l*l,t),add:(l,c)=>Ti(l+c,t),sub:(l,c)=>Ti(l-c,t),mul:(l,c)=>Ti(l*c,t),pow:(l,c)=>cX(s,l,c),div:(l,c)=>Ti(l*W5(c,t),t),sqrN:l=>l*l,addN:(l,c)=>l+c,subN:(l,c)=>l-c,mulN:(l,c)=>l*c,inv:l=>W5(l,t),sqrt:r.sqrt||(l=>o(s,l)),invertBatch:l=>uX(s,l),cmov:(l,c,u)=>u?c:l,toBytes:l=>n?IP(l,a):Ap(l,a),fromBytes:l=>{if(l.length!==a)throw new Error(`Fp.fromBytes: expected ${a}, got ${l.length}`);return n?NP(l):Ff(l)}});return Object.freeze(s)}function QD(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function KD(t){const e=QD(t);return e+Math.ceil(e/2)}function hX(t,e,n=!1){const r=t.length,i=QD(e),a=KD(e);if(r<16||r1024)throw new Error(`expected ${a}-1024 bytes of input, got ${r}`);const o=n?Ff(t):NP(t),s=Ti(o,e-Jn)+Jn;return n?IP(s,i):Ap(s,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const dX=BigInt(0),L6=BigInt(1);function pX(t,e){const n=(i,a)=>{const o=a.negate();return i?o:a},r=i=>{const a=Math.ceil(e/i)+1,o=2**(i-1);return{windows:a,windowSize:o}};return{constTimeNegate:n,unsafeLadder(i,a){let o=t.ZERO,s=i;for(;a>dX;)a&L6&&(o=o.add(s)),s=s.double(),a>>=L6;return o},precomputeWindow(i,a){const{windows:o,windowSize:s}=r(a),l=[];let c=i,u=c;for(let f=0;f>=d,y>l&&(y-=h,o+=L6);const m=p,b=p+Math.abs(y)-1,x=g%2!==0,A=y<0;y===0?u=u.add(n(x,a[m])):c=c.add(n(A,a[b]))}return{p:c,f:u}},wNAFCached(i,a,o,s){const l=i._WINDOW_SIZE||1;let c=a.get(i);return c||(c=this.precomputeWindow(i,l),l!==1&&a.set(i,s(c))),this.wNAF(l,c,o)}}}function WD(t){return lX(t.Fp),rv(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...VD(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function gX(t){const e=WD(t);rv(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=e;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:yX,hexToBytes:mX}=nX,Du={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=Du;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e("Invalid signature integer: wrong length");if(r[0]&128)throw new e("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:yX(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=Du,n=typeof t=="string"?mX(t):t;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||n[0]!=48)throw new e("Invalid signature tag");if(n[1]!==r-2)throw new e("Invalid signature: incorrect length");const{d:i,l:a}=Du._parseInt(n.subarray(2)),{d:o,l:s}=Du._parseInt(a);if(s.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(t){const e=c=>Number.parseInt(c[0],16)&8?"00"+c:c,n=c=>{const u=c.toString(16);return u.length&1?`0${u}`:u},r=e(n(t.s)),i=e(n(t.r)),a=r.length/2,o=i.length/2,s=n(a),l=n(o);return`30${n(o+a+4)}02${l}${i}02${s}${r}`}},rl=BigInt(0),Na=BigInt(1);BigInt(2);const IC=BigInt(3);BigInt(4);function vX(t){const e=gX(t),{Fp:n}=e,r=e.toBytes||((g,p,y)=>{const m=p.toAffine();return a1(Uint8Array.from([4]),n.toBytes(m.x),n.toBytes(m.y))}),i=e.fromBytes||(g=>{const p=g.subarray(1),y=n.fromBytes(p.subarray(0,n.BYTES)),m=n.fromBytes(p.subarray(n.BYTES,2*n.BYTES));return{x:y,y:m}});function a(g){const{a:p,b:y}=e,m=n.sqr(g),b=n.mul(m,g);return n.add(n.add(b,n.mul(g,p)),y)}if(!n.eql(n.sqr(e.Gy),a(e.Gx)))throw new Error("bad generator point: equation left != right");function o(g){return typeof g=="bigint"&&rln.eql(x,n.ZERO);return b(y)&&b(m)?f.ZERO:new f(y,m,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(p){const y=n.invertBatch(p.map(m=>m.pz));return p.map((m,b)=>m.toAffine(y[b])).map(f.fromAffine)}static fromHex(p){const y=f.fromAffine(i(io("pointHex",p)));return y.assertValidity(),y}static fromPrivateKey(p){return f.BASE.multiply(l(p))}_setWindowSize(p){this._WINDOW_SIZE=p,c.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:p,y}=this.toAffine();if(!n.isValid(p)||!n.isValid(y))throw new Error("bad point: x or y not FE");const m=n.sqr(y),b=a(p);if(!n.eql(m,b))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:p}=this.toAffine();if(n.isOdd)return!n.isOdd(p);throw new Error("Field doesn't support isOdd")}equals(p){u(p);const{px:y,py:m,pz:b}=this,{px:x,py:A,pz:S}=p,E=n.eql(n.mul(y,S),n.mul(x,b)),T=n.eql(n.mul(m,S),n.mul(A,b));return E&&T}negate(){return new f(this.px,n.neg(this.py),this.pz)}double(){const{a:p,b:y}=e,m=n.mul(y,IC),{px:b,py:x,pz:A}=this;let S=n.ZERO,E=n.ZERO,T=n.ZERO,C=n.mul(b,b),N=n.mul(x,x),B=n.mul(A,A),L=n.mul(b,x);return L=n.add(L,L),T=n.mul(b,A),T=n.add(T,T),S=n.mul(p,T),E=n.mul(m,B),E=n.add(S,E),S=n.sub(N,E),E=n.add(N,E),E=n.mul(S,E),S=n.mul(L,S),T=n.mul(m,T),B=n.mul(p,B),L=n.sub(C,B),L=n.mul(p,L),L=n.add(L,T),T=n.add(C,C),C=n.add(T,C),C=n.add(C,B),C=n.mul(C,L),E=n.add(E,C),B=n.mul(x,A),B=n.add(B,B),C=n.mul(B,L),S=n.sub(S,C),T=n.mul(B,N),T=n.add(T,T),T=n.add(T,T),new f(S,E,T)}add(p){u(p);const{px:y,py:m,pz:b}=this,{px:x,py:A,pz:S}=p;let E=n.ZERO,T=n.ZERO,C=n.ZERO;const N=e.a,B=n.mul(e.b,IC);let L=n.mul(y,x),U=n.mul(m,A),j=n.mul(b,S),X=n.add(y,m),G=n.add(x,A);X=n.mul(X,G),G=n.add(L,U),X=n.sub(X,G),G=n.add(y,b);let H=n.add(x,S);return G=n.mul(G,H),H=n.add(L,j),G=n.sub(G,H),H=n.add(m,b),E=n.add(A,S),H=n.mul(H,E),E=n.add(U,j),H=n.sub(H,E),C=n.mul(N,G),E=n.mul(B,j),C=n.add(E,C),E=n.sub(U,C),C=n.add(U,C),T=n.mul(E,C),U=n.add(L,L),U=n.add(U,L),j=n.mul(N,j),G=n.mul(B,G),U=n.add(U,j),j=n.sub(L,j),j=n.mul(N,j),G=n.add(G,j),L=n.mul(U,G),T=n.add(T,L),L=n.mul(H,G),E=n.mul(X,E),E=n.sub(E,L),L=n.mul(X,U),C=n.mul(H,C),C=n.add(C,L),new f(E,T,C)}subtract(p){return this.add(p.negate())}is0(){return this.equals(f.ZERO)}wNAF(p){return d.wNAFCached(this,c,p,y=>{const m=n.invertBatch(y.map(b=>b.pz));return y.map((b,x)=>b.toAffine(m[x])).map(f.fromAffine)})}multiplyUnsafe(p){const y=f.ZERO;if(p===rl)return y;if(s(p),p===Na)return this;const{endo:m}=e;if(!m)return d.unsafeLadder(this,p);let{k1neg:b,k1:x,k2neg:A,k2:S}=m.splitScalar(p),E=y,T=y,C=this;for(;x>rl||S>rl;)x&Na&&(E=E.add(C)),S&Na&&(T=T.add(C)),C=C.double(),x>>=Na,S>>=Na;return b&&(E=E.negate()),A&&(T=T.negate()),T=new f(n.mul(T.px,m.beta),T.py,T.pz),E.add(T)}multiply(p){s(p);let y=p,m,b;const{endo:x}=e;if(x){const{k1neg:A,k1:S,k2neg:E,k2:T}=x.splitScalar(y);let{p:C,f:N}=this.wNAF(S),{p:B,f:L}=this.wNAF(T);C=d.constTimeNegate(A,C),B=d.constTimeNegate(E,B),B=new f(n.mul(B.px,x.beta),B.py,B.pz),m=C.add(B),b=N.add(L)}else{const{p:A,f:S}=this.wNAF(y);m=A,b=S}return f.normalizeZ([m,b])[0]}multiplyAndAddUnsafe(p,y,m){const b=f.BASE,x=(S,E)=>E===rl||E===Na||!S.equals(b)?S.multiplyUnsafe(E):S.multiply(E),A=x(this,y).add(x(p,m));return A.is0()?void 0:A}toAffine(p){const{px:y,py:m,pz:b}=this,x=this.is0();p==null&&(p=x?n.ONE:n.inv(b));const A=n.mul(y,p),S=n.mul(m,p),E=n.mul(b,p);if(x)return{x:n.ZERO,y:n.ZERO};if(!n.eql(E,n.ONE))throw new Error("invZ was invalid");return{x:A,y:S}}isTorsionFree(){const{h:p,isTorsionFree:y}=e;if(p===Na)return!0;if(y)return y(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:p,clearCofactor:y}=e;return p===Na?this:y?y(f,this):this.multiplyUnsafe(e.h)}toRawBytes(p=!0){return this.assertValidity(),r(f,this,p)}toHex(p=!0){return wp(this.toRawBytes(p))}}f.BASE=new f(e.Gx,e.Gy,n.ONE),f.ZERO=new f(n.ZERO,n.ONE,n.ZERO);const h=e.nBitLength,d=pX(f,e.endo?Math.ceil(h/2):h);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:o}}function bX(t){const e=WD(t);return rv(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function wX(t){const e=bX(t),{Fp:n,n:r}=e,i=n.BYTES+1,a=2*n.BYTES+1;function o(G){return rlwp(Ap(G,e.nByteLength));function g(G){const H=r>>Na;return G>H}function p(G){return g(G)?s(-G):G}const y=(G,H,re)=>Ff(G.slice(H,re));class m{constructor(H,re,V){this.r=H,this.s=re,this.recovery=V,this.assertValidity()}static fromCompact(H){const re=e.nByteLength;return H=io("compactSignature",H,re*2),new m(y(H,0,re),y(H,re,2*re))}static fromDER(H){const{r:re,s:V}=Du.toSig(io("DER",H));return new m(re,V)}assertValidity(){if(!h(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!h(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(H){return new m(this.r,this.s,H)}recoverPublicKey(H){const{r:re,s:V,recovery:ee}=this,pe=T(io("msgHash",H));if(ee==null||![0,1,2,3].includes(ee))throw new Error("recovery id invalid");const Ae=ee===2||ee===3?re+e.n:re;if(Ae>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const we=ee&1?"03":"02",Ye=c.fromHex(we+d(Ae)),nt=l(Ae),De=s(-pe*nt),st=s(V*nt),Tt=c.BASE.multiplyAndAddUnsafe(Ye,De,st);if(!Tt)throw new Error("point at infinify");return Tt.assertValidity(),Tt}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return xp(this.toDERHex())}toDERHex(){return Du.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return xp(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}const b={isValidPrivateKey(G){try{return u(G),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const G=KD(e.n);return hX(e.randomBytes(G),e.n)},precompute(G=8,H=c.BASE){return H._setWindowSize(G),H.multiply(BigInt(3)),H}};function x(G,H=!0){return c.fromPrivateKey(G).toRawBytes(H)}function A(G){const H=G instanceof Uint8Array,re=typeof G=="string",V=(H||re)&&G.length;return H?V===i||V===a:re?V===2*i||V===2*a:G instanceof c}function S(G,H,re=!0){if(A(G))throw new Error("first arg must be private key");if(!A(H))throw new Error("second arg must be public key");return c.fromHex(H).multiply(u(G)).toRawBytes(re)}const E=e.bits2int||function(G){const H=Ff(G),re=G.length*8-e.nBitLength;return re>0?H>>BigInt(re):H},T=e.bits2int_modN||function(G){return s(E(G))},C=RP(e.nBitLength);function N(G){if(typeof G!="bigint")throw new Error("bigint expected");if(!(rl<=G&&GEe in re))throw new Error("sign() legacy options not supported");const{hash:V,randomBytes:ee}=e;let{lowS:pe,prehash:Ae,extraEntropy:we}=re;pe==null&&(pe=!0),G=io("msgHash",G),Ae&&(G=io("prehashed msgHash",V(G)));const Ye=T(G),nt=u(H),De=[N(nt),N(Ye)];if(we!=null){const Ee=we===!0?ee(n.BYTES):we;De.push(io("extraEntropy",Ee))}const st=a1(...De),Tt=Ye;function ln(Ee){const ne=E(Ee);if(!h(ne))return;const le=l(ne),te=c.BASE.multiply(ne).toAffine(),Ce=s(te.x);if(Ce===rl)return;const Se=s(le*s(Tt+Ce*nt));if(Se===rl)return;let ze=(te.x===Ce?0:2)|Number(te.y&Na),$e=Se;return pe&&g(Se)&&($e=p(Se),ze^=1),new m(Ce,$e,ze)}return{seed:st,k2sig:ln}}const L={lowS:e.lowS,prehash:!1},U={lowS:e.lowS,prehash:!1};function j(G,H,re=L){const{seed:V,k2sig:ee}=B(G,H,re),pe=e;return GD(pe.hash.outputLen,pe.nByteLength,pe.hmac)(V,ee)}c.BASE._setWindowSize(8);function X(G,H,re,V=U){var te;const ee=G;if(H=io("msgHash",H),re=io("publicKey",re),"strict"in V)throw new Error("options.strict was renamed to lowS");const{lowS:pe,prehash:Ae}=V;let we,Ye;try{if(typeof ee=="string"||ee instanceof Uint8Array)try{we=m.fromDER(ee)}catch(Ce){if(!(Ce instanceof Du.Err))throw Ce;we=m.fromCompact(ee)}else if(typeof ee=="object"&&typeof ee.r=="bigint"&&typeof ee.s=="bigint"){const{r:Ce,s:Se}=ee;we=new m(Ce,Se)}else throw new Error("PARSE");Ye=c.fromHex(re)}catch(Ce){if(Ce.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(pe&&we.hasHighS())return!1;Ae&&(H=e.hash(H));const{r:nt,s:De}=we,st=T(H),Tt=l(De),ln=s(st*Tt),Ee=s(nt*Tt),ne=(te=c.BASE.multiplyAndAddUnsafe(Ye,ln,Ee))==null?void 0:te.toAffine();return ne?s(ne.x)===nt:!1}return{CURVE:e,getPublicKey:x,getSharedSecret:S,sign:j,verify:X,ProjectivePoint:c,Signature:m,utils:b}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function xX(t){return{hash:t,hmac:(e,...n)=>CP(t,e,cY(...n)),randomBytes:uY}}function AX(t,e){const n=r=>wX({...t,...xX(r)});return Object.freeze({...n(e),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const JD=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),RC=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),EX=BigInt(1),J5=BigInt(2),MC=(t,e)=>(t+e/J5)/e;function SX(t){const e=JD,n=BigInt(3),r=BigInt(6),i=BigInt(11),a=BigInt(22),o=BigInt(23),s=BigInt(44),l=BigInt(88),c=t*t*t%e,u=c*c*t%e,f=ga(u,n,e)*u%e,h=ga(f,n,e)*u%e,d=ga(h,J5,e)*c%e,g=ga(d,i,e)*d%e,p=ga(g,a,e)*g%e,y=ga(p,s,e)*p%e,m=ga(y,l,e)*y%e,b=ga(m,s,e)*p%e,x=ga(b,n,e)*u%e,A=ga(x,o,e)*g%e,S=ga(A,r,e)*c%e,E=ga(S,J5,e);if(!Y5.eql(Y5.sqr(E),t))throw new Error("Cannot find square root");return E}const Y5=fX(JD,void 0,void 0,{sqrt:SX}),ri=AX({a:BigInt(0),b:BigInt(7),Fp:Y5,n:RC,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=RC,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-EX*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=n,o=BigInt("0x100000000000000000000000000000000"),s=MC(a*t,e),l=MC(-r*t,e);let c=Ti(t-s*n-l*i,e),u=Ti(-s*r-l*a,e);const f=c>o,h=u>o;if(f&&(c=e-c),h&&(u=e-u),c>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:f,k1:c,k2neg:h,k2:u}}}},yY);BigInt(0);ri.ProjectivePoint;const o1="0x0000000000000000000000000000000000000000",BC="0x0000000000000000000000000000000000000000000000000000000000000000",DC=BigInt(0),LC=BigInt(1),$C=BigInt(2),UC=BigInt(27),FC=BigInt(28),Qv=BigInt(35),Oh={};function jC(t){return th(oi(t),32)}var Gd,Vd,Qd,ef,na;let Al=(na=class{constructor(e,n,r,i){M(this,Gd,void 0);M(this,Vd,void 0);M(this,Qd,void 0);M(this,ef,void 0);D2(e,Oh,"Signature"),O(this,Gd,n),O(this,Vd,r),O(this,Qd,i),O(this,ef,null)}get r(){return v(this,Gd)}set r(e){K(Td(e)===32,"invalid r","value",e),O(this,Gd,it(e))}get s(){return v(this,Vd)}set s(e){K(Td(e)===32,"invalid s","value",e);const n=it(e);K(parseInt(n.substring(0,3))<8,"non-canonical s","value",n),O(this,Vd,n)}get v(){return v(this,Qd)}set v(e){const n=Bt(e,"value");K(n===27||n===28,"invalid v","v",e),O(this,Qd,n)}get networkV(){return v(this,ef)}get legacyChainId(){const e=this.networkV;return e==null?null:na.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=Jt(this.s);return this.yParity&&(e[0]|=128),it(e)}get compactSerialized(){return Xn([this.r,this.yParityAndS])}get serialized(){return Xn([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new na(Oh,this.r,this.s,this.v);return this.networkV&&O(e,ef,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const n=et(e,"v");return n==UC||n==FC?DC:(K(n>=Qv,"invalid EIP-155 v","v",e),(n-Qv)/$C)}static getChainIdV(e,n){return et(e)*$C+BigInt(35+n-27)}static getNormalizedV(e){const n=et(e);return n===DC||n===UC?27:n===LC||n===FC?28:(K(n>=Qv,"invalid v","v",e),n&LC?27:28)}static from(e){function n(c,u){K(c,u,"signature",e)}if(e==null)return new na(Oh,BC,BC,27);if(typeof e=="string"){const c=Jt(e,"signature");if(c.length===64){const u=it(c.slice(0,32)),f=c.slice(32,64),h=f[0]&128?28:27;return f[0]&=127,new na(Oh,u,it(f),h)}if(c.length===65){const u=it(c.slice(0,32)),f=c.slice(32,64);n((f[0]&128)===0,"non-canonical s");const h=na.getNormalizedV(c[64]);return new na(Oh,u,it(f),h)}n(!1,"invalid raw signature length")}if(e instanceof na)return e.clone();const r=e.r;n(r!=null,"missing r");const i=jC(r),a=function(c,u){if(c!=null)return jC(c);if(u!=null){n(gn(u,32),"invalid yParityAndS");const f=Jt(u);return f[0]&=127,it(f)}n(!1,"missing s")}(e.s,e.yParityAndS);n((Jt(a)[0]&128)==0,"non-canonical s");const{networkV:o,v:s}=function(c,u,f){if(c!=null){const h=et(c);return{networkV:h>=Qv?h:void 0,v:na.getNormalizedV(h)}}if(u!=null)return n(gn(u,32),"invalid yParityAndS"),{v:Jt(u)[0]&128?28:27};if(f!=null){switch(Bt(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}n(!1,"invalid yParity")}n(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),l=new na(Oh,i,a,s);return o&&O(l,ef,o),n(e.yParity==null||Bt(e.yParity,"sig.yParity")===l.yParity,"yParity mismatch"),n(e.yParityAndS==null||e.yParityAndS===l.yParityAndS,"yParityAndS mismatch"),l}},Gd=new WeakMap,Vd=new WeakMap,Qd=new WeakMap,ef=new WeakMap,na);var Bs,il;let MP=(il=class{constructor(e){M(this,Bs,void 0);K(Td(e)===32,"invalid private key","privateKey","[REDACTED]"),O(this,Bs,it(e))}get privateKey(){return v(this,Bs)}get publicKey(){return il.computePublicKey(v(this,Bs))}get compressedPublicKey(){return il.computePublicKey(v(this,Bs),!0)}sign(e){K(Td(e)===32,"invalid digest length","digest",e);const n=ri.sign(ai(e),ai(v(this,Bs)),{lowS:!0});return Al.from({r:us(n.r,32),s:us(n.s,32),v:n.recovery?28:27})}computeSharedSecret(e){const n=il.computePublicKey(e);return it(ri.getSharedSecret(ai(v(this,Bs)),Jt(n),!1))}static computePublicKey(e,n){let r=Jt(e,"key");if(r.length===32){const a=ri.getPublicKey(r,!!n);return it(a)}if(r.length===64){const a=new Uint8Array(65);a[0]=4,a.set(r,1),r=a}const i=ri.ProjectivePoint.fromHex(r);return it(i.toRawBytes(n))}static recoverPublicKey(e,n){K(Td(e)===32,"invalid digest length","digest",e);const r=Al.from(n);let i=ri.Signature.fromCompact(ai(Xn([r.r,r.s])));i=i.addRecoveryBit(r.yParity);const a=i.recoverPublicKey(ai(e));return K(a!=null,"invalid signautre for digest","signature",n),"0x"+a.toHex(!1)}static addPoints(e,n,r){const i=ri.ProjectivePoint.fromHex(il.computePublicKey(e).substring(2)),a=ri.ProjectivePoint.fromHex(il.computePublicKey(n).substring(2));return"0x"+i.add(a).toHex(!!r)}},Bs=new WeakMap,il);const PX=BigInt(0),OX=BigInt(36);function zC(t){t=t.toLowerCase();const e=t.substring(2).split(""),n=new Uint8Array(40);for(let i=0;i<40;i++)n[i]=e[i].charCodeAt(0);const r=Jt(Sn(n));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(r[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const BP={};for(let t=0;t<10;t++)BP[String(t)]=String(t);for(let t=0;t<26;t++)BP[String.fromCharCode(65+t)]=String(10+t);const HC=15;function TX(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(r=>BP[r]).join("");for(;e.length>=HC;){let r=e.substring(0,HC);e=parseInt(r,10)%97+e.substring(r.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}const CX=function(){const t={};for(let e=0;e<36;e++){const n="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[n]=BigInt(e)}return t}();function kX(t){t=t.toLowerCase();let e=PX;for(let n=0;ne.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return v(this,tf)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return v(this,tf)===!0?-1:v(this,tf)===!1?this.value.length:null}static from(e,n){return new yo(As,e,n)}static uint8(e){return Ve(e,8)}static uint16(e){return Ve(e,16)}static uint24(e){return Ve(e,24)}static uint32(e){return Ve(e,32)}static uint40(e){return Ve(e,40)}static uint48(e){return Ve(e,48)}static uint56(e){return Ve(e,56)}static uint64(e){return Ve(e,64)}static uint72(e){return Ve(e,72)}static uint80(e){return Ve(e,80)}static uint88(e){return Ve(e,88)}static uint96(e){return Ve(e,96)}static uint104(e){return Ve(e,104)}static uint112(e){return Ve(e,112)}static uint120(e){return Ve(e,120)}static uint128(e){return Ve(e,128)}static uint136(e){return Ve(e,136)}static uint144(e){return Ve(e,144)}static uint152(e){return Ve(e,152)}static uint160(e){return Ve(e,160)}static uint168(e){return Ve(e,168)}static uint176(e){return Ve(e,176)}static uint184(e){return Ve(e,184)}static uint192(e){return Ve(e,192)}static uint200(e){return Ve(e,200)}static uint208(e){return Ve(e,208)}static uint216(e){return Ve(e,216)}static uint224(e){return Ve(e,224)}static uint232(e){return Ve(e,232)}static uint240(e){return Ve(e,240)}static uint248(e){return Ve(e,248)}static uint256(e){return Ve(e,256)}static uint(e){return Ve(e,256)}static int8(e){return Ve(e,-8)}static int16(e){return Ve(e,-16)}static int24(e){return Ve(e,-24)}static int32(e){return Ve(e,-32)}static int40(e){return Ve(e,-40)}static int48(e){return Ve(e,-48)}static int56(e){return Ve(e,-56)}static int64(e){return Ve(e,-64)}static int72(e){return Ve(e,-72)}static int80(e){return Ve(e,-80)}static int88(e){return Ve(e,-88)}static int96(e){return Ve(e,-96)}static int104(e){return Ve(e,-104)}static int112(e){return Ve(e,-112)}static int120(e){return Ve(e,-120)}static int128(e){return Ve(e,-128)}static int136(e){return Ve(e,-136)}static int144(e){return Ve(e,-144)}static int152(e){return Ve(e,-152)}static int160(e){return Ve(e,-160)}static int168(e){return Ve(e,-168)}static int176(e){return Ve(e,-176)}static int184(e){return Ve(e,-184)}static int192(e){return Ve(e,-192)}static int200(e){return Ve(e,-200)}static int208(e){return Ve(e,-208)}static int216(e){return Ve(e,-216)}static int224(e){return Ve(e,-224)}static int232(e){return Ve(e,-232)}static int240(e){return Ve(e,-240)}static int248(e){return Ve(e,-248)}static int256(e){return Ve(e,-256)}static int(e){return Ve(e,-256)}static bytes1(e){return Zt(e,1)}static bytes2(e){return Zt(e,2)}static bytes3(e){return Zt(e,3)}static bytes4(e){return Zt(e,4)}static bytes5(e){return Zt(e,5)}static bytes6(e){return Zt(e,6)}static bytes7(e){return Zt(e,7)}static bytes8(e){return Zt(e,8)}static bytes9(e){return Zt(e,9)}static bytes10(e){return Zt(e,10)}static bytes11(e){return Zt(e,11)}static bytes12(e){return Zt(e,12)}static bytes13(e){return Zt(e,13)}static bytes14(e){return Zt(e,14)}static bytes15(e){return Zt(e,15)}static bytes16(e){return Zt(e,16)}static bytes17(e){return Zt(e,17)}static bytes18(e){return Zt(e,18)}static bytes19(e){return Zt(e,19)}static bytes20(e){return Zt(e,20)}static bytes21(e){return Zt(e,21)}static bytes22(e){return Zt(e,22)}static bytes23(e){return Zt(e,23)}static bytes24(e){return Zt(e,24)}static bytes25(e){return Zt(e,25)}static bytes26(e){return Zt(e,26)}static bytes27(e){return Zt(e,27)}static bytes28(e){return Zt(e,28)}static bytes29(e){return Zt(e,29)}static bytes30(e){return Zt(e,30)}static bytes31(e){return Zt(e,31)}static bytes32(e){return Zt(e,32)}static address(e){return new yo(As,"address",e)}static bool(e){return new yo(As,"bool",!!e)}static bytes(e){return new yo(As,"bytes",e)}static string(e){return new yo(As,"string",e)}static array(e,n){throw new Error("not implemented yet")}static tuple(e,n){throw new Error("not implemented yet")}static overrides(e){return new yo(As,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===GC}static dereference(e,n){if(yo.isTyped(e)){if(e.type!==n)throw new Error(`invalid type: expecetd ${n}, got ${e.type}`);return e.value}return e}},tf=new WeakMap,yo),_X=class extends Il{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,n){let r=Di.dereference(n,"string");try{r=fn(r)}catch(i){return this._throwError(i.message,n)}return e.writeValue(r)}decode(e){return fn(us(e.readValue(),20))}},NX=class extends Il{constructor(n){super(n.name,n.type,"_",n.dynamic);R(this,"coder");this.coder=n}defaultValue(){return this.coder.defaultValue()}encode(n,r){return this.coder.encode(n,r)}decode(n){return this.coder.decode(n)}};function ZD(t,e,n){let r=[];if(Array.isArray(n))r=n;else if(n&&typeof n=="object"){let l={};r=e.map(c=>{const u=c.localName;return ye(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:c},value:n}),ye(!l[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:c},value:n}),l[u]=!0,n[u]})}else K(!1,"invalid tuple value","tuple",n);K(e.length===r.length,"types/value length mismatch","tuple",n);let i=new G5,a=new G5,o=[];e.forEach((l,c)=>{let u=r[c];if(l.dynamic){let f=a.length;l.encode(a,u);let h=i.writeUpdatableValue();o.push(d=>{h(d+f)})}else l.encode(i,u)}),o.forEach(l=>{l(i.length)});let s=t.appendWriter(i);return s+=t.appendWriter(a),s}function qD(t,e){let n=[],r=[],i=t.subReader(0);return e.forEach(a=>{let o=null;if(a.dynamic){let s=t.readIndex(),l=i.subReader(s);try{o=a.decode(l)}catch(c){if(Qr(c,"BUFFER_OVERRUN"))throw c;o=c,o.baseType=a.name,o.name=a.localName,o.type=a.type}}else try{o=a.decode(t)}catch(s){if(Qr(s,"BUFFER_OVERRUN"))throw s;o=s,o.baseType=a.name,o.name=a.localName,o.type=a.type}if(o==null)throw new Error("investigate");n.push(o),r.push(a.localName||null)}),ED.fromItems(n,r)}let IX=class extends Il{constructor(n,r,i){const a=n.type+"["+(r>=0?r:"")+"]",o=r===-1||n.dynamic;super("array",a,i,o);R(this,"coder");R(this,"length");gt(this,{coder:n,length:r})}defaultValue(){const n=this.coder.defaultValue(),r=[];for(let i=0;io||i<-(o+UX))&&this._throwError("value out-of-bounds",r),i=pD(i,8*si)}else(i<$X||i>Zg(a,this.size*8))&&this._throwError("value out-of-bounds",r);return n.writeValue(i)}decode(n){let r=Zg(n.readValue(),this.size*8);return this.signed&&(r=UJ(r,this.size*8)),r}},zX=class extends eL{constructor(e){super("string",e)}defaultValue(){return""}encode(e,n){return super.encode(e,fl(Di.dereference(n,"string")))}decode(e){return Gw(super.decode(e))}},Kv=class extends Il{constructor(n,r){let i=!1;const a=[];n.forEach(s=>{s.dynamic&&(i=!0),a.push(s.type)});const o="tuple("+a.join(",")+")";super("tuple",o,r,i);R(this,"coders");gt(this,{coders:Object.freeze(n.slice())})}defaultValue(){const n=[];this.coders.forEach(i=>{n.push(i.defaultValue())});const r=this.coders.reduce((i,a)=>{const o=a.localName;return o&&(i[o]||(i[o]=0),i[o]++),i},{});return this.coders.forEach((i,a)=>{let o=i.localName;!o||r[o]!==1||(o==="length"&&(o="_length"),n[o]==null&&(n[o]=n[a]))}),Object.freeze(n)}encode(n,r){const i=Di.dereference(r,"tuple");return ZD(n,this.coders,i)}decode(n){return qD(n,this.coders)}};function rh(t){return Sn(fl(t))}var HX="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";const VC=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),QC=4;function GX(t){let e=0;function n(){return t[e++]<<8|t[e++]}let r=n(),i=1,a=[0,1];for(let S=1;S>--l&1}const f=31,h=2**f,d=h>>>1,g=d>>1,p=h-1;let y=0;for(let S=0;S1;){let B=E+T>>>1;S>>1|u(),C=C<<1^d,N=(N^d)<<1|d|1;b=C,x=1+N-C}let A=r-4;return m.map(S=>{switch(S-A){case 3:return A+65792+(t[s++]<<16|t[s++]<<8|t[s++]);case 2:return A+256+(t[s++]<<8|t[s++]);case 1:return A+t[s++];default:return S-1}})}function VX(t){let e=0;return()=>t[e++]}function tL(t){return VX(GX(QX(t)))}function QX(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,a)=>e[i.charCodeAt(0)]=a);let n=t.length,r=new Uint8Array(6*n>>3);for(let i=0,a=0,o=0,s=0;i=8&&(r[a++]=s>>(o-=8));return r}function KX(t){return t&1?~t>>1:t>>1}function WX(t,e){let n=Array(t);for(let r=0,i=0;r{let e=s1(t);if(e.length)return e})}function rL(t){let e=[];for(;;){let n=t();if(n==0)break;e.push(JX(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(YX(n,t))}return e.flat()}function l1(t){let e=[];for(;;){let n=t(e.length);if(!n)break;e.push(n)}return e}function iL(t,e,n){let r=Array(t).fill().map(()=>[]);for(let i=0;ir[o].push(a));return r}function JX(t,e){let n=1+e(),r=e(),i=l1(e);return iL(i.length,1+t,e).flatMap((o,s)=>{let[l,...c]=o;return Array(i[s]).fill().map((u,f)=>{let h=f*r;return[l+f*n,c.map(d=>d+h)]})})}function YX(t,e){let n=1+e();return iL(n,1+t,e).map(i=>[i[0],i.slice(1)])}function XX(t){let e=[],n=s1(t);return i(r([]),[]),e;function r(a){let o=t(),s=l1(()=>{let l=s1(t).map(c=>n[c]);if(l.length)return r(l)});return{S:o,B:s,Q:a}}function i({S:a,B:o},s,l){if(!(a&4&&l===s[s.length-1])){a&2&&(l=s[s.length-1]),a&1&&e.push(s);for(let c of o)for(let u of c.Q)i(c,[...s,u],l)}}}function ZX(t){return t.toString(16).toUpperCase().padStart(2,"0")}function aL(t){return`{${ZX(t)}}`}function qX(t){let e=[];for(let n=0,r=t.length;n>24&255}function lL(t){return t&16777215}let X5,KC,Z5,jb;function sZ(){let t=tL(tZ);X5=new Map(nL(t).flatMap((e,n)=>e.map(r=>[r,n+1<<24]))),KC=new Set(s1(t)),Z5=new Map,jb=new Map;for(let[e,n]of rL(t)){if(!KC.has(e)&&n.length==2){let[r,i]=n,a=jb.get(r);a||(a=new Map,jb.set(r,a)),a.set(i,e)}Z5.set(e,n.reverse())}}function cL(t){return t>=c1&&t=Qw&&t=Kw&&eWw&&e0&&i(Ww+c)}else{let o=Z5.get(a);o?n.push(...o):i(a)}if(!n.length)break;a=n.pop()}if(r&&e.length>1){let a=ey(e[0]);for(let o=1;o0&&i>=o)o==0?(e.push(r,...n),n.length=0,r=s):n.push(s),i=o;else{let l=lZ(r,s);l>=0?r=l:i==0&&o==0?(e.push(r),r=s):(n.push(s),i=o)}}return r>=0&&e.push(r,...n),e}function fL(t){return uL(t).map(lL)}function uZ(t){return cZ(uL(t))}const WC=45,hL=".",dL=65039,pL=1,Yw=t=>Array.from(t);function u1(t,e){return t.P.has(e)||t.Q.has(e)}let fZ=class extends Array{get is_emoji(){return!0}},q5,gL,Lu,e3,yL,kd,U6,Bh,Au,JC,t3;function DP(){if(q5)return;let t=tL(HX);const e=()=>s1(t),n=()=>new Set(e()),r=(u,f)=>f.forEach(h=>u.add(h));q5=new Map(rL(t)),gL=n(),Lu=e(),e3=new Set(e().map(u=>Lu[u])),Lu=new Set(Lu),yL=n(),n();let i=nL(t),a=t();const o=()=>{let u=new Set;return e().forEach(f=>r(u,i[f])),r(u,e()),u};kd=l1(u=>{let f=l1(t).map(h=>h+96);if(f.length){let h=u>=a;f[0]-=32,f=Ep(f),h&&(f=`Restricted[${f}]`);let d=o(),g=o(),p=!t();return{N:f,P:d,Q:g,M:p,R:h}}}),U6=n(),Bh=new Map;let s=e().concat(Yw(U6)).sort((u,f)=>u-f);s.forEach((u,f)=>{let h=t(),d=s[f]=h?s[f-h]:{V:[],M:new Map};d.V.push(u),U6.has(u)||Bh.set(u,d)});for(let{V:u,M:f}of new Set(Bh.values())){let h=[];for(let g of u){let p=kd.filter(m=>u1(m,g)),y=h.find(({G:m})=>p.some(b=>m.has(b)));y||(y={G:new Set,V:[]},h.push(y)),y.V.push(g),r(y.G,p)}let d=h.flatMap(g=>Yw(g.G));for(let{G:g,V:p}of h){let y=new Set(d.filter(m=>!g.has(m)));for(let m of p)f.set(m,y)}}Au=new Set;let l=new Set;const c=u=>Au.has(u)?l.add(u):Au.add(u);for(let u of kd){for(let f of u.P)c(f);for(let f of u.Q)c(f)}for(let u of Au)!Bh.has(u)&&!l.has(u)&&Bh.set(u,pL);r(Au,fL(Au)),JC=XX(t).map(u=>fZ.from(u)).sort(eZ),t3=new Map;for(let u of JC){let f=[t3];for(let h of u){let d=f.map(g=>{let p=g.get(h);return p||(p=new Map,g.set(h,p)),p});h===dL?f.push(...d):f=d}for(let h of f)h.V=u}}function LP(t){return(mL(t)?"":`${$P(H2([t]))} `)+aL(t)}function $P(t){return`"${t}"‎`}function hZ(t){if(t.length>=4&&t[2]==WC&&t[3]==WC)throw new Error(`invalid label extension: "${Ep(t.slice(0,4))}"`)}function dZ(t){for(let n=t.lastIndexOf(95);n>0;)if(t[--n]!==95)throw new Error("underscore allowed only at start")}function pZ(t){let e=t[0],n=VC.get(e);if(n)throw Py(`leading ${n}`);let r=t.length,i=-1;for(let a=1;ae&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let i=0,a=t.length;for(let o=0;o{let a=qX(i),o={input:a,offset:r};r+=a.length+1;try{let s=o.tokens=AZ(a,e,n),l=s.length,c;if(!l)throw new Error("empty label");let u=o.output=s.flat();if(dZ(u),!(o.emoji=l>1||s[0].is_emoji)&&u.every(h=>h<128))hZ(u),c="ASCII";else{let h=s.flatMap(d=>d.is_emoji?[]:d);if(!h.length)c="Emoji";else{if(Lu.has(u[0]))throw Py("leading combining mark");for(let p=1;po.has(s)):Yw(o),!n.length)return}else r.push(i)}if(n){for(let i of n)if(r.every(a=>u1(i,a)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function bZ(t){let e=kd;for(let n of t){let r=e.filter(i=>u1(i,n));if(!r.length)throw kd.some(i=>u1(i,n))?bL(e[0],n):vL(n);if(e=r,r.length==1)break}return e}function wZ(t){return t.map(({input:e,error:n,output:r})=>{if(n){let i=n.message;throw new Error(t.length==1?i:`Invalid label ${$P(H2(e,63))}: ${i}`)}return Ep(r)}).join(hL)}function vL(t){return new Error(`disallowed character: ${LP(t)}`)}function bL(t,e){let n=LP(e),r=kd.find(i=>i.P.has(e));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${t.N} + ${n}`)}function Py(t){return new Error(`illegal placement: ${t}`)}function xZ(t,e){for(let n of e)if(!u1(t,n))throw bL(t,n);if(t.M){let n=fL(e);for(let r=1,i=n.length;rQC)throw new Error(`excessive non-spacing marks: ${$P(H2(n.slice(r-1,a)))} (${a-r}/${QC})`);r=a}}}function AZ(t,e,n){let r=[],i=[];for(t=t.slice().reverse();t.length;){let a=SZ(t);if(a)i.length&&(r.push(e(i)),i=[]),r.push(n(a));else{let o=t.pop();if(Au.has(o))i.push(o);else{let s=q5.get(o);if(s)i.push(...s);else if(!gL.has(o))throw vL(o)}}}return i.length&&r.push(e(i)),r}function EZ(t){return t.filter(e=>e!=dL)}function SZ(t,e){let n=t3,r,i=t.length;for(;i&&(n=n.get(t[--i]),!!n);){let{V:a}=n;a&&(r=a,e&&e.push(...t.slice(i).reverse()),t.length=i)}return r}const wL=new Uint8Array(32);wL.fill(0);function YC(t){return K(t.length!==0,"invalid ENS name; empty component","comp",t),t}function xL(t){const e=fl(PZ(t)),n=[];if(t.length===0)return n;let r=0;for(let i=0;i{K(r.length<=n,`label ${JSON.stringify(t)} exceeds ${n} bytes`,"name",t);const i=new Uint8Array(r.length+1);return i.set(r,1),i[0]=i.length-1,i})))+"00"}function F6(t,e){return{address:fn(t),storageKeys:e.map((n,r)=>(K(gn(n,32),"invalid slot",`storageKeys[${r}]`,n),n.toLowerCase()))}}function ph(t){if(Array.isArray(t))return t.map((n,r)=>Array.isArray(n)?(K(n.length===2,"invalid slot set",`value[${r}]`,n),F6(n[0],n[1])):(K(n!=null&&typeof n=="object","invalid address-slot set","value",t),F6(n.address,n.storageKeys)));K(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(n=>{const r=t[n].reduce((i,a)=>(i[a]=!0,i),{});return F6(n,Object.keys(r).sort())});return e.sort((n,r)=>n.address.localeCompare(r.address)),e}function TZ(t){let e;return typeof t=="string"?e=MP.computePublicKey(t,!1):e=t.publicKey,fn(Sn("0x"+e.substring(4)).substring(26))}function CZ(t,e){return TZ(MP.recoverPublicKey(t,e))}const dr=BigInt(0),kZ=BigInt(2),_Z=BigInt(27),NZ=BigInt(28),IZ=BigInt(35),RZ=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function G2(t){return t==="0x"?null:fn(t)}function UP(t,e){try{return ph(t)}catch(n){K(!1,n.message,e,t)}}function iv(t,e){return t==="0x"?0:Bt(t,e)}function Yn(t,e){if(t==="0x")return dr;const n=et(t,e);return K(n<=RZ,"value exceeds uint size",e,n),n}function wn(t,e){const n=et(t,"value"),r=oi(n);return K(r.length<=32,"value too large",`tx.${e}`,n),r}function FP(t){return ph(t).map(e=>[e.address,e.storageKeys])}function MZ(t,e){K(Array.isArray(t),`invalid ${e}`,"value",t);for(let n=0;n=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,n=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,r=this.accessList!=null,i=v(this,nf)!=null||v(this,rf);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&ye(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),ye(!n||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),ye(this.type!==0||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const a=[];return this.type!=null?a.push(this.type):n?a.push(2):e?(a.push(1),r||a.push(0)):r?(a.push(1),a.push(2)):(i&&this.to||(a.push(0),a.push(1),a.push(2)),a.push(3)),a.sort(),a}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return mo.from(this)}toJSON(){const e=n=>n==null?null:n.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new mo;if(typeof e=="string"){const r=Jt(e);if(r[0]>=127)return mo.from(BZ(r));switch(r[0]){case 1:return mo.from(LZ(r));case 2:return mo.from(DZ(r));case 3:return mo.from($Z(r))}ye(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const n=new mo;return e.type!=null&&(n.type=e.type),e.to!=null&&(n.to=e.to),e.nonce!=null&&(n.nonce=e.nonce),e.gasLimit!=null&&(n.gasLimit=e.gasLimit),e.gasPrice!=null&&(n.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(n.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(n.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(n.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(n.data=e.data),e.value!=null&&(n.value=e.value),e.chainId!=null&&(n.chainId=e.chainId),e.signature!=null&&(n.signature=Al.from(e.signature)),e.accessList!=null&&(n.accessList=e.accessList),e.blobVersionedHashes!=null&&(n.blobVersionedHashes=e.blobVersionedHashes),e.hash!=null&&(K(n.isSigned(),"unsigned transaction cannot define hash","tx",e),K(n.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(K(n.isSigned(),"unsigned transaction cannot define from","tx",e),K(n.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),n}},$o=new WeakMap,Kd=new WeakMap,Wd=new WeakMap,Jd=new WeakMap,Yd=new WeakMap,Xd=new WeakMap,Zd=new WeakMap,qd=new WeakMap,e0=new WeakMap,t0=new WeakMap,n0=new WeakMap,r0=new WeakMap,nf=new WeakMap,rf=new WeakMap,mo);const EL=new Uint8Array(32);EL.fill(0);const UZ=BigInt(-1),SL=BigInt(0),PL=BigInt(1),FZ=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function jZ(t){const e=Jt(t),n=e.length%32;return n?Xn([e,EL.slice(n)]):it(e)}const zZ=us(PL,32),HZ=us(SL,32),tk={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},j6=["name","version","chainId","verifyingContract","salt"];function nk(t){return function(e){return K(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const GZ={name:nk("name"),version:nk("version"),chainId:function(t){const e=et(t,"domain.chainId");return K(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):fd(e)},verifyingContract:function(t){try{return fn(t).toLowerCase()}catch{}K(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=Jt(t,"domain.salt");return K(e.length===32,'invalid domain value "salt"',"domain.salt",t),it(e)}};function z6(t){{const e=t.match(/^(u?)int(\d+)$/);if(e){const n=e[1]==="",r=parseInt(e[2]);K(r%8===0&&r!==0&&r<=256&&e[2]===String(r),"invalid numeric width","type",t);const i=Zg(FZ,n?r-1:r),a=n?(i+PL)*UZ:SL;return function(o){const s=et(o,"value");return K(s>=a&&s<=i,`value out-of-bounds for ${t}`,"value",s),us(n?pD(s,256):s,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const n=parseInt(e[1]);return K(n!==0&&n<=32&&e[1]===String(n),"invalid bytes width","type",t),function(r){const i=Jt(r);return K(i.length===n,`invalid length for ${t}`,"value",r),jZ(r)}}}switch(t){case"address":return function(e){return th(fn(e),32)};case"bool":return function(e){return e?zZ:HZ};case"bytes":return function(e){return Sn(e)};case"string":return function(e){return rh(e)}}return null}function rk(t,e){return`${t}(${e.map(({name:n,type:r})=>r+" "+n).join(",")})`}function Wv(t){const e=t.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}var pm,Ds,i0,a2,OL,Pi;let ik=(Pi=class{constructor(e){M(this,a2);R(this,"primaryType");M(this,pm,void 0);M(this,Ds,void 0);M(this,i0,void 0);O(this,Ds,new Map),O(this,i0,new Map);const n=new Map,r=new Map,i=new Map,a={};Object.keys(e).forEach(l=>{a[l]=e[l].map(({name:c,type:u})=>{let{base:f,index:h}=Wv(u);return f==="int"&&!e.int&&(f="int256"),f==="uint"&&!e.uint&&(f="uint256"),{name:c,type:f+(h||"")}}),n.set(l,new Set),r.set(l,[]),i.set(l,new Set)}),O(this,pm,JSON.stringify(a));for(const l in a){const c=new Set;for(const u of a[l]){K(!c.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(l)}`,"types",e),c.add(u.name);const f=Wv(u.type).base;K(f!==l,`circular type reference to ${JSON.stringify(f)}`,"types",e),!z6(f)&&(K(r.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),r.get(f).push(l),n.get(l).add(f))}}const o=Array.from(r.keys()).filter(l=>r.get(l).length===0);K(o.length!==0,"missing primary type","types",e),K(o.length===1,`ambiguous primary types or unused types: ${o.map(l=>JSON.stringify(l)).join(", ")}`,"types",e),gt(this,{primaryType:o[0]});function s(l,c){K(!c.has(l),`circular type reference to ${JSON.stringify(l)}`,"types",e),c.add(l);for(const u of n.get(l))if(r.has(u)){s(u,c);for(const f of c)i.get(f).add(u)}c.delete(l)}s(this.primaryType,new Set);for(const[l,c]of i){const u=Array.from(c);u.sort(),v(this,Ds).set(l,rk(l,a[l])+u.map(f=>rk(f,a[f])).join(""))}}get types(){return JSON.parse(v(this,pm))}getEncoder(e){let n=v(this,i0).get(e);return n||(n=ie(this,a2,OL).call(this,e),v(this,i0).set(e,n)),n}encodeType(e){const n=v(this,Ds).get(e);return K(n,`unknown type: ${JSON.stringify(e)}`,"name",e),n}encodeData(e,n){return this.getEncoder(e)(n)}hashStruct(e,n){return Sn(this.encodeData(e,n))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,n,r){if(z6(e))return r(e,n);const i=Wv(e).array;if(i)return K(i.count===-1||i.count===n.length,`array length mismatch; expected length ${i.count}`,"value",n),n.map(o=>this._visit(i.prefix,o,r));const a=this.types[e];if(a)return a.reduce((o,{name:s,type:l})=>(o[s]=this._visit(l,n[s],r),o),{});K(!1,`unknown type: ${e}`,"type",e)}visit(e,n){return this._visit(this.primaryType,e,n)}static from(e){return new Pi(e)}static getPrimaryType(e){return Pi.from(e).primaryType}static hashStruct(e,n,r){return Pi.from(n).hashStruct(e,r)}static hashDomain(e){const n=[];for(const r in e){if(e[r]==null)continue;const i=tk[r];K(i,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),n.push({name:r,type:i})}return n.sort((r,i)=>j6.indexOf(r.name)-j6.indexOf(i.name)),Pi.hashStruct("EIP712Domain",{EIP712Domain:n},e)}static encode(e,n,r){return Xn(["0x1901",Pi.hashDomain(e),Pi.from(n).hash(r)])}static hash(e,n,r){return Sn(Pi.encode(e,n,r))}static async resolveNames(e,n,r,i){e=Object.assign({},e);for(const s in e)e[s]==null&&delete e[s];const a={};e.verifyingContract&&!gn(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");const o=Pi.from(n);o.visit(r,(s,l)=>(s==="address"&&!gn(l,20)&&(a[l]="0x"),l));for(const s in a)a[s]=await i(s);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),r=o.visit(r,(s,l)=>s==="address"&&a[l]?a[l]:l),{domain:e,value:r}}static getPayload(e,n,r){Pi.hashDomain(e);const i={},a=[];j6.forEach(l=>{const c=e[l];c!=null&&(i[l]=GZ[l](c),a.push({name:l,type:tk[l]}))});const o=Pi.from(n);n=o.types;const s=Object.assign({},n);return K(s.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",n),s.EIP712Domain=a,o.encode(r),{types:s,domain:i,primaryType:o.primaryType,message:o.visit(r,(l,c)=>{if(l.match(/^bytes(\d*)/))return it(Jt(c));if(l.match(/^u?int/))return et(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return K(typeof c=="string","invalid string","value",c),c}K(!1,"unsupported type","type",l)})}}},pm=new WeakMap,Ds=new WeakMap,i0=new WeakMap,a2=new WeakSet,OL=function(e){{const i=z6(e);if(i)return i}const n=Wv(e).array;if(n){const i=n.prefix,a=this.getEncoder(i);return o=>{K(n.count===-1||n.count===o.length,`array length mismatch; expected length ${n.count}`,"value",o);let s=o.map(a);return v(this,Ds).has(i)&&(s=s.map(Sn)),Sn(Xn(s))}}const r=this.types[e];if(r){const i=rh(v(this,Ds).get(e));return a=>{const o=r.map(({name:s,type:l})=>{const c=this.getEncoder(l)(a[s]);return v(this,Ds).has(l)?Sn(c):c});return o.unshift(i),Xn(o)}}K(!1,`unknown type: ${e}`,"type",e)},Pi);function ci(t){const e=new Set;return t.forEach(n=>e.add(n)),Object.freeze(e)}const VZ="external public payable override",QZ=ci(VZ.split(" ")),TL="constant external internal payable private public pure view override",KZ=ci(TL.split(" ")),CL="constructor error event fallback function receive struct",kL=ci(CL.split(" ")),_L="calldata memory storage payable indexed",WZ=ci(_L.split(" ")),JZ="tuple returns",YZ=[CL,_L,JZ,TL].join(" "),XZ=ci(YZ.split(" ")),ZZ={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},qZ=new RegExp("^(\\s*)"),eq=new RegExp("^([0-9]+)"),tq=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),NL=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),IL=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var vr,oo,gm,r3,qp;let Rl=(qp=class{constructor(e){M(this,gm);M(this,vr,void 0);M(this,oo,void 0);O(this,vr,0),O(this,oo,e.slice())}get offset(){return v(this,vr)}get length(){return v(this,oo).length-v(this,vr)}clone(){return new qp(v(this,oo))}reset(){O(this,vr,0)}popKeyword(e){const n=this.peek();if(n.type!=="KEYWORD"||!e.has(n.text))throw new Error(`expected keyword ${n.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const n=this.peek();throw new Error(`expected ${e}; got ${n.type} ${JSON.stringify(n.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const n=ie(this,gm,r3).call(this,v(this,vr)+1,e.match+1);return O(this,vr,e.match+1),n}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const n=[];for(;v(this,vr)=v(this,oo).length)throw new Error("out-of-bounds");return v(this,oo)[v(this,vr)]}peekKeyword(e){const n=this.peekType("KEYWORD");return n!=null&&e.has(n)?n:null}peekType(e){if(this.length===0)return null;const n=this.peek();return n.type===e?n.text:null}pop(){const e=this.peek();return vs(this,vr)._++,e}toString(){const e=[];for(let n=v(this,vr);n`}},vr=new WeakMap,oo=new WeakMap,gm=new WeakSet,r3=function(e=0,n=0){return new qp(v(this,oo).slice(e,n).map(r=>Object.freeze(Object.assign({},r,{match:r.match-e,linkBack:r.linkBack-e,linkNext:r.linkNext-e}))))},qp);function ou(t){const e=[],n=o=>{const s=a0&&e[e.length-1].type==="NUMBER"){const f=e.pop().text;u=f+u,e[e.length-1].value=Bt(f)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(s=o.match(tq),s){if(l.text=s[1],a+=l.text.length,XZ.has(l.text)){l.type="KEYWORD";continue}if(l.text.match(IL)){l.type="TYPE";continue}l.type="ID";continue}if(s=o.match(eq),s){l.text=s[1],l.type="NUMBER",a+=l.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${a}`)}return new Rl(e.map(o=>Object.freeze(o)))}function ak(t,e){let n=[];for(const r in e.keys())t.has(r)&&n.push(r);if(n.length>1)throw new Error(`conflicting types: ${n.join(", ")}`)}function V2(t,e){if(e.peekKeyword(kL)){const n=e.pop().text;if(n!==t)throw new Error(`expected ${t}, got ${n}`)}return e.popType("ID")}function El(t,e){const n=new Set;for(;;){const r=t.peekType("KEYWORD");if(r==null||e&&!e.has(r))break;if(t.pop(),n.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}function RL(t){let e=El(t,KZ);return ak(e,ci("constant payable nonpayable".split(" "))),ak(e,ci("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function hl(t,e){return t.popParams().map(n=>gi.from(n,e))}function ML(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return et(t.pop().text);throw new Error("invalid gas")}return null}function ih(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const nq=new RegExp(/^(.*)\[([0-9]*)\]$/);function ok(t){const e=t.match(IL);if(K(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const n=parseInt(e[2]);K(n!==0&&n<=32,"invalid bytes length","type",t)}else if(e[3]){const n=parseInt(e[3]);K(n!==0&&n<=256&&n%8===0,"invalid numeric width","type",t)}return t}const kn={},$i=Symbol.for("_ethers_internal"),sk="_ParamTypeInternal",lk="_ErrorInternal",ck="_EventInternal",uk="_ConstructorInternal",fk="_FallbackInternal",hk="_FunctionInternal",dk="_StructInternal";var a0,zb,Oi;let gi=(Oi=class{constructor(e,n,r,i,a,o,s,l){M(this,a0);R(this,"name");R(this,"type");R(this,"baseType");R(this,"indexed");R(this,"components");R(this,"arrayLength");R(this,"arrayChildren");if(D2(e,kn,"ParamType"),Object.defineProperty(this,$i,{value:sk}),o&&(o=Object.freeze(o.slice())),i==="array"){if(s==null||l==null)throw new Error("")}else if(s!=null||l!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");gt(this,{name:n,type:r,baseType:i,indexed:a,components:o,arrayLength:s,arrayChildren:l})}format(e){if(e==null&&(e="sighash"),e==="json"){const r=this.name||"";if(this.isArray()){const a=JSON.parse(this.arrayChildren.format("json"));return a.name=r,a.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(a)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:r};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(a=>JSON.parse(a.format(e)))),JSON.stringify(i)}let n="";return this.isArray()?(n+=this.arrayChildren.format(e),n+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?n+="("+this.components.map(r=>r.format(e)).join(e==="full"?", ":",")+")":n+=this.type,e!=="sighash"&&(this.indexed===!0&&(n+=" indexed"),e==="full"&&this.name&&(n+=" "+this.name)),n}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,n){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map(i=>r.arrayChildren.walk(i,n))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const r=this;return e.map((i,a)=>r.components[a].walk(i,n))}return n(this.type,e)}async walkAsync(e,n){const r=[],i=[e];return ie(this,a0,zb).call(this,r,e,n,a=>{i[0]=a}),r.length&&await Promise.all(r),i[0]}static from(e,n){if(Oi.isParamType(e))return e;if(typeof e=="string")try{return Oi.from(ou(e),n)}catch{K(!1,"invalid param type","obj",e)}else if(e instanceof Rl){let s="",l="",c=null;El(e,ci(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(l="tuple",c=e.popParams().map(p=>Oi.from(p)),s=`tuple(${c.map(p=>p.format()).join(",")})`):(s=ok(e.popType("TYPE")),l=s);let u=null,f=null;for(;e.length&&e.peekType("BRACKET");){const p=e.pop();u=new Oi(kn,"",s,l,null,c,f,u),f=p.value,s+=p.text,l="array",c=null}let h=null;if(El(e,WZ).has("indexed")){if(!n)throw new Error("");h=!0}const g=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Oi(kn,g,s,l,h,c,f,u)}const r=e.name;K(!r||typeof r=="string"&&r.match(NL),"invalid name","obj.name",r);let i=e.indexed;i!=null&&(K(n,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let a=e.type,o=a.match(nq);if(o){const s=parseInt(o[2]||"-1"),l=Oi.from({type:o[1],components:e.components});return new Oi(kn,r||"",a,"array",i,null,s,l)}if(a==="tuple"||a.startsWith("tuple(")||a.startsWith("(")){const s=e.components!=null?e.components.map(c=>Oi.from(c)):null;return new Oi(kn,r||"",a,"tuple",i,s,null,null)}return a=ok(e.type),new Oi(kn,r||"",a,a,i,null,null,null)}static isParamType(e){return e&&e[$i]===sk}},a0=new WeakSet,zb=function(e,n,r,i){if(this.isArray()){if(!Array.isArray(n))throw new Error("invalid array value");if(this.arrayLength!==-1&&n.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,s=n.slice();s.forEach((l,c)=>{var u;ie(u=o,a0,zb).call(u,e,l,r,f=>{s[c]=f})}),i(s);return}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(n))s=n.slice();else{if(n==null||typeof n!="object")throw new Error("invalid tuple value");s=o.map(l=>{if(!l.name)throw new Error("cannot use object value with unnamed components");if(!(l.name in n))throw new Error(`missing value for component ${l.name}`);return n[l.name]})}if(s.length!==this.components.length)throw new Error("array is wrong length");s.forEach((l,c)=>{var u;ie(u=o[c],a0,zb).call(u,e,l,r,f=>{s[c]=f})}),i(s);return}const a=r(this.type,n);a.then?e.push(async function(){i(await a)}()):i(a)},Oi),Q2=class i3{constructor(e,n,r){R(this,"type");R(this,"inputs");D2(e,kn,"Fragment"),r=Object.freeze(r.slice()),gt(this,{type:n,inputs:r})}static from(e){if(typeof e=="string"){try{i3.from(JSON.parse(e))}catch{}return i3.from(ou(e))}if(e instanceof Rl)switch(e.peekKeyword(kL)){case"constructor":return Gb.from(e);case"error":return ks.from(e);case"event":return Hb.from(e);case"fallback":case"receive":return pk.from(e);case"function":return Vb.from(e);case"struct":return H6.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Gb.from(e);case"error":return ks.from(e);case"event":return Hb.from(e);case"fallback":case"receive":return pk.from(e);case"function":return Vb.from(e);case"struct":return H6.from(e)}ye(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}K(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Gb.isFragment(e)}static isError(e){return ks.isFragment(e)}static isEvent(e){return Hb.isFragment(e)}static isFunction(e){return Vb.isFragment(e)}static isStruct(e){return H6.isFragment(e)}},K2=class extends Q2{constructor(n,r,i,a){super(n,r,a);R(this,"name");K(typeof i=="string"&&i.match(NL),"invalid identifier","name",i),a=Object.freeze(a.slice()),gt(this,{name:i})}};function f1(t,e){return"("+e.map(n=>n.format(t)).join(t==="full"?", ":",")+")"}let ks=class ty extends K2{constructor(e,n,r){super(e,"error",n,r),Object.defineProperty(this,$i,{value:lk})}get selector(){return rh(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(e)))});const n=[];return e!=="sighash"&&n.push("error"),n.push(this.name+f1(e,this.inputs)),n.join(" ")}static from(e){if(ty.isFragment(e))return e;if(typeof e=="string")return ty.from(ou(e));if(e instanceof Rl){const n=V2("error",e),r=hl(e);return ih(e),new ty(kn,n,r)}return new ty(kn,e.name,e.inputs?e.inputs.map(gi.from):[])}static isFragment(e){return e&&e[$i]===lk}},Hb=class Dh extends K2{constructor(n,r,i,a){super(n,"event",r,i);R(this,"anonymous");Object.defineProperty(this,$i,{value:ck}),gt(this,{anonymous:a})}get topicHash(){return rh(this.format("sighash"))}format(n){if(n==null&&(n="sighash"),n==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("event"),r.push(this.name+f1(n,this.inputs)),n!=="sighash"&&this.anonymous&&r.push("anonymous"),r.join(" ")}static getTopicHash(n,r){return r=(r||[]).map(a=>gi.from(a)),new Dh(kn,n,r,!1).topicHash}static from(n){if(Dh.isFragment(n))return n;if(typeof n=="string")try{return Dh.from(ou(n))}catch{K(!1,"invalid event fragment","obj",n)}else if(n instanceof Rl){const r=V2("event",n),i=hl(n,!0),a=!!El(n,ci(["anonymous"])).has("anonymous");return ih(n),new Dh(kn,r,i,a)}return new Dh(kn,n.name,n.inputs?n.inputs.map(r=>gi.from(r,!0)):[],!!n.anonymous)}static isFragment(n){return n&&n[$i]===ck}},Gb=class ny extends Q2{constructor(n,r,i,a,o){super(n,r,i);R(this,"payable");R(this,"gas");Object.defineProperty(this,$i,{value:uk}),gt(this,{payable:a,gas:o})}format(n){if(ye(n!=null&&n!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),n==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[`constructor${f1(n,this.inputs)}`];return this.payable&&r.push("payable"),this.gas!=null&&r.push(`@${this.gas.toString()}`),r.join(" ")}static from(n){if(ny.isFragment(n))return n;if(typeof n=="string")try{return ny.from(ou(n))}catch{K(!1,"invalid constuctor fragment","obj",n)}else if(n instanceof Rl){El(n,ci(["constructor"]));const r=hl(n),i=!!El(n,QZ).has("payable"),a=ML(n);return ih(n),new ny(kn,"constructor",r,i,a)}return new ny(kn,"constructor",n.inputs?n.inputs.map(gi.from):[],!!n.payable,n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[$i]===uk}},pk=class Eu extends Q2{constructor(n,r,i){super(n,"fallback",r);R(this,"payable");Object.defineProperty(this,$i,{value:fk}),gt(this,{payable:i})}format(n){const r=this.inputs.length===0?"receive":"fallback";if(n==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:r,stateMutability:i})}return`${r}()${this.payable?" payable":""}`}static from(n){if(Eu.isFragment(n))return n;if(typeof n=="string")try{return Eu.from(ou(n))}catch{K(!1,"invalid fallback fragment","obj",n)}else if(n instanceof Rl){const r=n.toString(),i=n.peekKeyword(ci(["fallback","receive"]));if(K(i,"type must be fallback or receive","obj",r),n.popKeyword(ci(["fallback","receive"]))==="receive"){const l=hl(n);return K(l.length===0,"receive cannot have arguments","obj.inputs",l),El(n,ci(["payable"])),ih(n),new Eu(kn,[],!0)}let o=hl(n);o.length?K(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(l=>l.format("minimal")).join(", ")):o=[gi.from("bytes")];const s=RL(n);if(K(s==="nonpayable"||s==="payable","fallback cannot be constants","obj.stateMutability",s),El(n,ci(["returns"])).has("returns")){const l=hl(n);K(l.length===1&&l[0].type==="bytes","invalid fallback outputs","obj.outputs",l.map(c=>c.format("minimal")).join(", "))}return ih(n),new Eu(kn,o,s==="payable")}if(n.type==="receive")return new Eu(kn,[],!0);if(n.type==="fallback"){const r=[gi.from("bytes")],i=n.stateMutability==="payable";return new Eu(kn,r,i)}K(!1,"invalid fallback description","obj",n)}static isFragment(n){return n&&n[$i]===fk}},Vb=class Lh extends K2{constructor(n,r,i,a,o,s){super(n,"function",r,a);R(this,"constant");R(this,"outputs");R(this,"stateMutability");R(this,"payable");R(this,"gas");Object.defineProperty(this,$i,{value:hk}),o=Object.freeze(o.slice()),gt(this,{constant:i==="view"||i==="pure",gas:s,outputs:o,payable:i==="payable",stateMutability:i})}get selector(){return rh(this.format("sighash")).substring(0,10)}format(n){if(n==null&&(n="sighash"),n==="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!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n))),outputs:this.outputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("function"),r.push(this.name+f1(n,this.inputs)),n!=="sighash"&&(this.stateMutability!=="nonpayable"&&r.push(this.stateMutability),this.outputs&&this.outputs.length&&(r.push("returns"),r.push(f1(n,this.outputs))),this.gas!=null&&r.push(`@${this.gas.toString()}`)),r.join(" ")}static getSelector(n,r){return r=(r||[]).map(a=>gi.from(a)),new Lh(kn,n,"view",r,[],null).selector}static from(n){if(Lh.isFragment(n))return n;if(typeof n=="string")try{return Lh.from(ou(n))}catch{K(!1,"invalid function fragment","obj",n)}else if(n instanceof Rl){const i=V2("function",n),a=hl(n),o=RL(n);let s=[];El(n,ci(["returns"])).has("returns")&&(s=hl(n));const l=ML(n);return ih(n),new Lh(kn,i,o,a,s,l)}let r=n.stateMutability;return r==null&&(r="payable",typeof n.constant=="boolean"?(r="view",n.constant||(r="payable",typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable"))):typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable")),new Lh(kn,n.name,r,n.inputs?n.inputs.map(gi.from):[],n.outputs?n.outputs.map(gi.from):[],n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[$i]===hk}},H6=class Qb extends K2{constructor(e,n,r){super(e,"struct",n,r),Object.defineProperty(this,$i,{value:dk})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return Qb.from(ou(e))}catch{K(!1,"invalid struct fragment","obj",e)}else if(e instanceof Rl){const n=V2("struct",e),r=hl(e);return ih(e),new Qb(kn,n,r)}return new Qb(kn,e.name,e.inputs?e.inputs.map(gi.from):[])}static isFragment(e){return e&&e[$i]===dk}};const ko=new Map;ko.set(0,"GENERIC_PANIC");ko.set(1,"ASSERT_FALSE");ko.set(17,"OVERFLOW");ko.set(18,"DIVIDE_BY_ZERO");ko.set(33,"ENUM_RANGE_ERROR");ko.set(34,"BAD_STORAGE_DATA");ko.set(49,"STACK_UNDERFLOW");ko.set(50,"ARRAY_RANGE_ERROR");ko.set(65,"OUT_OF_MEMORY");ko.set(81,"UNINITIALIZED_FUNCTION_CALL");const rq=new RegExp(/^bytes([0-9]*)$/),iq=new RegExp(/^(u?int)([0-9]*)$/);let G6=null,gk=1024;function aq(t,e,n,r){let i="missing revert data",a=null;const o=null;let s=null;if(n){i="execution reverted";const c=Jt(n);if(n=it(n),c.length===0)i+=" (no data present; likely require(false) occurred",a="require(false)";else if(c.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(it(c.slice(0,4))==="0x08c379a0")try{a=r.decode(["string"],c.slice(4))[0],s={signature:"Error(string)",name:"Error",args:[a]},i+=`: ${JSON.stringify(a)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(it(c.slice(0,4))==="0x4e487b71")try{const u=Number(r.decode(["uint256"],c.slice(4))[0]);s={signature:"Panic(uint256)",name:"Panic",args:[u]},a=`Panic due to ${ko.get(u)||"UNKNOWN"}(${u})`,i+=`: ${a}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const l={to:e.to?fn(e.to):null,data:e.data||"0x"};return e.from&&(l.from=fn(e.from)),Zn(i,"CALL_EXCEPTION",{action:t,data:n,reason:a,transaction:l,invocation:o,revert:s})}var ac,$h,eg;let a3=(eg=class{constructor(){M(this,ac)}getDefaultValue(e){const n=e.map(i=>ie(this,ac,$h).call(this,gi.from(i)));return new Kv(n,"_").defaultValue()}encode(e,n){fD(n.length,e.length,"types/values length mismatch");const r=e.map(o=>ie(this,ac,$h).call(this,gi.from(o))),i=new Kv(r,"_"),a=new G5;return i.encode(a,n),a.data}decode(e,n,r){const i=e.map(o=>ie(this,ac,$h).call(this,gi.from(o)));return new Kv(i,"_").decode(new iY(n,r,gk))}static _setDefaultMaxInflation(e){K(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),gk=e}static defaultAbiCoder(){return G6==null&&(G6=new eg),G6}static getBuiltinCallException(e,n,r){return aq(e,n,r,eg.defaultAbiCoder())}},ac=new WeakSet,$h=function(e){if(e.isArray())return new IX(ie(this,ac,$h).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new Kv(e.components.map(r=>ie(this,ac,$h).call(this,r)),e.name);switch(e.baseType){case"address":return new _X(e.name);case"bool":return new RX(e.name);case"string":return new zX(e.name);case"bytes":return new MX(e.name);case"":return new LX(e.name)}let n=e.type.match(iq);if(n){let r=parseInt(n[2]||"256");return K(r!==0&&r<=256&&r%8===0,"invalid "+n[1]+" bit length","param",e),new jX(r/8,n[1]==="int",e.name)}if(n=e.type.match(rq),n){let r=parseInt(n[1]);return K(r!==0&&r<=32,"invalid bytes length","param",e),new BX(r,e.name)}K(!1,"invalid type","type",e.type)},eg),oq=class{constructor(e,n,r){R(this,"fragment");R(this,"name");R(this,"signature");R(this,"topic");R(this,"args");const i=e.name,a=e.format();gt(this,{fragment:e,name:i,signature:a,topic:n,args:r})}},sq=class{constructor(e,n,r,i){R(this,"fragment");R(this,"name");R(this,"args");R(this,"signature");R(this,"selector");R(this,"value");const a=e.name,o=e.format();gt(this,{fragment:e,name:a,args:r,signature:o,selector:n,value:i})}},lq=class{constructor(e,n,r){R(this,"fragment");R(this,"name");R(this,"args");R(this,"signature");R(this,"selector");const i=e.name,a=e.format();gt(this,{fragment:e,name:i,args:r,signature:a,selector:n})}},yk=class{constructor(e){R(this,"hash");R(this,"_isIndexed");gt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}};const mk={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},vk={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&mk[t.toString()]&&(e=mk[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var Uo,Fo,jo,Dr,o0,Kb,s0,Wb,$c;let zP=($c=class{constructor(e){M(this,o0);M(this,s0);R(this,"fragments");R(this,"deploy");R(this,"fallback");R(this,"receive");M(this,Uo,void 0);M(this,Fo,void 0);M(this,jo,void 0);M(this,Dr,void 0);let n=[];typeof e=="string"?n=JSON.parse(e):n=e,O(this,jo,new Map),O(this,Uo,new Map),O(this,Fo,new Map);const r=[];for(const o of n)try{r.push(Q2.from(o))}catch(s){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,s.message)}gt(this,{fragments:Object.freeze(r)});let i=null,a=!1;O(this,Dr,this.getAbiCoder()),this.fragments.forEach((o,s)=>{let l;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}gt(this,{deploy:o});return;case"fallback":o.inputs.length===0?a=!0:(K(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${s}]`,o),i=o,a=i.payable);return;case"function":l=v(this,jo);break;case"event":l=v(this,Fo);break;case"error":l=v(this,Uo);break;default:return}const c=o.format();l.has(c)||l.set(c,o)}),this.deploy||gt(this,{deploy:Gb.from("constructor()")}),gt(this,{fallback:i,receive:a})}format(e){const n=e?"minimal":"full";return this.fragments.map(i=>i.format(n))}formatJson(){const e=this.fragments.map(n=>n.format("json"));return JSON.stringify(e.map(n=>JSON.parse(n)))}getAbiCoder(){return a3.defaultAbiCoder()}getFunctionName(e){const n=ie(this,o0,Kb).call(this,e,null,!1);return K(n,"no matching function","key",e),n.name}hasFunction(e){return!!ie(this,o0,Kb).call(this,e,null,!1)}getFunction(e,n){return ie(this,o0,Kb).call(this,e,n||null,!0)}forEachFunction(e){const n=Array.from(v(this,jo).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;rr.localeCompare(i));for(let r=0;r1){const a=i.map(o=>JSON.stringify(o.format())).join(", ");K(!1,`ambiguous error description (i.e. ${a})`,"name",e)}return i[0]}if(e=ks.from(e).format(),e==="Error(string)")return ks.from("error Error(string)");if(e==="Panic(uint256)")return ks.from("error Panic(uint256)");const r=v(this,Uo).get(e);return r||null}forEachError(e){const n=Array.from(v(this,Uo).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;ra.type==="string"?rh(o):a.type==="bytes"?Sn(it(o)):(a.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":a.type.match(/^u?int/)?o=us(o):a.type.match(/^bytes/)?o=$J(o,32):a.type==="address"&&v(this,Dr).encode(["address"],[o]),th(it(o),32));for(n.forEach((a,o)=>{const s=e.inputs[o];if(!s.indexed){K(a==null,"cannot filter non-indexed parameters; must be null","contract."+s.name,a);return}a==null?r.push(null):s.baseType==="array"||s.baseType==="tuple"?K(!1,"filtering with tuples or arrays not supported","contract."+s.name,a):Array.isArray(a)?r.push(a.map(l=>i(s,l))):r.push(i(s,a))});r.length&&r[r.length-1]===null;)r.pop();return r}encodeEventLog(e,n){if(typeof e=="string"){const o=this.getEvent(e);K(o,"unknown event","eventFragment",e),e=o}const r=[],i=[],a=[];return e.anonymous||r.push(e.topicHash),K(n.length===e.inputs.length,"event arguments/values mismatch","values",n),e.inputs.forEach((o,s)=>{const l=n[s];if(o.indexed)if(o.type==="string")r.push(rh(l));else if(o.type==="bytes")r.push(Sn(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");r.push(v(this,Dr).encode([o.type],[l]))}else i.push(o),a.push(l)}),{data:v(this,Dr).encode(i,a),topics:r}}decodeEventLog(e,n,r){if(typeof e=="string"){const d=this.getEvent(e);K(d,"unknown event","eventFragment",e),e=d}if(r!=null&&!e.anonymous){const d=e.topicHash;K(gn(r[0],32)&&r[0].toLowerCase()===d,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const i=[],a=[],o=[];e.inputs.forEach((d,g)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(gi.from({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(a.push(d),o.push(!1))});const s=r!=null?v(this,Dr).decode(i,Xn(r)):null,l=v(this,Dr).decode(a,n,!0),c=[],u=[];let f=0,h=0;return e.inputs.forEach((d,g)=>{let p=null;if(d.indexed)if(s==null)p=new yk(null);else if(o[g])p=new yk(s[h++]);else try{p=s[h++]}catch(y){p=y}else try{p=l[f++]}catch(y){p=y}c.push(p),u.push(d.name||null)}),ED.fromItems(c,u)}parseTransaction(e){const n=Jt(e.data,"tx.data"),r=et(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(it(n.slice(0,4)));if(!i)return null;const a=v(this,Dr).decode(i.inputs,n.slice(4));return new sq(i,i.selector,a,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const n=this.getEvent(e.topics[0]);return!n||n.anonymous?null:new oq(n,n.topicHash,this.decodeEventLog(n,e.data,e.topics))}parseError(e){const n=it(e),r=this.getError(Un(n,0,4));if(!r)return null;const i=v(this,Dr).decode(r.inputs,Un(n,4));return new lq(r,r.selector,i)}static from(e){return e instanceof $c?e:typeof e=="string"?new $c(JSON.parse(e)):typeof e.format=="function"?new $c(e.format("json")):new $c(e)}},Uo=new WeakMap,Fo=new WeakMap,jo=new WeakMap,Dr=new WeakMap,o0=new WeakSet,Kb=function(e,n,r){if(gn(e)){const a=e.toLowerCase();for(const o of v(this,jo).values())if(a===o.selector)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of v(this,jo))o.split("(")[0]===e&&a.push(s);if(n){const o=n.length>0?n[n.length-1]:null;let s=n.length,l=!0;Di.isTyped(o)&&o.type==="overrides"&&(l=!1,s--);for(let c=a.length-1;c>=0;c--){const u=a[c].inputs.length;u!==s&&(!l||u!==s-1)&&a.splice(c,1)}for(let c=a.length-1;c>=0;c--){const u=a[c].inputs;for(let f=0;f=u.length){if(n[f].type==="overrides")continue;a.splice(c,1);break}if(n[f].type!==u[f].baseType){a.splice(c,1);break}}}}if(a.length===1&&n&&n.length!==a[0].inputs.length){const o=n[n.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&a.splice(0,1)}if(a.length===0)return null;if(a.length>1&&r){const o=a.map(s=>JSON.stringify(s.format())).join(", ");K(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return a[0]}const i=v(this,jo).get(Vb.from(e).format());return i||null},s0=new WeakSet,Wb=function(e,n,r){if(gn(e)){const a=e.toLowerCase();for(const o of v(this,Fo).values())if(a===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of v(this,Fo))o.split("(")[0]===e&&a.push(s);if(n){for(let o=a.length-1;o>=0;o--)a[o].inputs.length=0;o--){const s=a[o].inputs;for(let l=0;l1&&r){const o=a.map(s=>JSON.stringify(s.format())).join(", ");K(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return a[0]}const i=v(this,Fo).get(Hb.from(e).format());return i||null},$c);const BL=BigInt(0);function Oy(t){return t??null}function Kn(t){return t==null?null:t.toString()}let bk=class{constructor(e,n,r){R(this,"gasPrice");R(this,"maxFeePerGas");R(this,"maxPriorityFeePerGas");gt(this,{gasPrice:Oy(e),maxFeePerGas:Oy(n),maxPriorityFeePerGas:Oy(r)})}toJSON(){const{gasPrice:e,maxFeePerGas:n,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:Kn(e),maxFeePerGas:Kn(n),maxPriorityFeePerGas:Kn(r)}}};function Xw(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=it(t.data));const n="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=et(t[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)!(i in t)||t[i]==null||(e[i]=Bt(t[i],`request.${i}`));return t.accessList&&(e.accessList=ph(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),e}var Ls,ZR;let cq=(ZR=class{constructor(e,n){R(this,"provider");R(this,"number");R(this,"hash");R(this,"timestamp");R(this,"parentHash");R(this,"parentBeaconBlockRoot");R(this,"nonce");R(this,"difficulty");R(this,"gasLimit");R(this,"gasUsed");R(this,"stateRoot");R(this,"receiptsRoot");R(this,"blobGasUsed");R(this,"excessBlobGas");R(this,"miner");R(this,"extraData");R(this,"baseFeePerGas");M(this,Ls,void 0);O(this,Ls,e.transactions.map(r=>typeof r!="string"?new HP(r,n):r)),gt(this,{provider:n,hash:Oy(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,extraData:e.extraData,baseFeePerGas:Oy(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return v(this,Ls).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=v(this,Ls).slice();return e.length===0?[]:(ye(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:n,extraData:r,gasLimit:i,gasUsed:a,hash:o,miner:s,nonce:l,number:c,parentHash:u,parentBeaconBlockRoot:f,stateRoot:h,receiptsRoot:d,timestamp:g,transactions:p}=this;return{_type:"Block",baseFeePerGas:Kn(e),difficulty:Kn(n),extraData:r,gasLimit:Kn(i),gasUsed:Kn(a),blobGasUsed:Kn(this.blobGasUsed),excessBlobGas:Kn(this.excessBlobGas),hash:o,miner:s,nonce:l,number:c,parentHash:u,timestamp:g,parentBeaconBlockRoot:f,stateRoot:h,receiptsRoot:d,transactions:p}}[Symbol.iterator](){let e=0;const n=this.transactions;return{next:()=>enew av(i,n))));let r=BL;e.effectiveGasPrice!=null?r=e.effectiveGasPrice:e.gasPrice!=null&&(r=e.gasPrice),gt(this,{provider:n,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:r,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return v(this,ym)}toJSON(){const{to:e,from:n,contractAddress:r,hash:i,index:a,blockHash:o,blockNumber:s,logsBloom:l,logs:c,status:u,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:s,contractAddress:r,cumulativeGasUsed:Kn(this.cumulativeGasUsed),from:n,gasPrice:Kn(this.gasPrice),blobGasUsed:Kn(this.blobGasUsed),blobGasPrice:Kn(this.blobGasPrice),gasUsed:Kn(this.gasUsed),hash:i,index:a,logs:c,logsBloom:l,root:f,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(s)return null;const{blockNumber:h,nonce:d}=await ti({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(d{if(h==null||h.status!==0)return h;ye(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:h.to,from:h.from,data:""},receipt:h})},u=await this.provider.getTransactionReceipt(this.hash);if(r===0)return c(u);if(u){if(await u.confirmations()>=r)return c(u)}else if(await l(),r===0)return null;return await new Promise((h,d)=>{const g=[],p=()=>{g.forEach(m=>m())};if(g.push(()=>{s=!0}),i>0){const m=setTimeout(()=>{p(),d(Zn("wait for transaction timeout","TIMEOUT"))},i);g.push(()=>{clearTimeout(m)})}const y=async m=>{if(await m.confirmations()>=r){p();try{h(c(m))}catch(b){d(b)}}};if(g.push(()=>{this.provider.off(this.hash,y)}),this.provider.on(this.hash,y),a>=0){const m=async()=>{try{await l()}catch(b){if(Qr(b,"TRANSACTION_REPLACED")){p(),d(b);return}}s||this.provider.once("block",m)};g.push(()=>{this.provider.off("block",m)}),this.provider.once("block",m)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return ye(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),$L(this)}reorderedEvent(e){return ye(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ye(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),LL(this,e)}replaceableTransaction(e){K(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const n=new mm(this,this.provider);return O(n,oc,e),n}},oc=new WeakMap,mm);function uq(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function LL(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function $L(t){return{orphan:"drop-transaction",tx:t}}function fq(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}let GP=class extends av{constructor(n,r,i){super(n,n.provider);R(this,"interface");R(this,"fragment");R(this,"args");const a=r.decodeEventLog(i,n.data,n.topics);gt(this,{args:a,fragment:i,interface:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}},UL=class extends av{constructor(n,r){super(n,n.provider);R(this,"error");gt(this,{error:r})}};var l0,eM;let hq=(eM=class extends DL{constructor(n,r,i){super(i,r);M(this,l0,void 0);O(this,l0,n)}get logs(){return super.logs.map(n=>{const r=n.topics.length?v(this,l0).getEvent(n.topics[0]):null;if(r)try{return new GP(n,v(this,l0),r)}catch(i){return new UL(n,i)}return n})}},l0=new WeakMap,eM);var vm,tM;let VP=(tM=class extends HP{constructor(n,r,i){super(i,r);M(this,vm,void 0);O(this,vm,n)}async wait(n,r){const i=await super.wait(n,r);return i==null?null:new hq(v(this,vm),this.provider,i)}},vm=new WeakMap,tM),FL=class extends gD{constructor(n,r,i,a){super(n,r,i);R(this,"log");gt(this,{log:a})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}},dq=class extends FL{constructor(e,n,r,i,a){super(e,n,r,new GP(a,e.interface,i));const o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);gt(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}};const wk=BigInt(0);function jL(t){return t&&typeof t.call=="function"}function zL(t){return t&&typeof t.estimateGas=="function"}function W2(t){return t&&typeof t.resolveName=="function"}function HL(t){return t&&typeof t.sendTransaction=="function"}function GL(t){if(t!=null){if(W2(t))return t;if(t.provider)return t.provider}}var bm,nM;let pq=(nM=class{constructor(e,n,r){M(this,bm,void 0);R(this,"fragment");if(gt(this,{fragment:n}),n.inputs.lengthr[l]==null?null:s.walkAsync(r[l],(u,f)=>u==="address"?Array.isArray(f)?Promise.all(f.map(h=>li(h,a))):li(f,a):f)));return e.interface.encodeFilterTopics(n,o)}())}getTopicFilter(){return v(this,bm)}},bm=new WeakMap,nM);function ah(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function $u(t){return t==null?null:t.provider||null}async function QP(t,e){const n=Di.dereference(t,"overrides");K(typeof n=="object","invalid overrides parameter","overrides",t);const r=Xw(n);return K(r.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),K(r.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=r.from),r}async function VL(t,e,n){const r=ah(t,"resolveName"),i=W2(r)?r:null;return await Promise.all(e.map((a,o)=>a.walkAsync(n[o],(s,l)=>(l=Di.dereference(l,s),s==="address"?li(l,i):l))))}function gq(t){const e=async function(o){const s=await QP(o,["data"]);s.to=await t.getAddress(),s.from&&(s.from=await li(s.from,GL(t.runner)));const l=t.interface,c=et(s.value||wk,"overrides.value")===wk,u=(s.data||"0x")==="0x";l.fallback&&!l.fallback.payable&&l.receive&&!u&&!c&&K(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),K(l.fallback||u,"cannot send data to receive-only contract","overrides.data",s.data);const f=l.receive||l.fallback&&l.fallback.payable;return K(f||c,"cannot send value to non-payable fallback","overrides.value",s.value),K(l.fallback||u,"cannot send data to receive-only contract","overrides.data",s.data),s},n=async function(o){const s=ah(t.runner,"call");ye(jL(s),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const l=await e(o);try{return await s.call(l)}catch(c){throw EP(c)&&c.data?t.interface.makeError(c.data,l):c}},r=async function(o){const s=t.runner;ye(HL(s),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const l=await s.sendTransaction(await e(o)),c=$u(t.runner);return new VP(t.interface,c,l)},i=async function(o){const s=ah(t.runner,"estimateGas");return ye(zL(s),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await s.estimateGas(await e(o))},a=async o=>await r(o);return gt(a,{_contract:t,estimateGas:i,populateTransaction:e,send:r,staticCall:n}),a}function yq(t,e){const n=function(...c){const u=t.interface.getFunction(e,c);return ye(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:c}}),u},r=async function(...c){const u=n(...c);let f={};if(u.inputs.length+1===c.length&&(f=await QP(c.pop()),f.from&&(f.from=await li(f.from,GL(t.runner)))),u.inputs.length!==c.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const h=await VL(t.runner,u.inputs,c);return Object.assign({},f,await ti({to:t.getAddress(),data:t.interface.encodeFunctionData(u,h)}))},i=async function(...c){const u=await s(...c);return u.length===1?u[0]:u},a=async function(...c){const u=t.runner;ye(HL(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await u.sendTransaction(await r(...c)),h=$u(t.runner);return new VP(t.interface,h,f)},o=async function(...c){const u=ah(t.runner,"estimateGas");return ye(zL(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await r(...c))},s=async function(...c){const u=ah(t.runner,"call");ye(jL(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await r(...c);let h="0x";try{h=await u.call(f)}catch(g){throw EP(g)&&g.data?t.interface.makeError(g.data,f):g}const d=n(...c);return t.interface.decodeFunctionResult(d,h)},l=async(...c)=>n(...c).constant?await i(...c):await a(...c);return gt(l,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:n,estimateGas:o,populateTransaction:r,send:a,staticCall:i,staticCallResult:s}),Object.defineProperty(l,"fragment",{configurable:!1,enumerable:!0,get:()=>{const c=t.interface.getFunction(e);return ye(c,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),c}}),l}function mq(t,e){const n=function(...i){const a=t.interface.getEvent(e,i);return ye(a,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),a},r=function(...i){return new pq(t,n(...i),i)};return gt(r,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:n}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=t.interface.getEvent(e);return ye(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),r}const Zw=Symbol.for("_ethersInternal_contract"),QL=new WeakMap;function vq(t,e){QL.set(t[Zw],e)}function Qi(t){return QL.get(t[Zw])}function bq(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function KP(t,e){let n,r=null;if(Array.isArray(e)){const a=function(o){if(gn(o,32))return o;const s=t.interface.getEvent(o);return K(s,"unknown fragment","name",o),s.topicHash};n=e.map(o=>o==null?null:Array.isArray(o)?o.map(a):a(o))}else e==="*"?n=[null]:typeof e=="string"?gn(e,32)?n=[e]:(r=t.interface.getEvent(e),K(r,"unknown fragment","event",e),n=[r.topicHash]):bq(e)?n=await e.getTopicFilter():"fragment"in e?(r=e.fragment,n=[r.topicHash]):K(!1,"unknown event name","event",e);n=n.map(a=>{if(a==null)return null;if(Array.isArray(a)){const o=Array.from(new Set(a.map(s=>s.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return a.toLowerCase()});const i=n.map(a=>a==null?"null":Array.isArray(a)?a.join("|"):a).join("&");return{fragment:r,tag:i,topics:n}}async function ry(t,e){const{subs:n}=Qi(t);return n.get((await KP(t,e)).tag)||null}async function xk(t,e,n){const r=$u(t.runner);ye(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:a,topics:o}=await KP(t,n),{addr:s,subs:l}=Qi(t);let c=l.get(a);if(!c){const f={address:s||t,topics:o},h=y=>{let m=i;if(m==null)try{m=t.interface.getEvent(y.topics[0])}catch{}if(m){const b=m,x=i?t.interface.decodeEventLog(i,y.data,y.topics):[];s3(t,n,x,A=>new dq(t,A,n,b,y))}else s3(t,n,[],b=>new FL(t,b,n,y))};let d=[];c={tag:a,listeners:[],start:()=>{d.length||d.push(r.on(f,h))},stop:async()=>{if(d.length==0)return;let y=d;d=[],await Promise.all(y),r.off(f,h)}},l.set(a,c)}return c}let o3=Promise.resolve();async function wq(t,e,n,r){await o3;const i=await ry(t,e);if(!i)return!1;const a=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:s})=>{const l=Array.from(n);r&&l.push(r(s?null:o));try{o.call(t,...l)}catch{}return!s}),i.listeners.length===0&&(i.stop(),Qi(t).subs.delete(i.tag)),a>0}async function s3(t,e,n,r){try{await o3}catch{}const i=wq(t,e,n,r);return o3=i,await i}const Jv=["then"];var mPe,Wf;let l3=(Wf=class{constructor(e,n,r,i){R(this,"target");R(this,"interface");R(this,"runner");R(this,"filters");R(this,mPe);R(this,"fallback");K(typeof e=="string"||XD(e),"invalid value for Contract target","target",e),r==null&&(r=null);const a=zP.from(n);gt(this,{target:e,runner:r,interface:a}),Object.defineProperty(this,Zw,{value:{}});let o,s=null,l=null;if(i){const f=$u(r);l=new VP(this.interface,f,i)}let c=new Map;if(typeof e=="string")if(gn(e))s=e,o=Promise.resolve(e);else{const f=ah(r,"resolveName");if(!W2(f))throw Zn("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=f.resolveName(e).then(h=>{if(h==null)throw Zn("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Qi(this).addr=h,h})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return Qi(this).addr=f,f});vq(this,{addrPromise:o,addr:s,deployTx:l,subs:c});const u=new Proxy({},{get:(f,h,d)=>{if(typeof h=="symbol"||Jv.indexOf(h)>=0)return Reflect.get(f,h,d);try{return this.getEvent(h)}catch(g){if(!Qr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(f,h)=>Jv.indexOf(h)>=0?Reflect.has(f,h):Reflect.has(f,h)||this.interface.hasEvent(String(h))});return gt(this,{filters:u}),gt(this,{fallback:a.receive||a.fallback?gq(this):null}),new Proxy(this,{get:(f,h,d)=>{if(typeof h=="symbol"||h in f||Jv.indexOf(h)>=0)return Reflect.get(f,h,d);try{return f.getFunction(h)}catch(g){if(!Qr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(f,h)=>typeof h=="symbol"||h in f||Jv.indexOf(h)>=0?Reflect.has(f,h):f.interface.hasFunction(h)})}connect(e){return new Wf(this.target,this.interface,e)}attach(e){return new Wf(e,this.interface,this.runner)}async getAddress(){return await Qi(this).addrPromise}async getDeployedCode(){const e=$u(this.runner);ye(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const n=await e.getCode(await this.getAddress());return n==="0x"?null:n}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=$u(this.runner);return ye(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,a)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);r.once("block",o)}catch(s){a(s)}};o()})}deploymentTransaction(){return Qi(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),yq(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),mq(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,n,r){n==null&&(n=0),r==null&&(r="latest");const{addr:i,addrPromise:a}=Qi(this),o=i||await a,{fragment:s,topics:l}=await KP(this,e),c={address:o,topics:l,fromBlock:n,toBlock:r},u=$u(this.runner);return ye(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(c)).map(f=>{let h=s;if(h==null)try{h=this.interface.getEvent(f.topics[0])}catch{}if(h)try{return new GP(f,this.interface,h)}catch(d){return new UL(f,d)}return new av(f,u)})}async on(e,n){const r=await xk(this,"on",e);return r.listeners.push({listener:n,once:!1}),r.start(),this}async once(e,n){const r=await xk(this,"once",e);return r.listeners.push({listener:n,once:!0}),r.start(),this}async emit(e,...n){return await s3(this,e,n,null)}async listenerCount(e){if(e){const i=await ry(this,e);return i?i.listeners.length:0}const{subs:n}=Qi(this);let r=0;for(const{listeners:i}of n.values())r+=i.length;return r}async listeners(e){if(e){const i=await ry(this,e);return i?i.listeners.map(({listener:a})=>a):[]}const{subs:n}=Qi(this);let r=[];for(const{listeners:i}of n.values())r=r.concat(i.map(({listener:a})=>a));return r}async off(e,n){const r=await ry(this,e);if(!r)return this;if(n){const i=r.listeners.map(({listener:a})=>a).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(n==null||r.listeners.length===0)&&(r.stop(),Qi(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){const n=await ry(this,e);if(!n)return this;n.stop(),Qi(this).subs.delete(n.tag)}else{const{subs:n}=Qi(this);for(const{tag:r,stop:i}of n.values())i(),n.delete(r)}return this}async addListener(e,n){return await this.on(e,n)}async removeListener(e,n){return await this.off(e,n)}static buildClass(e){class n extends Wf{constructor(i,a=null){super(i,e,a)}}return n}static from(e,n,r){return r==null&&(r=null),new this(e,n,r)}},mPe=Zw,Wf);function xq(){return l3}let _d=class extends xq(){};class WP{constructor(e,n,r){R(this,"interface");R(this,"bytecode");R(this,"runner");const i=zP.from(e);n instanceof Uint8Array||(typeof n=="object"&&(n=n.object),n.startsWith("0x")||(n="0x"+n)),n=it(Jt(n)),gt(this,{bytecode:n,interface:i,runner:r||null})}attach(e){return new l3(e,this.interface,this.runner)}async getDeployTransaction(...e){let n={};const r=this.interface.deploy;if(r.inputs.length+1===e.length&&(n=await QP(e.pop())),r.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const i=await VL(this.runner,r.inputs,e),a=Xn([this.bytecode,this.interface.encodeDeploy(i)]);return Object.assign({},n,{data:a})}async deploy(...e){const n=await this.getDeployTransaction(...e);ye(this.runner&&typeof this.runner.sendTransaction=="function","factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const r=await this.runner.sendTransaction(n),i=YD(r);return new l3(i,this.interface,this.runner,r)}connect(e){return new WP(this.interface,this.bytecode,e)}static fromSolidity(e,n){K(e!=null,"bad compiler output","output",e),typeof e=="string"&&(e=JSON.parse(e));const r=e.abi;let i="";return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(r,i,n)}}function V6(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):K(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}let Aq=class{constructor(e){R(this,"name");gt(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,n){throw new Error("unsupported coin")}async decodeAddress(e,n){throw new Error("unsupported coin")}};const KL=new RegExp("^(ipfs)://(.*)$","i"),Ak=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),KL,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var sc,af,lc,Uh,o2,Xc,WL;let Ek=(Xc=class{constructor(e,n,r){M(this,lc);R(this,"provider");R(this,"address");R(this,"name");M(this,sc,void 0);M(this,af,void 0);gt(this,{provider:e,address:n,name:r}),O(this,sc,null),O(this,af,new _d(n,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return v(this,sc)==null&&O(this,sc,(async()=>{try{return await v(this,af).supportsInterface("0x9061b923")}catch(e){if(Qr(e,"CALL_EXCEPTION"))return!1;throw O(this,sc,null),e}})()),await v(this,sc)}async getAddress(e){if(e==null&&(e=60),e===60)try{const a=await ie(this,lc,Uh).call(this,"addr(bytes32)");return a==null||a===o1?null:a}catch(a){if(Qr(a,"CALL_EXCEPTION"))return null;throw a}if(e>=0&&e<2147483648){let a=e+2147483648;const o=await ie(this,lc,Uh).call(this,"addr(bytes32,uint)",[a]);if(gn(o,20))return fn(o)}let n=null;for(const a of this.provider.plugins)if(a instanceof Aq&&a.supportsCoinType(e)){n=a;break}if(n==null)return null;const r=await ie(this,lc,Uh).call(this,"addr(bytes32,uint)",[e]);if(r==null||r==="0x")return null;const i=await n.decodeAddress(e,r);if(i!=null)return i;ye(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:r}})}async getText(e){const n=await ie(this,lc,Uh).call(this,"text(bytes32,string)",[e]);return n==null||n==="0x"?null:n}async getContentHash(){const e=await ie(this,lc,Uh).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const n=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(n){const i=n[1]==="e3010170"?"ipfs":"ipns",a=parseInt(n[4],16);if(n[5].length===a*2)return`${i}://${jJ("0x"+n[2])}`}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&r[1].length===64)return`bzz://${r[1]}`;ye(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const n=await this.getText("avatar");if(n==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:n});for(let r=0;r{if(e&&n==null)return null;if(!Array.isArray(n))throw new Error("not an array");return n.map(r=>t(r))}}function ov(t,e){return n=>{const r={};for(const i in t){let a=i;if(e&&i in e&&!(a in n)){for(const o of e[i])if(o in n){a=o;break}}try{const o=t[i](n[a]);o!==void 0&&(r[i]=o)}catch(o){const s=o instanceof Error?o.message:"not-an-error";ye(!1,`invalid value for value.${i} (${s})`,"BAD_DATA",{value:n})}}return r}}function Eq(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}K(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Pp(t){return K(gn(t,!0),"invalid data","value",t),t}function Vr(t){return K(gn(t,32),"invalid hash","value",t),t}const Sq=ov({address:fn,blockHash:Vr,blockNumber:Bt,data:Pp,index:Bt,removed:Kt(Eq,!1),topics:J2(Vr),transactionHash:Vr,transactionIndex:Bt},{index:["logIndex"]});function Pq(t){return Sq(t)}const Oq=ov({hash:Kt(Vr),parentHash:Vr,parentBeaconBlockRoot:Kt(Vr,null),number:Bt,timestamp:Bt,nonce:Kt(Pp),difficulty:et,gasLimit:et,gasUsed:et,stateRoot:Kt(Vr,null),receiptsRoot:Kt(Vr,null),blobGasUsed:Kt(et,null),excessBlobGas:Kt(et,null),miner:Kt(fn),extraData:Pp,baseFeePerGas:Kt(et)});function Tq(t){const e=Oq(t);return e.transactions=t.transactions.map(n=>typeof n=="string"?n:JL(n)),e}const Cq=ov({transactionIndex:Bt,blockNumber:Bt,transactionHash:Vr,address:fn,topics:J2(Vr),data:Pp,index:Bt,blockHash:Vr},{index:["logIndex"]});function kq(t){return Cq(t)}const _q=ov({to:Kt(fn,null),from:Kt(fn,null),contractAddress:Kt(fn,null),index:Bt,root:Kt(it),gasUsed:et,blobGasUsed:Kt(et,null),logsBloom:Kt(Pp),blockHash:Vr,hash:Vr,logs:J2(kq),blockNumber:Bt,cumulativeGasUsed:et,effectiveGasPrice:Kt(et),blobGasPrice:Kt(et,null),status:Kt(Bt),type:Kt(Bt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function Nq(t){return _q(t)}function JL(t){t.to&&et(t.to)===Sk&&(t.to="0x0000000000000000000000000000000000000000");const e=ov({hash:Vr,index:Kt(Bt,void 0),type:n=>n==="0x"||n==null?0:Bt(n),accessList:Kt(ph,null),blobVersionedHashes:Kt(J2(Vr,!0),null),blockHash:Kt(Vr,null),blockNumber:Kt(Bt,null),transactionIndex:Kt(Bt,null),from:fn,gasPrice:Kt(et),maxPriorityFeePerGas:Kt(et),maxFeePerGas:Kt(et),maxFeePerBlobGas:Kt(et,null),gasLimit:et,to:Kt(fn,null),value:et,nonce:Bt,data:Pp,creates:Kt(fn,null),chainId:Kt(et,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=YD(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=Al.from(t.signature):e.signature=Al.from(t),e.chainId==null){const n=e.signature.legacyChainId;n!=null&&(e.chainId=n)}return e.blockHash&&et(e.blockHash)===Sk&&(e.blockHash=null),e}const Iq="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";let JP=class YL{constructor(e){R(this,"name");gt(this,{name:e})}clone(){return new YL(this.name)}},XL=class ZL extends JP{constructor(n,r){n==null&&(n=0);super(`org.ethers.network.plugins.GasCost#${n||0}`);R(this,"effectiveBlock");R(this,"txBase");R(this,"txCreate");R(this,"txDataZero");R(this,"txDataNonzero");R(this,"txAccessListStorageKey");R(this,"txAccessListAddress");const i={effectiveBlock:n};function a(o,s){let l=(r||{})[o];l==null&&(l=s),K(typeof l=="number",`invalud value for ${o}`,"costs",r),i[o]=l}a("txBase",21e3),a("txCreate",32e3),a("txDataZero",4),a("txDataNonzero",16),a("txAccessListStorageKey",1900),a("txAccessListAddress",2400),gt(this,i)}clone(){return new ZL(this.effectiveBlock,this)}},qL=class e$ extends JP{constructor(n,r){super("org.ethers.plugins.network.Ens");R(this,"address");R(this,"targetNetwork");gt(this,{address:n||Iq,targetNetwork:r??1})}clone(){return new e$(this.address,this.targetNetwork)}};var wm,xm,rM;let Rq=(rM=class extends JP{constructor(n,r){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");M(this,wm,void 0);M(this,xm,void 0);O(this,wm,n),O(this,xm,r)}get url(){return v(this,wm)}get processFunc(){return v(this,xm)}clone(){return this}},wm=new WeakMap,xm=new WeakMap,rM);const Q6=new Map;var c0,u0,cc,Uc;let Bc=(Uc=class{constructor(e,n){M(this,c0,void 0);M(this,u0,void 0);M(this,cc,void 0);O(this,c0,e),O(this,u0,et(n)),O(this,cc,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return v(this,c0)}set name(e){O(this,c0,e)}get chainId(){return v(this,u0)}set chainId(e){O(this,u0,et(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===et(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===et(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===et(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(v(this,cc).values())}attachPlugin(e){if(v(this,cc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return v(this,cc).set(e.name,e.clone()),this}getPlugin(e){return v(this,cc).get(e)||null}getPlugins(e){return this.plugins.filter(n=>n.name.split("#")[0]===e)}clone(){const e=new Uc(this.name,this.chainId);return this.plugins.forEach(n=>{e.attachPlugin(n.clone())}),e}computeIntrinsicGas(e){const n=this.getPlugin("org.ethers.plugins.network.GasCost")||new XL;let r=n.txBase;if(e.to==null&&(r+=n.txCreate),e.data)for(let i=2;i9){let i=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||i++,r[1]=i.toString()}return BigInt(r[0]+r[1])}function Ok(t){return new Rq(t,async(e,n,r)=>{r.setHeader("User-Agent","ethers");let i;try{const[a,o]=await Promise.all([r.send(),e()]);i=a;const s=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:Pk(s.maxFee,9),maxPriorityFeePerGas:Pk(s.maxPriorityFee,9)}}catch(a){ye(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:i,error:a})}})}let Tk=!1;function Mq(){if(Tk)return;Tk=!0;function t(e,n,r){const i=function(){const a=new Bc(e,n);return r.ensNetwork!=null&&a.attachPlugin(new qL(null,r.ensNetwork)),a.attachPlugin(new XL),(r.plugins||[]).forEach(o=>{a.attachPlugin(o)}),a};Bc.register(e,i),Bc.register(n,i),r.altNames&&r.altNames.forEach(a=>{Bc.register(a,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("holesky",17e3,{ensNetwork:17e3}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("arbitrum-sepolia",421614,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("matic",137,{ensNetwork:1,plugins:[Ok("https://gasstation.polygon.technology/v2")]}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[Ok("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("optimism-sepolia",11155420,{}),t("xdai",100,{ensNetwork:1})}function c3(t){return JSON.parse(JSON.stringify(t))}var $s,Aa,uc,zo,f0,Jb,iM;let Bq=(iM=class{constructor(e){M(this,f0);M(this,$s,void 0);M(this,Aa,void 0);M(this,uc,void 0);M(this,zo,void 0);O(this,$s,e),O(this,Aa,null),O(this,uc,4e3),O(this,zo,-2)}get pollingInterval(){return v(this,uc)}set pollingInterval(e){O(this,uc,e)}start(){v(this,Aa)||(O(this,Aa,v(this,$s)._setTimeout(ie(this,f0,Jb).bind(this),v(this,uc))),ie(this,f0,Jb).call(this))}stop(){v(this,Aa)&&(v(this,$s)._clearTimeout(v(this,Aa)),O(this,Aa,null))}pause(e){this.stop(),e&&O(this,zo,-2)}resume(){this.start()}},$s=new WeakMap,Aa=new WeakMap,uc=new WeakMap,zo=new WeakMap,f0=new WeakSet,Jb=async function(){try{const e=await v(this,$s).getBlockNumber();if(v(this,zo)===-2){O(this,zo,e);return}if(e!==v(this,zo)){for(let n=v(this,zo)+1;n<=e;n++){if(v(this,Aa)==null)return;await v(this,$s).emit("block",n)}O(this,zo,e)}}catch{}v(this,Aa)!=null&&O(this,Aa,v(this,$s)._setTimeout(ie(this,f0,Jb).bind(this),v(this,uc)))},iM);var of,sf,fc,aM;let YP=(aM=class{constructor(e){M(this,of,void 0);M(this,sf,void 0);M(this,fc,void 0);O(this,of,e),O(this,fc,!1),O(this,sf,n=>{this._poll(n,v(this,of))})}async _poll(e,n){throw new Error("sub-classes must override this")}start(){v(this,fc)||(O(this,fc,!0),v(this,sf).call(this,-2),v(this,of).on("block",v(this,sf)))}stop(){v(this,fc)&&(O(this,fc,!1),v(this,of).off("block",v(this,sf)))}pause(e){this.stop()}resume(){this.start()}},of=new WeakMap,sf=new WeakMap,fc=new WeakMap,aM);var h0,Us,oM;let Dq=(oM=class extends YP{constructor(n,r){super(n);M(this,h0,void 0);M(this,Us,void 0);O(this,h0,r),O(this,Us,-2)}pause(n){n&&O(this,Us,-2),super.pause(n)}async _poll(n,r){const i=await r.getBlock(v(this,h0));i!=null&&(v(this,Us)===-2?O(this,Us,i.number):i.number>v(this,Us)&&(r.emit(v(this,h0),i.number),O(this,Us,i.number)))}},h0=new WeakMap,Us=new WeakMap,oM);var s2,sM;let Lq=(sM=class extends YP{constructor(n,r){super(n);M(this,s2,void 0);O(this,s2,c3(r))}async _poll(n,r){throw new Error("@TODO")}},s2=new WeakMap,sM);var d0,lM;let $q=(lM=class extends YP{constructor(n,r){super(n);M(this,d0,void 0);O(this,d0,r)}async _poll(n,r){const i=await r.getTransactionReceipt(v(this,d0));i&&r.emit(v(this,d0),i)}},d0=new WeakMap,lM);var Fs,p0,g0,hc,Ea,l2,t$,cM;let XP=(cM=class{constructor(e,n){M(this,l2);M(this,Fs,void 0);M(this,p0,void 0);M(this,g0,void 0);M(this,hc,void 0);M(this,Ea,void 0);O(this,Fs,e),O(this,p0,c3(n)),O(this,g0,ie(this,l2,t$).bind(this)),O(this,hc,!1),O(this,Ea,-2)}start(){v(this,hc)||(O(this,hc,!0),v(this,Ea)===-2&&v(this,Fs).getBlockNumber().then(e=>{O(this,Ea,e)}),v(this,Fs).on("block",v(this,g0)))}stop(){v(this,hc)&&(O(this,hc,!1),v(this,Fs).off("block",v(this,g0)))}pause(e){this.stop(),e&&O(this,Ea,-2)}resume(){this.start()}},Fs=new WeakMap,p0=new WeakMap,g0=new WeakMap,hc=new WeakMap,Ea=new WeakMap,l2=new WeakSet,t$=async function(e){if(v(this,Ea)===-2)return;const n=c3(v(this,p0));n.fromBlock=v(this,Ea)+1,n.toBlock=e;const r=await v(this,Fs).getLogs(n);if(r.length===0){v(this,Ea){if(r==null)return"null";if(typeof r=="bigint")return`bigint:${r.toString()}`;if(typeof r=="string")return r.toLowerCase();if(typeof r=="object"&&!Array.isArray(r)){const i=Object.keys(r);return i.sort(),i.reduce((a,o)=>(a[o]=r[o],a),{})}return r})}let n$=class{constructor(e){R(this,"name");gt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}};function jq(t){return JSON.parse(JSON.stringify(t))}function u3(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function K6(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(gn(t,32)){const n=t.toLowerCase();return{type:"transaction",tag:Yb("tx",{hash:n}),hash:n}}if(t.orphan){const n=t;return{type:"orphan",tag:Yb("orphan",n),filter:jq(n)}}if(t.address||t.topics){const n=t,r={topics:(n.topics||[]).map(i=>i==null?null:Array.isArray(i)?u3(i.map(a=>a.toLowerCase())):i.toLowerCase())};if(n.address){const i=[],a=[],o=s=>{gn(s)?i.push(s):a.push((async()=>{i.push(await li(s,e))})())};Array.isArray(n.address)?n.address.forEach(o):o(n.address),a.length&&await Promise.all(a),r.address=u3(i.map(s=>s.toLowerCase()))}return{filter:r,tag:Yb("event",r),type:"event"}}K(!1,"unknown ProviderEvent","event",t)}function W6(){return new Date().getTime()}const zq={cacheTimeout:250,pollingInterval:4e3};var Lr,dc,$r,y0,Zi,lf,pc,js,Am,Sa,m0,v0,Zr,Gi,Em,f3,Sm,h3,cf,iy,Pm,d3,uf,ay,b0,Xb,uM;let Hq=(uM=class{constructor(e,n){M(this,Zr);M(this,Em);M(this,Sm);M(this,cf);M(this,Pm);M(this,uf);M(this,b0);M(this,Lr,void 0);M(this,dc,void 0);M(this,$r,void 0);M(this,y0,void 0);M(this,Zi,void 0);M(this,lf,void 0);M(this,pc,void 0);M(this,js,void 0);M(this,Am,void 0);M(this,Sa,void 0);M(this,m0,void 0);M(this,v0,void 0);if(O(this,v0,Object.assign({},zq,n||{})),e==="any")O(this,lf,!0),O(this,Zi,null);else if(e){const r=Bc.from(e);O(this,lf,!1),O(this,Zi,Promise.resolve(r)),setTimeout(()=>{this.emit("network",r,null)},0)}else O(this,lf,!1),O(this,Zi,null);O(this,js,-1),O(this,pc,new Map),O(this,Lr,new Map),O(this,dc,new Map),O(this,$r,null),O(this,y0,!1),O(this,Am,1),O(this,Sa,new Map),O(this,m0,!1)}get pollingInterval(){return v(this,v0).pollingInterval}get provider(){return this}get plugins(){return Array.from(v(this,dc).values())}attachPlugin(e){if(v(this,dc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return v(this,dc).set(e.name,e.connect(this)),this}getPlugin(e){return v(this,dc).get(e)||null}get disableCcipRead(){return v(this,m0)}set disableCcipRead(e){O(this,m0,!!e)}async ccipReadFetch(e,n,r){if(this.disableCcipRead||r.length===0||e.to==null)return null;const i=e.to.toLowerCase(),a=n.toLowerCase(),o=[];for(let s=0;s=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:l,errorMessage:f}}),o.push(f)}ye(!1,`error encountered during CCIP fetch: ${o.map(s=>JSON.stringify(s)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:o}})}_wrapBlock(e,n){return new cq(Tq(e),this)}_wrapLog(e,n){return new av(Pq(e),this)}_wrapTransactionReceipt(e,n){return new DL(Nq(e),this)}_wrapTransactionResponse(e,n){return new HP(JL(e),this)}_detectNetwork(){ye(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){ye(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Bt(await ie(this,Zr,Gi).call(this,{method:"getBlockNumber"}),"%response");return v(this,js)>=0&&O(this,js,e),e}_getAddress(e){return li(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(gn(e))return gn(e,32)?e:fd(e);if(typeof e=="bigint"&&(e=Bt(e,"blockTag")),typeof e=="number")return e>=0?fd(e):v(this,js)>=0?fd(v(this,js)+e):this.getBlockNumber().then(n=>fd(n+e));K(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const n=(e.topics||[]).map(l=>l==null?null:Array.isArray(l)?u3(l.map(c=>c.toLowerCase())):l.toLowerCase()),r="blockHash"in e?e.blockHash:void 0,i=(l,c,u)=>{let f;switch(l.length){case 0:break;case 1:f=l[0];break;default:l.sort(),f=l}if(r&&(c!=null||u!=null))throw new Error("invalid filter");const h={};return f&&(h.address=f),n.length&&(h.topics=n),c&&(h.fromBlock=c),u&&(h.toBlock=u),r&&(h.blockHash=r),h};let a=[];if(e.address)if(Array.isArray(e.address))for(const l of e.address)a.push(this._getAddress(l));else a.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let s;return"toBlock"in e&&(s=this._getBlockTag(e.toBlock)),a.filter(l=>typeof l!="string").length||o!=null&&typeof o!="string"||s!=null&&typeof s!="string"?Promise.all([Promise.all(a),o,s]).then(l=>i(l[0],l[1],l[2])):i(a,o,s)}_getTransactionRequest(e){const n=Xw(e),r=[];if(["to","from"].forEach(i=>{if(n[i]==null)return;const a=li(n[i],this);Yv(a)?r.push(async function(){n[i]=await a}()):n[i]=a}),n.blockTag!=null){const i=this._getBlockTag(n.blockTag);Yv(i)?r.push(async function(){n.blockTag=await i}()):n.blockTag=i}return r.length?async function(){return await Promise.all(r),n}():n}async getNetwork(){if(v(this,Zi)==null){const i=(async()=>{try{const a=await this._detectNetwork();return this.emit("network",a,null),a}catch(a){throw v(this,Zi)===i&&O(this,Zi,null),a}})();return O(this,Zi,i),(await i).clone()}const e=v(this,Zi),[n,r]=await Promise.all([e,this._detectNetwork()]);return n.chainId!==r.chainId&&(v(this,lf)?(this.emit("network",r,n),v(this,Zi)===e&&O(this,Zi,Promise.resolve(r))):ye(!1,`network changed: ${n.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),n.clone()}async getFeeData(){const e=await this.getNetwork(),n=async()=>{const{_block:i,gasPrice:a,priorityFee:o}=await ti({_block:ie(this,Pm,d3).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await ie(this,Zr,Gi).call(this,{method:"getGasPrice"});return et(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await ie(this,Zr,Gi).call(this,{method:"getPriorityFee"});return et(u,"%response")}catch{}return null})()});let s=null,l=null;const c=this._wrapBlock(i,e);return c&&c.baseFeePerGas&&(l=o??BigInt("1000000000"),s=c.baseFeePerGas*Uq+l),new bk(a,s,l)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const i=new nh(r.url),a=await r.processFunc(n,this,i);return new bk(a.gasPrice,a.maxFeePerGas,a.maxPriorityFeePerGas)}return await n()}async estimateGas(e){let n=this._getTransactionRequest(e);return Yv(n)&&(n=await n),et(await ie(this,Zr,Gi).call(this,{method:"estimateGas",transaction:n}),"%response")}async call(e){const{tx:n,blockTag:r}=await ti({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await ie(this,Sm,h3).call(this,ie(this,Em,f3).call(this,n,r,e.enableCcipRead?0:-1))}async getBalance(e,n){return et(await ie(this,cf,iy).call(this,{method:"getBalance"},e,n),"%response")}async getTransactionCount(e,n){return Bt(await ie(this,cf,iy).call(this,{method:"getTransactionCount"},e,n),"%response")}async getCode(e,n){return it(await ie(this,cf,iy).call(this,{method:"getCode"},e,n))}async getStorage(e,n,r){const i=et(n,"position");return it(await ie(this,cf,iy).call(this,{method:"getStorage",position:i},e,r))}async broadcastTransaction(e){const{blockNumber:n,hash:r,network:i}=await ti({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),a=AL.from(e);if(a.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(a,i).replaceableTransaction(n)}async getBlock(e,n){const{network:r,params:i}=await ti({network:this.getNetwork(),params:ie(this,Pm,d3).call(this,e,!!n)});return i==null?null:this._wrapBlock(i,r)}async getTransaction(e){const{network:n,params:r}=await ti({network:this.getNetwork(),params:ie(this,Zr,Gi).call(this,{method:"getTransaction",hash:e})});return r==null?null:this._wrapTransactionResponse(r,n)}async getTransactionReceipt(e){const{network:n,params:r}=await ti({network:this.getNetwork(),params:ie(this,Zr,Gi).call(this,{method:"getTransactionReceipt",hash:e})});if(r==null)return null;if(r.gasPrice==null&&r.effectiveGasPrice==null){const i=await ie(this,Zr,Gi).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(r,n)}async getTransactionResult(e){const{result:n}=await ti({network:this.getNetwork(),result:ie(this,Zr,Gi).call(this,{method:"getTransactionResult",hash:e})});return n==null?null:it(n)}async getLogs(e){let n=this._getFilter(e);Yv(n)&&(n=await n);const{network:r,params:i}=await ti({network:this.getNetwork(),params:ie(this,Zr,Gi).call(this,{method:"getLogs",filter:n})});return i.map(a=>this._wrapLog(a,r))}_getProvider(e){ye(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await Ek.fromName(this,e)}async getAvatar(e){const n=await this.getResolver(e);return n?await n.getAvatar():null}async resolveName(e){const n=await this.getResolver(e);return n?await n.getAddress():null}async lookupAddress(e){e=fn(e);const n=n3(e.substring(2).toLowerCase()+".addr.reverse");try{const r=await Ek.getEnsAddress(this),a=await new _d(r,["function resolver(bytes32) view returns (address)"],this).resolver(n);if(a==null||a===o1)return null;const s=await new _d(a,["function name(bytes32) view returns (string)"],this).name(n);return await this.resolveName(s)!==e?null:s}catch(r){if(Qr(r,"BAD_DATA")&&r.value==="0x"||Qr(r,"CALL_EXCEPTION"))return null;throw r}return null}async waitForTransaction(e,n,r){const i=n??1;return i===0?this.getTransactionReceipt(e):new Promise(async(a,o)=>{let s=null;const l=async c=>{try{const u=await this.getTransactionReceipt(e);if(u!=null&&c-u.blockNumber+1>=i){a(u),s&&(clearTimeout(s),s=null);return}}catch(u){console.log("EEE",u)}this.once("block",l)};r!=null&&(s=setTimeout(()=>{s!=null&&(s=null,this.off("block",l),o(Zn("timeout","TIMEOUT",{reason:"timeout"})))},r)),l(await this.getBlockNumber())})}async waitForBlock(e){ye(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const n=v(this,Sa).get(e);n&&(n.timer&&clearTimeout(n.timer),v(this,Sa).delete(e))}_setTimeout(e,n){n==null&&(n=0);const r=vs(this,Am)._++,i=()=>{v(this,Sa).delete(r),e()};if(this.paused)v(this,Sa).set(r,{timer:null,func:i,time:n});else{const a=setTimeout(i,n);v(this,Sa).set(r,{timer:a,func:i,time:W6()})}return r}_forEachSubscriber(e){for(const n of v(this,Lr).values())e(n.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new n$(e.type);case"block":{const n=new Bq(this);return n.pollingInterval=this.pollingInterval,n}case"safe":case"finalized":return new Dq(this,e.type);case"event":return new XP(this,e.filter);case"transaction":return new $q(this,e.hash);case"orphan":return new Lq(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,n){for(const r of v(this,Lr).values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=n,r.started&&n.start(),v(this,$r)!=null&&n.pause(v(this,$r));break}}async on(e,n){const r=await ie(this,b0,Xb).call(this,e);return r.listeners.push({listener:n,once:!1}),r.started||(r.subscriber.start(),r.started=!0,v(this,$r)!=null&&r.subscriber.pause(v(this,$r))),this}async once(e,n){const r=await ie(this,b0,Xb).call(this,e);return r.listeners.push({listener:n,once:!0}),r.started||(r.subscriber.start(),r.started=!0,v(this,$r)!=null&&r.subscriber.pause(v(this,$r))),this}async emit(e,...n){const r=await ie(this,uf,ay).call(this,e,n);if(!r||r.listeners.length===0)return!1;const i=r.listeners.length;return r.listeners=r.listeners.filter(({listener:a,once:o})=>{const s=new gD(this,o?null:a,e);try{a.call(this,...n,s)}catch{}return!o}),r.listeners.length===0&&(r.started&&r.subscriber.stop(),v(this,Lr).delete(r.tag)),i>0}async listenerCount(e){if(e){const r=await ie(this,uf,ay).call(this,e);return r?r.listeners.length:0}let n=0;for(const{listeners:r}of v(this,Lr).values())n+=r.length;return n}async listeners(e){if(e){const r=await ie(this,uf,ay).call(this,e);return r?r.listeners.map(({listener:i})=>i):[]}let n=[];for(const{listeners:r}of v(this,Lr).values())n=n.concat(r.map(({listener:i})=>i));return n}async off(e,n){const r=await ie(this,uf,ay).call(this,e);if(!r)return this;if(n){const i=r.listeners.map(({listener:a})=>a).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(!n||r.listeners.length===0)&&(r.started&&r.subscriber.stop(),v(this,Lr).delete(r.tag)),this}async removeAllListeners(e){if(e){const{tag:n,started:r,subscriber:i}=await ie(this,b0,Xb).call(this,e);r&&i.stop(),v(this,Lr).delete(n)}else for(const[n,{started:r,subscriber:i}]of v(this,Lr))r&&i.stop(),v(this,Lr).delete(n);return this}async addListener(e,n){return await this.on(e,n)}async removeListener(e,n){return this.off(e,n)}get destroyed(){return v(this,y0)}destroy(){this.removeAllListeners();for(const e of v(this,Sa).keys())this._clearTimeout(e);O(this,y0,!0)}get paused(){return v(this,$r)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(O(this,js,-1),v(this,$r)!=null){if(v(this,$r)==!!e)return;ye(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(n=>n.pause(e)),O(this,$r,!!e);for(const n of v(this,Sa).values())n.timer&&clearTimeout(n.timer),n.time=W6()-n.time}resume(){if(v(this,$r)!=null){this._forEachSubscriber(e=>e.resume()),O(this,$r,null);for(const e of v(this,Sa).values()){let n=e.time;n<0&&(n=0),e.time=W6(),setTimeout(e.func,n)}}}},Lr=new WeakMap,dc=new WeakMap,$r=new WeakMap,y0=new WeakMap,Zi=new WeakMap,lf=new WeakMap,pc=new WeakMap,js=new WeakMap,Am=new WeakMap,Sa=new WeakMap,m0=new WeakMap,v0=new WeakMap,Zr=new WeakSet,Gi=async function(e){const n=v(this,v0).cacheTimeout;if(n<0)return await this._perform(e);const r=Yb(e.method,e);let i=v(this,pc).get(r);return i||(i=this._perform(e),v(this,pc).set(r,i),setTimeout(()=>{v(this,pc).get(r)===i&&v(this,pc).delete(r)},n)),await i},Em=new WeakSet,f3=async function(e,n,r){ye(r=0&&n==="latest"&&i.to!=null&&Un(a.data,0,4)==="0x556f1830"){const o=a.data,s=await li(i.to,this);let l;try{l=Wq(Un(a.data,4))}catch(f){ye(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}ye(l.sender.toLowerCase()===s.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:l.errorArgs}});const c=await this.ccipReadFetch(i,l.calldata,l.urls);ye(c!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:a.data,errorArgs:l.errorArgs}});const u={to:s,data:Xn([l.selector,Kq([c,l.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:u});try{const f=await ie(this,Em,f3).call(this,u,n,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},u),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},u),error:f}),f}}throw a}},Sm=new WeakSet,h3=async function(e){const{value:n}=await ti({network:this.getNetwork(),value:e});return n},cf=new WeakSet,iy=async function(e,n,r){let i=this._getAddress(n),a=this._getBlockTag(r);return(typeof i!="string"||typeof a!="string")&&([i,a]=await Promise.all([i,a])),await ie(this,Sm,h3).call(this,ie(this,Zr,Gi).call(this,Object.assign(e,{address:i,blockTag:a})))},Pm=new WeakSet,d3=async function(e,n){if(gn(e,32))return await ie(this,Zr,Gi).call(this,{method:"getBlock",blockHash:e,includeTransactions:n});let r=this._getBlockTag(e);return typeof r!="string"&&(r=await r),await ie(this,Zr,Gi).call(this,{method:"getBlock",blockTag:r,includeTransactions:n})},uf=new WeakSet,ay=async function(e,n){let r=await K6(e,this);return r.type==="event"&&n&&n.length>0&&n[0].removed===!0&&(r=await K6({orphan:"drop-log",log:n[0]},this)),v(this,Lr).get(r.tag)||null},b0=new WeakSet,Xb=async function(e){const n=await K6(e,this),r=n.tag;let i=v(this,Lr).get(r);return i||(i={subscriber:this._getSubscriber(n),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},v(this,Lr).set(r,i)),i},uM);function Gq(t,e){try{const n=p3(t,e);if(n)return Gw(n)}catch{}return null}function p3(t,e){if(t==="0x")return null;try{const n=Bt(Un(t,e,e+32)),r=Bt(Un(t,n,n+32));return Un(t,n+32,n+32+r)}catch{}return null}function Ck(t){const e=oi(t);if(e.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(e,32-e.length),n}function Vq(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const Qq=new Uint8Array([]);function Kq(t){const e=[];let n=0;for(let r=0;r=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const n=Un(t,0,32);ye(Un(n,0,12)===Un(kk,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=Un(n,12);try{const r=[],i=Bt(Un(t,32,64)),a=Bt(Un(t,i,i+32)),o=Un(t,i+32);for(let s=0;se[r]),e}function Th(t,e){if(t.provider)return t.provider;ye(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function _k(t,e){let n=Xw(e);if(n.to!=null&&(n.to=li(n.to,t)),n.from!=null){const r=n.from;n.from=Promise.all([t.getAddress(),li(r,t)]).then(([i,a])=>(K(i.toLowerCase()===a.toLowerCase(),"transaction from mismatch","tx.from",a),i))}else n.from=t.getAddress();return await ti(n)}let Jq=class{constructor(e){R(this,"provider");gt(this,{provider:e||null})}async getNonce(e){return Th(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await _k(this,e)}async populateTransaction(e){const n=Th(this,"populateTransaction"),r=await _k(this,e);r.nonce==null&&(r.nonce=await this.getNonce("pending")),r.gasLimit==null&&(r.gasLimit=await this.estimateGas(r));const i=await this.provider.getNetwork();if(r.chainId!=null){const o=et(r.chainId);K(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=i.chainId;const a=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||a)?K(!1,"eip-1559 transaction do not support gasPrice","tx",e):(r.type===0||r.type===1)&&a&&K(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1){const o=await n.getFeeData();ye(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),r.gasPrice==null&&(r.gasPrice=o.gasPrice)}else{const o=await n.getFeeData();if(r.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=o.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(ye(!a,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=o.gasPrice),r.type=0):ye(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=o.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await ti(r)}async estimateGas(e){return Th(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Th(this,"call").call(await this.populateCall(e))}async resolveName(e){return await Th(this,"resolveName").resolveName(e)}async sendTransaction(e){const n=Th(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const i=AL.from(r);return await n.broadcastTransaction(await this.signTransaction(i))}};function Yq(t){return JSON.parse(JSON.stringify(t))}var wi,Ho,ff,gc,hf,w0,Om,g3,Tm,y3,fM;let r$=(fM=class{constructor(e){M(this,Om);M(this,Tm);M(this,wi,void 0);M(this,Ho,void 0);M(this,ff,void 0);M(this,gc,void 0);M(this,hf,void 0);M(this,w0,void 0);O(this,wi,e),O(this,Ho,null),O(this,ff,ie(this,Om,g3).bind(this)),O(this,gc,!1),O(this,hf,null),O(this,w0,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,n){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){v(this,gc)||(O(this,gc,!0),ie(this,Om,g3).call(this,-2))}stop(){v(this,gc)&&(O(this,gc,!1),O(this,w0,!0),ie(this,Tm,y3).call(this),v(this,wi).off("block",v(this,ff)))}pause(e){e&&ie(this,Tm,y3).call(this),v(this,wi).off("block",v(this,ff))}resume(){this.start()}},wi=new WeakMap,Ho=new WeakMap,ff=new WeakMap,gc=new WeakMap,hf=new WeakMap,w0=new WeakMap,Om=new WeakSet,g3=async function(e){try{v(this,Ho)==null&&O(this,Ho,this._subscribe(v(this,wi)));let n=null;try{n=await v(this,Ho)}catch(a){if(!Qr(a,"UNSUPPORTED_OPERATION")||a.operation!=="eth_newFilter")throw a}if(n==null){O(this,Ho,null),v(this,wi)._recoverSubscriber(this,this._recover(v(this,wi)));return}const r=await v(this,wi).getNetwork();if(v(this,hf)||O(this,hf,r),v(this,hf).chainId!==r.chainId)throw new Error("chaid changed");if(v(this,w0))return;const i=await v(this,wi).send("eth_getFilterChanges",[n]);await this._emitResults(v(this,wi),i)}catch(n){console.log("@TODO",n)}v(this,wi).once("block",v(this,ff))},Tm=new WeakSet,y3=function(){const e=v(this,Ho);e&&(O(this,Ho,null),e.then(n=>{v(this,wi).send("eth_uninstallFilter",[n])}))},fM);var df,hM;let Xq=(hM=class extends r${constructor(n,r){super(n);M(this,df,void 0);O(this,df,Yq(r))}_recover(n){return new XP(n,v(this,df))}async _subscribe(n){return await n.send("eth_newFilter",[v(this,df)])}async _emitResults(n,r){for(const i of r)n.emit(v(this,df),n._wrapLog(i,n._network))}},df=new WeakMap,hM),Zq=class extends r${async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,n){for(const r of n)e.emit("pending",r)}};const qq="bigint,boolean,function,number,string,symbol".split(/,/g);function Zb(t){if(t==null||qq.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(Zb);if(typeof t=="object")return Object.keys(t).reduce((e,n)=>(e[n]=t[n],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function eee(t){return new Promise(e=>{setTimeout(e,t)})}function Ch(t){return t&&t.toLowerCase()}function Nk(t){return t&&typeof t.pollingInterval=="number"}const tee={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};let J6=class extends Jq{constructor(n,r){super(n);R(this,"address");r=fn(r),gt(this,{address:r})}connect(n){ye(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(n){return await this.populateCall(n)}async sendUncheckedTransaction(n){const r=Zb(n),i=[];if(r.from){const o=r.from;i.push((async()=>{const s=await li(o,this.provider);K(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=s})())}else r.from=this.address;if(r.gasLimit==null&&i.push((async()=>{r.gasLimit=await this.provider.estimateGas({...r,from:this.address})})()),r.to!=null){const o=r.to;i.push((async()=>{r.to=await li(o,this.provider)})())}i.length&&await Promise.all(i);const a=this.provider.getRpcTransaction(r);return this.provider.send("eth_sendTransaction",[a])}async sendTransaction(n){const r=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(n);return await new Promise((a,o)=>{const s=[1e3,100];let l=0;const c=async()=>{try{const u=await this.provider.getTransaction(i);if(u!=null){a(u.replaceableTransaction(r));return}}catch(u){if(Qr(u,"CANCELLED")||Qr(u,"BAD_DATA")||Qr(u,"NETWORK_ERROR")){u.info==null&&(u.info={}),u.info.sendTransactionHash=i,o(u);return}if(Qr(u,"INVALID_ARGUMENT")&&(l++,u.info==null&&(u.info={}),u.info.sendTransactionHash=i,l>10)){o(u);return}this.provider.emit("error",Zn("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:u}))}this.provider._setTimeout(()=>{c()},s.pop()||4e3)};c()})}async signTransaction(n){const r=Zb(n);if(r.from){const a=await li(r.from,this.provider);K(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=a}else r.from=this.address;const i=this.provider.getRpcTransaction(r);return await this.provider.send("eth_signTransaction",[i])}async signMessage(n){const r=typeof n=="string"?fl(n):n;return await this.provider.send("personal_sign",[it(r),this.address.toLowerCase()])}async signTypedData(n,r,i){const a=Zb(i),o=await ik.resolveNames(n,r,a,async s=>{const l=await li(s);return K(l!=null,"TypedData does not support null address","value",s),l});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(ik.getPayload(o.domain,r,o.value))])}async unlock(n){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),n,null])}async _legacySignMessage(n){const r=typeof n=="string"?fl(n):n;return await this.provider.send("eth_sign",[this.address.toLowerCase(),it(r)])}};var pf,x0,zs,Go,so,Pa,xi,Cm,m3,dM;let nee=(dM=class extends Hq{constructor(n,r){super(n,r);M(this,Cm);M(this,pf,void 0);M(this,x0,void 0);M(this,zs,void 0);M(this,Go,void 0);M(this,so,void 0);M(this,Pa,void 0);M(this,xi,void 0);O(this,x0,1),O(this,pf,Object.assign({},tee,r||{})),O(this,zs,[]),O(this,Go,null),O(this,Pa,null),O(this,xi,null);{let a=null;const o=new Promise(s=>{a=s});O(this,so,{promise:o,resolve:a})}const i=this._getOption("staticNetwork");typeof i=="boolean"?(K(!i||n!=="any","staticNetwork cannot be used on special network 'any'","options",r),i&&n!=null&&O(this,Pa,Bc.from(n))):i&&(K(n==null||i.matches(n),"staticNetwork MUST match network object","options",r),O(this,Pa,i))}_getOption(n){return v(this,pf)[n]}get _network(){return ye(v(this,Pa),"network is not available yet","NETWORK_ERROR"),v(this,Pa)}async _perform(n){if(n.method==="call"||n.method==="estimateGas"){let i=n.transaction;if(i&&i.type!=null&&et(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const a=await this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(n=Object.assign({},n,{transaction:Object.assign({},i,{type:void 0})}))}}const r=this.getRpcRequest(n);return r!=null?await this.send(r.method,r.args):super._perform(n)}async _detectNetwork(){const n=this._getOption("staticNetwork");if(n)if(n===!0){if(v(this,Pa))return v(this,Pa)}else return n;return v(this,xi)?await v(this,xi):this.ready?(O(this,xi,(async()=>{try{const r=Bc.from(et(await this.send("eth_chainId",[])));return O(this,xi,null),r}catch(r){throw O(this,xi,null),r}})()),await v(this,xi)):(O(this,xi,(async()=>{const r={id:vs(this,x0)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:r});let i;try{i=(await this._send(r))[0],O(this,xi,null)}catch(a){throw O(this,xi,null),this.emit("debug",{action:"receiveRpcError",error:a}),a}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return Bc.from(et(i.result));throw this.getRpcError(r,i)})()),await v(this,xi))}_start(){v(this,so)==null||v(this,so).resolve==null||(v(this,so).resolve(),O(this,so,null),(async()=>{for(;v(this,Pa)==null&&!this.destroyed;)try{O(this,Pa,await this._detectNetwork())}catch(n){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",Zn("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:n}})),await eee(1e3)}ie(this,Cm,m3).call(this)})())}async _waitUntilReady(){if(v(this,so)!=null)return await v(this,so).promise}_getSubscriber(n){return n.type==="pending"?new Zq(this):n.type==="event"?this._getOption("polling")?new XP(this,n.filter):new Xq(this,n.filter):n.type==="orphan"&&n.filter.orphan==="drop-log"?new n$("orphan"):super._getSubscriber(n)}get ready(){return v(this,so)==null}getRpcTransaction(n){const r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(n[i]==null)return;let a=i;i==="gasLimit"&&(a="gas"),r[a]=fd(et(n[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{n[i]!=null&&(r[i]=it(n[i]))}),n.accessList&&(r.accessList=ph(n.accessList)),r}getRpcRequest(n){switch(n.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[Ch(n.address),n.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[Ch(n.address),n.blockTag]};case"getCode":return{method:"eth_getCode",args:[Ch(n.address),n.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[Ch(n.address),"0x"+n.position.toString(16),n.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[n.signedTransaction]};case"getBlock":if("blockTag"in n)return{method:"eth_getBlockByNumber",args:[n.blockTag,!!n.includeTransactions]};if("blockHash"in n)return{method:"eth_getBlockByHash",args:[n.blockHash,!!n.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[n.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[n.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(n.transaction),n.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(n.transaction)]};case"getLogs":return n.filter&&n.filter.address!=null&&(Array.isArray(n.filter.address)?n.filter.address=n.filter.address.map(Ch):n.filter.address=Ch(n.filter.address)),{method:"eth_getLogs",args:[n.filter]}}return null}getRpcError(n,r){const{method:i}=n,{error:a}=r;if(i==="eth_estimateGas"&&a.message){const l=a.message;if(!l.match(/revert/i)&&l.match(/insufficient funds/i))return Zn("insufficient funds","INSUFFICIENT_FUNDS",{transaction:n.params[0],info:{payload:n,error:a}})}if(i==="eth_call"||i==="eth_estimateGas"){const l=v3(a),c=a3.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",n.params[0],l?l.data:null);return c.info={error:a,payload:n},c}const o=JSON.stringify(iee(a));if(typeof a.message=="string"&&a.message.match(/user denied|ethers-user-denied/i))return Zn("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:n,error:a}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const l=n.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return Zn("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:l,info:{error:a}});if(o.match(/nonce/i)&&o.match(/too low/i))return Zn("nonce has already been used","NONCE_EXPIRED",{transaction:l,info:{error:a}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return Zn("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:l,info:{error:a}});if(o.match(/only replay-protected/i))return Zn("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:l,info:{error:a}}})}let s=!!o.match(/the method .* does not exist/i);return s||a&&a.details&&a.details.startsWith("Unauthorized method:")&&(s=!0),s?Zn("unsupported operation","UNSUPPORTED_OPERATION",{operation:n.method,info:{error:a,payload:n}}):Zn("could not coalesce error","UNKNOWN_ERROR",{error:a,payload:n})}send(n,r){if(this.destroyed)return Promise.reject(Zn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n}));const i=vs(this,x0)._++,a=new Promise((o,s)=>{v(this,zs).push({resolve:o,reject:s,payload:{method:n,params:r,id:i,jsonrpc:"2.0"}})});return ie(this,Cm,m3).call(this),a}async getSigner(n){n==null&&(n=0);const r=this.send("eth_accounts",[]);if(typeof n=="number"){const a=await r;if(n>=a.length)throw new Error("no such account");return new J6(this,a[n])}const{accounts:i}=await ti({network:this.getNetwork(),accounts:r});n=fn(n);for(const a of i)if(fn(a)===n)return new J6(this,n);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(r=>new J6(this,r))}destroy(){v(this,Go)&&(clearTimeout(v(this,Go)),O(this,Go,null));for(const{payload:n,reject:r}of v(this,zs))r(Zn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n.method}));O(this,zs,[]),super.destroy()}},pf=new WeakMap,x0=new WeakMap,zs=new WeakMap,Go=new WeakMap,so=new WeakMap,Pa=new WeakMap,xi=new WeakMap,Cm=new WeakSet,m3=function(){if(v(this,Go))return;const n=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");O(this,Go,setTimeout(()=>{O(this,Go,null);const r=v(this,zs);for(O(this,zs,[]);r.length;){const i=[r.shift()];for(;r.length&&i.length!==v(this,pf).batchMaxCount;)if(i.push(r.shift()),JSON.stringify(i.map(o=>o.payload)).length>v(this,pf).batchMaxSize){r.unshift(i.pop());break}(async()=>{const a=i.length===1?i[0].payload:i.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:a});try{const o=await this._send(a);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:s,reject:l,payload:c}of i){if(this.destroyed){l(Zn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:c.method}));continue}const u=o.filter(f=>f.id===c.id)[0];if(u==null){const f=Zn("missing response for request","BAD_DATA",{value:o,info:{payload:c}});this.emit("error",f),l(f);continue}if("error"in u){l(this.getRpcError(c,u));continue}s(u.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:s}of i)s(o)}})()}},n))},dM);var yc,pM;let i$=(pM=class extends nee{constructor(n,r){super(n,r);M(this,yc,void 0);O(this,yc,4e3)}_getSubscriber(n){const r=super._getSubscriber(n);return Nk(r)&&(r.pollingInterval=v(this,yc)),r}get pollingInterval(){return v(this,yc)}set pollingInterval(n){if(!Number.isInteger(n)||n<0)throw new Error("invalid interval");O(this,yc,n),this._forEachSubscriber(r=>{Nk(r)&&(r.pollingInterval=v(this,yc))})}},yc=new WeakMap,pM);var A0,gM;let ree=(gM=class extends i${constructor(n,r,i){n==null&&(n="http://localhost:8545");super(r,i);M(this,A0,void 0);typeof n=="string"?O(this,A0,new nh(n)):O(this,A0,n.clone())}_getConnection(){return v(this,A0).clone()}async send(n,r){return await this._start(),await super.send(n,r)}async _send(n){const r=this._getConnection();r.body=JSON.stringify(n),r.setHeader("content-type","application/json");const i=await r.send();i.assertOk();let a=i.bodyJson;return Array.isArray(a)||(a=[a]),a}},A0=new WeakMap,gM);function v3(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&gn(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const n=v3(t[e]);if(n)return n}return null}if(typeof t=="string")try{return v3(JSON.parse(t))}catch{}return null}function b3(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const n in t)b3(t[n],e);if(typeof t=="string")try{return b3(JSON.parse(t),e)}catch{}}}function iee(t){const e=[];return b3(t,e),e}var E0,yM;let a$=(yM=class extends i${constructor(n,r){K(n&&n.request,"invalid EIP-1193 provider","ethereum",n);super(r,{batchMaxCount:1});M(this,E0,void 0);O(this,E0,async(i,a)=>{const o={method:i,params:a};this.emit("debug",{action:"sendEip1193Request",payload:o});try{const s=await n.request(o);return this.emit("debug",{action:"receiveEip1193Result",result:s}),s}catch(s){const l=new Error(s.message);throw l.code=s.code,l.data=s.data,l.payload=o,this.emit("debug",{action:"receiveEip1193Error",error:l}),l}})}async send(n,r){return await this._start(),await super.send(n,r)}async _send(n){K(!Array.isArray(n),"EIP-1193 does not support batch request","payload",n);try{const r=await v(this,E0).call(this,n.method,n.params||[]);return[{id:n.id,result:r}]}catch(r){return[{id:n.id,error:{code:r.code,data:r.data,message:r.message}}]}}getRpcError(n,r){switch(r=JSON.parse(JSON.stringify(r)),r.error.code||-1){case 4001:r.error.message=`ethers-user-denied: ${r.error.message}`;break;case 4200:r.error.message=`ethers-unsupported: ${r.error.message}`;break}return super.getRpcError(n,r)}async hasSigner(n){n==null&&(n=0);const r=await this.send("eth_accounts",[]);return typeof n=="number"?r.length>n:(n=n.toLowerCase(),r.filter(i=>i.toLowerCase()===n).length!==0)}async getSigner(n){if(n==null&&(n=0),!await this.hasSigner(n))try{await v(this,E0).call(this,"eth_requestAccounts",[])}catch(r){const i=r.payload;throw this.getRpcError(i,{id:i.id,error:r})}return await super.getSigner(n)}},E0=new WeakMap,yM);const aee=["string","number","bigint","symbol"],oee=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function see(t){if(t===null)return"null";if(t===void 0)return"undefined";if(t===!0||t===!1)return"boolean";const e=typeof t;if(aee.includes(e))return e;if(e==="function")return"Function";if(Array.isArray(t))return"Array";if(lee(t))return"Buffer";const n=cee(t);return n||"Object"}function lee(t){return t&&t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer.call(null,t)}function cee(t){const e=Object.prototype.toString.call(t).slice(8,-1);if(oee.includes(e))return e}class de{constructor(e,n,r){this.major=e,this.majorEncoded=e<<5,this.name=n,this.terminal=r}toString(){return`Type[${this.major}].${this.name}`}compare(e){return this.majore.major?1:0}}de.uint=new de(0,"uint",!0);de.negint=new de(1,"negint",!0);de.bytes=new de(2,"bytes",!0);de.string=new de(3,"string",!0);de.array=new de(4,"array",!1);de.map=new de(5,"map",!1);de.tag=new de(6,"tag",!1);de.float=new de(7,"float",!0);de.false=new de(7,"false",!0);de.true=new de(7,"true",!0);de.null=new de(7,"null",!0);de.undefined=new de(7,"undefined",!0);de.break=new de(7,"break",!0);class ut{constructor(e,n,r){this.type=e,this.value=n,this.encodedLength=r,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}}const og=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&typeof globalThis.Buffer.isBuffer=="function",uee=new TextDecoder,fee=new TextEncoder;function qw(t){return og&&globalThis.Buffer.isBuffer(t)}function o$(t){return t instanceof Uint8Array?qw(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t:Uint8Array.from(t)}const hee=og?(t,e,n)=>n-e>64?globalThis.Buffer.from(t.subarray(e,n)).toString("utf8"):Rk(t,e,n):(t,e,n)=>n-e>64?uee.decode(t.subarray(e,n)):Rk(t,e,n),dee=og?t=>t.length>64?globalThis.Buffer.from(t):Ik(t):t=>t.length>64?fee.encode(t):Ik(t),bs=t=>Uint8Array.from(t),ZP=og?(t,e,n)=>qw(t)?new Uint8Array(t.subarray(e,n)):t.slice(e,n):(t,e,n)=>t.slice(e,n),pee=og?(t,e)=>(t=t.map(n=>n instanceof Uint8Array?n:globalThis.Buffer.from(n)),o$(globalThis.Buffer.concat(t,e))):(t,e)=>{const n=new Uint8Array(e);let r=0;for(let i of t)r+i.length>n.length&&(i=i.subarray(0,n.length-r)),n.set(i,r),r+=i.length;return n},gee=og?t=>globalThis.Buffer.allocUnsafe(t):t=>new Uint8Array(t);function yee(t,e){if(qw(t)&&qw(e))return t.compare(e);for(let n=0;n55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(o+1===r){(e-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return a}function Rk(t,e,n){const r=[];for(;e239?4:i>223?3:i>191?2:1;if(e+o<=n){let s,l,c,u;switch(o){case 1:i<128&&(a=i);break;case 2:s=t[e+1],(s&192)===128&&(u=(i&31)<<6|s&63,u>127&&(a=u));break;case 3:s=t[e+1],l=t[e+2],(s&192)===128&&(l&192)===128&&(u=(i&15)<<12|(s&63)<<6|l&63,u>2047&&(u<55296||u>57343)&&(a=u));break;case 4:s=t[e+1],l=t[e+2],c=t[e+3],(s&192)===128&&(l&192)===128&&(c&192)===128&&(u=(i&15)<<18|(s&63)<<12|(l&63)<<6|c&63,u>65535&&u<1114112&&(a=u))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),e+=o}return mee(r)}const Mk=4096;function mee(t){const e=t.length;if(e<=Mk)return String.fromCharCode.apply(String,t);let n="",r=0;for(;rr.length/2?(n=this.cursor===r.length?r:r.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):n=ZP(r,0,this.cursor)}else n=pee(this.chunks,this.cursor);return e&&this.reset(),n}}const $t="CBOR decode error:",l$="CBOR encode error:";function sg(t,e,n){if(t.length-e>>8,r&255])}else if(n>>24&255,r>>>16&255,r>>>8&255,r&255])}else{const r=BigInt(n);if(r>BigInt(32)&BigInt(4294967295));i[8]=a&255,a=a>>8,i[7]=a&255,a=a>>8,i[6]=a&255,a=a>>8,i[5]=a&255,i[4]=o&255,o=o>>8,i[3]=o&255,o=o>>8,i[2]=o&255,o=o>>8,i[1]=o&255,t.push(i)}else throw new Error(`${$t} encountered BigInt larger than allowable range`)}}bh.encodedSize=function(e){return Qa.encodedSize(e.value)};Qa.encodedSize=function(e){return en.value?1:0};function Eee(t,e,n,r){return new ut(de.negint,-1-gh(t,e+1,r),2)}function See(t,e,n,r){return new ut(de.negint,-1-yh(t,e+1,r),3)}function Pee(t,e,n,r){return new ut(de.negint,-1-mh(t,e+1,r),5)}const qP=BigInt(-1),c$=BigInt(1);function Oee(t,e,n,r){const i=vh(t,e+1,r);if(typeof i!="bigint"){const a=-1-i;if(a>=Number.MIN_SAFE_INTEGER)return new ut(de.negint,a,9)}if(r.allowBigInt!==!0)throw new Error(`${$t} integers outside of the safe integer range are not supported`);return new ut(de.negint,qP-BigInt(i),9)}function eO(t,e){const n=e.value,r=typeof n=="bigint"?n*qP-c$:n*-1-1;Qa(t,e.type.majorEncoded,r)}eO.encodedSize=function(e){const n=e.value,r=typeof n=="bigint"?n*qP-c$:n*-1-1;return rn.value?-1:0};function sv(t,e,n,r){sg(t,e,n+r);const i=ZP(t,e+n,e+n+r);return new ut(de.bytes,i,n+r)}function Tee(t,e,n,r){return sv(t,e,1,n)}function Cee(t,e,n,r){return sv(t,e,2,gh(t,e+1,r))}function kee(t,e,n,r){return sv(t,e,3,yh(t,e+1,r))}function _ee(t,e,n,r){return sv(t,e,5,mh(t,e+1,r))}function Nee(t,e,n,r){const i=vh(t,e+1,r);if(typeof i=="bigint")throw new Error(`${$t} 64-bit integer bytes lengths not supported`);return sv(t,e,9,i)}function ex(t){return t.encodedBytes===void 0&&(t.encodedBytes=t.type===de.string?dee(t.value):t.value),t.encodedBytes}function Y2(t,e){const n=ex(e);Qa(t,e.type.majorEncoded,n.length),t.push(n)}Y2.encodedSize=function(e){const n=ex(e);return Qa.encodedSize(n.length)+n.length};Y2.compareTokens=function(e,n){return Iee(ex(e),ex(n))};function Iee(t,e){return t.lengthe.length?1:yee(t,e)}function lv(t,e,n,r,i){const a=n+r;sg(t,e,a);const o=new ut(de.string,hee(t,e+n,e+a),a);return i.retainStringBytes===!0&&(o.byteValue=ZP(t,e+n,e+a)),o}function Ree(t,e,n,r){return lv(t,e,1,n,r)}function Mee(t,e,n,r){return lv(t,e,2,gh(t,e+1,r),r)}function Bee(t,e,n,r){return lv(t,e,3,yh(t,e+1,r),r)}function Dee(t,e,n,r){return lv(t,e,5,mh(t,e+1,r),r)}function Lee(t,e,n,r){const i=vh(t,e+1,r);if(typeof i=="bigint")throw new Error(`${$t} 64-bit integer string lengths not supported`);return lv(t,e,9,i,r)}const $ee=Y2;function lg(t,e,n,r){return new ut(de.array,r,n)}function Uee(t,e,n,r){return lg(t,e,1,n)}function Fee(t,e,n,r){return lg(t,e,2,gh(t,e+1,r))}function jee(t,e,n,r){return lg(t,e,3,yh(t,e+1,r))}function zee(t,e,n,r){return lg(t,e,5,mh(t,e+1,r))}function Hee(t,e,n,r){const i=vh(t,e+1,r);if(typeof i=="bigint")throw new Error(`${$t} 64-bit integer array lengths not supported`);return lg(t,e,9,i)}function Gee(t,e,n,r){if(r.allowIndefinite===!1)throw new Error(`${$t} indefinite length items not allowed`);return lg(t,e,1,1/0)}function tO(t,e){Qa(t,de.array.majorEncoded,e.value)}tO.compareTokens=bh.compareTokens;tO.encodedSize=function(e){return Qa.encodedSize(e.value)};function cg(t,e,n,r){return new ut(de.map,r,n)}function Vee(t,e,n,r){return cg(t,e,1,n)}function Qee(t,e,n,r){return cg(t,e,2,gh(t,e+1,r))}function Kee(t,e,n,r){return cg(t,e,3,yh(t,e+1,r))}function Wee(t,e,n,r){return cg(t,e,5,mh(t,e+1,r))}function Jee(t,e,n,r){const i=vh(t,e+1,r);if(typeof i=="bigint")throw new Error(`${$t} 64-bit integer map lengths not supported`);return cg(t,e,9,i)}function Yee(t,e,n,r){if(r.allowIndefinite===!1)throw new Error(`${$t} indefinite length items not allowed`);return cg(t,e,1,1/0)}function nO(t,e){Qa(t,de.map.majorEncoded,e.value)}nO.compareTokens=bh.compareTokens;nO.encodedSize=function(e){return Qa.encodedSize(e.value)};function Xee(t,e,n,r){return new ut(de.tag,n,1)}function Zee(t,e,n,r){return new ut(de.tag,gh(t,e+1,r),2)}function qee(t,e,n,r){return new ut(de.tag,yh(t,e+1,r),3)}function ete(t,e,n,r){return new ut(de.tag,mh(t,e+1,r),5)}function tte(t,e,n,r){return new ut(de.tag,vh(t,e+1,r),9)}function rO(t,e){Qa(t,de.tag.majorEncoded,e.value)}rO.compareTokens=bh.compareTokens;rO.encodedSize=function(e){return Qa.encodedSize(e.value)};const nte=20,rte=21,ite=22,ate=23;function ote(t,e,n,r){if(r.allowUndefined===!1)throw new Error(`${$t} undefined values are not supported`);return r.coerceUndefinedToNull===!0?new ut(de.null,null,1):new ut(de.undefined,void 0,1)}function ste(t,e,n,r){if(r.allowIndefinite===!1)throw new Error(`${$t} indefinite length items not allowed`);return new ut(de.break,void 0,1)}function iO(t,e,n){if(n){if(n.allowNaN===!1&&Number.isNaN(t))throw new Error(`${$t} NaN values are not supported`);if(n.allowInfinity===!1&&(t===1/0||t===-1/0))throw new Error(`${$t} Infinity values are not supported`)}return new ut(de.float,t,e)}function lte(t,e,n,r){return iO(oO(t,e+1),3,r)}function cte(t,e,n,r){return iO(sO(t,e+1),5,r)}function ute(t,e,n,r){return iO(d$(t,e+1),9,r)}function aO(t,e,n){const r=e.value;if(r===!1)t.push([de.float.majorEncoded|nte]);else if(r===!0)t.push([de.float.majorEncoded|rte]);else if(r===null)t.push([de.float.majorEncoded|ite]);else if(r===void 0)t.push([de.float.majorEncoded|ate]);else{let i,a=!1;(!n||n.float64!==!0)&&(f$(r),i=oO(eo,1),r===i||Number.isNaN(r)?(eo[0]=249,t.push(eo.slice(0,3)),a=!0):(h$(r),i=sO(eo,1),r===i&&(eo[0]=250,t.push(eo.slice(0,5)),a=!0))),a||(fte(r),i=d$(eo,1),eo[0]=251,t.push(eo.slice(0,9)))}}aO.encodedSize=function(e,n){const r=e.value;if(r===!1||r===!0||r===null||r===void 0)return 1;if(!n||n.float64!==!0){f$(r);let i=oO(eo,1);if(r===i||Number.isNaN(r))return 3;if(h$(r),i=sO(eo,1),r===i)return 5}return 9};const u$=new ArrayBuffer(9),ba=new DataView(u$,1),eo=new Uint8Array(u$,0);function f$(t){if(t===1/0)ba.setUint16(0,31744,!1);else if(t===-1/0)ba.setUint16(0,64512,!1);else if(Number.isNaN(t))ba.setUint16(0,32256,!1);else{ba.setFloat32(0,t);const e=ba.getUint32(0),n=(e&2139095040)>>23,r=e&8388607;if(n===255)ba.setUint16(0,31744,!1);else if(n===0)ba.setUint16(0,(t&2147483648)>>16|r>>13,!1);else{const i=n-127;i<-24?ba.setUint16(0,0):i<-14?ba.setUint16(0,(e&2147483648)>>16|1<<24+i,!1):ba.setUint16(0,(e&2147483648)>>16|i+15<<10|r>>13,!1)}}}function oO(t,e){if(t.length-e<2)throw new Error(`${$t} not enough data for float16`);const n=(t[e]<<8)+t[e+1];if(n===31744)return 1/0;if(n===64512)return-1/0;if(n===32256)return NaN;const r=n>>10&31,i=n&1023;let a;return r===0?a=i*2**-24:r!==31?a=(i+1024)*2**(r-25):a=i===0?1/0:NaN,n&32768?-a:a}function h$(t){ba.setFloat32(0,t,!1)}function sO(t,e){if(t.length-e<4)throw new Error(`${$t} not enough data for float32`);const n=(t.byteOffset||0)+e;return new DataView(t.buffer,n,4).getFloat32(0,!1)}function fte(t){ba.setFloat64(0,t,!1)}function d$(t,e){if(t.length-e<8)throw new Error(`${$t} not enough data for float64`);const n=(t.byteOffset||0)+e;return new DataView(t.buffer,n,8).getFloat64(0,!1)}aO.compareTokens=bh.compareTokens;function tn(t,e,n){throw new Error(`${$t} encountered invalid minor (${n}) for major ${t[e]>>>5}`)}function X2(t){return()=>{throw new Error(`${$t} ${t}`)}}const Ie=[];for(let t=0;t<=23;t++)Ie[t]=tn;Ie[24]=bee;Ie[25]=wee;Ie[26]=xee;Ie[27]=Aee;Ie[28]=tn;Ie[29]=tn;Ie[30]=tn;Ie[31]=tn;for(let t=32;t<=55;t++)Ie[t]=tn;Ie[56]=Eee;Ie[57]=See;Ie[58]=Pee;Ie[59]=Oee;Ie[60]=tn;Ie[61]=tn;Ie[62]=tn;Ie[63]=tn;for(let t=64;t<=87;t++)Ie[t]=Tee;Ie[88]=Cee;Ie[89]=kee;Ie[90]=_ee;Ie[91]=Nee;Ie[92]=tn;Ie[93]=tn;Ie[94]=tn;Ie[95]=X2("indefinite length bytes/strings are not supported");for(let t=96;t<=119;t++)Ie[t]=Ree;Ie[120]=Mee;Ie[121]=Bee;Ie[122]=Dee;Ie[123]=Lee;Ie[124]=tn;Ie[125]=tn;Ie[126]=tn;Ie[127]=X2("indefinite length bytes/strings are not supported");for(let t=128;t<=151;t++)Ie[t]=Uee;Ie[152]=Fee;Ie[153]=jee;Ie[154]=zee;Ie[155]=Hee;Ie[156]=tn;Ie[157]=tn;Ie[158]=tn;Ie[159]=Gee;for(let t=160;t<=183;t++)Ie[t]=Vee;Ie[184]=Qee;Ie[185]=Kee;Ie[186]=Wee;Ie[187]=Jee;Ie[188]=tn;Ie[189]=tn;Ie[190]=tn;Ie[191]=Yee;for(let t=192;t<=215;t++)Ie[t]=Xee;Ie[216]=Zee;Ie[217]=qee;Ie[218]=ete;Ie[219]=tte;Ie[220]=tn;Ie[221]=tn;Ie[222]=tn;Ie[223]=tn;for(let t=224;t<=243;t++)Ie[t]=X2("simple values are not supported");Ie[244]=tn;Ie[245]=tn;Ie[246]=tn;Ie[247]=ote;Ie[248]=X2("simple values are not supported");Ie[249]=lte;Ie[250]=cte;Ie[251]=ute;Ie[252]=tn;Ie[253]=tn;Ie[254]=tn;Ie[255]=ste;const gs=[];for(let t=0;t<24;t++)gs[t]=new ut(de.uint,t,1);for(let t=-1;t>=-24;t--)gs[31-t]=new ut(de.negint,t,1);gs[64]=new ut(de.bytes,new Uint8Array(0),1);gs[96]=new ut(de.string,"",1);gs[128]=new ut(de.array,0,1);gs[160]=new ut(de.map,0,1);gs[244]=new ut(de.false,!1,1);gs[245]=new ut(de.true,!0,1);gs[246]=new ut(de.null,null,1);function hte(t){switch(t.type){case de.false:return bs([244]);case de.true:return bs([245]);case de.null:return bs([246]);case de.bytes:return t.value.length?void 0:bs([64]);case de.string:return t.value===""?bs([96]):void 0;case de.array:return t.value===0?bs([128]):void 0;case de.map:return t.value===0?bs([160]):void 0;case de.uint:return t.value<24?bs([Number(t.value)]):void 0;case de.negint:if(t.value>=-24)return bs([31-Number(t.value)])}}const dte={float64:!1,mapSorter:yte,quickEncodeToken:hte};function pte(){const t=[];return t[de.uint.major]=bh,t[de.negint.major]=eO,t[de.bytes.major]=Y2,t[de.string.major]=$ee,t[de.array.major]=tO,t[de.map.major]=nO,t[de.tag.major]=rO,t[de.float.major]=aO,t}const p$=pte(),Y6=new s$;class tx{constructor(e,n){this.obj=e,this.parent=n}includes(e){let n=this;do if(n.obj===e)return!0;while(n=n.parent);return!1}static createCheck(e,n){if(e&&e.includes(n))throw new Error(`${l$} object contains circular references`);return new tx(n,e)}}const Ql={null:new ut(de.null,null),undefined:new ut(de.undefined,void 0),true:new ut(de.true,!0),false:new ut(de.false,!1),emptyArray:new ut(de.array,0),emptyMap:new ut(de.map,0)},eu={number(t,e,n,r){return!Number.isInteger(t)||!Number.isSafeInteger(t)?new ut(de.float,t):t>=0?new ut(de.uint,t):new ut(de.negint,t)},bigint(t,e,n,r){return t>=BigInt(0)?new ut(de.uint,t):new ut(de.negint,t)},Uint8Array(t,e,n,r){return new ut(de.bytes,t)},string(t,e,n,r){return new ut(de.string,t)},boolean(t,e,n,r){return t?Ql.true:Ql.false},null(t,e,n,r){return Ql.null},undefined(t,e,n,r){return Ql.undefined},ArrayBuffer(t,e,n,r){return new ut(de.bytes,new Uint8Array(t))},DataView(t,e,n,r){return new ut(de.bytes,new Uint8Array(t.buffer,t.byteOffset,t.byteLength))},Array(t,e,n,r){if(!t.length)return n.addBreakTokens===!0?[Ql.emptyArray,new ut(de.break)]:Ql.emptyArray;r=tx.createCheck(r,t);const i=[];let a=0;for(const o of t)i[a++]=qb(o,n,r);return n.addBreakTokens?[new ut(de.array,t.length),i,new ut(de.break)]:[new ut(de.array,t.length),i]},Object(t,e,n,r){const i=e!=="Object",a=i?t.keys():Object.keys(t),o=i?t.size:a.length;if(!o)return n.addBreakTokens===!0?[Ql.emptyMap,new ut(de.break)]:Ql.emptyMap;r=tx.createCheck(r,t);const s=[];let l=0;for(const c of a)s[l++]=[qb(c,n,r),qb(i?t.get(c):t[c],n,r)];return gte(s,n),n.addBreakTokens?[new ut(de.map,o),s,new ut(de.break)]:[new ut(de.map,o),s]}};eu.Map=eu.Object;eu.Buffer=eu.Uint8Array;for(const t of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))eu[`${t}Array`]=eu.DataView;function qb(t,e={},n){const r=see(t),i=e&&e.typeEncoders&&e.typeEncoders[r]||eu[r];if(typeof i=="function"){const o=i(t,r,e,n);if(o!=null)return o}const a=eu[r];if(!a)throw new Error(`${l$} unsupported type: ${r}`);return a(t,r,e,n)}function gte(t,e){e.mapSorter&&t.sort(e.mapSorter)}function yte(t,e){const n=Array.isArray(t[0])?t[0][0]:t[0],r=Array.isArray(e[0])?e[0][0]:e[0];if(n.type!==r.type)return n.type.compare(r.type);const i=n.type.major,a=p$[i].compareTokens(n,r);return a===0&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone"),a}function g$(t,e,n,r){if(Array.isArray(e))for(const i of e)g$(t,i,n,r);else n[e.type.major](t,e,r)}function mte(t,e,n){const r=qb(t,n);if(!Array.isArray(r)&&n.quickEncodeToken){const i=n.quickEncodeToken(r);if(i)return i;const a=e[r.type.major];if(a.encodedSize){const o=a.encodedSize(r,n),s=new s$(o);if(a(s,r,n),s.chunks.length!==1)throw new Error(`Unexpected error: pre-calculated length for ${r} was wrong`);return o$(s.chunks[0])}}return Y6.reset(),g$(Y6,r,e,n),Y6.toBytes(!0)}function Fh(t,e){return e=Object.assign({},dte,e),mte(t,p$,e)}const vte={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0};class bte{constructor(e,n={}){this.pos=0,this.data=e,this.options=n}done(){return this.pos>=this.data.length}next(){const e=this.data[this.pos];let n=gs[e];if(n===void 0){const r=Ie[e];if(!r)throw new Error(`${$t} no decoder for major type ${e>>>5} (byte 0x${e.toString(16).padStart(2,"0")})`);const i=e&31;n=r(this.data,this.pos,i,this.options)}return this.pos+=n.encodedLength,n}}const h1=Symbol.for("DONE"),Z2=Symbol.for("BREAK");function wte(t,e,n){const r=[];for(let i=0;ia.trim());for(let a=0;aPromise.resolve(t[r])))).reduce((r,i,a)=>(r[e[a]]=i,r),{})}function mt(t,e,n){for(let r in e){let i=e[r];const a=n?n[r]:null;a&&Ete(i,a,r),Object.defineProperty(t,r,{enumerable:!0,value:i,writable:!1})}}function hd(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(hd).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let n="0x";for(let r=0;r>4],n+=e[t[r]&15];return n}if(typeof t=="object"&&typeof t.toJSON=="function")return hd(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(n=>`${hd(n)}: ${hd(t[n])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Kr(t,e){return t&&t.code===e}function lO(t){return Kr(t,"CALL_EXCEPTION")}function qn(t,e,n){let r=t;{const a=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will overwrite populated values: ${hd(n)}`);for(const o in n){if(o==="shortMessage")continue;const s=n[o];a.push(o+"="+hd(s))}}a.push(`code=${e}`),a.push(`version=${Ate}`),a.length&&(t+=" ("+a.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(t);break;default:i=new Error(t)}return mt(i,{code:e}),n&&Object.assign(i,n),i.shortMessage==null&&mt(i,{shortMessage:r}),i}function me(t,e,n,r){if(!t)throw qn(e,n,r)}function J(t,e,n,r){me(t,e,"INVALID_ARGUMENT",{argument:n,value:r})}function y$(t,e,n){n==null&&(n=""),n&&(n=": "+n),me(t>=e,"missing arguemnt"+n,"MISSING_ARGUMENT",{count:t,expectedCount:e}),me(t<=e,"too many arguemnts"+n,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const Ste=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");t.push(e)}catch{}return t},[]);function Pte(t){me(Ste.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function q2(t,e,n){if(n==null&&(n=""),t!==e){let r=n,i="new";n&&(r+=".",i+=" "+n),me(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function m$(t,e,n){if(t instanceof Uint8Array)return n?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x([0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((t.length-2)/2);let i=2;for(let a=0;a>4]+Bk[i&15]}return n}function sr(t){return"0x"+t.map(e=>Ze(e).substring(2)).join("")}function Nd(t){return In(t,!0)?(t.length-2)/2:Pt(t).length}function Fn(t,e,n){const r=Pt(t);return n!=null&&n>r.length&&me(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),Ze(r.slice(e??0,n??r.length))}function v$(t,e,n){const r=Pt(t);me(e>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),n?i.set(r,e-r.length):i.set(r,0),Ze(i)}function oh(t,e){return v$(t,e,!0)}function Ote(t,e){return v$(t,e,!1)}const eA=BigInt(0),wo=BigInt(1),dd=9007199254740991;function Tte(t,e){const n=tA(t,"value"),r=BigInt(Lt(e,"width"));if(me(n>>r===eA,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),n>>r-wo){const i=(wo<=-dd&&t<=dd,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(n){J(!1,`invalid BigNumberish string: ${n.message}`,e||"value",t)}}J(!1,"invalid BigNumberish value",e||"value",t)}function tA(t,e){const n=ot(t,e);return me(n>=eA,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),n}const Dk="0123456789abcdef";function cO(t){if(t instanceof Uint8Array){let e="0x0";for(const n of t)e+=Dk[n>>4],e+=Dk[n&15];return BigInt(e)}return ot(t)}function Lt(t,e){switch(typeof t){case"bigint":return J(t>=-dd&&t<=dd,"overflow",e||"value",t),Number(t);case"number":return J(Number.isInteger(t),"underflow",e||"value",t),J(t>=-dd&&t<=dd,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return Lt(BigInt(t),e)}catch(n){J(!1,`invalid numeric string: ${n.message}`,e||"value",t)}}J(!1,"invalid numeric value",e||"value",t)}function Cte(t){return Lt(cO(t))}function fs(t,e){let r=tA(t,"value").toString(16);if(e==null)r.length%2&&(r="0"+r);else{const i=Lt(e,"width");for(me(i*2>=r.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});r.length>6===2;o++)a++;return a}return t==="OVERRUN"?n.length-e-1:0}function Rte(t,e,n,r,i){return t==="OVERLONG"?(J(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),x$(t,e,n))}const Mte=Object.freeze({error:Ite,ignore:x$,replace:Rte});function Bte(t,e){e==null&&(e=Mte.error);const n=Pt(t,"bytes"),r=[];let i=0;for(;i>7)){r.push(a);continue}let o=null,s=null;if((a&224)===192)o=1,s=127;else if((a&240)===224)o=2,s=2047;else if((a&248)===240)o=3,s=65535;else{(a&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,n,r):i+=e("BAD_PREFIX",i-1,n,r);continue}if(i-1+o>=n.length){i+=e("OVERRUN",i-1,n,r);continue}let l=a&(1<<8-o-1)-1;for(let c=0;c1114111){i+=e("OUT_OF_RANGE",i-1-o,n,r,l);continue}if(l>=55296&&l<=57343){i+=e("UTF16_SURROGATE",i-1-o,n,r,l);continue}if(l<=s){i+=e("OVERLONG",i-1-o,n,r,l);continue}r.push(l)}}return r}function dl(t,e){e!=null&&(Pte(e),t=t.normalize(e));let n=[];for(let r=0;r>6|192),n.push(i&63|128);else if((i&64512)==55296){r++;const a=t.charCodeAt(r);J(r>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128)}else n.push(i>>12|224),n.push(i>>6&63|128),n.push(i&63|128)}return new Uint8Array(n)}function Dte(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function uO(t,e){return Dte(Bte(t,e))}function A$(t){async function e(n,r){const i=n.url.split(":")[0].toLowerCase();me(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),me(i==="https"||!n.credentials||n.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let a;if(r){const f=new AbortController;a=f.signal,r.addListener(()=>{f.abort()})}const o={method:n.method,headers:new Headers(Array.from(n)),body:n.body||void 0,signal:a},s=await fetch(n.url,o),l={};s.headers.forEach((f,h)=>{l[h.toLowerCase()]=f});const c=await s.arrayBuffer(),u=c==null?null:new Uint8Array(c);return{statusCode:s.status,statusMessage:s.statusText,headers:l,body:u}}return e}const Lte=12,$te=250;let Uk=A$();const Ute=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Fte=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let X6=!1;async function E$(t,e){try{const n=t.match(Ute);if(!n)throw new Error("invalid data");return new Jc(200,"OK",{"content-type":n[1]||"text/plain"},n[2]?_te(n[3]):zte(n[3]))}catch{return new Jc(599,"BAD REQUEST (invalid data: URI)",{},null,new Sl(t))}}function S$(t){async function e(n,r){try{const i=n.match(Fte);if(!i)throw new Error("invalid link");return new Sl(`${t}${i[2]}`)}catch{return new Jc(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Sl(n))}}return e}const Xv={data:E$,ipfs:S$("https://gateway.ipfs.io/ipfs/")},P$=new WeakMap;var gf,mc;class jte{constructor(e){M(this,gf,void 0);M(this,mc,void 0);O(this,gf,[]),O(this,mc,!1),P$.set(e,()=>{if(!v(this,mc)){O(this,mc,!0);for(const n of v(this,gf))setTimeout(()=>{n()},0);O(this,gf,[])}})}addListener(e){me(!v(this,mc),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),v(this,gf).push(e)}get cancelled(){return v(this,mc)}checkSignal(){me(!this.cancelled,"cancelled","CANCELLED",{})}}gf=new WeakMap,mc=new WeakMap;function Zv(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var P0,O0,lo,Hs,T0,C0,ur,qi,Gs,yf,mf,vf,Vo,Vs,vc,bf,sy;const c2=class c2{constructor(e){M(this,bf);M(this,P0,void 0);M(this,O0,void 0);M(this,lo,void 0);M(this,Hs,void 0);M(this,T0,void 0);M(this,C0,void 0);M(this,ur,void 0);M(this,qi,void 0);M(this,Gs,void 0);M(this,yf,void 0);M(this,mf,void 0);M(this,vf,void 0);M(this,Vo,void 0);M(this,Vs,void 0);M(this,vc,void 0);O(this,C0,String(e)),O(this,P0,!1),O(this,O0,!0),O(this,lo,{}),O(this,Hs,""),O(this,T0,3e5),O(this,Vs,{slotInterval:$te,maxAttempts:Lte}),O(this,vc,null)}get url(){return v(this,C0)}set url(e){O(this,C0,String(e))}get body(){return v(this,ur)==null?null:new Uint8Array(v(this,ur))}set body(e){if(e==null)O(this,ur,void 0),O(this,qi,void 0);else if(typeof e=="string")O(this,ur,dl(e)),O(this,qi,"text/plain");else if(e instanceof Uint8Array)O(this,ur,e),O(this,qi,"application/octet-stream");else if(typeof e=="object")O(this,ur,dl(JSON.stringify(e))),O(this,qi,"application/json");else throw new Error("invalid body")}hasBody(){return v(this,ur)!=null}get method(){return v(this,Hs)?v(this,Hs):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),O(this,Hs,String(e).toUpperCase())}get headers(){const e=Object.assign({},v(this,lo));return v(this,Gs)&&(e.authorization=`Basic ${Nte(dl(v(this,Gs)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&v(this,qi)&&(e["content-type"]=v(this,qi)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,n){v(this,lo)[String(e).toLowerCase()]=String(n)}clearHeaders(){O(this,lo,{})}[Symbol.iterator](){const e=this.headers,n=Object.keys(e);let r=0;return{next:()=>{if(r=0,"timeout must be non-zero","timeout",e),O(this,T0,e)}get preflightFunc(){return v(this,yf)||null}set preflightFunc(e){O(this,yf,e)}get processFunc(){return v(this,mf)||null}set processFunc(e){O(this,mf,e)}get retryFunc(){return v(this,vf)||null}set retryFunc(e){O(this,vf,e)}get getUrlFunc(){return v(this,vc)||Uk}set getUrlFunc(e){O(this,vc,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(v(this,Vs).slotInterval=e.slotInterval),e.maxAttempts!=null&&(v(this,Vs).maxAttempts=e.maxAttempts)}send(){return me(v(this,Vo)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),O(this,Vo,new jte(this)),ie(this,bf,sy).call(this,0,Fk()+this.timeout,0,this,new Jc(0,"",{},null,this))}cancel(){me(v(this,Vo)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=P$.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const n=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();me(this.method==="GET"&&(n!=="https"||r!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new c2(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,O(i,lo,Object.assign({},v(this,lo))),v(this,ur)&&O(i,ur,new Uint8Array(v(this,ur))),O(i,qi,v(this,qi)),i}clone(){const e=new c2(this.url);return O(e,Hs,v(this,Hs)),v(this,ur)&&O(e,ur,v(this,ur)),O(e,qi,v(this,qi)),O(e,lo,Object.assign({},v(this,lo))),O(e,Gs,v(this,Gs)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),O(e,yf,v(this,yf)),O(e,mf,v(this,mf)),O(e,vf,v(this,vf)),O(e,vc,v(this,vc)),e}static lockConfig(){X6=!0}static getGateway(e){return Xv[e.toLowerCase()]||null}static registerGateway(e,n){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(X6)throw new Error("gateways locked");Xv[e]=n}static registerGetUrl(e){if(X6)throw new Error("gateways locked");Uk=e}static createGetUrlFunc(e){return A$()}static createDataGateway(){return E$}static createIpfsGatewayFunc(e){return S$(e)}};P0=new WeakMap,O0=new WeakMap,lo=new WeakMap,Hs=new WeakMap,T0=new WeakMap,C0=new WeakMap,ur=new WeakMap,qi=new WeakMap,Gs=new WeakMap,yf=new WeakMap,mf=new WeakMap,vf=new WeakMap,Vo=new WeakMap,Vs=new WeakMap,vc=new WeakMap,bf=new WeakSet,sy=async function(e,n,r,i,a){var u,f,h;if(e>=v(this,Vs).maxAttempts)return a.makeServerError("exceeded maximum retry limit");me(Fk()<=n,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),r>0&&await Hte(r);let o=this.clone();const s=(o.url.split(":")[0]||"").toLowerCase();if(s in Xv){const d=await Xv[s](o.url,Zv(v(i,Vo)));if(d instanceof Jc){let g=d;if(this.processFunc){Zv(v(i,Vo));try{g=await this.processFunc(o,g)}catch(p){(p.throttle==null||typeof p.stall!="number")&&g.makeServerError("error in post-processing function",p).assertOk()}}return g}o=d}this.preflightFunc&&(o=await this.preflightFunc(o));const l=await this.getUrlFunc(o,Zv(v(i,Vo)));let c=new Jc(l.statusCode,l.statusMessage,l.headers,l.body,i);if(c.statusCode===301||c.statusCode===302){try{const d=c.headers.location||"";return ie(u=o.redirect(d),bf,sy).call(u,e+1,n,0,i,c)}catch{}return c}else if(c.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,c,e))){const d=c.headers["retry-after"];let g=v(this,Vs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof d=="string"&&d.match(/^[1-9][0-9]*$/)&&(g=parseInt(d)),ie(f=o.clone(),bf,sy).call(f,e+1,n,g,i,c)}if(this.processFunc){Zv(v(i,Vo));try{c=await this.processFunc(o,c)}catch(d){(d.throttle==null||typeof d.stall!="number")&&c.makeServerError("error in post-processing function",d).assertOk();let g=v(this,Vs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return d.stall>=0&&(g=d.stall),ie(h=o.clone(),bf,sy).call(h,e+1,n,g,i,c)}}return c};let Sl=c2;var km,_m,Nm,co,k0,wf;const B4=class B4{constructor(e,n,r,i,a){M(this,km,void 0);M(this,_m,void 0);M(this,Nm,void 0);M(this,co,void 0);M(this,k0,void 0);M(this,wf,void 0);O(this,km,e),O(this,_m,n),O(this,Nm,Object.keys(r).reduce((o,s)=>(o[s.toLowerCase()]=String(r[s]),o),{})),O(this,co,i==null?null:new Uint8Array(i)),O(this,k0,a||null),O(this,wf,{message:""})}toString(){return``}get statusCode(){return v(this,km)}get statusMessage(){return v(this,_m)}get headers(){return Object.assign({},v(this,Nm))}get body(){return v(this,co)==null?null:new Uint8Array(v(this,co))}get bodyText(){try{return v(this,co)==null?"":uO(v(this,co))}catch{me(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{me(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,n=Object.keys(e);let r=0;return{next:()=>{if(r=0,"invalid stall timeout","stall",n);const r=new Error(e||"throttling requests");throw mt(r,{stall:n,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return v(this,co)!=null}get request(){return v(this,k0)}ok(){return v(this,wf).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:n}=v(this,wf);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`),me(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:n})}};km=new WeakMap,_m=new WeakMap,Nm=new WeakMap,co=new WeakMap,k0=new WeakMap,wf=new WeakMap;let Jc=B4;function Fk(){return new Date().getTime()}function zte(t){return dl(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,n)=>String.fromCharCode(parseInt(n,16))))}function Hte(t){return new Promise(e=>setTimeout(e,t))}function Gte(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function jk(t,e,n){let r=0;for(let i=0;i{me(r<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:r})};if(t[e]>=248){const r=t[e]-247;n(e+1+r);const i=jk(t,e+1,r);return n(e+1+r+i),zk(t,e,e+1+r,r+i)}else if(t[e]>=192){const r=t[e]-192;return n(e+1+r),zk(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;n(e+1+r);const i=jk(t,e+1,r);n(e+1+r+i);const a=Ze(t.slice(e+1+r,e+1+r+i));return{consumed:1+r+i,result:a}}else if(t[e]>=128){const r=t[e]-128;n(e+1+r);const i=Ze(t.slice(e+1,e+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:Gte(t[e])}}function fO(t){const e=Pt(t,"data"),n=O$(e,0);return J(n.consumed===e.length,"unexpected junk after rlp payload","data",t),n.result}function Hk(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function T$(t){if(Array.isArray(t)){let r=[];if(t.forEach(function(a){r=r.concat(T$(a))}),r.length<=55)return r.unshift(192+r.length),r;const i=Hk(r.length);return i.unshift(247+i.length),i.concat(r)}const e=Array.prototype.slice.call(Pt(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const n=Hk(e.length);return n.unshift(183+n.length),n.concat(e)}const Gk="0123456789abcdef";function p1(t){let e="0x";for(const n of T$(t))e+=Gk[n>>4],e+=Gk[n&15];return e}const ui=32,w3=new Uint8Array(ui),Vte=["then"],qv={};function Lg(t,e){const n=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw n.error=e,n}var bc;const $y=class $y extends Array{constructor(...n){const r=n[0];let i=n[1],a=(n[2]||[]).slice(),o=!0;r!==qv&&(i=n,a=[],o=!1);super(i.length);M(this,bc,void 0);i.forEach((l,c)=>{this[c]=l});const s=a.reduce((l,c)=>(typeof c=="string"&&l.set(c,(l.get(c)||0)+1),l),new Map);if(O(this,bc,Object.freeze(i.map((l,c)=>{const u=a[c];return u!=null&&s.get(u)===1?u:null}))),!!o)return Object.freeze(this),new Proxy(this,{get:(l,c,u)=>{if(typeof c=="string"){if(c.match(/^[0-9]+$/)){const h=Lt(c,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");const d=l[h];return d instanceof Error&&Lg(`index ${h}`,d),d}if(Vte.indexOf(c)>=0)return Reflect.get(l,c,u);const f=l[c];if(f instanceof Function)return function(...h){return f.apply(this===u?l:this,h)};if(!(c in l))return l.getValue.apply(this===u?l:this,[c])}return Reflect.get(l,c,u)}})}toArray(){const n=[];return this.forEach((r,i)=>{r instanceof Error&&Lg(`index ${i}`,r),n.push(r)}),n}toObject(){return v(this,bc).reduce((n,r,i)=>(me(r!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),r in n||(n[r]=this.getValue(r)),n),{})}slice(n,r){n==null&&(n=0),n<0&&(n+=this.length,n<0&&(n=0)),r==null&&(r=this.length),r<0&&(r+=this.length,r<0&&(r=0)),r>this.length&&(r=this.length);const i=[],a=[];for(let o=n;o{v(this,Qs)[e]=Vk(n)}}}Qs=new WeakMap,xf=new WeakMap,_0=new WeakSet,tw=function(e){return v(this,Qs).push(e),O(this,xf,v(this,xf)+e.length),e.length};var Ai,ea,Af,Ef,wc,Im,E3,u2,C$;const D4=class D4{constructor(e,n,r){M(this,Im);M(this,u2);R(this,"allowLoose");M(this,Ai,void 0);M(this,ea,void 0);M(this,Af,void 0);M(this,Ef,void 0);M(this,wc,void 0);mt(this,{allowLoose:!!n}),O(this,Ai,Or(e)),O(this,Af,0),O(this,Ef,null),O(this,wc,r??1024),O(this,ea,0)}get data(){return Ze(v(this,Ai))}get dataLength(){return v(this,Ai).length}get consumed(){return v(this,ea)}get bytes(){return new Uint8Array(v(this,Ai))}subReader(e){const n=new D4(v(this,Ai).slice(v(this,ea)+e),this.allowLoose,v(this,wc));return O(n,Ef,this),n}readBytes(e,n){let r=ie(this,u2,C$).call(this,0,e,!!n);return ie(this,Im,E3).call(this,e),O(this,ea,v(this,ea)+r.length),r.slice(0,e)}readValue(){return cO(this.readBytes(ui))}readIndex(){return Cte(this.readBytes(ui))}};Ai=new WeakMap,ea=new WeakMap,Af=new WeakMap,Ef=new WeakMap,wc=new WeakMap,Im=new WeakSet,E3=function(e){var n;if(v(this,Ef))return ie(n=v(this,Ef),Im,E3).call(n,e);O(this,Af,v(this,Af)+e),me(v(this,wc)<1||v(this,Af)<=v(this,wc)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${v(this,wc)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:Or(v(this,Ai)),offset:v(this,ea),length:e,info:{bytesRead:v(this,Af),dataLength:this.dataLength}})},u2=new WeakSet,C$=function(e,n,r){let i=Math.ceil(n/ui)*ui;return v(this,ea)+i>v(this,Ai).length&&(this.allowLoose&&r&&v(this,ea)+n<=v(this,Ai).length?i=n:me(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Or(v(this,Ai)),length:v(this,Ai).length,offset:v(this,ea)+i})),v(this,Ai).slice(v(this,ea),v(this,ea)+i)};let A3=D4,k$=!1;const _$=function(t){return $D(t)};let N$=_$;function Nn(t){const e=Pt(t,"data");return Ze(N$(e))}Nn._=_$;Nn.lock=function(){k$=!0};Nn.register=function(t){if(k$)throw new TypeError("keccak256 is locked");N$=t};Object.freeze(Nn);const S3="0x0000000000000000000000000000000000000000",Qk="0x0000000000000000000000000000000000000000000000000000000000000000",Kk=BigInt(0),Wk=BigInt(1),Jk=BigInt(2),Yk=BigInt(27),Xk=BigInt(28),eb=BigInt(35),kh={};function Zk(t){return oh(sa(t),32)}var N0,I0,R0,Sf;const to=class to{constructor(e,n,r,i){M(this,N0,void 0);M(this,I0,void 0);M(this,R0,void 0);M(this,Sf,void 0);q2(e,kh,"Signature"),O(this,N0,n),O(this,I0,r),O(this,R0,i),O(this,Sf,null)}get r(){return v(this,N0)}set r(e){J(Nd(e)===32,"invalid r","value",e),O(this,N0,Ze(e))}get s(){return v(this,I0)}set s(e){J(Nd(e)===32,"invalid s","value",e);const n=Ze(e);J(parseInt(n.substring(0,3))<8,"non-canonical s","value",n),O(this,I0,n)}get v(){return v(this,R0)}set v(e){const n=Lt(e,"value");J(n===27||n===28,"invalid v","v",e),O(this,R0,n)}get networkV(){return v(this,Sf)}get legacyChainId(){const e=this.networkV;return e==null?null:to.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=Pt(this.s);return this.yParity&&(e[0]|=128),Ze(e)}get compactSerialized(){return sr([this.r,this.yParityAndS])}get serialized(){return sr([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new to(kh,this.r,this.s,this.v);return this.networkV&&O(e,Sf,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const n=ot(e,"v");return n==Yk||n==Xk?Kk:(J(n>=eb,"invalid EIP-155 v","v",e),(n-eb)/Jk)}static getChainIdV(e,n){return ot(e)*Jk+BigInt(35+n-27)}static getNormalizedV(e){const n=ot(e);return n===Kk||n===Yk?27:n===Wk||n===Xk?28:(J(n>=eb,"invalid v","v",e),n&Wk?27:28)}static from(e){function n(c,u){J(c,u,"signature",e)}if(e==null)return new to(kh,Qk,Qk,27);if(typeof e=="string"){const c=Pt(e,"signature");if(c.length===64){const u=Ze(c.slice(0,32)),f=c.slice(32,64),h=f[0]&128?28:27;return f[0]&=127,new to(kh,u,Ze(f),h)}if(c.length===65){const u=Ze(c.slice(0,32)),f=c.slice(32,64);n((f[0]&128)===0,"non-canonical s");const h=to.getNormalizedV(c[64]);return new to(kh,u,Ze(f),h)}n(!1,"invalid raw signature length")}if(e instanceof to)return e.clone();const r=e.r;n(r!=null,"missing r");const i=Zk(r),a=function(c,u){if(c!=null)return Zk(c);if(u!=null){n(In(u,32),"invalid yParityAndS");const f=Pt(u);return f[0]&=127,Ze(f)}n(!1,"missing s")}(e.s,e.yParityAndS);n((Pt(a)[0]&128)==0,"non-canonical s");const{networkV:o,v:s}=function(c,u,f){if(c!=null){const h=ot(c);return{networkV:h>=eb?h:void 0,v:to.getNormalizedV(h)}}if(u!=null)return n(In(u,32),"invalid yParityAndS"),{v:Pt(u)[0]&128?28:27};if(f!=null){switch(Lt(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}n(!1,"invalid yParity")}n(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),l=new to(kh,i,a,s);return o&&O(l,Sf,o),n(e.yParity==null||Lt(e.yParity,"sig.yParity")===l.yParity,"yParity mismatch"),n(e.yParityAndS==null||e.yParityAndS===l.yParityAndS,"yParityAndS mismatch"),l}};N0=new WeakMap,I0=new WeakMap,R0=new WeakMap,Sf=new WeakMap;let To=to;var Ks;const ku=class ku{constructor(e){M(this,Ks,void 0);J(Nd(e)===32,"invalid private key","privateKey","[REDACTED]"),O(this,Ks,Ze(e))}get privateKey(){return v(this,Ks)}get publicKey(){return ku.computePublicKey(v(this,Ks))}get compressedPublicKey(){return ku.computePublicKey(v(this,Ks),!0)}sign(e){J(Nd(e)===32,"invalid digest length","digest",e);const n=ri.sign(Or(e),Or(v(this,Ks)),{lowS:!0});return To.from({r:fs(n.r,32),s:fs(n.s,32),v:n.recovery?28:27})}computeSharedSecret(e){const n=ku.computePublicKey(e);return Ze(ri.getSharedSecret(Or(v(this,Ks)),Pt(n),!1))}static computePublicKey(e,n){let r=Pt(e,"key");if(r.length===32){const a=ri.getPublicKey(r,!!n);return Ze(a)}if(r.length===64){const a=new Uint8Array(65);a[0]=4,a.set(r,1),r=a}const i=ri.ProjectivePoint.fromHex(r);return Ze(i.toRawBytes(n))}static recoverPublicKey(e,n){J(Nd(e)===32,"invalid digest length","digest",e);const r=To.from(n);let i=ri.Signature.fromCompact(Or(sr([r.r,r.s])));i=i.addRecoveryBit(r.yParity);const a=i.recoverPublicKey(Or(e));return J(a!=null,"invalid signautre for digest","signature",n),"0x"+a.toHex(!1)}static addPoints(e,n,r){const i=ri.ProjectivePoint.fromHex(ku.computePublicKey(e).substring(2)),a=ri.ProjectivePoint.fromHex(ku.computePublicKey(n).substring(2));return"0x"+i.add(a).toHex(!!r)}};Ks=new WeakMap;let g1=ku;const Qte=BigInt(0),Kte=BigInt(36);function qk(t){t=t.toLowerCase();const e=t.substring(2).split(""),n=new Uint8Array(40);for(let i=0;i<40;i++)n[i]=e[i].charCodeAt(0);const r=Pt(Nn(n));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(r[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const hO={};for(let t=0;t<10;t++)hO[String(t)]=String(t);for(let t=0;t<26;t++)hO[String.fromCharCode(65+t)]=String(10+t);const e_=15;function Wte(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(r=>hO[r]).join("");for(;e.length>=e_;){let r=e.substring(0,e_);e=parseInt(r,10)%97+e.substring(r.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}const Jte=function(){const t={};for(let e=0;e<36;e++){const n="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[n]=BigInt(e)}return t}();function Yte(t){t=t.toLowerCase();let e=Qte;for(let n=0;ne.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return v(this,Pf)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return v(this,Pf)===!0?-1:v(this,Pf)===!1?this.value.length:null}static from(e,n){return new Os(Es,e,n)}static uint8(e){return Qe(e,8)}static uint16(e){return Qe(e,16)}static uint24(e){return Qe(e,24)}static uint32(e){return Qe(e,32)}static uint40(e){return Qe(e,40)}static uint48(e){return Qe(e,48)}static uint56(e){return Qe(e,56)}static uint64(e){return Qe(e,64)}static uint72(e){return Qe(e,72)}static uint80(e){return Qe(e,80)}static uint88(e){return Qe(e,88)}static uint96(e){return Qe(e,96)}static uint104(e){return Qe(e,104)}static uint112(e){return Qe(e,112)}static uint120(e){return Qe(e,120)}static uint128(e){return Qe(e,128)}static uint136(e){return Qe(e,136)}static uint144(e){return Qe(e,144)}static uint152(e){return Qe(e,152)}static uint160(e){return Qe(e,160)}static uint168(e){return Qe(e,168)}static uint176(e){return Qe(e,176)}static uint184(e){return Qe(e,184)}static uint192(e){return Qe(e,192)}static uint200(e){return Qe(e,200)}static uint208(e){return Qe(e,208)}static uint216(e){return Qe(e,216)}static uint224(e){return Qe(e,224)}static uint232(e){return Qe(e,232)}static uint240(e){return Qe(e,240)}static uint248(e){return Qe(e,248)}static uint256(e){return Qe(e,256)}static uint(e){return Qe(e,256)}static int8(e){return Qe(e,-8)}static int16(e){return Qe(e,-16)}static int24(e){return Qe(e,-24)}static int32(e){return Qe(e,-32)}static int40(e){return Qe(e,-40)}static int48(e){return Qe(e,-48)}static int56(e){return Qe(e,-56)}static int64(e){return Qe(e,-64)}static int72(e){return Qe(e,-72)}static int80(e){return Qe(e,-80)}static int88(e){return Qe(e,-88)}static int96(e){return Qe(e,-96)}static int104(e){return Qe(e,-104)}static int112(e){return Qe(e,-112)}static int120(e){return Qe(e,-120)}static int128(e){return Qe(e,-128)}static int136(e){return Qe(e,-136)}static int144(e){return Qe(e,-144)}static int152(e){return Qe(e,-152)}static int160(e){return Qe(e,-160)}static int168(e){return Qe(e,-168)}static int176(e){return Qe(e,-176)}static int184(e){return Qe(e,-184)}static int192(e){return Qe(e,-192)}static int200(e){return Qe(e,-200)}static int208(e){return Qe(e,-208)}static int216(e){return Qe(e,-216)}static int224(e){return Qe(e,-224)}static int232(e){return Qe(e,-232)}static int240(e){return Qe(e,-240)}static int248(e){return Qe(e,-248)}static int256(e){return Qe(e,-256)}static int(e){return Qe(e,-256)}static bytes1(e){return qt(e,1)}static bytes2(e){return qt(e,2)}static bytes3(e){return qt(e,3)}static bytes4(e){return qt(e,4)}static bytes5(e){return qt(e,5)}static bytes6(e){return qt(e,6)}static bytes7(e){return qt(e,7)}static bytes8(e){return qt(e,8)}static bytes9(e){return qt(e,9)}static bytes10(e){return qt(e,10)}static bytes11(e){return qt(e,11)}static bytes12(e){return qt(e,12)}static bytes13(e){return qt(e,13)}static bytes14(e){return qt(e,14)}static bytes15(e){return qt(e,15)}static bytes16(e){return qt(e,16)}static bytes17(e){return qt(e,17)}static bytes18(e){return qt(e,18)}static bytes19(e){return qt(e,19)}static bytes20(e){return qt(e,20)}static bytes21(e){return qt(e,21)}static bytes22(e){return qt(e,22)}static bytes23(e){return qt(e,23)}static bytes24(e){return qt(e,24)}static bytes25(e){return qt(e,25)}static bytes26(e){return qt(e,26)}static bytes27(e){return qt(e,27)}static bytes28(e){return qt(e,28)}static bytes29(e){return qt(e,29)}static bytes30(e){return qt(e,30)}static bytes31(e){return qt(e,31)}static bytes32(e){return qt(e,32)}static address(e){return new Os(Es,"address",e)}static bool(e){return new Os(Es,"bool",!!e)}static bytes(e){return new Os(Es,"bytes",e)}static string(e){return new Os(Es,"string",e)}static array(e,n){throw new Error("not implemented yet")}static tuple(e,n){throw new Error("not implemented yet")}static overrides(e){return new Os(Es,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===t_}static dereference(e,n){if(Os.isTyped(e)){if(e.type!==n)throw new Error(`invalid type: expecetd ${n}, got ${e.type}`);return e.value}return e}};Pf=new WeakMap;let Wr=Os;class Zte extends Ml{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,n){let r=Wr.dereference(n,"string");try{r=rn(r)}catch(i){return this._throwError(i.message,n)}return e.writeValue(r)}decode(e){return rn(fs(e.readValue(),20))}}class qte extends Ml{constructor(n){super(n.name,n.type,"_",n.dynamic);R(this,"coder");this.coder=n}defaultValue(){return this.coder.defaultValue()}encode(n,r){return this.coder.encode(n,r)}decode(n){return this.coder.decode(n)}}function R$(t,e,n){let r=[];if(Array.isArray(n))r=n;else if(n&&typeof n=="object"){let l={};r=e.map(c=>{const u=c.localName;return me(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:c},value:n}),me(!l[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:c},value:n}),l[u]=!0,n[u]})}else J(!1,"invalid tuple value","tuple",n);J(e.length===r.length,"types/value length mismatch","tuple",n);let i=new x3,a=new x3,o=[];e.forEach((l,c)=>{let u=r[c];if(l.dynamic){let f=a.length;l.encode(a,u);let h=i.writeUpdatableValue();o.push(d=>{h(d+f)})}else l.encode(i,u)}),o.forEach(l=>{l(i.length)});let s=t.appendWriter(i);return s+=t.appendWriter(a),s}function M$(t,e){let n=[],r=[],i=t.subReader(0);return e.forEach(a=>{let o=null;if(a.dynamic){let s=t.readIndex(),l=i.subReader(s);try{o=a.decode(l)}catch(c){if(Kr(c,"BUFFER_OVERRUN"))throw c;o=c,o.baseType=a.name,o.name=a.localName,o.type=a.type}}else try{o=a.decode(t)}catch(s){if(Kr(s,"BUFFER_OVERRUN"))throw s;o=s,o.baseType=a.name,o.name=a.localName,o.type=a.type}if(o==null)throw new Error("investigate");n.push(o),r.push(a.localName||null)}),rx.fromItems(n,r)}class ene extends Ml{constructor(n,r,i){const a=n.type+"["+(r>=0?r:"")+"]",o=r===-1||n.dynamic;super("array",a,i,o);R(this,"coder");R(this,"length");mt(this,{coder:n,length:r})}defaultValue(){const n=this.coder.defaultValue(),r=[];for(let i=0;io||i<-(o+sne))&&this._throwError("value out-of-bounds",r),i=b$(i,8*ui)}else(ioy(a,this.size*8))&&this._throwError("value out-of-bounds",r);return n.writeValue(i)}decode(n){let r=oy(n.readValue(),this.size*8);return this.signed&&(r=Tte(r,this.size*8)),r}}class une extends B${constructor(e){super("string",e)}defaultValue(){return""}encode(e,n){return super.encode(e,dl(Wr.dereference(n,"string")))}decode(e){return uO(super.decode(e))}}class tb extends Ml{constructor(n,r){let i=!1;const a=[];n.forEach(s=>{s.dynamic&&(i=!0),a.push(s.type)});const o="tuple("+a.join(",")+")";super("tuple",o,r,i);R(this,"coders");mt(this,{coders:Object.freeze(n.slice())})}defaultValue(){const n=[];this.coders.forEach(i=>{n.push(i.defaultValue())});const r=this.coders.reduce((i,a)=>{const o=a.localName;return o&&(i[o]||(i[o]=0),i[o]++),i},{});return this.coders.forEach((i,a)=>{let o=i.localName;!o||r[o]!==1||(o==="length"&&(o="_length"),n[o]==null&&(n[o]=n[a]))}),Object.freeze(n)}encode(n,r){const i=Wr.dereference(r,"tuple");return R$(n,this.coders,i)}decode(n){return M$(n,this.coders)}}function sh(t){return Nn(dl(t))}var fne="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";const n_=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),r_=4;function hne(t){let e=0;function n(){return t[e++]<<8|t[e++]}let r=n(),i=1,a=[0,1];for(let S=1;S>--l&1}const f=31,h=2**f,d=h>>>1,g=d>>1,p=h-1;let y=0;for(let S=0;S1;){let B=E+T>>>1;S>>1|u(),C=C<<1^d,N=(N^d)<<1|d|1;b=C,x=1+N-C}let A=r-4;return m.map(S=>{switch(S-A){case 3:return A+65792+(t[s++]<<16|t[s++]<<8|t[s++]);case 2:return A+256+(t[s++]<<8|t[s++]);case 1:return A+t[s++];default:return S-1}})}function dne(t){let e=0;return()=>t[e++]}function D$(t){return dne(hne(pne(t)))}function pne(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,a)=>e[i.charCodeAt(0)]=a);let n=t.length,r=new Uint8Array(6*n>>3);for(let i=0,a=0,o=0,s=0;i=8&&(r[a++]=s>>(o-=8));return r}function gne(t){return t&1?~t>>1:t>>1}function yne(t,e){let n=Array(t);for(let r=0,i=0;r{let e=y1(t);if(e.length)return e})}function $$(t){let e=[];for(;;){let n=t();if(n==0)break;e.push(mne(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(vne(n,t))}return e.flat()}function m1(t){let e=[];for(;;){let n=t(e.length);if(!n)break;e.push(n)}return e}function U$(t,e,n){let r=Array(t).fill().map(()=>[]);for(let i=0;ir[o].push(a));return r}function mne(t,e){let n=1+e(),r=e(),i=m1(e);return U$(i.length,1+t,e).flatMap((o,s)=>{let[l,...c]=o;return Array(i[s]).fill().map((u,f)=>{let h=f*r;return[l+f*n,c.map(d=>d+h)]})})}function vne(t,e){let n=1+e();return U$(n,1+t,e).map(i=>[i[0],i.slice(1)])}function bne(t){let e=[],n=y1(t);return i(r([]),[]),e;function r(a){let o=t(),s=m1(()=>{let l=y1(t).map(c=>n[c]);if(l.length)return r(l)});return{S:o,B:s,Q:a}}function i({S:a,B:o},s,l){if(!(a&4&&l===s[s.length-1])){a&2&&(l=s[s.length-1]),a&1&&e.push(s);for(let c of o)for(let u of c.Q)i(c,[...s,u],l)}}}function wne(t){return t.toString(16).toUpperCase().padStart(2,"0")}function F$(t){return`{${wne(t)}}`}function xne(t){let e=[];for(let n=0,r=t.length;n>24&255}function H$(t){return t&16777215}let P3,i_,O3,nw;function kne(){let t=D$(Ene);P3=new Map(L$(t).flatMap((e,n)=>e.map(r=>[r,n+1<<24]))),i_=new Set(y1(t)),O3=new Map,nw=new Map;for(let[e,n]of $$(t)){if(!i_.has(e)&&n.length==2){let[r,i]=n,a=nw.get(r);a||(a=new Map,nw.set(r,a)),a.set(i,e)}O3.set(e,n.reverse())}}function G$(t){return t>=v1&&t=ix&&t=ax&&eox&&e0&&i(ox+c)}else{let o=O3.get(a);o?n.push(...o):i(a)}if(!n.length)break;a=n.pop()}if(r&&e.length>1){let a=ly(e[0]);for(let o=1;o0&&i>=o)o==0?(e.push(r,...n),n.length=0,r=s):n.push(s),i=o;else{let l=_ne(r,s);l>=0?r=l:i==0&&o==0?(e.push(r),r=s):(n.push(s),i=o)}}return r>=0&&e.push(r,...n),e}function Q$(t){return V$(t).map(H$)}function Ine(t){return Nne(V$(t))}const a_=45,K$=".",W$=65039,J$=1,pd=t=>Array.from(t);function b1(t,e){return t.P.has(e)||t.Q.has(e)}class Rne extends Array{get is_emoji(){return!0}}let T3,Y$,Fu,C3,X$,Id,q6,jh,Z$,o_,k3;function dO(){if(T3)return;let t=D$(fne);const e=()=>y1(t),n=()=>new Set(e());T3=new Map($$(t)),Y$=n(),Fu=e(),C3=new Set(e().map(u=>Fu[u])),Fu=new Set(Fu),X$=n(),n();let r=L$(t),i=t();const a=()=>new Set(e().flatMap(u=>r[u]).concat(e()));Id=m1(u=>{let f=m1(t).map(h=>h+96);if(f.length){let h=u>=i;f[0]-=32,f=Op(f),h&&(f=`Restricted[${f}]`);let d=a(),g=a(),p=!t();return{N:f,P:d,Q:g,M:p,R:h}}}),q6=n(),jh=new Map;let o=e().concat(pd(q6)).sort((u,f)=>u-f);o.forEach((u,f)=>{let h=t(),d=o[f]=h?o[f-h]:{V:[],M:new Map};d.V.push(u),q6.has(u)||jh.set(u,d)});for(let{V:u,M:f}of new Set(jh.values())){let h=[];for(let g of u){let p=Id.filter(m=>b1(m,g)),y=h.find(({G:m})=>p.some(b=>m.has(b)));y||(y={G:new Set,V:[]},h.push(y)),y.V.push(g),p.forEach(m=>y.G.add(m))}let d=h.flatMap(g=>pd(g.G));for(let{G:g,V:p}of h){let y=new Set(d.filter(m=>!g.has(m)));for(let m of p)f.set(m,y)}}let s=new Set,l=new Set;const c=u=>s.has(u)?l.add(u):s.add(u);for(let u of Id){for(let f of u.P)c(f);for(let f of u.Q)c(f)}for(let u of s)!jh.has(u)&&!l.has(u)&&jh.set(u,J$);Z$=new Set(pd(s).concat(pd(Q$(s)))),o_=bne(t).map(u=>Rne.from(u)).sort(Ane),k3=new Map;for(let u of o_){let f=[k3];for(let h of u){let d=f.map(g=>{let p=g.get(h);return p||(p=new Map,g.set(h,p)),p});h===W$?f.push(...d):f=d}for(let h of f)h.V=u}}function pO(t){return(q$(t)?"":`${gO(nA([t]))} `)+F$(t)}function gO(t){return`"${t}"‎`}function Mne(t){if(t.length>=4&&t[2]==a_&&t[3]==a_)throw new Error(`invalid label extension: "${Op(t.slice(0,4))}"`)}function Bne(t){for(let n=t.lastIndexOf(95);n>0;)if(t[--n]!==95)throw new Error("underscore allowed only at start")}function Dne(t){let e=t[0],n=n_.get(e);if(n)throw Ty(`leading ${n}`);let r=t.length,i=-1;for(let a=1;a{let a=xne(i),o={input:a,offset:r};r+=a.length+1;try{let s=o.tokens=Gne(a,e,n),l=s.length,c;if(!l)throw new Error("empty label");let u=o.output=s.flat();if(Bne(u),!(o.emoji=l>1||s[0].is_emoji)&&u.every(h=>h<128))Mne(u),c="ASCII";else{let h=s.flatMap(d=>d.is_emoji?[]:d);if(!h.length)c="Emoji";else{if(Fu.has(u[0]))throw Ty("leading combining mark");for(let p=1;po.has(s)):pd(o),!n.length)return}else r.push(i)}if(n){for(let i of n)if(r.every(a=>b1(i,a)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function jne(t){let e=Id;for(let n of t){let r=e.filter(i=>b1(i,n));if(!r.length)throw Id.some(i=>b1(i,n))?tU(e[0],n):eU(n);if(e=r,r.length==1)break}return e}function zne(t){return t.map(({input:e,error:n,output:r})=>{if(n){let i=n.message;throw new Error(t.length==1?i:`Invalid label ${gO(nA(e))}: ${i}`)}return Op(r)}).join(K$)}function eU(t){return new Error(`disallowed character: ${pO(t)}`)}function tU(t,e){let n=pO(e),r=Id.find(i=>i.P.has(e));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${t.N} + ${n}`)}function Ty(t){return new Error(`illegal placement: ${t}`)}function Hne(t,e){for(let n of e)if(!b1(t,n))throw tU(t,n);if(t.M){let n=Q$(e);for(let r=1,i=n.length;rr_)throw new Error(`excessive non-spacing marks: ${gO(nA(n.slice(r-1,a)))} (${a-r}/${r_})`);r=a}}}function Gne(t,e,n){let r=[],i=[];for(t=t.slice().reverse();t.length;){let a=Qne(t);if(a)i.length&&(r.push(e(i)),i=[]),r.push(n(a));else{let o=t.pop();if(Z$.has(o))i.push(o);else{let s=T3.get(o);if(s)i.push(...s);else if(!Y$.has(o))throw eU(o)}}}return i.length&&r.push(e(i)),r}function Vne(t){return t.filter(e=>e!=W$)}function Qne(t,e){let n=k3,r,i=t.length;for(;i&&(n=n.get(t[--i]),!!n);){let{V:a}=n;a&&(r=a,e&&e.push(...t.slice(i).reverse()),t.length=i)}return r}const nU=new Uint8Array(32);nU.fill(0);function s_(t){return J(t.length!==0,"invalid ENS name; empty component","comp",t),t}function rU(t){const e=dl(Kne(t)),n=[];if(t.length===0)return n;let r=0;for(let i=0;i{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const n=new Uint8Array(e.length+1);return n.set(e,1),n[0]=n.length-1,n})))+"00"}function eE(t,e){return{address:rn(t),storageKeys:e.map((n,r)=>(J(In(n,32),"invalid slot",`storageKeys[${r}]`,n),n.toLowerCase()))}}function wh(t){if(Array.isArray(t))return t.map((n,r)=>Array.isArray(n)?(J(n.length===2,"invalid slot set",`value[${r}]`,n),eE(n[0],n[1])):(J(n!=null&&typeof n=="object","invalid address-slot set","value",t),eE(n.address,n.storageKeys)));J(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(n=>{const r=t[n].reduce((i,a)=>(i[a]=!0,i),{});return eE(n,Object.keys(r).sort())});return e.sort((n,r)=>n.address.localeCompare(r.address)),e}function Jne(t){let e;return typeof t=="string"?e=g1.computePublicKey(t,!1):e=t.publicKey,rn(Nn("0x"+e.substring(4)).substring(26))}function Yne(t,e){return Jne(g1.recoverPublicKey(t,e))}const ki=BigInt(0),Xne=BigInt(2),Zne=BigInt(27),qne=BigInt(28),ere=BigInt(35),tre=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function yO(t){return t==="0x"?null:rn(t)}function iU(t,e){try{return wh(t)}catch(n){J(!1,n.message,e,t)}}function rA(t,e){return t==="0x"?0:Lt(t,e)}function ii(t,e){if(t==="0x")return ki;const n=ot(t,e);return J(n<=tre,"value exceeds uint size",e,n),n}function Ar(t,e){const n=ot(t,"value"),r=sa(n);return J(r.length<=32,"value too large",`tx.${e}`,n),r}function aU(t){return wh(t).map(e=>[e.address,e.storageKeys])}function nre(t){const e=fO(t);J(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);const n={type:0,nonce:rA(e[0],"nonce"),gasPrice:ii(e[1],"gasPrice"),gasLimit:ii(e[2],"gasLimit"),to:yO(e[3]),value:ii(e[4],"value"),data:Ze(e[5]),chainId:ki};if(e.length===6)return n;const r=ii(e[6],"v"),i=ii(e[7],"r"),a=ii(e[8],"s");if(i===ki&&a===ki)n.chainId=r;else{let o=(r-ere)/Xne;o=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),me(!n||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),me(this.type!==0||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):n?i.push(2):e?(i.push(1),r||i.push(0)):r?(i.push(1),i.push(2)):(i.push(0),i.push(1),i.push(2)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}clone(){return Zl.from(this)}toJSON(){const e=n=>n==null?null:n.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Zl;if(typeof e=="string"){const r=Pt(e);if(r[0]>=127)return Zl.from(nre(r));switch(r[0]){case 1:return Zl.from(ire(r));case 2:return Zl.from(rre(r))}me(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const n=new Zl;return e.type!=null&&(n.type=e.type),e.to!=null&&(n.to=e.to),e.nonce!=null&&(n.nonce=e.nonce),e.gasLimit!=null&&(n.gasLimit=e.gasLimit),e.gasPrice!=null&&(n.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(n.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(n.maxFeePerGas=e.maxFeePerGas),e.data!=null&&(n.data=e.data),e.value!=null&&(n.value=e.value),e.chainId!=null&&(n.chainId=e.chainId),e.signature!=null&&(n.signature=To.from(e.signature)),e.accessList!=null&&(n.accessList=e.accessList),e.hash!=null&&(J(n.isSigned(),"unsigned transaction cannot define hash","tx",e),J(n.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(J(n.isSigned(),"unsigned transaction cannot define from","tx",e),J(n.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),n}};Ws=new WeakMap,M0=new WeakMap,B0=new WeakMap,D0=new WeakMap,L0=new WeakMap,$0=new WeakMap,U0=new WeakMap,F0=new WeakMap,j0=new WeakMap,z0=new WeakMap,H0=new WeakMap,G0=new WeakMap;let w1=Zl;const sU=new Uint8Array(32);sU.fill(0);const are=BigInt(-1),lU=BigInt(0),cU=BigInt(1),ore=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function sre(t){const e=Pt(t),n=e.length%32;return n?sr([e,sU.slice(n)]):Ze(e)}const lre=fs(cU,32),cre=fs(lU,32),f_={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},tE=["name","version","chainId","verifyingContract","salt"];function h_(t){return function(e){return J(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const ure={name:h_("name"),version:h_("version"),chainId:function(t){const e=ot(t,"domain.chainId");return J(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):Uu(e)},verifyingContract:function(t){try{return rn(t).toLowerCase()}catch{}J(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=Pt(t,"domain.salt");return J(e.length===32,'invalid domain value "salt"',"domain.salt",t),Ze(e)}};function nE(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const n=e[1]==="",r=parseInt(e[2]||"256");J(r%8===0&&r!==0&&r<=256&&(e[2]==null||e[2]===String(r)),"invalid numeric width","type",t);const i=oy(ore,n?r-1:r),a=n?(i+cU)*are:lU;return function(o){const s=ot(o,"value");return J(s>=a&&s<=i,`value out-of-bounds for ${t}`,"value",s),fs(n?b$(s,256):s,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const n=parseInt(e[1]);return J(n!==0&&n<=32&&e[1]===String(n),"invalid bytes width","type",t),function(r){const i=Pt(r);return J(i.length===n,`invalid length for ${t}`,"value",r),sre(r)}}}switch(t){case"address":return function(e){return oh(rn(e),32)};case"bool":return function(e){return e?lre:cre};case"bytes":return function(e){return Nn(e)};case"string":return function(e){return sh(e)}}return null}function d_(t,e){return`${t}(${e.map(({name:n,type:r})=>r+" "+n).join(",")})`}var Rm,Js,V0,f2,uU;const wa=class wa{constructor(e){M(this,f2);R(this,"primaryType");M(this,Rm,void 0);M(this,Js,void 0);M(this,V0,void 0);O(this,Rm,JSON.stringify(e)),O(this,Js,new Map),O(this,V0,new Map);const n=new Map,r=new Map,i=new Map;Object.keys(e).forEach(s=>{n.set(s,new Set),r.set(s,[]),i.set(s,new Set)});for(const s in e){const l=new Set;for(const c of e[s]){J(!l.has(c.name),`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(s)}`,"types",e),l.add(c.name);const u=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;J(u!==s,`circular type reference to ${JSON.stringify(u)}`,"types",e),!nE(u)&&(J(r.has(u),`unknown type ${JSON.stringify(u)}`,"types",e),r.get(u).push(s),n.get(s).add(u))}}const a=Array.from(r.keys()).filter(s=>r.get(s).length===0);J(a.length!==0,"missing primary type","types",e),J(a.length===1,`ambiguous primary types or unused types: ${a.map(s=>JSON.stringify(s)).join(", ")}`,"types",e),mt(this,{primaryType:a[0]});function o(s,l){J(!l.has(s),`circular type reference to ${JSON.stringify(s)}`,"types",e),l.add(s);for(const c of n.get(s))if(r.has(c)){o(c,l);for(const u of l)i.get(u).add(c)}l.delete(s)}o(this.primaryType,new Set);for(const[s,l]of i){const c=Array.from(l);c.sort(),v(this,Js).set(s,d_(s,e[s])+c.map(u=>d_(u,e[u])).join(""))}}get types(){return JSON.parse(v(this,Rm))}getEncoder(e){let n=v(this,V0).get(e);return n||(n=ie(this,f2,uU).call(this,e),v(this,V0).set(e,n)),n}encodeType(e){const n=v(this,Js).get(e);return J(n,`unknown type: ${JSON.stringify(e)}`,"name",e),n}encodeData(e,n){return this.getEncoder(e)(n)}hashStruct(e,n){return Nn(this.encodeData(e,n))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,n,r){if(nE(e))return r(e,n);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i)return J(!i[3]||parseInt(i[3])===n.length,`array length mismatch; expected length ${parseInt(i[3])}`,"value",n),n.map(o=>this._visit(i[1],o,r));const a=this.types[e];if(a)return a.reduce((o,{name:s,type:l})=>(o[s]=this._visit(l,n[s],r),o),{});J(!1,`unknown type: ${e}`,"type",e)}visit(e,n){return this._visit(this.primaryType,e,n)}static from(e){return new wa(e)}static getPrimaryType(e){return wa.from(e).primaryType}static hashStruct(e,n,r){return wa.from(n).hashStruct(e,r)}static hashDomain(e){const n=[];for(const r in e){if(e[r]==null)continue;const i=f_[r];J(i,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),n.push({name:r,type:i})}return n.sort((r,i)=>tE.indexOf(r.name)-tE.indexOf(i.name)),wa.hashStruct("EIP712Domain",{EIP712Domain:n},e)}static encode(e,n,r){return sr(["0x1901",wa.hashDomain(e),wa.from(n).hash(r)])}static hash(e,n,r){return Nn(wa.encode(e,n,r))}static async resolveNames(e,n,r,i){e=Object.assign({},e);for(const s in e)e[s]==null&&delete e[s];const a={};e.verifyingContract&&!In(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");const o=wa.from(n);o.visit(r,(s,l)=>(s==="address"&&!In(l,20)&&(a[l]="0x"),l));for(const s in a)a[s]=await i(s);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),r=o.visit(r,(s,l)=>s==="address"&&a[l]?a[l]:l),{domain:e,value:r}}static getPayload(e,n,r){wa.hashDomain(e);const i={},a=[];tE.forEach(l=>{const c=e[l];c!=null&&(i[l]=ure[l](c),a.push({name:l,type:f_[l]}))});const o=wa.from(n),s=Object.assign({},n);return J(s.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",n),s.EIP712Domain=a,o.encode(r),{types:s,domain:i,primaryType:o.primaryType,message:o.visit(r,(l,c)=>{if(l.match(/^bytes(\d*)/))return Ze(Pt(c));if(l.match(/^u?int/))return ot(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return J(typeof c=="string","invalid string","value",c),c}J(!1,"unsupported type","type",l)})}}};Rm=new WeakMap,Js=new WeakMap,V0=new WeakMap,f2=new WeakSet,uU=function(e){{const i=nE(e);if(i)return i}const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const i=n[1],a=this.getEncoder(i);return o=>{J(!n[3]||parseInt(n[3])===o.length,`array length mismatch; expected length ${parseInt(n[3])}`,"value",o);let s=o.map(a);return v(this,Js).has(i)&&(s=s.map(Nn)),Nn(sr(s))}}const r=this.types[e];if(r){const i=sh(v(this,Js).get(e));return a=>{const o=r.map(({name:s,type:l})=>{const c=this.getEncoder(l)(a[s]);return v(this,Js).has(l)?Nn(c):c});return o.unshift(i),sr(o)}}J(!1,`unknown type: ${e}`,"type",e)};let x1=wa;function hi(t){const e=new Set;return t.forEach(n=>e.add(n)),Object.freeze(e)}const fre="external public payable",hre=hi(fre.split(" ")),fU="constant external internal payable private public pure view",dre=hi(fU.split(" ")),hU="constructor error event fallback function receive struct",dU=hi(hU.split(" ")),pU="calldata memory storage payable indexed",pre=hi(pU.split(" ")),gre="tuple returns",yre=[hU,pU,gre,fU].join(" "),mre=hi(yre.split(" ")),vre={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},bre=new RegExp("^(\\s*)"),wre=new RegExp("^([0-9]+)"),xre=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),gU=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),yU=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var br,uo,Mm,N3;const h2=class h2{constructor(e){M(this,Mm);M(this,br,void 0);M(this,uo,void 0);O(this,br,0),O(this,uo,e.slice())}get offset(){return v(this,br)}get length(){return v(this,uo).length-v(this,br)}clone(){return new h2(v(this,uo))}reset(){O(this,br,0)}popKeyword(e){const n=this.peek();if(n.type!=="KEYWORD"||!e.has(n.text))throw new Error(`expected keyword ${n.text}`);return this.pop().text}popType(e){if(this.peek().type!==e)throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const n=ie(this,Mm,N3).call(this,v(this,br)+1,e.match+1);return O(this,br,e.match+1),n}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const n=[];for(;v(this,br)=v(this,uo).length)throw new Error("out-of-bounds");return v(this,uo)[v(this,br)]}peekKeyword(e){const n=this.peekType("KEYWORD");return n!=null&&e.has(n)?n:null}peekType(e){if(this.length===0)return null;const n=this.peek();return n.type===e?n.text:null}pop(){const e=this.peek();return vs(this,br)._++,e}toString(){const e=[];for(let n=v(this,br);n`}};br=new WeakMap,uo=new WeakMap,Mm=new WeakSet,N3=function(e=0,n=0){return new h2(v(this,uo).slice(e,n).map(r=>Object.freeze(Object.assign({},r,{match:r.match-e,linkBack:r.linkBack-e,linkNext:r.linkNext-e}))))};let Co=h2;function su(t){const e=[],n=o=>{const s=a0&&e[e.length-1].type==="NUMBER"){const f=e.pop().text;u=f+u,e[e.length-1].value=Lt(f)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(s=o.match(xre),s){if(l.text=s[1],a+=l.text.length,mre.has(l.text)){l.type="KEYWORD";continue}if(l.text.match(yU)){l.type="TYPE";continue}l.type="ID";continue}if(s=o.match(wre),s){l.text=s[1],l.type="NUMBER",a+=l.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${a}`)}return new Co(e.map(o=>Object.freeze(o)))}function p_(t,e){let n=[];for(const r in e.keys())t.has(r)&&n.push(r);if(n.length>1)throw new Error(`conflicting types: ${n.join(", ")}`)}function iA(t,e){if(e.peekKeyword(dU)){const n=e.pop().text;if(n!==t)throw new Error(`expected ${t}, got ${n}`)}return e.popType("ID")}function Pl(t,e){const n=new Set;for(;;){const r=t.peekType("KEYWORD");if(r==null||e&&!e.has(r))break;if(t.pop(),n.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}function mU(t){let e=Pl(t,dre);return p_(e,hi("constant payable nonpayable".split(" "))),p_(e,hi("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function pl(t,e){return t.popParams().map(n=>Cr.from(n,e))}function vU(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return ot(t.pop().text);throw new Error("invalid gas")}return null}function lh(t){if(t.length)throw new Error(`unexpected tokens: ${t.toString()}`)}const Are=new RegExp(/^(.*)\[([0-9]*)\]$/);function g_(t){const e=t.match(yU);if(J(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const n=parseInt(e[2]);J(n!==0&&n<=32,"invalid bytes length","type",t)}else if(e[3]){const n=parseInt(e[3]);J(n!==0&&n<=256&&n%8===0,"invalid numeric width","type",t)}return t}const _n={},Ui=Symbol.for("_ethers_internal"),y_="_ParamTypeInternal",m_="_ErrorInternal",v_="_EventInternal",b_="_ConstructorInternal",w_="_FallbackInternal",x_="_FunctionInternal",A_="_StructInternal";var Q0,rw;const xa=class xa{constructor(e,n,r,i,a,o,s,l){M(this,Q0);R(this,"name");R(this,"type");R(this,"baseType");R(this,"indexed");R(this,"components");R(this,"arrayLength");R(this,"arrayChildren");if(q2(e,_n,"ParamType"),Object.defineProperty(this,Ui,{value:y_}),o&&(o=Object.freeze(o.slice())),i==="array"){if(s==null||l==null)throw new Error("")}else if(s!=null||l!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");mt(this,{name:n,type:r,baseType:i,indexed:a,components:o,arrayLength:s,arrayChildren:l})}format(e){if(e==null&&(e="sighash"),e==="json"){const r=this.name||"";if(this.isArray()){const a=JSON.parse(this.arrayChildren.format("json"));return a.name=r,a.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(a)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:r};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(a=>JSON.parse(a.format(e)))),JSON.stringify(i)}let n="";return this.isArray()?(n+=this.arrayChildren.format(e),n+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?n+="("+this.components.map(r=>r.format(e)).join(e==="full"?", ":",")+")":n+=this.type,e!=="sighash"&&(this.indexed===!0&&(n+=" indexed"),e==="full"&&this.name&&(n+=" "+this.name)),n}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,n){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map(i=>r.arrayChildren.walk(i,n))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const r=this;return e.map((i,a)=>r.components[a].walk(i,n))}return n(this.type,e)}async walkAsync(e,n){const r=[],i=[e];return ie(this,Q0,rw).call(this,r,e,n,a=>{i[0]=a}),r.length&&await Promise.all(r),i[0]}static from(e,n){if(xa.isParamType(e))return e;if(typeof e=="string")try{return xa.from(su(e),n)}catch{J(!1,"invalid param type","obj",e)}else if(e instanceof Co){let s="",l="",c=null;Pl(e,hi(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(l="tuple",c=e.popParams().map(p=>xa.from(p)),s=`tuple(${c.map(p=>p.format()).join(",")})`):(s=g_(e.popType("TYPE")),l=s);let u=null,f=null;for(;e.length&&e.peekType("BRACKET");){const p=e.pop();u=new xa(_n,"",s,l,null,c,f,u),f=p.value,s+=p.text,l="array",c=null}let h=null;if(Pl(e,pre).has("indexed")){if(!n)throw new Error("");h=!0}const g=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new xa(_n,g,s,l,h,c,f,u)}const r=e.name;J(!r||typeof r=="string"&&r.match(gU),"invalid name","obj.name",r);let i=e.indexed;i!=null&&(J(n,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let a=e.type,o=a.match(Are);if(o){const s=parseInt(o[2]||"-1"),l=xa.from({type:o[1],components:e.components});return new xa(_n,r||"",a,"array",i,null,s,l)}if(a==="tuple"||a.startsWith("tuple(")||a.startsWith("(")){const s=e.components!=null?e.components.map(c=>xa.from(c)):null;return new xa(_n,r||"",a,"tuple",i,s,null,null)}return a=g_(e.type),new xa(_n,r||"",a,a,i,null,null,null)}static isParamType(e){return e&&e[Ui]===y_}};Q0=new WeakSet,rw=function(e,n,r,i){if(this.isArray()){if(!Array.isArray(n))throw new Error("invalid array value");if(this.arrayLength!==-1&&n.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,s=n.slice();s.forEach((l,c)=>{var u;ie(u=o,Q0,rw).call(u,e,l,r,f=>{s[c]=f})}),i(s);return}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(n))s=n.slice();else{if(n==null||typeof n!="object")throw new Error("invalid tuple value");s=o.map(l=>{if(!l.name)throw new Error("cannot use object value with unnamed components");if(!(l.name in n))throw new Error(`missing value for component ${l.name}`);return n[l.name]})}if(s.length!==this.components.length)throw new Error("array is wrong length");s.forEach((l,c)=>{var u;ie(u=o[c],Q0,rw).call(u,e,l,r,f=>{s[c]=f})}),i(s);return}const a=r(this.type,n);a.then?e.push(async function(){i(await a)}()):i(a)};let Cr=xa;class ch{constructor(e,n,r){R(this,"type");R(this,"inputs");q2(e,_n,"Fragment"),r=Object.freeze(r.slice()),mt(this,{type:n,inputs:r})}static from(e){if(typeof e=="string"){try{ch.from(JSON.parse(e))}catch{}return ch.from(su(e))}if(e instanceof Co)switch(e.peekKeyword(dU)){case"constructor":return sl.from(e);case"error":return _i.from(e);case"event":return qo.from(e);case"fallback":case"receive":return _s.from(e);case"function":return es.from(e);case"struct":return jf.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return sl.from(e);case"error":return _i.from(e);case"event":return qo.from(e);case"fallback":case"receive":return _s.from(e);case"function":return es.from(e);case"struct":return jf.from(e)}me(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}J(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return sl.isFragment(e)}static isError(e){return _i.isFragment(e)}static isEvent(e){return qo.isFragment(e)}static isFunction(e){return es.isFragment(e)}static isStruct(e){return jf.isFragment(e)}}class aA extends ch{constructor(n,r,i,a){super(n,r,a);R(this,"name");J(typeof i=="string"&&i.match(gU),"invalid identifier","name",i),a=Object.freeze(a.slice()),mt(this,{name:i})}}function A1(t,e){return"("+e.map(n=>n.format(t)).join(t==="full"?", ":",")+")"}class _i extends aA{constructor(e,n,r){super(e,"error",n,r),Object.defineProperty(this,Ui,{value:m_})}get selector(){return sh(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(e)))});const n=[];return e!=="sighash"&&n.push("error"),n.push(this.name+A1(e,this.inputs)),n.join(" ")}static from(e){if(_i.isFragment(e))return e;if(typeof e=="string")return _i.from(su(e));if(e instanceof Co){const n=iA("error",e),r=pl(e);return lh(e),new _i(_n,n,r)}return new _i(_n,e.name,e.inputs?e.inputs.map(Cr.from):[])}static isFragment(e){return e&&e[Ui]===m_}}class qo extends aA{constructor(n,r,i,a){super(n,"event",r,i);R(this,"anonymous");Object.defineProperty(this,Ui,{value:v_}),mt(this,{anonymous:a})}get topicHash(){return sh(this.format("sighash"))}format(n){if(n==null&&(n="sighash"),n==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("event"),r.push(this.name+A1(n,this.inputs)),n!=="sighash"&&this.anonymous&&r.push("anonymous"),r.join(" ")}static getTopicHash(n,r){return r=(r||[]).map(a=>Cr.from(a)),new qo(_n,n,r,!1).topicHash}static from(n){if(qo.isFragment(n))return n;if(typeof n=="string")try{return qo.from(su(n))}catch{J(!1,"invalid event fragment","obj",n)}else if(n instanceof Co){const r=iA("event",n),i=pl(n,!0),a=!!Pl(n,hi(["anonymous"])).has("anonymous");return lh(n),new qo(_n,r,i,a)}return new qo(_n,n.name,n.inputs?n.inputs.map(r=>Cr.from(r,!0)):[],!!n.anonymous)}static isFragment(n){return n&&n[Ui]===v_}}class sl extends ch{constructor(n,r,i,a,o){super(n,r,i);R(this,"payable");R(this,"gas");Object.defineProperty(this,Ui,{value:b_}),mt(this,{payable:a,gas:o})}format(n){if(me(n!=null&&n!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),n==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[`constructor${A1(n,this.inputs)}`];return this.payable&&r.push("payable"),this.gas!=null&&r.push(`@${this.gas.toString()}`),r.join(" ")}static from(n){if(sl.isFragment(n))return n;if(typeof n=="string")try{return sl.from(su(n))}catch{J(!1,"invalid constuctor fragment","obj",n)}else if(n instanceof Co){Pl(n,hi(["constructor"]));const r=pl(n),i=!!Pl(n,hre).has("payable"),a=vU(n);return lh(n),new sl(_n,"constructor",r,i,a)}return new sl(_n,"constructor",n.inputs?n.inputs.map(Cr.from):[],!!n.payable,n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[Ui]===b_}}class _s extends ch{constructor(n,r,i){super(n,"fallback",r);R(this,"payable");Object.defineProperty(this,Ui,{value:w_}),mt(this,{payable:i})}format(n){const r=this.inputs.length===0?"receive":"fallback";if(n==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:r,stateMutability:i})}return`${r}()${this.payable?" payable":""}`}static from(n){if(_s.isFragment(n))return n;if(typeof n=="string")try{return _s.from(su(n))}catch{J(!1,"invalid fallback fragment","obj",n)}else if(n instanceof Co){const r=n.toString(),i=n.peekKeyword(hi(["fallback","receive"]));if(J(i,"type must be fallback or receive","obj",r),n.popKeyword(hi(["fallback","receive"]))==="receive"){const l=pl(n);return J(l.length===0,"receive cannot have arguments","obj.inputs",l),Pl(n,hi(["payable"])),lh(n),new _s(_n,[],!0)}let o=pl(n);o.length?J(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(l=>l.format("minimal")).join(", ")):o=[Cr.from("bytes")];const s=mU(n);if(J(s==="nonpayable"||s==="payable","fallback cannot be constants","obj.stateMutability",s),Pl(n,hi(["returns"])).has("returns")){const l=pl(n);J(l.length===1&&l[0].type==="bytes","invalid fallback outputs","obj.outputs",l.map(c=>c.format("minimal")).join(", "))}return lh(n),new _s(_n,o,s==="payable")}if(n.type==="receive")return new _s(_n,[],!0);if(n.type==="fallback"){const r=[Cr.from("bytes")],i=n.stateMutability==="payable";return new _s(_n,r,i)}J(!1,"invalid fallback description","obj",n)}static isFragment(n){return n&&n[Ui]===w_}}class es extends aA{constructor(n,r,i,a,o,s){super(n,"function",r,a);R(this,"constant");R(this,"outputs");R(this,"stateMutability");R(this,"payable");R(this,"gas");Object.defineProperty(this,Ui,{value:x_}),o=Object.freeze(o.slice()),mt(this,{constant:i==="view"||i==="pure",gas:s,outputs:o,payable:i==="payable",stateMutability:i})}get selector(){return sh(this.format("sighash")).substring(0,10)}format(n){if(n==null&&(n="sighash"),n==="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!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n))),outputs:this.outputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("function"),r.push(this.name+A1(n,this.inputs)),n!=="sighash"&&(this.stateMutability!=="nonpayable"&&r.push(this.stateMutability),this.outputs&&this.outputs.length&&(r.push("returns"),r.push(A1(n,this.outputs))),this.gas!=null&&r.push(`@${this.gas.toString()}`)),r.join(" ")}static getSelector(n,r){return r=(r||[]).map(a=>Cr.from(a)),new es(_n,n,"view",r,[],null).selector}static from(n){if(es.isFragment(n))return n;if(typeof n=="string")try{return es.from(su(n))}catch{J(!1,"invalid function fragment","obj",n)}else if(n instanceof Co){const i=iA("function",n),a=pl(n),o=mU(n);let s=[];Pl(n,hi(["returns"])).has("returns")&&(s=pl(n));const l=vU(n);return lh(n),new es(_n,i,o,a,s,l)}let r=n.stateMutability;return r==null&&(r="payable",typeof n.constant=="boolean"?(r="view",n.constant||(r="payable",typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable"))):typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable")),new es(_n,n.name,r,n.inputs?n.inputs.map(Cr.from):[],n.outputs?n.outputs.map(Cr.from):[],n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[Ui]===x_}}class jf extends aA{constructor(e,n,r){super(e,"struct",n,r),Object.defineProperty(this,Ui,{value:A_})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return jf.from(su(e))}catch{J(!1,"invalid struct fragment","obj",e)}else if(e instanceof Co){const n=iA("struct",e),r=pl(e);return lh(e),new jf(_n,n,r)}return new jf(_n,e.name,e.inputs?e.inputs.map(Cr.from):[])}static isFragment(e){return e&&e[Ui]===A_}}const _o=new Map;_o.set(0,"GENERIC_PANIC");_o.set(1,"ASSERT_FALSE");_o.set(17,"OVERFLOW");_o.set(18,"DIVIDE_BY_ZERO");_o.set(33,"ENUM_RANGE_ERROR");_o.set(34,"BAD_STORAGE_DATA");_o.set(49,"STACK_UNDERFLOW");_o.set(50,"ARRAY_RANGE_ERROR");_o.set(65,"OUT_OF_MEMORY");_o.set(81,"UNINITIALIZED_FUNCTION_CALL");const Ere=new RegExp(/^bytes([0-9]*)$/),Sre=new RegExp(/^(u?int)([0-9]*)$/);let rE=null,E_=1024;function Pre(t,e,n,r){let i="missing revert data",a=null;const o=null;let s=null;if(n){i="execution reverted";const c=Pt(n);if(n=Ze(n),c.length===0)i+=" (no data present; likely require(false) occurred",a="require(false)";else if(c.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(Ze(c.slice(0,4))==="0x08c379a0")try{a=r.decode(["string"],c.slice(4))[0],s={signature:"Error(string)",name:"Error",args:[a]},i+=`: ${JSON.stringify(a)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(Ze(c.slice(0,4))==="0x4e487b71")try{const u=Number(r.decode(["uint256"],c.slice(4))[0]);s={signature:"Panic(uint256)",name:"Panic",args:[u]},a=`Panic due to ${_o.get(u)||"UNKNOWN"}(${u})`,i+=`: ${a}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const l={to:e.to?rn(e.to):null,data:e.data||"0x"};return e.from&&(l.from=rn(e.from)),qn(i,"CALL_EXCEPTION",{action:t,data:n,reason:a,transaction:l,invocation:o,revert:s})}var xc,zh;const d2=class d2{constructor(){M(this,xc)}getDefaultValue(e){const n=e.map(i=>ie(this,xc,zh).call(this,Cr.from(i)));return new tb(n,"_").defaultValue()}encode(e,n){y$(n.length,e.length,"types/values length mismatch");const r=e.map(o=>ie(this,xc,zh).call(this,Cr.from(o))),i=new tb(r,"_"),a=new x3;return i.encode(a,n),a.data}decode(e,n,r){const i=e.map(o=>ie(this,xc,zh).call(this,Cr.from(o)));return new tb(i,"_").decode(new A3(n,r,E_))}static _setDefaultMaxInflation(e){J(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),E_=e}static defaultAbiCoder(){return rE==null&&(rE=new d2),rE}static getBuiltinCallException(e,n,r){return Pre(e,n,r,d2.defaultAbiCoder())}};xc=new WeakSet,zh=function(e){if(e.isArray())return new ene(ie(this,xc,zh).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new tb(e.components.map(r=>ie(this,xc,zh).call(this,r)),e.name);switch(e.baseType){case"address":return new Zte(e.name);case"bool":return new tne(e.name);case"string":return new une(e.name);case"bytes":return new nne(e.name);case"":return new ane(e.name)}let n=e.type.match(Sre);if(n){let r=parseInt(n[2]||"256");return J(r!==0&&r<=256&&r%8===0,"invalid "+n[1]+" bit length","param",e),new cne(r/8,n[1]==="int",e.name)}if(n=e.type.match(Ere),n){let r=parseInt(n[1]);return J(r!==0&&r<=32,"invalid bytes length","param",e),new rne(r,e.name)}J(!1,"invalid type","type",e.type)};let E1=d2;class Ore{constructor(e,n,r){R(this,"fragment");R(this,"name");R(this,"signature");R(this,"topic");R(this,"args");const i=e.name,a=e.format();mt(this,{fragment:e,name:i,signature:a,topic:n,args:r})}}class Tre{constructor(e,n,r,i){R(this,"fragment");R(this,"name");R(this,"args");R(this,"signature");R(this,"selector");R(this,"value");const a=e.name,o=e.format();mt(this,{fragment:e,name:a,args:r,signature:o,selector:n,value:i})}}class Cre{constructor(e,n,r){R(this,"fragment");R(this,"name");R(this,"args");R(this,"signature");R(this,"selector");const i=e.name,a=e.format();mt(this,{fragment:e,name:i,args:r,signature:a,selector:n})}}class S_{constructor(e){R(this,"hash");R(this,"_isIndexed");mt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const P_={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},O_={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&P_[t.toString()]&&(e=P_[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var Qo,Ko,Wo,Ur,K0,iw,W0,aw;const vd=class vd{constructor(e){M(this,K0);M(this,W0);R(this,"fragments");R(this,"deploy");R(this,"fallback");R(this,"receive");M(this,Qo,void 0);M(this,Ko,void 0);M(this,Wo,void 0);M(this,Ur,void 0);let n=[];typeof e=="string"?n=JSON.parse(e):n=e,O(this,Wo,new Map),O(this,Qo,new Map),O(this,Ko,new Map);const r=[];for(const o of n)try{r.push(ch.from(o))}catch(s){console.log("EE",s)}mt(this,{fragments:Object.freeze(r)});let i=null,a=!1;O(this,Ur,this.getAbiCoder()),this.fragments.forEach((o,s)=>{let l;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}mt(this,{deploy:o});return;case"fallback":o.inputs.length===0?a=!0:(J(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${s}]`,o),i=o,a=i.payable);return;case"function":l=v(this,Wo);break;case"event":l=v(this,Ko);break;case"error":l=v(this,Qo);break;default:return}const c=o.format();l.has(c)||l.set(c,o)}),this.deploy||mt(this,{deploy:sl.from("constructor()")}),mt(this,{fallback:i,receive:a})}format(e){const n=e?"minimal":"full";return this.fragments.map(i=>i.format(n))}formatJson(){const e=this.fragments.map(n=>n.format("json"));return JSON.stringify(e.map(n=>JSON.parse(n)))}getAbiCoder(){return E1.defaultAbiCoder()}getFunctionName(e){const n=ie(this,K0,iw).call(this,e,null,!1);return J(n,"no matching function","key",e),n.name}hasFunction(e){return!!ie(this,K0,iw).call(this,e,null,!1)}getFunction(e,n){return ie(this,K0,iw).call(this,e,n||null,!0)}forEachFunction(e){const n=Array.from(v(this,Wo).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;rr.localeCompare(i));for(let r=0;r1){const a=i.map(o=>JSON.stringify(o.format())).join(", ");J(!1,`ambiguous error description (i.e. ${a})`,"name",e)}return i[0]}if(e=_i.from(e).format(),e==="Error(string)")return _i.from("error Error(string)");if(e==="Panic(uint256)")return _i.from("error Panic(uint256)");const r=v(this,Qo).get(e);return r||null}forEachError(e){const n=Array.from(v(this,Qo).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;ra.type==="string"?sh(o):a.type==="bytes"?Nn(Ze(o)):(a.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":a.type.match(/^u?int/)?o=fs(o):a.type.match(/^bytes/)?o=Ote(o,32):a.type==="address"&&v(this,Ur).encode(["address"],[o]),oh(Ze(o),32));for(n.forEach((a,o)=>{const s=e.inputs[o];if(!s.indexed){J(a==null,"cannot filter non-indexed parameters; must be null","contract."+s.name,a);return}a==null?r.push(null):s.baseType==="array"||s.baseType==="tuple"?J(!1,"filtering with tuples or arrays not supported","contract."+s.name,a):Array.isArray(a)?r.push(a.map(l=>i(s,l))):r.push(i(s,a))});r.length&&r[r.length-1]===null;)r.pop();return r}encodeEventLog(e,n){if(typeof e=="string"){const o=this.getEvent(e);J(o,"unknown event","eventFragment",e),e=o}const r=[],i=[],a=[];return e.anonymous||r.push(e.topicHash),J(n.length===e.inputs.length,"event arguments/values mismatch","values",n),e.inputs.forEach((o,s)=>{const l=n[s];if(o.indexed)if(o.type==="string")r.push(sh(l));else if(o.type==="bytes")r.push(Nn(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");r.push(v(this,Ur).encode([o.type],[l]))}else i.push(o),a.push(l)}),{data:v(this,Ur).encode(i,a),topics:r}}decodeEventLog(e,n,r){if(typeof e=="string"){const d=this.getEvent(e);J(d,"unknown event","eventFragment",e),e=d}if(r!=null&&!e.anonymous){const d=e.topicHash;J(In(r[0],32)&&r[0].toLowerCase()===d,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const i=[],a=[],o=[];e.inputs.forEach((d,g)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(Cr.from({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(a.push(d),o.push(!1))});const s=r!=null?v(this,Ur).decode(i,sr(r)):null,l=v(this,Ur).decode(a,n,!0),c=[],u=[];let f=0,h=0;return e.inputs.forEach((d,g)=>{let p=null;if(d.indexed)if(s==null)p=new S_(null);else if(o[g])p=new S_(s[h++]);else try{p=s[h++]}catch(y){p=y}else try{p=l[f++]}catch(y){p=y}c.push(p),u.push(d.name||null)}),rx.fromItems(c,u)}parseTransaction(e){const n=Pt(e.data,"tx.data"),r=ot(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(Ze(n.slice(0,4)));if(!i)return null;const a=v(this,Ur).decode(i.inputs,n.slice(4));return new Tre(i,i.selector,a,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const n=this.getEvent(e.topics[0]);return!n||n.anonymous?null:new Ore(n,n.topicHash,this.decodeEventLog(n,e.data,e.topics))}parseError(e){const n=Ze(e),r=this.getError(Fn(n,0,4));if(!r)return null;const i=v(this,Ur).decode(r.inputs,Fn(n,4));return new Cre(r,r.selector,i)}static from(e){return e instanceof vd?e:typeof e=="string"?new vd(JSON.parse(e)):typeof e.format=="function"?new vd(e.format("json")):new vd(e)}};Qo=new WeakMap,Ko=new WeakMap,Wo=new WeakMap,Ur=new WeakMap,K0=new WeakSet,iw=function(e,n,r){if(In(e)){const a=e.toLowerCase();for(const o of v(this,Wo).values())if(a===o.selector)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of v(this,Wo))o.split("(")[0]===e&&a.push(s);if(n){const o=n.length>0?n[n.length-1]:null;let s=n.length,l=!0;Wr.isTyped(o)&&o.type==="overrides"&&(l=!1,s--);for(let c=a.length-1;c>=0;c--){const u=a[c].inputs.length;u!==s&&(!l||u!==s-1)&&a.splice(c,1)}for(let c=a.length-1;c>=0;c--){const u=a[c].inputs;for(let f=0;f=u.length){if(n[f].type==="overrides")continue;a.splice(c,1);break}if(n[f].type!==u[f].baseType){a.splice(c,1);break}}}}if(a.length===1&&n&&n.length!==a[0].inputs.length){const o=n[n.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&a.splice(0,1)}if(a.length===0)return null;if(a.length>1&&r){const o=a.map(s=>JSON.stringify(s.format())).join(", ");J(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return a[0]}const i=v(this,Wo).get(es.from(e).format());return i||null},W0=new WeakSet,aw=function(e,n,r){if(In(e)){const a=e.toLowerCase();for(const o of v(this,Ko).values())if(a===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of v(this,Ko))o.split("(")[0]===e&&a.push(s);if(n){for(let o=a.length-1;o>=0;o--)a[o].inputs.length=0;o--){const s=a[o].inputs;for(let l=0;l1&&r){const o=a.map(s=>JSON.stringify(s.format())).join(", ");J(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return a[0]}const i=v(this,Ko).get(qo.from(e).format());return i||null};let I3=vd;const bU=BigInt(0);function Cy(t){return t??null}function Gr(t){return t==null?null:t.toString()}class T_{constructor(e,n,r){R(this,"gasPrice");R(this,"maxFeePerGas");R(this,"maxPriorityFeePerGas");mt(this,{gasPrice:Cy(e),maxFeePerGas:Cy(n),maxPriorityFeePerGas:Cy(r)})}toJSON(){const{gasPrice:e,maxFeePerGas:n,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:Gr(e),maxFeePerGas:Gr(n),maxPriorityFeePerGas:Gr(r)}}}function lx(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=Ze(t.data));const n="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=ot(t[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)!(i in t)||t[i]==null||(e[i]=Lt(t[i],`request.${i}`));return t.accessList&&(e.accessList=wh(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),e}var Ys;class kre{constructor(e,n){R(this,"provider");R(this,"number");R(this,"hash");R(this,"timestamp");R(this,"parentHash");R(this,"nonce");R(this,"difficulty");R(this,"gasLimit");R(this,"gasUsed");R(this,"miner");R(this,"extraData");R(this,"baseFeePerGas");M(this,Ys,void 0);O(this,Ys,e.transactions.map(r=>typeof r!="string"?new S1(r,n):r)),mt(this,{provider:n,hash:Cy(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,miner:e.miner,extraData:e.extraData,baseFeePerGas:Cy(e.baseFeePerGas)})}get transactions(){return v(this,Ys).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=v(this,Ys).slice();return e.length===0?[]:(me(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:n,extraData:r,gasLimit:i,gasUsed:a,hash:o,miner:s,nonce:l,number:c,parentHash:u,timestamp:f,transactions:h}=this;return{_type:"Block",baseFeePerGas:Gr(e),difficulty:Gr(n),extraData:r,gasLimit:Gr(i),gasUsed:Gr(a),hash:o,miner:s,nonce:l,number:c,parentHash:u,timestamp:f,transactions:h}}[Symbol.iterator](){let e=0;const n=this.transactions;return{next:()=>enew cv(i,n))));let r=bU;e.effectiveGasPrice!=null?r=e.effectiveGasPrice:e.gasPrice!=null&&(r=e.gasPrice),mt(this,{provider:n,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,gasPrice:r,type:e.type,status:e.status,root:e.root})}get logs(){return v(this,Bm)}toJSON(){const{to:e,from:n,contractAddress:r,hash:i,index:a,blockHash:o,blockNumber:s,logsBloom:l,logs:c,status:u,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:s,contractAddress:r,cumulativeGasUsed:Gr(this.cumulativeGasUsed),from:n,gasPrice:Gr(this.gasPrice),gasUsed:Gr(this.gasUsed),hash:i,index:a,logs:c,logsBloom:l,root:f,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(s)return null;const{blockNumber:h,nonce:d}=await ni({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(d{if(h==null||h.status!==0)return h;me(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:h.to,from:h.from,data:""},receipt:h})},u=await this.provider.getTransactionReceipt(this.hash);if(r===0)return c(u);if(u){if(await u.confirmations()>=r)return c(u)}else if(await l(),r===0)return null;return await new Promise((h,d)=>{const g=[],p=()=>{g.forEach(m=>m())};if(g.push(()=>{s=!0}),i>0){const m=setTimeout(()=>{p(),d(qn("wait for transaction timeout","TIMEOUT"))},i);g.push(()=>{clearTimeout(m)})}const y=async m=>{if(await m.confirmations()>=r){p();try{h(c(m))}catch(b){d(b)}}};if(g.push(()=>{this.provider.off(this.hash,y)}),this.provider.on(this.hash,y),a>=0){const m=async()=>{try{await l()}catch(b){if(Kr(b,"TRANSACTION_REPLACED")){p(),d(b);return}}s||this.provider.once("block",m)};g.push(()=>{this.provider.off("block",m)}),this.provider.once("block",m)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}removedEvent(){return me(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),AU(this)}reorderedEvent(e){return me(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),me(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),xU(this,e)}replaceableTransaction(e){J(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const n=new L4(this,this.provider);return O(n,Ac,e),n}};Ac=new WeakMap;let S1=L4;function _re(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function xU(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function AU(t){return{orphan:"drop-transaction",tx:t}}function Nre(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class mO extends cv{constructor(n,r,i){super(n,n.provider);R(this,"interface");R(this,"fragment");R(this,"args");const a=r.decodeEventLog(i,n.data,n.topics);mt(this,{args:a,fragment:i,interface:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class EU extends cv{constructor(n,r){super(n,n.provider);R(this,"error");mt(this,{error:r})}}var J0;class Ire extends wU{constructor(n,r,i){super(i,r);M(this,J0,void 0);O(this,J0,n)}get logs(){return super.logs.map(n=>{const r=n.topics.length?v(this,J0).getEvent(n.topics[0]):null;if(r)try{return new mO(n,v(this,J0),r)}catch(i){return new EU(n,i)}return n})}}J0=new WeakMap;var Dm;class vO extends S1{constructor(n,r,i){super(i,r);M(this,Dm,void 0);O(this,Dm,n)}async wait(n){const r=await super.wait(n);return r==null?null:new Ire(v(this,Dm),this.provider,r)}}Dm=new WeakMap;class SU extends w${constructor(n,r,i,a){super(n,r,i);R(this,"log");mt(this,{log:a})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class Rre extends SU{constructor(e,n,r,i,a){super(e,n,r,new mO(a,e.interface,i));const o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);mt(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const C_=BigInt(0);function PU(t){return t&&typeof t.call=="function"}function OU(t){return t&&typeof t.estimateGas=="function"}function oA(t){return t&&typeof t.resolveName=="function"}function TU(t){return t&&typeof t.sendTransaction=="function"}function CU(t){if(t!=null){if(oA(t))return t;if(t.provider)return t.provider}}var Lm;class Mre{constructor(e,n,r){M(this,Lm,void 0);R(this,"fragment");if(mt(this,{fragment:n}),n.inputs.lengthr[l]==null?null:s.walkAsync(r[l],(u,f)=>u==="address"?Array.isArray(f)?Promise.all(f.map(h=>fi(h,a))):fi(f,a):f)));return e.interface.encodeFilterTopics(n,o)}())}getTopicFilter(){return v(this,Lm)}}Lm=new WeakMap;function uh(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function ju(t){return t==null?null:t.provider||null}async function kU(t,e){const n=Wr.dereference(t,"overrides");J(typeof n=="object","invalid overrides parameter","overrides",t);const r=lx(n);return J(r.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),J(r.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=r.from),r}async function Bre(t,e,n){const r=uh(t,"resolveName"),i=oA(r)?r:null;return await Promise.all(e.map((a,o)=>a.walkAsync(n[o],(s,l)=>(l=Wr.dereference(l,s),s==="address"?fi(l,i):l))))}function Dre(t){const e=async function(o){const s=await kU(o,["data"]);s.to=await t.getAddress(),s.from&&(s.from=await fi(s.from,CU(t.runner)));const l=t.interface,c=ot(s.value||C_,"overrides.value")===C_,u=(s.data||"0x")==="0x";l.fallback&&!l.fallback.payable&&l.receive&&!u&&!c&&J(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),J(l.fallback||u,"cannot send data to receive-only contract","overrides.data",s.data);const f=l.receive||l.fallback&&l.fallback.payable;return J(f||c,"cannot send value to non-payable fallback","overrides.value",s.value),J(l.fallback||u,"cannot send data to receive-only contract","overrides.data",s.data),s},n=async function(o){const s=uh(t.runner,"call");me(PU(s),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const l=await e(o);try{return await s.call(l)}catch(c){throw lO(c)&&c.data?t.interface.makeError(c.data,l):c}},r=async function(o){const s=t.runner;me(TU(s),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const l=await s.sendTransaction(await e(o)),c=ju(t.runner);return new vO(t.interface,c,l)},i=async function(o){const s=uh(t.runner,"estimateGas");return me(OU(s),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await s.estimateGas(await e(o))},a=async o=>await r(o);return mt(a,{_contract:t,estimateGas:i,populateTransaction:e,send:r,staticCall:n}),a}function Lre(t,e){const n=function(...c){const u=t.interface.getFunction(e,c);return me(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:c}}),u},r=async function(...c){const u=n(...c);let f={};if(u.inputs.length+1===c.length&&(f=await kU(c.pop()),f.from&&(f.from=await fi(f.from,CU(t.runner)))),u.inputs.length!==c.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const h=await Bre(t.runner,u.inputs,c);return Object.assign({},f,await ni({to:t.getAddress(),data:t.interface.encodeFunctionData(u,h)}))},i=async function(...c){const u=await s(...c);return u.length===1?u[0]:u},a=async function(...c){const u=t.runner;me(TU(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await u.sendTransaction(await r(...c)),h=ju(t.runner);return new vO(t.interface,h,f)},o=async function(...c){const u=uh(t.runner,"estimateGas");return me(OU(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await r(...c))},s=async function(...c){const u=uh(t.runner,"call");me(PU(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await r(...c);let h="0x";try{h=await u.call(f)}catch(g){throw lO(g)&&g.data?t.interface.makeError(g.data,f):g}const d=n(...c);return t.interface.decodeFunctionResult(d,h)},l=async(...c)=>n(...c).constant?await i(...c):await a(...c);return mt(l,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:n,estimateGas:o,populateTransaction:r,send:a,staticCall:i,staticCallResult:s}),Object.defineProperty(l,"fragment",{configurable:!1,enumerable:!0,get:()=>{const c=t.interface.getFunction(e);return me(c,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),c}}),l}function $re(t,e){const n=function(...i){const a=t.interface.getEvent(e,i);return me(a,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),a},r=function(...i){return new Mre(t,n(...i),i)};return mt(r,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:n}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=t.interface.getEvent(e);return me(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),r}const cx=Symbol.for("_ethersInternal_contract"),_U=new WeakMap;function Ure(t,e){_U.set(t[cx],e)}function Ki(t){return _U.get(t[cx])}function Fre(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function bO(t,e){let n,r=null;if(Array.isArray(e)){const a=function(o){if(In(o,32))return o;const s=t.interface.getEvent(o);return J(s,"unknown fragment","name",o),s.topicHash};n=e.map(o=>o==null?null:Array.isArray(o)?o.map(a):a(o))}else e==="*"?n=[null]:typeof e=="string"?In(e,32)?n=[e]:(r=t.interface.getEvent(e),J(r,"unknown fragment","event",e),n=[r.topicHash]):Fre(e)?n=await e.getTopicFilter():"fragment"in e?(r=e.fragment,n=[r.topicHash]):J(!1,"unknown event name","event",e);n=n.map(a=>{if(a==null)return null;if(Array.isArray(a)){const o=Array.from(new Set(a.map(s=>s.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return a.toLowerCase()});const i=n.map(a=>a==null?"null":Array.isArray(a)?a.join("|"):a).join("&");return{fragment:r,tag:i,topics:n}}async function cy(t,e){const{subs:n}=Ki(t);return n.get((await bO(t,e)).tag)||null}async function k_(t,e,n){const r=ju(t.runner);me(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:a,topics:o}=await bO(t,n),{addr:s,subs:l}=Ki(t);let c=l.get(a);if(!c){const f={address:s||t,topics:o},h=y=>{let m=i;if(m==null)try{m=t.interface.getEvent(y.topics[0])}catch{}if(m){const b=m,x=i?t.interface.decodeEventLog(i,y.data,y.topics):[];M3(t,n,x,A=>new Rre(t,A,n,b,y))}else M3(t,n,[],b=>new SU(t,b,n,y))};let d=[];c={tag:a,listeners:[],start:()=>{d.length||d.push(r.on(f,h))},stop:async()=>{if(d.length==0)return;let y=d;d=[],await Promise.all(y),r.off(f,h)}},l.set(a,c)}return c}let R3=Promise.resolve();async function jre(t,e,n,r){await R3;const i=await cy(t,e);if(!i)return!1;const a=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:s})=>{const l=Array.from(n);r&&l.push(r(s?null:o));try{o.call(t,...l)}catch{}return!s}),i.listeners.length===0&&(i.stop(),Ki(t).subs.delete(i.tag)),a>0}async function M3(t,e,n,r){try{await R3}catch{}const i=jre(t,e,n,r);return R3=i,await i}const nb=["then"];var vPe;const Uy=class Uy{constructor(e,n,r,i){R(this,"target");R(this,"interface");R(this,"runner");R(this,"filters");R(this,vPe);R(this,"fallback");J(typeof e=="string"||I$(e),"invalid value for Contract target","target",e),r==null&&(r=null);const a=I3.from(n);mt(this,{target:e,runner:r,interface:a}),Object.defineProperty(this,cx,{value:{}});let o,s=null,l=null;if(i){const f=ju(r);l=new vO(this.interface,f,i)}let c=new Map;if(typeof e=="string")if(In(e))s=e,o=Promise.resolve(e);else{const f=uh(r,"resolveName");if(!oA(f))throw qn("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=f.resolveName(e).then(h=>{if(h==null)throw qn("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Ki(this).addr=h,h})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return Ki(this).addr=f,f});Ure(this,{addrPromise:o,addr:s,deployTx:l,subs:c});const u=new Proxy({},{get:(f,h,d)=>{if(typeof h=="symbol"||nb.indexOf(h)>=0)return Reflect.get(f,h,d);try{return this.getEvent(h)}catch(g){if(!Kr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(f,h)=>nb.indexOf(h)>=0?Reflect.has(f,h):Reflect.has(f,h)||this.interface.hasEvent(String(h))});return mt(this,{filters:u}),mt(this,{fallback:a.receive||a.fallback?Dre(this):null}),new Proxy(this,{get:(f,h,d)=>{if(typeof h=="symbol"||h in f||nb.indexOf(h)>=0)return Reflect.get(f,h,d);try{return f.getFunction(h)}catch(g){if(!Kr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(f,h)=>typeof h=="symbol"||h in f||nb.indexOf(h)>=0?Reflect.has(f,h):f.interface.hasFunction(h)})}connect(e){return new Uy(this.target,this.interface,e)}attach(e){return new Uy(e,this.interface,this.runner)}async getAddress(){return await Ki(this).addrPromise}async getDeployedCode(){const e=ju(this.runner);me(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const n=await e.getCode(await this.getAddress());return n==="0x"?null:n}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=ju(this.runner);return me(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,a)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);r.once("block",o)}catch(s){a(s)}};o()})}deploymentTransaction(){return Ki(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),Lre(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),$re(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,n,r){n==null&&(n=0),r==null&&(r="latest");const{addr:i,addrPromise:a}=Ki(this),o=i||await a,{fragment:s,topics:l}=await bO(this,e),c={address:o,topics:l,fromBlock:n,toBlock:r},u=ju(this.runner);return me(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(c)).map(f=>{let h=s;if(h==null)try{h=this.interface.getEvent(f.topics[0])}catch{}if(h)try{return new mO(f,this.interface,h)}catch(d){return new EU(f,d)}return new cv(f,u)})}async on(e,n){const r=await k_(this,"on",e);return r.listeners.push({listener:n,once:!1}),r.start(),this}async once(e,n){const r=await k_(this,"once",e);return r.listeners.push({listener:n,once:!0}),r.start(),this}async emit(e,...n){return await M3(this,e,n,null)}async listenerCount(e){if(e){const i=await cy(this,e);return i?i.listeners.length:0}const{subs:n}=Ki(this);let r=0;for(const{listeners:i}of n.values())r+=i.length;return r}async listeners(e){if(e){const i=await cy(this,e);return i?i.listeners.map(({listener:a})=>a):[]}const{subs:n}=Ki(this);let r=[];for(const{listeners:i}of n.values())r=r.concat(i.map(({listener:a})=>a));return r}async off(e,n){const r=await cy(this,e);if(!r)return this;if(n){const i=r.listeners.map(({listener:a})=>a).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(n==null||r.listeners.length===0)&&(r.stop(),Ki(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){const n=await cy(this,e);if(!n)return this;n.stop(),Ki(this).subs.delete(n.tag)}else{const{subs:n}=Ki(this);for(const{tag:r,stop:i}of n.values())i(),n.delete(r)}return this}async addListener(e,n){return await this.on(e,n)}async removeListener(e,n){return await this.off(e,n)}static buildClass(e){class n extends Uy{constructor(i,a=null){super(i,e,a)}}return n}static from(e,n,r){return r==null&&(r=null),new this(e,n,r)}};vPe=cx;let B3=Uy;function zre(){return B3}class ky extends zre(){}function iE(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):J(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class Hre{constructor(e){R(this,"name");mt(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,n){throw new Error("unsupported coin")}async decodeAddress(e,n){throw new Error("unsupported coin")}}const NU=new RegExp("^(ipfs)://(.*)$","i"),__=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),NU,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Ec,Of,Sc,Hh,p2,IU;const bd=class bd{constructor(e,n,r){M(this,Sc);R(this,"provider");R(this,"address");R(this,"name");M(this,Ec,void 0);M(this,Of,void 0);mt(this,{provider:e,address:n,name:r}),O(this,Ec,null),O(this,Of,new ky(n,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return v(this,Ec)==null&&O(this,Ec,(async()=>{try{return await v(this,Of).supportsInterface("0x9061b923")}catch(e){if(Kr(e,"CALL_EXCEPTION"))return!1;throw O(this,Ec,null),e}})()),await v(this,Ec)}async getAddress(e){if(e==null&&(e=60),e===60)try{const a=await ie(this,Sc,Hh).call(this,"addr(bytes32)");return a==null||a===S3?null:a}catch(a){if(Kr(a,"CALL_EXCEPTION"))return null;throw a}if(e>=0&&e<2147483648){let a=e+2147483648;const o=await ie(this,Sc,Hh).call(this,"addr(bytes32,uint)",[a]);if(In(o,20))return rn(o)}let n=null;for(const a of this.provider.plugins)if(a instanceof Hre&&a.supportsCoinType(e)){n=a;break}if(n==null)return null;const r=await ie(this,Sc,Hh).call(this,"addr(bytes32,uint)",[e]);if(r==null||r==="0x")return null;const i=await n.decodeAddress(e,r);if(i!=null)return i;me(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:r}})}async getText(e){const n=await ie(this,Sc,Hh).call(this,"text(bytes32,string)",[e]);return n==null||n==="0x"?null:n}async getContentHash(){const e=await ie(this,Sc,Hh).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const n=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(n){const i=n[1]==="e3010170"?"ipfs":"ipns",a=parseInt(n[4],16);if(n[5].length===a*2)return`${i}://${kte("0x"+n[2])}`}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&r[1].length===64)return`bzz://${r[1]}`;me(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const n=await this.getText("avatar");if(n==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:n});for(let r=0;r<__.length;r++){const i=n.match(__[r]);if(i==null)continue;const a=i[1].toLowerCase();switch(a){case"https":case"data":return e.push({type:"url",value:n}),{linkage:e,url:n};case"ipfs":{const o=iE(n);return e.push({type:"ipfs",value:n}),e.push({type:"url",value:o}),{linkage:e,url:o}}case"erc721":case"erc1155":{const o=a==="erc721"?"tokenURI(uint256)":"uri(uint256)";e.push({type:a,value:n});const s=await this.getAddress();if(s==null)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const l=(i[2]||"").split("/");if(l.length!==2)return e.push({type:`!${a}caip`,value:i[2]||""}),{url:null,linkage:e};const c=l[1],u=new ky(l[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(a==="erc721"){const p=await u.ownerOf(c);if(s!==p)return e.push({type:"!owner",value:p}),{url:null,linkage:e};e.push({type:"owner",value:p})}else if(a==="erc1155"){const p=await u.balanceOf(s,c);if(!p)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:p.toString()})}let f=await u[o](c);if(f==null||f==="0x")return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:f}),a==="erc1155"&&(f=f.replace("{id}",fs(c,32).substring(2)),e.push({type:"metadata-url-expanded",value:f})),f.match(/^ipfs:/i)&&(f=iE(f)),e.push({type:"metadata-url",value:f});let h={};const d=await new Sl(f).send();d.assertOk();try{h=d.bodyJson}catch{try{e.push({type:"!metadata",value:d.bodyText})}catch{const m=d.body;return m&&e.push({type:"!metadata",value:Ze(m)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!h)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(h)});let g=h.image;if(typeof g!="string")return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(!g.match(/^(https:\/\/|data:)/i)){if(g.match(NU)==null)return e.push({type:"!imageUrl-ipfs",value:g}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:g}),g=iE(g)}return e.push({type:"url",value:g}),{linkage:e,url:g}}}}}catch{}return{linkage:e,url:null}}static async getEnsAddress(e){const n=await e.getNetwork(),r=n.getPlugin("org.ethers.plugins.network.Ens");return me(r,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:n}}),r.address}static async fromName(e,n){var i;let r=n;for(;;){if(r===""||r==="."||n!=="eth"&&r==="eth")return null;const a=await ie(i=bd,p2,IU).call(i,e,r);if(a!=null){const o=new bd(e,a,n);return r!==n&&!await o.supportsWildcard()?null:o}r=r.split(".").slice(1).join(".")}}};Ec=new WeakMap,Of=new WeakMap,Sc=new WeakSet,Hh=async function(e,n){n=(n||[]).slice();const r=v(this,Of).interface;n.unshift(_3(this.name));let i=null;await this.supportsWildcard()&&(i=r.getFunction(e),me(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),n=[Wne(this.name),r.encodeFunctionData(i,n)],e="resolve(bytes,bytes)"),n.push({enableCcipRead:!0});try{const a=await v(this,Of)[e](...n);return i?r.decodeFunctionResult(i,a)[0]:a}catch(a){if(!Kr(a,"CALL_EXCEPTION"))throw a}return null},p2=new WeakSet,IU=async function(e,n){const r=await bd.getEnsAddress(e);try{const a=await new ky(r,["function resolver(bytes32) view returns (address)"],e).resolver(_3(n),{enableCcipRead:!0});return a===S3?null:a}catch(i){throw i}return null},M(bd,p2);let ux=bd;const N_=BigInt(0);function Tn(t,e){return function(n){return n==null?e:t(n)}}function wO(t){return e=>{if(!Array.isArray(e))throw new Error("not an array");return e.map(n=>t(n))}}function uv(t,e){return n=>{const r={};for(const i in t){let a=i;if(e&&i in e&&!(a in n)){for(const o of e[i])if(o in n){a=o;break}}try{const o=t[i](n[a]);o!==void 0&&(r[i]=o)}catch(o){const s=o instanceof Error?o.message:"not-an-error";me(!1,`invalid value for value.${i} (${s})`,"BAD_DATA",{value:n})}}return r}}function Gre(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}J(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Cp(t){return J(In(t,!0),"invalid data","value",t),t}function za(t){return J(In(t,32),"invalid hash","value",t),t}const Vre=uv({address:rn,blockHash:za,blockNumber:Lt,data:Cp,index:Lt,removed:Tn(Gre,!1),topics:wO(za),transactionHash:za,transactionIndex:Lt},{index:["logIndex"]});function Qre(t){return Vre(t)}const Kre=uv({hash:Tn(za),parentHash:za,number:Lt,timestamp:Lt,nonce:Tn(Cp),difficulty:ot,gasLimit:ot,gasUsed:ot,miner:Tn(rn),extraData:Cp,baseFeePerGas:Tn(ot)});function Wre(t){const e=Kre(t);return e.transactions=t.transactions.map(n=>typeof n=="string"?n:RU(n)),e}const Jre=uv({transactionIndex:Lt,blockNumber:Lt,transactionHash:za,address:rn,topics:wO(za),data:Cp,index:Lt,blockHash:za},{index:["logIndex"]});function Yre(t){return Jre(t)}const Xre=uv({to:Tn(rn,null),from:Tn(rn,null),contractAddress:Tn(rn,null),index:Lt,root:Tn(Ze),gasUsed:ot,logsBloom:Tn(Cp),blockHash:za,hash:za,logs:wO(Yre),blockNumber:Lt,cumulativeGasUsed:ot,effectiveGasPrice:Tn(ot),status:Tn(Lt),type:Tn(Lt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function Zre(t){return Xre(t)}function RU(t){t.to&&ot(t.to)===N_&&(t.to="0x0000000000000000000000000000000000000000");const e=uv({hash:za,type:n=>n==="0x"||n==null?0:Lt(n),accessList:Tn(wh,null),blockHash:Tn(za,null),blockNumber:Tn(Lt,null),transactionIndex:Tn(Lt,null),from:rn,gasPrice:Tn(ot),maxPriorityFeePerGas:Tn(ot),maxFeePerGas:Tn(ot),gasLimit:ot,to:Tn(rn,null),value:ot,nonce:Lt,data:Cp,creates:Tn(rn,null),chainId:Tn(ot,null)},{data:["input"],gasLimit:["gas"]})(t);if(e.to==null&&e.creates==null&&(e.creates=Xte(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=To.from(t.signature):e.signature=To.from(t),e.chainId==null){const n=e.signature.legacyChainId;n!=null&&(e.chainId=n)}return e.blockHash&&ot(e.blockHash)===N_&&(e.blockHash=null),e}const qre="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class fv{constructor(e){R(this,"name");mt(this,{name:e})}clone(){return new fv(this.name)}}class sA extends fv{constructor(n,r){n==null&&(n=0);super(`org.ethers.network.plugins.GasCost#${n||0}`);R(this,"effectiveBlock");R(this,"txBase");R(this,"txCreate");R(this,"txDataZero");R(this,"txDataNonzero");R(this,"txAccessListStorageKey");R(this,"txAccessListAddress");const i={effectiveBlock:n};function a(o,s){let l=(r||{})[o];l==null&&(l=s),J(typeof l=="number",`invalud value for ${o}`,"costs",r),i[o]=l}a("txBase",21e3),a("txCreate",32e3),a("txDataZero",4),a("txDataNonzero",16),a("txAccessListStorageKey",1900),a("txAccessListAddress",2400),mt(this,i)}clone(){return new sA(this.effectiveBlock,this)}}class lA extends fv{constructor(n,r){super("org.ethers.plugins.network.Ens");R(this,"address");R(this,"targetNetwork");mt(this,{address:n||qre,targetNetwork:r??1})}clone(){return new lA(this.address,this.targetNetwork)}}var $m,Um;class eie extends fv{constructor(n,r){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");M(this,$m,void 0);M(this,Um,void 0);O(this,$m,n),O(this,Um,r)}get url(){return v(this,$m)}get processFunc(){return v(this,Um)}clone(){return this}}$m=new WeakMap,Um=new WeakMap;const aE=new Map;var Y0,X0,Pc;const wd=class wd{constructor(e,n){M(this,Y0,void 0);M(this,X0,void 0);M(this,Pc,void 0);O(this,Y0,e),O(this,X0,ot(n)),O(this,Pc,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return v(this,Y0)}set name(e){O(this,Y0,e)}get chainId(){return v(this,X0)}set chainId(e){O(this,X0,ot(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===ot(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===ot(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===ot(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(v(this,Pc).values())}attachPlugin(e){if(v(this,Pc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return v(this,Pc).set(e.name,e.clone()),this}getPlugin(e){return v(this,Pc).get(e)||null}getPlugins(e){return this.plugins.filter(n=>n.name.split("#")[0]===e)}clone(){const e=new wd(this.name,this.chainId);return this.plugins.forEach(n=>{e.attachPlugin(n.clone())}),e}computeIntrinsicGas(e){const n=this.getPlugin("org.ethers.plugins.network.GasCost")||new sA;let r=n.txBase;if(e.to==null&&(r+=n.txCreate),e.data)for(let i=2;i9){let i=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||i++,r[1]=i.toString()}return BigInt(r[0]+r[1])}function R_(t){return new eie(t,async(e,n,r)=>{r.setHeader("User-Agent","ethers");let i;try{const[a,o]=await Promise.all([r.send(),e()]);i=a;const s=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:I_(s.maxFee,9),maxPriorityFeePerGas:I_(s.maxPriorityFee,9)}}catch(a){me(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:i,error:a})}})}let M_=!1;function tie(){if(M_)return;M_=!0;function t(e,n,r){const i=function(){const a=new ns(e,n);return r.ensNetwork!=null&&a.attachPlugin(new lA(null,r.ensNetwork)),a.attachPlugin(new sA),(r.plugins||[]).forEach(o=>{a.attachPlugin(o)}),a};ns.register(e,i),ns.register(n,i),r.altNames&&r.altNames.forEach(a=>{ns.register(a,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("matic",137,{ensNetwork:1,plugins:[R_("https://gasstation.polygon.technology/v2")]}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[R_("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("xdai",100,{ensNetwork:1})}function D3(t){return JSON.parse(JSON.stringify(t))}var Xs,Oa,Oc,Jo,Z0,ow;class nie{constructor(e){M(this,Z0);M(this,Xs,void 0);M(this,Oa,void 0);M(this,Oc,void 0);M(this,Jo,void 0);O(this,Xs,e),O(this,Oa,null),O(this,Oc,4e3),O(this,Jo,-2)}get pollingInterval(){return v(this,Oc)}set pollingInterval(e){O(this,Oc,e)}start(){v(this,Oa)||(O(this,Oa,v(this,Xs)._setTimeout(ie(this,Z0,ow).bind(this),v(this,Oc))),ie(this,Z0,ow).call(this))}stop(){v(this,Oa)&&(v(this,Xs)._clearTimeout(v(this,Oa)),O(this,Oa,null))}pause(e){this.stop(),e&&O(this,Jo,-2)}resume(){this.start()}}Xs=new WeakMap,Oa=new WeakMap,Oc=new WeakMap,Jo=new WeakMap,Z0=new WeakSet,ow=async function(){try{const e=await v(this,Xs).getBlockNumber();if(v(this,Jo)===-2){O(this,Jo,e);return}if(e!==v(this,Jo)){for(let n=v(this,Jo)+1;n<=e;n++){if(v(this,Oa)==null)return;await v(this,Xs).emit("block",n)}O(this,Jo,e)}}catch{}v(this,Oa)!=null&&O(this,Oa,v(this,Xs)._setTimeout(ie(this,Z0,ow).bind(this),v(this,Oc)))};var Tf,Cf,Tc;class xO{constructor(e){M(this,Tf,void 0);M(this,Cf,void 0);M(this,Tc,void 0);O(this,Tf,e),O(this,Tc,!1),O(this,Cf,n=>{this._poll(n,v(this,Tf))})}async _poll(e,n){throw new Error("sub-classes must override this")}start(){v(this,Tc)||(O(this,Tc,!0),v(this,Cf).call(this,-2),v(this,Tf).on("block",v(this,Cf)))}stop(){v(this,Tc)&&(O(this,Tc,!1),v(this,Tf).off("block",v(this,Cf)))}pause(e){this.stop()}resume(){this.start()}}Tf=new WeakMap,Cf=new WeakMap,Tc=new WeakMap;var q0,Zs;class rie extends xO{constructor(n,r){super(n);M(this,q0,void 0);M(this,Zs,void 0);O(this,q0,r),O(this,Zs,-2)}pause(n){n&&O(this,Zs,-2),super.pause(n)}async _poll(n,r){const i=await r.getBlock(v(this,q0));i!=null&&(v(this,Zs)===-2?O(this,Zs,i.number):i.number>v(this,Zs)&&(r.emit(v(this,q0),i.number),O(this,Zs,i.number)))}}q0=new WeakMap,Zs=new WeakMap;var g2;class iie extends xO{constructor(n,r){super(n);M(this,g2,void 0);O(this,g2,D3(r))}async _poll(n,r){throw new Error("@TODO")}}g2=new WeakMap;var ep;class aie extends xO{constructor(n,r){super(n);M(this,ep,void 0);O(this,ep,r)}async _poll(n,r){const i=await r.getTransactionReceipt(v(this,ep));i&&r.emit(v(this,ep),i)}}ep=new WeakMap;var qs,tp,np,Cc,Ta,y2,MU;class AO{constructor(e,n){M(this,y2);M(this,qs,void 0);M(this,tp,void 0);M(this,np,void 0);M(this,Cc,void 0);M(this,Ta,void 0);O(this,qs,e),O(this,tp,D3(n)),O(this,np,ie(this,y2,MU).bind(this)),O(this,Cc,!1),O(this,Ta,-2)}start(){v(this,Cc)||(O(this,Cc,!0),v(this,Ta)===-2&&v(this,qs).getBlockNumber().then(e=>{O(this,Ta,e)}),v(this,qs).on("block",v(this,np)))}stop(){v(this,Cc)&&(O(this,Cc,!1),v(this,qs).off("block",v(this,np)))}pause(e){this.stop(),e&&O(this,Ta,-2)}resume(){this.start()}}qs=new WeakMap,tp=new WeakMap,np=new WeakMap,Cc=new WeakMap,Ta=new WeakMap,y2=new WeakSet,MU=async function(e){if(v(this,Ta)===-2)return;const n=D3(v(this,tp));n.fromBlock=v(this,Ta)+1,n.toBlock=e;const r=await v(this,qs).getLogs(n);if(r.length===0){v(this,Ta){if(r==null)return"null";if(typeof r=="bigint")return`bigint:${r.toString()}`;if(typeof r=="string")return r.toLowerCase();if(typeof r=="object"&&!Array.isArray(r)){const i=Object.keys(r);return i.sort(),i.reduce((a,o)=>(a[o]=r[o],a),{})}return r})}class BU{constructor(e){R(this,"name");mt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function lie(t){return JSON.parse(JSON.stringify(t))}function L3(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function oE(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(In(t,32)){const n=t.toLowerCase();return{type:"transaction",tag:sw("tx",{hash:n}),hash:n}}if(t.orphan){const n=t;return{type:"orphan",tag:sw("orphan",n),filter:lie(n)}}if(t.address||t.topics){const n=t,r={topics:(n.topics||[]).map(i=>i==null?null:Array.isArray(i)?L3(i.map(a=>a.toLowerCase())):i.toLowerCase())};if(n.address){const i=[],a=[],o=s=>{In(s)?i.push(s):a.push((async()=>{i.push(await fi(s,e))})())};Array.isArray(n.address)?n.address.forEach(o):o(n.address),a.length&&await Promise.all(a),r.address=L3(i.map(s=>s.toLowerCase()))}return{filter:r,tag:sw("event",r),type:"event"}}J(!1,"unknown ProviderEvent","event",t)}function sE(){return new Date().getTime()}const cie={cacheTimeout:250,pollingInterval:4e3};var Fr,kc,jr,rp,ta,kf,_c,el,Fm,Ca,ip,ap,qr,Vi,jm,$3,zm,U3,_f,uy,Hm,F3,Nf,fy,op,lw;class DU{constructor(e,n){M(this,qr);M(this,jm);M(this,zm);M(this,_f);M(this,Hm);M(this,Nf);M(this,op);M(this,Fr,void 0);M(this,kc,void 0);M(this,jr,void 0);M(this,rp,void 0);M(this,ta,void 0);M(this,kf,void 0);M(this,_c,void 0);M(this,el,void 0);M(this,Fm,void 0);M(this,Ca,void 0);M(this,ip,void 0);M(this,ap,void 0);if(O(this,ap,Object.assign({},cie,n||{})),e==="any")O(this,kf,!0),O(this,ta,null);else if(e){const r=ns.from(e);O(this,kf,!1),O(this,ta,Promise.resolve(r)),setTimeout(()=>{this.emit("network",r,null)},0)}else O(this,kf,!1),O(this,ta,null);O(this,el,-1),O(this,_c,new Map),O(this,Fr,new Map),O(this,kc,new Map),O(this,jr,null),O(this,rp,!1),O(this,Fm,1),O(this,Ca,new Map),O(this,ip,!1)}get pollingInterval(){return v(this,ap).pollingInterval}get provider(){return this}get plugins(){return Array.from(v(this,kc).values())}attachPlugin(e){if(v(this,kc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return v(this,kc).set(e.name,e.connect(this)),this}getPlugin(e){return v(this,kc).get(e)||null}get disableCcipRead(){return v(this,ip)}set disableCcipRead(e){O(this,ip,!!e)}async ccipReadFetch(e,n,r){if(this.disableCcipRead||r.length===0||e.to==null)return null;const i=e.to.toLowerCase(),a=n.toLowerCase(),o=[];for(let s=0;s=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:l,errorMessage:f}}),o.push(f)}me(!1,`error encountered during CCIP fetch: ${o.map(s=>JSON.stringify(s)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:o}})}_wrapBlock(e,n){return new kre(Wre(e),this)}_wrapLog(e,n){return new cv(Qre(e),this)}_wrapTransactionReceipt(e,n){return new wU(Zre(e),this)}_wrapTransactionResponse(e,n){return new S1(RU(e),this)}_detectNetwork(){me(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){me(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Lt(await ie(this,qr,Vi).call(this,{method:"getBlockNumber"}),"%response");return v(this,el)>=0&&O(this,el,e),e}_getAddress(e){return fi(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(In(e))return In(e,32)?e:Uu(e);if(typeof e=="bigint"&&(e=Lt(e,"blockTag")),typeof e=="number")return e>=0?Uu(e):v(this,el)>=0?Uu(v(this,el)+e):this.getBlockNumber().then(n=>Uu(n+e));J(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const n=(e.topics||[]).map(l=>l==null?null:Array.isArray(l)?L3(l.map(c=>c.toLowerCase())):l.toLowerCase()),r="blockHash"in e?e.blockHash:void 0,i=(l,c,u)=>{let f;switch(l.length){case 0:break;case 1:f=l[0];break;default:l.sort(),f=l}if(r&&(c!=null||u!=null))throw new Error("invalid filter");const h={};return f&&(h.address=f),n.length&&(h.topics=n),c&&(h.fromBlock=c),u&&(h.toBlock=u),r&&(h.blockHash=r),h};let a=[];if(e.address)if(Array.isArray(e.address))for(const l of e.address)a.push(this._getAddress(l));else a.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let s;return"toBlock"in e&&(s=this._getBlockTag(e.toBlock)),a.filter(l=>typeof l!="string").length||o!=null&&typeof o!="string"||s!=null&&typeof s!="string"?Promise.all([Promise.all(a),o,s]).then(l=>i(l[0],l[1],l[2])):i(a,o,s)}_getTransactionRequest(e){const n=lx(e),r=[];if(["to","from"].forEach(i=>{if(n[i]==null)return;const a=fi(n[i],this);rb(a)?r.push(async function(){n[i]=await a}()):n[i]=a}),n.blockTag!=null){const i=this._getBlockTag(n.blockTag);rb(i)?r.push(async function(){n.blockTag=await i}()):n.blockTag=i}return r.length?async function(){return await Promise.all(r),n}():n}async getNetwork(){if(v(this,ta)==null){const i=(async()=>{try{const a=await this._detectNetwork();return this.emit("network",a,null),a}catch(a){throw v(this,ta)===i&&O(this,ta,null),a}})();return O(this,ta,i),(await i).clone()}const e=v(this,ta),[n,r]=await Promise.all([e,this._detectNetwork()]);return n.chainId!==r.chainId&&(v(this,kf)?(this.emit("network",r,n),v(this,ta)===e&&O(this,ta,Promise.resolve(r))):me(!1,`network changed: ${n.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),n.clone()}async getFeeData(){const e=await this.getNetwork(),n=async()=>{const{_block:i,gasPrice:a,priorityFee:o}=await ni({_block:ie(this,Hm,F3).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await ie(this,qr,Vi).call(this,{method:"getGasPrice"});return ot(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await ie(this,qr,Vi).call(this,{method:"getPriorityFee"});return ot(u,"%response")}catch{}return null})()});let s=null,l=null;const c=this._wrapBlock(i,e);return c&&c.baseFeePerGas&&(l=o??BigInt("1000000000"),s=c.baseFeePerGas*oie+l),new T_(a,s,l)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const i=new Sl(r.url),a=await r.processFunc(n,this,i);return new T_(a.gasPrice,a.maxFeePerGas,a.maxPriorityFeePerGas)}return await n()}async estimateGas(e){let n=this._getTransactionRequest(e);return rb(n)&&(n=await n),ot(await ie(this,qr,Vi).call(this,{method:"estimateGas",transaction:n}),"%response")}async call(e){const{tx:n,blockTag:r}=await ni({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await ie(this,zm,U3).call(this,ie(this,jm,$3).call(this,n,r,e.enableCcipRead?0:-1))}async getBalance(e,n){return ot(await ie(this,_f,uy).call(this,{method:"getBalance"},e,n),"%response")}async getTransactionCount(e,n){return Lt(await ie(this,_f,uy).call(this,{method:"getTransactionCount"},e,n),"%response")}async getCode(e,n){return Ze(await ie(this,_f,uy).call(this,{method:"getCode"},e,n))}async getStorage(e,n,r){const i=ot(n,"position");return Ze(await ie(this,_f,uy).call(this,{method:"getStorage",position:i},e,r))}async broadcastTransaction(e){const{blockNumber:n,hash:r,network:i}=await ni({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),a=w1.from(e);if(a.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(a,i).replaceableTransaction(n)}async getBlock(e,n){const{network:r,params:i}=await ni({network:this.getNetwork(),params:ie(this,Hm,F3).call(this,e,!!n)});return i==null?null:this._wrapBlock(i,r)}async getTransaction(e){const{network:n,params:r}=await ni({network:this.getNetwork(),params:ie(this,qr,Vi).call(this,{method:"getTransaction",hash:e})});return r==null?null:this._wrapTransactionResponse(r,n)}async getTransactionReceipt(e){const{network:n,params:r}=await ni({network:this.getNetwork(),params:ie(this,qr,Vi).call(this,{method:"getTransactionReceipt",hash:e})});if(r==null)return null;if(r.gasPrice==null&&r.effectiveGasPrice==null){const i=await ie(this,qr,Vi).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(r,n)}async getTransactionResult(e){const{result:n}=await ni({network:this.getNetwork(),result:ie(this,qr,Vi).call(this,{method:"getTransactionResult",hash:e})});return n==null?null:Ze(n)}async getLogs(e){let n=this._getFilter(e);rb(n)&&(n=await n);const{network:r,params:i}=await ni({network:this.getNetwork(),params:ie(this,qr,Vi).call(this,{method:"getLogs",filter:n})});return i.map(a=>this._wrapLog(a,r))}_getProvider(e){me(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await ux.fromName(this,e)}async getAvatar(e){const n=await this.getResolver(e);return n?await n.getAvatar():null}async resolveName(e){const n=await this.getResolver(e);return n?await n.getAddress():null}async lookupAddress(e){e=rn(e);const n=_3(e.substring(2).toLowerCase()+".addr.reverse");try{const r=await ux.getEnsAddress(this),a=await new ky(r,["function resolver(bytes32) view returns (address)"],this).resolver(n);if(a==null||a===S3)return null;const s=await new ky(a,["function name(bytes32) view returns (string)"],this).name(n);return await this.resolveName(s)!==e?null:s}catch(r){if(Kr(r,"BAD_DATA")&&r.value==="0x"||Kr(r,"CALL_EXCEPTION"))return null;throw r}return null}async waitForTransaction(e,n,r){const i=n??1;return i===0?this.getTransactionReceipt(e):new Promise(async(a,o)=>{let s=null;const l=async c=>{try{const u=await this.getTransactionReceipt(e);if(u!=null&&c-u.blockNumber+1>=i){a(u),s&&(clearTimeout(s),s=null);return}}catch(u){console.log("EEE",u)}this.once("block",l)};r!=null&&(s=setTimeout(()=>{s!=null&&(s=null,this.off("block",l),o(qn("timeout","TIMEOUT",{reason:"timeout"})))},r)),l(await this.getBlockNumber())})}async waitForBlock(e){me(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const n=v(this,Ca).get(e);n&&(n.timer&&clearTimeout(n.timer),v(this,Ca).delete(e))}_setTimeout(e,n){n==null&&(n=0);const r=vs(this,Fm)._++,i=()=>{v(this,Ca).delete(r),e()};if(this.paused)v(this,Ca).set(r,{timer:null,func:i,time:n});else{const a=setTimeout(i,n);v(this,Ca).set(r,{timer:a,func:i,time:sE()})}return r}_forEachSubscriber(e){for(const n of v(this,Fr).values())e(n.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new BU(e.type);case"block":{const n=new nie(this);return n.pollingInterval=this.pollingInterval,n}case"safe":case"finalized":return new rie(this,e.type);case"event":return new AO(this,e.filter);case"transaction":return new aie(this,e.hash);case"orphan":return new iie(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,n){for(const r of v(this,Fr).values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=n,r.started&&n.start(),v(this,jr)!=null&&n.pause(v(this,jr));break}}async on(e,n){const r=await ie(this,op,lw).call(this,e);return r.listeners.push({listener:n,once:!1}),r.started||(r.subscriber.start(),r.started=!0,v(this,jr)!=null&&r.subscriber.pause(v(this,jr))),this}async once(e,n){const r=await ie(this,op,lw).call(this,e);return r.listeners.push({listener:n,once:!0}),r.started||(r.subscriber.start(),r.started=!0,v(this,jr)!=null&&r.subscriber.pause(v(this,jr))),this}async emit(e,...n){const r=await ie(this,Nf,fy).call(this,e,n);if(!r||r.listeners.length===0)return!1;const i=r.listeners.length;return r.listeners=r.listeners.filter(({listener:a,once:o})=>{const s=new w$(this,o?null:a,e);try{a.call(this,...n,s)}catch{}return!o}),r.listeners.length===0&&(r.started&&r.subscriber.stop(),v(this,Fr).delete(r.tag)),i>0}async listenerCount(e){if(e){const r=await ie(this,Nf,fy).call(this,e);return r?r.listeners.length:0}let n=0;for(const{listeners:r}of v(this,Fr).values())n+=r.length;return n}async listeners(e){if(e){const r=await ie(this,Nf,fy).call(this,e);return r?r.listeners.map(({listener:i})=>i):[]}let n=[];for(const{listeners:r}of v(this,Fr).values())n=n.concat(r.map(({listener:i})=>i));return n}async off(e,n){const r=await ie(this,Nf,fy).call(this,e);if(!r)return this;if(n){const i=r.listeners.map(({listener:a})=>a).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(!n||r.listeners.length===0)&&(r.started&&r.subscriber.stop(),v(this,Fr).delete(r.tag)),this}async removeAllListeners(e){if(e){const{tag:n,started:r,subscriber:i}=await ie(this,op,lw).call(this,e);r&&i.stop(),v(this,Fr).delete(n)}else for(const[n,{started:r,subscriber:i}]of v(this,Fr))r&&i.stop(),v(this,Fr).delete(n);return this}async addListener(e,n){return await this.on(e,n)}async removeListener(e,n){return this.off(e,n)}get destroyed(){return v(this,rp)}destroy(){this.removeAllListeners();for(const e of v(this,Ca).keys())this._clearTimeout(e);O(this,rp,!0)}get paused(){return v(this,jr)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(O(this,el,-1),v(this,jr)!=null){if(v(this,jr)==!!e)return;me(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(n=>n.pause(e)),O(this,jr,!!e);for(const n of v(this,Ca).values())n.timer&&clearTimeout(n.timer),n.time=sE()-n.time}resume(){if(v(this,jr)!=null){this._forEachSubscriber(e=>e.resume()),O(this,jr,null);for(const e of v(this,Ca).values()){let n=e.time;n<0&&(n=0),e.time=sE(),setTimeout(e.func,n)}}}}Fr=new WeakMap,kc=new WeakMap,jr=new WeakMap,rp=new WeakMap,ta=new WeakMap,kf=new WeakMap,_c=new WeakMap,el=new WeakMap,Fm=new WeakMap,Ca=new WeakMap,ip=new WeakMap,ap=new WeakMap,qr=new WeakSet,Vi=async function(e){const n=v(this,ap).cacheTimeout;if(n<0)return await this._perform(e);const r=sw(e.method,e);let i=v(this,_c).get(r);return i||(i=this._perform(e),v(this,_c).set(r,i),setTimeout(()=>{v(this,_c).get(r)===i&&v(this,_c).delete(r)},n)),await i},jm=new WeakSet,$3=async function(e,n,r){me(r=0&&n==="latest"&&i.to!=null&&Fn(a.data,0,4)==="0x556f1830"){const o=a.data,s=await fi(i.to,this);let l;try{l=pie(Fn(a.data,4))}catch(f){me(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}me(l.sender.toLowerCase()===s.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:l.errorArgs}});const c=await this.ccipReadFetch(i,l.calldata,l.urls);me(c!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:a.data,errorArgs:l.errorArgs}});const u={to:s,data:sr([l.selector,die([c,l.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:u});try{const f=await ie(this,jm,$3).call(this,u,n,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},u),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},u),error:f}),f}}throw a}},zm=new WeakSet,U3=async function(e){const{value:n}=await ni({network:this.getNetwork(),value:e});return n},_f=new WeakSet,uy=async function(e,n,r){let i=this._getAddress(n),a=this._getBlockTag(r);return(typeof i!="string"||typeof a!="string")&&([i,a]=await Promise.all([i,a])),await ie(this,zm,U3).call(this,ie(this,qr,Vi).call(this,Object.assign(e,{address:i,blockTag:a})))},Hm=new WeakSet,F3=async function(e,n){if(In(e,32))return await ie(this,qr,Vi).call(this,{method:"getBlock",blockHash:e,includeTransactions:n});let r=this._getBlockTag(e);return typeof r!="string"&&(r=await r),await ie(this,qr,Vi).call(this,{method:"getBlock",blockTag:r,includeTransactions:n})},Nf=new WeakSet,fy=async function(e,n){let r=await oE(e,this);return r.type==="event"&&n&&n.length>0&&n[0].removed===!0&&(r=await oE({orphan:"drop-log",log:n[0]},this)),v(this,Fr).get(r.tag)||null},op=new WeakSet,lw=async function(e){const n=await oE(e,this),r=n.tag;let i=v(this,Fr).get(r);return i||(i={subscriber:this._getSubscriber(n),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},v(this,Fr).set(r,i)),i};function uie(t,e){try{const n=j3(t,e);if(n)return uO(n)}catch{}return null}function j3(t,e){if(t==="0x")return null;try{const n=Lt(Fn(t,e,e+32)),r=Lt(Fn(t,n,n+32));return Fn(t,n+32,n+32+r)}catch{}return null}function B_(t){const e=sa(t);if(e.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(e,32-e.length),n}function fie(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const hie=new Uint8Array([]);function die(t){const e=[];let n=0;for(let r=0;r=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const n=Fn(t,0,32);me(Fn(n,0,12)===Fn(D_,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=Fn(n,12);try{const r=[],i=Lt(Fn(t,32,64)),a=Lt(Fn(t,i,i+32)),o=Fn(t,i+32);for(let s=0;se[r]),e}function _h(t,e){if(t.provider)return t.provider;me(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function L_(t,e){let n=lx(e);if(n.to!=null&&(n.to=fi(n.to,t)),n.from!=null){const r=n.from;n.from=Promise.all([t.getAddress(),fi(r,t)]).then(([i,a])=>(J(i.toLowerCase()===a.toLowerCase(),"transaction from mismatch","tx.from",a),i))}else n.from=t.getAddress();return await ni(n)}class LU{constructor(e){R(this,"provider");mt(this,{provider:e||null})}async getNonce(e){return _h(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await L_(this,e)}async populateTransaction(e){const n=_h(this,"populateTransaction"),r=await L_(this,e);r.nonce==null&&(r.nonce=await this.getNonce("pending")),r.gasLimit==null&&(r.gasLimit=await this.estimateGas(r));const i=await this.provider.getNetwork();if(r.chainId!=null){const o=ot(r.chainId);J(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=i.chainId;const a=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||a)?J(!1,"eip-1559 transaction do not support gasPrice","tx",e):(r.type===0||r.type===1)&&a&&J(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1){const o=await n.getFeeData();me(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),r.gasPrice==null&&(r.gasPrice=o.gasPrice)}else{const o=await n.getFeeData();if(r.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=o.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(me(!a,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=o.gasPrice),r.type=0):me(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=o.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await ni(r)}async estimateGas(e){return _h(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return _h(this,"call").call(await this.populateCall(e))}async resolveName(e){return await _h(this,"resolveName").resolveName(e)}async sendTransaction(e){const n=_h(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const i=w1.from(r);return await n.broadcastTransaction(await this.signTransaction(i))}}function gie(t){return JSON.parse(JSON.stringify(t))}var Ei,Yo,If,Nc,Rf,sp,Gm,z3,Vm,H3;class $U{constructor(e){M(this,Gm);M(this,Vm);M(this,Ei,void 0);M(this,Yo,void 0);M(this,If,void 0);M(this,Nc,void 0);M(this,Rf,void 0);M(this,sp,void 0);O(this,Ei,e),O(this,Yo,null),O(this,If,ie(this,Gm,z3).bind(this)),O(this,Nc,!1),O(this,Rf,null),O(this,sp,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,n){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){v(this,Nc)||(O(this,Nc,!0),ie(this,Gm,z3).call(this,-2))}stop(){v(this,Nc)&&(O(this,Nc,!1),O(this,sp,!0),ie(this,Vm,H3).call(this),v(this,Ei).off("block",v(this,If)))}pause(e){e&&ie(this,Vm,H3).call(this),v(this,Ei).off("block",v(this,If))}resume(){this.start()}}Ei=new WeakMap,Yo=new WeakMap,If=new WeakMap,Nc=new WeakMap,Rf=new WeakMap,sp=new WeakMap,Gm=new WeakSet,z3=async function(e){try{v(this,Yo)==null&&O(this,Yo,this._subscribe(v(this,Ei)));let n=null;try{n=await v(this,Yo)}catch(a){if(!Kr(a,"UNSUPPORTED_OPERATION")||a.operation!=="eth_newFilter")throw a}if(n==null){O(this,Yo,null),v(this,Ei)._recoverSubscriber(this,this._recover(v(this,Ei)));return}const r=await v(this,Ei).getNetwork();if(v(this,Rf)||O(this,Rf,r),v(this,Rf).chainId!==r.chainId)throw new Error("chaid changed");if(v(this,sp))return;const i=await v(this,Ei).send("eth_getFilterChanges",[n]);await this._emitResults(v(this,Ei),i)}catch(n){console.log("@TODO",n)}v(this,Ei).once("block",v(this,If))},Vm=new WeakSet,H3=function(){const e=v(this,Yo);e&&(O(this,Yo,null),e.then(n=>{v(this,Ei).send("eth_uninstallFilter",[n])}))};var Mf;class yie extends $U{constructor(n,r){super(n);M(this,Mf,void 0);O(this,Mf,gie(r))}_recover(n){return new AO(n,v(this,Mf))}async _subscribe(n){return await n.send("eth_newFilter",[v(this,Mf)])}async _emitResults(n,r){for(const i of r)n.emit(v(this,Mf),n._wrapLog(i,n._network))}}Mf=new WeakMap;class mie extends $U{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,n){for(const r of n)e.emit("pending",r)}}const vie="bigint,boolean,function,number,string,symbol".split(/,/g);function cw(t){if(t==null||vie.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(cw);if(typeof t=="object")return Object.keys(t).reduce((e,n)=>(e[n]=t[n],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function bie(t){return new Promise(e=>{setTimeout(e,t)})}function Nh(t){return t&&t.toLowerCase()}function $_(t){return t&&typeof t.pollingInterval=="number"}const wie={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class lE extends LU{constructor(n,r){super(n);R(this,"address");r=rn(r),mt(this,{address:r})}connect(n){me(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(n){return await this.populateCall(n)}async sendUncheckedTransaction(n){const r=cw(n),i=[];if(r.from){const o=r.from;i.push((async()=>{const s=await fi(o,this.provider);J(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=s})())}else r.from=this.address;if(r.gasLimit==null&&i.push((async()=>{r.gasLimit=await this.provider.estimateGas({...r,from:this.address})})()),r.to!=null){const o=r.to;i.push((async()=>{r.to=await fi(o,this.provider)})())}i.length&&await Promise.all(i);const a=this.provider.getRpcTransaction(r);return this.provider.send("eth_sendTransaction",[a])}async sendTransaction(n){const r=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(n);return await new Promise((a,o)=>{const s=[1e3,100];let l=0;const c=async()=>{try{const u=await this.provider.getTransaction(i);if(u!=null){a(u.replaceableTransaction(r));return}}catch(u){if(Kr(u,"CANCELLED")||Kr(u,"BAD_DATA")||Kr(u,"NETWORK_ERROR")){u.info==null&&(u.info={}),u.info.sendTransactionHash=i,o(u);return}if(Kr(u,"INVALID_ARGUMENT")&&(l++,u.info==null&&(u.info={}),u.info.sendTransactionHash=i,l>10)){o(u);return}this.provider.emit("error",qn("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:u}))}this.provider._setTimeout(()=>{c()},s.pop()||4e3)};c()})}async signTransaction(n){const r=cw(n);if(r.from){const a=await fi(r.from,this.provider);J(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=a}else r.from=this.address;const i=this.provider.getRpcTransaction(r);return await this.provider.send("eth_signTransaction",[i])}async signMessage(n){const r=typeof n=="string"?dl(n):n;return await this.provider.send("personal_sign",[Ze(r),this.address.toLowerCase()])}async signTypedData(n,r,i){const a=cw(i),o=await x1.resolveNames(n,r,a,async s=>{const l=await fi(s);return J(l!=null,"TypedData does not support null address","value",s),l});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(x1.getPayload(o.domain,r,o.value))])}async unlock(n){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),n,null])}async _legacySignMessage(n){const r=typeof n=="string"?dl(n):n;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Ze(r)])}}var Bf,lp,tl,Xo,fo,ka,Si,Qm,G3;class xie extends DU{constructor(n,r){super(n,r);M(this,Qm);M(this,Bf,void 0);M(this,lp,void 0);M(this,tl,void 0);M(this,Xo,void 0);M(this,fo,void 0);M(this,ka,void 0);M(this,Si,void 0);O(this,lp,1),O(this,Bf,Object.assign({},wie,r||{})),O(this,tl,[]),O(this,Xo,null),O(this,ka,null),O(this,Si,null);{let a=null;const o=new Promise(s=>{a=s});O(this,fo,{promise:o,resolve:a})}const i=this._getOption("staticNetwork");typeof i=="boolean"?(J(!i||n!=="any","staticNetwork cannot be used on special network 'any'","options",r),i&&n!=null&&O(this,ka,ns.from(n))):i&&(J(n==null||i.matches(n),"staticNetwork MUST match network object","options",r),O(this,ka,i))}_getOption(n){return v(this,Bf)[n]}get _network(){return me(v(this,ka),"network is not available yet","NETWORK_ERROR"),v(this,ka)}async _perform(n){if(n.method==="call"||n.method==="estimateGas"){let i=n.transaction;if(i&&i.type!=null&&ot(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const a=await this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(n=Object.assign({},n,{transaction:Object.assign({},i,{type:void 0})}))}}const r=this.getRpcRequest(n);return r!=null?await this.send(r.method,r.args):super._perform(n)}async _detectNetwork(){const n=this._getOption("staticNetwork");if(n)if(n===!0){if(v(this,ka))return v(this,ka)}else return n;return v(this,Si)?await v(this,Si):this.ready?(O(this,Si,(async()=>{try{const r=ns.from(ot(await this.send("eth_chainId",[])));return O(this,Si,null),r}catch(r){throw O(this,Si,null),r}})()),await v(this,Si)):(O(this,Si,(async()=>{const r={id:vs(this,lp)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:r});let i;try{i=(await this._send(r))[0],O(this,Si,null)}catch(a){throw O(this,Si,null),this.emit("debug",{action:"receiveRpcError",error:a}),a}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return ns.from(ot(i.result));throw this.getRpcError(r,i)})()),await v(this,Si))}_start(){v(this,fo)==null||v(this,fo).resolve==null||(v(this,fo).resolve(),O(this,fo,null),(async()=>{for(;v(this,ka)==null&&!this.destroyed;)try{O(this,ka,await this._detectNetwork())}catch(n){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",qn("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:n}})),await bie(1e3)}ie(this,Qm,G3).call(this)})())}async _waitUntilReady(){if(v(this,fo)!=null)return await v(this,fo).promise}_getSubscriber(n){return n.type==="pending"?new mie(this):n.type==="event"?this._getOption("polling")?new AO(this,n.filter):new yie(this,n.filter):n.type==="orphan"&&n.filter.orphan==="drop-log"?new BU("orphan"):super._getSubscriber(n)}get ready(){return v(this,fo)==null}getRpcTransaction(n){const r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(n[i]==null)return;let a=i;i==="gasLimit"&&(a="gas"),r[a]=Uu(ot(n[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{n[i]!=null&&(r[i]=Ze(n[i]))}),n.accessList&&(r.accessList=wh(n.accessList)),r}getRpcRequest(n){switch(n.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[Nh(n.address),n.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[Nh(n.address),n.blockTag]};case"getCode":return{method:"eth_getCode",args:[Nh(n.address),n.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[Nh(n.address),"0x"+n.position.toString(16),n.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[n.signedTransaction]};case"getBlock":if("blockTag"in n)return{method:"eth_getBlockByNumber",args:[n.blockTag,!!n.includeTransactions]};if("blockHash"in n)return{method:"eth_getBlockByHash",args:[n.blockHash,!!n.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[n.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[n.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(n.transaction),n.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(n.transaction)]};case"getLogs":return n.filter&&n.filter.address!=null&&(Array.isArray(n.filter.address)?n.filter.address=n.filter.address.map(Nh):n.filter.address=Nh(n.filter.address)),{method:"eth_getLogs",args:[n.filter]}}return null}getRpcError(n,r){const{method:i}=n,{error:a}=r;if(i==="eth_estimateGas"&&a.message){const l=a.message;if(!l.match(/revert/i)&&l.match(/insufficient funds/i))return qn("insufficient funds","INSUFFICIENT_FUNDS",{transaction:n.params[0],info:{payload:n,error:a}})}if(i==="eth_call"||i==="eth_estimateGas"){const l=V3(a),c=E1.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",n.params[0],l?l.data:null);return c.info={error:a,payload:n},c}const o=JSON.stringify(Eie(a));if(typeof a.message=="string"&&a.message.match(/user denied|ethers-user-denied/i))return qn("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:n,error:a}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const l=n.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return qn("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:l,info:{error:a}});if(o.match(/nonce/i)&&o.match(/too low/i))return qn("nonce has already been used","NONCE_EXPIRED",{transaction:l,info:{error:a}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return qn("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:l,info:{error:a}});if(o.match(/only replay-protected/i))return qn("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:l,info:{error:a}}})}let s=!!o.match(/the method .* does not exist/i);return s||a&&a.details&&a.details.startsWith("Unauthorized method:")&&(s=!0),s?qn("unsupported operation","UNSUPPORTED_OPERATION",{operation:n.method,info:{error:a,payload:n}}):qn("could not coalesce error","UNKNOWN_ERROR",{error:a,payload:n})}send(n,r){if(this.destroyed)return Promise.reject(qn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n}));const i=vs(this,lp)._++,a=new Promise((o,s)=>{v(this,tl).push({resolve:o,reject:s,payload:{method:n,params:r,id:i,jsonrpc:"2.0"}})});return ie(this,Qm,G3).call(this),a}async getSigner(n){n==null&&(n=0);const r=this.send("eth_accounts",[]);if(typeof n=="number"){const a=await r;if(n>=a.length)throw new Error("no such account");return new lE(this,a[n])}const{accounts:i}=await ni({network:this.getNetwork(),accounts:r});n=rn(n);for(const a of i)if(rn(a)===n)return new lE(this,n);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(r=>new lE(this,r))}destroy(){v(this,Xo)&&(clearTimeout(v(this,Xo)),O(this,Xo,null));for(const{payload:n,reject:r}of v(this,tl))r(qn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n.method}));O(this,tl,[]),super.destroy()}}Bf=new WeakMap,lp=new WeakMap,tl=new WeakMap,Xo=new WeakMap,fo=new WeakMap,ka=new WeakMap,Si=new WeakMap,Qm=new WeakSet,G3=function(){if(v(this,Xo))return;const n=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");O(this,Xo,setTimeout(()=>{O(this,Xo,null);const r=v(this,tl);for(O(this,tl,[]);r.length;){const i=[r.shift()];for(;r.length&&i.length!==v(this,Bf).batchMaxCount;)if(i.push(r.shift()),JSON.stringify(i.map(o=>o.payload)).length>v(this,Bf).batchMaxSize){r.unshift(i.pop());break}(async()=>{const a=i.length===1?i[0].payload:i.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:a});try{const o=await this._send(a);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:s,reject:l,payload:c}of i){if(this.destroyed){l(qn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:c.method}));continue}const u=o.filter(f=>f.id===c.id)[0];if(u==null){const f=qn("missing response for request","BAD_DATA",{value:o,info:{payload:c}});this.emit("error",f),l(f);continue}if("error"in u){l(this.getRpcError(c,u));continue}s(u.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:s}of i)s(o)}})()}},n))};var Ic;class UU extends xie{constructor(n,r){super(n,r);M(this,Ic,void 0);O(this,Ic,4e3)}_getSubscriber(n){const r=super._getSubscriber(n);return $_(r)&&(r.pollingInterval=v(this,Ic)),r}get pollingInterval(){return v(this,Ic)}set pollingInterval(n){if(!Number.isInteger(n)||n<0)throw new Error("invalid interval");O(this,Ic,n),this._forEachSubscriber(r=>{$_(r)&&(r.pollingInterval=v(this,Ic))})}}Ic=new WeakMap;var cp;class Aie extends UU{constructor(n,r,i){n==null&&(n="http://localhost:8545");super(r,i);M(this,cp,void 0);typeof n=="string"?O(this,cp,new Sl(n)):O(this,cp,n.clone())}_getConnection(){return v(this,cp).clone()}async send(n,r){return await this._start(),await super.send(n,r)}async _send(n){const r=this._getConnection();r.body=JSON.stringify(n),r.setHeader("content-type","application/json");const i=await r.send();i.assertOk();let a=i.bodyJson;return Array.isArray(a)||(a=[a]),a}}cp=new WeakMap;function V3(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&In(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const n=V3(t[e]);if(n)return n}return null}if(typeof t=="string")try{return V3(JSON.parse(t))}catch{}return null}function Q3(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const n in t)Q3(t[n],e);if(typeof t=="string")try{return Q3(JSON.parse(t),e)}catch{}}}function Eie(t){const e=[];return Q3(t,e),e}var up;class Sie extends UU{constructor(n,r){super(r,{batchMaxCount:1});M(this,up,void 0);O(this,up,async(i,a)=>{const o={method:i,params:a};this.emit("debug",{action:"sendEip1193Request",payload:o});try{const s=await n.request(o);return this.emit("debug",{action:"receiveEip1193Result",result:s}),s}catch(s){const l=new Error(s.message);throw l.code=s.code,l.data=s.data,l.payload=o,this.emit("debug",{action:"receiveEip1193Error",error:l}),l}})}async send(n,r){return await this._start(),await super.send(n,r)}async _send(n){J(!Array.isArray(n),"EIP-1193 does not support batch request","payload",n);try{const r=await v(this,up).call(this,n.method,n.params||[]);return[{id:n.id,result:r}]}catch(r){return[{id:n.id,error:{code:r.code,data:r.data,message:r.message}}]}}getRpcError(n,r){switch(r=JSON.parse(JSON.stringify(r)),r.error.code||-1){case 4001:r.error.message=`ethers-user-denied: ${r.error.message}`;break;case 4200:r.error.message=`ethers-unsupported: ${r.error.message}`;break}return super.getRpcError(n,r)}async hasSigner(n){n==null&&(n=0);const r=await this.send("eth_accounts",[]);return typeof n=="number"?r.length>n:(n=n.toLowerCase(),r.filter(i=>i.toLowerCase()===n).length!==0)}async getSigner(n){if(n==null&&(n=0),!await this.hasSigner(n))try{await v(this,up).call(this,"eth_requestAccounts",[])}catch(r){const i=r.payload;throw this.getRpcError(i,{id:i.id,error:r})}return await super.getSigner(n)}}up=new WeakMap;var FU={exports:{}};(function(t){/** + * @license (c) Franz X Antesberger 2013 + */(function(e){var n=4294967296;e.fromBytesBigEndian=function(r,i,a,o){return(r<<24|i<<16|a<<8|o)>>>0},e.getByteBigEndian=function(r,i){return r>>>8*(3-i)&255},e.getBytesBigEndian=function(r){return[e.getByteBigEndian(r,0),e.getByteBigEndian(r,1),e.getByteBigEndian(r,2),e.getByteBigEndian(r,3)]},e.toHex=function(r,i){i=i||8;var a=r.toString(16);return a.length>>0},e.highPart=function(r){return e.toUint32(r/n)},e.or=function(r,i){for(var a=r,o=1;o>>0},e.and=function(r,i){for(var a=r,o=1;o>>0},e.xor=function(r,i){for(var a=r,o=1;o>>0},e.not=function(r){return~r>>>0},e.shiftLeft=function(r,i){return r<>>0},e.shiftRight=function(r,i){return r>>>i},e.rotateLeft=function(r,i){return(r<>>0|r>>>32-i)>>>0},e.rotateRight=function(r,i){return(r>>>i|r<<32-i>>>0)>>>0},e.choose=function(r,i,a){return(r&(i^a)^a)>>>0},e.majority=function(r,i,a){return(r&(i|a)|i&a)>>>0},e.addMod32=function(r){for(var i=r,a=1;a>>0},e.log2=function(r){return Math.floor(Math.log(r)/Math.LN2)},e.mult=function(r,i,a){var o=((r&4294901760)>>>0)*i,s=(r&65535)*i,l=e.toUint32(o)+e.toUint32(s)>=n?1:0;a[0]=e.highPart(o)+e.highPart(s)+l>>>0,a[1]=(o>>>0)+(s>>>0)}})(t.exports={})})(FU);var EO=FU.exports,D=EO;const Pie=[1,2,4,8,16,32,64,128,27,54],kp=D.fromBytesBigEndian(85,85,85,85),_p=D.fromBytesBigEndian(170,170,170,170),ib=D.fromBytesBigEndian(51,51,51,51),ab=D.fromBytesBigEndian(204,204,204,204),U_=D.fromBytesBigEndian(15,15,15,15),F_=D.fromBytesBigEndian(240,240,240,240),Oie=D.fromBytesBigEndian(0,0,0,255),Tie=D.fromBytesBigEndian(0,0,252,0),Cie=D.fromBytesBigEndian(0,0,3,0),kie=D.fromBytesBigEndian(0,240,0,0),_ie=D.fromBytesBigEndian(0,15,0,0),Nie=D.fromBytesBigEndian(192,0,0,0),Iie=D.fromBytesBigEndian(63,0,0,0);function K3(){return new Uint32Array(8)}function uw(t,e){t[0]=D.xor(t[0],e[0]),t[1]=D.xor(t[1],e[1]),t[2]=D.xor(t[2],e[2]),t[3]=D.xor(t[3],e[3]),t[4]=D.xor(t[4],e[4]),t[5]=D.xor(t[5],e[5]),t[6]=D.xor(t[6],e[6]),t[7]=D.xor(t[7],e[7])}function fx(t){const e=t[7],n=t[6],r=t[5],i=t[4],a=t[3],o=t[2],s=t[1],l=t[0],c=D.xor(i,o),u=D.xor(e,s),f=D.xor(e,i),h=D.xor(e,o),d=D.xor(n,r),g=D.xor(d,l),p=D.xor(g,i),y=D.xor(u,c),m=D.xor(g,e),b=D.xor(g,s),x=D.xor(b,h),A=D.xor(a,y),S=D.xor(A,o),E=D.xor(A,n),T=D.xor(S,l),C=D.xor(S,d),N=D.xor(E,f),B=D.xor(l,N),L=D.xor(C,N),U=D.xor(C,h),j=D.xor(d,N),X=D.xor(u,j),G=D.xor(e,j),H=D.and(y,S),re=D.and(x,T),V=D.xor(re,H),ee=D.and(p,l),pe=D.xor(ee,H),Ae=D.and(u,j),we=D.and(b,g),Ye=D.xor(we,Ae),nt=D.and(m,B),De=D.xor(nt,Ae),st=D.and(f,N),Tt=D.and(c,L),ln=D.xor(Tt,st),Ee=D.and(h,C),ne=D.xor(Ee,st),le=D.xor(V,ln),te=D.xor(pe,ne),Ce=D.xor(Ye,ln),Se=D.xor(De,ne),ze=D.xor(le,E),$e=D.xor(te,U),rt=D.xor(Ce,X),dt=D.xor(Se,G),wt=D.xor(ze,$e),yt=D.and(ze,rt),Pe=D.xor(dt,yt),nn=D.and(wt,Pe),cn=D.xor(nn,$e),Gn=D.xor(rt,dt),Wa=D.xor($e,yt),ms=D.and(Wa,Gn),Yr=D.xor(ms,dt),du=D.xor(rt,Yr),ji=D.xor(Pe,Yr),pu=D.and(dt,ji),Ja=D.xor(pu,du),Ul=D.xor(Pe,pu),Fl=D.and(cn,Ul),zi=D.xor(wt,Fl),Xr=D.xor(zi,Ja),pa=D.xor(cn,Yr),Ya=D.xor(cn,zi),Io=D.xor(Yr,Ja),Xa=D.xor(pa,Xr),gu=D.and(Io,S),yu=D.and(Ja,T),Sh=D.and(Yr,l),Q=D.and(Ya,j),q=D.and(zi,g),se=D.and(cn,B),Oe=D.and(pa,N),Ge=D.and(Xa,L),xt=D.and(Xr,C),pt=D.and(Io,y),lt=D.and(Ja,x),Ue=D.and(Yr,p),Ct=D.and(Ya,u),P=D.and(zi,b),k=D.and(cn,m),_=D.and(pa,f),w=D.and(Xa,c),I=D.and(Xr,h),z=D.xor(_,w),W=D.xor(lt,Ue),ce=D.xor(se,P),ve=D.xor(pt,lt),Le=D.xor(Sh,Ct),Te=D.xor(Sh,se),Rt=D.xor(Ge,xt),Re=D.xor(gu,Q),ft=D.xor(Oe,Ge),at=D.xor(w,I),vt=D.xor(Ct,ce),ke=D.xor(Le,Re),_e=D.xor(q,z),Xe=D.xor(Q,ft),ht=D.xor(z,ke),Fe=D.xor(k,ke),tt=D.xor(Rt,_e),Be=D.xor(ve,_e),He=D.xor(q,Xe),Je=D.xor(Fe,tt),Me=D.xor(yu,Be),ae=D.xor(Xe,Be),oe=D.xor(vt,D.not(tt)),ge=D.xor(ce,D.not(ht)),ue=D.xor(He,Je),fe=D.xor(Re,Me),be=D.xor(Te,Me),ct=D.xor(W,Je),At=D.xor(He,D.not(fe)),St=D.xor(at,D.not(ue));t[7]=ae,t[6]=At,t[5]=St,t[4]=fe,t[3]=be,t[2]=ct,t[1]=oe,t[0]=ge}function W3(t){for(let e=0;e<8;e++){const n=t[e];t[e]=D.or(D.and(n,Oie),D.shiftRight(D.and(n,Tie),2),D.shiftLeft(D.and(n,Cie),6),D.shiftRight(D.and(n,kie),4),D.shiftLeft(D.and(n,_ie),4),D.shiftRight(D.and(n,Nie),6),D.shiftLeft(D.and(n,Iie),2))}}function jU(t){const e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=D.or(D.shiftRight(e,8),D.shiftLeft(e,24)),u=D.or(D.shiftRight(n,8),D.shiftLeft(n,24)),f=D.or(D.shiftRight(r,8),D.shiftLeft(r,24)),h=D.or(D.shiftRight(i,8),D.shiftLeft(i,24)),d=D.or(D.shiftRight(a,8),D.shiftLeft(a,24)),g=D.or(D.shiftRight(o,8),D.shiftLeft(o,24)),p=D.or(D.shiftRight(s,8),D.shiftLeft(s,24)),y=D.or(D.shiftRight(l,8),D.shiftLeft(l,24));t[0]=D.xor(l,y,c,D.rotateRight(D.xor(e,c),16)),t[1]=D.xor(e,c,l,y,u,D.rotateRight(D.xor(n,u),16)),t[2]=D.xor(n,u,f,D.rotateRight(D.xor(r,f),16)),t[3]=D.xor(r,f,l,y,h,D.rotateRight(D.xor(i,h),16)),t[4]=D.xor(i,h,l,y,d,D.rotateRight(D.xor(a,d),16)),t[5]=D.xor(a,d,g,D.rotateRight(D.xor(o,g),16)),t[6]=D.xor(o,g,p,D.rotateRight(D.xor(s,p),16)),t[7]=D.xor(s,p,y,D.rotateRight(D.xor(l,y),16))}function zU(t,e){const n=new DataView(e.buffer);t[0]=n.getUint32(0+e.byteOffset,!0),t[2]=n.getUint32(4+e.byteOffset,!0),t[4]=n.getUint32(8+e.byteOffset,!0),t[6]=n.getUint32(12+e.byteOffset,!0),t[1]=0,t[3]=0,t[5]=0,t[7]=0,Ol(t)}function HU(t,e,n){const r=new DataView(e.buffer),i=new DataView(n.buffer);t[0]=r.getUint32(0+e.byteOffset,!0),t[2]=r.getUint32(4+e.byteOffset,!0),t[4]=r.getUint32(8+e.byteOffset,!0),t[6]=r.getUint32(12+e.byteOffset,!0),t[1]=i.getUint32(0+n.byteOffset,!0),t[3]=i.getUint32(4+n.byteOffset,!0),t[5]=i.getUint32(8+n.byteOffset,!0),t[7]=i.getUint32(12+n.byteOffset,!0),Ol(t)}function GU(t,e){Ol(e);const n=new DataView(t.buffer);n.setUint32(0+t.byteOffset,e[0],!0),n.setUint32(4+t.byteOffset,e[2],!0),n.setUint32(8+t.byteOffset,e[4],!0),n.setUint32(12+t.byteOffset,e[6],!0)}function VU(t,e,n){Ol(n);const r=new DataView(t.buffer),i=new DataView(e.buffer);r.setUint32(0+t.byteOffset,n[0],!0),r.setUint32(4+t.byteOffset,n[2],!0),r.setUint32(8+t.byteOffset,n[4],!0),r.setUint32(12+t.byteOffset,n[6],!0),i.setUint32(0+e.byteOffset,n[1],!0),i.setUint32(4+e.byteOffset,n[3],!0),i.setUint32(8+e.byteOffset,n[5],!0),i.setUint32(12+e.byteOffset,n[7],!0)}function Ol(t){for(let e=0;e<8;e+=2){const n=t[e],r=t[e+1];t[e]=D.or(D.and(n,kp),D.shiftLeft(D.and(r,kp),1)),t[e+1]=D.or(D.shiftRight(D.and(n,_p),1),D.and(r,_p))}for(let e=0;e<8;e+=4){const n=t[e],r=t[e+1],i=t[e+2],a=t[e+3];t[e]=D.or(D.and(n,ib),D.shiftLeft(D.and(i,ib),2)),t[e+2]=D.or(D.shiftRight(D.and(n,ab),2),D.and(i,ab)),t[e+1]=D.or(D.and(r,ib),D.shiftLeft(D.and(a,ib),2)),t[e+3]=D.or(D.shiftRight(D.and(r,ab),2),D.and(a,ab))}for(let e=0;e<4;e++){const n=t[e],r=t[e+4];t[e]=D.or(D.and(n,U_),D.shiftLeft(D.and(r,U_),4)),t[e+4]=D.or(D.shiftRight(D.and(n,F_),4),D.and(r,F_))}}function Rie(t,e){const n=new DataView(e.buffer);for(let r=0;r<4;r++){const i=n.getUint32(r*4+e.byteOffset,!0);t[r*2]=i,t[r*2+1]=i}Ol(t);for(let r=0,i=0;r<4;r=r+1,i=i+2){let a=D.or(D.and(t[i+0],kp),D.and(t[i+1],_p)),o=a;a=D.and(a,kp),t[i]=D.or(a,D.shiftLeft(a,1)),o=D.and(o,_p),t[i+1]=D.or(o,D.shiftRight(o,1))}}function QU(t,e,n){const r=(e+1)*4;for(let i=0,a=0;i6&&u==4&&(a=j_(a)),a=D.xor(a,i[(c-o)*2]),i[c*2]=a,i[c*2+1]=a,u++,u==o&&(u=0,f++);for(let c=0;c>7,i=n>>5&1;t[e]=n<<1|r^i}}function jie(t){for(let e=0;e>6&1;t[e]=n>>1|(r^i)<<7}}function H_(t,e){t[0]^=1,t[1]^=2,t[2]^=4,t[3]^=8,t[4]^=ub[e],t[5]^=ub[e],t[6]^=ub[e],t[7]^=ub[e]}function zie(t,e){let n=t.subarray(16,32),r=t.subarray(0,16);Li(e[0],n,r,Np),H_(e[0],0);for(let i=1;i<=Dc;i++)Fie(n),Y3(n),jie(r),Y3(r),Li(e[i],n,r,Np),H_(e[i],i)}function hy(t,e,n){let r=new Uint8Array(n);Li(t[0],e[0],r,Np);for(let i=1;i<=Dc;i++)Y3(r),Li(t[i],e[i],r,Np)}function Yl(){let t=[];for(let e=0;e<=Dc;e++)t.push(new Uint8Array(16));return t}class Hie{static bcEncrypt(e,n,r,i){let a=Yl();hy(a,n,r);let o=Et.newQ(),s=Et.newQ();Et.load4xU32(o,i),Et.load4xU32(s,a[0]),Et.addRoundKey(o,s);for(let l=1;l<=Dc;l++)Et.subBytes(o),Et.shiftRows(o),Et.mixColumns(o),Et.load4xU32(s,a[l]),Et.addRoundKey(o,s);Et.store4xU32(e,o)}static bcKeystreamx2(e,n,r,i){let a=[Yl(),Yl()];for(let l=0;l<2;l++)hy(a[l],n,r[l]);let o=Et.newQ(),s=Et.newQ();Et.rkeyOrtho(o,i),Et.load8xU32(s,a[0][0],a[1][0]),Et.addRoundKey(o,s);for(let l=1;l<=Dc;l++)Et.subBytes(o),Et.shiftRows(o),Et.mixColumns(o),Et.load8xU32(s,a[0][l],a[1][l]),Et.addRoundKey(o,s);Et.store8xU32(e.subarray(0,16),e.subarray(16,32),o)}static bcTagx1(e,n,r,i){let a=Yl();hy(a,n,r);let o=Et.newQ(),s=Et.newQ();Et.load4xU32(o,i),Et.load4xU32(s,a[0]),Et.addRoundKey(o,s);for(let d=1;d<=Dc;d++)Et.subBytes(o),Et.shiftRows(o),Et.mixColumns(o),Et.load4xU32(s,a[d]),Et.addRoundKey(o,s);const l=new DataView(e.buffer);let c=l.getUint32(0,!0),u=l.getUint32(4,!0),f=l.getUint32(8,!0),h=l.getUint32(12,!0);Et.ortho(o),c=Ia.xor(c,o[0]),u=Ia.xor(u,o[2]),f=Ia.xor(f,o[4]),h=Ia.xor(h,o[6]),l.setUint32(0,c,!0),l.setUint32(4,u,!0),l.setUint32(8,f,!0),l.setUint32(12,h,!0)}static bcTagx2(e,n,r,i){let a=[Yl(),Yl()];for(let d=0;d<2;d++)hy(a[d],n,r[d]);let o=Et.newQ(),s=Et.newQ();Et.load8xU32(o,i.subarray(0,16),i.subarray(16,32)),Et.load8xU32(s,a[0][0],a[1][0]),Et.addRoundKey(o,s);for(let d=1;d<=Dc;d++)Et.subBytes(o),Et.shiftRows(o),Et.mixColumns(o),Et.load8xU32(s,a[0][d],a[1][d]),Et.addRoundKey(o,s);const l=new DataView(e.buffer);let c=l.getUint32(0,!0),u=l.getUint32(4,!0),f=l.getUint32(8,!0),h=l.getUint32(12,!0);Et.ortho(o),c=Ia.xor(c,o[0],o[1]),u=Ia.xor(u,o[2],o[3]),f=Ia.xor(f,o[4],o[5]),h=Ia.xor(h,o[6],o[7]),l.setUint32(0,c,!0),l.setUint32(4,u,!0),l.setUint32(8,f,!0),l.setUint32(12,h,!0)}}class Gie{static bcEncrypt(e,n,r,i){let a=Yl();hy(a,n,r);const o=new DataView(i.buffer);let s=o.getUint32(0+i.byteOffset,!1),l=o.getUint32(4+i.byteOffset,!1),c=o.getUint32(8+i.byteOffset,!1),u=o.getUint32(12+i.byteOffset,!1);const f=new DataView(a[0].buffer);s=Ia.xor(s,f.getUint32(0+a[0].byteOffset,!1)),l=Ia.xor(l,f.getUint32(4+a[0].byteOffset,!1)),c=Ia.xor(c,f.getUint32(8+a[0].byteOffset,!1)),u=Ia.xor(u,f.getUint32(12+a[0].byteOffset,!1));for(let d=1;d<=Dc;d++)[s,l,c,u]=$ie.aesencVartime(s,l,c,u,a[d]);const h=new DataView(e.buffer);h.setUint32(0+e.byteOffset,s,!1),h.setUint32(4+e.byteOffset,l,!1),h.setUint32(8+e.byteOffset,c,!1),h.setUint32(12+e.byteOffset,u,!1)}static bcKeystreamx2(e,n,r,i){this.bcEncrypt(e.subarray(0,16),n,r[0],i),this.bcEncrypt(e.subarray(16,32),n,r[1],i)}static bcTagx1(e,n,r,i){let a=new Uint8Array(Ne);this.bcEncrypt(a,n,r,i),Li(e,e,a,Ne)}static bcTagx2(e,n,r,i){let a=new Uint8Array(2*Ne);this.bcEncrypt(a.subarray(0,16),n,r[0],i.subarray(0,16)),this.bcEncrypt(a.subarray(16,32),n,r[1],i.subarray(16,32)),Li(e,e,a.subarray(0,16),Ne),Li(e,e,a.subarray(16,32),Ne)}}function zr(t,e,n){t.set(new Uint8Array(12)),new DataView(t.buffer).setUint32(12+t.byteOffset,n,!1),t[0]=e<=2*Ne;s+=2)zr(o[0],Rd,s),zr(o[1],Rd,s+1),t.bcTagx2(u,e,o,i.subarray(s*Ne,(s+2)*Ne)),c-=2*Ne;for(;c>=Ne;s++)zr(o[0],Rd,s),t.bcTagx1(u,e,o[0],i.subarray(s*Ne,(s+1)*Ne)),c-=Ne;if(c>0){zr(o[0],JU,s);let g=new Uint8Array(Ne);g.set(i.subarray(i.length-c)),g[c]=128,t.bcTagx1(u,e,o[0],g)}let f=a.length;for(l=0;f>=2*Ne;l+=2)zr(o[0],Md,l),zr(o[1],Md,l+1),t.bcTagx2(u,e,o,a.subarray(l*Ne,(l+2)*Ne)),f-=2*Ne;for(;f>=Ne;l++)zr(o[0],Md,l),t.bcTagx1(u,e,o[0],a.subarray(l*Ne,(l+1)*Ne)),f-=Ne;if(f>0){zr(o[0],YU,l);let g=new Uint8Array(Ne);g.set(a.subarray(a.length-f)),g[f]=128,t.bcTagx1(u,e,o[0],g)}let h=new Uint8Array(Ne);h.set(n,1),h[0]=XU<=2*Ne;l+=2)Lc(o[0],u,l),Lc(o[1],u,l+1),t.bcKeystreamx2(d,e,o,h),Li(r.subarray(l*Ne,(l+2)*Ne),a.subarray(l*Ne,(l+2)*Ne),d,2*Ne),f-=2*Ne;for(;f>=Ne;l++)Lc(o[0],u,l),t.bcEncrypt(d,e,o[0],h),Li(r.subarray(l*Ne,(l+1)*Ne),a.subarray(l*Ne,(l+1)*Ne),d,Ne),f-=Ne;f>0&&(Lc(o[0],u,l),t.bcEncrypt(d,e,o[0],h),Li(r.subarray(l*Ne,a.length),a.subarray(l*Ne),d,f)),r.set(u,a.length)}function Qie(t,e,n,r,i,a){let o=a.length-zf;const s=a.subarray(0,o),l=a.subarray(o);let c=0,u=X3(),f=new Uint8Array(Ne);f.set(n,1);let h=new Uint8Array(2*Ne);for(c=0;o>=2*Ne;c+=2)Lc(u[0],l,c),Lc(u[1],l,c+1),t.bcKeystreamx2(h,e,u,f),Li(r.subarray(c*Ne,(c+2)*Ne),s.subarray(c*Ne,(c+2)*Ne),h,2*Ne),o-=2*Ne;for(;o>=Ne;c++)Lc(u[0],l,c),t.bcEncrypt(h,e,u[0],f),Li(r.subarray(c*Ne,(c+1)*Ne),s.subarray(c*Ne,(c+1)*Ne),h,Ne),o-=Ne;o>0&&(Lc(u[0],l,c),t.bcEncrypt(h,e,u[0],f),Li(r.subarray(c*Ne),s.subarray(c*Ne),h,o));let d=0,g=i.length,p=X3(),y=new Uint8Array(zf);for(d=0;g>=2*Ne;d+=2)zr(p[0],Rd,d),zr(p[1],Rd,d+1),t.bcTagx2(y,e,p,i.subarray(d*Ne,(d+2)*Ne)),g-=2*Ne;for(;g>=Ne;d++)zr(p[0],Rd,d),t.bcTagx1(y,e,p[0],i.subarray(d*Ne,(d+1)*Ne)),g-=Ne;if(g>0){zr(p[0],JU,d);let x=new Uint8Array(Ne);x.set(i.subarray(i.length-g)),x[g]=128,t.bcTagx1(y,e,p[0],x)}let m=r.length;for(c=0;m>=2*Ne;c+=2)zr(p[0],Md,c),zr(p[1],Md,c+1),t.bcTagx2(y,e,p,r.subarray(c*Ne,(c+2)*Ne)),m-=2*Ne;for(;m>=Ne;c++)zr(p[0],Md,c),t.bcTagx1(y,e,p[0],r.subarray(c*Ne,(c+1)*Ne)),m-=Ne;if(m>0){zr(p[0],YU,c);let x=new Uint8Array(Ne);x.set(r.subarray(r.length-m)),x[m]=128,t.bcTagx1(y,e,p[0],x)}if(f[0]=XU<>24&255,P[k+1]=_>>16&255,P[k+2]=_>>8&255,P[k+3]=_&255,P[k+4]=w>>24&255,P[k+5]=w>>16&255,P[k+6]=w>>8&255,P[k+7]=w&255}function p(P,k,_,w,I){var z,W=0;for(z=0;z>>8)-1}function y(P,k,_,w){return p(P,k,_,w,16)}function m(P,k,_,w){return p(P,k,_,w,32)}function b(P,k,_,w){for(var I=w[0]&255|(w[1]&255)<<8|(w[2]&255)<<16|(w[3]&255)<<24,z=_[0]&255|(_[1]&255)<<8|(_[2]&255)<<16|(_[3]&255)<<24,W=_[4]&255|(_[5]&255)<<8|(_[6]&255)<<16|(_[7]&255)<<24,ce=_[8]&255|(_[9]&255)<<8|(_[10]&255)<<16|(_[11]&255)<<24,ve=_[12]&255|(_[13]&255)<<8|(_[14]&255)<<16|(_[15]&255)<<24,Le=w[4]&255|(w[5]&255)<<8|(w[6]&255)<<16|(w[7]&255)<<24,Te=k[0]&255|(k[1]&255)<<8|(k[2]&255)<<16|(k[3]&255)<<24,Rt=k[4]&255|(k[5]&255)<<8|(k[6]&255)<<16|(k[7]&255)<<24,Re=k[8]&255|(k[9]&255)<<8|(k[10]&255)<<16|(k[11]&255)<<24,ft=k[12]&255|(k[13]&255)<<8|(k[14]&255)<<16|(k[15]&255)<<24,at=w[8]&255|(w[9]&255)<<8|(w[10]&255)<<16|(w[11]&255)<<24,vt=_[16]&255|(_[17]&255)<<8|(_[18]&255)<<16|(_[19]&255)<<24,ke=_[20]&255|(_[21]&255)<<8|(_[22]&255)<<16|(_[23]&255)<<24,_e=_[24]&255|(_[25]&255)<<8|(_[26]&255)<<16|(_[27]&255)<<24,Xe=_[28]&255|(_[29]&255)<<8|(_[30]&255)<<16|(_[31]&255)<<24,ht=w[12]&255|(w[13]&255)<<8|(w[14]&255)<<16|(w[15]&255)<<24,Fe=I,tt=z,Be=W,He=ce,Je=ve,Me=Le,ae=Te,oe=Rt,ge=Re,ue=ft,fe=at,be=vt,ct=ke,At=_e,St=Xe,Ot=ht,$,Mt=0;Mt<20;Mt+=2)$=Fe+ct|0,Je^=$<<7|$>>>25,$=Je+Fe|0,ge^=$<<9|$>>>23,$=ge+Je|0,ct^=$<<13|$>>>19,$=ct+ge|0,Fe^=$<<18|$>>>14,$=Me+tt|0,ue^=$<<7|$>>>25,$=ue+Me|0,At^=$<<9|$>>>23,$=At+ue|0,tt^=$<<13|$>>>19,$=tt+At|0,Me^=$<<18|$>>>14,$=fe+ae|0,St^=$<<7|$>>>25,$=St+fe|0,Be^=$<<9|$>>>23,$=Be+St|0,ae^=$<<13|$>>>19,$=ae+Be|0,fe^=$<<18|$>>>14,$=Ot+be|0,He^=$<<7|$>>>25,$=He+Ot|0,oe^=$<<9|$>>>23,$=oe+He|0,be^=$<<13|$>>>19,$=be+oe|0,Ot^=$<<18|$>>>14,$=Fe+He|0,tt^=$<<7|$>>>25,$=tt+Fe|0,Be^=$<<9|$>>>23,$=Be+tt|0,He^=$<<13|$>>>19,$=He+Be|0,Fe^=$<<18|$>>>14,$=Me+Je|0,ae^=$<<7|$>>>25,$=ae+Me|0,oe^=$<<9|$>>>23,$=oe+ae|0,Je^=$<<13|$>>>19,$=Je+oe|0,Me^=$<<18|$>>>14,$=fe+ue|0,be^=$<<7|$>>>25,$=be+fe|0,ge^=$<<9|$>>>23,$=ge+be|0,ue^=$<<13|$>>>19,$=ue+ge|0,fe^=$<<18|$>>>14,$=Ot+St|0,ct^=$<<7|$>>>25,$=ct+Ot|0,At^=$<<9|$>>>23,$=At+ct|0,St^=$<<13|$>>>19,$=St+At|0,Ot^=$<<18|$>>>14;Fe=Fe+I|0,tt=tt+z|0,Be=Be+W|0,He=He+ce|0,Je=Je+ve|0,Me=Me+Le|0,ae=ae+Te|0,oe=oe+Rt|0,ge=ge+Re|0,ue=ue+ft|0,fe=fe+at|0,be=be+vt|0,ct=ct+ke|0,At=At+_e|0,St=St+Xe|0,Ot=Ot+ht|0,P[0]=Fe>>>0&255,P[1]=Fe>>>8&255,P[2]=Fe>>>16&255,P[3]=Fe>>>24&255,P[4]=tt>>>0&255,P[5]=tt>>>8&255,P[6]=tt>>>16&255,P[7]=tt>>>24&255,P[8]=Be>>>0&255,P[9]=Be>>>8&255,P[10]=Be>>>16&255,P[11]=Be>>>24&255,P[12]=He>>>0&255,P[13]=He>>>8&255,P[14]=He>>>16&255,P[15]=He>>>24&255,P[16]=Je>>>0&255,P[17]=Je>>>8&255,P[18]=Je>>>16&255,P[19]=Je>>>24&255,P[20]=Me>>>0&255,P[21]=Me>>>8&255,P[22]=Me>>>16&255,P[23]=Me>>>24&255,P[24]=ae>>>0&255,P[25]=ae>>>8&255,P[26]=ae>>>16&255,P[27]=ae>>>24&255,P[28]=oe>>>0&255,P[29]=oe>>>8&255,P[30]=oe>>>16&255,P[31]=oe>>>24&255,P[32]=ge>>>0&255,P[33]=ge>>>8&255,P[34]=ge>>>16&255,P[35]=ge>>>24&255,P[36]=ue>>>0&255,P[37]=ue>>>8&255,P[38]=ue>>>16&255,P[39]=ue>>>24&255,P[40]=fe>>>0&255,P[41]=fe>>>8&255,P[42]=fe>>>16&255,P[43]=fe>>>24&255,P[44]=be>>>0&255,P[45]=be>>>8&255,P[46]=be>>>16&255,P[47]=be>>>24&255,P[48]=ct>>>0&255,P[49]=ct>>>8&255,P[50]=ct>>>16&255,P[51]=ct>>>24&255,P[52]=At>>>0&255,P[53]=At>>>8&255,P[54]=At>>>16&255,P[55]=At>>>24&255,P[56]=St>>>0&255,P[57]=St>>>8&255,P[58]=St>>>16&255,P[59]=St>>>24&255,P[60]=Ot>>>0&255,P[61]=Ot>>>8&255,P[62]=Ot>>>16&255,P[63]=Ot>>>24&255}function x(P,k,_,w){for(var I=w[0]&255|(w[1]&255)<<8|(w[2]&255)<<16|(w[3]&255)<<24,z=_[0]&255|(_[1]&255)<<8|(_[2]&255)<<16|(_[3]&255)<<24,W=_[4]&255|(_[5]&255)<<8|(_[6]&255)<<16|(_[7]&255)<<24,ce=_[8]&255|(_[9]&255)<<8|(_[10]&255)<<16|(_[11]&255)<<24,ve=_[12]&255|(_[13]&255)<<8|(_[14]&255)<<16|(_[15]&255)<<24,Le=w[4]&255|(w[5]&255)<<8|(w[6]&255)<<16|(w[7]&255)<<24,Te=k[0]&255|(k[1]&255)<<8|(k[2]&255)<<16|(k[3]&255)<<24,Rt=k[4]&255|(k[5]&255)<<8|(k[6]&255)<<16|(k[7]&255)<<24,Re=k[8]&255|(k[9]&255)<<8|(k[10]&255)<<16|(k[11]&255)<<24,ft=k[12]&255|(k[13]&255)<<8|(k[14]&255)<<16|(k[15]&255)<<24,at=w[8]&255|(w[9]&255)<<8|(w[10]&255)<<16|(w[11]&255)<<24,vt=_[16]&255|(_[17]&255)<<8|(_[18]&255)<<16|(_[19]&255)<<24,ke=_[20]&255|(_[21]&255)<<8|(_[22]&255)<<16|(_[23]&255)<<24,_e=_[24]&255|(_[25]&255)<<8|(_[26]&255)<<16|(_[27]&255)<<24,Xe=_[28]&255|(_[29]&255)<<8|(_[30]&255)<<16|(_[31]&255)<<24,ht=w[12]&255|(w[13]&255)<<8|(w[14]&255)<<16|(w[15]&255)<<24,Fe=I,tt=z,Be=W,He=ce,Je=ve,Me=Le,ae=Te,oe=Rt,ge=Re,ue=ft,fe=at,be=vt,ct=ke,At=_e,St=Xe,Ot=ht,$,Mt=0;Mt<20;Mt+=2)$=Fe+ct|0,Je^=$<<7|$>>>25,$=Je+Fe|0,ge^=$<<9|$>>>23,$=ge+Je|0,ct^=$<<13|$>>>19,$=ct+ge|0,Fe^=$<<18|$>>>14,$=Me+tt|0,ue^=$<<7|$>>>25,$=ue+Me|0,At^=$<<9|$>>>23,$=At+ue|0,tt^=$<<13|$>>>19,$=tt+At|0,Me^=$<<18|$>>>14,$=fe+ae|0,St^=$<<7|$>>>25,$=St+fe|0,Be^=$<<9|$>>>23,$=Be+St|0,ae^=$<<13|$>>>19,$=ae+Be|0,fe^=$<<18|$>>>14,$=Ot+be|0,He^=$<<7|$>>>25,$=He+Ot|0,oe^=$<<9|$>>>23,$=oe+He|0,be^=$<<13|$>>>19,$=be+oe|0,Ot^=$<<18|$>>>14,$=Fe+He|0,tt^=$<<7|$>>>25,$=tt+Fe|0,Be^=$<<9|$>>>23,$=Be+tt|0,He^=$<<13|$>>>19,$=He+Be|0,Fe^=$<<18|$>>>14,$=Me+Je|0,ae^=$<<7|$>>>25,$=ae+Me|0,oe^=$<<9|$>>>23,$=oe+ae|0,Je^=$<<13|$>>>19,$=Je+oe|0,Me^=$<<18|$>>>14,$=fe+ue|0,be^=$<<7|$>>>25,$=be+fe|0,ge^=$<<9|$>>>23,$=ge+be|0,ue^=$<<13|$>>>19,$=ue+ge|0,fe^=$<<18|$>>>14,$=Ot+St|0,ct^=$<<7|$>>>25,$=ct+Ot|0,At^=$<<9|$>>>23,$=At+ct|0,St^=$<<13|$>>>19,$=St+At|0,Ot^=$<<18|$>>>14;P[0]=Fe>>>0&255,P[1]=Fe>>>8&255,P[2]=Fe>>>16&255,P[3]=Fe>>>24&255,P[4]=Me>>>0&255,P[5]=Me>>>8&255,P[6]=Me>>>16&255,P[7]=Me>>>24&255,P[8]=fe>>>0&255,P[9]=fe>>>8&255,P[10]=fe>>>16&255,P[11]=fe>>>24&255,P[12]=Ot>>>0&255,P[13]=Ot>>>8&255,P[14]=Ot>>>16&255,P[15]=Ot>>>24&255,P[16]=ae>>>0&255,P[17]=ae>>>8&255,P[18]=ae>>>16&255,P[19]=ae>>>24&255,P[20]=oe>>>0&255,P[21]=oe>>>8&255,P[22]=oe>>>16&255,P[23]=oe>>>24&255,P[24]=ge>>>0&255,P[25]=ge>>>8&255,P[26]=ge>>>16&255,P[27]=ge>>>24&255,P[28]=ue>>>0&255,P[29]=ue>>>8&255,P[30]=ue>>>16&255,P[31]=ue>>>24&255}function A(P,k,_,w){b(P,k,_,w)}function S(P,k,_,w){x(P,k,_,w)}var E=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function T(P,k,_,w,I,z,W){var ce=new Uint8Array(16),ve=new Uint8Array(64),Le,Te;for(Te=0;Te<16;Te++)ce[Te]=0;for(Te=0;Te<8;Te++)ce[Te]=z[Te];for(;I>=64;){for(A(ve,ce,W,E),Te=0;Te<64;Te++)P[k+Te]=_[w+Te]^ve[Te];for(Le=1,Te=8;Te<16;Te++)Le=Le+(ce[Te]&255)|0,ce[Te]=Le&255,Le>>>=8;I-=64,k+=64,w+=64}if(I>0)for(A(ve,ce,W,E),Te=0;Te=64;){for(A(W,z,I,E),ve=0;ve<64;ve++)P[k+ve]=W[ve];for(ce=1,ve=8;ve<16;ve++)ce=ce+(z[ve]&255)|0,z[ve]=ce&255,ce>>>=8;_-=64,k+=64}if(_>0)for(A(W,z,I,E),ve=0;ve<_;ve++)P[k+ve]=W[ve];return 0}function N(P,k,_,w,I){var z=new Uint8Array(32);S(z,w,I,E);for(var W=new Uint8Array(8),ce=0;ce<8;ce++)W[ce]=w[ce+16];return C(P,k,_,W,z)}function B(P,k,_,w,I,z,W){var ce=new Uint8Array(32);S(ce,z,W,E);for(var ve=new Uint8Array(8),Le=0;Le<8;Le++)ve[Le]=z[Le+16];return T(P,k,_,w,I,ve,ce)}var L=function(P){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var k,_,w,I,z,W,ce,ve;k=P[0]&255|(P[1]&255)<<8,this.r[0]=k&8191,_=P[2]&255|(P[3]&255)<<8,this.r[1]=(k>>>13|_<<3)&8191,w=P[4]&255|(P[5]&255)<<8,this.r[2]=(_>>>10|w<<6)&7939,I=P[6]&255|(P[7]&255)<<8,this.r[3]=(w>>>7|I<<9)&8191,z=P[8]&255|(P[9]&255)<<8,this.r[4]=(I>>>4|z<<12)&255,this.r[5]=z>>>1&8190,W=P[10]&255|(P[11]&255)<<8,this.r[6]=(z>>>14|W<<2)&8191,ce=P[12]&255|(P[13]&255)<<8,this.r[7]=(W>>>11|ce<<5)&8065,ve=P[14]&255|(P[15]&255)<<8,this.r[8]=(ce>>>8|ve<<8)&8191,this.r[9]=ve>>>5&127,this.pad[0]=P[16]&255|(P[17]&255)<<8,this.pad[1]=P[18]&255|(P[19]&255)<<8,this.pad[2]=P[20]&255|(P[21]&255)<<8,this.pad[3]=P[22]&255|(P[23]&255)<<8,this.pad[4]=P[24]&255|(P[25]&255)<<8,this.pad[5]=P[26]&255|(P[27]&255)<<8,this.pad[6]=P[28]&255|(P[29]&255)<<8,this.pad[7]=P[30]&255|(P[31]&255)<<8};L.prototype.blocks=function(P,k,_){for(var w=this.fin?0:2048,I,z,W,ce,ve,Le,Te,Rt,Re,ft,at,vt,ke,_e,Xe,ht,Fe,tt,Be,He=this.h[0],Je=this.h[1],Me=this.h[2],ae=this.h[3],oe=this.h[4],ge=this.h[5],ue=this.h[6],fe=this.h[7],be=this.h[8],ct=this.h[9],At=this.r[0],St=this.r[1],Ot=this.r[2],$=this.r[3],Mt=this.r[4],Ht=this.r[5],Gt=this.r[6],_t=this.r[7],jt=this.r[8],zt=this.r[9];_>=16;)I=P[k+0]&255|(P[k+1]&255)<<8,He+=I&8191,z=P[k+2]&255|(P[k+3]&255)<<8,Je+=(I>>>13|z<<3)&8191,W=P[k+4]&255|(P[k+5]&255)<<8,Me+=(z>>>10|W<<6)&8191,ce=P[k+6]&255|(P[k+7]&255)<<8,ae+=(W>>>7|ce<<9)&8191,ve=P[k+8]&255|(P[k+9]&255)<<8,oe+=(ce>>>4|ve<<12)&8191,ge+=ve>>>1&8191,Le=P[k+10]&255|(P[k+11]&255)<<8,ue+=(ve>>>14|Le<<2)&8191,Te=P[k+12]&255|(P[k+13]&255)<<8,fe+=(Le>>>11|Te<<5)&8191,Rt=P[k+14]&255|(P[k+15]&255)<<8,be+=(Te>>>8|Rt<<8)&8191,ct+=Rt>>>5|w,Re=0,ft=Re,ft+=He*At,ft+=Je*(5*zt),ft+=Me*(5*jt),ft+=ae*(5*_t),ft+=oe*(5*Gt),Re=ft>>>13,ft&=8191,ft+=ge*(5*Ht),ft+=ue*(5*Mt),ft+=fe*(5*$),ft+=be*(5*Ot),ft+=ct*(5*St),Re+=ft>>>13,ft&=8191,at=Re,at+=He*St,at+=Je*At,at+=Me*(5*zt),at+=ae*(5*jt),at+=oe*(5*_t),Re=at>>>13,at&=8191,at+=ge*(5*Gt),at+=ue*(5*Ht),at+=fe*(5*Mt),at+=be*(5*$),at+=ct*(5*Ot),Re+=at>>>13,at&=8191,vt=Re,vt+=He*Ot,vt+=Je*St,vt+=Me*At,vt+=ae*(5*zt),vt+=oe*(5*jt),Re=vt>>>13,vt&=8191,vt+=ge*(5*_t),vt+=ue*(5*Gt),vt+=fe*(5*Ht),vt+=be*(5*Mt),vt+=ct*(5*$),Re+=vt>>>13,vt&=8191,ke=Re,ke+=He*$,ke+=Je*Ot,ke+=Me*St,ke+=ae*At,ke+=oe*(5*zt),Re=ke>>>13,ke&=8191,ke+=ge*(5*jt),ke+=ue*(5*_t),ke+=fe*(5*Gt),ke+=be*(5*Ht),ke+=ct*(5*Mt),Re+=ke>>>13,ke&=8191,_e=Re,_e+=He*Mt,_e+=Je*$,_e+=Me*Ot,_e+=ae*St,_e+=oe*At,Re=_e>>>13,_e&=8191,_e+=ge*(5*zt),_e+=ue*(5*jt),_e+=fe*(5*_t),_e+=be*(5*Gt),_e+=ct*(5*Ht),Re+=_e>>>13,_e&=8191,Xe=Re,Xe+=He*Ht,Xe+=Je*Mt,Xe+=Me*$,Xe+=ae*Ot,Xe+=oe*St,Re=Xe>>>13,Xe&=8191,Xe+=ge*At,Xe+=ue*(5*zt),Xe+=fe*(5*jt),Xe+=be*(5*_t),Xe+=ct*(5*Gt),Re+=Xe>>>13,Xe&=8191,ht=Re,ht+=He*Gt,ht+=Je*Ht,ht+=Me*Mt,ht+=ae*$,ht+=oe*Ot,Re=ht>>>13,ht&=8191,ht+=ge*St,ht+=ue*At,ht+=fe*(5*zt),ht+=be*(5*jt),ht+=ct*(5*_t),Re+=ht>>>13,ht&=8191,Fe=Re,Fe+=He*_t,Fe+=Je*Gt,Fe+=Me*Ht,Fe+=ae*Mt,Fe+=oe*$,Re=Fe>>>13,Fe&=8191,Fe+=ge*Ot,Fe+=ue*St,Fe+=fe*At,Fe+=be*(5*zt),Fe+=ct*(5*jt),Re+=Fe>>>13,Fe&=8191,tt=Re,tt+=He*jt,tt+=Je*_t,tt+=Me*Gt,tt+=ae*Ht,tt+=oe*Mt,Re=tt>>>13,tt&=8191,tt+=ge*$,tt+=ue*Ot,tt+=fe*St,tt+=be*At,tt+=ct*(5*zt),Re+=tt>>>13,tt&=8191,Be=Re,Be+=He*zt,Be+=Je*jt,Be+=Me*_t,Be+=ae*Gt,Be+=oe*Ht,Re=Be>>>13,Be&=8191,Be+=ge*Mt,Be+=ue*$,Be+=fe*Ot,Be+=be*St,Be+=ct*At,Re+=Be>>>13,Be&=8191,Re=(Re<<2)+Re|0,Re=Re+ft|0,ft=Re&8191,Re=Re>>>13,at+=Re,He=ft,Je=at,Me=vt,ae=ke,oe=_e,ge=Xe,ue=ht,fe=Fe,be=tt,ct=Be,k+=16,_-=16;this.h[0]=He,this.h[1]=Je,this.h[2]=Me,this.h[3]=ae,this.h[4]=oe,this.h[5]=ge,this.h[6]=ue,this.h[7]=fe,this.h[8]=be,this.h[9]=ct},L.prototype.finish=function(P,k){var _=new Uint16Array(10),w,I,z,W;if(this.leftover){for(W=this.leftover,this.buffer[W++]=1;W<16;W++)this.buffer[W]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(w=this.h[1]>>>13,this.h[1]&=8191,W=2;W<10;W++)this.h[W]+=w,w=this.h[W]>>>13,this.h[W]&=8191;for(this.h[0]+=w*5,w=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=w,w=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=w,_[0]=this.h[0]+5,w=_[0]>>>13,_[0]&=8191,W=1;W<10;W++)_[W]=this.h[W]+w,w=_[W]>>>13,_[W]&=8191;for(_[9]-=8192,I=(w^1)-1,W=0;W<10;W++)_[W]&=I;for(I=~I,W=0;W<10;W++)this.h[W]=this.h[W]&I|_[W];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,z=this.h[0]+this.pad[0],this.h[0]=z&65535,W=1;W<8;W++)z=(this.h[W]+this.pad[W]|0)+(z>>>16)|0,this.h[W]=z&65535;P[k+0]=this.h[0]>>>0&255,P[k+1]=this.h[0]>>>8&255,P[k+2]=this.h[1]>>>0&255,P[k+3]=this.h[1]>>>8&255,P[k+4]=this.h[2]>>>0&255,P[k+5]=this.h[2]>>>8&255,P[k+6]=this.h[3]>>>0&255,P[k+7]=this.h[3]>>>8&255,P[k+8]=this.h[4]>>>0&255,P[k+9]=this.h[4]>>>8&255,P[k+10]=this.h[5]>>>0&255,P[k+11]=this.h[5]>>>8&255,P[k+12]=this.h[6]>>>0&255,P[k+13]=this.h[6]>>>8&255,P[k+14]=this.h[7]>>>0&255,P[k+15]=this.h[7]>>>8&255},L.prototype.update=function(P,k,_){var w,I;if(this.leftover){for(I=16-this.leftover,I>_&&(I=_),w=0;w=16&&(I=_-_%16,this.blocks(P,k,I),k+=I,_-=I),_){for(w=0;w<_;w++)this.buffer[this.leftover+w]=P[k+w];this.leftover+=_}};function U(P,k,_,w,I,z){var W=new L(z);return W.update(_,w,I),W.finish(P,k),0}function j(P,k,_,w,I,z){var W=new Uint8Array(16);return U(W,0,_,w,I,z),y(P,k,W,0)}function X(P,k,_,w,I){var z;if(_<32)return-1;for(B(P,0,k,0,_,w,I),U(P,16,P,32,_-32,P),z=0;z<16;z++)P[z]=0;return 0}function G(P,k,_,w,I){var z,W=new Uint8Array(32);if(_<32||(N(W,0,32,w,I),j(k,16,k,32,_-32,W)!==0))return-1;for(B(P,0,k,0,_,w,I),z=0;z<32;z++)P[z]=0;return 0}function H(P,k){var _;for(_=0;_<16;_++)P[_]=k[_]|0}function re(P){var k,_,w=1;for(k=0;k<16;k++)_=P[k]+w+65535,w=Math.floor(_/65536),P[k]=_-w*65536;P[0]+=w-1+37*(w-1)}function V(P,k,_){for(var w,I=~(_-1),z=0;z<16;z++)w=I&(P[z]^k[z]),P[z]^=w,k[z]^=w}function ee(P,k){var _,w,I,z=n(),W=n();for(_=0;_<16;_++)W[_]=k[_];for(re(W),re(W),re(W),w=0;w<2;w++){for(z[0]=W[0]-65517,_=1;_<15;_++)z[_]=W[_]-65535-(z[_-1]>>16&1),z[_-1]&=65535;z[15]=W[15]-32767-(z[14]>>16&1),I=z[15]>>16&1,z[14]&=65535,V(W,z,1-I)}for(_=0;_<16;_++)P[2*_]=W[_]&255,P[2*_+1]=W[_]>>8}function pe(P,k){var _=new Uint8Array(32),w=new Uint8Array(32);return ee(_,P),ee(w,k),m(_,0,w,0)}function Ae(P){var k=new Uint8Array(32);return ee(k,P),k[0]&1}function we(P,k){var _;for(_=0;_<16;_++)P[_]=k[2*_]+(k[2*_+1]<<8);P[15]&=32767}function Ye(P,k,_){for(var w=0;w<16;w++)P[w]=k[w]+_[w]}function nt(P,k,_){for(var w=0;w<16;w++)P[w]=k[w]-_[w]}function De(P,k,_){var w,I,z=0,W=0,ce=0,ve=0,Le=0,Te=0,Rt=0,Re=0,ft=0,at=0,vt=0,ke=0,_e=0,Xe=0,ht=0,Fe=0,tt=0,Be=0,He=0,Je=0,Me=0,ae=0,oe=0,ge=0,ue=0,fe=0,be=0,ct=0,At=0,St=0,Ot=0,$=_[0],Mt=_[1],Ht=_[2],Gt=_[3],_t=_[4],jt=_[5],zt=_[6],Vn=_[7],an=_[8],Bn=_[9],Dn=_[10],Ln=_[11],nr=_[12],_r=_[13],Nr=_[14],Ir=_[15];w=k[0],z+=w*$,W+=w*Mt,ce+=w*Ht,ve+=w*Gt,Le+=w*_t,Te+=w*jt,Rt+=w*zt,Re+=w*Vn,ft+=w*an,at+=w*Bn,vt+=w*Dn,ke+=w*Ln,_e+=w*nr,Xe+=w*_r,ht+=w*Nr,Fe+=w*Ir,w=k[1],W+=w*$,ce+=w*Mt,ve+=w*Ht,Le+=w*Gt,Te+=w*_t,Rt+=w*jt,Re+=w*zt,ft+=w*Vn,at+=w*an,vt+=w*Bn,ke+=w*Dn,_e+=w*Ln,Xe+=w*nr,ht+=w*_r,Fe+=w*Nr,tt+=w*Ir,w=k[2],ce+=w*$,ve+=w*Mt,Le+=w*Ht,Te+=w*Gt,Rt+=w*_t,Re+=w*jt,ft+=w*zt,at+=w*Vn,vt+=w*an,ke+=w*Bn,_e+=w*Dn,Xe+=w*Ln,ht+=w*nr,Fe+=w*_r,tt+=w*Nr,Be+=w*Ir,w=k[3],ve+=w*$,Le+=w*Mt,Te+=w*Ht,Rt+=w*Gt,Re+=w*_t,ft+=w*jt,at+=w*zt,vt+=w*Vn,ke+=w*an,_e+=w*Bn,Xe+=w*Dn,ht+=w*Ln,Fe+=w*nr,tt+=w*_r,Be+=w*Nr,He+=w*Ir,w=k[4],Le+=w*$,Te+=w*Mt,Rt+=w*Ht,Re+=w*Gt,ft+=w*_t,at+=w*jt,vt+=w*zt,ke+=w*Vn,_e+=w*an,Xe+=w*Bn,ht+=w*Dn,Fe+=w*Ln,tt+=w*nr,Be+=w*_r,He+=w*Nr,Je+=w*Ir,w=k[5],Te+=w*$,Rt+=w*Mt,Re+=w*Ht,ft+=w*Gt,at+=w*_t,vt+=w*jt,ke+=w*zt,_e+=w*Vn,Xe+=w*an,ht+=w*Bn,Fe+=w*Dn,tt+=w*Ln,Be+=w*nr,He+=w*_r,Je+=w*Nr,Me+=w*Ir,w=k[6],Rt+=w*$,Re+=w*Mt,ft+=w*Ht,at+=w*Gt,vt+=w*_t,ke+=w*jt,_e+=w*zt,Xe+=w*Vn,ht+=w*an,Fe+=w*Bn,tt+=w*Dn,Be+=w*Ln,He+=w*nr,Je+=w*_r,Me+=w*Nr,ae+=w*Ir,w=k[7],Re+=w*$,ft+=w*Mt,at+=w*Ht,vt+=w*Gt,ke+=w*_t,_e+=w*jt,Xe+=w*zt,ht+=w*Vn,Fe+=w*an,tt+=w*Bn,Be+=w*Dn,He+=w*Ln,Je+=w*nr,Me+=w*_r,ae+=w*Nr,oe+=w*Ir,w=k[8],ft+=w*$,at+=w*Mt,vt+=w*Ht,ke+=w*Gt,_e+=w*_t,Xe+=w*jt,ht+=w*zt,Fe+=w*Vn,tt+=w*an,Be+=w*Bn,He+=w*Dn,Je+=w*Ln,Me+=w*nr,ae+=w*_r,oe+=w*Nr,ge+=w*Ir,w=k[9],at+=w*$,vt+=w*Mt,ke+=w*Ht,_e+=w*Gt,Xe+=w*_t,ht+=w*jt,Fe+=w*zt,tt+=w*Vn,Be+=w*an,He+=w*Bn,Je+=w*Dn,Me+=w*Ln,ae+=w*nr,oe+=w*_r,ge+=w*Nr,ue+=w*Ir,w=k[10],vt+=w*$,ke+=w*Mt,_e+=w*Ht,Xe+=w*Gt,ht+=w*_t,Fe+=w*jt,tt+=w*zt,Be+=w*Vn,He+=w*an,Je+=w*Bn,Me+=w*Dn,ae+=w*Ln,oe+=w*nr,ge+=w*_r,ue+=w*Nr,fe+=w*Ir,w=k[11],ke+=w*$,_e+=w*Mt,Xe+=w*Ht,ht+=w*Gt,Fe+=w*_t,tt+=w*jt,Be+=w*zt,He+=w*Vn,Je+=w*an,Me+=w*Bn,ae+=w*Dn,oe+=w*Ln,ge+=w*nr,ue+=w*_r,fe+=w*Nr,be+=w*Ir,w=k[12],_e+=w*$,Xe+=w*Mt,ht+=w*Ht,Fe+=w*Gt,tt+=w*_t,Be+=w*jt,He+=w*zt,Je+=w*Vn,Me+=w*an,ae+=w*Bn,oe+=w*Dn,ge+=w*Ln,ue+=w*nr,fe+=w*_r,be+=w*Nr,ct+=w*Ir,w=k[13],Xe+=w*$,ht+=w*Mt,Fe+=w*Ht,tt+=w*Gt,Be+=w*_t,He+=w*jt,Je+=w*zt,Me+=w*Vn,ae+=w*an,oe+=w*Bn,ge+=w*Dn,ue+=w*Ln,fe+=w*nr,be+=w*_r,ct+=w*Nr,At+=w*Ir,w=k[14],ht+=w*$,Fe+=w*Mt,tt+=w*Ht,Be+=w*Gt,He+=w*_t,Je+=w*jt,Me+=w*zt,ae+=w*Vn,oe+=w*an,ge+=w*Bn,ue+=w*Dn,fe+=w*Ln,be+=w*nr,ct+=w*_r,At+=w*Nr,St+=w*Ir,w=k[15],Fe+=w*$,tt+=w*Mt,Be+=w*Ht,He+=w*Gt,Je+=w*_t,Me+=w*jt,ae+=w*zt,oe+=w*Vn,ge+=w*an,ue+=w*Bn,fe+=w*Dn,be+=w*Ln,ct+=w*nr,At+=w*_r,St+=w*Nr,Ot+=w*Ir,z+=38*tt,W+=38*Be,ce+=38*He,ve+=38*Je,Le+=38*Me,Te+=38*ae,Rt+=38*oe,Re+=38*ge,ft+=38*ue,at+=38*fe,vt+=38*be,ke+=38*ct,_e+=38*At,Xe+=38*St,ht+=38*Ot,I=1,w=z+I+65535,I=Math.floor(w/65536),z=w-I*65536,w=W+I+65535,I=Math.floor(w/65536),W=w-I*65536,w=ce+I+65535,I=Math.floor(w/65536),ce=w-I*65536,w=ve+I+65535,I=Math.floor(w/65536),ve=w-I*65536,w=Le+I+65535,I=Math.floor(w/65536),Le=w-I*65536,w=Te+I+65535,I=Math.floor(w/65536),Te=w-I*65536,w=Rt+I+65535,I=Math.floor(w/65536),Rt=w-I*65536,w=Re+I+65535,I=Math.floor(w/65536),Re=w-I*65536,w=ft+I+65535,I=Math.floor(w/65536),ft=w-I*65536,w=at+I+65535,I=Math.floor(w/65536),at=w-I*65536,w=vt+I+65535,I=Math.floor(w/65536),vt=w-I*65536,w=ke+I+65535,I=Math.floor(w/65536),ke=w-I*65536,w=_e+I+65535,I=Math.floor(w/65536),_e=w-I*65536,w=Xe+I+65535,I=Math.floor(w/65536),Xe=w-I*65536,w=ht+I+65535,I=Math.floor(w/65536),ht=w-I*65536,w=Fe+I+65535,I=Math.floor(w/65536),Fe=w-I*65536,z+=I-1+37*(I-1),I=1,w=z+I+65535,I=Math.floor(w/65536),z=w-I*65536,w=W+I+65535,I=Math.floor(w/65536),W=w-I*65536,w=ce+I+65535,I=Math.floor(w/65536),ce=w-I*65536,w=ve+I+65535,I=Math.floor(w/65536),ve=w-I*65536,w=Le+I+65535,I=Math.floor(w/65536),Le=w-I*65536,w=Te+I+65535,I=Math.floor(w/65536),Te=w-I*65536,w=Rt+I+65535,I=Math.floor(w/65536),Rt=w-I*65536,w=Re+I+65535,I=Math.floor(w/65536),Re=w-I*65536,w=ft+I+65535,I=Math.floor(w/65536),ft=w-I*65536,w=at+I+65535,I=Math.floor(w/65536),at=w-I*65536,w=vt+I+65535,I=Math.floor(w/65536),vt=w-I*65536,w=ke+I+65535,I=Math.floor(w/65536),ke=w-I*65536,w=_e+I+65535,I=Math.floor(w/65536),_e=w-I*65536,w=Xe+I+65535,I=Math.floor(w/65536),Xe=w-I*65536,w=ht+I+65535,I=Math.floor(w/65536),ht=w-I*65536,w=Fe+I+65535,I=Math.floor(w/65536),Fe=w-I*65536,z+=I-1+37*(I-1),P[0]=z,P[1]=W,P[2]=ce,P[3]=ve,P[4]=Le,P[5]=Te,P[6]=Rt,P[7]=Re,P[8]=ft,P[9]=at,P[10]=vt,P[11]=ke,P[12]=_e,P[13]=Xe,P[14]=ht,P[15]=Fe}function st(P,k){De(P,k,k)}function Tt(P,k){var _=n(),w;for(w=0;w<16;w++)_[w]=k[w];for(w=253;w>=0;w--)st(_,_),w!==2&&w!==4&&De(_,_,k);for(w=0;w<16;w++)P[w]=_[w]}function ln(P,k){var _=n(),w;for(w=0;w<16;w++)_[w]=k[w];for(w=250;w>=0;w--)st(_,_),w!==1&&De(_,_,k);for(w=0;w<16;w++)P[w]=_[w]}function Ee(P,k,_){var w=new Uint8Array(32),I=new Float64Array(80),z,W,ce=n(),ve=n(),Le=n(),Te=n(),Rt=n(),Re=n();for(W=0;W<31;W++)w[W]=k[W];for(w[31]=k[31]&127|64,w[0]&=248,we(I,_),W=0;W<16;W++)ve[W]=I[W],Te[W]=ce[W]=Le[W]=0;for(ce[0]=Te[0]=1,W=254;W>=0;--W)z=w[W>>>3]>>>(W&7)&1,V(ce,ve,z),V(Le,Te,z),Ye(Rt,ce,Le),nt(ce,ce,Le),Ye(Le,ve,Te),nt(ve,ve,Te),st(Te,Rt),st(Re,ce),De(ce,Le,ce),De(Le,ve,Rt),Ye(Rt,ce,Le),nt(ce,ce,Le),st(ve,ce),nt(Le,Te,Re),De(ce,Le,l),Ye(ce,ce,Te),De(Le,Le,ce),De(ce,Te,Re),De(Te,ve,I),st(ve,Rt),V(ce,ve,z),V(Le,Te,z);for(W=0;W<16;W++)I[W+16]=ce[W],I[W+32]=Le[W],I[W+48]=ve[W],I[W+64]=Te[W];var ft=I.subarray(32),at=I.subarray(16);return Tt(ft,ft),De(at,at,ft),ee(P,at),0}function ne(P,k){return Ee(P,k,a)}function le(P,k){return r(k,32),ne(P,k)}function te(P,k,_){var w=new Uint8Array(32);return Ee(w,_,k),S(P,i,w,E)}var Ce=X,Se=G;function ze(P,k,_,w,I,z){var W=new Uint8Array(32);return te(W,I,z),Ce(P,k,_,w,W)}function $e(P,k,_,w,I,z){var W=new Uint8Array(32);return te(W,I,z),Se(P,k,_,w,W)}var rt=[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 dt(P,k,_,w){for(var I=new Int32Array(16),z=new Int32Array(16),W,ce,ve,Le,Te,Rt,Re,ft,at,vt,ke,_e,Xe,ht,Fe,tt,Be,He,Je,Me,ae,oe,ge,ue,fe,be,ct=P[0],At=P[1],St=P[2],Ot=P[3],$=P[4],Mt=P[5],Ht=P[6],Gt=P[7],_t=k[0],jt=k[1],zt=k[2],Vn=k[3],an=k[4],Bn=k[5],Dn=k[6],Ln=k[7],nr=0;w>=128;){for(Je=0;Je<16;Je++)Me=8*Je+nr,I[Je]=_[Me+0]<<24|_[Me+1]<<16|_[Me+2]<<8|_[Me+3],z[Je]=_[Me+4]<<24|_[Me+5]<<16|_[Me+6]<<8|_[Me+7];for(Je=0;Je<80;Je++)if(W=ct,ce=At,ve=St,Le=Ot,Te=$,Rt=Mt,Re=Ht,ft=Gt,at=_t,vt=jt,ke=zt,_e=Vn,Xe=an,ht=Bn,Fe=Dn,tt=Ln,ae=Gt,oe=Ln,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=($>>>14|an<<18)^($>>>18|an<<14)^(an>>>9|$<<23),oe=(an>>>14|$<<18)^(an>>>18|$<<14)^($>>>9|an<<23),ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ae=$&Mt^~$&Ht,oe=an&Bn^~an&Dn,ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ae=rt[Je*2],oe=rt[Je*2+1],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ae=I[Je%16],oe=z[Je%16],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,Be=fe&65535|be<<16,He=ge&65535|ue<<16,ae=Be,oe=He,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=(ct>>>28|_t<<4)^(_t>>>2|ct<<30)^(_t>>>7|ct<<25),oe=(_t>>>28|ct<<4)^(ct>>>2|_t<<30)^(ct>>>7|_t<<25),ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ae=ct&At^ct&St^At&St,oe=_t&jt^_t&zt^jt&zt,ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,ft=fe&65535|be<<16,tt=ge&65535|ue<<16,ae=Le,oe=_e,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=Be,oe=He,ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,Le=fe&65535|be<<16,_e=ge&65535|ue<<16,At=W,St=ce,Ot=ve,$=Le,Mt=Te,Ht=Rt,Gt=Re,ct=ft,jt=at,zt=vt,Vn=ke,an=_e,Bn=Xe,Dn=ht,Ln=Fe,_t=tt,Je%16===15)for(Me=0;Me<16;Me++)ae=I[Me],oe=z[Me],ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=I[(Me+9)%16],oe=z[(Me+9)%16],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,Be=I[(Me+1)%16],He=z[(Me+1)%16],ae=(Be>>>1|He<<31)^(Be>>>8|He<<24)^Be>>>7,oe=(He>>>1|Be<<31)^(He>>>8|Be<<24)^(He>>>7|Be<<25),ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,Be=I[(Me+14)%16],He=z[(Me+14)%16],ae=(Be>>>19|He<<13)^(He>>>29|Be<<3)^Be>>>6,oe=(He>>>19|Be<<13)^(Be>>>29|He<<3)^(He>>>6|Be<<26),ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,I[Me]=fe&65535|be<<16,z[Me]=ge&65535|ue<<16;ae=ct,oe=_t,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[0],oe=k[0],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[0]=ct=fe&65535|be<<16,k[0]=_t=ge&65535|ue<<16,ae=At,oe=jt,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[1],oe=k[1],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[1]=At=fe&65535|be<<16,k[1]=jt=ge&65535|ue<<16,ae=St,oe=zt,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[2],oe=k[2],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[2]=St=fe&65535|be<<16,k[2]=zt=ge&65535|ue<<16,ae=Ot,oe=Vn,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[3],oe=k[3],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[3]=Ot=fe&65535|be<<16,k[3]=Vn=ge&65535|ue<<16,ae=$,oe=an,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[4],oe=k[4],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[4]=$=fe&65535|be<<16,k[4]=an=ge&65535|ue<<16,ae=Mt,oe=Bn,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[5],oe=k[5],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[5]=Mt=fe&65535|be<<16,k[5]=Bn=ge&65535|ue<<16,ae=Ht,oe=Dn,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[6],oe=k[6],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[6]=Ht=fe&65535|be<<16,k[6]=Dn=ge&65535|ue<<16,ae=Gt,oe=Ln,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[7],oe=k[7],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[7]=Gt=fe&65535|be<<16,k[7]=Ln=ge&65535|ue<<16,nr+=128,w-=128}return w}function wt(P,k,_){var w=new Int32Array(8),I=new Int32Array(8),z=new Uint8Array(256),W,ce=_;for(w[0]=1779033703,w[1]=3144134277,w[2]=1013904242,w[3]=2773480762,w[4]=1359893119,w[5]=2600822924,w[6]=528734635,w[7]=1541459225,I[0]=4089235720,I[1]=2227873595,I[2]=4271175723,I[3]=1595750129,I[4]=2917565137,I[5]=725511199,I[6]=4215389547,I[7]=327033209,dt(w,I,k,_),_%=128,W=0;W<_;W++)z[W]=k[ce-_+W];for(z[_]=128,_=256-128*(_<112?1:0),z[_-9]=0,g(z,_-8,ce/536870912|0,ce<<3),dt(w,I,z,_),W=0;W<8;W++)g(P,8*W,w[W],I[W]);return 0}function yt(P,k){var _=n(),w=n(),I=n(),z=n(),W=n(),ce=n(),ve=n(),Le=n(),Te=n();nt(_,P[1],P[0]),nt(Te,k[1],k[0]),De(_,_,Te),Ye(w,P[0],P[1]),Ye(Te,k[0],k[1]),De(w,w,Te),De(I,P[3],k[3]),De(I,I,u),De(z,P[2],k[2]),Ye(z,z,z),nt(W,w,_),nt(ce,z,I),Ye(ve,z,I),Ye(Le,w,_),De(P[0],W,ce),De(P[1],Le,ve),De(P[2],ve,ce),De(P[3],W,Le)}function Pe(P,k,_){var w;for(w=0;w<4;w++)V(P[w],k[w],_)}function nn(P,k){var _=n(),w=n(),I=n();Tt(I,k[2]),De(_,k[0],I),De(w,k[1],I),ee(P,w),P[31]^=Ae(_)<<7}function cn(P,k,_){var w,I;for(H(P[0],o),H(P[1],s),H(P[2],s),H(P[3],o),I=255;I>=0;--I)w=_[I/8|0]>>(I&7)&1,Pe(P,k,w),yt(k,P),yt(P,P),Pe(P,k,w)}function Gn(P,k){var _=[n(),n(),n(),n()];H(_[0],f),H(_[1],h),H(_[2],s),De(_[3],f,h),cn(P,_,k)}function Wa(P,k,_){var w=new Uint8Array(64),I=[n(),n(),n(),n()],z;for(_||r(k,32),wt(w,k,32),w[0]&=248,w[31]&=127,w[31]|=64,Gn(I,w),nn(P,I),z=0;z<32;z++)k[z+32]=P[z];return 0}var ms=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Yr(P,k){var _,w,I,z;for(w=63;w>=32;--w){for(_=0,I=w-32,z=w-12;I>4)*ms[I],_=k[I]>>8,k[I]&=255;for(I=0;I<32;I++)k[I]-=_*ms[I];for(w=0;w<32;w++)k[w+1]+=k[w]>>8,P[w]=k[w]&255}function du(P){var k=new Float64Array(64),_;for(_=0;_<64;_++)k[_]=P[_];for(_=0;_<64;_++)P[_]=0;Yr(P,k)}function ji(P,k,_,w){var I=new Uint8Array(64),z=new Uint8Array(64),W=new Uint8Array(64),ce,ve,Le=new Float64Array(64),Te=[n(),n(),n(),n()];wt(I,w,32),I[0]&=248,I[31]&=127,I[31]|=64;var Rt=_+64;for(ce=0;ce<_;ce++)P[64+ce]=k[ce];for(ce=0;ce<32;ce++)P[32+ce]=I[32+ce];for(wt(W,P.subarray(32),_+32),du(W),Gn(Te,W),nn(P,Te),ce=32;ce<64;ce++)P[ce]=w[ce];for(wt(z,P,_+64),du(z),ce=0;ce<64;ce++)Le[ce]=0;for(ce=0;ce<32;ce++)Le[ce]=W[ce];for(ce=0;ce<32;ce++)for(ve=0;ve<32;ve++)Le[ce+ve]+=z[ce]*I[ve];return Yr(P.subarray(32),Le),Rt}function pu(P,k){var _=n(),w=n(),I=n(),z=n(),W=n(),ce=n(),ve=n();return H(P[2],s),we(P[1],k),st(I,P[1]),De(z,I,c),nt(I,I,P[2]),Ye(z,P[2],z),st(W,z),st(ce,W),De(ve,ce,W),De(_,ve,I),De(_,_,z),ln(_,_),De(_,_,I),De(_,_,z),De(_,_,z),De(P[0],_,z),st(w,P[0]),De(w,w,z),pe(w,I)&&De(P[0],P[0],d),st(w,P[0]),De(w,w,z),pe(w,I)?-1:(Ae(P[0])===k[31]>>7&&nt(P[0],o,P[0]),De(P[3],P[0],P[1]),0)}function Ja(P,k,_,w){var I,z=new Uint8Array(32),W=new Uint8Array(64),ce=[n(),n(),n(),n()],ve=[n(),n(),n(),n()];if(_<64||pu(ve,w))return-1;for(I=0;I<_;I++)P[I]=k[I];for(I=0;I<32;I++)P[I+32]=w[I];if(wt(W,P,_),du(W),cn(ce,ve,W),Gn(ve,k.subarray(32)),yt(ce,ve),nn(z,ce),_-=64,m(k,0,z,0)){for(I=0;I<_;I++)P[I]=0;return-1}for(I=0;I<_;I++)P[I]=k[I+64];return _}var Ul=32,Fl=24,zi=32,Xr=16,pa=32,Ya=32,Io=32,Xa=32,gu=32,yu=Fl,Sh=zi,Q=Xr,q=64,se=32,Oe=64,Ge=32,xt=64;e.lowlevel={crypto_core_hsalsa20:S,crypto_stream_xor:B,crypto_stream:N,crypto_stream_salsa20_xor:T,crypto_stream_salsa20:C,crypto_onetimeauth:U,crypto_onetimeauth_verify:j,crypto_verify_16:y,crypto_verify_32:m,crypto_secretbox:X,crypto_secretbox_open:G,crypto_scalarmult:Ee,crypto_scalarmult_base:ne,crypto_box_beforenm:te,crypto_box_afternm:Ce,crypto_box:ze,crypto_box_open:$e,crypto_box_keypair:le,crypto_hash:wt,crypto_sign:ji,crypto_sign_keypair:Wa,crypto_sign_open:Ja,crypto_secretbox_KEYBYTES:Ul,crypto_secretbox_NONCEBYTES:Fl,crypto_secretbox_ZEROBYTES:zi,crypto_secretbox_BOXZEROBYTES:Xr,crypto_scalarmult_BYTES:pa,crypto_scalarmult_SCALARBYTES:Ya,crypto_box_PUBLICKEYBYTES:Io,crypto_box_SECRETKEYBYTES:Xa,crypto_box_BEFORENMBYTES:gu,crypto_box_NONCEBYTES:yu,crypto_box_ZEROBYTES:Sh,crypto_box_BOXZEROBYTES:Q,crypto_sign_BYTES:q,crypto_sign_PUBLICKEYBYTES:se,crypto_sign_SECRETKEYBYTES:Oe,crypto_sign_SEEDBYTES:Ge,crypto_hash_BYTES:xt,gf:n,D:c,L:ms,pack25519:ee,unpack25519:we,M:De,A:Ye,S:st,Z:nt,pow2523:ln,add:yt,set25519:H,modL:Yr,scalarmult:cn,scalarbase:Gn};function pt(P,k){if(P.length!==Ul)throw new Error("bad key size");if(k.length!==Fl)throw new Error("bad nonce size")}function lt(P,k){if(P.length!==Io)throw new Error("bad public key size");if(k.length!==Xa)throw new Error("bad secret key size")}function Ue(){for(var P=0;P=0},e.sign.keyPair=function(){var P=new Uint8Array(se),k=new Uint8Array(Oe);return Wa(P,k),{publicKey:P,secretKey:k}},e.sign.keyPair.fromSecretKey=function(P){if(Ue(P),P.length!==Oe)throw new Error("bad secret key size");for(var k=new Uint8Array(se),_=0;_`0x${"0".repeat(40)}`;class sae{constructor(){this.cachedSignatures=new Map,this.cachedLeashes=new Map}clear(){this.cachedSignatures.clear(),this.cachedLeashes.clear()}cache(e,n,r,i,a){this.cachedSignatures.has(e)||this.cachedSignatures.set(e,new Map),this.cachedSignatures.get(e).set(i,a),this.cachedLeashes.set(n,{nonce:r.leash.nonce,block_number:r.leash.blockNumber,block_hash:r.leash.blockHash,block_range:r.leash.blockRange})}get(e,n){var r;return(r=this.cachedSignatures.get(e))===null||r===void 0?void 0:r.get(n)}getLeash(e){return this.cachedLeashes.get(e)}}const _y=new sae;function lae(t){return{domain:{name:"oasis-runtime-sdk/evm: signed query",version:"1.0.0",chainId:t},types:{Call:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"gasLimit",type:"uint64"},{name:"gasPrice",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"},{name:"leash",type:"Leash"}],Leash:[{name:"nonce",type:"uint64"},{name:"blockNumber",type:"uint64"},{name:"blockHash",type:"bytes32"},{name:"blockRange",type:"uint64"}]}}}class cA{static make(e,n,r){return px(this,void 0,void 0,function*(){const i=yield uae(n,r==null?void 0:r.leash);return new cA(i,yield hae(fae(e,i),n,{chainId:r==null?void 0:r.chainId}),e.data?tF(e.data):void 0)})}constructor(e,n,r){this.leash=e,this.signature=n,this.data=r,fw.add(this)}encode(){return V_(this,fw,"m",e8).call(this,this.data?{body:this.data}:void 0)}encryptEncode(e){return px(this,void 0,void 0,function*(){return this.data?V_(this,fw,"m",e8).call(this,yield e.encryptEnvelope(this.data)):this.encode()})}}fw=new WeakSet,e8=function(e){return Ze(Fh({data:e||void 0,leash:this.leash,signature:this.signature}))};function tF(t){return Array.isArray(t)?new Uint8Array(t):Or(t)}function cae(t){return Array.isArray(t)?Ze(new Uint8Array(t)):Ze(t)}function uae(t,e){var n;return px(this,void 0,void 0,function*(){((e==null?void 0:e.nonce)!==void 0||(e==null?void 0:e.block)!==void 0)&&_y.clear();let r;if(e!=null&&e.nonce)r=e.nonce;else if("getNonce"in t)r=t.getNonce("pending");else{const l=yield t.getAddress();r=t.provider.getTransactionCount(l,"pending")}let i;if((e==null?void 0:e.block)!==void 0)i=e.block;else{if(!t.provider)throw new Error("`sapphire.wrap`ped signer was not connected to a provider");const l=yield t.provider.getBlock("latest");if(!l)throw new Error("unable to get latest block");i=t.provider.getBlock(l.number-2)}const[a,o]=yield Promise.all([r,i]),s=(n=e==null?void 0:e.blockRange)!==null&&n!==void 0?n:iae;if((e==null?void 0:e.nonce)===void 0&&(e==null?void 0:e.block)===void 0){if(!t.provider)throw new Error("`sapphire.wrap`ped signer was not connected to a provider");const{chainId:l}=yield t.provider.getNetwork(),c=_y.getLeash(BigInt(l));if(c!==void 0){if(c.nonce>a&&c.block_number+s>o.number+2)return c;_y.clear()}}return{nonce:e!=null&&e.nonce?e.nonce:a+rae,block_number:o.number,block_hash:Or(o.hash),block_range:s}})}function fae(t,e){var n,r,i,a,o;return{from:t.from,to:(n=t.to)!==null&&n!==void 0?n:oae(),gasLimit:Number(BigInt((i=(r=t.gasLimit)!==null&&r!==void 0?r:t.gasLimit)!==null&&i!==void 0?i:tae)),gasPrice:BigInt((a=t.gasPrice)!==null&&a!==void 0?a:eae),value:BigInt((o=t.value)!==null&&o!==void 0?o:nae),data:t.data?cae(t.data):aae,leash:{nonce:e.nonce,blockNumber:e.block_number,blockHash:e.block_hash,blockRange:e.block_range}}}function hae(t,e,n){return px(this,void 0,void 0,function*(){const r=yield e.getAddress();let i;if(n!=null&&n.chainId)i=BigInt(n.chainId);else if(e.provider)({chainId:i}=yield e.provider.getNetwork());else throw new Error("must either connect provider or provide manual chainId override");const{domain:a,types:o}=lae(Number(i)),s=dae(a),l=pae(t),c=x1.hash(s,o,l);let u=_y.get(r,c);return u!==void 0||(u=Pt("_signTypedData"in e?yield e._signTypedData(s,o,l):yield e.signTypedData(s,o,l)),_y.cache(r,BigInt(i),t,c,u)),u})}function dae(t){const e=Object.assign(Object.assign({},t),{chainId:t.chainId?fs(t.chainId):void 0});return t.salt&&(e.salt=tF(t.salt)),e}function pae(t){const e=n=>{if(n!=null)return typeof n=="string"?n:n instanceof BigInt?fs(n.toString()):Uu(n)};return Object.assign(Object.assign({},t),{gasPrice:e(t.gasPrice),value:e(t.value),data:t.data?Pt(t.data):void 0})}const gae="modulepreload",yae=function(t){return"/votee/"+t},Q_={},mae=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link");i=Promise.all(n.map(o=>{if(o=yae(o),o in Q_)return;Q_[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!r)for(let f=a.length-1;f>=0;f--){const h=a[f];if(h.href===o&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":gae,s||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),s)return new Promise((f,h)=>{u.addEventListener("load",f),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})}))}return i.then(()=>e()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},uE={chainId:23294,defaultGateway:"https://sapphire.oasis.io/",runtimeId:"0x000000000000000000000000000000000000000000000000f80306c9858e7279"},fE={chainId:23295,defaultGateway:"https://testnet.sapphire.oasis.dev/",runtimeId:"0x000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c"},hE={chainId:23293,defaultGateway:"http://localhost:8545/",runtimeId:"0x8000000000000000000000000000000000000000000000000000000000000000"},vae={mainnet:uE,testnet:fE,localnet:hE,[uE.chainId]:uE,[fE.chainId]:fE,[hE.chainId]:hE};var Rp=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})};const bae=60*5*1e3;function nF(t,e){return{key:Pt(t.key),checksum:Pt(t.checksum),signature:Pt(t.signature),epoch:t.epoch,chainId:e,fetched:new Date}}function wae(t){return Rp(this,void 0,void 0,function*(){const e=yield mae(()=>import(t.split(":")[0]),__vite__mapDeps([])),n=rF();return new Promise((r,i)=>{const a={method:"POST",headers:{"content-type":"application/json","content-length":n.length}},o=e.request(t,a,s=>{const l=[];s.on("error",c=>i(c)),s.on("data",c=>l.push(c)),s.on("end",()=>{r(JSON.parse(Buffer.concat(l).toString()))})});o.on("error",s=>i(s)),o.write(n),o.end()})})}function xae(t,e){return Rp(this,void 0,void 0,function*(){const n=yield e(t,{method:"POST",headers:{"content-type":"application/json"},body:rF()});if(!n.ok)throw new Ny("Failed to fetch runtime public key.",n);return yield n.json()})}function rF(){return JSON.stringify({jsonrpc:"2.0",id:Math.floor(Math.random()*1e9),method:n8,params:[]})}function Aae(t,e){var n;return Rp(this,void 0,void 0,function*(){const{defaultGateway:r}=vae[t];if(!r)throw new Error(`Unable to fetch runtime public key for network with unknown ID: ${t}.`);const i=(n=e==null?void 0:e.fetch)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.fetch,a=yield i?xae(r,i):wae(r);return nF(a.result,t)})}function K_(t){return typeof t=="string"?t.startsWith("0x")?parseInt(t,16):parseInt(t):t}function Eae(t){return Rp(this,void 0,void 0,function*(){const e="provider"in t?t.provider:t;let n;if(e){let r;if("request"in e){const i=e;n=K_(yield i.request({method:"eth_chainId"}));try{r=yield i.request({method:n8,params:[]})}catch{}}else if("send"in e){const i=e;n=K_(yield i.send("eth_chainId",[]));try{r=yield i.send(n8,[])}catch{}}else throw new Error("fetchRuntimePublicKey does not support non-request non-send provier!");if(r&&"key"in r)return nF(r,n)}if(!n)throw new Error("fetchRuntimePublicKey failed to retrieve chainId from provider");return Aae(n)})}class Sae{}class Pae extends Sae{constructor(e){super(),e||(e=bae),this.timeoutMilliseconds=e}fetch(e){return Rp(this,void 0,void 0,function*(){if(this.pubkey){const n=this.pubkey,r=Date.now()-this.timeoutMilliseconds;if(n.fetched&&n.fetched.valueOf()>r)return n}return this.pubkey=yield Eae(e)})}cipher(e){return Rp(this,void 0,void 0,function*(){const n=yield this.fetch(e);return hx.ephemeral(n.key,n.epoch)})}}var hs=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})},Oae=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);ihs(this,void 0,void 0,function*(){return yield i({method:o[0],params:o[1]})})),"sendAsync"in t&&(a.sendAsync=()=>{throw new Error("sendAsync not supported by Sapphire wrapper!")}),OO(t,n,a)}function kae(t,e){return n=>hs(this,void 0,void 0,function*(){const r=yield t.getSigner(),i=yield e.fetcher.cipher(t),{method:a,params:o}=yield Bae(n,r,i),s=yield r.provider.send(a,o??[]);return a==="eth_call"?yield i.decryptEncoded(s):s})}function OO(t,e,n){return new Proxy(t,{get(r,i){if(i===PO)return e;if(i in n)return Reflect.get(n,i);const a=Reflect.get(r,i);return typeof a=="function"?a.bind(r):a}})}function TO(t,e){const n=uA(e);let r;if(t.provider)try{const a=aF(t.provider,n,t);r=t.connect(a)}catch(a){if(a.code!=="UNSUPPORTED_OPERATION")throw a;r=t}else r=t;const i={sendTransaction:W_(r.sendTransaction.bind(r),n,r),signTransaction:W_(r.signTransaction.bind(r),n,r),call:gx(r,"call",n),estimateGas:gx(r,"estimateGas",n),connect(a){const o=r.connect(a);return TO(o,n)}};return OO(r,n,i)}function aF(t,e,n){const r=uA(e);if(Reflect.get(t,PO)!==void 0)return t;const i={call:gx(t,"call",r),estimateGas:gx(t,"estimateGas",r)};return n&&("broadcastTransaction"in t?i.broadcastTransaction=a=>hs(this,void 0,void 0,function*(){const o=yield r.fetcher.cipher(t),s=yield t8(a,o,n);return t.broadcastTransaction(s)}):i.sendTransaction=a=>hs(this,void 0,void 0,function*(){const o=yield r.fetcher.cipher(t),s=yield t8(a,o,n);return t.sendTransaction(s)})),OO(t,r,i)}function _ae(t){return Reflect.get(t,"_isSigner")===!0}function Nae(t){return t instanceof LU||Reflect.get(t,"signTypedData")!==void 0&&Reflect.get(t,"signTransaction")!==void 0}function oF(t){return _ae(t)||Nae(t)}function Iae(t){return Reflect.get(t,"_isProvider")===!0}function Rae(t){return t instanceof DU||Reflect.get(t,"waitForBlock")&&Reflect.get(t,"destroy")&&Reflect.get(t,"broadcastTransaction")}function Mae(t){return Iae(t)||Rae(t)}function gx(t,e,n){const r=(i,a,o,s)=>hs(this,void 0,void 0,function*(){var l;let c=a.data;return o||(c=yield s.encryptEncode((l=a.data)!==null&&l!==void 0?l:new Uint8Array)),yield i[e](Object.assign(Object.assign({},a),{data:Ze(c)}))});return i=>hs(this,void 0,void 0,function*(){const a=Reflect.get(t,"populateCall");a!==void 0&&(i=yield a.bind(t)(i));let o;const s=lF(i.data,!0),l=yield n.fetcher.cipher(t);if(!s&&oF(t)){const c=t;if(!c.provider)throw new Error("signer not connected to a provider");const u=c.provider;if(yield sF(i)){const f=yield cA.make(i,c);o=yield u[e](Object.assign(Object.assign({},i),{data:yield f.encryptEncode(l)}))}else o=yield r(u,i,s,l)}else o=yield r(t,i,s,l);return!s&&typeof o=="string"?yield l.decryptEncoded(o):o})}function W_(t,e,n){return(r,...i)=>hs(this,void 0,void 0,function*(){if(r.data){const a=yield e.fetcher.cipher(n);r.data=yield a.encryptEncode(r.data)}return t(r,...i)})}function sF(t){return hs(this,void 0,void 0,function*(){const[e,n]=yield Promise.all([t.from,t.to]);return!!n&&!!e&&typeof e=="string"&&!/^(0x)?0{40}$/.test(e)})}function Bae({method:t,params:e},n,r){return hs(this,void 0,void 0,function*(){if(!Array.isArray(e))return{method:t,params:e};if(t==="eth_sendRawTransaction")return{method:t,params:[yield t8(e[0],r,n)]};if((t==="eth_call"||t==="eth_estimateGas")&&(yield sF(e[0]))){const i=yield cA.make(e[0],n),a=Object.assign(Object.assign({},e[0]),{data:yield i.encryptEncode(r)});return{method:t,params:[a,...e.slice(1)]}}return/^eth_((send|sign)Transaction|call|estimateGas)$/.test(t)&&e[0].data?(e[0].data=yield r.encryptEncode(e[0].data),{method:t,params:e}):{method:t,params:e}})}class dE extends Error{}const Dae="Un-enveloped data was passed to sendRawTransaction, which is likely incorrect. Is the dapp using the Sapphire compat lib correctly?";function t8(t,e,n){return hs(this,void 0,void 0,function*(){const r=w1.from(t);if(lF(r.data,!1)||r.isSigned()&&(!n||(yield n.getAddress())!==r.from))return t;r.data=yield e.encryptEncode(r.data);try{return n.signTransaction(r)}catch(i){throw new Ny(Dae,i)}})}function Lae(t){return"data"in t&&"leash"in t&&"signature"in t}function lF(t,e){try{const n=ew(Pt(t));let r;if(Lae(n)){if(!e)throw new dE("Got unexpected signed query!");r=n.data}else r=n;if(!$ae(r))throw new dE("Bogus Sapphire enveloped data found in transaction!");return!0}catch(n){if(n instanceof dE)throw n}return!1}function $ae(t){const{format:e,body:n}=t,r=Oae(t,["format","body"]);return!(Object.keys(r).length>0||!n||e!==null&&e!==Ip.Plain&&(nx(n)||!nx(n.data)))}const n8="oasis_callDataPublicKey";class Ny extends Error{constructor(e,n){super(e),this.response=n}}function Uae({mustBeMetaMask:t=!1,silent:e=!1,timeout:n=3e3}={}){i();let r=!1;return new Promise(a=>{window.ethereum?o():(window.addEventListener("ethereum#initialized",o,{once:!0}),setTimeout(()=>{o()},n));function o(){if(r)return;r=!0,window.removeEventListener("ethereum#initialized",o);const{ethereum:s}=window;s&&(!t||s.isMetaMask)?a(s):(!e&&console.error("@metamask/detect-provider:",t&&s?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum."),a(null))}});function i(){if(typeof t!="boolean")throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if(typeof e!="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.")}}var Fae=Uae;const jae=Xt(Fae),cF=F.createContext({}),zae=({children:t})=>{const e=async()=>!!await jae({mustBeMetaMask:!1}),n=async()=>{var s,l;const o=await(((l=(s=window.ethereum)==null?void 0:s.request)==null?void 0:l.call(s,{method:"eth_requestAccounts"}))||Promise.resolve([]));if(!o||(o==null?void 0:o.length)<=0)throw new Error("[EIP1193Context] Request account failed!");return o[0]},r=(o=zw)=>{var l,c;if(!jw.has(o))throw new Error(`Chain configuration for chain id '${o}' not found!`);const s=jw.get(o);return(c=(l=window.ethereum)==null?void 0:l.request)==null?void 0:c.call(l,{method:"wallet_addEthereumChain",params:[s]})},a={isEIP1193ProviderAvailable:e,connectWallet:n,switchNetwork:async(o=zw)=>{var u,f;const s=new a$(window.ethereum);if((await iF(s).getNetwork()).chainId!==BigInt(o))try{const h=us(o).replace("0x0","0x");await((f=(u=window.ethereum).request)==null?void 0:f.call(u,{method:"wallet_switchEthereumChain",params:[{chainId:h}]}))}catch(h){const d=h;if((d==null?void 0:d.code)!==4902&&(d==null?void 0:d.code)!==-32603)throw d;r(o)}}};return Z.jsx(cF.Provider,{value:a,children:t})},Hae=()=>{const t=F.useContext(cF);if(Object.keys(t).length===0)throw new Error("[useEIP1193] Component not wrapped within a Provider");return t},hb=[{inputs:[{internalType:"contract IPollManagerACL",name:"in_managerACL",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"Close_NotActive",type:"error"},{inputs:[],name:"Close_NotAllowed",type:"error"},{inputs:[],name:"Create_AlreadyExists",type:"error"},{inputs:[],name:"Create_InvalidACL",type:"error"},{inputs:[],name:"Create_NoChoices",type:"error"},{inputs:[],name:"Create_NotAllowed",type:"error"},{inputs:[],name:"Create_TooManyChoices",type:"error"},{inputs:[],name:"Poll_NotActive",type:"error"},{inputs:[],name:"Poll_NotPublishingVotes",type:"error"},{inputs:[],name:"Poll_StillActive",type:"error"},{inputs:[],name:"Vote_NotActive",type:"error"},{inputs:[],name:"Vote_NotAllowed",type:"error"},{inputs:[],name:"Vote_UnknownChoice",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"id",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"topChoice",type:"uint256"}],name:"ProposalClosed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"id",type:"bytes32"}],name:"ProposalCreated",type:"event"},{inputs:[],name:"MAX_CHOICES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"PAST_PROPOSALS",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"PROPOSALS",outputs:[{internalType:"bool",name:"active",type:"bool"},{internalType:"uint8",name:"topChoice",type:"uint8"},{components:[{internalType:"bytes",name:"ipfsHash",type:"bytes"},{internalType:"uint8",name:"numChoices",type:"uint8"},{internalType:"uint64",name:"closeTimestamp",type:"uint64"},{internalType:"contract IPollACL",name:"acl",type:"address"}],internalType:"struct PollManager.ProposalParams",name:"params",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"in_id",type:"bytes32"}],name:"ballotIsActive",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"in_proposalId",type:"bytes32"},{internalType:"address",name:"in_voter",type:"address"},{internalType:"bytes",name:"in_data",type:"bytes"}],name:"canVoteOnPoll",outputs:[{internalType:"uint256",name:"out_weight",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"in_proposalId",type:"bytes32"}],name:"close",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"ipfsHash",type:"bytes"},{internalType:"uint8",name:"numChoices",type:"uint8"},{internalType:"uint64",name:"closeTimestamp",type:"uint64"},{internalType:"contract IPollACL",name:"acl",type:"address"}],internalType:"struct PollManager.ProposalParams",name:"in_params",type:"tuple"},{internalType:"bytes",name:"in_aclData",type:"bytes"}],name:"create",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getACL",outputs:[{internalType:"contract IPollManagerACL",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"proposalId",type:"bytes32"}],name:"getPollACL",outputs:[{internalType:"contract IPollACL",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"in_proposalId",type:"bytes32"}],name:"getVoteCounts",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"in_proposalId",type:"bytes32"},{internalType:"uint8",name:"in_choiceId",type:"uint8"},{internalType:"bytes",name:"in_data",type:"bytes"}],name:"vote",outputs:[],stateMutability:"nonpayable",type:"function"}],J_="0x60a03461007157601f61163c38819003918201601f19168301916001600160401b038311848410176100765780849260209460405283398101031261007157516001600160a01b0381168103610071576080526040516115af908161008d82396080518181816103b301526110b60152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a7146110e55750806308737695146110a057806339c79e0c14610e075780635f98ac7814610dd8578063613e0f8c14610d9f5780636dea101c14610d4d578063782fb5d414610c1b5780638732765714610a82578063892d13071461033a578063d4c0ed3e1461031e578063d50b2843146101035763ff2990a0146100a557600080fd5b3461010057606036600319011261010057602435906001600160a01b038216820361010057604435906001600160401b0382116101005760206100f8846100ef3660048701611210565b916004356112f5565b604051908152f35b80fd5b50346101005760603660031901126101005760043560243560ff81168103610319576001600160401b039160443583811161031557610149610151913690600401611210565b9033846112f5565b818552600160205260ff600260408720015416918260ff851610156102d957855284602052604085203386528060205260408620946101a86101968754948515611409565b6101a285801515611409565b9061141c565b936002830154916040519083602083015260208252816040810110906040830111176102c35760408101604052602081519101209160ff60018901541690895b838110610232578a8a600160ff8c8c8c8c8c6002820155811561021a575b505084551660ff1982840154161791015580f35b600b610229910191825461141c565b90558680610206565b806102418a9260038901611263565b90549060031b1c836102648b60ff61025b8d8a8814611409565b96168514611409565b91189283039283116102ad5761027d879160019461141c565b186102a561028e8360038b01611263565b819391549060031b91821b91600019901b19161790565b9055016101e8565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b8152602060048201526014602482015273566f74655f556e6b6e6f776e43686f696365282960601b6044820152606490fd5b8480fd5b600080fd5b5034610100578060031936011261010057602060405160088152f35b5034610100576003196040368201126108d0576001600160401b03600435116108d05760806004353603918201126108d0576024356001600160401b0381116108df5761038b903690600401611210565b60405160016290108360e01b03198152306004820152336024820152919290916020816044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610a46578591610a63575b5015610a5157602460206001600160a01b0361040b60043560640161128a565b6040516301ffc9a760e01b815263b91f535b60e01b600482015293849290918391165afa908115610a46578591610a17575b5015610a055760ff61045360246004350161129e565b16156109f357600860ff61046b60246004350161129e565b16116109e1576040519033602083015260606040830152602219016004356004013512156109b75760043560043560040135016001600160401b036004820135116103155760048101353603602482011361031557816105466104e5610554936080808501526101008401906024600482013591016112ac565b60ff6104f560246004350161123d565b1660a08401526001600160401b036105116044600435016112cd565b1660c08401526001600160a01b0361052d6004356064016112e1565b1660e0840152828103601f1901606084015285876112ac565b03601f1981018352826111ef565b6020815191012092838152600160205260ff6040822054166109cf576040518060608101106001600160401b036060830111176102c35760608101604052600181528160208201526040516105a8816111d4565b6001600160401b0360043560040135116108df5736602360043560040135600435010112156108df576001600160401b036004803580820135010135116109bb5760405161060a6004803580820135010135601f01601f1916602001826111ef565b60048035808201350190810135808352369101602401116109b7576004803580820135019081013590602401602083013783602060048035810135813501013583010152815261065e60246004350161123d565b60208201526106716044600435016112cd565b60408201526106846064600435016112e1565b606082015260408281019182528684526001602090815290842083518154929094015161ffff1990921693151560ff169390931760089190911b61ff0016178255519081518051906001600160401b0382116109a3576106e76001840154611187565b601f811161095e575b50602090601f83116001146108ee5760029392918691836108e3575b50508160011b916000199060031b1c19161760018201555b019060ff6020820151169082549168ffffffffffffffff00604083015160081b169160606901000000000000000000600160e81b0391015160481b169262ffffff60e81b16171717905561077784611513565b508381528060205260408120936040513060601b60208201523360601b6034820152602881528060608101106001600160401b036060830111176102c357606081016040526020815191012092836002870155825b60ff6107dc60246004350161129e565b168110156108005780856107f861028e60019460038c01611263565b9055016107cc565b50846001600160a01b0361081860043560640161128a565b16610852575b6020837f288a29bca04edb18fcdb2c76d6e3b03b8a137c85c70d1a4cb8aacfa868d6051082604051838152a1604051908152f35b83906001600160a01b0361086a60043560640161128a565b16803b156108df576108a7938360405180968195829463c60e204760e01b84528a60048501523360248501526060604485015260648401916112ac565b03925af180156108d4576108bc575b8061081e565b6108c683916111c1565b6108d057816108b6565b5080fd5b6040513d85823e3d90fd5b8280fd5b01519050388061070c565b906001840186526020862091865b601f1985168110610946575091839160019360029695601f1981161061092d575b505050811b016001820155610724565b015160001960f88460031b161c1916905538808061091d565b919260206001819286850151815501940192016108fc565b60018401865260208620601f840160051c81016020851061099c575b601f830160051c820181106109905750506106f0565b6000815560010161097a565b508061097a565b634e487b7160e01b85526041600452602485fd5b8380fd5b634e487b7160e01b83526041600452602483fd5b604051637830599760e11b8152600490fd5b60405163b3aaf68560e01b8152600490fd5b604051630f922a5760e01b8152600490fd5b6040516376c8e1c760e01b8152600490fd5b610a39915060203d602011610a3f575b610a3181836111ef565b81019061124b565b3861043d565b503d610a27565b6040513d87823e3d90fd5b60405163537f370960e01b8152600490fd5b610a7c915060203d602011610a3f57610a3181836111ef565b386103eb565b5034610100576020806003193601126108d05760043582526001916001825260408120918254926001810160405195610aba876111d4565b604051918591815491610acc83611187565b9283865287600182169182600014610bf5575050600114610bb3575b50505090610afb816002949303826111ef565b86520154938181019460ff811686526001600160401b0360408301818360081c16815260018060a01b039384606082019460481c16845260ff6040519881811615158a5260081c1686890152606060408901525194608060608901528551958660e08a0152875b878110610b9e5750505060ff8798610100989789888a01015251166080870152511660a0850152511660c0830152601f80199101168101030190f35b8181018301518a820161010001528201610b62565b875285872094939250859187915b818310610bde575093945091925090820101610afb826002610ae8565b865485840185015295860195879390920191610bc1565b60ff19168782015293151560051b86019093019350610afb925084915060029050610ae8565b50346101005760209081600319360112610100576004358152600191600181526040822090828152604083209160ff815416610d3b578360ff60028793015416610c7d610c6782611273565b91610c7560405193846111ef565b808352611273565b8185019590601f1901368737600281015490600390810184865b610cd6575b505050506040519380850191818652518092526040850195925b828110610cc35785870386f35b8351875295810195928101928401610cb6565b8495979498969851811015610d2f5783610cf08284611263565b905490851b1c188651821015610d1b57600582901b8701860152959793969395939493860186610c97565b634e487b7160e01b89526032600452602489fd5b97959796949396610c9c565b60405163ce381d3560e01b8152600490fd5b5034610100576020366003190112610100576004356004548110156108d05760209060046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0154604051908152f35b5034610100576020366003190112610100576020906004358152600182526002604060018060a01b039220015460481c16604051908152f35b50346101005760203660031901126101005760ff60406020926004358152600184522054166040519015158152f35b5034610100576020806003193601126108d057600435908183526001808252604084209060ff9160ff8154161561108e576002018054604051630ada2bb960e31b81523060048201526024810187905233604482015290936001600160a01b03939091868160648160488a901c89165afa908115611083578991611066575b5015611038575b929190868852878652604088209388948990600281015460ff8c991691846003809201905b610ff3575b505050898b52505060018752505060408720805461ffff191661ff00600886901b1617905591925090610ee985611429565b50600454600160401b811015610fdf576001810180600455811015610fcb579085879392600485527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01555460481c16803b156108d05781906024604051809481936346ba4a8760e11b83528960048401525af18015610a4657610f96575b50907f32c34fd89f87a7cc9f257c5f4c2ed207f4776f12b94e6aec10d90ce489d6c52891604051908152a280f35b93610fc37f32c34fd89f87a7cc9f257c5f4c2ed207f4776f12b94e6aec10d90ce489d6c5289392956111c1565b939091610f68565b634e487b7160e01b87526032600452602487fd5b634e487b7160e01b87526041600452602487fd5b868b168481101561103257836110098d84611263565b905490851b1c1890868211611027575b505099850186169985610eb2565b9a5094508686611019565b50610eb7565b600885901c6001600160401b0316801561105457421015610e8d575b604051630e01f48b60e11b8152600490fd5b61107d9150873d8911610a3f57610a3181836111ef565b38610e86565b6040513d8b823e3d90fd5b604051632e72894160e11b8152600490fd5b50346101005780600319360112610100576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b9050346108d05760203660031901126108d05760043563ffffffff60e01b81168091036108df57602092506301ffc9a760e01b8114908115611129575b5015158152f35b639664e9b960e01b14905038611122565b6002548110156111715760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190600090565b634e487b7160e01b600052603260045260246000fd5b90600182811c921680156111b7575b60208310146111a157565b634e487b7160e01b600052602260045260246000fd5b91607f1691611196565b6001600160401b0381116102c357604052565b608081019081106001600160401b038211176102c357604052565b90601f801991011681019081106001600160401b038211176102c357604052565b9181601f84011215610319578235916001600160401b038311610319576020838186019501011161031957565b359060ff8216820361031957565b90816020910312610319575180151581036103195790565b6008821015611171570190600090565b6001600160401b0381116102c35760051b60200190565b356001600160a01b03811681036103195790565b3560ff811681036103195790565b908060209392818452848401376000828201840152601f01601f1916010190565b35906001600160401b038216820361031957565b35906001600160a01b038216820361031957565b93929093600094818652600160205260409384872060ff815416156113f85760020154926001600160401b038460081c16806113eb575b50855163525a5ded60e11b815230600482015260248101919091526001600160a01b039283166044820152608060648201529360209385939092849283916113789160848401916112ac565b039260481c165afa9384156113e05780946113a9575b505082156113995750565b516305c1721760e41b8152600490fd5b909193506020823d6020116113d8575b816113c6602093836111ef565b8101031261010057505191388061138e565b3d91506113b9565b8251903d90823e3d90fd5b4210156113f8573861132c565b855163137436d960e01b8152600490fd5b818102929181159184041417156102ad57565b919082018092116102ad57565b600081815260036020526040812054909190801561150e57600019908082018181116114fa57600254908382019182116114e6578082036114b2575b505050600254801561149e5781019061147d8261113a565b909182549160031b1b19169055600255815260036020526040812055600190565b634e487b7160e01b84526031600452602484fd5b6114d06114c161028e9361113a565b90549060031b1c92839261113a565b9055845260036020526040842055388080611465565b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b85526011600452602485fd5b505090565b60008181526003602052604081205461157457600254600160401b81101561156057908261154c61028e8460016040960160025561113a565b905560025492815260036020522055600190565b634e487b7160e01b82526041600452602482fd5b90509056fea26469706673582212208bf15ca60379d1f9df63d16ec0780cf392c8a1817ccceb0ea6880c22e44c30f464736f6c63430008170033",Gae=t=>t.length>1;class yx extends WP{constructor(...e){Gae(e)?super(...e):super(hb,J_,e[0])}getDeployTransaction(e,n){return super.getDeployTransaction(e,n||{})}deploy(e,n){return super.deploy(e,n||{})}connect(e){return super.connect(e)}static createInterface(){return new zP(hb)}static connect(e,n){return new _d(e,hb,n)}}R(yx,"bytecode",J_),R(yx,"abi",hb);const Y_=new Uint8Array([]),Vae={isConnected:!1,isVoidSignerConnected:!1,ethProvider:null,sapphireEthProvider:null,account:null,explorerBaseUrl:null,chainName:null,pollManagerVoidSigner:null},Qae=({children:t})=>{const{isEIP1193ProviderAvailable:e,connectWallet:n,switchNetwork:r}=Hae(),[i,a]=F.useState({...Vae});F.useEffect(()=>{(async()=>{if(!hC||!k6)return;const N=new ree(hC,void 0,{staticNetwork:!0}),B=await yx.connect(k6,N);a(L=>({...L,pollManagerVoidSigner:B,isVoidSignerConnected:!0}))})()},[]);const o=C=>{a(N=>({...N,isConnected:C}))},s=F.useCallback(C=>{if(C.length<=0){o(!1);return}const[N]=C;a(B=>({...B,account:N}))},[]),l=(C,N=i.sapphireEthProvider)=>{if(!N)throw new Error("[Web3Context] Sapphire provider is required!");if(!jw.has(C)||zw!==C)throw new F5("Unknown network!");const{blockExplorerUrls:B,chainName:L}=jw.get(C),[U]=B;a(j=>({...j,explorerBaseUrl:U,chainName:L}))},c=F.useCallback(()=>{window.location.reload()},[]),u=F.useCallback(()=>o(!0),[]),f=F.useCallback(()=>o(!1),[]),h=(()=>{let C=!1;return N=>{var B,L,U,j;C||((B=N==null?void 0:N.on)==null||B.call(N,"accountsChanged",s),(L=N==null?void 0:N.on)==null||L.call(N,"chainChanged",c),(U=N==null?void 0:N.on)==null||U.call(N,"connect",u),(j=N==null?void 0:N.on)==null||j.call(N,"disconnect",f),C=!0)}})(),d=async(C,N)=>{try{const B=new a$(N),L=iF(B),U=await L.getNetwork();l(U.chainId,L),a(j=>({...j,isConnected:!0,ethProvider:B,sapphireEthProvider:L,account:C}))}catch(B){throw a(L=>({...L,isConnected:!1})),B instanceof F5?B:new Error("[Web3Context] Unable to initialize providers!")}},g=async()=>{const{account:C,sapphireEthProvider:N}=i;if(!C||!N)throw new Error("[Web3Context] Unable to fetch balance!");return await N.getBalance(C)},p=async()=>e(),y=async()=>{const C=await n();if(!C)throw new Error("[Web3Context] Request account failed!");await d(C,window.ethereum),h(window.ethereum)},m=async(C=zw)=>r(C),b=async C=>{if(!C)throw new Error("[txHash] is required!");const{sapphireEthProvider:N}=i;if(!N)throw new Error("[sapphireEthProvider] not initialized!");const B=await N.waitForTransaction(C);if((B==null?void 0:B.status)===0)throw new Error("Transaction failed");return await N.getTransaction(C)},T={state:i,isProviderAvailable:p,connectWallet:y,switchNetwork:m,getBalance:g,getTransaction:b,getPoll:async()=>{const{pollManagerVoidSigner:C}=i;if(!C)throw new Error("[pollManagerWithoutSigner] not initialized!");return await C.PROPOSALS(us(Uv))},canVoteOnPoll:async()=>{const{pollManagerVoidSigner:C,account:N}=i;if(!C)throw new Error("[pollManagerVoidSigner] not initialized!");if(!N)throw new Error("[account] Wallet not connected!");return await C.canVoteOnPoll(Uv,N,Y_).then(B=>Promise.resolve(B===1n)).catch(()=>Promise.resolve(!1))},vote:async C=>{const{sapphireEthProvider:N}=i;if(!N)throw new Error("[sapphireEthProvider] not initialized!");const B=TO(await N.getSigner()),U=await yx.connect(k6,B).vote.populateTransaction(Uv,C,Y_);U.gasLimit=EK,U.value=0n;const j=await B.sendTransaction(U);return await b(j.hash)},getVoteCounts:async()=>{const{pollManagerVoidSigner:C}=i;if(!C)throw new Error("[pollManagerVoidSigner] not initialized!");return await C.getVoteCounts(Uv)}};return Z.jsx(J7.Provider,{value:T,children:t})},Kae="_cardHeaderText_937ca_1",Wae="_winningMascot_937ca_11",Jae="_winningMascotBadge_937ca_15",Yae="_mascotPollData_937ca_32",Xae="_cardFooterText_937ca_39",Zae="_mascotResultsTable_937ca_48",qae="_answerColName_937ca_65",eoe="_mascotPollDataPieChart_937ca_78",toe="_headerText_937ca_83",ws={cardHeaderText:Kae,winningMascot:Wae,winningMascotBadge:Jae,mascotPollData:Yae,cardFooterText:Xae,mascotResultsTable:Zae,answerColName:qae,mascotPollDataPieChart:eoe,headerText:toe},noe=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M232,64H208V56a16,16,0,0,0-16-16H64A16,16,0,0,0,48,56v8H24A16,16,0,0,0,8,80V96a40,40,0,0,0,40,40h3.65A80.13,80.13,0,0,0,120,191.61V216H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16H136V191.58c31.94-3.23,58.44-25.64,68.08-55.58H208a40,40,0,0,0,40-40V80A16,16,0,0,0,232,64ZM48,120A24,24,0,0,1,24,96V80H48v32q0,4,.39,8ZM232,96a24,24,0,0,1-24,24h-.5a81.81,81.81,0,0,0,.5-8.9V80h24Z"})),roe=({size:t,width:e,height:n})=>Z.jsx(ag,{size:t,width:e,height:n,children:Z.jsx(noe,{})}),ioe="_pieChart_1ctih_1",aoe="_pieChartCell_1ctih_6",X_={pieChart:ioe,pieChartCell:aoe};function uF(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e-1}var ile=rle,ale=hA;function ole(t,e){var n=this.__data__,r=ale(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var sle=ole,lle=Gse,cle=Zse,ule=tle,fle=ile,hle=sle;function dg(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e0?1:-1},zu=function(e){return dv(e)&&e.indexOf("%")===e.length-1},je=function(e){return Dce(e)&&!pv(e)},or=function(e){return je(e)||dv(e)},Fce=0,OA=function(e){var n=++Fce;return"".concat(e||"").concat(n)},la=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!je(e)&&!dv(e))return r;var a;if(zu(e)){var o=e.indexOf("%");a=n*parseFloat(e.slice(0,o))/100}else a=+e;return pv(a)&&(a=r),i&&a>n&&(a=n),a},Gh=function(e){if(!e)return null;var n=Object.keys(e);return n&&n.length?e[n[0]]:null},jce=function(e){if(!Array.isArray(e))return!1;for(var n=e.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Kce(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var uN={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},gl=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},fN=null,yE=null,FO=function t(e){if(e===fN&&Array.isArray(yE))return yE;var n=[];return F.Children.forEach(e,function(r){Yt(r)||(r8.isFragment(r)?n=n.concat(t(r.props.children)):n.push(r))}),yE=n,fN=e,n};function ss(t,e){var n=[],r=[];return Array.isArray(e)?r=e.map(function(i){return gl(i)}):r=[gl(e)],FO(t).forEach(function(i){var a=Po(i,"type.displayName")||Po(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function Ra(t,e){var n=ss(t,e);return n&&n[0]}var hN=function(e){if(!e||!e.props)return!1;var n=e.props,r=n.width,i=n.height;return!(!je(r)||r<=0||!je(i)||i<=0)},Wce=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Jce=function(e){return e&&e.type&&dv(e.type)&&Wce.indexOf(e.type)>=0},Yce=function(e,n,r,i){var a,o=(a=gE==null?void 0:gE[i])!==null&&a!==void 0?a:[];return!Ft(e)&&(i&&o.includes(n)||Hce.includes(n))||r&&UO.includes(n)},It=function(e,n,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(F.isValidElement(e)&&(i=e.props),!fg(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;Yce((s=i)===null||s===void 0?void 0:s[o],o,n,r)&&(a[o]=i[o])}),a},s8=function t(e,n){if(e===n)return!0;var r=F.Children.count(e);if(r!==F.Children.count(n))return!1;if(r===0)return!0;if(r===1)return dN(Array.isArray(e)?e[0]:e,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function tue(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function c8(t){var e=t.children,n=t.width,r=t.height,i=t.viewBox,a=t.className,o=t.style,s=t.title,l=t.desc,c=eue(t,qce),u=i||{width:n,height:r,x:0,y:0},f=On("recharts-surface",a);return Y.createElement("svg",l8({},It(c,!0,"svg"),{className:f,width:n,height:r,style:o,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),Y.createElement("title",null,s),Y.createElement("desc",null,l),e)}var nue=["children","className"];function u8(){return u8=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function iue(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var Hn=Y.forwardRef(function(t,e){var n=t.children,r=t.className,i=rue(t,nue),a=On("recharts-layer",r);return Y.createElement("g",u8({className:a},It(i,!0),{ref:e}),n)}),yl=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;ai?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++r=r?t:sue(t,e,n)}var cue=lue,uue="\\ud800-\\udfff",fue="\\u0300-\\u036f",hue="\\ufe20-\\ufe2f",due="\\u20d0-\\u20ff",pue=fue+hue+due,gue="\\ufe0e\\ufe0f",yue="\\u200d",mue=RegExp("["+yue+uue+pue+gue+"]");function vue(t){return mue.test(t)}var EF=vue;function bue(t){return t.split("")}var wue=bue,SF="\\ud800-\\udfff",xue="\\u0300-\\u036f",Aue="\\ufe20-\\ufe2f",Eue="\\u20d0-\\u20ff",Sue=xue+Aue+Eue,Pue="\\ufe0e\\ufe0f",Oue="["+SF+"]",f8="["+Sue+"]",h8="\\ud83c[\\udffb-\\udfff]",Tue="(?:"+f8+"|"+h8+")",PF="[^"+SF+"]",OF="(?:\\ud83c[\\udde6-\\uddff]){2}",TF="[\\ud800-\\udbff][\\udc00-\\udfff]",Cue="\\u200d",CF=Tue+"?",kF="["+Pue+"]?",kue="(?:"+Cue+"(?:"+[PF,OF,TF].join("|")+")"+kF+CF+")*",_ue=kF+CF+kue,Nue="(?:"+[PF+f8+"?",f8,OF,TF,Oue].join("|")+")",Iue=RegExp(h8+"(?="+h8+")|"+Nue+_ue,"g");function Rue(t){return t.match(Iue)||[]}var Mue=Rue,Bue=wue,Due=EF,Lue=Mue;function $ue(t){return Due(t)?Lue(t):Bue(t)}var Uue=$ue,Fue=cue,jue=EF,zue=Uue,Hue=mF;function Gue(t){return function(e){e=Hue(e);var n=jue(e)?zue(e):void 0,r=n?n[0]:e.charAt(0),i=n?Fue(n,1).join(""):e.slice(1);return r[t]()+i}}var Vue=Gue,Que=Vue,Kue=Que("toUpperCase"),Wue=Kue;const CA=Xt(Wue);function dn(t){return function(){return t}}const _F=Math.cos,vx=Math.sin,No=Math.sqrt,bx=Math.PI,kA=2*bx,d8=Math.PI,p8=2*d8,Su=1e-6,Jue=p8-Su;function NF(t){this._+=t[0];for(let e=1,n=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return NF;const n=10**e;return function(r){this._+=r[0];for(let i=1,a=r.length;iSu)if(!(Math.abs(f*l-c*u)>Su)||!a)this._append`L${this._x1=e},${this._y1=n}`;else{let d=r-o,g=i-s,p=l*l+c*c,y=d*d+g*g,m=Math.sqrt(p),b=Math.sqrt(h),x=a*Math.tan((d8-Math.acos((p+h-y)/(2*m*b)))/2),A=x/b,S=x/m;Math.abs(A-1)>Su&&this._append`L${e+A*u},${n+A*f}`,this._append`A${a},${a},0,0,${+(f*d>u*g)},${this._x1=e+S*l},${this._y1=n+S*c}`}}arc(e,n,r,i,a,o){if(e=+e,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=e+s,u=n+l,f=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Su||Math.abs(this._y1-u)>Su)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%p8+p8),h>Jue?this._append`A${r},${r},0,1,${f},${e-s},${n-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=u}`:h>Su&&this._append`A${r},${r},0,${+(h>=d8)},${f},${this._x1=e+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function jO(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Xue(e)}function zO(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function IF(t){this._context=t}IF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function _A(t){return new IF(t)}function RF(t){return t[0]}function MF(t){return t[1]}function BF(t,e){var n=dn(!0),r=null,i=_A,a=null,o=jO(s);t=typeof t=="function"?t:t===void 0?RF:dn(t),e=typeof e=="function"?e:e===void 0?MF:dn(e);function s(l){var c,u=(l=zO(l)).length,f,h=!1,d;for(r==null&&(a=i(d=o())),c=0;c<=u;++c)!(c=d;--g)s.point(x[g],A[g]);s.lineEnd(),s.areaEnd()}m&&(x[h]=+t(y,h,f),A[h]=+e(y,h,f),s.point(r?+r(y,h,f):x[h],n?+n(y,h,f):A[h]))}if(b)return s=null,b+""||null}function u(){return BF().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(t=typeof f=="function"?f:dn(+f),r=null,c):t},c.x0=function(f){return arguments.length?(t=typeof f=="function"?f:dn(+f),c):t},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:dn(+f),c):r},c.y=function(f){return arguments.length?(e=typeof f=="function"?f:dn(+f),n=null,c):e},c.y0=function(f){return arguments.length?(e=typeof f=="function"?f:dn(+f),c):e},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:dn(+f),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(r).y(e)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:dn(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),c):a},c}class DF{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}function Zue(t){return new DF(t,!0)}function que(t){return new DF(t,!1)}const HO={draw(t,e){const n=No(e/bx);t.moveTo(n,0),t.arc(0,0,n,0,kA)}},efe={draw(t,e){const n=No(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},LF=No(1/3),tfe=LF*2,nfe={draw(t,e){const n=No(e/tfe),r=n*LF;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},rfe={draw(t,e){const n=No(e),r=-n/2;t.rect(r,r,n,n)}},ife=.8908130915292852,$F=vx(bx/10)/vx(7*bx/10),afe=vx(kA/10)*$F,ofe=-_F(kA/10)*$F,sfe={draw(t,e){const n=No(e*ife),r=afe*n,i=ofe*n;t.moveTo(0,-n),t.lineTo(r,i);for(let a=1;a<5;++a){const o=kA*a/5,s=_F(o),l=vx(o);t.lineTo(l*n,-s*n),t.lineTo(s*r-l*i,l*r+s*i)}t.closePath()}},mE=No(3),lfe={draw(t,e){const n=-No(e/(mE*3));t.moveTo(0,n*2),t.lineTo(-mE*n,-n),t.lineTo(mE*n,-n),t.closePath()}},ya=-.5,ma=No(3)/2,g8=1/No(12),cfe=(g8/2+1)*3,ufe={draw(t,e){const n=No(e/cfe),r=n/2,i=n*g8,a=r,o=n*g8+n,s=-a,l=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(ya*r-ma*i,ma*r+ya*i),t.lineTo(ya*a-ma*o,ma*a+ya*o),t.lineTo(ya*s-ma*l,ma*s+ya*l),t.lineTo(ya*r+ma*i,ya*i-ma*r),t.lineTo(ya*a+ma*o,ya*o-ma*a),t.lineTo(ya*s+ma*l,ya*l-ma*s),t.closePath()}};function ffe(t,e){let n=null,r=jO(i);t=typeof t=="function"?t:dn(t||HO),e=typeof e=="function"?e:dn(e===void 0?64:+e);function i(){let a;if(n||(n=a=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(t=typeof a=="function"?a:dn(a),i):t},i.size=function(a){return arguments.length?(e=typeof a=="function"?a:dn(+a),i):e},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function wx(){}function xx(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function UF(t){this._context=t}UF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:xx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:xx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function hfe(t){return new UF(t)}function FF(t){this._context=t}FF.prototype={areaStart:wx,areaEnd:wx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:xx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function dfe(t){return new FF(t)}function jF(t){this._context=t}jF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:xx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function pfe(t){return new jF(t)}function zF(t){this._context=t}zF.prototype={areaStart:wx,areaEnd:wx,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function gfe(t){return new zF(t)}function gN(t){return t<0?-1:1}function yN(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(gN(a)+gN(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function mN(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function vE(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Ax(t){this._context=t}Ax.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:vE(this,this._t0,mN(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,vE(this,mN(this,n=yN(this,t,e)),n);break;default:vE(this,this._t0,n=yN(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function HF(t){this._context=new GF(t)}(HF.prototype=Object.create(Ax.prototype)).point=function(t,e){Ax.prototype.point.call(this,e,t)};function GF(t){this._context=t}GF.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}};function yfe(t){return new Ax(t)}function mfe(t){return new HF(t)}function VF(t){this._context=t}VF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=vN(t),i=vN(e),a=0,o=1;o=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function bfe(t){return new NA(t,.5)}function wfe(t){return new NA(t,0)}function xfe(t){return new NA(t,1)}function Mp(t,e){if((o=t.length)>1)for(var n=1,r,i,a=t[e[0]],o,s=a.length;n=0;)n[e]=e;return n}function Afe(t,e){return t[e]}function Efe(t){const e=[];return e.key=t,e}function Sfe(){var t=dn([]),e=y8,n=Mp,r=Afe;function i(a){var o=Array.from(t.apply(this,arguments),Efe),s,l=o.length,c=-1,u;for(const f of a)for(s=0,++c;s0){for(var n,r,i=0,a=t[0].length,o;i0){for(var n=0,r=t[e[0]],i,a=r.length;n0)||!((a=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,a,o;r=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Rfe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var QF={symbolCircle:HO,symbolCross:efe,symbolDiamond:nfe,symbolSquare:rfe,symbolStar:sfe,symbolTriangle:lfe,symbolWye:ufe},Mfe=Math.PI/180,Bfe=function(e){var n="symbol".concat(CA(e));return QF[n]||HO},Dfe=function(e,n,r){if(n==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var i=18*Mfe;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Lfe=function(e,n){QF["symbol".concat(CA(e))]=n},GO=function(e){var n=e.type,r=n===void 0?"circle":n,i=e.size,a=i===void 0?64:i,o=e.sizeType,s=o===void 0?"area":o,l=Ife(e,Cfe),c=wN(wN({},l),{},{type:r,size:a,sizeType:s}),u=function(){var y=Bfe(r),m=ffe().type(y).size(Dfe(a,s,r));return m()},f=c.className,h=c.cx,d=c.cy,g=It(c,!0);return h===+h&&d===+d&&a===+a?Y.createElement("path",m8({},g,{className:On("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(d,")"),d:u()})):null};GO.registerSymbol=Lfe;function Bp(t){"@babel/helpers - typeof";return Bp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bp(t)}function v8(){return v8=Object.assign?Object.assign.bind():function(t){for(var e=1;e`);var b=d.inactive?c:d.color;return Y.createElement("li",v8({className:y,style:f,key:"legend-item-".concat(g)},TA(r.props,d,g)),Y.createElement(c8,{width:o,height:o,viewBox:u,style:h},r.renderIcon(d)),Y.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},p?p(m,d,g):m))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Y.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}]),e}(F.PureComponent);O1(VO,"displayName","Legend");O1(VO,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Qfe=dA;function Kfe(){this.__data__=new Qfe,this.size=0}var Wfe=Kfe;function Jfe(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var Yfe=Jfe;function Xfe(t){return this.__data__.get(t)}var Zfe=Xfe;function qfe(t){return this.__data__.has(t)}var ehe=qfe,the=dA,nhe=NO,rhe=IO,ihe=200;function ahe(t,e){var n=this.__data__;if(n instanceof the){var r=n.__data__;if(!nhe||r.lengths))return!1;var c=a.get(t),u=a.get(e);if(c&&u)return c==e&&u==t;var f=-1,h=!0,d=n&The?new Ehe:void 0;for(a.set(t,e),a.set(e,t);++f-1&&t%1==0&&t-1&&t%1==0&&t<=Nde}var JO=Ide,Rde=Bl,Mde=JO,Bde=Dl,Dde="[object Arguments]",Lde="[object Array]",$de="[object Boolean]",Ude="[object Date]",Fde="[object Error]",jde="[object Function]",zde="[object Map]",Hde="[object Number]",Gde="[object Object]",Vde="[object RegExp]",Qde="[object Set]",Kde="[object String]",Wde="[object WeakMap]",Jde="[object ArrayBuffer]",Yde="[object DataView]",Xde="[object Float32Array]",Zde="[object Float64Array]",qde="[object Int8Array]",e0e="[object Int16Array]",t0e="[object Int32Array]",n0e="[object Uint8Array]",r0e="[object Uint8ClampedArray]",i0e="[object Uint16Array]",a0e="[object Uint32Array]",vn={};vn[Xde]=vn[Zde]=vn[qde]=vn[e0e]=vn[t0e]=vn[n0e]=vn[r0e]=vn[i0e]=vn[a0e]=!0;vn[Dde]=vn[Lde]=vn[Jde]=vn[$de]=vn[Yde]=vn[Ude]=vn[Fde]=vn[jde]=vn[zde]=vn[Hde]=vn[Gde]=vn[Vde]=vn[Qde]=vn[Kde]=vn[Wde]=!1;function o0e(t){return Bde(t)&&Mde(t.length)&&!!vn[Rde(t)]}var s0e=o0e;function l0e(t){return function(e){return t(e)}}var rj=l0e,Ox={exports:{}};Ox.exports;(function(t,e){var n=fF,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s})(Ox,Ox.exports);var c0e=Ox.exports,u0e=s0e,f0e=rj,CN=c0e,kN=CN&&CN.isTypedArray,h0e=kN?f0e(kN):u0e,ij=h0e,d0e=yde,p0e=KO,g0e=Fi,y0e=nj,m0e=WO,v0e=ij,b0e=Object.prototype,w0e=b0e.hasOwnProperty;function x0e(t,e){var n=g0e(t),r=!n&&p0e(t),i=!n&&!r&&y0e(t),a=!n&&!r&&!i&&v0e(t),o=n||r||i||a,s=o?d0e(t.length,String):[],l=s.length;for(var c in t)(e||w0e.call(t,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||m0e(c,l)))&&s.push(c);return s}var A0e=x0e,E0e=Object.prototype;function S0e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||E0e;return t===n}var P0e=S0e;function O0e(t,e){return function(n){return t(e(n))}}var aj=O0e,T0e=aj,C0e=T0e(Object.keys,Object),k0e=C0e,_0e=P0e,N0e=k0e,I0e=Object.prototype,R0e=I0e.hasOwnProperty;function M0e(t){if(!_0e(t))return N0e(t);var e=[];for(var n in Object(t))R0e.call(t,n)&&n!="constructor"&&e.push(n);return e}var B0e=M0e,D0e=kO,L0e=JO;function $0e(t){return t!=null&&L0e(t.length)&&!D0e(t)}var IA=$0e,U0e=A0e,F0e=B0e,j0e=IA;function z0e(t){return j0e(t)?U0e(t):F0e(t)}var YO=z0e,H0e=ide,G0e=pde,V0e=YO;function Q0e(t){return H0e(t,V0e,G0e)}var K0e=Q0e,_N=K0e,W0e=1,J0e=Object.prototype,Y0e=J0e.hasOwnProperty;function X0e(t,e,n,r,i,a){var o=n&W0e,s=_N(t),l=s.length,c=_N(e),u=c.length;if(l!=u&&!o)return!1;for(var f=l;f--;){var h=s[f];if(!(o?h in e:Y0e.call(e,h)))return!1}var d=a.get(t),g=a.get(e);if(d&&g)return d==e&&g==t;var p=!0;a.set(t,e),a.set(e,t);for(var y=o;++f-1}var Yge=Jge;function Xge(t,e,n){for(var r=-1,i=t==null?0:t.length;++r=hye){var c=e?null:uye(t);if(c)return fye(c);o=!1,i=cye,l=new oye}else l=e?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Tye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function Cye(t){return t.value}function kye(t,e){if(Y.isValidElement(t))return Y.cloneElement(t,e);if(typeof t=="function")return Y.createElement(t,e);e.ref;var n=Oye(e,bye);return Y.createElement(VO,n)}var QN=1,T1=function(t){Sye(e,t);function e(){var n;wye(this,e);for(var r=arguments.length,i=new Array(r),a=0;aQN||Math.abs(i.height-this.lastBoundingBox.height)>QN)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i))}else(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?mu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,c=i.chartWidth,u=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var d=this.getBBoxSnapshot();f={left:((c||0)-d.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();h={top:((u||0)-g.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return mu(mu({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,u=i.payload,f=mu(mu({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return Y.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(d){r.wrapperNode=d}},kye(a,mu(mu({},this.props),{},{payload:fj(u,c,Cye)})))}}],[{key:"getWithHeight",value:function(r,i){var a=r.props.layout;return a==="vertical"&&je(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}]),e}(F.PureComponent);RA(T1,"displayName","Legend");RA(T1,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var KN=hv,_ye=KO,Nye=Fi,WN=KN?KN.isConcatSpreadable:void 0;function Iye(t){return Nye(t)||_ye(t)||!!(WN&&t&&t[WN])}var Rye=Iye,Mye=ej,Bye=Rye;function gj(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=Bye),i||(i=[]);++a0&&n(s)?e>1?gj(s,e-1,n,r,i):Mye(i,s):r||(i[i.length]=s)}return i}var yj=gj;function Dye(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var l=o[t?s:++i];if(n(a[l],l,a)===!1)break}return e}}var Lye=Dye,$ye=Lye,Uye=$ye(),Fye=Uye,jye=Fye,zye=YO;function Hye(t,e){return t&&jye(t,e,zye)}var mj=Hye,Gye=IA;function Vye(t,e){return function(n,r){if(n==null)return n;if(!Gye(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++ae||a&&o&&l&&!s&&!c||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&t=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return t.index-e.index}var a1e=i1e,AE=MO,o1e=BO,s1e=cu,l1e=vj,c1e=e1e,u1e=rj,f1e=a1e,h1e=mg,d1e=Fi;function p1e(t,e,n){e.length?e=AE(e,function(a){return d1e(a)?function(o){return o1e(o,a.length===1?a[0]:a)}:a}):e=[h1e];var r=-1;e=AE(e,u1e(s1e));var i=l1e(t,function(a,o,s){var l=AE(e,function(c){return c(a)});return{criteria:l,index:++r,value:a}});return c1e(i,function(a,o){return f1e(a,o,n)})}var g1e=p1e;function y1e(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var m1e=y1e,v1e=m1e,YN=Math.max;function b1e(t,e,n){return e=YN(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=YN(r.length-e,0),o=Array(a);++i0){if(++e>=k1e)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var R1e=I1e,M1e=C1e,B1e=R1e,D1e=B1e(M1e),L1e=D1e,$1e=mg,U1e=w1e,F1e=L1e;function j1e(t,e){return F1e(U1e(t,e,$1e),t+"")}var z1e=j1e,H1e=_O,G1e=IA,V1e=WO,Q1e=lu;function K1e(t,e,n){if(!Q1e(n))return!1;var r=typeof e;return(r=="number"?G1e(n)&&V1e(e,n.length):r=="string"&&e in n)?H1e(n[e],t):!1}var MA=K1e,W1e=yj,J1e=g1e,Y1e=z1e,ZN=MA,X1e=Y1e(function(t,e){if(t==null)return[];var n=e.length;return n>1&&ZN(t,e[0],e[1])?e=[]:n>2&&ZN(e[0],e[1],e[2])&&(e=[e[0]]),J1e(t,W1e(e,1),[])}),Z1e=X1e;const qO=Xt(Z1e);function C1(t){"@babel/helpers - typeof";return C1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C1(t)}function O8(){return O8=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=e.x),"".concat(Ug,"-left"),je(n)&&e&&je(e.x)&&n=e.y),"".concat(Ug,"-top"),je(r)&&e&&je(e.y)&&rp?Math.max(u,l[r]):Math.max(f,l[r])}function dme(t){var e=t.translateX,n=t.translateY,r=t.useTranslate3d;return{transform:r?"translate3d(".concat(e,"px, ").concat(n,"px, 0)"):"translate(".concat(e,"px, ").concat(n,"px)")}}function pme(t){var e=t.allowEscapeViewBox,n=t.coordinate,r=t.offsetTopLeft,i=t.position,a=t.reverseDirection,o=t.tooltipBox,s=t.useTranslate3d,l=t.viewBox,c,u,f;return o.height>0&&o.width>0&&n?(u=tI({allowEscapeViewBox:e,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=tI({allowEscapeViewBox:e,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=dme({translateX:u,translateY:f,useTranslate3d:s})):c=fme,{cssProperties:c,cssClasses:hme({translateX:u,translateY:f,coordinate:n})}}function Lp(t){"@babel/helpers - typeof";return Lp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lp(t)}function nI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rI(t){for(var e=1;eaI||Math.abs(r.height-this.lastBoundingBox.height)>aI)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height)}else(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1)}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,c=i.children,u=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,d=i.offset,g=i.position,p=i.reverseDirection,y=i.useTranslate3d,m=i.viewBox,b=i.wrapperStyle,x=pme({allowEscapeViewBox:o,coordinate:u,offsetTopLeft:d,position:g,reverseDirection:p,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:y,viewBox:m}),A=x.cssClasses,S=x.cssProperties,E=rI(rI({transition:h&&a?"transform ".concat(s,"ms ").concat(l):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return Y.createElement("div",{tabIndex:-1,className:A,style:E,ref:function(C){r.wrapperNode=C}},c)}}]),e}(F.PureComponent),Ame=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Hf={isSsr:Ame(),get:function(e){return Hf[e]},set:function(e,n){if(typeof e=="string")Hf[e]=n;else{var r=Object.keys(e);r&&r.length&&r.forEach(function(i){Hf[i]=e[i]})}}};function $p(t){"@babel/helpers - typeof";return $p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$p(t)}function oI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function sI(t){for(var e=1;e0;return Y.createElement(xme,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:u,hasPayload:E,offset:d,position:y,reverseDirection:m,useTranslate3d:b,viewBox:x,wrapperStyle:A},Nme(c,sI(sI({},this.props),{},{payload:S})))}}]),e}(F.PureComponent);e4(Ss,"displayName","Tooltip");e4(Ss,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Hf.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Ime=ys,Rme=function(){return Ime.Date.now()},Mme=Rme,Bme=/\s/;function Dme(t){for(var e=t.length;e--&&Bme.test(t.charAt(e)););return e}var Lme=Dme,$me=Lme,Ume=/^\s+/;function Fme(t){return t&&t.slice(0,$me(t)+1).replace(Ume,"")}var jme=Fme,zme=jme,cI=lu,Hme=ug,uI=NaN,Gme=/^[-+]0x[0-9a-f]+$/i,Vme=/^0b[01]+$/i,Qme=/^0o[0-7]+$/i,Kme=parseInt;function Wme(t){if(typeof t=="number")return t;if(Hme(t))return uI;if(cI(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=cI(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=zme(t);var n=Vme.test(t);return n||Qme.test(t)?Kme(t.slice(2),n?2:8):Gme.test(t)?uI:+t}var Sj=Wme,Jme=lu,SE=Mme,fI=Sj,Yme="Expected a function",Xme=Math.max,Zme=Math.min;function qme(t,e,n){var r,i,a,o,s,l,c=0,u=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(Yme);e=fI(e)||0,Jme(n)&&(u=!!n.leading,f="maxWait"in n,a=f?Xme(fI(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h);function d(E){var T=r,C=i;return r=i=void 0,c=E,o=t.apply(C,T),o}function g(E){return c=E,s=setTimeout(m,e),u?d(E):o}function p(E){var T=E-l,C=E-c,N=e-T;return f?Zme(N,a-C):N}function y(E){var T=E-l,C=E-c;return l===void 0||T>=e||T<0||f&&C>=a}function m(){var E=SE();if(y(E))return b(E);s=setTimeout(m,p(E))}function b(E){return s=void 0,h&&r?d(E):(r=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function A(){return s===void 0?o:b(SE())}function S(){var E=SE(),T=y(E);if(r=arguments,i=this,l=E,T){if(s===void 0)return g(l);if(f)return clearTimeout(s),s=setTimeout(m,e),d(l)}return s===void 0&&(s=setTimeout(m,e)),o}return S.cancel=x,S.flush=A,S}var eve=qme,tve=eve,nve=lu,rve="Expected a function";function ive(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(rve);return nve(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),tve(t,e,{leading:r,maxWait:e,trailing:i})}var ave=ive;const Pj=Xt(ave);function _1(t){"@babel/helpers - typeof";return _1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_1(t)}function hI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function yb(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&(j=Pj(j,p,{trailing:!0,leading:!1}));var X=new ResizeObserver(j),G=S.current.getBoundingClientRect(),H=G.width,re=G.height;return L(H,re),X.observe(S.current),function(){X.disconnect()}},[L,p]);var U=F.useMemo(function(){var j=N.containerWidth,X=N.containerHeight;if(j<0||X<0)return null;yl(zu(o)||zu(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,l),yl(!n||n>0,"The aspect(%s) must be greater than zero.",n);var G=zu(o)?j:o,H=zu(l)?X:l;n&&n>0&&(G?H=G/n:H&&(G=H*n),h&&H>h&&(H=h)),yl(G>0||H>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,G,H,o,l,u,f,n);var re=!Array.isArray(d)&&r8.isElement(d)&&gl(d.type).endsWith("Chart");return Y.Children.map(d,function(V){return r8.isElement(V)?F.cloneElement(V,yb({width:G,height:H},re?{style:yb({height:"100%",width:"100%",maxHeight:H,maxWidth:G},V.props.style)}:{})):V})},[n,d,l,h,f,u,N,o]);return Y.createElement("div",{id:y?"".concat(y):void 0,className:On("recharts-responsive-container",m),style:yb(yb({},A),{},{width:o,height:l,minWidth:u,minHeight:f,maxHeight:h}),ref:S},U)}),t4=function(e){return null};t4.displayName="Cell";function N1(t){"@babel/helpers - typeof";return N1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N1(t)}function pI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function k8(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||Hf.isSsr)return{width:0,height:0};var r=wve(n),i=JSON.stringify({text:e,copyStyle:r});if(Ih.widthCache[i])return Ih.widthCache[i];try{var a=document.getElementById(gI);a||(a=document.createElement("span"),a.setAttribute("id",gI),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=k8(k8({},bve),r);Object.assign(a.style,o),a.textContent="".concat(e);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return Ih.widthCache[i]=l,++Ih.cacheCount>vve&&(Ih.cacheCount=0,Ih.widthCache={}),l}catch{return{width:0,height:0}}},xve=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function I1(t){"@babel/helpers - typeof";return I1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I1(t)}function _x(t,e){return Pve(t)||Sve(t,e)||Eve(t,e)||Ave()}function Ave(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eve(t,e){if(t){if(typeof t=="string")return mI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mI(t,e)}}function mI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Uve(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function EI(t,e){return Hve(t)||zve(t,e)||jve(t,e)||Fve()}function Fve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jve(t,e){if(t){if(typeof t=="string")return SI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SI(t,e)}}function SI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function(H,re){var V=re.word,ee=re.width,pe=H[H.length-1];if(pe&&(i==null||a||pe.width+ee+rre.width?H:re})};if(!u)return d;for(var p="…",y=function(G){var H=f.slice(0,G),re=kj({breakAll:c,style:l,children:H+p}).wordsWithComputedWidth,V=h(re),ee=V.length>o||g(V).width>Number(i);return[ee,V]},m=0,b=f.length-1,x=0,A;m<=b&&x<=f.length-1;){var S=Math.floor((m+b)/2),E=S-1,T=y(E),C=EI(T,2),N=C[0],B=C[1],L=y(S),U=EI(L,1),j=U[0];if(!N&&!j&&(m=S+1),N&&j&&(b=S-1),!N&&j){A=B;break}x++}return A||d},PI=function(e){var n=Yt(e)?[]:e.toString().split(Cj);return[{words:n}]},Vve=function(e){var n=e.width,r=e.scaleToFit,i=e.children,a=e.style,o=e.breakAll,s=e.maxLines;if((n||r)&&!Hf.isSsr){var l,c,u=kj({breakAll:o,children:i,style:a});if(u){var f=u.wordsWithComputedWidth,h=u.spaceWidth;l=f,c=h}else return PI(i);return Gve({breakAll:o,children:i,maxLines:s,style:a},l,c,n,r)}return PI(i)},OI="#808080",Up=function(e){var n=e.x,r=n===void 0?0:n,i=e.y,a=i===void 0?0:i,o=e.lineHeight,s=o===void 0?"1em":o,l=e.capHeight,c=l===void 0?"0.71em":l,u=e.scaleToFit,f=u===void 0?!1:u,h=e.textAnchor,d=h===void 0?"start":h,g=e.verticalAnchor,p=g===void 0?"end":g,y=e.fill,m=y===void 0?OI:y,b=AI(e,Lve),x=F.useMemo(function(){return Vve({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),A=b.dx,S=b.dy,E=b.angle,T=b.className,C=b.breakAll,N=AI(b,$ve);if(!or(r)||!or(a))return null;var B=r+(je(A)?A:0),L=a+(je(S)?S:0),U;switch(p){case"start":U=PE("calc(".concat(c,")"));break;case"middle":U=PE("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:U=PE("calc(".concat(x.length-1," * -").concat(s,")"));break}var j=[];if(f){var X=x[0].width,G=b.width;j.push("scale(".concat((je(G)?G/X:1)/X,")"))}return E&&j.push("rotate(".concat(E,", ").concat(B,", ").concat(L,")")),j.length&&(N.transform=j.join(" ")),Y.createElement("text",_8({},It(N,!0),{x:B,y:L,className:On("recharts-text",T),textAnchor:d,fill:m.includes("url")?OI:m}),x.map(function(H,re){var V=H.words.join(C?"":" ");return Y.createElement("tspan",{x:B,dy:re===0?U:s,key:V},V)}))};function Yc(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function Qve(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function n4(t){let e,n,r;t.length!==2?(e=Yc,n=(s,l)=>Yc(t(s),l),r=(s,l)=>t(s)-l):(e=t===Yc||t===Qve?t:Kve,n=t,r=t);function i(s,l,c=0,u=s.length){if(c>>1;n(s[f],l)<0?c=f+1:u=f}while(c>>1;n(s[f],l)<=0?c=f+1:u=f}while(cc&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function Kve(){return 0}function _j(t){return t===null?NaN:+t}function*Wve(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const Jve=n4(Yc),gv=Jve.right;n4(_j).center;class TI extends Map{constructor(e,n=Zve){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(CI(this,e))}has(e){return super.has(CI(this,e))}set(e,n){return super.set(Yve(this,e),n)}delete(e){return super.delete(Xve(this,e))}}function CI({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Yve({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Xve({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Zve(t){return t!==null&&typeof t=="object"?t.valueOf():t}function qve(t=Yc){if(t===Yc)return Nj;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Nj(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(te?1:0)}const ebe=Math.sqrt(50),tbe=Math.sqrt(10),nbe=Math.sqrt(2);function Nx(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=ebe?10:a>=tbe?5:a>=nbe?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(t*c),l=Math.round(e*c),s/ce&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(t/c),l=Math.round(e/c),s*ce&&--l),l0))return[];if(t===e)return[t];const r=e=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let c=0;c=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function _I(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ij(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Nj:qve(i);r>n;){if(r-n>600){const l=r-n+1,c=e-n+1,u=Math.log(l),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),d=Math.max(n,Math.floor(e-c*f/l+h)),g=Math.min(r,Math.floor(e+(l-c)*f/l+h));Ij(t,e,d,g,i)}const a=t[e];let o=n,s=r;for(Fg(t,n,e),i(t[r],a)>0&&Fg(t,n,r);o0;)--s}i(t[n],a)===0?Fg(t,n,s):(++s,Fg(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Fg(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function rbe(t,e,n){if(t=Float64Array.from(Wve(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return _I(t);if(e>=1)return kI(t);var r,i=(r-1)*e,a=Math.floor(i),o=kI(Ij(t,a).subarray(0,a+1)),s=_I(t.subarray(a+1));return o+(s-o)*(i-a)}}function ibe(t,e,n=_j){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t),s=+n(t[a+1],a+1,t);return o+(s-o)*(i-a)}}function abe(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,a=new Array(i);++r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?vb(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?vb(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=sbe.exec(t))?new Ii(e[1],e[2],e[3],1):(e=lbe.exec(t))?new Ii(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=cbe.exec(t))?vb(e[1],e[2],e[3],e[4]):(e=ube.exec(t))?vb(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=fbe.exec(t))?LI(e[1],e[2]/100,e[3]/100,1):(e=hbe.exec(t))?LI(e[1],e[2]/100,e[3]/100,e[4]):NI.hasOwnProperty(t)?MI(NI[t]):t==="transparent"?new Ii(NaN,NaN,NaN,0):null}function MI(t){return new Ii(t>>16&255,t>>8&255,t&255,1)}function vb(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ii(t,e,n,r)}function gbe(t){return t instanceof yv||(t=D1(t)),t?(t=t.rgb(),new Ii(t.r,t.g,t.b,t.opacity)):new Ii}function B8(t,e,n,r){return arguments.length===1?gbe(t):new Ii(t,e,n,r??1)}function Ii(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}i4(Ii,B8,Mj(yv,{brighter(t){return t=t==null?Ix:Math.pow(Ix,t),new Ii(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?M1:Math.pow(M1,t),new Ii(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ii(Gf(this.r),Gf(this.g),Gf(this.b),Rx(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:BI,formatHex:BI,formatHex8:ybe,formatRgb:DI,toString:DI}));function BI(){return`#${Hu(this.r)}${Hu(this.g)}${Hu(this.b)}`}function ybe(){return`#${Hu(this.r)}${Hu(this.g)}${Hu(this.b)}${Hu((isNaN(this.opacity)?1:this.opacity)*255)}`}function DI(){const t=Rx(this.opacity);return`${t===1?"rgb(":"rgba("}${Gf(this.r)}, ${Gf(this.g)}, ${Gf(this.b)}${t===1?")":`, ${t})`}`}function Rx(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gf(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Hu(t){return t=Gf(t),(t<16?"0":"")+t.toString(16)}function LI(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xo(t,e,n,r)}function Bj(t){if(t instanceof xo)return new xo(t.h,t.s,t.l,t.opacity);if(t instanceof yv||(t=D1(t)),!t)return new xo;if(t instanceof xo)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(e===a?o=(n-r)/s+(n0&&l<1?0:o,new xo(o,s,l,t.opacity)}function mbe(t,e,n,r){return arguments.length===1?Bj(t):new xo(t,e,n,r??1)}function xo(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}i4(xo,mbe,Mj(yv,{brighter(t){return t=t==null?Ix:Math.pow(Ix,t),new xo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?M1:Math.pow(M1,t),new xo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ii(OE(t>=240?t-240:t+120,i,r),OE(t,i,r),OE(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new xo($I(this.h),bb(this.s),bb(this.l),Rx(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Rx(this.opacity);return`${t===1?"hsl(":"hsla("}${$I(this.h)}, ${bb(this.s)*100}%, ${bb(this.l)*100}%${t===1?")":`, ${t})`}`}}));function $I(t){return t=(t||0)%360,t<0?t+360:t}function bb(t){return Math.max(0,Math.min(1,t||0))}function OE(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const a4=t=>()=>t;function vbe(t,e){return function(n){return t+n*e}}function bbe(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function wbe(t){return(t=+t)==1?Dj:function(e,n){return n-e?bbe(e,n,t):a4(isNaN(e)?n:e)}}function Dj(t,e){var n=e-t;return n?vbe(t,n):a4(isNaN(t)?e:t)}const UI=function t(e){var n=wbe(e);function r(i,a){var o=n((i=B8(i)).r,(a=B8(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),c=Dj(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=t,r}(1);function xbe(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(a){for(i=0;in&&(a=e.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Mx(r,i)})),n=TE.lastIndex;return ne&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Ibe(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i2?Rbe:Ibe,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?a:(l||(l=s(t.map(r),e,n)))(r(o(h)))}return f.invert=function(h){return o(i((c||(c=s(e,t.map(r),Mx)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Bx),u()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),u()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=o4,u()},f.clamp=function(h){return arguments.length?(o=h?!0:di,u()):o!==di},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,d){return r=h,i=d,u()}}function s4(){return BA()(di,di)}function Mbe(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Dx(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Fp(t){return t=Dx(Math.abs(t)),t?t[1]:NaN}function Bbe(t,e){return function(n,r){for(var i=n.length,a=[],o=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function Dbe(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Lbe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function L1(t){if(!(e=Lbe.exec(t)))throw new Error("invalid format: "+t);var e;return new l4({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}L1.prototype=l4.prototype;function l4(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}l4.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $be(t){e:for(var e=t.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Lj;function Ube(t,e){var n=Dx(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Lj=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Dx(t,Math.max(0,e+a-1))[0]}function jI(t,e){var n=Dx(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const zI={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Mbe,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>jI(t*100,e),r:jI,s:Ube,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function HI(t){return t}var GI=Array.prototype.map,VI=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Fbe(t){var e=t.grouping===void 0||t.thousands===void 0?HI:Bbe(GI.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?HI:Dbe(GI.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(f){f=L1(f);var h=f.fill,d=f.align,g=f.sign,p=f.symbol,y=f.zero,m=f.width,b=f.comma,x=f.precision,A=f.trim,S=f.type;S==="n"?(b=!0,S="g"):zI[S]||(x===void 0&&(x=12),A=!0,S="g"),(y||h==="0"&&d==="=")&&(y=!0,h="0",d="=");var E=p==="$"?n:p==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",T=p==="$"?r:/[%p]/.test(S)?o:"",C=zI[S],N=/[defgprs%]/.test(S);x=x===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function B(L){var U=E,j=T,X,G,H;if(S==="c")j=C(L)+j,L="";else{L=+L;var re=L<0||1/L<0;if(L=isNaN(L)?l:C(Math.abs(L),x),A&&(L=$be(L)),re&&+L==0&&g!=="+"&&(re=!1),U=(re?g==="("?g:s:g==="-"||g==="("?"":g)+U,j=(S==="s"?VI[8+Lj/3]:"")+j+(re&&g==="("?")":""),N){for(X=-1,G=L.length;++XH||H>57){j=(H===46?i+L.slice(X+1):L.slice(X))+j,L=L.slice(0,X);break}}}b&&!y&&(L=e(L,1/0));var V=U.length+L.length+j.length,ee=V>1)+U+L+j+ee.slice(V);break;default:L=ee+U+L+j;break}return a(L)}return B.toString=function(){return f+""},B}function u(f,h){var d=c((f=L1(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Fp(h)/3)))*3,p=Math.pow(10,-g),y=VI[8+g/3];return function(m){return d(p*m)+y}}return{format:c,formatPrefix:u}}var wb,c4,$j;jbe({thousands:",",grouping:[3],currency:["$",""]});function jbe(t){return wb=Fbe(t),c4=wb.format,$j=wb.formatPrefix,wb}function zbe(t){return Math.max(0,-Fp(Math.abs(t)))}function Hbe(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Fp(e)/3)))*3-Fp(Math.abs(t)))}function Gbe(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Fp(e)-Fp(t))+1}function Uj(t,e,n,r){var i=R8(t,e,n),a;switch(r=L1(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(a=Hbe(i,o))&&(r.precision=a),$j(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Gbe(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=zbe(i))&&(r.precision=a-(r.type==="%")*2);break}}return c4(r)}function uu(t){var e=t.domain;return t.ticks=function(n){var r=e();return N8(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Uj(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,a=r.length-1,o=r[i],s=r[a],l,c,u=10;for(s0;){if(c=I8(o,s,n),c===l)return r[i]=o,r[a]=s,e(r);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return t},t}function Lx(){var t=s4();return t.copy=function(){return mv(t,Lx())},Ka.apply(t,arguments),uu(t)}function Fj(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Bx),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Fj(t).unknown(e)},t=arguments.length?Array.from(t,Bx):[0,1],uu(n)}function jj(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],a=t[r],o;return aMath.pow(t,e)}function Jbe(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function WI(t){return(e,n)=>-t(-e,n)}function u4(t){const e=t(QI,KI),n=e.domain;let r=10,i,a;function o(){return i=Jbe(r),a=Wbe(r),n()[0]<0?(i=WI(i),a=WI(a),t(Vbe,Qbe)):t(QI,KI),e}return e.base=function(s){return arguments.length?(r=+s,o()):r},e.domain=function(s){return arguments.length?(n(s),o()):n()},e.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const f=u0){for(;h<=d;++h)for(g=1;gu)break;m.push(p)}}else for(;h<=d;++h)for(g=r-1;g>=1;--g)if(p=h>0?g/a(-h):g*a(h),!(pu)break;m.push(p)}m.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=L1(l)).precision==null&&(l.trim=!0),l=c4(l)),s===1/0)return l;const c=Math.max(1,r*s/e.ticks().length);return u=>{let f=u/a(Math.round(i(u)));return f*rn(jj(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),e}function zj(){const t=u4(BA()).domain([1,10]);return t.copy=()=>mv(t,zj()).base(t.base()),Ka.apply(t,arguments),t}function JI(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function YI(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function f4(t){var e=1,n=t(JI(e),YI(e));return n.constant=function(r){return arguments.length?t(JI(e=+r),YI(e)):e},uu(n)}function Hj(){var t=f4(BA());return t.copy=function(){return mv(t,Hj()).constant(t.constant())},Ka.apply(t,arguments)}function XI(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Ybe(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Xbe(t){return t<0?-t*t:t*t}function h4(t){var e=t(di,di),n=1;function r(){return n===1?t(di,di):n===.5?t(Ybe,Xbe):t(XI(n),XI(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},uu(e)}function d4(){var t=h4(BA());return t.copy=function(){return mv(t,d4()).exponent(t.exponent())},Ka.apply(t,arguments),t}function Zbe(){return d4.apply(null,arguments).exponent(.5)}function ZI(t){return Math.sign(t)*t*t}function qbe(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Gj(){var t=s4(),e=[0,1],n=!1,r;function i(a){var o=qbe(t(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return t.invert(ZI(a))},i.domain=function(a){return arguments.length?(t.domain(a),i):t.domain()},i.range=function(a){return arguments.length?(t.range((e=Array.from(a,Bx)).map(ZI)),i):e.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(t.clamp(a),i):t.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Gj(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},Ka.apply(i,arguments),uu(i)}function Vj(){var t=[],e=[],n=[],r;function i(){var o=0,s=Math.max(1,e.length);for(n=new Array(s-1);++o0?n[s-1]:t[0],s=n?[r[n-1],e]:[r[c-1],r[c]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Qj().domain([t,e]).range(i).unknown(a)},Ka.apply(uu(o),arguments)}function Kj(){var t=[.5],e=[0,1],n,r=1;function i(a){return a!=null&&a<=a?e[gv(t,a,0,r)]:n}return i.domain=function(a){return arguments.length?(t=Array.from(a),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(a){return arguments.length?(e=Array.from(a),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(a){var o=e.indexOf(a);return[t[o-1],t[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Kj().domain(t).range(e).unknown(n)},Ka.apply(i,arguments)}const CE=new Date,kE=new Date;function lr(t,e,n,r){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(e(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let c;do l.push(c=new Date(+a)),e(a,s),t(a);while(clr(o=>{if(o>=o)for(;t(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;e(o,-1),!a(o););else for(;--s>=0;)for(;e(o,1),!a(o););}),n&&(i.count=(a,o)=>(CE.setTime(+a),kE.setTime(+o),t(CE),t(kE),Math.floor(n(CE,kE))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const $x=lr(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);$x.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?lr(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):$x);$x.range;const ll=1e3,Fa=ll*60,cl=Fa*60,Tl=cl*24,p4=Tl*7,qI=Tl*30,_E=Tl*365,Gu=lr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ll)},(t,e)=>(e-t)/ll,t=>t.getUTCSeconds());Gu.range;const g4=lr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ll)},(t,e)=>{t.setTime(+t+e*Fa)},(t,e)=>(e-t)/Fa,t=>t.getMinutes());g4.range;const y4=lr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Fa)},(t,e)=>(e-t)/Fa,t=>t.getUTCMinutes());y4.range;const m4=lr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ll-t.getMinutes()*Fa)},(t,e)=>{t.setTime(+t+e*cl)},(t,e)=>(e-t)/cl,t=>t.getHours());m4.range;const v4=lr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*cl)},(t,e)=>(e-t)/cl,t=>t.getUTCHours());v4.range;const vv=lr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Fa)/Tl,t=>t.getDate()-1);vv.range;const DA=lr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Tl,t=>t.getUTCDate()-1);DA.range;const Wj=lr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Tl,t=>Math.floor(t/Tl));Wj.range;function Ah(t){return lr(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Fa)/p4)}const LA=Ah(0),Ux=Ah(1),ewe=Ah(2),twe=Ah(3),jp=Ah(4),nwe=Ah(5),rwe=Ah(6);LA.range;Ux.range;ewe.range;twe.range;jp.range;nwe.range;rwe.range;function Eh(t){return lr(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/p4)}const $A=Eh(0),Fx=Eh(1),iwe=Eh(2),awe=Eh(3),zp=Eh(4),owe=Eh(5),swe=Eh(6);$A.range;Fx.range;iwe.range;awe.range;zp.range;owe.range;swe.range;const b4=lr(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());b4.range;const w4=lr(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());w4.range;const Cl=lr(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Cl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:lr(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});Cl.range;const kl=lr(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());kl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:lr(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});kl.range;function Jj(t,e,n,r,i,a){const o=[[Gu,1,ll],[Gu,5,5*ll],[Gu,15,15*ll],[Gu,30,30*ll],[a,1,Fa],[a,5,5*Fa],[a,15,15*Fa],[a,30,30*Fa],[i,1,cl],[i,3,3*cl],[i,6,6*cl],[i,12,12*cl],[r,1,Tl],[r,2,2*Tl],[n,1,p4],[e,1,qI],[e,3,3*qI],[t,1,_E]];function s(c,u,f){const h=uy).right(o,h);if(d===o.length)return t.every(R8(c/_E,u/_E,f));if(d===0)return $x.every(Math.max(R8(c,u,f),1));const[g,p]=o[h/o[d-1][2]53)return null;"w"in te||(te.w=1),"Z"in te?(Se=IE(jg(te.y,0,1)),ze=Se.getUTCDay(),Se=ze>4||ze===0?Fx.ceil(Se):Fx(Se),Se=DA.offset(Se,(te.V-1)*7),te.y=Se.getUTCFullYear(),te.m=Se.getUTCMonth(),te.d=Se.getUTCDate()+(te.w+6)%7):(Se=NE(jg(te.y,0,1)),ze=Se.getDay(),Se=ze>4||ze===0?Ux.ceil(Se):Ux(Se),Se=vv.offset(Se,(te.V-1)*7),te.y=Se.getFullYear(),te.m=Se.getMonth(),te.d=Se.getDate()+(te.w+6)%7)}else("W"in te||"U"in te)&&("w"in te||(te.w="u"in te?te.u%7:"W"in te?1:0),ze="Z"in te?IE(jg(te.y,0,1)).getUTCDay():NE(jg(te.y,0,1)).getDay(),te.m=0,te.d="W"in te?(te.w+6)%7+te.W*7-(ze+5)%7:te.w+te.U*7-(ze+6)%7);return"Z"in te?(te.H+=te.Z/100|0,te.M+=te.Z%100,IE(te)):NE(te)}}function C(Ee,ne,le,te){for(var Ce=0,Se=ne.length,ze=le.length,$e,rt;Ce=ze)return-1;if($e=ne.charCodeAt(Ce++),$e===37){if($e=ne.charAt(Ce++),rt=S[$e in e9?ne.charAt(Ce++):$e],!rt||(te=rt(Ee,le,te))<0)return-1}else if($e!=le.charCodeAt(te++))return-1}return te}function N(Ee,ne,le){var te=c.exec(ne.slice(le));return te?(Ee.p=u.get(te[0].toLowerCase()),le+te[0].length):-1}function B(Ee,ne,le){var te=d.exec(ne.slice(le));return te?(Ee.w=g.get(te[0].toLowerCase()),le+te[0].length):-1}function L(Ee,ne,le){var te=f.exec(ne.slice(le));return te?(Ee.w=h.get(te[0].toLowerCase()),le+te[0].length):-1}function U(Ee,ne,le){var te=m.exec(ne.slice(le));return te?(Ee.m=b.get(te[0].toLowerCase()),le+te[0].length):-1}function j(Ee,ne,le){var te=p.exec(ne.slice(le));return te?(Ee.m=y.get(te[0].toLowerCase()),le+te[0].length):-1}function X(Ee,ne,le){return C(Ee,e,ne,le)}function G(Ee,ne,le){return C(Ee,n,ne,le)}function H(Ee,ne,le){return C(Ee,r,ne,le)}function re(Ee){return o[Ee.getDay()]}function V(Ee){return a[Ee.getDay()]}function ee(Ee){return l[Ee.getMonth()]}function pe(Ee){return s[Ee.getMonth()]}function Ae(Ee){return i[+(Ee.getHours()>=12)]}function we(Ee){return 1+~~(Ee.getMonth()/3)}function Ye(Ee){return o[Ee.getUTCDay()]}function nt(Ee){return a[Ee.getUTCDay()]}function De(Ee){return l[Ee.getUTCMonth()]}function st(Ee){return s[Ee.getUTCMonth()]}function Tt(Ee){return i[+(Ee.getUTCHours()>=12)]}function ln(Ee){return 1+~~(Ee.getUTCMonth()/3)}return{format:function(Ee){var ne=E(Ee+="",x);return ne.toString=function(){return Ee},ne},parse:function(Ee){var ne=T(Ee+="",!1);return ne.toString=function(){return Ee},ne},utcFormat:function(Ee){var ne=E(Ee+="",A);return ne.toString=function(){return Ee},ne},utcParse:function(Ee){var ne=T(Ee+="",!0);return ne.toString=function(){return Ee},ne}}}var e9={"-":"",_:" ",0:"0"},mr=/^\s*\d+/,dwe=/^%/,pwe=/[\\^$*+?|[\]().{}]/g;function en(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a[e.toLowerCase(),n]))}function ywe(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function mwe(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function vwe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function bwe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function wwe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function t9(t,e,n){var r=mr.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function n9(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function xwe(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Awe(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Ewe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function r9(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Swe(t,e,n){var r=mr.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function i9(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Pwe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Owe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Twe(t,e,n){var r=mr.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Cwe(t,e,n){var r=mr.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function kwe(t,e,n){var r=dwe.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function _we(t,e,n){var r=mr.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Nwe(t,e,n){var r=mr.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function a9(t,e){return en(t.getDate(),e,2)}function Iwe(t,e){return en(t.getHours(),e,2)}function Rwe(t,e){return en(t.getHours()%12||12,e,2)}function Mwe(t,e){return en(1+vv.count(Cl(t),t),e,3)}function Yj(t,e){return en(t.getMilliseconds(),e,3)}function Bwe(t,e){return Yj(t,e)+"000"}function Dwe(t,e){return en(t.getMonth()+1,e,2)}function Lwe(t,e){return en(t.getMinutes(),e,2)}function $we(t,e){return en(t.getSeconds(),e,2)}function Uwe(t){var e=t.getDay();return e===0?7:e}function Fwe(t,e){return en(LA.count(Cl(t)-1,t),e,2)}function Xj(t){var e=t.getDay();return e>=4||e===0?jp(t):jp.ceil(t)}function jwe(t,e){return t=Xj(t),en(jp.count(Cl(t),t)+(Cl(t).getDay()===4),e,2)}function zwe(t){return t.getDay()}function Hwe(t,e){return en(Ux.count(Cl(t)-1,t),e,2)}function Gwe(t,e){return en(t.getFullYear()%100,e,2)}function Vwe(t,e){return t=Xj(t),en(t.getFullYear()%100,e,2)}function Qwe(t,e){return en(t.getFullYear()%1e4,e,4)}function Kwe(t,e){var n=t.getDay();return t=n>=4||n===0?jp(t):jp.ceil(t),en(t.getFullYear()%1e4,e,4)}function Wwe(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+en(e/60|0,"0",2)+en(e%60,"0",2)}function o9(t,e){return en(t.getUTCDate(),e,2)}function Jwe(t,e){return en(t.getUTCHours(),e,2)}function Ywe(t,e){return en(t.getUTCHours()%12||12,e,2)}function Xwe(t,e){return en(1+DA.count(kl(t),t),e,3)}function Zj(t,e){return en(t.getUTCMilliseconds(),e,3)}function Zwe(t,e){return Zj(t,e)+"000"}function qwe(t,e){return en(t.getUTCMonth()+1,e,2)}function exe(t,e){return en(t.getUTCMinutes(),e,2)}function txe(t,e){return en(t.getUTCSeconds(),e,2)}function nxe(t){var e=t.getUTCDay();return e===0?7:e}function rxe(t,e){return en($A.count(kl(t)-1,t),e,2)}function qj(t){var e=t.getUTCDay();return e>=4||e===0?zp(t):zp.ceil(t)}function ixe(t,e){return t=qj(t),en(zp.count(kl(t),t)+(kl(t).getUTCDay()===4),e,2)}function axe(t){return t.getUTCDay()}function oxe(t,e){return en(Fx.count(kl(t)-1,t),e,2)}function sxe(t,e){return en(t.getUTCFullYear()%100,e,2)}function lxe(t,e){return t=qj(t),en(t.getUTCFullYear()%100,e,2)}function cxe(t,e){return en(t.getUTCFullYear()%1e4,e,4)}function uxe(t,e){var n=t.getUTCDay();return t=n>=4||n===0?zp(t):zp.ceil(t),en(t.getUTCFullYear()%1e4,e,4)}function fxe(){return"+0000"}function s9(){return"%"}function l9(t){return+t}function c9(t){return Math.floor(+t/1e3)}var Rh,ez,tz;hxe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function hxe(t){return Rh=hwe(t),ez=Rh.format,Rh.parse,tz=Rh.utcFormat,Rh.utcParse,Rh}function dxe(t){return new Date(t)}function pxe(t){return t instanceof Date?+t:+new Date(+t)}function x4(t,e,n,r,i,a,o,s,l,c){var u=s4(),f=u.invert,h=u.domain,d=c(".%L"),g=c(":%S"),p=c("%I:%M"),y=c("%I %p"),m=c("%a %d"),b=c("%b %d"),x=c("%B"),A=c("%Y");function S(E){return(l(E)e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>rbe(t,a/r))},n.copy=function(){return az(e).domain(t)},Ll.apply(n,arguments)}function FA(){var t=0,e=.5,n=1,r=1,i,a,o,s,l,c=di,u,f=!1,h;function d(p){return isNaN(p=+p)?h:(p=.5+((p=+u(p))-a)*(r*pe}var cz=xxe,Axe=jA,Exe=cz,Sxe=mg;function Pxe(t){return t&&t.length?Axe(t,Sxe,Exe):void 0}var Oxe=Pxe;const zA=Xt(Oxe);function Txe(t,e){return tt.e^a.s<0?1:-1;for(r=a.d.length,i=t.d.length,e=0,n=rt.d[e]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};We.decimalPlaces=We.dp=function(){var t=this,e=t.d.length-1,n=(e-t.e)*bn;if(e=t.d[e],e)for(;e%10==0;e/=10)n--;return n<0?0:n};We.dividedBy=We.div=function(t){return ml(this,new this.constructor(t))};We.dividedToIntegerBy=We.idiv=function(t){var e=this,n=e.constructor;return hn(ml(e,new n(t),0,1),n.precision)};We.equals=We.eq=function(t){return!this.cmp(t)};We.exponent=function(){return tr(this)};We.greaterThan=We.gt=function(t){return this.cmp(t)>0};We.greaterThanOrEqualTo=We.gte=function(t){return this.cmp(t)>=0};We.isInteger=We.isint=function(){return this.e>this.d.length-2};We.isNegative=We.isneg=function(){return this.s<0};We.isPositive=We.ispos=function(){return this.s>0};We.isZero=function(){return this.s===0};We.lessThan=We.lt=function(t){return this.cmp(t)<0};We.lessThanOrEqualTo=We.lte=function(t){return this.cmp(t)<1};We.logarithm=We.log=function(t){var e,n=this,r=n.constructor,i=r.precision,a=i+5;if(t===void 0)t=new r(10);else if(t=new r(t),t.s<1||t.eq(ia))throw Error(Va+"NaN");if(n.s<1)throw Error(Va+(n.s?"NaN":"-Infinity"));return n.eq(ia)?new r(0):(Pn=!1,e=ml($1(n,a),$1(t,a),a),Pn=!0,hn(e,i))};We.minus=We.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?pz(e,t):hz(e,(t.s=-t.s,t))};We.modulo=We.mod=function(t){var e,n=this,r=n.constructor,i=r.precision;if(t=new r(t),!t.s)throw Error(Va+"NaN");return n.s?(Pn=!1,e=ml(n,t,0,1).times(t),Pn=!0,n.minus(e)):hn(new r(n),i)};We.naturalExponential=We.exp=function(){return dz(this)};We.naturalLogarithm=We.ln=function(){return $1(this)};We.negated=We.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};We.plus=We.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?hz(e,t):pz(e,(t.s=-t.s,t))};We.precision=We.sd=function(t){var e,n,r,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Vf+t);if(e=tr(i)+1,r=i.d.length-1,n=r*bn+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return t&&e>n?e:n};We.squareRoot=We.sqrt=function(){var t,e,n,r,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Va+"NaN")}for(t=tr(s),Pn=!1,i=Math.sqrt(+s),i==0||i==1/0?(e=rs(s.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=wg((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),r=new l(e)):r=new l(i.toString()),n=l.precision,i=o=n+3;;)if(a=r,r=a.plus(ml(s,a,o+2)).times(.5),rs(a.d).slice(0,o)===(e=rs(r.d)).slice(0,o)){if(e=e.slice(o-3,o+1),i==o&&e=="4999"){if(hn(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(e!="9999")break;o+=4}return Pn=!0,hn(r,n)};We.times=We.mul=function(t){var e,n,r,i,a,o,s,l,c,u=this,f=u.constructor,h=u.d,d=(t=new f(t)).d;if(!u.s||!t.s)return new f(0);for(t.s*=u.s,n=u.e+t.e,l=h.length,c=d.length,l=0;){for(e=0,i=l+r;i>r;)s=a[i]+d[r]*h[i-r-1]+e,a[i--]=s%fr|0,e=s/fr|0;a[i]=(a[i]+e)%fr|0}for(;!a[--o];)a.pop();return e?++n:a.shift(),t.d=a,t.e=n,Pn?hn(t,f.precision):t};We.toDecimalPlaces=We.todp=function(t,e){var n=this,r=n.constructor;return n=new r(n),t===void 0?n:(ds(t,0,bg),e===void 0?e=r.rounding:ds(e,0,8),hn(n,t+tr(n)+1,e))};We.toExponential=function(t,e){var n,r=this,i=r.constructor;return t===void 0?n=fh(r,!0):(ds(t,0,bg),e===void 0?e=i.rounding:ds(e,0,8),r=hn(new i(r),t+1,e),n=fh(r,!0,t+1)),n};We.toFixed=function(t,e){var n,r,i=this,a=i.constructor;return t===void 0?fh(i):(ds(t,0,bg),e===void 0?e=a.rounding:ds(e,0,8),r=hn(new a(i),t+tr(i)+1,e),n=fh(r.abs(),!1,t+tr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};We.toInteger=We.toint=function(){var t=this,e=t.constructor;return hn(new e(t),tr(t)+1,e.rounding)};We.toNumber=function(){return+this};We.toPower=We.pow=function(t){var e,n,r,i,a,o,s=this,l=s.constructor,c=12,u=+(t=new l(t));if(!t.s)return new l(ia);if(s=new l(s),!s.s){if(t.s<1)throw Error(Va+"Infinity");return s}if(s.eq(ia))return s;if(r=l.precision,t.eq(ia))return hn(s,r);if(e=t.e,n=t.d.length-1,o=e>=n,a=s.s,o){if((n=u<0?-u:u)<=fz){for(i=new l(ia),e=Math.ceil(r/bn+4),Pn=!1;n%2&&(i=i.times(s),h9(i.d,e)),n=wg(n/2),n!==0;)s=s.times(s),h9(s.d,e);return Pn=!0,t.s<0?new l(ia).div(i):hn(i,r)}}else if(a<0)throw Error(Va+"NaN");return a=a<0&&t.d[Math.max(e,n)]&1?-1:1,s.s=1,Pn=!1,i=t.times($1(s,r+c)),Pn=!0,i=dz(i),i.s=a,i};We.toPrecision=function(t,e){var n,r,i=this,a=i.constructor;return t===void 0?(n=tr(i),r=fh(i,n<=a.toExpNeg||n>=a.toExpPos)):(ds(t,1,bg),e===void 0?e=a.rounding:ds(e,0,8),i=hn(new a(i),t,e),n=tr(i),r=fh(i,t<=n||n<=a.toExpNeg,t)),r};We.toSignificantDigits=We.tosd=function(t,e){var n=this,r=n.constructor;return t===void 0?(t=r.precision,e=r.rounding):(ds(t,1,bg),e===void 0?e=r.rounding:ds(e,0,8)),hn(new r(n),t,e)};We.toString=We.valueOf=We.val=We.toJSON=We[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=tr(t),n=t.constructor;return fh(t,e<=n.toExpNeg||e>=n.toExpPos)};function hz(t,e){var n,r,i,a,o,s,l,c,u=t.constructor,f=u.precision;if(!t.s||!e.s)return e.s||(e=new u(t)),Pn?hn(e,f):e;if(l=t.d,c=e.d,o=t.e,i=e.e,l=l.slice(),a=o-i,a){for(a<0?(r=l,a=-a,s=c.length):(r=c,i=o,s=l.length),o=Math.ceil(f/bn),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=c.length,s-a<0&&(a=s,r=c,c=l,l=r),n=0;a;)n=(l[--a]=l[a]+c[a]+n)/fr|0,l[a]%=fr;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=i,Pn?hn(e,f):e}function ds(t,e,n){if(t!==~~t||tn)throw Error(Vf+t)}function rs(t){var e,n,r,i=t.length-1,a="",o=t[0];if(i>0){for(a+=o,e=1;eo?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]1;)r.shift()}return function(r,i,a,o){var s,l,c,u,f,h,d,g,p,y,m,b,x,A,S,E,T,C,N=r.constructor,B=r.s==i.s?1:-1,L=r.d,U=i.d;if(!r.s)return new N(r);if(!i.s)throw Error(Va+"Division by zero");for(l=r.e-i.e,T=U.length,S=L.length,d=new N(B),g=d.d=[],c=0;U[c]==(L[c]||0);)++c;if(U[c]>(L[c]||0)&&--l,a==null?b=a=N.precision:o?b=a+(tr(r)-tr(i))+1:b=a,b<0)return new N(0);if(b=b/bn+2|0,c=0,T==1)for(u=0,U=U[0],b++;(c1&&(U=t(U,u),L=t(L,u),T=U.length,S=L.length),A=T,p=L.slice(0,T),y=p.length;y=fr/2&&++E;do u=0,s=e(U,p,T,y),s<0?(m=p[0],T!=y&&(m=m*fr+(p[1]||0)),u=m/E|0,u>1?(u>=fr&&(u=fr-1),f=t(U,u),h=f.length,y=p.length,s=e(f,p,h,y),s==1&&(u--,n(f,T16)throw Error(P4+tr(t));if(!t.s)return new u(ia);for(e==null?(Pn=!1,s=f):s=e,o=new u(.03125);t.abs().gte(.1);)t=t.times(o),c+=5;for(r=Math.log(Ou(2,c))/Math.LN10*2+5|0,s+=r,n=i=a=new u(ia),u.precision=s;;){if(i=hn(i.times(t),s),n=n.times(++l),o=a.plus(ml(i,n,s)),rs(o.d).slice(0,s)===rs(a.d).slice(0,s)){for(;c--;)a=hn(a.times(a),s);return u.precision=f,e==null?(Pn=!0,hn(a,f)):a}a=o}}function tr(t){for(var e=t.e*bn,n=t.d[0];n>=10;n/=10)e++;return e}function RE(t,e,n){if(e>t.LN10.sd())throw Pn=!0,n&&(t.precision=n),Error(Va+"LN10 precision limit exceeded");return hn(new t(t.LN10),e)}function Xl(t){for(var e="";t--;)e+="0";return e}function $1(t,e){var n,r,i,a,o,s,l,c,u,f=1,h=10,d=t,g=d.d,p=d.constructor,y=p.precision;if(d.s<1)throw Error(Va+(d.s?"NaN":"-Infinity"));if(d.eq(ia))return new p(0);if(e==null?(Pn=!1,c=y):c=e,d.eq(10))return e==null&&(Pn=!0),RE(p,c);if(c+=h,p.precision=c,n=rs(g),r=n.charAt(0),a=tr(d),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)d=d.times(t),n=rs(d.d),r=n.charAt(0),f++;a=tr(d),r>1?(d=new p("0."+n),a++):d=new p(r+"."+n.slice(1))}else return l=RE(p,c+2,y).times(a+""),d=$1(new p(r+"."+n.slice(1)),c-h).plus(l),p.precision=y,e==null?(Pn=!0,hn(d,y)):d;for(s=o=d=ml(d.minus(ia),d.plus(ia),c),u=hn(d.times(d),c),i=3;;){if(o=hn(o.times(u),c),l=s.plus(ml(o,new p(i),c)),rs(l.d).slice(0,c)===rs(s.d).slice(0,c))return s=s.times(2),a!==0&&(s=s.plus(RE(p,c+2,y).times(a+""))),s=ml(s,new p(f),c),p.precision=y,e==null?(Pn=!0,hn(s,y)):s;s=l,i+=2}}function f9(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charCodeAt(r)===48;)++r;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(r,i),e){if(i-=r,n=n-r-1,t.e=wg(n/bn),t.d=[],r=(n+1)%bn,n<0&&(r+=bn),rjx||t.e<-jx))throw Error(P4+n)}else t.s=0,t.e=0,t.d=[0];return t}function hn(t,e,n){var r,i,a,o,s,l,c,u,f=t.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(r=e-o,r<0)r+=bn,i=e,c=f[u=0];else{if(u=Math.ceil((r+1)/bn),a=f.length,u>=a)return t;for(c=a=f[u],o=1;a>=10;a/=10)o++;r%=bn,i=r-bn+o}if(n!==void 0&&(a=Ou(10,o-i-1),s=c/a%10|0,l=e<0||f[u+1]!==void 0||c%a,l=n<4?(s||l)&&(n==0||n==(t.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/Ou(10,o-i):0:f[u-1])%10&1||n==(t.s<0?8:7))),e<1||!f[0])return l?(a=tr(t),f.length=1,e=e-a-1,f[0]=Ou(10,(bn-e%bn)%bn),t.e=wg(-e/bn)||0):(f.length=1,f[0]=t.e=t.s=0),t;if(r==0?(f.length=u,a=1,u--):(f.length=u+1,a=Ou(10,bn-r),f[u]=i>0?(c/Ou(10,o-i)%Ou(10,i)|0)*a:0),l)for(;;)if(u==0){(f[0]+=a)==fr&&(f[0]=1,++t.e);break}else{if(f[u]+=a,f[u]!=fr)break;f[u--]=0,a=1}for(r=f.length;f[--r]===0;)f.pop();if(Pn&&(t.e>jx||t.e<-jx))throw Error(P4+tr(t));return t}function pz(t,e){var n,r,i,a,o,s,l,c,u,f,h=t.constructor,d=h.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new h(t),Pn?hn(e,d):e;if(l=t.d,f=e.d,r=e.e,c=t.e,l=l.slice(),o=c-r,o){for(u=o<0,u?(n=l,o=-o,s=f.length):(n=f,r=c,s=l.length),i=Math.max(Math.ceil(d/bn),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=f.length,u=i0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+Xl(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Xl(-i-1)+a,n&&(r=n-o)>0&&(a+=Xl(r))):i>=o?(a+=Xl(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Xl(r))):((r=i+1)0&&(i+1===o&&(a+="."),a+=Xl(r))),t.s<0?"-"+a:a}function h9(t,e){if(t.length>e)return t.length=e,!0}function gz(t){var e,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Vf+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return f9(o,a.toString())}else if(typeof a!="string")throw Error(Vf+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,Wxe.test(a))f9(o,a);else throw Error(Vf+a)}if(i.prototype=We,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=gz,i.config=i.set=Jxe,t===void 0&&(t={}),t)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e=i[e+1]&&r<=i[e+2])this[n]=r;else throw Error(Vf+n+": "+r);if((r=t[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Vf+n+": "+r);return this}var O4=gz(Kxe);ia=new O4(1);const un=O4;function Yxe(t){return e2e(t)||qxe(t)||Zxe(t)||Xxe()}function Xxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zxe(t,e){if(t){if(typeof t=="string")return $8(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $8(t,e)}}function qxe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function e2e(t){if(Array.isArray(t))return $8(t)}function $8(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=e?n.apply(void 0,i):t(e-o,d9(function(){for(var s=arguments.length,l=new Array(s),c=0;ct.length)&&(e=t.length);for(var n=0,r=new Array(e);n"u"||!(Symbol.iterator in Object(t)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=t[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(e&&n.length===e));r=!0);}catch(l){i=!0,a=l}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function g2e(t){if(Array.isArray(t))return t}function wz(t){var e=U1(t,2),n=e[0],r=e[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function xz(t,e,n){if(t.lte(0))return new un(0);var r=VA.getDigitCount(t.toNumber()),i=new un(10).pow(r),a=t.div(i),o=r!==1?.05:.1,s=new un(Math.ceil(a.div(o).toNumber())).add(n).mul(o),l=s.mul(i);return e?l:new un(Math.ceil(l))}function y2e(t,e,n){var r=1,i=new un(t);if(!i.isint()&&n){var a=Math.abs(t);a<1?(r=new un(10).pow(VA.getDigitCount(t)-1),i=new un(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new un(Math.floor(t)))}else t===0?i=new un(Math.floor((e-1)/2)):n||(i=new un(Math.floor(t)));var o=Math.floor((e-1)/2),s=i2e(r2e(function(l){return i.add(new un(l-o).mul(r)).toNumber()}),U8);return s(0,e)}function Az(t,e,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(n-1)))return{step:new un(0),tickMin:new un(0),tickMax:new un(0)};var a=xz(new un(e).sub(t).div(n-1),r,i),o;t<=0&&e>=0?o=new un(0):(o=new un(t).add(e).div(2),o=o.sub(new un(o).mod(a)));var s=Math.ceil(o.sub(t).div(a).toNumber()),l=Math.ceil(new un(e).sub(o).div(a).toNumber()),c=s+l+1;return c>n?Az(t,e,n,r,i+1):(c0?l+(n-c):l,s=e>0?s:s+(n-c)),{step:a,tickMin:o.sub(new un(s).mul(a)),tickMax:o.add(new un(l).mul(a))})}function m2e(t){var e=U1(t,2),n=e[0],r=e[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=wz([n,r]),l=U1(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var f=u===1/0?[c].concat(j8(U8(0,i-1).map(function(){return 1/0}))):[].concat(j8(U8(0,i-1).map(function(){return-1/0})),[u]);return n>r?F8(f):f}if(c===u)return y2e(c,i,a);var h=Az(c,u,o,a),d=h.step,g=h.tickMin,p=h.tickMax,y=VA.rangeStep(g,p.add(new un(.1).mul(d)),d);return n>r?F8(y):y}function v2e(t,e){var n=U1(t,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=wz([r,i]),s=U1(o,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,i];if(l===c)return[l];var u=Math.max(e,2),f=xz(new un(c).sub(l).div(u-1),a,0),h=[].concat(j8(VA.rangeStep(new un(l),new un(c).sub(new un(.99).mul(f)),f)),[c]);return r>i?F8(h):h}var b2e=vz(m2e),w2e=vz(v2e),x2e="Invariant failed";function Hp(t,e){if(!t)throw new Error(x2e)}var A2e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function zx(){return zx=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function k2e(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function T4(t){var e=t.offset,n=t.layout,r=t.width,i=t.dataKey,a=t.data,o=t.dataPointFormatter,s=t.xAxis,l=t.yAxis,c=C2e(t,A2e),u=It(c,!1);t.direction==="x"&&s.type!=="number"&&Hp(!1);var f=a.map(function(h){var d=o(h,i),g=d.x,p=d.y,y=d.value,m=d.errorVal;if(!m)return null;var b=[],x,A;if(Array.isArray(m)){var S=E2e(m,2);x=S[0],A=S[1]}else x=A=m;if(n==="vertical"){var E=s.scale,T=p+e,C=T+r,N=T-r,B=E(y-x),L=E(y+A);b.push({x1:L,y1:C,x2:L,y2:N}),b.push({x1:B,y1:T,x2:L,y2:T}),b.push({x1:B,y1:C,x2:B,y2:N})}else if(n==="horizontal"){var U=l.scale,j=g+e,X=j-r,G=j+r,H=U(y-x),re=U(y+A);b.push({x1:X,y1:re,x2:G,y2:re}),b.push({x1:j,y1:H,x2:j,y2:re}),b.push({x1:X,y1:H,x2:G,y2:H})}return Y.createElement(Hn,zx({className:"recharts-errorBar",key:"bar-".concat(b.map(function(V){return"".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))},u),b.map(function(V){return Y.createElement("line",zx({},V,{key:"line-".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))}))});return Y.createElement(Hn,{className:"recharts-errorBars"},f)}T4.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"};T4.displayName="ErrorBar";function F1(t){"@babel/helpers - typeof";return F1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F1(t)}function g9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ME(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,c=0;c0?i[c-1].coordinate:i[s-1].coordinate,f=i[c].coordinate,h=c>=s-1?i[0].coordinate:i[c+1].coordinate,d=void 0;if(Ua(f-u)!==Ua(h-f)){var g=[];if(Ua(h-f)===Ua(l[1]-l[0])){d=h;var p=f+l[1]-l[0];g[0]=Math.min(p,(p+u)/2),g[1]=Math.max(p,(p+u)/2)}else{d=u;var y=h+l[1]-l[0];g[0]=Math.min(f,(y+f)/2),g[1]=Math.max(f,(y+f)/2)}var m=[Math.min(f,(d+f)/2),Math.max(f,(d+f)/2)];if(e>m[0]&&e<=m[1]||e>=g[0]&&e<=g[1]){o=i[c].index;break}}else{var b=Math.min(u,h),x=Math.max(u,h);if(e>(b+f)/2&&e<=(x+f)/2){o=i[c].index;break}}}else for(var A=0;A0&&A(r[A].coordinate+r[A-1].coordinate)/2&&e<=(r[A].coordinate+r[A+1].coordinate)/2||A===s-1&&e>(r[A].coordinate+r[A-1].coordinate)/2){o=r[A].index;break}return o},C4=function(e){var n=e,r=n.type.displayName,i=e.props,a=i.stroke,o=i.fill,s;switch(r){case"Line":s=a;break;case"Area":case"Radar":s=a&&a!=="none"?a:o;break;default:s=o;break}return s},F2e=function(e){var n=e.barSize,r=e.stackGroups,i=r===void 0?{}:r;if(!i)return{};for(var a={},o=Object.keys(i),s=0,l=o.length;s=0});if(y&&y.length){var m=y[0].props.barSize,b=y[0].props[p];a[b]||(a[b]=[]),a[b].push({item:y[0],stackList:y.slice(1),barSize:Yt(m)?n:m})}}return a},j2e=function(e){var n=e.barGap,r=e.barCategoryGap,i=e.bandSize,a=e.sizeList,o=a===void 0?[]:a,s=e.maxBarSize,l=o.length;if(l<1)return null;var c=la(n,i,0,!0),u,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,d=i/l,g=o.reduce(function(A,S){return A+S.barSize||0},0);g+=(l-1)*c,g>=i&&(g-=(l-1)*c,c=0),g>=i&&d>0&&(h=!0,d*=.9,g=l*d);var p=(i-g)/2>>0,y={offset:p-c,size:0};u=o.reduce(function(A,S){var E={item:S.item,position:{offset:y.offset+y.size+c,size:h?d:S.barSize}},T=[].concat(m9(A),[E]);return y=T[T.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(C){T.push({item:C,position:y})}),T},f)}else{var m=la(r,i,0,!0);i-2*m-(l-1)*c<=0&&(c=0);var b=(i-2*m-(l-1)*c)/l;b>1&&(b>>=0);var x=s===+s?Math.min(b,s):b;u=o.reduce(function(A,S,E){var T=[].concat(m9(A),[{item:S.item,position:{offset:m+(b+c)*E+(b-x)/2,size:x}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(C){T.push({item:C,position:T[T.length-1].position})}),T},f)}return u},z2e=function(e,n,r,i){var a=r.children,o=r.width,s=r.margin,l=o-(s.left||0)-(s.right||0),c=Ez({children:a,legendWidth:l});if(c){var u=i||{},f=u.width,h=u.height,d=c.align,g=c.verticalAlign,p=c.layout;if((p==="vertical"||p==="horizontal"&&g==="middle")&&d!=="center"&&je(e[d]))return Da(Da({},e),{},Dd({},d,e[d]+(f||0)));if((p==="horizontal"||p==="vertical"&&d==="center")&&g!=="middle"&&je(e[g]))return Da(Da({},e),{},Dd({},g,e[g]+(h||0)))}return e},H2e=function(e,n,r){return Yt(n)?!0:e==="horizontal"?n==="yAxis":e==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Sz=function(e,n,r,i,a){var o=n.props.children,s=ss(o,T4).filter(function(c){return H2e(i,a,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return e.reduce(function(c,u){var f=aa(u,r,0),h=Array.isArray(f)?[HA(f),zA(f)]:[f,f],d=l.reduce(function(g,p){var y=aa(u,p,0),m=h[0]-Math.abs(Array.isArray(y)?y[0]:y),b=h[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(m,g[0]),Math.max(b,g[1])]},[1/0,-1/0]);return[Math.min(d[0],c[0]),Math.max(d[1],c[1])]},[1/0,-1/0])}return null},G2e=function(e,n,r,i,a){var o=n.map(function(s){return Sz(e,s,r,a,i)}).filter(function(s){return!Yt(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},Pz=function(e,n,r,i,a){var o=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&Sz(e,l,c,i)||Ry(e,c,r,a)});if(r==="number")return o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,c){for(var u=0,f=c.length;u=2?Ua(s[0]-s[1])*2*c:c,n&&(e.ticks||e.niceTicks)){var u=(e.ticks||e.niceTicks).map(function(f){var h=a?a.indexOf(f):f;return{coordinate:i(h)+c,value:f,offset:c}});return u.filter(function(f){return!pv(f.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(f,h){return{coordinate:i(f)+c,value:f,index:h,offset:c}}):i.ticks&&!r?i.ticks(e.tickCount).map(function(f){return{coordinate:i(f)+c,value:f,offset:c}}):i.domain().map(function(f,h){return{coordinate:i(f)+c,value:a?a[f]:f,index:h,offset:c}})},BE=new WeakMap,xb=function(e,n){if(typeof n!="function")return e;BE.has(e)||BE.set(e,new WeakMap);var r=BE.get(e);if(r.has(n))return r.get(n);var i=function(){e.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},V2e=function(e,n,r){var i=e.scale,a=e.type,o=e.layout,s=e.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:R1(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Lx(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Iy(),realScaleType:"point"}:a==="category"?{scale:R1(),realScaleType:"band"}:{scale:Lx(),realScaleType:"linear"};if(dv(i)){var l="scale".concat(CA(i));return{scale:(u9[l]||Iy)(),realScaleType:u9[l]?l:"point"}}return Ft(i)?{scale:i}:{scale:Iy(),realScaleType:"point"}},v9=1e-4,Q2e=function(e){var n=e.domain();if(!(!n||n.length<=2)){var r=n.length,i=e.range(),a=Math.min(i[0],i[1])-v9,o=Math.max(i[0],i[1])+v9,s=e(n[0]),l=e(n[r-1]);(so||lo)&&e.domain([n[0],n[r-1]])}},K2e=function(e){var n=e.length;if(!(n<=0))for(var r=0,i=e[0].length;r=0?(e[s][r][0]=a,e[s][r][1]=a+l,a=e[s][r][1]):(e[s][r][0]=o,e[s][r][1]=o+l,o=e[s][r][1])}},W2e=function(e){var n=e.length;if(!(n<=0))for(var r=0,i=e[0].length;r=0?(e[o][r][0]=a,e[o][r][1]=a+s,a=e[o][r][1]):(e[o][r][0]=0,e[o][r][1]=0)}},J2e={sign:K2e,expand:Pfe,none:Mp,silhouette:Ofe,wiggle:Tfe,positive:W2e},Y2e=function(e,n,r){var i=n.map(function(s){return s.props.dataKey}),a=J2e[r],o=Sfe().keys(i).value(function(s,l){return+aa(s,l,0)}).order(y8).offset(a);return o(e)},X2e=function(e,n,r,i,a,o){if(!e)return null;var s=o?n.reverse():n,l={},c=s.reduce(function(f,h){var d=h.props,g=d.stackId,p=d.hide;if(p)return f;var y=h.props[r],m=f[y]||{hasStack:!1,stackGroups:{}};if(or(g)){var b=m.stackGroups[g]||{numericAxisId:r,cateAxisId:i,items:[]};b.items.push(h),m.hasStack=!0,m.stackGroups[g]=b}else m.stackGroups[OA("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return Da(Da({},f),{},Dd({},y,m))},l),u={};return Object.keys(c).reduce(function(f,h){var d=c[h];if(d.hasStack){var g={};d.stackGroups=Object.keys(d.stackGroups).reduce(function(p,y){var m=d.stackGroups[y];return Da(Da({},p),{},Dd({},y,{numericAxisId:r,cateAxisId:i,items:m.items,stackedData:Y2e(e,m.items,a)}))},g)}return Da(Da({},f),{},Dd({},h,d))},u)},Z2e=function(e,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=e.domain();if(!c.length)return null;var u=b2e(c,a,s);return e.domain([HA(u),zA(u)]),{niceTicks:u}}if(a&&i==="number"){var f=e.domain(),h=w2e(f,a,s);return{niceTicks:h}}return null},q2e=function(e,n){var r=e.props.stackId;if(or(r)){var i=n[r];if(i){var a=i.items.indexOf(e);return a>=0?i.stackedData[a]:null}}return null},eAe=function(e){return e.reduce(function(n,r){return[HA(r.concat([n[0]]).filter(je)),zA(r.concat([n[1]]).filter(je))]},[1/0,-1/0])},Tz=function(e,n,r){return Object.keys(e).reduce(function(i,a){var o=e[a],s=o.stackedData,l=s.reduce(function(c,u){var f=eAe(u.slice(n,r+1));return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},b9=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,w9=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,G8=function(e,n,r){if(Ft(e))return e(n,r);if(!Array.isArray(e))return n;var i=[];if(je(e[0]))i[0]=r?e[0]:Math.min(e[0],n[0]);else if(b9.test(e[0])){var a=+b9.exec(e[0])[1];i[0]=n[0]-a}else Ft(e[0])?i[0]=e[0](n[0]):i[0]=n[0];if(je(e[1]))i[1]=r?e[1]:Math.max(e[1],n[1]);else if(w9.test(e[1])){var o=+w9.exec(e[1])[1];i[1]=n[1]+o}else Ft(e[1])?i[1]=e[1](n[1]):i[1]=n[1];return i},V8=function(e,n,r){if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!r||i>0)return i}if(e&&n&&n.length>=2){for(var a=qO(n,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;st.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},uAe=function(e,n,r,i,a){var o=e.width,s=e.height,l=e.startAngle,c=e.endAngle,u=la(e.cx,o,o/2),f=la(e.cy,s,s/2),h=kz(o,s,r),d=la(e.innerRadius,h,0),g=la(e.outerRadius,h,h*.8),p=Object.keys(n);return p.reduce(function(y,m){var b=n[m],x=b.domain,A=b.reversed,S;if(Yt(b.range))i==="angleAxis"?S=[l,c]:i==="radiusAxis"&&(S=[d,g]),A&&(S=[S[1],S[0]]);else{S=b.range;var E=S,T=iAe(E,2);l=T[0],c=T[1]}var C=V2e(b,a),N=C.realScaleType,B=C.scale;B.domain(x).range(S),Q2e(B);var L=Z2e(B,Ps(Ps({},b),{},{realScaleType:N})),U=Ps(Ps(Ps({},b),L),{},{range:S,radius:g,realScaleType:N,scale:B,cx:u,cy:f,innerRadius:d,outerRadius:g,startAngle:l,endAngle:c});return Ps(Ps({},y),{},Cz({},m,U))},{})},fAe=function(e,n){var r=e.x,i=e.y,a=n.x,o=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(i-o,2))},hAe=function(e,n){var r=e.x,i=e.y,a=n.cx,o=n.cy,s=fAe({x:r,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(r-a)/s,c=Math.acos(l);return i>o&&(c=2*Math.PI-c),{radius:s,angle:cAe(c),angleInRadian:c}},dAe=function(e){var n=e.startAngle,r=e.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},pAe=function(e,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),s=Math.min(a,o);return e+s*360},S9=function(e,n){var r=e.x,i=e.y,a=hAe({x:r,y:i},n),o=a.radius,s=a.angle,l=n.innerRadius,c=n.outerRadius;if(oc)return!1;if(o===0)return!0;var u=dAe(n),f=u.startAngle,h=u.endAngle,d=s,g;if(f<=h){for(;d>h;)d-=360;for(;d=f&&d<=h}else{for(;d>f;)d-=360;for(;d=h&&d<=f}return g?Ps(Ps({},n),{},{radius:o,angle:pAe(d,n)}):null};function H1(t){"@babel/helpers - typeof";return H1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H1(t)}var gAe=["offset"];function yAe(t){return wAe(t)||bAe(t)||vAe(t)||mAe()}function mAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vAe(t,e){if(t){if(typeof t=="string")return Q8(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q8(t,e)}}function bAe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function wAe(t){if(Array.isArray(t))return Q8(t)}function Q8(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function AAe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function P9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rr(t){for(var e=1;e=0?1:-1,x,A;i==="insideStart"?(x=d+b*o,A=p):i==="insideEnd"?(x=g-b*o,A=!p):i==="end"&&(x=g+b*o,A=p),A=m<=0?A:!A;var S=yn(c,u,y,x),E=yn(c,u,y,x+(A?1:-1)*359),T="M".concat(S.x,",").concat(S.y,` + A`).concat(y,",").concat(y,",0,1,").concat(A?0:1,`, + `).concat(E.x,",").concat(E.y),C=Yt(e.id)?OA("recharts-radial-line-"):e.id;return Y.createElement("text",G1({},r,{dominantBaseline:"central",className:On("recharts-radial-bar-label",s)}),Y.createElement("defs",null,Y.createElement("path",{id:C,d:T})),Y.createElement("textPath",{xlinkHref:"#".concat(C)},n))},kAe=function(e){var n=e.viewBox,r=e.offset,i=e.position,a=n,o=a.cx,s=a.cy,l=a.innerRadius,c=a.outerRadius,u=a.startAngle,f=a.endAngle,h=(u+f)/2;if(i==="outside"){var d=yn(o,s,c+r,h),g=d.x,p=d.y;return{x:g,y:p,textAnchor:g>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+c)/2,m=yn(o,s,y,h),b=m.x,x=m.y;return{x:b,y:x,textAnchor:"middle",verticalAnchor:"middle"}},_Ae=function(e){var n=e.viewBox,r=e.parentViewBox,i=e.offset,a=e.position,o=n,s=o.x,l=o.y,c=o.width,u=o.height,f=u>=0?1:-1,h=f*i,d=f>0?"end":"start",g=f>0?"start":"end",p=c>=0?1:-1,y=p*i,m=p>0?"end":"start",b=p>0?"start":"end";if(a==="top"){var x={x:s+c/2,y:l-f*i,textAnchor:"middle",verticalAnchor:d};return rr(rr({},x),r?{height:Math.max(l-r.y,0),width:c}:{})}if(a==="bottom"){var A={x:s+c/2,y:l+u+h,textAnchor:"middle",verticalAnchor:g};return rr(rr({},A),r?{height:Math.max(r.y+r.height-(l+u),0),width:c}:{})}if(a==="left"){var S={x:s-y,y:l+u/2,textAnchor:m,verticalAnchor:"middle"};return rr(rr({},S),r?{width:Math.max(S.x-r.x,0),height:u}:{})}if(a==="right"){var E={x:s+c+y,y:l+u/2,textAnchor:b,verticalAnchor:"middle"};return rr(rr({},E),r?{width:Math.max(r.x+r.width-E.x,0),height:u}:{})}var T=r?{width:c,height:u}:{};return a==="insideLeft"?rr({x:s+y,y:l+u/2,textAnchor:b,verticalAnchor:"middle"},T):a==="insideRight"?rr({x:s+c-y,y:l+u/2,textAnchor:m,verticalAnchor:"middle"},T):a==="insideTop"?rr({x:s+c/2,y:l+h,textAnchor:"middle",verticalAnchor:g},T):a==="insideBottom"?rr({x:s+c/2,y:l+u-h,textAnchor:"middle",verticalAnchor:d},T):a==="insideTopLeft"?rr({x:s+y,y:l+h,textAnchor:b,verticalAnchor:g},T):a==="insideTopRight"?rr({x:s+c-y,y:l+h,textAnchor:m,verticalAnchor:g},T):a==="insideBottomLeft"?rr({x:s+y,y:l+u-h,textAnchor:b,verticalAnchor:d},T):a==="insideBottomRight"?rr({x:s+c-y,y:l+u-h,textAnchor:m,verticalAnchor:d},T):fg(a)&&(je(a.x)||zu(a.x))&&(je(a.y)||zu(a.y))?rr({x:s+la(a.x,c),y:l+la(a.y,u),textAnchor:"end",verticalAnchor:"end"},T):rr({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},T)},NAe=function(e){return"cx"in e&&je(e.cx)};function Sr(t){var e=t.offset,n=e===void 0?5:e,r=xAe(t,gAe),i=rr({offset:n},r),a=i.viewBox,o=i.position,s=i.value,l=i.children,c=i.content,u=i.className,f=u===void 0?"":u,h=i.textBreakAll;if(!a||Yt(s)&&Yt(l)&&!F.isValidElement(c)&&!Ft(c))return null;if(F.isValidElement(c))return F.cloneElement(c,i);var d;if(Ft(c)){if(d=F.createElement(c,i),F.isValidElement(d))return d}else d=OAe(i);var g=NAe(a),p=It(i,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return CAe(i,d,p);var y=g?kAe(i):_Ae(i);return Y.createElement(Up,G1({className:On("recharts-label",f)},p,y,{breakAll:h}),d)}Sr.displayName="Label";var _z=function(e){var n=e.cx,r=e.cy,i=e.angle,a=e.startAngle,o=e.endAngle,s=e.r,l=e.radius,c=e.innerRadius,u=e.outerRadius,f=e.x,h=e.y,d=e.top,g=e.left,p=e.width,y=e.height,m=e.clockWise,b=e.labelViewBox;if(b)return b;if(je(p)&&je(y)){if(je(f)&&je(h))return{x:f,y:h,width:p,height:y};if(je(d)&&je(g))return{x:d,y:g,width:p,height:y}}return je(f)&&je(h)?{x:f,y:h,width:0,height:0}:je(n)&&je(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:m}:e.viewBox?e.viewBox:{}},IAe=function(e,n){return e?e===!0?Y.createElement(Sr,{key:"label-implicit",viewBox:n}):or(e)?Y.createElement(Sr,{key:"label-implicit",viewBox:n,value:e}):F.isValidElement(e)?e.type===Sr?F.cloneElement(e,{key:"label-implicit",viewBox:n}):Y.createElement(Sr,{key:"label-implicit",content:e,viewBox:n}):Ft(e)?Y.createElement(Sr,{key:"label-implicit",content:e,viewBox:n}):fg(e)?Y.createElement(Sr,G1({viewBox:n},e,{key:"label-implicit"})):null:null},RAe=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var i=e.children,a=_z(e),o=ss(i,Sr).map(function(l,c){return F.cloneElement(l,{viewBox:n||a,key:"label-".concat(c)})});if(!r)return o;var s=IAe(e.label,n||a);return[s].concat(yAe(o))};Sr.parseViewBox=_z;Sr.renderCallByParent=RAe;function MAe(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var BAe=MAe;const DAe=Xt(BAe);function V1(t){"@babel/helpers - typeof";return V1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V1(t)}var LAe=["valueAccessor"],$Ae=["data","dataKey","clockWise","id","textBreakAll"];function UAe(t){return HAe(t)||zAe(t)||jAe(t)||FAe()}function FAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jAe(t,e){if(t){if(typeof t=="string")return K8(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K8(t,e)}}function zAe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function HAe(t){if(Array.isArray(t))return K8(t)}function K8(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function KAe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var WAe=function(e){return Array.isArray(e.value)?DAe(e.value):e.value};function Qf(t){var e=t.valueAccessor,n=e===void 0?WAe:e,r=C9(t,LAe),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,l=r.textBreakAll,c=C9(r,$Ae);return!i||!i.length?null:Y.createElement(Hn,{className:"recharts-label-list"},i.map(function(u,f){var h=Yt(a)?n(u,f):aa(u&&u.payload,a),d=Yt(s)?{}:{id:"".concat(s,"-").concat(f)};return Y.createElement(Sr,Gx({},It(u,!0),c,d,{parentViewBox:u.parentViewBox,value:h,textBreakAll:l,viewBox:Sr.parseViewBox(Yt(o)?u:T9(T9({},u),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Qf.displayName="LabelList";function JAe(t,e){return t?t===!0?Y.createElement(Qf,{key:"labelList-implicit",data:e}):Y.isValidElement(t)||Ft(t)?Y.createElement(Qf,{key:"labelList-implicit",data:e,content:t}):fg(t)?Y.createElement(Qf,Gx({data:e},t,{key:"labelList-implicit"})):null:null}function YAe(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var r=t.children,i=ss(r,Qf).map(function(o,s){return F.cloneElement(o,{data:e,key:"labelList-".concat(s)})});if(!n)return i;var a=JAe(t.label,e);return[a].concat(UAe(i))}Qf.renderCallByParent=YAe;function Q1(t){"@babel/helpers - typeof";return Q1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q1(t)}function W8(){return W8=Object.assign?Object.assign.bind():function(t){for(var e=1;e180),",").concat(+(o>c),`, + `).concat(f.x,",").concat(f.y,` + `);if(i>0){var d=yn(n,r,i,o),g=yn(n,r,i,c);h+="L ".concat(g.x,",").concat(g.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(o<=c),`, + `).concat(d.x,",").concat(d.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},t6e=function(e){var n=e.cx,r=e.cy,i=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,s=e.forceCornerRadius,l=e.cornerIsExternal,c=e.startAngle,u=e.endAngle,f=Ua(u-c),h=Ab({cx:n,cy:r,radius:a,angle:c,sign:f,cornerRadius:o,cornerIsExternal:l}),d=h.circleTangency,g=h.lineTangency,p=h.theta,y=Ab({cx:n,cy:r,radius:a,angle:u,sign:-f,cornerRadius:o,cornerIsExternal:l}),m=y.circleTangency,b=y.lineTangency,x=y.theta,A=l?Math.abs(c-u):Math.abs(c-u)-p-x;if(A<0)return s?"M ".concat(g.x,",").concat(g.y,` + a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 + a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 + `):Nz({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:c,endAngle:u});var S="M ".concat(g.x,",").concat(g.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(d.x,",").concat(d.y,` + A`).concat(a,",").concat(a,",0,").concat(+(A>180),",").concat(+(f<0),",").concat(m.x,",").concat(m.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,` + `);if(i>0){var E=Ab({cx:n,cy:r,radius:i,angle:c,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),T=E.circleTangency,C=E.lineTangency,N=E.theta,B=Ab({cx:n,cy:r,radius:i,angle:u,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),L=B.circleTangency,U=B.lineTangency,j=B.theta,X=l?Math.abs(c-u):Math.abs(c-u)-N-j;if(X<0&&o===0)return"".concat(S,"L").concat(n,",").concat(r,"Z");S+="L".concat(U.x,",").concat(U.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(L.x,",").concat(L.y,` + A`).concat(i,",").concat(i,",0,").concat(+(X>180),",").concat(+(f>0),",").concat(T.x,",").concat(T.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(C.x,",").concat(C.y,"Z")}else S+="L".concat(n,",").concat(r,"Z");return S},n6e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Iz=function(e){var n=_9(_9({},n6e),e),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,f=n.endAngle,h=n.className;if(o0&&Math.abs(u-f)<360?y=t6e({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(p,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:f}):y=Nz({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:u,endAngle:f}),Y.createElement("path",W8({},It(n,!0),{className:d,d:y,role:"img"}))};function K1(t){"@babel/helpers - typeof";return K1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K1(t)}function J8(){return J8=Object.assign?Object.assign.bind():function(t){for(var e=1;e0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function m6e(t,e){return xg(t.getTime(),e.getTime())}function $9(t,e,n){if(t.size!==e.size)return!1;for(var r={},i=t.entries(),a=0,o,s;(o=i.next())&&!o.done;){for(var l=e.entries(),c=!1,u=0;(s=l.next())&&!s.done;){var f=o.value,h=f[0],d=f[1],g=s.value,p=g[0],y=g[1];!c&&!r[u]&&(c=n.equals(h,p,a,u,t,e,n)&&n.equals(d,y,h,p,t,e,n))&&(r[u]=!0),u++}if(!c)return!1;a++}return!0}function v6e(t,e,n){var r=L9(t),i=r.length;if(L9(e).length!==i)return!1;for(var a;i-- >0;)if(a=r[i],a===Lz&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof||!Dz(e,a)||!n.equals(t[a],e[a],a,a,t,e,n))return!1;return!0}function Qg(t,e,n){var r=B9(t),i=r.length;if(B9(e).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=r[i],a===Lz&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof||!Dz(e,a)||!n.equals(t[a],e[a],a,a,t,e,n)||(o=D9(t,a),s=D9(e,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function b6e(t,e){return xg(t.valueOf(),e.valueOf())}function w6e(t,e){return t.source===e.source&&t.flags===e.flags}function U9(t,e,n){if(t.size!==e.size)return!1;for(var r={},i=t.values(),a,o;(a=i.next())&&!a.done;){for(var s=e.values(),l=!1,c=0;(o=s.next())&&!o.done;)!l&&!r[c]&&(l=n.equals(a.value,o.value,a.value,o.value,t,e,n))&&(r[c]=!0),c++;if(!l)return!1}return!0}function x6e(t,e){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}var A6e="[object Arguments]",E6e="[object Boolean]",S6e="[object Date]",P6e="[object Map]",O6e="[object Number]",T6e="[object Object]",C6e="[object RegExp]",k6e="[object Set]",_6e="[object String]",N6e=Array.isArray,F9=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,j9=Object.assign,I6e=Object.prototype.toString.call.bind(Object.prototype.toString);function R6e(t){var e=t.areArraysEqual,n=t.areDatesEqual,r=t.areMapsEqual,i=t.areObjectsEqual,a=t.arePrimitiveWrappersEqual,o=t.areRegExpsEqual,s=t.areSetsEqual,l=t.areTypedArraysEqual;return function(u,f,h){if(u===f)return!0;if(u==null||f==null||typeof u!="object"||typeof f!="object")return u!==u&&f!==f;var d=u.constructor;if(d!==f.constructor)return!1;if(d===Object)return i(u,f,h);if(N6e(u))return e(u,f,h);if(F9!=null&&F9(u))return l(u,f,h);if(d===Date)return n(u,f,h);if(d===RegExp)return o(u,f,h);if(d===Map)return r(u,f,h);if(d===Set)return s(u,f,h);var g=I6e(u);return g===S6e?n(u,f,h):g===C6e?o(u,f,h):g===P6e?r(u,f,h):g===k6e?s(u,f,h):g===T6e?typeof u.then!="function"&&typeof f.then!="function"&&i(u,f,h):g===A6e?i(u,f,h):g===E6e||g===O6e||g===_6e?a(u,f,h):!1}}function M6e(t){var e=t.circular,n=t.createCustomConfig,r=t.strict,i={areArraysEqual:r?Qg:y6e,areDatesEqual:m6e,areMapsEqual:r?M9($9,Qg):$9,areObjectsEqual:r?Qg:v6e,arePrimitiveWrappersEqual:b6e,areRegExpsEqual:w6e,areSetsEqual:r?M9(U9,Qg):U9,areTypedArraysEqual:r?Qg:x6e};if(n&&(i=j9({},i,n(i))),e){var a=Sb(i.areArraysEqual),o=Sb(i.areMapsEqual),s=Sb(i.areObjectsEqual),l=Sb(i.areSetsEqual);i=j9({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return i}function B6e(t){return function(e,n,r,i,a,o,s){return t(e,n,s)}}function D6e(t){var e=t.circular,n=t.comparator,r=t.createState,i=t.equals,a=t.strict;if(r)return function(l,c){var u=r(),f=u.cache,h=f===void 0?e?new WeakMap:void 0:f,d=u.meta;return n(l,c,{cache:h,equals:i,meta:d,strict:a})};if(e)return function(l,c){return n(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,c){return n(l,c,o)}}var L6e=hu();hu({strict:!0});hu({circular:!0});hu({circular:!0,strict:!0});hu({createInternalComparator:function(){return xg}});hu({strict:!0,createInternalComparator:function(){return xg}});hu({circular:!0,createInternalComparator:function(){return xg}});hu({circular:!0,createInternalComparator:function(){return xg},strict:!0});function hu(t){t===void 0&&(t={});var e=t.circular,n=e===void 0?!1:e,r=t.createInternalComparator,i=t.createState,a=t.strict,o=a===void 0?!1:a,s=M6e(t),l=R6e(s),c=r?r(l):B6e(l);return D6e({circular:n,comparator:l,createState:i,equals:c,strict:o})}function $6e(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function z9(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>e?(t(a),n=-1):$6e(i)};requestAnimationFrame(r)}function X8(t){"@babel/helpers - typeof";return X8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X8(t)}function U6e(t){return H6e(t)||z6e(t)||j6e(t)||F6e()}function F6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j6e(t,e){if(t){if(typeof t=="string")return H9(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return H9(t,e)}}function H9(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?1:m<0?0:m},p=function(m){for(var b=m>1?1:m,x=b,A=0;A<8;++A){var S=f(x)-b,E=d(x);if(Math.abs(S-b)0&&arguments[0]!==void 0?arguments[0]:{},n=e.stiff,r=n===void 0?100:n,i=e.damping,a=i===void 0?8:i,o=e.dt,s=o===void 0?17:o,l=function(u,f,h){var d=-(u-f)*r,g=h*a,p=h+(d-g)*s/1e3,y=h*s/1e3+u;return Math.abs(y-f)t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function wEe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function DE(t){return SEe(t)||EEe(t)||AEe(t)||xEe()}function xEe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AEe(t,e){if(t){if(typeof t=="string")return nS(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nS(t,e)}}function EEe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function SEe(t){if(Array.isArray(t))return nS(t)}function nS(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kx(t){return Kx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kx(t)}var tu=function(t){CEe(n,t);var e=kEe(n);function n(r,i){var a;PEe(this,n),a=e.call(this,r,i);var o=a.props,s=o.isActive,l=o.attributeName,c=o.from,u=o.to,f=o.steps,h=o.children,d=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(aS(a)),a.changeStyle=a.changeStyle.bind(aS(a)),!s||d<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:u}),iS(a);if(f&&f.length)a.state={style:f[0].style};else if(c){if(typeof h=="function")return a.state={style:c},iS(a);a.state={style:l?py({},l,c):c}}else a.state={style:{}};return a}return OEe(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,c=a.shouldReAnimate,u=a.to,f=a.from,h=this.state.style;if(s){if(!o){var d={style:l?py({},l,u):u};this.state&&h&&(l&&h[l]!==u||!l&&h!==u)&&this.setState(d);return}if(!(L6e(i.to,u)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=g||c?f:i.to;if(this.state&&h){var y={style:l?py({},l,p):p};(l&&[l]!==p||!l&&h!==p)&&this.setState(y)}this.runAnimation(qa(qa({},this.props),{},{from:p,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,c=i.easing,u=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,d=mEe(o,s,oEe(c),l,this.changeStyle),g=function(){a.stopJSAnimation=d()};this.manager.start([h,u,g,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,c=o[0],u=c.style,f=c.duration,h=f===void 0?0:f,d=function(p,y,m){if(m===0)return p;var b=y.duration,x=y.easing,A=x===void 0?"ease":x,S=y.style,E=y.properties,T=y.onAnimationEnd,C=m>0?o[m-1]:y,N=E||Object.keys(S);if(typeof A=="function"||A==="spring")return[].concat(DE(p),[a.runJSAnimation.bind(a,{from:C.style,to:S,duration:b,easing:A}),b]);var B=Q9(N,b,A),L=qa(qa(qa({},C.style),S),{},{transition:B});return[].concat(DE(p),[L,b,T]).filter(W6e)};return this.manager.start([l].concat(DE(o.reduce(d,[u,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=G6e());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,c=i.easing,u=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,d=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof c=="function"||typeof d=="function"||c==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var p=s?py({},s,l):l,y=Q9(Object.keys(p),o,c);g.start([u,a,qa(qa({},p),{},{transition:y}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=bEe(i,vEe),c=F.Children.count(a),u=this.state.style;if(typeof a=="function")return a(u);if(!s||c===0||o<=0)return a;var f=function(d){var g=d.props,p=g.style,y=p===void 0?{}:p,m=g.className,b=F.cloneElement(d,qa(qa({},l),{},{style:qa(qa({},y),u),className:m}));return b};return c===1?f(F.Children.only(a)):Y.createElement("div",null,F.Children.map(a,function(h){return f(h)}))}}]),n}(F.PureComponent);tu.displayName="Animate";tu.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};tu.propTypes={from:kt.oneOfType([kt.object,kt.string]),to:kt.oneOfType([kt.object,kt.string]),attributeName:kt.string,duration:kt.number,begin:kt.number,easing:kt.oneOfType([kt.string,kt.func]),steps:kt.arrayOf(kt.shape({duration:kt.number.isRequired,style:kt.object.isRequired,easing:kt.oneOfType([kt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),kt.func]),properties:kt.arrayOf("string"),onAnimationEnd:kt.func})),children:kt.oneOfType([kt.node,kt.func]),isActive:kt.bool,canBegin:kt.bool,onAnimationEnd:kt.func,shouldReAnimate:kt.bool,onAnimationStart:kt.func,onAnimationReStart:kt.func};kt.object,kt.object,kt.object,kt.element;kt.object,kt.object,kt.object,kt.oneOfType([kt.array,kt.element]),kt.any;function Y1(t){"@babel/helpers - typeof";return Y1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y1(t)}function Wx(){return Wx=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0?1:-1,l=r>=0?1:-1,c=i>=0&&r>=0||i<0&&r<0?1:0,u;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,d=4;ho?o:a[h];u="M".concat(e,",").concat(n+s*f[0]),f[0]>0&&(u+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(c,",").concat(e+l*f[0],",").concat(n)),u+="L ".concat(e+r-l*f[1],",").concat(n),f[1]>0&&(u+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(c,`, + `).concat(e+r,",").concat(n+s*f[1])),u+="L ".concat(e+r,",").concat(n+i-s*f[2]),f[2]>0&&(u+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(c,`, + `).concat(e+r-l*f[2],",").concat(n+i)),u+="L ".concat(e+l*f[3],",").concat(n+i),f[3]>0&&(u+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(c,`, + `).concat(e,",").concat(n+i-s*f[3])),u+="Z"}else if(o>0&&a===+a&&a>0){var g=Math.min(o,a);u="M ".concat(e,",").concat(n+s*g,` + A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e+l*g,",").concat(n,` + L `).concat(e+r-l*g,",").concat(n,` + A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e+r,",").concat(n+s*g,` + L `).concat(e+r,",").concat(n+i-s*g,` + A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e+r-l*g,",").concat(n+i,` + L `).concat(e+l*g,",").concat(n+i,` + A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e,",").concat(n+i-s*g," Z")}else u="M ".concat(e,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return u},UEe=function(e,n){if(!e||!n)return!1;var r=e.x,i=e.y,a=n.x,o=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(a,a+s),u=Math.max(a,a+s),f=Math.min(o,o+l),h=Math.max(o,o+l);return r>=c&&r<=u&&i>=f&&i<=h}return!1},FEe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},k4=function(e){var n=tR(tR({},FEe),e),r=F.useRef(),i=F.useState(-1),a=NEe(i,2),o=a[0],s=a[1];F.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&s(A)}catch{}},[]);var l=n.x,c=n.y,u=n.width,f=n.height,h=n.radius,d=n.className,g=n.animationEasing,p=n.animationDuration,y=n.animationBegin,m=n.isAnimationActive,b=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||u===0||f===0)return null;var x=On("recharts-rectangle",d);return b?Y.createElement(tu,{canBegin:o>0,from:{width:u,height:f,x:l,y:c},to:{width:u,height:f,x:l,y:c},duration:p,animationEasing:g,isActive:b},function(A){var S=A.width,E=A.height,T=A.x,C=A.y;return Y.createElement(tu,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:p,isActive:m,easing:g},Y.createElement("path",Wx({},It(n,!0),{className:x,d:nR(T,C,S,E,h),ref:r})))}):Y.createElement("path",Wx({},It(n,!0),{className:x,d:nR(l,c,u,f,h)}))},jEe=["points","className","baseLinePoints","connectNulls"];function yd(){return yd=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function HEe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function rR(t){return KEe(t)||QEe(t)||VEe(t)||GEe()}function GEe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VEe(t,e){if(t){if(typeof t=="string")return oS(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oS(t,e)}}function QEe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function KEe(t){if(Array.isArray(t))return oS(t)}function oS(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return e.forEach(function(r){iR(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),iR(e[0])&&n[n.length-1].push(e[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},By=function(e,n){var r=WEe(e);n&&(r=[r.reduce(function(a,o){return[].concat(rR(a),rR(o))},[])]);var i=r.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},JEe=function(e,n,r){var i=By(e,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(By(n.reverse(),r).slice(1))},YEe=function(e){var n=e.points,r=e.className,i=e.baseLinePoints,a=e.connectNulls,o=zEe(e,jEe);if(!n||!n.length)return null;var s=On("recharts-polygon",r);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",c=JEe(n,i,a);return Y.createElement("g",{className:s},Y.createElement("path",yd({},It(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:c})),l?Y.createElement("path",yd({},It(o,!0),{fill:"none",d:By(n,a)})):null,l?Y.createElement("path",yd({},It(o,!0),{fill:"none",d:By(i,a)})):null)}var u=By(n,a);return Y.createElement("path",yd({},It(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",className:s,d:u}))};function sS(){return sS=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function r5e(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var i5e=function(e,n,r,i,a,o){return"M".concat(e,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},a5e=function(e){var n=e.x,r=n===void 0?0:n,i=e.y,a=i===void 0?0:i,o=e.top,s=o===void 0?0:o,l=e.left,c=l===void 0?0:l,u=e.width,f=u===void 0?0:u,h=e.height,d=h===void 0?0:h,g=e.className,p=n5e(e,XEe),y=ZEe({x:r,y:a,top:s,left:c,width:f,height:d},p);return!je(r)||!je(a)||!je(f)||!je(d)||!je(s)||!je(c)?null:Y.createElement("path",lS({},It(y,!0),{className:On("recharts-cross",g),d:i5e(r,a,f,d,s,c)}))},o5e=jA,s5e=cz,l5e=cu;function c5e(t,e){return t&&t.length?o5e(t,l5e(e),s5e):void 0}var u5e=c5e;const f5e=Xt(u5e);var h5e=jA,d5e=cu,p5e=uz;function g5e(t,e){return t&&t.length?h5e(t,d5e(e),p5e):void 0}var y5e=g5e;const m5e=Xt(y5e);var v5e=["cx","cy","angle","ticks","axisLine"],b5e=["ticks","tick","angle","tickFormatter","stroke"];function Vp(t){"@babel/helpers - typeof";return Vp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vp(t)}function Dy(){return Dy=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function w5e(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function x5e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lR(t,e){for(var n=0;nfR?o=i==="outer"?"start":"end":a<-fR?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.radius,s=r.axisLine,l=r.axisLineType,c=bu(bu({},It(this.props,!1)),{},{fill:"none"},It(s,!1));if(l==="circle")return Y.createElement(_4,Cu({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:a,r:o}));var u=this.props.ticks,f=u.map(function(h){return yn(i,a,o,h.coordinate)});return Y.createElement(YEe,Cu({className:"recharts-polar-angle-axis-line"},c,{points:f}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,c=i.stroke,u=It(this.props,!1),f=It(o,!1),h=bu(bu({},u),{},{fill:"none"},It(s,!1)),d=a.map(function(g,p){var y=r.getTickLineCoord(g),m=r.getTickTextAnchor(g),b=bu(bu(bu({textAnchor:m},u),{},{stroke:"none",fill:c},f),{},{index:p,payload:g,x:y.x2,y:y.y2});return Y.createElement(Hn,Cu({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(g.coordinate)},TA(r.props,g,p)),s&&Y.createElement("line",Cu({className:"recharts-polar-angle-axis-tick-line"},h,y)),o&&e.renderTickItem(o,b,l?l(g.value,p):g.value))});return Y.createElement(Hn,{className:"recharts-polar-angle-axis-ticks"},d)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.radius,o=r.axisLine;return a<=0||!i||!i.length?null:Y.createElement(Hn,{className:"recharts-polar-angle-axis"},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,a){var o;return Y.isValidElement(r)?o=Y.cloneElement(r,i):Ft(r)?o=r(i):o=Y.createElement(Up,Cu({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}]),e}(F.PureComponent);WA(JA,"displayName","PolarAngleAxis");WA(JA,"axisType","angleAxis");WA(JA,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var D5e=aj,L5e=D5e(Object.getPrototypeOf,Object),$5e=L5e,U5e=Bl,F5e=$5e,j5e=Dl,z5e="[object Object]",H5e=Function.prototype,G5e=Object.prototype,Wz=H5e.toString,V5e=G5e.hasOwnProperty,Q5e=Wz.call(Object);function K5e(t){if(!j5e(t)||U5e(t)!=z5e)return!1;var e=F5e(t);if(e===null)return!0;var n=V5e.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Wz.call(n)==Q5e}var W5e=K5e;const J5e=Xt(W5e);var Y5e=Bl,X5e=Dl,Z5e="[object Boolean]";function q5e(t){return t===!0||t===!1||X5e(t)&&Y5e(t)==Z5e}var e3e=q5e;const t3e=Xt(e3e);function Z1(t){"@babel/helpers - typeof";return Z1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z1(t)}function Xx(){return Xx=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:u,lowerWidth:f,height:h,x:l,y:c},duration:p,animationEasing:g,isActive:m},function(x){var A=x.upperWidth,S=x.lowerWidth,E=x.height,T=x.x,C=x.y;return Y.createElement(tu,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:p,easing:g},Y.createElement("path",Xx({},It(n,!0),{className:b,d:gR(T,C,A,S,E),ref:r})))}):Y.createElement("g",null,Y.createElement("path",Xx({},It(n,!0),{className:b,d:gR(l,c,u,f,h)})))},h3e=["option","shapeType","propTransformer","activeClassName","isActive"];function q1(t){"@babel/helpers - typeof";return q1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q1(t)}function d3e(t,e){if(t==null)return{};var n=p3e(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function p3e(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function yR(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zx(t){for(var e=1;e0?Po(x,"paddingAngle",0):0;if(S){var T=sN(S.endAngle-S.startAngle,x.endAngle-x.startAngle),C=An(An({},x),{},{startAngle:b+E,endAngle:b+T(p)+E});y.push(C),b=C.endAngle}else{var N=x.endAngle,B=x.startAngle,L=sN(0,N-B),U=L(p),j=An(An({},x),{},{startAngle:b+E,endAngle:b+U+E});y.push(j),b=j.endAngle}}),Y.createElement(Hn,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,a=r.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!S4(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,c=i.cx,u=i.cy,f=i.innerRadius,h=i.outerRadius,d=i.isAnimationActive,g=this.state.isAnimationFinished;if(a||!o||!o.length||!je(c)||!je(u)||!je(f)||!je(h))return null;var p=On("recharts-pie",s);return Y.createElement(Hn,{tabIndex:this.props.rootTabIndex,className:p,ref:function(m){r.pieRef=m}},this.renderSectors(),l&&this.renderLabels(o),Sr.renderCallByParent(this.props,null,!1),(!d||g)&&Qf.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r=360?b:b-1)*l,A=y-b*d-x,S=r.reduce(function(C,N){var B=aa(N,m,0);return C+(je(B)?B:0)},0),E;if(S>0){var T;E=r.map(function(C,N){var B=aa(C,m,0),L=aa(C,u,N),U=(je(B)?B:0)/S,j;N?j=T.endAngle+Ua(p)*l*(B!==0?1:0):j=o;var X=j+Ua(p)*((B!==0?d:0)+U*A),G=(j+X)/2,H=(g.innerRadius+g.outerRadius)/2,re=[{name:L,value:B,payload:C,dataKey:m,type:h}],V=yn(g.cx,g.cy,H,G);return T=An(An(An({percent:U,cornerRadius:a,name:L,tooltipPayload:re,midAngle:G,middleRadius:H,tooltipPosition:V},C),g),{},{value:aa(C,m),startAngle:j,endAngle:X,payload:C,paddingAngle:Ua(p)*l}),T})}return An(An({},g),{},{sectors:E,data:r})});var B3e=Math.ceil,D3e=Math.max;function L3e(t,e,n,r){for(var i=-1,a=D3e(B3e((e-t)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=t,t+=n;return o}var $3e=L3e,U3e=Sj,wR=1/0,F3e=17976931348623157e292;function j3e(t){if(!t)return t===0?t:0;if(t=U3e(t),t===wR||t===-wR){var e=t<0?-1:1;return e*F3e}return t===t?t:0}var z3e=j3e,H3e=$3e,G3e=MA,LE=z3e;function V3e(t){return function(e,n,r){return r&&typeof r!="number"&&G3e(e,n,r)&&(n=r=void 0),e=LE(e),n===void 0?(n=e,e=0):n=LE(n),r=r===void 0?e0&&r.handleDrag(i.changedTouches[0])}),Wi(Bo(r),"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),Wi(Bo(r),"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Wi(Bo(r),"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Wi(Bo(r),"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Wi(Bo(r),"handleSlideDragStart",function(i){var a=PR(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(Bo(r),"startX"),endX:r.handleTravellerDragStart.bind(Bo(r),"endX")},r.state={},r}return t8e(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,f=Math.min(i,a),h=Math.max(i,a),d=e.getIndexInRange(o,f),g=e.getIndexInRange(o,h);return{startIndex:d-d%l,endIndex:g===u?u:g-g%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=aa(a[r],s,r);return Ft(o)?o(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,c=l.x,u=l.width,f=l.travellerWidth,h=l.startIndex,d=l.endIndex,g=l.onChange,p=r.pageX-a;p>0?p=Math.min(p,c+u-f-s,c+u-f-o):p<0&&(p=Math.max(p,c-o,c-s));var y=this.getIndex({startX:o+p,endX:s+p});(y.startIndex!==h||y.endIndex!==d)&&g&&g(y),this.setState({startX:o+p,endX:s+p,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=PR(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,c=this.state[o],u=this.props,f=u.x,h=u.width,d=u.travellerWidth,g=u.onChange,p=u.gap,y=u.data,m={startX:this.state.startX,endX:this.state.endX},b=r.pageX-a;b>0?b=Math.min(b,f+h-d-c):b<0&&(b=Math.max(b,f-c)),m[o]=c+b;var x=this.getIndex(m),A=x.startIndex,S=x.endIndex,E=function(){var C=y.length-1;return o==="startX"&&(s>l?A%p===0:S%p===0)||sl?S%p===0:A%p===0)||s>l&&S===C};this.setState(Wi(Wi({},o,c+b),"brushMoveStartX",r.pageX),function(){g&&E()&&g(x)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,c=o.endX,u=this.state[i],f=s.indexOf(u);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var d=s[h];i==="startX"&&d>=c||i==="endX"&&d<=l||this.setState(Wi({},i,d),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.fill,c=r.stroke;return Y.createElement("rect",{stroke:c,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,f=F.Children.only(c);return f?Y.cloneElement(f,{x:i,y:a,width:o,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var a=this,o=this.props,s=o.y,l=o.travellerWidth,c=o.height,u=o.traveller,f=o.ariaLabel,h=o.data,d=o.startIndex,g=o.endIndex,p=Math.max(r,this.props.x),y=$E($E({},It(this.props,!1)),{},{x:p,y:s,width:l,height:c}),m=f||"Min value: ".concat(h[d].name,", Max value: ").concat(h[g].name);return Y.createElement(Hn,{tabIndex:0,role:"slider","aria-label":m,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(x){["ArrowLeft","ArrowRight"].includes(x.key)&&(x.preventDefault(),x.stopPropagation(),a.handleTravellerMoveKeyboard(x.key==="ArrowRight"?1:-1,i))},onFocus:function(){a.setState({isTravellerFocused:!0})},onBlur:function(){a.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(u,y))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,c=a.travellerWidth,u=Math.min(r,i)+c,f=Math.max(Math.abs(i-r)-c,0);return Y.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:o,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,f=u.startX,h=u.endX,d=5,g={pointerEvents:"none",fill:c};return Y.createElement(Hn,{className:"recharts-brush-texts"},Y.createElement(Up,t2({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-d,y:o+s/2},g),this.getTextOfTick(i)),Y.createElement(Up,t2({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+d,y:o+s/2},g),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,s=r.x,l=r.y,c=r.width,u=r.height,f=r.alwaysShowText,h=this.state,d=h.startX,g=h.endX,p=h.isTextActive,y=h.isSlideMoving,m=h.isTravellerMoving,b=h.isTravellerFocused;if(!i||!i.length||!je(s)||!je(l)||!je(c)||!je(u)||c<=0||u<=0)return null;var x=On("recharts-brush",a),A=Y.Children.count(o)===1,S=q3e("userSelect","none");return Y.createElement(Hn,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(d,g),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(g,"endX"),(p||y||m||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,s=r.height,l=r.stroke,c=Math.floor(a+s/2)-1;return Y.createElement(Y.Fragment,null,Y.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),Y.createElement("line",{x1:i+1,y1:c,x2:i+o-1,y2:c,fill:"none",stroke:"#fff"}),Y.createElement("line",{x1:i+1,y1:c+2,x2:i+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return Y.isValidElement(r)?a=Y.cloneElement(r,i):Ft(r)?a=r(i):a=e.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,f=r.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return $E({prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o},a&&a.length?o8e({data:a,width:o,x:s,travellerWidth:l,startIndex:u,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(d){return i.scale(d)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);r[l]>i?s=l:o=l}return i>=r[s]?s:o}}]),e}(F.PureComponent);Wi(Jp,"displayName","Brush");Wi(Jp,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var s8e=ZO;function l8e(t,e){var n;return s8e(t,function(r,i,a){return n=e(r,i,a),!n}),!!n}var c8e=l8e,u8e=XF,f8e=cu,h8e=c8e,d8e=Fi,p8e=MA;function g8e(t,e,n){var r=d8e(t)?u8e:h8e;return n&&p8e(t,e,n)&&(e=void 0),r(t,f8e(e))}var y8e=g8e;const m8e=Xt(y8e);var cs=function(e,n){var r=e.alwaysShow,i=e.ifOverflow;return r&&(i="extendDomain"),i===n},OR=bj;function v8e(t,e,n){e=="__proto__"&&OR?OR(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var b8e=v8e,w8e=b8e,x8e=mj,A8e=cu;function E8e(t,e){var n={};return e=A8e(e),x8e(t,function(r,i,a){w8e(n,i,e(r,i,a))}),n}var S8e=E8e;const P8e=Xt(S8e);function O8e(t,e){for(var n=-1,r=t==null?0:t.length;++n1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new t(n)}}]),t}();N4(nH,"EPS",1e-4);var I4=function(e){var n=Object.keys(e).reduce(function(r,i){return Pb(Pb({},r),{},N4({},i,nH.create(e[i])))},{});return Pb(Pb({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return P8e(i,function(l,c){return n[c].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return $8e(i,function(a,o){return n[o].isInRange(a)})}})},H8e=zle(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),rH=F.createContext(void 0),iH=F.createContext(void 0),aH=F.createContext(void 0),G8e=F.createContext({}),oH=F.createContext(void 0),V8e=F.createContext(0),Q8e=F.createContext(0),kR=function(e){var n=e.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=e.clipPathId,s=e.children,l=e.width,c=e.height,u=H8e(a);return Y.createElement(rH.Provider,{value:r},Y.createElement(iH.Provider,{value:i},Y.createElement(G8e.Provider,{value:a},Y.createElement(aH.Provider,{value:u},Y.createElement(oH.Provider,{value:o},Y.createElement(V8e.Provider,{value:c},Y.createElement(Q8e.Provider,{value:l},s)))))))},K8e=function(){return F.useContext(oH)},W8e=function(e){var n=F.useContext(rH);n==null&&Hp(!1);var r=n[e];return r==null&&Hp(!1),r},J8e=function(e){var n=F.useContext(iH);n==null&&Hp(!1);var r=n[e];return r==null&&Hp(!1),r},Y8e=function(){var e=F.useContext(aH);return e};function rm(t){"@babel/helpers - typeof";return rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rm(t)}function _R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function NR(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function LSe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function $Se(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zR(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0?o:e&&e.length&&je(i)&&je(a)?e.slice(i,a+1):[]};function pH(t){return t==="number"?[0,"auto"]:void 0}var wS=function(e,n,r,i){var a=e.graphicalItems,o=e.tooltipAxis,s=ZA(n,e);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(l,c){var u,f=(u=c.props.data)!==null&&u!==void 0?u:n;f&&e.dataStartIndex+e.dataEndIndex!==0&&(f=f.slice(e.dataStartIndex,e.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var d=f===void 0?s:f;h=i8(d,o.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(Xp(l),[tAe(c,h)]):l},[])},GR=function(e,n,r,i){var a=i||{x:e.chartX,y:e.chartY},o=JSe(a,r),s=e.orderedTooltipTicks,l=e.tooltipAxis,c=e.tooltipTicks,u=U2e(o,s,c,l);if(u>=0&&c){var f=c[u]&&c[u].value,h=wS(e,n,u,f),d=YSe(r,s,u,a);return{activeTooltipIndex:u,activeLabel:f,activePayload:h,activeCoordinate:d}}return null},XSe=function(e,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.layout,f=e.children,h=e.stackOffset,d=Oz(u,a);return r.reduce(function(g,p){var y,m=p.props,b=m.type,x=m.dataKey,A=m.allowDataOverflow,S=m.allowDuplicatedCategory,E=m.scale,T=m.ticks,C=m.includeHidden,N=p.props[o];if(g[N])return g;var B=ZA(e.data,{graphicalItems:i.filter(function(we){return we.props[o]===N}),dataStartIndex:l,dataEndIndex:c}),L=B.length,U,j,X;PSe(p.props.domain,A,b)&&(U=G8(p.props.domain,null,A),d&&(b==="number"||E!=="auto")&&(X=Ry(B,x,"category")));var G=pH(b);if(!U||U.length===0){var H,re=(H=p.props.domain)!==null&&H!==void 0?H:G;if(x){if(U=Ry(B,x,b),b==="category"&&d){var V=jce(U);S&&V?(j=U,U=e2(0,L)):S||(U=x9(re,U,p).reduce(function(we,Ye){return we.indexOf(Ye)>=0?we:[].concat(Xp(we),[Ye])},[]))}else if(b==="category")S?U=U.filter(function(we){return we!==""&&!Yt(we)}):U=x9(re,U,p).reduce(function(we,Ye){return we.indexOf(Ye)>=0||Ye===""||Yt(Ye)?we:[].concat(Xp(we),[Ye])},[]);else if(b==="number"){var ee=G2e(B,i.filter(function(we){return we.props[o]===N&&(C||!we.props.hide)}),x,a,u);ee&&(U=ee)}d&&(b==="number"||E!=="auto")&&(X=Ry(B,x,"category"))}else d?U=e2(0,L):s&&s[N]&&s[N].hasStack&&b==="number"?U=h==="expand"?[0,1]:Tz(s[N].stackGroups,l,c):U=Pz(B,i.filter(function(we){return we.props[o]===N&&(C||!we.props.hide)}),b,u,!0);if(b==="number")U=mS(f,U,N,a,T),re&&(U=G8(re,U,A));else if(b==="category"&&re){var pe=re,Ae=U.every(function(we){return pe.indexOf(we)>=0});Ae&&(U=pe)}}return he(he({},g),{},bt({},N,he(he({},p.props),{},{axisType:a,domain:U,categoricalDomain:X,duplicateDomain:j,originalDomain:(y=p.props.domain)!==null&&y!==void 0?y:G,isCategorical:d,layout:u})))},{})},ZSe=function(e,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.layout,f=e.children,h=ZA(e.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),d=h.length,g=Oz(u,a),p=-1;return r.reduce(function(y,m){var b=m.props[o],x=pH("number");if(!y[b]){p++;var A;return g?A=e2(0,d):s&&s[b]&&s[b].hasStack?(A=Tz(s[b].stackGroups,l,c),A=mS(f,A,b,a)):(A=G8(x,Pz(h,r.filter(function(S){return S.props[o]===b&&!S.props.hide}),"number",u),i.defaultProps.allowDataOverflow),A=mS(f,A,b,a)),he(he({},y),{},bt({},b,he(he({axisType:a},i.defaultProps),{},{hide:!0,orientation:Po(KSe,"".concat(a,".").concat(p%2),null),domain:A,originalDomain:x,isCategorical:g,layout:u})))}return y},{})},qSe=function(e,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.children,f="".concat(i,"Id"),h=ss(u,a),d={};return h&&h.length?d=XSe(e,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(d=ZSe(e,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),d},ePe=function(e){var n=Gh(e),r=dy(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:qO(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:V8(n,r)}},VR=function(e){var n=e.children,r=e.defaultShowTooltip,i=Ra(n,Jp),a=0,o=0;return e.data&&e.data.length!==0&&(o=e.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},tPe=function(e){return!e||!e.length?!1:e.some(function(n){var r=gl(n&&n.type);return r&&r.indexOf("Bar")>=0})},QR=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},nPe=function(e,n){var r=e.props,i=e.graphicalItems,a=e.xAxisMap,o=a===void 0?{}:a,s=e.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,f=r.children,h=r.margin||{},d=Ra(f,Jp),g=Ra(f,T1),p=Object.keys(l).reduce(function(S,E){var T=l[E],C=T.orientation;return!T.mirror&&!T.hide?he(he({},S),{},bt({},C,S[C]+T.width)):S},{left:h.left||0,right:h.right||0}),y=Object.keys(o).reduce(function(S,E){var T=o[E],C=T.orientation;return!T.mirror&&!T.hide?he(he({},S),{},bt({},C,Po(S,"".concat(C))+T.height)):S},{top:h.top||0,bottom:h.bottom||0}),m=he(he({},y),p),b=m.bottom;d&&(m.bottom+=d.props.height||Jp.defaultProps.height),g&&n&&(m=z2e(m,i,r,n));var x=c-m.left-m.right,A=u-m.top-m.bottom;return he(he({brushBottom:b},m),{},{width:Math.max(x,0),height:Math.max(A,0)})},rPe=function(e){var n,r=e.chartName,i=e.GraphicalChild,a=e.defaultTooltipEventType,o=a===void 0?"axis":a,s=e.validateTooltipEventTypes,l=s===void 0?["axis"]:s,c=e.axisComponents,u=e.legendContent,f=e.formatAxisMap,h=e.defaultProps,d=function(y,m){var b=m.graphicalItems,x=m.stackGroups,A=m.offset,S=m.updateId,E=m.dataStartIndex,T=m.dataEndIndex,C=y.barSize,N=y.layout,B=y.barGap,L=y.barCategoryGap,U=y.maxBarSize,j=QR(N),X=j.numericAxisName,G=j.cateAxisName,H=tPe(b),re=H&&F2e({barSize:C,stackGroups:x}),V=[];return b.forEach(function(ee,pe){var Ae=ZA(y.data,{graphicalItems:[ee],dataStartIndex:E,dataEndIndex:T}),we=ee.props,Ye=we.dataKey,nt=we.maxBarSize,De=ee.props["".concat(X,"Id")],st=ee.props["".concat(G,"Id")],Tt={},ln=c.reduce(function(yt,Pe){var nn=m["".concat(Pe.axisType,"Map")],cn=ee.props["".concat(Pe.axisType,"Id")];nn&&nn[cn]||Pe.axisType==="zAxis"||Hp(!1);var Gn=nn[cn];return he(he({},yt),{},bt(bt({},Pe.axisType,Gn),"".concat(Pe.axisType,"Ticks"),dy(Gn)))},Tt),Ee=ln[G],ne=ln["".concat(G,"Ticks")],le=x&&x[De]&&x[De].hasStack&&q2e(ee,x[De].stackGroups),te=gl(ee.type).indexOf("Bar")>=0,Ce=V8(Ee,ne),Se=[];if(te){var ze,$e,rt=Yt(nt)?U:nt,dt=(ze=($e=V8(Ee,ne,!0))!==null&&$e!==void 0?$e:rt)!==null&&ze!==void 0?ze:0;Se=j2e({barGap:B,barCategoryGap:L,bandSize:dt!==Ce?dt:Ce,sizeList:re[st],maxBarSize:rt}),dt!==Ce&&(Se=Se.map(function(yt){return he(he({},yt),{},{position:he(he({},yt.position),{},{offset:yt.position.offset-dt/2})})}))}var wt=ee&&ee.type&&ee.type.getComposedData;wt&&V.push({props:he(he({},wt(he(he({},ln),{},{displayedData:Ae,props:y,dataKey:Ye,item:ee,bandSize:Ce,barPosition:Se,offset:A,stackedData:le,layout:N,dataStartIndex:E,dataEndIndex:T}))),{},bt(bt(bt({key:ee.key||"item-".concat(pe)},X,ln[X]),G,ln[G]),"animationId",S)),childIndex:Zce(ee,y.children),item:ee})}),V},g=function(y,m){var b=y.props,x=y.dataStartIndex,A=y.dataEndIndex,S=y.updateId;if(!hN({props:b}))return null;var E=b.children,T=b.layout,C=b.stackOffset,N=b.data,B=b.reverseStackOrder,L=QR(T),U=L.numericAxisName,j=L.cateAxisName,X=ss(E,i),G=X2e(N,X,"".concat(U,"Id"),"".concat(j,"Id"),C,B),H=c.reduce(function(Ae,we){var Ye="".concat(we.axisType,"Map");return he(he({},Ae),{},bt({},Ye,qSe(b,he(he({},we),{},{graphicalItems:X,stackGroups:we.axisType===U&&G,dataStartIndex:x,dataEndIndex:A}))))},{}),re=nPe(he(he({},H),{},{props:b,graphicalItems:X}),m==null?void 0:m.legendBBox);Object.keys(H).forEach(function(Ae){H[Ae]=f(b,H[Ae],re,Ae.replace("Map",""),r)});var V=H["".concat(j,"Map")],ee=ePe(V),pe=d(b,he(he({},H),{},{dataStartIndex:x,dataEndIndex:A,updateId:S,graphicalItems:X,stackGroups:G,offset:re}));return he(he({formattedGraphicalItems:pe,graphicalItems:X,offset:re,stackGroups:G},ee),H)};return n=function(p){zSe(y,p);function y(m){var b,x,A;return $Se(this,y),A=FSe(this,y,[m]),bt(Qt(A),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),bt(Qt(A),"accessibilityManager",new SSe),bt(Qt(A),"handleLegendBBoxUpdate",function(S){if(S){var E=A.state,T=E.dataStartIndex,C=E.dataEndIndex,N=E.updateId;A.setState(he({legendBBox:S},g({props:A.props,dataStartIndex:T,dataEndIndex:C,updateId:N},he(he({},A.state),{},{legendBBox:S}))))}}),bt(Qt(A),"handleReceiveSyncEvent",function(S,E,T){if(A.props.syncId===S){if(T===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(E)}}),bt(Qt(A),"handleBrushChange",function(S){var E=S.startIndex,T=S.endIndex;if(E!==A.state.dataStartIndex||T!==A.state.dataEndIndex){var C=A.state.updateId;A.setState(function(){return he({dataStartIndex:E,dataEndIndex:T},g({props:A.props,dataStartIndex:E,dataEndIndex:T,updateId:C},A.state))}),A.triggerSyncEvent({dataStartIndex:E,dataEndIndex:T})}}),bt(Qt(A),"handleMouseEnter",function(S){var E=A.getMouseInfo(S);if(E){var T=he(he({},E),{},{isTooltipActive:!0});A.setState(T),A.triggerSyncEvent(T);var C=A.props.onMouseEnter;Ft(C)&&C(T,S)}}),bt(Qt(A),"triggeredAfterMouseMove",function(S){var E=A.getMouseInfo(S),T=E?he(he({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(T),A.triggerSyncEvent(T);var C=A.props.onMouseMove;Ft(C)&&C(T,S)}),bt(Qt(A),"handleItemMouseEnter",function(S){A.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),bt(Qt(A),"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),bt(Qt(A),"handleMouseMove",function(S){S.persist(),A.throttleTriggeredAfterMouseMove(S)}),bt(Qt(A),"handleMouseLeave",function(S){A.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};A.setState(E),A.triggerSyncEvent(E);var T=A.props.onMouseLeave;Ft(T)&&T(E,S)}),bt(Qt(A),"handleOuterEvent",function(S){var E=Xce(S),T=Po(A.props,"".concat(E));if(E&&Ft(T)){var C,N;/.*touch.*/i.test(E)?N=A.getMouseInfo(S.changedTouches[0]):N=A.getMouseInfo(S),T((C=N)!==null&&C!==void 0?C:{},S)}}),bt(Qt(A),"handleClick",function(S){var E=A.getMouseInfo(S);if(E){var T=he(he({},E),{},{isTooltipActive:!0});A.setState(T),A.triggerSyncEvent(T);var C=A.props.onClick;Ft(C)&&C(T,S)}}),bt(Qt(A),"handleMouseDown",function(S){var E=A.props.onMouseDown;if(Ft(E)){var T=A.getMouseInfo(S);E(T,S)}}),bt(Qt(A),"handleMouseUp",function(S){var E=A.props.onMouseUp;if(Ft(E)){var T=A.getMouseInfo(S);E(T,S)}}),bt(Qt(A),"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),bt(Qt(A),"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&A.handleMouseDown(S.changedTouches[0])}),bt(Qt(A),"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&A.handleMouseUp(S.changedTouches[0])}),bt(Qt(A),"triggerSyncEvent",function(S){A.props.syncId!==void 0&&UE.emit(FE,A.props.syncId,S,A.eventEmitterSymbol)}),bt(Qt(A),"applySyncEvent",function(S){var E=A.props,T=E.layout,C=E.syncMethod,N=A.state.updateId,B=S.dataStartIndex,L=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)A.setState(he({dataStartIndex:B,dataEndIndex:L},g({props:A.props,dataStartIndex:B,dataEndIndex:L,updateId:N},A.state)));else if(S.activeTooltipIndex!==void 0){var U=S.chartX,j=S.chartY,X=S.activeTooltipIndex,G=A.state,H=G.offset,re=G.tooltipTicks;if(!H)return;if(typeof C=="function")X=C(re,S);else if(C==="value"){X=-1;for(var V=0;V=0){var ne,le;if(U.dataKey&&!U.allowDuplicatedCategory){var te=typeof U.dataKey=="function"?Ee:"payload.".concat(U.dataKey.toString());ne=i8(V,te,X),le=ee&&pe&&i8(pe,te,X)}else ne=V==null?void 0:V[j],le=ee&&pe&&pe[j];if(De||nt){var Ce=S.props.activeIndex!==void 0?S.props.activeIndex:j;return[F.cloneElement(S,he(he(he({},C.props),Tt),{},{activeIndex:Ce})),null,null]}if(!Yt(ne))return[ln].concat(Xp(A.renderActivePoints({item:C,activePoint:ne,basePoint:le,childIndex:j,isRange:ee})))}else{var Se,ze=(Se=A.getItemByXY(A.state.activeCoordinate))!==null&&Se!==void 0?Se:{graphicalItem:ln},$e=ze.graphicalItem,rt=$e.item,dt=rt===void 0?S:rt,wt=$e.childIndex,yt=he(he(he({},C.props),Tt),{},{activeIndex:wt});return[F.cloneElement(dt,yt),null,null]}return ee?[ln,null,null]:[ln,null]}),bt(Qt(A),"renderCustomized",function(S,E,T){return F.cloneElement(S,he(he({key:"recharts-customized-".concat(T)},A.props),A.state))}),bt(Qt(A),"renderMap",{CartesianGrid:{handler:Tb,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Tb},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Tb},YAxis:{handler:Tb},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((b=m.id)!==null&&b!==void 0?b:OA("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=Pj(A.triggeredAfterMouseMove,(x=m.throttleDelay)!==null&&x!==void 0?x:1e3/60),A.state={},A}return USe(y,[{key:"componentDidMount",value:function(){var b,x;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(x=this.props.margin.top)!==null&&x!==void 0?x:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,x=b.children,A=b.data,S=b.height,E=b.layout,T=Ra(x,Ss);if(T){var C=T.props.defaultIndex;if(!(typeof C!="number"||C<0||C>this.state.tooltipTicks.length)){var N=this.state.tooltipTicks[C]&&this.state.tooltipTicks[C].value,B=wS(this.state,A,C,N),L=this.state.tooltipTicks[C].coordinate,U=(this.state.offset.top+S)/2,j=E==="horizontal",X=j?{x:L,y:U}:{y:L,x:U},G=this.state.formattedGraphicalItems.find(function(re){var V=re.item;return V.type.name==="Scatter"});G&&(X=he(he({},X),G.props.points[C].tooltipPosition),B=G.props.points[C].tooltipPayload);var H={activeTooltipIndex:C,isTooltipActive:!0,activeLabel:N,activePayload:B,activeCoordinate:X};this.setState(H),this.renderCursor(T),this.accessibilityManager.setIndex(C)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,x){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==x.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var A,S;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(b){s8([Ra(b.children,Ss)],[Ra(this.props.children,Ss)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Ra(this.props.children,Ss);if(b&&typeof b.props.shared=="boolean"){var x=b.props.shared?"axis":"item";return l.indexOf(x)>=0?x:o}return o}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var x=this.container,A=x.getBoundingClientRect(),S=xve(A),E={chartX:Math.round(b.pageX-S.left),chartY:Math.round(b.pageY-S.top)},T=A.width/x.offsetWidth||1,C=this.inRange(E.chartX,E.chartY,T);if(!C)return null;var N=this.state,B=N.xAxisMap,L=N.yAxisMap,U=this.getTooltipEventType();if(U!=="axis"&&B&&L){var j=Gh(B).scale,X=Gh(L).scale,G=j&&j.invert?j.invert(E.chartX):null,H=X&&X.invert?X.invert(E.chartY):null;return he(he({},E),{},{xValue:G,yValue:H})}var re=GR(this.state,this.props.data,this.props.layout,C);return re?he(he({},E),re):null}},{key:"inRange",value:function(b,x){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,E=b/A,T=x/A;if(S==="horizontal"||S==="vertical"){var C=this.state.offset,N=E>=C.left&&E<=C.left+C.width&&T>=C.top&&T<=C.top+C.height;return N?{x:E,y:T}:null}var B=this.state,L=B.angleAxisMap,U=B.radiusAxisMap;if(L&&U){var j=Gh(L);return S9({x:E,y:T},j)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,x=this.getTooltipEventType(),A=Ra(b,Ss),S={};A&&x==="axis"&&(A.props.trigger==="click"?S={onClick:this.handleClick}:S={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var E=mx(this.props,this.handleOuterEvent);return he(he({},E),S)}},{key:"addListener",value:function(){UE.on(FE,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){UE.removeListener(FE,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,x,A){for(var S=this.state.formattedGraphicalItems,E=0,T=S.length;E{const r=F.useMemo(()=>t.map(({value:i,...a})=>({...a,value:Number(i)})),[t]);return Z.jsx("div",{className:Er.clsx(X_.pieChart,n),children:Z.jsx(pve,{width:"100%",height:"100%",children:Z.jsx(iPe,{children:Z.jsx($l,{dataKey:"value",data:r,innerRadius:50,outerRadius:100,legendType:"none",children:r.map(({name:i})=>Z.jsx(t4,{className:X_.pieChartCell,fill:e[i],stroke:e[i]},i))})})})})},oPe="_table_1lmm4_1",sPe={table:oPe},lPe=({headers:t,data:e,className:n,children:r})=>Z.jsxs("table",{className:Er.clsx(sPe.table,n),children:[Z.jsx("thead",{children:Z.jsx("tr",{children:t.map(i=>Z.jsx("th",{children:i},i))})}),Z.jsx("tbody",{children:e.map(r)})]}),cPe=["Answer","Votes","%"],KR=["#006dd2","#45f1f4","#bbbbbb"],WR="Below are the final results of the mascot poll.",uPe=()=>{const{getVoteCounts:t}=nv(),{state:{poll:e,isDesktopScreen:n,isMobileScreen:r}}=ig(),[i,a]=F.useState([]);F.useEffect(()=>{if((e==null?void 0:e.active)===!0)return;let u=!0;return(async()=>{const h=await t();u&&a(h)})(),()=>{u=!1}},[]);const[o,s,l,c]=F.useMemo(()=>{if(!i.length)return[[],0n,void 0,{}];const u=Y7.map((g,p)=>({...g,value:i[p]})).sort(({value:g},{value:p})=>g>p?-1:gg+p,0n),[h]=u,d=u.reduce((g,{name:p},y)=>({...g,[p]:KR[y%KR.length]}),{});return[u,f,h,d]},[i]);return(e==null?void 0:e.active)===!0?Z.jsx(K7,{to:"/",replace:!0}):Z.jsxs("div",{children:[r&&Z.jsx("p",{className:ws.headerText,children:WR}),Z.jsxs(AP,{children:[n&&Z.jsx("p",{className:ws.cardHeaderText,children:WR}),l&&Z.jsx("div",{className:ws.winningMascot,children:Z.jsx(uD,{selected:!0,orientation:n?"horizontal":"vertical",title:l.name,description:l.description,image:Z.jsx("img",{alt:l.name,src:l.imagePath}),actions:Z.jsxs("div",{className:ws.winningMascotBadge,children:[Z.jsx("span",{children:"Winning mascot"}),Z.jsx(roe,{size:n?"small":void 0,width:n?void 0:18,height:n?void 0:18})]})})}),Z.jsxs("div",{className:ws.mascotPollData,children:[Z.jsx(aPe,{className:ws.mascotPollDataPieChart,data:o,colorMap:c}),Z.jsx(lPe,{className:ws.mascotResultsTable,headers:cPe,data:o,children:({name:u,value:f})=>Z.jsxs("tr",{style:{color:c[u]},children:[Z.jsx("td",{children:Z.jsx("span",{className:ws.answerColName,children:u})}),Z.jsx("td",{children:f.toLocaleString()}),Z.jsx("td",{children:new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2}).format(f/s)})]},u)})]}),(!!_6||!!(e!=null&&e.params.closeTimestamp))&&Z.jsxs("p",{className:ws.cardFooterText,children:["Poll opened",!!_6&&Z.jsxs(Z.Fragment,{children:[" from ",ld.intlDateFormat(ld.unixFormatToDate(_6))]}),!!(e!=null&&e.params.closeTimestamp)&&Z.jsxs(Z.Fragment,{children:[" until ",ld.intlDateFormat(ld.unixFormatToDate(e.params.closeTimestamp))]}),"."]})]})]})},fPe=(t=localStorage)=>({set:(a,o)=>{try{const s=JSON.stringify(o);t.setItem(a,s)}catch(s){console.error(s)}},get:a=>{try{const o=t.getItem(a);return o?JSON.parse(o):void 0}catch(o){console.error(o)}},removeItem:a=>{t.removeItem(a)},clear:()=>{t.clear()}});var M4=(t=>(t.Votes="Votes",t))(M4||{}),gH={exports:{}};(function(t,e){(function(r,i){t.exports=i(F)})(Kg,n=>(()=>{var r={"./node_modules/css-mediaquery/index.js":(s,l)=>{l.match=g,l.parse=p;var c=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,u=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,f=/^(?:(min|max)-)?(.+)/,h=/(em|rem|px|cm|mm|in|pt|pc)?$/,d=/(dpi|dpcm|dppx)?$/;function g(x,A){return p(x).some(function(S){var E=S.inverse,T=S.type==="all"||A.type===S.type;if(T&&E||!(T||E))return!1;var C=S.expressions.every(function(N){var B=N.feature,L=N.modifier,U=N.value,j=A[B];if(!j)return!1;switch(B){case"orientation":case"scan":return j.toLowerCase()===U.toLowerCase();case"width":case"height":case"device-width":case"device-height":U=b(U),j=b(j);break;case"resolution":U=m(U),j=m(j);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":U=y(U),j=y(j);break;case"grid":case"color":case"color-index":case"monochrome":U=parseInt(U,10)||1,j=parseInt(j,10)||0;break}switch(L){case"min":return j>=U;case"max":return j<=U;default:return j===U}});return C&&!E||!C&&E})}function p(x){return x.split(",").map(function(A){A=A.trim();var S=A.match(c),E=S[1],T=S[2],C=S[3]||"",N={};return N.inverse=!!E&&E.toLowerCase()==="not",N.type=T?T.toLowerCase():"all",C=C.match(/\([^\)]+\)/g)||[],N.expressions=C.map(function(B){var L=B.match(u),U=L[1].toLowerCase().match(f);return{modifier:U[1],feature:U[2],value:L[2]}}),N})}function y(x){var A=Number(x),S;return A||(S=x.match(/^(\d+)\s*\/\s*(\d+)$/),A=S[1]/S[2]),A}function m(x){var A=parseFloat(x),S=String(x).match(d)[1];switch(S){case"dpcm":return A/2.54;case"dppx":return A*96;default:return A}}function b(x){var A=parseFloat(x),S=String(x).match(h)[1];switch(S){case"em":return A*16;case"rem":return A*16;case"cm":return A*96/2.54;case"mm":return A*96/2.54/10;case"in":return A*96;case"pt":return A*72;case"pc":return A*72/12;default:return A}}},"./node_modules/hyphenate-style-name/index.js":(s,l,c)=>{c.r(l),c.d(l,{default:()=>p});var u=/[A-Z]/g,f=/^ms-/,h={};function d(y){return"-"+y.toLowerCase()}function g(y){if(h.hasOwnProperty(y))return h[y];var m=y.replace(u,d);return h[y]=f.test(m)?"-"+m:m}const p=g},"./node_modules/matchmediaquery/index.js":(s,l,c)=>{var u=c("./node_modules/css-mediaquery/index.js").match,f=typeof window<"u"?window.matchMedia:null;function h(g,p,y){var m=this;if(f&&!y){var b=f.call(window,g);this.matches=b.matches,this.media=b.media,b.addListener(S)}else this.matches=u(g,p),this.media=g;this.addListener=x,this.removeListener=A,this.dispose=E;function x(T){b&&b.addListener(T)}function A(T){b&&b.removeListener(T)}function S(T){m.matches=T.matches,m.media=T.media}function E(){b&&b.removeListener(S)}}function d(g,p,y){return new h(g,p,y)}s.exports=d},"./node_modules/object-assign/index.js":s=>{/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;function f(d){if(d==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(d)}function h(){try{if(!Object.assign)return!1;var d=new String("abc");if(d[5]="de",Object.getOwnPropertyNames(d)[0]==="5")return!1;for(var g={},p=0;p<10;p++)g["_"+String.fromCharCode(p)]=p;var y=Object.getOwnPropertyNames(g).map(function(b){return g[b]});if(y.join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(b){m[b]=b}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}s.exports=h()?Object.assign:function(d,g){for(var p,y=f(d),m,b=1;b{var u=function(){};{var f=c("./node_modules/prop-types/lib/ReactPropTypesSecret.js"),h={},d=c("./node_modules/prop-types/lib/has.js");u=function(p){var y="Warning: "+p;typeof console<"u"&&console.error(y);try{throw new Error(y)}catch{}}}function g(p,y,m,b,x){for(var A in p)if(d(p,A)){var S;try{if(typeof p[A]!="function"){var E=Error((b||"React class")+": "+m+" type `"+A+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[A]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}S=p[A](y,A,b,m,null,f)}catch(C){S=C}if(S&&!(S instanceof Error)&&u((b||"React class")+": type specification of "+m+" `"+A+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof S+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),S instanceof Error&&!(S.message in h)){h[S.message]=!0;var T=x?x():"";u("Failed "+m+" type: "+S.message+(T??""))}}}g.resetWarningCache=function(){h={}},s.exports=g},"./node_modules/prop-types/factoryWithTypeCheckers.js":(s,l,c)=>{var u=c("./node_modules/react-is/index.js"),f=c("./node_modules/object-assign/index.js"),h=c("./node_modules/prop-types/lib/ReactPropTypesSecret.js"),d=c("./node_modules/prop-types/lib/has.js"),g=c("./node_modules/prop-types/checkPropTypes.js"),p=function(){};p=function(m){var b="Warning: "+m;typeof console<"u"&&console.error(b);try{throw new Error(b)}catch{}};function y(){return null}s.exports=function(m,b){var x=typeof Symbol=="function"&&Symbol.iterator,A="@@iterator";function S(ne){var le=ne&&(x&&ne[x]||ne[A]);if(typeof le=="function")return le}var E="<>",T={array:L("array"),bigint:L("bigint"),bool:L("boolean"),func:L("function"),number:L("number"),object:L("object"),string:L("string"),symbol:L("symbol"),any:U(),arrayOf:j,element:X(),elementType:G(),instanceOf:H,node:pe(),objectOf:V,oneOf:re,oneOfType:ee,shape:we,exact:Ye};function C(ne,le){return ne===le?ne!==0||1/ne===1/le:ne!==ne&&le!==le}function N(ne,le){this.message=ne,this.data=le&&typeof le=="object"?le:{},this.stack=""}N.prototype=Error.prototype;function B(ne){var le={},te=0;function Ce(ze,$e,rt,dt,wt,yt,Pe){if(dt=dt||E,yt=yt||rt,Pe!==h){if(b){var nn=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 nn.name="Invariant Violation",nn}else if(typeof console<"u"){var cn=dt+":"+rt;!le[cn]&&te<3&&(p("You are manually calling a React.PropTypes validation function for the `"+yt+"` prop on `"+dt+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),le[cn]=!0,te++)}}return $e[rt]==null?ze?$e[rt]===null?new N("The "+wt+" `"+yt+"` is marked as required "+("in `"+dt+"`, but its value is `null`.")):new N("The "+wt+" `"+yt+"` is marked as required in "+("`"+dt+"`, but its value is `undefined`.")):null:ne($e,rt,dt,wt,yt)}var Se=Ce.bind(null,!1);return Se.isRequired=Ce.bind(null,!0),Se}function L(ne){function le(te,Ce,Se,ze,$e,rt){var dt=te[Ce],wt=st(dt);if(wt!==ne){var yt=Tt(dt);return new N("Invalid "+ze+" `"+$e+"` of type "+("`"+yt+"` supplied to `"+Se+"`, expected ")+("`"+ne+"`."),{expectedType:ne})}return null}return B(le)}function U(){return B(y)}function j(ne){function le(te,Ce,Se,ze,$e){if(typeof ne!="function")return new N("Property `"+$e+"` of component `"+Se+"` has invalid PropType notation inside arrayOf.");var rt=te[Ce];if(!Array.isArray(rt)){var dt=st(rt);return new N("Invalid "+ze+" `"+$e+"` of type "+("`"+dt+"` supplied to `"+Se+"`, expected an array."))}for(var wt=0;wt1?p("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):p("Invalid argument supplied to oneOf, expected an array."),y;function le(te,Ce,Se,ze,$e){for(var rt=te[Ce],dt=0;dt0?", expected one of type ["+wt.join(", ")+"]":"";return new N("Invalid "+rt+" `"+dt+"` supplied to "+("`"+$e+"`"+cn+"."))}return B(Ce)}function pe(){function ne(le,te,Ce,Se,ze){return nt(le[te])?null:new N("Invalid "+Se+" `"+ze+"` supplied to "+("`"+Ce+"`, expected a ReactNode."))}return B(ne)}function Ae(ne,le,te,Ce,Se){return new N((ne||"React class")+": "+le+" type `"+te+"."+Ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Se+"`.")}function we(ne){function le(te,Ce,Se,ze,$e){var rt=te[Ce],dt=st(rt);if(dt!=="object")return new N("Invalid "+ze+" `"+$e+"` of type `"+dt+"` "+("supplied to `"+Se+"`, expected `object`."));for(var wt in ne){var yt=ne[wt];if(typeof yt!="function")return Ae(Se,ze,$e,wt,Tt(yt));var Pe=yt(rt,wt,Se,ze,$e+"."+wt,h);if(Pe)return Pe}return null}return B(le)}function Ye(ne){function le(te,Ce,Se,ze,$e){var rt=te[Ce],dt=st(rt);if(dt!=="object")return new N("Invalid "+ze+" `"+$e+"` of type `"+dt+"` "+("supplied to `"+Se+"`, expected `object`."));var wt=f({},te[Ce],ne);for(var yt in wt){var Pe=ne[yt];if(d(ne,yt)&&typeof Pe!="function")return Ae(Se,ze,$e,yt,Tt(Pe));if(!Pe)return new N("Invalid "+ze+" `"+$e+"` key `"+yt+"` supplied to `"+Se+"`.\nBad object: "+JSON.stringify(te[Ce],null," ")+` +Valid keys: `+JSON.stringify(Object.keys(ne),null," "));var nn=Pe(rt,yt,Se,ze,$e+"."+yt,h);if(nn)return nn}return null}return B(le)}function nt(ne){switch(typeof ne){case"number":case"string":case"undefined":return!0;case"boolean":return!ne;case"object":if(Array.isArray(ne))return ne.every(nt);if(ne===null||m(ne))return!0;var le=S(ne);if(le){var te=le.call(ne),Ce;if(le!==ne.entries){for(;!(Ce=te.next()).done;)if(!nt(Ce.value))return!1}else for(;!(Ce=te.next()).done;){var Se=Ce.value;if(Se&&!nt(Se[1]))return!1}}else return!1;return!0;default:return!1}}function De(ne,le){return ne==="symbol"?!0:le?le["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&le instanceof Symbol:!1}function st(ne){var le=typeof ne;return Array.isArray(ne)?"array":ne instanceof RegExp?"object":De(le,ne)?"symbol":le}function Tt(ne){if(typeof ne>"u"||ne===null)return""+ne;var le=st(ne);if(le==="object"){if(ne instanceof Date)return"date";if(ne instanceof RegExp)return"regexp"}return le}function ln(ne){var le=Tt(ne);switch(le){case"array":case"object":return"an "+le;case"boolean":case"date":case"regexp":return"a "+le;default:return le}}function Ee(ne){return!ne.constructor||!ne.constructor.name?E:ne.constructor.name}return T.checkPropTypes=g,T.resetWarningCache=g.resetWarningCache,T.PropTypes=T,T}},"./node_modules/prop-types/index.js":(s,l,c)=>{{var u=c("./node_modules/react-is/index.js"),f=!0;s.exports=c("./node_modules/prop-types/factoryWithTypeCheckers.js")(u.isElement,f)}},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":s=>{var l="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";s.exports=l},"./node_modules/prop-types/lib/has.js":s=>{s.exports=Function.call.bind(Object.prototype.hasOwnProperty)},"./node_modules/react-is/cjs/react-is.development.js":(s,l)=>{/** @license React v16.13.1 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(){var c=typeof Symbol=="function"&&Symbol.for,u=c?Symbol.for("react.element"):60103,f=c?Symbol.for("react.portal"):60106,h=c?Symbol.for("react.fragment"):60107,d=c?Symbol.for("react.strict_mode"):60108,g=c?Symbol.for("react.profiler"):60114,p=c?Symbol.for("react.provider"):60109,y=c?Symbol.for("react.context"):60110,m=c?Symbol.for("react.async_mode"):60111,b=c?Symbol.for("react.concurrent_mode"):60111,x=c?Symbol.for("react.forward_ref"):60112,A=c?Symbol.for("react.suspense"):60113,S=c?Symbol.for("react.suspense_list"):60120,E=c?Symbol.for("react.memo"):60115,T=c?Symbol.for("react.lazy"):60116,C=c?Symbol.for("react.block"):60121,N=c?Symbol.for("react.fundamental"):60117,B=c?Symbol.for("react.responder"):60118,L=c?Symbol.for("react.scope"):60119;function U(Pe){return typeof Pe=="string"||typeof Pe=="function"||Pe===h||Pe===b||Pe===g||Pe===d||Pe===A||Pe===S||typeof Pe=="object"&&Pe!==null&&(Pe.$$typeof===T||Pe.$$typeof===E||Pe.$$typeof===p||Pe.$$typeof===y||Pe.$$typeof===x||Pe.$$typeof===N||Pe.$$typeof===B||Pe.$$typeof===L||Pe.$$typeof===C)}function j(Pe){if(typeof Pe=="object"&&Pe!==null){var nn=Pe.$$typeof;switch(nn){case u:var cn=Pe.type;switch(cn){case m:case b:case h:case g:case d:case A:return cn;default:var Gn=cn&&cn.$$typeof;switch(Gn){case y:case x:case T:case E:case p:return Gn;default:return nn}}case f:return nn}}}var X=m,G=b,H=y,re=p,V=u,ee=x,pe=h,Ae=T,we=E,Ye=f,nt=g,De=d,st=A,Tt=!1;function ln(Pe){return Tt||(Tt=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Ee(Pe)||j(Pe)===m}function Ee(Pe){return j(Pe)===b}function ne(Pe){return j(Pe)===y}function le(Pe){return j(Pe)===p}function te(Pe){return typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===u}function Ce(Pe){return j(Pe)===x}function Se(Pe){return j(Pe)===h}function ze(Pe){return j(Pe)===T}function $e(Pe){return j(Pe)===E}function rt(Pe){return j(Pe)===f}function dt(Pe){return j(Pe)===g}function wt(Pe){return j(Pe)===d}function yt(Pe){return j(Pe)===A}l.AsyncMode=X,l.ConcurrentMode=G,l.ContextConsumer=H,l.ContextProvider=re,l.Element=V,l.ForwardRef=ee,l.Fragment=pe,l.Lazy=Ae,l.Memo=we,l.Portal=Ye,l.Profiler=nt,l.StrictMode=De,l.Suspense=st,l.isAsyncMode=ln,l.isConcurrentMode=Ee,l.isContextConsumer=ne,l.isContextProvider=le,l.isElement=te,l.isForwardRef=Ce,l.isFragment=Se,l.isLazy=ze,l.isMemo=$e,l.isPortal=rt,l.isProfiler=dt,l.isStrictMode=wt,l.isSuspense=yt,l.isValidElementType=U,l.typeOf=j})()},"./node_modules/react-is/index.js":(s,l,c)=>{s.exports=c("./node_modules/react-is/cjs/react-is.development.js")},"./node_modules/shallow-equal/dist/index.esm.js":(s,l,c)=>{c.r(l),c.d(l,{shallowEqualArrays:()=>f,shallowEqualObjects:()=>u});function u(h,d){if(h===d)return!0;if(!h||!d)return!1;var g=Object.keys(h),p=Object.keys(d),y=g.length;if(p.length!==y)return!1;for(var m=0;m{Object.defineProperty(l,"__esModule",{value:!0});var u=c("react"),f=(0,u.createContext)(void 0);l.default=f},"./src/index.ts":function(s,l,c){var u=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(l,"__esModule",{value:!0}),l.Context=l.toQuery=l.useMediaQuery=l.default=void 0;var f=u(c("./src/useMediaQuery.ts"));l.useMediaQuery=f.default;var h=u(c("./src/Component.ts"));l.default=h.default;var d=u(c("./src/toQuery.ts"));l.toQuery=d.default;var g=u(c("./src/Context.ts"));l.Context=g.default},"./src/mediaQuery.ts":function(s,l,c){var u=this&&this.__assign||function(){return u=Object.assign||function(A){for(var S,E=1,T=arguments.length;E{s.exports=n}},i={};function a(s){var l=i[s];if(l!==void 0)return l.exports;var c=i[s]={exports:{}};return r[s].call(c.exports,c,c.exports,a),c.exports}a.d=(s,l)=>{for(var c in l)a.o(l,c)&&!a.o(s,c)&&Object.defineProperty(s,c,{enumerable:!0,get:l[c]})},a.o=(s,l)=>Object.prototype.hasOwnProperty.call(s,l),a.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var o=a("./src/index.ts");return o})())})(gH);var hPe=gH.exports;const yH=fPe(),dPe={isInitialLoading:!0,poll:null,previousVotes:yH.get(M4.Votes)??{},previousVote:null,appError:"",isMobileScreen:!1,isDesktopScreen:!1},pPe=({children:t})=>{const e=hPe.useMediaQuery({query:"(min-width: 1000px)"}),{state:{isVoidSignerConnected:n,account:r},getPoll:i}=nv(),[a,o]=F.useState({...dPe});F.useEffect(()=>{o(f=>({...f,isDesktopScreen:e,isMobileScreen:!e}))},[e]),F.useEffect(()=>{r&&o(f=>({...f,previousVote:Cs.isValidMascotChoiceId(a.previousVotes[r])?a.previousVotes[r]:null}))},[r]),F.useEffect(()=>{yH.set(M4.Votes,a.previousVotes)},[a.previousVotes]),F.useEffect(()=>{if(!n)return;(async()=>{const h=await i(),{params:{numChoices:d}}=h;d!==3n&&console.warn("[numChoices] Unexpected number of poll choices, this dApp may not behave as expected!"),o(g=>({...g,isInitialLoading:!1,poll:h}))})()},[n]);const u={state:a,setPreviousVoteForCurrentWallet:f=>{r&&Cs.isValidMascotChoiceId(f)&&o(h=>({...h,previousVotes:{...h.previousVotes,[r]:f}}))},setAppError:f=>{if(f==null)return;let h="";Object.prototype.hasOwnProperty.call(f,"message")?h=f.message:typeof f=="object"?h=JSON.stringify(h):h=f,o(d=>({...d,appError:h}))},clearAppError:()=>{o(f=>({...f,appError:""}))}};return Z.jsx(W7.Provider,{value:u,children:t})},gPe=rK([{path:"/",element:Z.jsx(uJ,{}),children:[{path:"results",element:Z.jsx(uPe,{})},{path:"",element:Z.jsx(IJ,{})}]}]),yPe=()=>Z.jsx(zae,{children:Z.jsx(Qae,{children:Z.jsx(pPe,{children:Z.jsx(hK,{router:gPe})})})});zE.createRoot(document.getElementById("root")).render(Z.jsx(yPe,{})); +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = [] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} diff --git a/votee/assets/index-o7xmRN2e.js b/votee/assets/index-o7xmRN2e.js deleted file mode 100644 index 88ab02e..0000000 --- a/votee/assets/index-o7xmRN2e.js +++ /dev/null @@ -1,158 +0,0 @@ -var gH=Object.defineProperty;var yH=(t,e,n)=>e in t?gH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var R=(t,e,n)=>(yH(t,typeof e!="symbol"?e+"":e,n),n),qA=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var v=(t,e,n)=>(qA(t,e,"read from private field"),n?n.call(t):e.get(t)),M=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},O=(t,e,n,r)=>(qA(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var vs=(t,e,n,r)=>({set _(i){O(t,e,i,n)},get _(){return v(t,e,r)}}),ie=(t,e,n)=>(qA(t,e,"access private method"),n);function gM(t,e){for(var n=0;nr[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"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Kg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function mH(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var yM={exports:{}},m2={},mM={exports:{}},Ut={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Km=Symbol.for("react.element"),vH=Symbol.for("react.portal"),bH=Symbol.for("react.fragment"),wH=Symbol.for("react.strict_mode"),xH=Symbol.for("react.profiler"),AH=Symbol.for("react.provider"),EH=Symbol.for("react.context"),SH=Symbol.for("react.forward_ref"),PH=Symbol.for("react.suspense"),OH=Symbol.for("react.memo"),TH=Symbol.for("react.lazy"),$4=Symbol.iterator;function CH(t){return t===null||typeof t!="object"?null:(t=$4&&t[$4]||t["@@iterator"],typeof t=="function"?t:null)}var vM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bM=Object.assign,wM={};function tg(t,e,n){this.props=t,this.context=e,this.refs=wM,this.updater=n||vM}tg.prototype.isReactComponent={};tg.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")};tg.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function xM(){}xM.prototype=tg.prototype;function xS(t,e,n){this.props=t,this.context=e,this.refs=wM,this.updater=n||vM}var AS=xS.prototype=new xM;AS.constructor=xS;bM(AS,tg.prototype);AS.isPureReactComponent=!0;var U4=Array.isArray,AM=Object.prototype.hasOwnProperty,ES={current:null},EM={key:!0,ref:!0,__self:!0,__source:!0};function SM(t,e,n){var r,i={},a=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(a=""+e.key),e)AM.call(e,r)&&!EM.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,we=V[Ae];if(0>>1;Aei(De,pe))sti(Tt,De)?(V[Ae]=Tt,V[st]=pe,Ae=st):(V[Ae]=De,V[nt]=pe,Ae=nt);else if(sti(Tt,pe))V[Ae]=Tt,V[st]=pe,Ae=st;else break e}}return ee}function i(V,ee){var pe=V.sortIndex-ee.sortIndex;return pe!==0?pe:V.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],c=[],u=1,f=null,h=3,d=!1,g=!1,p=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(V){for(var ee=n(c);ee!==null;){if(ee.callback===null)r(c);else if(ee.startTime<=V)r(c),ee.sortIndex=ee.expirationTime,e(l,ee);else break;ee=n(c)}}function A(V){if(p=!1,x(V),!g)if(n(l)!==null)g=!0,H(S);else{var ee=n(c);ee!==null&&re(A,ee.startTime-V)}}function S(V,ee){g=!1,p&&(p=!1,m(C),C=-1),d=!0;var pe=h;try{for(x(ee),f=n(l);f!==null&&(!(f.expirationTime>ee)||V&&!L());){var Ae=f.callback;if(typeof Ae=="function"){f.callback=null,h=f.priorityLevel;var we=Ae(f.expirationTime<=ee);ee=t.unstable_now(),typeof we=="function"?f.callback=we:f===n(l)&&r(l),x(ee)}else r(l);f=n(l)}if(f!==null)var Ye=!0;else{var nt=n(c);nt!==null&&re(A,nt.startTime-ee),Ye=!1}return Ye}finally{f=null,h=pe,d=!1}}var E=!1,T=null,C=-1,N=5,B=-1;function L(){return!(t.unstable_now()-BV||125Ae?(V.sortIndex=pe,e(c,V),n(l)===null&&V===n(c)&&(p?(m(C),C=-1):p=!0,re(A,pe-Ae))):(V.sortIndex=we,e(l,V),g||d||(g=!0,H(S))),V},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(V){var ee=h;return function(){var pe=h;h=ee;try{return V.apply(this,arguments)}finally{h=pe}}}})(CM);TM.exports=CM;var FH=TM.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var kM=F,ua=FH;function xe(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),HE=Object.prototype.hasOwnProperty,jH=/^[: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]*$/,j4={},z4={};function zH(t){return HE.call(z4,t)?!0:HE.call(j4,t)?!1:jH.test(t)?z4[t]=!0:(j4[t]=!0,!1)}function HH(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function GH(t,e,n,r){if(e===null||typeof e>"u"||HH(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 mi(t,e,n,r,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){kr[t]=new mi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];kr[e]=new mi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){kr[t]=new mi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){kr[t]=new mi(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){kr[t]=new mi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){kr[t]=new mi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){kr[t]=new mi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){kr[t]=new mi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){kr[t]=new mi(t,5,!1,t.toLowerCase(),null,!1,!1)});var PS=/[\-:]([a-z])/g;function OS(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(PS,OS);kr[e]=new mi(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(PS,OS);kr[e]=new mi(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(PS,OS);kr[e]=new mi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){kr[t]=new mi(t,1,!1,t.toLowerCase(),null,!1,!1)});kr.xlinkHref=new mi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){kr[t]=new mi(t,1,!1,t.toLowerCase(),null,!0,!0)});function TS(t,e,n,r){var i=kr.hasOwnProperty(e)?kr[e]:null;(i!==null?i.type!==0:r||!(2s||i[o]!==a[s]){var l=` -`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=s);break}}}finally{n6=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Wg(t):""}function VH(t){switch(t.tag){case 5:return Wg(t.type);case 16:return Wg("Lazy");case 13:return Wg("Suspense");case 19:return Wg("SuspenseList");case 0:case 2:case 15:return t=r6(t.type,!1),t;case 11:return t=r6(t.type.render,!1),t;case 1:return t=r6(t.type,!0),t;default:return""}}function KE(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 Kh:return"Fragment";case Qh:return"Portal";case GE:return"Profiler";case CS:return"StrictMode";case VE:return"Suspense";case QE:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case IM:return(t.displayName||"Context")+".Consumer";case NM:return(t._context.displayName||"Context")+".Provider";case kS:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case _S:return e=t.displayName||null,e!==null?e:KE(t.type)||"Memo";case Wl:e=t._payload,t=t._init;try{return KE(t(e))}catch{}}return null}function QH(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 KE(e);case 8:return e===CS?"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 Zc(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function MM(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function KH(t){var e=MM(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ev(t){t._valueTracker||(t._valueTracker=KH(t))}function BM(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=MM(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function gw(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 WE(t,e){var n=e.checked;return Mn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function G4(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Zc(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function DM(t,e){e=e.checked,e!=null&&TS(t,"checked",e,!1)}function JE(t,e){DM(t,e);var n=Zc(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?YE(t,e.type,n):e.hasOwnProperty("defaultValue")&&YE(t,e.type,Zc(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function V4(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function YE(t,e,n){(e!=="number"||gw(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Jg=Array.isArray;function xd(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Sv.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function jy(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var gy={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},WH=["Webkit","ms","Moz","O"];Object.keys(gy).forEach(function(t){WH.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),gy[e]=gy[t]})});function FM(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||gy.hasOwnProperty(t)&&gy[t]?(""+e).trim():e+"px"}function jM(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=FM(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var JH=Mn({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 qE(t,e){if(e){if(JH[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(xe(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(xe(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(xe(61))}if(e.style!=null&&typeof e.style!="object")throw Error(xe(62))}}function e5(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 t5=null;function NS(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var n5=null,Ad=null,Ed=null;function W4(t){if(t=Ym(t)){if(typeof n5!="function")throw Error(xe(280));var e=t.stateNode;e&&(e=A2(e),n5(t.stateNode,t.type,e))}}function zM(t){Ad?Ed?Ed.push(t):Ed=[t]:Ad=t}function HM(){if(Ad){var t=Ad,e=Ed;if(Ed=Ad=null,W4(t),e)for(t=0;t>>=0,t===0?32:31-(oG(t)/sG|0)|0}var Pv=64,Ov=4194304;function Yg(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 bw(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,a=t.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=Yg(s):(a&=o,a!==0&&(r=Yg(a)))}else o=n&~i,o!==0?r=Yg(o):a!==0&&(r=Yg(a));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Wm(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ao(e),t[e]=n}function fG(t,e){var n=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 r=t.eventTimes;for(t=t.expirationTimes;0=my),rT=" ",iT=!1;function cB(t,e){switch(t){case"keyup":return UG.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uB(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Wh=!1;function jG(t,e){switch(t){case"compositionend":return uB(e);case"keypress":return e.which!==32?null:(iT=!0,rT);case"textInput":return t=e.data,t===rT&&iT?null:t;default:return null}}function zG(t,e){if(Wh)return t==="compositionend"||!US&&cB(t,e)?(t=sB(),Nb=DS=Rc=null,Wh=!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:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lT(n)}}function pB(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?pB(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function gB(){for(var t=window,e=gw();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=gw(t.document)}return e}function FS(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 XG(t){var e=gB(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&pB(n.ownerDocument.documentElement,n)){if(r!==null&&FS(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!t.extend&&a>r&&(i=r,r=a,a=i),i=cT(n,a);var o=cT(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jh=null,l5=null,by=null,c5=!1;function uT(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;c5||Jh==null||Jh!==gw(r)||(r=Jh,"selectionStart"in r&&FS(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}),by&&Ky(by,r)||(by=r,r=Aw(l5,"onSelect"),0Zh||(t.current=g5[Zh],g5[Zh]=null,Zh--)}function pn(t,e){Zh++,g5[Zh]=t.current,t.current=e}var qc={},Jr=ru(qc),Ri=ru(!1),Jf=qc;function hp(t,e){var n=t.type.contextTypes;if(!n)return qc;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=e[a];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Mi(t){return t=t.childContextTypes,t!=null}function Sw(){xn(Ri),xn(Jr)}function mT(t,e,n){if(Jr.current!==qc)throw Error(xe(168));pn(Jr,e),pn(Ri,n)}function SB(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(xe(108,QH(t)||"Unknown",i));return Mn({},n,r)}function Pw(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||qc,Jf=Jr.current,pn(Jr,t),pn(Ri,Ri.current),!0}function vT(t,e,n){var r=t.stateNode;if(!r)throw Error(xe(169));n?(t=SB(t,e,Jf),r.__reactInternalMemoizedMergedChildContext=t,xn(Ri),xn(Jr),pn(Jr,t)):xn(Ri),pn(Ri,n)}var Os=null,E2=!1,m6=!1;function PB(t){Os===null?Os=[t]:Os.push(t)}function cV(t){E2=!0,PB(t)}function iu(){if(!m6&&Os!==null){m6=!0;var t=0,e=on;try{var n=Os;for(on=1;t>=o,i-=o,il=1<<32-Ao(e)+i|n<C?(N=T,T=null):N=T.sibling;var B=h(m,T,x[C],A);if(B===null){T===null&&(T=N);break}t&&T&&B.alternate===null&&e(m,T),b=a(B,b,C),E===null?S=B:E.sibling=B,E=B,T=N}if(C===x.length)return n(m,T),En&&wu(m,C),S;if(T===null){for(;CC?(N=T,T=null):N=T.sibling;var L=h(m,T,B.value,A);if(L===null){T===null&&(T=N);break}t&&T&&L.alternate===null&&e(m,T),b=a(L,b,C),E===null?S=L:E.sibling=L,E=L,T=N}if(B.done)return n(m,T),En&&wu(m,C),S;if(T===null){for(;!B.done;C++,B=x.next())B=f(m,B.value,A),B!==null&&(b=a(B,b,C),E===null?S=B:E.sibling=B,E=B);return En&&wu(m,C),S}for(T=r(m,T);!B.done;C++,B=x.next())B=d(T,m,C,B.value,A),B!==null&&(t&&B.alternate!==null&&T.delete(B.key===null?C:B.key),b=a(B,b,C),E===null?S=B:E.sibling=B,E=B);return t&&T.forEach(function(U){return e(m,U)}),En&&wu(m,C),S}function y(m,b,x,A){if(typeof x=="object"&&x!==null&&x.type===Kh&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Av:e:{for(var S=x.key,E=b;E!==null;){if(E.key===S){if(S=x.type,S===Kh){if(E.tag===7){n(m,E.sibling),b=i(E,x.props.children),b.return=m,m=b;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Wl&&PT(S)===E.type){n(m,E.sibling),b=i(E,x.props),b.ref=Tg(m,E,x),b.return=m,m=b;break e}n(m,E);break}else e(m,E);E=E.sibling}x.type===Kh?(b=Lf(x.props.children,m.mode,A,x.key),b.return=m,m=b):(A=Ub(x.type,x.key,x.props,null,m.mode,A),A.ref=Tg(m,b,x),A.return=m,m=A)}return o(m);case Qh:e:{for(E=x.key;b!==null;){if(b.key===E)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(m,b.sibling),b=i(b,x.children||[]),b.return=m,m=b;break e}else{n(m,b);break}else e(m,b);b=b.sibling}b=P6(x,m.mode,A),b.return=m,m=b}return o(m);case Wl:return E=x._init,y(m,b,E(x._payload),A)}if(Jg(x))return g(m,b,x,A);if(Ag(x))return p(m,b,x,A);Rv(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(m,b.sibling),b=i(b,x),b.return=m,m=b):(n(m,b),b=S6(x,m.mode,A),b.return=m,m=b),o(m)):n(m,b)}return y}var pp=RB(!0),MB=RB(!1),Xm={},as=ru(Xm),Xy=ru(Xm),Zy=ru(Xm);function Iu(t){if(t===Xm)throw Error(xe(174));return t}function JS(t,e){switch(pn(Zy,e),pn(Xy,t),pn(as,Xm),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:ZE(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=ZE(e,t)}xn(as),pn(as,e)}function gp(){xn(as),xn(Xy),xn(Zy)}function BB(t){Iu(Zy.current);var e=Iu(as.current),n=ZE(e,t.type);e!==n&&(pn(Xy,t),pn(as,n))}function YS(t){Xy.current===t&&(xn(as),xn(Xy))}var Cn=ru(0);function Nw(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 v6=[];function XS(){for(var t=0;tn?n:4,t(!0);var r=b6.transition;b6.transition={};try{t(!1),e()}finally{on=n,b6.transition=r}}function XB(){return Ga().memoizedState}function dV(t,e,n){var r=Qc(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ZB(t))qB(e,n);else if(n=kB(t,e,n,r),n!==null){var i=pi();Eo(n,t,r,i),e7(n,e,r)}}function pV(t,e,n){var r=Qc(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ZB(t))qB(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var o=e.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Oo(s,o)){var l=e.interleaved;l===null?(i.next=i,KS(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=kB(t,e,i,r),n!==null&&(i=pi(),Eo(n,t,r,i),e7(n,e,r))}}function ZB(t){var e=t.alternate;return t===Rn||e!==null&&e===Rn}function qB(t,e){wy=Iw=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function e7(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,RS(t,n)}}var Rw={readContext:Ha,useCallback:Rr,useContext:Rr,useEffect:Rr,useImperativeHandle:Rr,useInsertionEffect:Rr,useLayoutEffect:Rr,useMemo:Rr,useReducer:Rr,useRef:Rr,useState:Rr,useDebugValue:Rr,useDeferredValue:Rr,useTransition:Rr,useMutableSource:Rr,useSyncExternalStore:Rr,useId:Rr,unstable_isNewReconciler:!1},gV={readContext:Ha,useCallback:function(t,e){return Do().memoizedState=[t,e===void 0?null:e],t},useContext:Ha,useEffect:TT,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Bb(4194308,4,QB.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Bb(4194308,4,t,e)},useInsertionEffect:function(t,e){return Bb(4,2,t,e)},useMemo:function(t,e){var n=Do();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Do();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=dV.bind(null,Rn,t),[r.memoizedState,t]},useRef:function(t){var e=Do();return t={current:t},e.memoizedState=t},useState:OT,useDebugValue:nP,useDeferredValue:function(t){return Do().memoizedState=t},useTransition:function(){var t=OT(!1),e=t[0];return t=hV.bind(null,t[1]),Do().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Rn,i=Do();if(En){if(n===void 0)throw Error(xe(407));n=n()}else{if(n=e(),gr===null)throw Error(xe(349));Xf&30||$B(r,e,n)}i.memoizedState=n;var a={value:n,getSnapshot:e};return i.queue=a,TT(FB.bind(null,r,a,t),[t]),r.flags|=2048,t1(9,UB.bind(null,r,a,n,e),void 0,null),n},useId:function(){var t=Do(),e=gr.identifierPrefix;if(En){var n=al,r=il;n=(r&~(1<<32-Ao(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=qy++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Zo]=e,t[Yy]=r,c7(t,e,!1,!1),e.stateNode=t;e:{switch(o=e5(n,r),n){case"dialog":mn("cancel",t),mn("close",t),i=r;break;case"iframe":case"object":case"embed":mn("load",t),i=r;break;case"video":case"audio":for(i=0;imp&&(e.flags|=128,r=!0,Cg(a,!1),e.lanes=4194304)}else{if(!r)if(t=Nw(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Cg(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!En)return Mr(e),null}else 2*Wn()-a.renderingStartTime>mp&&n!==1073741824&&(e.flags|=128,r=!0,Cg(a,!1),e.lanes=4194304);a.isBackwards?(o.sibling=e.child,e.child=o):(n=a.last,n!==null?n.sibling=o:e.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Wn(),e.sibling=null,n=Cn.current,pn(Cn,r?n&1|2:n&1),e):(Mr(e),null);case 22:case 23:return lP(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?ra&1073741824&&(Mr(e),e.subtreeFlags&6&&(e.flags|=8192)):Mr(e),null;case 24:return null;case 25:return null}throw Error(xe(156,e.tag))}function EV(t,e){switch(zS(e),e.tag){case 1:return Mi(e.type)&&Sw(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return gp(),xn(Ri),xn(Jr),XS(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return YS(e),null;case 13:if(xn(Cn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(xe(340));dp()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return xn(Cn),null;case 4:return gp(),null;case 10:return QS(e.type._context),null;case 22:case 23:return lP(),null;case 24:return null;default:return null}}var Bv=!1,Hr=!1,SV=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function nd(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){jn(t,e,r)}else n.current=null}function T5(t,e,n){try{n()}catch(r){jn(t,e,r)}}var DT=!1;function PV(t,e){if(u5=ww,t=gB(),FS(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,l=-1,c=0,u=0,f=t,h=null;t:for(;;){for(var d;f!==n||i!==0&&f.nodeType!==3||(s=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===t)break t;if(h===n&&++c===i&&(s=o),h===a&&++u===r&&(l=o),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(f5={focusedElem:t,selectionRange:n},ww=!1,Ke=e;Ke!==null;)if(e=Ke,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Ke=t;else for(;Ke!==null;){e=Ke;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var p=g.memoizedProps,y=g.memoizedState,m=e.stateNode,b=m.getSnapshotBeforeUpdate(e.elementType===e.type?p:no(e.type,p),y);m.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(xe(163))}}catch(A){jn(e,e.return,A)}if(t=e.sibling,t!==null){t.return=e.return,Ke=t;break}Ke=e.return}return g=DT,DT=!1,g}function xy(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&T5(e,n,a)}i=i.next}while(i!==r)}}function O2(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function C5(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function h7(t){var e=t.alternate;e!==null&&(t.alternate=null,h7(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Zo],delete e[Yy],delete e[p5],delete e[sV],delete e[lV])),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 d7(t){return t.tag===5||t.tag===3||t.tag===4}function LT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||d7(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 k5(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Ew));else if(r!==4&&(t=t.child,t!==null))for(k5(t,e,n),t=t.sibling;t!==null;)k5(t,e,n),t=t.sibling}function _5(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(_5(t,e,n),t=t.sibling;t!==null;)_5(t,e,n),t=t.sibling}var xr=null,ho=!1;function Fl(t,e,n){for(n=n.child;n!==null;)p7(t,e,n),n=n.sibling}function p7(t,e,n){if(is&&typeof is.onCommitFiberUnmount=="function")try{is.onCommitFiberUnmount(v2,n)}catch{}switch(n.tag){case 5:Hr||nd(n,e);case 6:var r=xr,i=ho;xr=null,Fl(t,e,n),xr=r,ho=i,xr!==null&&(ho?(t=xr,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):xr.removeChild(n.stateNode));break;case 18:xr!==null&&(ho?(t=xr,n=n.stateNode,t.nodeType===8?y6(t.parentNode,n):t.nodeType===1&&y6(t,n),Vy(t)):y6(xr,n.stateNode));break;case 4:r=xr,i=ho,xr=n.stateNode.containerInfo,ho=!0,Fl(t,e,n),xr=r,ho=i;break;case 0:case 11:case 14:case 15:if(!Hr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&T5(n,e,o),i=i.next}while(i!==r)}Fl(t,e,n);break;case 1:if(!Hr&&(nd(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){jn(n,e,s)}Fl(t,e,n);break;case 21:Fl(t,e,n);break;case 22:n.mode&1?(Hr=(r=Hr)||n.memoizedState!==null,Fl(t,e,n),Hr=r):Fl(t,e,n);break;default:Fl(t,e,n)}}function $T(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new SV),e.forEach(function(r){var i=MV.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Za(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~a}if(r=i,r=Wn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*TV(r/1960))-r,10t?16:t,Mc===null)var r=!1;else{if(t=Mc,Mc=null,Dw=0,Wt&6)throw Error(xe(331));var i=Wt;for(Wt|=4,Ke=t.current;Ke!==null;){var a=Ke,o=a.child;if(Ke.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lWn()-oP?Df(t,0):aP|=n),Bi(t,e)}function A7(t,e){e===0&&(t.mode&1?(e=Ov,Ov<<=1,!(Ov&130023424)&&(Ov=4194304)):e=1);var n=pi();t=bl(t,e),t!==null&&(Wm(t,e,n),Bi(t,n))}function RV(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),A7(t,n)}function MV(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(xe(314))}r!==null&&r.delete(e),A7(t,n)}var E7;E7=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ri.current)Ni=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ni=!1,xV(t,e,n);Ni=!!(t.flags&131072)}else Ni=!1,En&&e.flags&1048576&&OB(e,Tw,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Db(t,e),t=e.pendingProps;var i=hp(e,Jr.current);Pd(e,n),i=qS(null,e,r,t,i,n);var a=eP();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,Mi(r)?(a=!0,Pw(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,WS(e),i.updater=S2,e.stateNode=i,i._reactInternals=e,w5(e,r,t,n),e=E5(null,e,r,!0,a,n)):(e.tag=0,En&&a&&jS(e),ei(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Db(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=DV(r),t=no(r,t),i){case 0:e=A5(null,e,r,t,n);break e;case 1:e=RT(null,e,r,t,n);break e;case 11:e=NT(null,e,r,t,n);break e;case 14:e=IT(null,e,r,no(r.type,t),n);break e}throw Error(xe(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:no(r,i),A5(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:no(r,i),RT(t,e,r,i,n);case 3:e:{if(o7(e),t===null)throw Error(xe(387));r=e.pendingProps,a=e.memoizedState,i=a.element,_B(t,e),_w(e,r,null,n);var o=e.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=yp(Error(xe(423)),e),e=MT(t,e,r,n,i);break e}else if(r!==i){i=yp(Error(xe(424)),e),e=MT(t,e,r,n,i);break e}else for(oa=Hc(e.stateNode.containerInfo.firstChild),ca=e,En=!0,vo=null,n=MB(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(dp(),r===i){e=wl(t,e,n);break e}ei(t,e,r,n)}e=e.child}return e;case 5:return BB(e),t===null&&m5(e),r=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,h5(r,i)?o=null:a!==null&&h5(r,a)&&(e.flags|=32),a7(t,e),ei(t,e,o,n),e.child;case 6:return t===null&&m5(e),null;case 13:return s7(t,e,n);case 4:return JS(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=pp(e,null,r,n):ei(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:no(r,i),NT(t,e,r,i,n);case 7:return ei(t,e,e.pendingProps,n),e.child;case 8:return ei(t,e,e.pendingProps.children,n),e.child;case 12:return ei(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value,pn(Cw,r._currentValue),r._currentValue=o,a!==null)if(Oo(a.value,o)){if(a.children===i.children&&!Ri.current){e=wl(t,e,n);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=cl(-1,n&-n),l.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),v5(a.return,n,e),s.lanes|=n;break}l=l.next}}else if(a.tag===10)o=a.type===e.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(xe(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),v5(o,n,e),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}ei(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Pd(e,n),i=Ha(i),r=r(i),e.flags|=1,ei(t,e,r,n),e.child;case 14:return r=e.type,i=no(r,e.pendingProps),i=no(r.type,i),IT(t,e,r,i,n);case 15:return r7(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:no(r,i),Db(t,e),e.tag=1,Mi(r)?(t=!0,Pw(e)):t=!1,Pd(e,n),IB(e,r,i),w5(e,r,i,n),E5(null,e,r,!0,t,n);case 19:return l7(t,e,n);case 22:return i7(t,e,n)}throw Error(xe(156,e.tag))};function S7(t,e){return YM(t,e)}function BV(t,e,n,r){this.tag=t,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $a(t,e,n,r){return new BV(t,e,n,r)}function uP(t){return t=t.prototype,!(!t||!t.isReactComponent)}function DV(t){if(typeof t=="function")return uP(t)?1:0;if(t!=null){if(t=t.$$typeof,t===kS)return 11;if(t===_S)return 14}return 2}function Kc(t,e){var n=t.alternate;return n===null?(n=$a(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ub(t,e,n,r,i,a){var o=2;if(r=t,typeof t=="function")uP(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Kh:return Lf(n.children,i,a,e);case CS:o=8,i|=8;break;case GE:return t=$a(12,n,e,i|2),t.elementType=GE,t.lanes=a,t;case VE:return t=$a(13,n,e,i),t.elementType=VE,t.lanes=a,t;case QE:return t=$a(19,n,e,i),t.elementType=QE,t.lanes=a,t;case RM:return C2(n,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case NM:o=10;break e;case IM:o=9;break e;case kS:o=11;break e;case _S:o=14;break e;case Wl:o=16,r=null;break e}throw Error(xe(130,t==null?t:typeof t,""))}return e=$a(o,n,e,i),e.elementType=t,e.type=r,e.lanes=a,e}function Lf(t,e,n,r){return t=$a(7,t,r,e),t.lanes=n,t}function C2(t,e,n,r){return t=$a(22,t,r,e),t.elementType=RM,t.lanes=n,t.stateNode={isHidden:!1},t}function S6(t,e,n){return t=$a(6,t,null,e),t.lanes=n,t}function P6(t,e,n){return e=$a(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function LV(t,e,n,r,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=a6(0),this.expirationTimes=a6(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=a6(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function fP(t,e,n,r,i,a,o,s,l){return t=new LV(t,e,n,s,l),e===1?(e=1,a===!0&&(e|=8)):e=0,a=$a(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},WS(a),t}function $V(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(C7)}catch(t){console.error(t)}}C7(),OM.exports=fa;var gP=OM.exports;const HV=Xt(gP),GV=gM({__proto__:null,default:HV},[gP]);var QT=gP;zE.createRoot=QT.createRoot,zE.hydrateRoot=QT.hydrateRoot;/** - * @remix-run/router v1.15.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function zn(){return zn=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 QV(){return Math.random().toString(36).substr(2,8)}function WT(t,e){return{usr:t.state,key:t.key,idx:e}}function r1(t,e,n,r){return n===void 0&&(n=null),zn({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?ps(e):e,{state:n,key:e&&e.key||r||QV()})}function Zm(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function ps(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function KV(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=Qn.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(zn({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function f(){s=Qn.Pop;let y=u(),m=y==null?null:y-c;c=y,l&&l({action:s,location:p.location,delta:m})}function h(y,m){s=Qn.Push;let b=r1(p.location,y,m);n&&n(b,y),c=u()+1;let x=WT(b,c),A=p.createHref(b);try{o.pushState(x,"",A)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(A)}a&&l&&l({action:s,location:p.location,delta:1})}function d(y,m){s=Qn.Replace;let b=r1(p.location,y,m);n&&n(b,y),c=u();let x=WT(b,c),A=p.createHref(b);o.replaceState(x,"",A),a&&l&&l({action:s,location:p.location,delta:0})}function g(y){let m=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:Zm(y);return b=b.replace(/ $/,"%20"),Dt(m,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,m)}let p={get action(){return s},get location(){return t(i,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(KT,f),l=y,()=>{i.removeEventListener(KT,f),l=null}},createHref(y){return e(i,y)},createURL:g,encodeLocation(y){let m=g(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:d,go(y){return o.go(y)}};return p}var $n;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})($n||($n={}));const WV=new Set(["lazy","caseSensitive","path","id","index","children"]);function JV(t){return t.index===!0}function B5(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((i,a)=>{let o=[...n,a],s=typeof i.id=="string"?i.id:o.join("-");if(Dt(i.index!==!0||!i.children,"Cannot specify children on an index route"),Dt(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),JV(i)){let l=zn({},i,e(i),{id:s});return r[s]=l,l}else{let l=zn({},i,e(i),{id:s,children:void 0});return r[s]=l,i.children&&(l.children=B5(i.children,e,o,r)),l}})}function id(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?ps(e):e,i=qm(r.pathname||"/",n);if(i==null)return null;let a=k7(t);XV(a);let o=null;for(let s=0;o==null&&s{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(Dt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Wc([r,l.relativePath]),u=n.concat(l);a.children&&a.children.length>0&&(Dt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),k7(a.children,e,u,c)),!(a.path==null&&!a.index)&&e.push({path:c,score:iQ(c,a.index),routesMeta:u})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of _7(a.path))i(a,o,l)}),e}function _7(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=_7(r.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function XV(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:aQ(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ZV=/^:[\w-]+$/,qV=3,eQ=2,tQ=1,nQ=10,rQ=-2,JT=t=>t==="*";function iQ(t,e){let n=t.split("/"),r=n.length;return n.some(JT)&&(r+=rQ),e&&(r+=eQ),n.filter(i=>!JT(i)).reduce((i,a)=>i+(ZV.test(a)?qV:a===""?tQ:nQ),r)}function aQ(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function oQ(t,e){let{routesMeta:n}=t,r={},i="/",a=[];for(let o=0;o{let{paramName:h,isOptional:d}=u;if(h==="*"){let p=s[f]||"";o=a.slice(0,a.length-p.length).replace(/(.)\/+$/,"$1")}const g=s[f];return d&&!g?c[h]=void 0:c[h]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:o,pattern:t}}function lQ(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!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 r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function cQ(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}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 qm(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function uQ(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?ps(t):t;return{pathname:n?n.startsWith("/")?n:fQ(n,e):e,search:dQ(r),hash:pQ(i)}}function fQ(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function O6(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function N7(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function yP(t,e){let n=N7(t);return e?n.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function mP(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=ps(t):(i=zn({},t),Dt(!i.pathname||!i.pathname.includes("?"),O6("?","pathname","search",i)),Dt(!i.pathname||!i.pathname.includes("#"),O6("#","pathname","hash",i)),Dt(!i.search||!i.search.includes("#"),O6("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=n;else{let f=e.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?e[f]:"/"}let l=uQ(i,s),c=o&&o!=="/"&&o.endsWith("/"),u=(a||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Wc=t=>t.join("/").replace(/\/\/+/g,"/"),hQ=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),dQ=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,pQ=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class vP{constructor(e,n,r,i){i===void 0&&(i=!1),this.status=e,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function I7(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const R7=["post","put","patch","delete"],gQ=new Set(R7),yQ=["get",...R7],mQ=new Set(yQ),vQ=new Set([301,302,303,307,308]),bQ=new Set([307,308]),T6={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},wQ={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_g={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},M7=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xQ=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),B7="remix-router-transitions";function AQ(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;Dt(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let Q=t.detectErrorBoundary;i=Z=>({hasErrorBoundary:Q(Z)})}else i=xQ;let a={},o=B5(t.routes,i,void 0,a),s,l=t.basename||"/",c=zn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},t.future),u=null,f=new Set,h=null,d=null,g=null,p=t.hydrationData!=null,y=id(o,t.history.location,l),m=null;if(y==null){let Q=_a(404,{pathname:t.history.location.pathname}),{matches:Z,route:se}=rC(o);y=Z,m={[se.id]:Q}}let b,x=y.some(Q=>Q.route.lazy),A=y.some(Q=>Q.route.loader);if(x)b=!1;else if(!A)b=!0;else if(c.v7_partialHydration){let Q=t.hydrationData?t.hydrationData.loaderData:null,Z=t.hydrationData?t.hydrationData.errors:null;b=y.every(se=>se.route.loader&&se.route.loader.hydrate!==!0&&(Q&&Q[se.route.id]!==void 0||Z&&Z[se.route.id]!==void 0))}else b=t.hydrationData!=null;let S,E={historyAction:t.history.action,location:t.history.location,matches:y,initialized:b,navigation:T6,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||m,fetchers:new Map,blockers:new Map},T=Qn.Pop,C=!1,N,B=!1,L=new Map,U=null,j=!1,X=!1,G=[],H=[],re=new Map,V=0,ee=-1,pe=new Map,Ae=new Set,we=new Map,Ye=new Map,nt=new Set,De=new Map,st=new Map,Tt=!1;function ln(){if(u=t.history.listen(Q=>{let{action:Z,location:se,delta:Oe}=Q;if(Tt){Tt=!1;return}eh(st.size===0||Oe!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ge=pa({currentLocation:E.location,nextLocation:se,historyAction:Z});if(Ge&&Oe!=null){Tt=!0,t.history.go(Oe*-1),Xr(Ge,{state:"blocked",location:se,proceed(){Xr(Ge,{state:"proceeding",proceed:void 0,reset:void 0,location:se}),t.history.go(Oe)},reset(){let xt=new Map(E.blockers);xt.set(Ge,_g),le({blockers:xt})}});return}return ze(Z,se)}),n){RQ(e,L);let Q=()=>MQ(e,L);e.addEventListener("pagehide",Q),U=()=>e.removeEventListener("pagehide",Q)}return E.initialized||ze(Qn.Pop,E.location,{initialHydration:!0}),S}function Ee(){u&&u(),U&&U(),f.clear(),N&&N.abort(),E.fetchers.forEach((Q,Z)=>Yr(Z)),E.blockers.forEach((Q,Z)=>zi(Z))}function ne(Q){return f.add(Q),()=>f.delete(Q)}function le(Q,Z){Z===void 0&&(Z={}),E=zn({},E,Q);let se=[],Oe=[];c.v7_fetcherPersist&&E.fetchers.forEach((Ge,xt)=>{Ge.state==="idle"&&(nt.has(xt)?Oe.push(xt):se.push(xt))}),[...f].forEach(Ge=>Ge(E,{deletedFetchers:Oe,unstable_viewTransitionOpts:Z.viewTransitionOpts,unstable_flushSync:Z.flushSync===!0})),c.v7_fetcherPersist&&(se.forEach(Ge=>E.fetchers.delete(Ge)),Oe.forEach(Ge=>Yr(Ge)))}function te(Q,Z,se){var Oe,Ge;let{flushSync:xt}=se===void 0?{}:se,pt=E.actionData!=null&&E.navigation.formMethod!=null&&po(E.navigation.formMethod)&&E.navigation.state==="loading"&&((Oe=Q.state)==null?void 0:Oe._isRedirect)!==!0,lt;Z.actionData?Object.keys(Z.actionData).length>0?lt=Z.actionData:lt=null:pt?lt=E.actionData:lt=null;let Ue=Z.loaderData?nC(E.loaderData,Z.loaderData,Z.matches||[],Z.errors):E.loaderData,Ct=E.blockers;Ct.size>0&&(Ct=new Map(Ct),Ct.forEach((_,w)=>Ct.set(w,_g)));let P=C===!0||E.navigation.formMethod!=null&&po(E.navigation.formMethod)&&((Ge=Q.state)==null?void 0:Ge._isRedirect)!==!0;s&&(o=s,s=void 0),j||T===Qn.Pop||(T===Qn.Push?t.history.push(Q,Q.state):T===Qn.Replace&&t.history.replace(Q,Q.state));let k;if(T===Qn.Pop){let _=L.get(E.location.pathname);_&&_.has(Q.pathname)?k={currentLocation:E.location,nextLocation:Q}:L.has(Q.pathname)&&(k={currentLocation:Q,nextLocation:E.location})}else if(B){let _=L.get(E.location.pathname);_?_.add(Q.pathname):(_=new Set([Q.pathname]),L.set(E.location.pathname,_)),k={currentLocation:E.location,nextLocation:Q}}le(zn({},Z,{actionData:lt,loaderData:Ue,historyAction:T,location:Q,initialized:!0,navigation:T6,revalidation:"idle",restoreScrollPosition:yu(Q,Z.matches||E.matches),preventScrollReset:P,blockers:Ct}),{viewTransitionOpts:k,flushSync:xt===!0}),T=Qn.Pop,C=!1,B=!1,j=!1,X=!1,G=[],H=[]}async function Ce(Q,Z){if(typeof Q=="number"){t.history.go(Q);return}let se=D5(E.location,E.matches,l,c.v7_prependBasename,Q,c.v7_relativeSplatPath,Z==null?void 0:Z.fromRouteId,Z==null?void 0:Z.relative),{path:Oe,submission:Ge,error:xt}=YT(c.v7_normalizeFormMethod,!1,se,Z),pt=E.location,lt=r1(E.location,Oe,Z&&Z.state);lt=zn({},lt,t.history.encodeLocation(lt));let Ue=Z&&Z.replace!=null?Z.replace:void 0,Ct=Qn.Push;Ue===!0?Ct=Qn.Replace:Ue===!1||Ge!=null&&po(Ge.formMethod)&&Ge.formAction===E.location.pathname+E.location.search&&(Ct=Qn.Replace);let P=Z&&"preventScrollReset"in Z?Z.preventScrollReset===!0:void 0,k=(Z&&Z.unstable_flushSync)===!0,_=pa({currentLocation:pt,nextLocation:lt,historyAction:Ct});if(_){Xr(_,{state:"blocked",location:lt,proceed(){Xr(_,{state:"proceeding",proceed:void 0,reset:void 0,location:lt}),Ce(Q,Z)},reset(){let w=new Map(E.blockers);w.set(_,_g),le({blockers:w})}});return}return await ze(Ct,lt,{submission:Ge,pendingError:xt,preventScrollReset:P,replace:Z&&Z.replace,enableViewTransition:Z&&Z.unstable_viewTransition,flushSync:k})}function Se(){if(cn(),le({revalidation:"loading"}),E.navigation.state!=="submitting"){if(E.navigation.state==="idle"){ze(E.historyAction,E.location,{startUninterruptedRevalidation:!0});return}ze(T||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation})}}async function ze(Q,Z,se){N&&N.abort(),N=null,T=Q,j=(se&&se.startUninterruptedRevalidation)===!0,gu(E.location,E.matches),C=(se&&se.preventScrollReset)===!0,B=(se&&se.enableViewTransition)===!0;let Oe=s||o,Ge=se&&se.overrideNavigation,xt=id(Oe,Z,l),pt=(se&&se.flushSync)===!0;if(!xt){let w=_a(404,{pathname:Z.pathname}),{matches:I,route:z}=rC(Oe);Ya(),te(Z,{matches:I,loaderData:{},errors:{[z.id]:w}},{flushSync:pt});return}if(E.initialized&&!X&&TQ(E.location,Z)&&!(se&&se.submission&&po(se.submission.formMethod))){te(Z,{matches:xt},{flushSync:pt});return}N=new AbortController;let lt=Ig(t.history,Z,N.signal,se&&se.submission),Ue,Ct;if(se&&se.pendingError)Ct={[Sy(xt).route.id]:se.pendingError};else if(se&&se.submission&&po(se.submission.formMethod)){let w=await $e(lt,Z,se.submission,xt,{replace:se.replace,flushSync:pt});if(w.shortCircuited)return;Ue=w.pendingActionData,Ct=w.pendingActionError,Ge=C6(Z,se.submission),pt=!1,lt=new Request(lt.url,{signal:lt.signal})}let{shortCircuited:P,loaderData:k,errors:_}=await rt(lt,Z,xt,Ge,se&&se.submission,se&&se.fetcherSubmission,se&&se.replace,se&&se.initialHydration===!0,pt,Ue,Ct);P||(N=null,te(Z,zn({matches:xt},Ue?{actionData:Ue}:{},{loaderData:k,errors:_})))}async function $e(Q,Z,se,Oe,Ge){Ge===void 0&&(Ge={}),cn();let xt=NQ(Z,se);le({navigation:xt},{flushSync:Ge.flushSync===!0});let pt,lt=$5(Oe,Z);if(!lt.route.action&&!lt.route.lazy)pt={type:$n.error,error:_a(405,{method:Q.method,pathname:Z.pathname,routeId:lt.route.id})};else if(pt=await Ng("action",Q,lt,Oe,a,i,l,c.v7_relativeSplatPath),Q.signal.aborted)return{shortCircuited:!0};if(Mu(pt)){let Ue;return Ge&&Ge.replace!=null?Ue=Ge.replace:Ue=pt.location===E.location.pathname+E.location.search,await Pe(E,pt,{submission:se,replace:Ue}),{shortCircuited:!0}}if(ad(pt)){let Ue=Sy(Oe,lt.route.id);return(Ge&&Ge.replace)!==!0&&(T=Qn.Push),{pendingActionData:{},pendingActionError:{[Ue.route.id]:pt.error}}}if(Ru(pt))throw _a(400,{type:"defer-action"});return{pendingActionData:{[lt.route.id]:pt.data}}}async function rt(Q,Z,se,Oe,Ge,xt,pt,lt,Ue,Ct,P){let k=Oe||C6(Z,Ge),_=Ge||xt||oC(k),w=s||o,[I,z]=XT(t.history,E,se,_,Z,c.v7_partialHydration&<===!0,X,G,H,nt,we,Ae,w,l,Ct,P);if(Ya(ke=>!(se&&se.some(_e=>_e.route.id===ke))||I&&I.some(_e=>_e.route.id===ke)),ee=++V,I.length===0&&z.length===0){let ke=Ja();return te(Z,zn({matches:se,loaderData:{},errors:P||null},Ct?{actionData:Ct}:{},ke?{fetchers:new Map(E.fetchers)}:{}),{flushSync:Ue}),{shortCircuited:!0}}if(!j&&(!c.v7_partialHydration||!lt)){z.forEach(_e=>{let Xe=E.fetchers.get(_e.key),ht=Rg(void 0,Xe?Xe.data:void 0);E.fetchers.set(_e.key,ht)});let ke=Ct||E.actionData;le(zn({navigation:k},ke?Object.keys(ke).length===0?{actionData:null}:{actionData:ke}:{},z.length>0?{fetchers:new Map(E.fetchers)}:{}),{flushSync:Ue})}z.forEach(ke=>{re.has(ke.key)&&ji(ke.key),ke.controller&&re.set(ke.key,ke.controller)});let W=()=>z.forEach(ke=>ji(ke.key));N&&N.signal.addEventListener("abort",W);let{results:ce,loaderResults:ve,fetcherResults:Le}=await nn(E.matches,se,I,z,Q);if(Q.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",W),z.forEach(ke=>re.delete(ke.key));let Te=iC(ce);if(Te){if(Te.idx>=I.length){let ke=z[Te.idx-I.length].key;Ae.add(ke)}return await Pe(E,Te.result,{replace:pt}),{shortCircuited:!0}}let{loaderData:Rt,errors:Re}=tC(E,se,I,ve,P,z,Le,De);De.forEach((ke,_e)=>{ke.subscribe(Xe=>{(Xe||ke.done)&&De.delete(_e)})}),c.v7_partialHydration&<&&E.errors&&Object.entries(E.errors).filter(ke=>{let[_e]=ke;return!I.some(Xe=>Xe.route.id===_e)}).forEach(ke=>{let[_e,Xe]=ke;Re=Object.assign(Re||{},{[_e]:Xe})});let ft=Ja(),at=$l(ee),vt=ft||at||z.length>0;return zn({loaderData:Rt,errors:Re},vt?{fetchers:new Map(E.fetchers)}:{})}function dt(Q,Z,se,Oe){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");re.has(Q)&&ji(Q);let Ge=(Oe&&Oe.unstable_flushSync)===!0,xt=s||o,pt=D5(E.location,E.matches,l,c.v7_prependBasename,se,c.v7_relativeSplatPath,Z,Oe==null?void 0:Oe.relative),lt=id(xt,pt,l);if(!lt){Wa(Q,Z,_a(404,{pathname:pt}),{flushSync:Ge});return}let{path:Ue,submission:Ct,error:P}=YT(c.v7_normalizeFormMethod,!0,pt,Oe);if(P){Wa(Q,Z,P,{flushSync:Ge});return}let k=$5(lt,Ue);if(C=(Oe&&Oe.preventScrollReset)===!0,Ct&&po(Ct.formMethod)){wt(Q,Z,Ue,k,lt,Ge,Ct);return}we.set(Q,{routeId:Z,path:Ue}),yt(Q,Z,Ue,k,lt,Ge,Ct)}async function wt(Q,Z,se,Oe,Ge,xt,pt){if(cn(),we.delete(Q),!Oe.route.action&&!Oe.route.lazy){let _e=_a(405,{method:pt.formMethod,pathname:se,routeId:Z});Wa(Q,Z,_e,{flushSync:xt});return}let lt=E.fetchers.get(Q);Gn(Q,IQ(pt,lt),{flushSync:xt});let Ue=new AbortController,Ct=Ig(t.history,se,Ue.signal,pt);re.set(Q,Ue);let P=V,k=await Ng("action",Ct,Oe,Ge,a,i,l,c.v7_relativeSplatPath);if(Ct.signal.aborted){re.get(Q)===Ue&&re.delete(Q);return}if(c.v7_fetcherPersist&&nt.has(Q)){if(Mu(k)||ad(k)){Gn(Q,Kl(void 0));return}}else{if(Mu(k))if(re.delete(Q),ee>P){Gn(Q,Kl(void 0));return}else return Ae.add(Q),Gn(Q,Rg(pt)),Pe(E,k,{fetcherSubmission:pt});if(ad(k)){Wa(Q,Z,k.error);return}}if(Ru(k))throw _a(400,{type:"defer-action"});let _=E.navigation.location||E.location,w=Ig(t.history,_,Ue.signal),I=s||o,z=E.navigation.state!=="idle"?id(I,E.navigation.location,l):E.matches;Dt(z,"Didn't find any matches after fetcher action");let W=++V;pe.set(Q,W);let ce=Rg(pt,k.data);E.fetchers.set(Q,ce);let[ve,Le]=XT(t.history,E,z,pt,_,!1,X,G,H,nt,we,Ae,I,l,{[Oe.route.id]:k.data},void 0);Le.filter(_e=>_e.key!==Q).forEach(_e=>{let Xe=_e.key,ht=E.fetchers.get(Xe),Fe=Rg(void 0,ht?ht.data:void 0);E.fetchers.set(Xe,Fe),re.has(Xe)&&ji(Xe),_e.controller&&re.set(Xe,_e.controller)}),le({fetchers:new Map(E.fetchers)});let Te=()=>Le.forEach(_e=>ji(_e.key));Ue.signal.addEventListener("abort",Te);let{results:Rt,loaderResults:Re,fetcherResults:ft}=await nn(E.matches,z,ve,Le,w);if(Ue.signal.aborted)return;Ue.signal.removeEventListener("abort",Te),pe.delete(Q),re.delete(Q),Le.forEach(_e=>re.delete(_e.key));let at=iC(Rt);if(at){if(at.idx>=ve.length){let _e=Le[at.idx-ve.length].key;Ae.add(_e)}return Pe(E,at.result)}let{loaderData:vt,errors:ke}=tC(E,E.matches,ve,Re,void 0,Le,ft,De);if(E.fetchers.has(Q)){let _e=Kl(k.data);E.fetchers.set(Q,_e)}$l(W),E.navigation.state==="loading"&&W>ee?(Dt(T,"Expected pending action"),N&&N.abort(),te(E.navigation.location,{matches:z,loaderData:vt,errors:ke,fetchers:new Map(E.fetchers)})):(le({errors:ke,loaderData:nC(E.loaderData,vt,z,ke),fetchers:new Map(E.fetchers)}),X=!1)}async function yt(Q,Z,se,Oe,Ge,xt,pt){let lt=E.fetchers.get(Q);Gn(Q,Rg(pt,lt?lt.data:void 0),{flushSync:xt});let Ue=new AbortController,Ct=Ig(t.history,se,Ue.signal);re.set(Q,Ue);let P=V,k=await Ng("loader",Ct,Oe,Ge,a,i,l,c.v7_relativeSplatPath);if(Ru(k)&&(k=await $7(k,Ct.signal,!0)||k),re.get(Q)===Ue&&re.delete(Q),!Ct.signal.aborted){if(nt.has(Q)){Gn(Q,Kl(void 0));return}if(Mu(k))if(ee>P){Gn(Q,Kl(void 0));return}else{Ae.add(Q),await Pe(E,k);return}if(ad(k)){Wa(Q,Z,k.error);return}Dt(!Ru(k),"Unhandled fetcher deferred data"),Gn(Q,Kl(k.data))}}async function Pe(Q,Z,se){let{submission:Oe,fetcherSubmission:Ge,replace:xt}=se===void 0?{}:se;Z.revalidate&&(X=!0);let pt=r1(Q.location,Z.location,{_isRedirect:!0});if(Dt(pt,"Expected a location on the redirect navigation"),n){let _=!1;if(Z.reloadDocument)_=!0;else if(M7.test(Z.location)){const w=t.history.createURL(Z.location);_=w.origin!==e.location.origin||qm(w.pathname,l)==null}if(_){xt?e.location.replace(Z.location):e.location.assign(Z.location);return}}N=null;let lt=xt===!0?Qn.Replace:Qn.Push,{formMethod:Ue,formAction:Ct,formEncType:P}=Q.navigation;!Oe&&!Ge&&Ue&&Ct&&P&&(Oe=oC(Q.navigation));let k=Oe||Ge;if(bQ.has(Z.status)&&k&&po(k.formMethod))await ze(lt,pt,{submission:zn({},k,{formAction:Z.location}),preventScrollReset:C});else{let _=C6(pt,Oe);await ze(lt,pt,{overrideNavigation:_,fetcherSubmission:Ge,preventScrollReset:C})}}async function nn(Q,Z,se,Oe,Ge){let xt=await Promise.all([...se.map(Ue=>Ng("loader",Ge,Ue,Z,a,i,l,c.v7_relativeSplatPath)),...Oe.map(Ue=>Ue.matches&&Ue.match&&Ue.controller?Ng("loader",Ig(t.history,Ue.path,Ue.controller.signal),Ue.match,Ue.matches,a,i,l,c.v7_relativeSplatPath):{type:$n.error,error:_a(404,{pathname:Ue.path})})]),pt=xt.slice(0,se.length),lt=xt.slice(se.length);return await Promise.all([aC(Q,se,pt,pt.map(()=>Ge.signal),!1,E.loaderData),aC(Q,Oe.map(Ue=>Ue.match),lt,Oe.map(Ue=>Ue.controller?Ue.controller.signal:null),!0)]),{results:xt,loaderResults:pt,fetcherResults:lt}}function cn(){X=!0,G.push(...Ya()),we.forEach((Q,Z)=>{re.has(Z)&&(H.push(Z),ji(Z))})}function Gn(Q,Z,se){se===void 0&&(se={}),E.fetchers.set(Q,Z),le({fetchers:new Map(E.fetchers)},{flushSync:(se&&se.flushSync)===!0})}function Wa(Q,Z,se,Oe){Oe===void 0&&(Oe={});let Ge=Sy(E.matches,Z);Yr(Q),le({errors:{[Ge.route.id]:se},fetchers:new Map(E.fetchers)},{flushSync:(Oe&&Oe.flushSync)===!0})}function ms(Q){return c.v7_fetcherPersist&&(Ye.set(Q,(Ye.get(Q)||0)+1),nt.has(Q)&&nt.delete(Q)),E.fetchers.get(Q)||wQ}function Yr(Q){let Z=E.fetchers.get(Q);re.has(Q)&&!(Z&&Z.state==="loading"&&pe.has(Q))&&ji(Q),we.delete(Q),pe.delete(Q),Ae.delete(Q),nt.delete(Q),E.fetchers.delete(Q)}function du(Q){if(c.v7_fetcherPersist){let Z=(Ye.get(Q)||0)-1;Z<=0?(Ye.delete(Q),nt.add(Q)):Ye.set(Q,Z)}else Yr(Q);le({fetchers:new Map(E.fetchers)})}function ji(Q){let Z=re.get(Q);Dt(Z,"Expected fetch controller: "+Q),Z.abort(),re.delete(Q)}function pu(Q){for(let Z of Q){let se=ms(Z),Oe=Kl(se.data);E.fetchers.set(Z,Oe)}}function Ja(){let Q=[],Z=!1;for(let se of Ae){let Oe=E.fetchers.get(se);Dt(Oe,"Expected fetcher: "+se),Oe.state==="loading"&&(Ae.delete(se),Q.push(se),Z=!0)}return pu(Q),Z}function $l(Q){let Z=[];for(let[se,Oe]of pe)if(Oe0}function Ul(Q,Z){let se=E.blockers.get(Q)||_g;return st.get(Q)!==Z&&st.set(Q,Z),se}function zi(Q){E.blockers.delete(Q),st.delete(Q)}function Xr(Q,Z){let se=E.blockers.get(Q)||_g;Dt(se.state==="unblocked"&&Z.state==="blocked"||se.state==="blocked"&&Z.state==="blocked"||se.state==="blocked"&&Z.state==="proceeding"||se.state==="blocked"&&Z.state==="unblocked"||se.state==="proceeding"&&Z.state==="unblocked","Invalid blocker state transition: "+se.state+" -> "+Z.state);let Oe=new Map(E.blockers);Oe.set(Q,Z),le({blockers:Oe})}function pa(Q){let{currentLocation:Z,nextLocation:se,historyAction:Oe}=Q;if(st.size===0)return;st.size>1&&eh(!1,"A router only supports one blocker at a time");let Ge=Array.from(st.entries()),[xt,pt]=Ge[Ge.length-1],lt=E.blockers.get(xt);if(!(lt&<.state==="proceeding")&&pt({currentLocation:Z,nextLocation:se,historyAction:Oe}))return xt}function Ya(Q){let Z=[];return De.forEach((se,Oe)=>{(!Q||Q(Oe))&&(se.cancel(),Z.push(Oe),De.delete(Oe))}),Z}function Io(Q,Z,se){if(h=Q,g=Z,d=se||null,!p&&E.navigation===T6){p=!0;let Oe=yu(E.location,E.matches);Oe!=null&&le({restoreScrollPosition:Oe})}return()=>{h=null,g=null,d=null}}function Xa(Q,Z){return d&&d(Q,Z.map(Oe=>YV(Oe,E.loaderData)))||Q.key}function gu(Q,Z){if(h&&g){let se=Xa(Q,Z);h[se]=g()}}function yu(Q,Z){if(h){let se=Xa(Q,Z),Oe=h[se];if(typeof Oe=="number")return Oe}return null}function Sh(Q){a={},s=B5(Q,i,void 0,a)}return S={get basename(){return l},get future(){return c},get state(){return E},get routes(){return o},get window(){return e},initialize:ln,subscribe:ne,enableScrollRestoration:Io,navigate:Ce,fetch:dt,revalidate:Se,createHref:Q=>t.history.createHref(Q),encodeLocation:Q=>t.history.encodeLocation(Q),getFetcher:ms,deleteFetcher:du,dispose:Ee,getBlocker:Ul,deleteBlocker:zi,_internalFetchControllers:re,_internalActiveDeferreds:De,_internalSetRoutes:Sh},S}function EQ(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function D5(t,e,n,r,i,a,o,s){let l,c;if(o){l=[];for(let f of e)if(l.push(f),f.route.id===o){c=f;break}}else l=e,c=e[e.length-1];let u=mP(i||".",yP(l,a),qm(t.pathname,n)||t.pathname,s==="path");return i==null&&(u.search=t.search,u.hash=t.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!bP(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Wc([n,u.pathname])),Zm(u)}function YT(t,e,n,r){if(!r||!EQ(r))return{path:n};if(r.formMethod&&!_Q(r.formMethod))return{path:n,error:_a(405,{method:r.formMethod})};let i=()=>({path:n,error:_a(400,{type:"invalid-body"})}),a=r.formMethod||"get",o=t?a.toUpperCase():a.toLowerCase(),s=L7(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!po(o))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((d,g)=>{let[p,y]=g;return""+d+p+"="+y+` -`},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!po(o))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}Dt(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=L5(r.formData),c=r.formData;else if(r.body instanceof FormData)l=L5(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=eC(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=eC(l)}catch{return i()}let u={formMethod:o,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(po(u.formMethod))return{path:n,submission:u};let f=ps(n);return e&&f.search&&bP(f.search)&&l.append("index",""),f.search="?"+l,{path:Zm(f),submission:u}}function SQ(t,e){let n=t;if(e){let r=t.findIndex(i=>i.route.id===e);r>=0&&(n=t.slice(0,r))}return n}function XT(t,e,n,r,i,a,o,s,l,c,u,f,h,d,g,p){let y=p?Object.values(p)[0]:g?Object.values(g)[0]:void 0,m=t.createURL(e.location),b=t.createURL(i),x=p?Object.keys(p)[0]:void 0,S=SQ(n,x).filter((T,C)=>{let{route:N}=T;if(N.lazy)return!0;if(N.loader==null)return!1;if(a)return N.loader.hydrate?!0:e.loaderData[N.id]===void 0&&(!e.errors||e.errors[N.id]===void 0);if(PQ(e.loaderData,e.matches[C],T)||s.some(U=>U===T.route.id))return!0;let B=e.matches[C],L=T;return ZT(T,zn({currentUrl:m,currentParams:B.params,nextUrl:b,nextParams:L.params},r,{actionResult:y,defaultShouldRevalidate:o||m.pathname+m.search===b.pathname+b.search||m.search!==b.search||D7(B,L)}))}),E=[];return u.forEach((T,C)=>{if(a||!n.some(j=>j.route.id===T.routeId)||c.has(C))return;let N=id(h,T.path,d);if(!N){E.push({key:C,routeId:T.routeId,path:T.path,matches:null,match:null,controller:null});return}let B=e.fetchers.get(C),L=$5(N,T.path),U=!1;f.has(C)?U=!1:l.includes(C)?U=!0:B&&B.state!=="idle"&&B.data===void 0?U=o:U=ZT(L,zn({currentUrl:m,currentParams:e.matches[e.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},r,{actionResult:y,defaultShouldRevalidate:o})),U&&E.push({key:C,routeId:T.routeId,path:T.path,matches:N,match:L,controller:new AbortController})}),[S,E]}function PQ(t,e,n){let r=!e||n.route.id!==e.route.id,i=t[n.route.id]===void 0;return r||i}function D7(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function ZT(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function qT(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let i=n[t.id];Dt(i,"No route found in manifest");let a={};for(let o in r){let l=i[o]!==void 0&&o!=="hasErrorBoundary";eh(!l,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!WV.has(o)&&(a[o]=r[o])}Object.assign(i,a),Object.assign(i,zn({},e(i),{lazy:void 0}))}async function Ng(t,e,n,r,i,a,o,s,l){l===void 0&&(l={});let c,u,f,h=p=>{let y,m=new Promise((b,x)=>y=x);return f=()=>y(),e.signal.addEventListener("abort",f),Promise.race([p({request:e,params:n.params,context:l.requestContext}),m])};try{let p=n.route[t];if(n.route.lazy)if(p){let y,m=await Promise.all([h(p).catch(b=>{y=b}),qT(n.route,a,i)]);if(y)throw y;u=m[0]}else if(await qT(n.route,a,i),p=n.route[t],p)u=await h(p);else if(t==="action"){let y=new URL(e.url),m=y.pathname+y.search;throw _a(405,{method:e.method,pathname:m,routeId:n.route.id})}else return{type:$n.data,data:void 0};else if(p)u=await h(p);else{let y=new URL(e.url),m=y.pathname+y.search;throw _a(404,{pathname:m})}Dt(u!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(p){c=$n.error,u=p}finally{f&&e.signal.removeEventListener("abort",f)}if(kQ(u)){let p=u.status;if(vQ.has(p)){let m=u.headers.get("Location");if(Dt(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!M7.test(m))m=D5(new URL(e.url),r.slice(0,r.indexOf(n)+1),o,!0,m,s);else if(!l.isStaticRequest){let b=new URL(e.url),x=m.startsWith("//")?new URL(b.protocol+m):new URL(m),A=qm(x.pathname,o)!=null;x.origin===b.origin&&A&&(m=x.pathname+x.search+x.hash)}if(l.isStaticRequest)throw u.headers.set("Location",m),u;return{type:$n.redirect,status:p,location:m,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(l.isRouteRequest)throw{type:c===$n.error?$n.error:$n.data,response:u};let y;try{let m=u.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?u.body==null?y=null:y=await u.json():y=await u.text()}catch(m){return{type:$n.error,error:m}}return c===$n.error?{type:c,error:new vP(p,u.statusText,y),headers:u.headers}:{type:$n.data,data:y,statusCode:u.status,headers:u.headers}}if(c===$n.error)return{type:c,error:u};if(CQ(u)){var d,g;return{type:$n.deferred,deferredData:u,statusCode:(d=u.init)==null?void 0:d.status,headers:((g=u.init)==null?void 0:g.headers)&&new Headers(u.init.headers)}}return{type:$n.data,data:u}}function Ig(t,e,n,r){let i=t.createURL(L7(e)).toString(),a={signal:n};if(r&&po(r.formMethod)){let{formMethod:o,formEncType:s}=r;a.method=o.toUpperCase(),s==="application/json"?(a.headers=new Headers({"Content-Type":s}),a.body=JSON.stringify(r.json)):s==="text/plain"?a.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?a.body=L5(r.formData):a.body=r.formData}return new Request(i,a)}function L5(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function eC(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function OQ(t,e,n,r,i){let a={},o=null,s,l=!1,c={};return n.forEach((u,f)=>{let h=e[f].route.id;if(Dt(!Mu(u),"Cannot handle redirect results in processLoaderData"),ad(u)){let d=Sy(t,h),g=u.error;r&&(g=Object.values(r)[0],r=void 0),o=o||{},o[d.route.id]==null&&(o[d.route.id]=g),a[h]=void 0,l||(l=!0,s=I7(u.error)?u.error.status:500),u.headers&&(c[h]=u.headers)}else Ru(u)?(i.set(h,u.deferredData),a[h]=u.deferredData.data):a[h]=u.data,u.statusCode!=null&&u.statusCode!==200&&!l&&(s=u.statusCode),u.headers&&(c[h]=u.headers)}),r&&(o=r,a[Object.keys(r)[0]]=void 0),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:c}}function tC(t,e,n,r,i,a,o,s){let{loaderData:l,errors:c}=OQ(e,n,r,i,s);for(let u=0;ur.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function rC(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function _a(t,e){let{pathname:n,routeId:r,method:i,type:a}=e===void 0?{}:e,o="Unknown Server Error",s="Unknown @remix-run/router error";return t===400?(o="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?s="defer() is not supported in actions":a==="invalid-body"&&(s="Unable to encode submission body")):t===403?(o="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):t===404?(o="Not Found",s='No route matches URL "'+n+'"'):t===405&&(o="Method Not Allowed",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new vP(t||500,o,new Error(s),!0)}function iC(t){for(let e=t.length-1;e>=0;e--){let n=t[e];if(Mu(n))return{result:n,idx:e}}}function L7(t){let e=typeof t=="string"?ps(t):t;return Zm(zn({},e,{hash:""}))}function TQ(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Ru(t){return t.type===$n.deferred}function ad(t){return t.type===$n.error}function Mu(t){return(t&&t.type)===$n.redirect}function CQ(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function kQ(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function _Q(t){return mQ.has(t.toLowerCase())}function po(t){return gQ.has(t.toLowerCase())}async function aC(t,e,n,r,i,a){for(let o=0;of.route.id===l.route.id),u=c!=null&&!D7(c,l)&&(a&&a[l.route.id])!==void 0;if(Ru(s)&&(i||u)){let f=r[o];Dt(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await $7(s,f,i).then(h=>{h&&(n[o]=h||n[o])})}}}async function $7(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:$n.data,data:t.deferredData.unwrappedData}}catch(i){return{type:$n.error,error:i}}return{type:$n.data,data:t.deferredData.data}}}function bP(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function $5(t,e){let n=typeof e=="string"?ps(e).search:e.search;if(t[t.length-1].route.index&&bP(n||""))return t[t.length-1];let r=N7(t);return r[r.length-1]}function oC(t){let{formMethod:e,formAction:n,formEncType:r,text:i,formData:a,json:o}=t;if(!(!e||!n||!r)){if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:e,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function C6(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function NQ(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Rg(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function IQ(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Kl(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function RQ(t,e){try{let n=t.sessionStorage.getItem(B7);if(n){let r=JSON.parse(n);for(let[i,a]of Object.entries(r||{}))a&&Array.isArray(a)&&e.set(i,new Set(a||[]))}}catch{}}function MQ(t,e){if(e.size>0){let n={};for(let[r,i]of e)n[r]=[...i];try{t.sessionStorage.setItem(B7,JSON.stringify(n))}catch(r){eh(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** - * React Router v6.22.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function i1(){return i1=Object.assign?Object.assign.bind():function(t){for(var e=1;e{s.current=!0}),F.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let f=mP(c,JSON.parse(o),a,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Wc([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,o,a,t])}const DQ=F.createContext(null);function LQ(t){let e=F.useContext(au).outlet;return e&&F.createElement(DQ.Provider,{value:t},e)}function $Q(t,e,n,r){tv()||Dt(!1);let{navigator:i}=F.useContext(ev),{matches:a}=F.useContext(au),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=B2(),u;if(e){var f;let y=typeof e=="string"?ps(e):e;l==="/"||(f=y.pathname)!=null&&f.startsWith(l)||Dt(!1),u=y}else u=c;let h=u.pathname||"/",d=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");d="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=id(t,{pathname:d}),p=HQ(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Wc([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Wc([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r);return e&&p?F.createElement(M2.Provider,{value:{location:i1({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Qn.Pop}},p):p}function UQ(){let t=KQ(),e=I7(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return F.createElement(F.Fragment,null,F.createElement("h2",null,"Unexpected Application Error!"),F.createElement("h3",{style:{fontStyle:"italic"}},e),n?F.createElement("pre",{style:i},n):null,null)}const FQ=F.createElement(UQ,null);class jQ extends F.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?F.createElement(au.Provider,{value:this.props.routeContext},F.createElement(F7.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zQ(t){let{routeContext:e,match:n,children:r}=t,i=F.useContext(R2);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),F.createElement(au.Provider,{value:e},r)}function HQ(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var a;if((a=n)!=null&&a.errors)t=n.matches;else return null}let o=t,s=(i=n)==null?void 0:i.errors;if(s!=null){let u=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id]));u>=0||Dt(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,f,h)=>{let d,g=!1,p=null,y=null;n&&(d=s&&f.route.id?s[f.route.id]:void 0,p=f.route.errorElement||FQ,l&&(c<0&&h===0?(JQ("route-fallback",!1),g=!0,y=null):c===h&&(g=!0,y=f.route.hydrateFallbackElement||null)));let m=e.concat(o.slice(0,h+1)),b=()=>{let x;return d?x=p:g?x=y:f.route.Component?x=F.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=u,F.createElement(zQ,{match:f,routeContext:{outlet:u,matches:m,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?F.createElement(jQ,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:b(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):b()},null)}var H7=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(H7||{}),Uw=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}(Uw||{});function GQ(t){let e=F.useContext(R2);return e||Dt(!1),e}function VQ(t){let e=F.useContext(U7);return e||Dt(!1),e}function QQ(t){let e=F.useContext(au);return e||Dt(!1),e}function G7(t){let e=QQ(),n=e.matches[e.matches.length-1];return n.route.id||Dt(!1),n.route.id}function KQ(){var t;let e=F.useContext(F7),n=VQ(Uw.UseRouteError),r=G7(Uw.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function WQ(){let{router:t}=GQ(H7.UseNavigateStable),e=G7(Uw.UseNavigateStable),n=F.useRef(!1);return j7(()=>{n.current=!0}),F.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,i1({fromRouteId:e},a)))},[t,e])}const sC={};function JQ(t,e,n){!e&&!sC[t]&&(sC[t]=!0)}function V7(t){let{to:e,replace:n,state:r,relative:i}=t;tv()||Dt(!1);let{future:a,static:o}=F.useContext(ev),{matches:s}=F.useContext(au),{pathname:l}=B2(),c=z7(),u=mP(e,yP(s,a.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(u);return F.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:i}),[c,f,i,n,r]),null}function YQ(t){return LQ(t.context)}function XQ(t){let{basename:e="/",children:n=null,location:r,navigationType:i=Qn.Pop,navigator:a,static:o=!1,future:s}=t;tv()&&Dt(!1);let l=e.replace(/^\/*/,"/"),c=F.useMemo(()=>({basename:l,navigator:a,static:o,future:i1({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof r=="string"&&(r=ps(r));let{pathname:u="/",search:f="",hash:h="",state:d=null,key:g="default"}=r,p=F.useMemo(()=>{let y=qm(u,l);return y==null?null:{location:{pathname:y,search:f,hash:h,state:d,key:g},navigationType:i}},[l,u,f,h,d,g,i]);return p==null?null:F.createElement(ev.Provider,{value:c},F.createElement(M2.Provider,{children:n,value:p}))}new Promise(()=>{});function ZQ(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:F.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:F.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:F.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** - * React Router DOM v6.22.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Fw(){return Fw=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function qQ(t,e){let n=U5(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(a=>{n.append(i,a)})}),n}const eK="6";try{window.__reactRouterVersion=eK}catch{}function tK(t,e){return AQ({basename:e==null?void 0:e.basename,future:Fw({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:VV({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||nK(),routes:t,mapRouteProperties:ZQ,window:e==null?void 0:e.window}).initialize()}function nK(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=Fw({},e,{errors:rK(e.errors)})),e}function rK(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")n[r]=new vP(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let a=window[i.__subType];if(typeof a=="function")try{let o=new a(i.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let a=new Error(i.message);a.stack="",n[r]=a}}else n[r]=i;return n}const iK=F.createContext({isTransitioning:!1}),aK=F.createContext(new Map),oK="startTransition",lC=RH[oK],sK="flushSync",cC=GV[sK];function lK(t){lC?lC(t):t()}function Mg(t){cC?cC(t):t()}class cK{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function uK(t){let{fallbackElement:e,router:n,future:r}=t,[i,a]=F.useState(n.state),[o,s]=F.useState(),[l,c]=F.useState({isTransitioning:!1}),[u,f]=F.useState(),[h,d]=F.useState(),[g,p]=F.useState(),y=F.useRef(new Map),{v7_startTransition:m}=r||{},b=F.useCallback(T=>{m?lK(T):T()},[m]),x=F.useCallback((T,C)=>{let{deletedFetchers:N,unstable_flushSync:B,unstable_viewTransitionOpts:L}=C;N.forEach(j=>y.current.delete(j)),T.fetchers.forEach((j,X)=>{j.data!==void 0&&y.current.set(X,j.data)});let U=n.window==null||typeof n.window.document.startViewTransition!="function";if(!L||U){B?Mg(()=>a(T)):b(()=>a(T));return}if(B){Mg(()=>{h&&(u&&u.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:L.currentLocation,nextLocation:L.nextLocation})});let j=n.window.document.startViewTransition(()=>{Mg(()=>a(T))});j.finished.finally(()=>{Mg(()=>{f(void 0),d(void 0),s(void 0),c({isTransitioning:!1})})}),Mg(()=>d(j));return}h?(u&&u.resolve(),h.skipTransition(),p({state:T,currentLocation:L.currentLocation,nextLocation:L.nextLocation})):(s(T),c({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}))},[n.window,h,u,y,b]);F.useLayoutEffect(()=>n.subscribe(x),[n,x]),F.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new cK)},[l]),F.useEffect(()=>{if(u&&o&&n.window){let T=o,C=u.promise,N=n.window.document.startViewTransition(async()=>{b(()=>a(T)),await C});N.finished.finally(()=>{f(void 0),d(void 0),s(void 0),c({isTransitioning:!1})}),d(N)}},[b,o,u,n.window]),F.useEffect(()=>{u&&o&&i.location.key===o.location.key&&u.resolve()},[u,h,i.location,o]),F.useEffect(()=>{!l.isTransitioning&&g&&(s(g.state),c({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),p(void 0))},[l.isTransitioning,g]),F.useEffect(()=>{},[]);let A=F.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:T=>n.navigate(T),push:(T,C,N)=>n.navigate(T,{state:C,preventScrollReset:N==null?void 0:N.preventScrollReset}),replace:(T,C,N)=>n.navigate(T,{replace:!0,state:C,preventScrollReset:N==null?void 0:N.preventScrollReset})}),[n]),S=n.basename||"/",E=F.useMemo(()=>({router:n,navigator:A,static:!1,basename:S}),[n,A,S]);return F.createElement(F.Fragment,null,F.createElement(R2.Provider,{value:E},F.createElement(U7.Provider,{value:i},F.createElement(aK.Provider,{value:y.current},F.createElement(iK.Provider,{value:l},F.createElement(XQ,{basename:S,location:i.location,navigationType:i.historyAction,navigator:A,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?F.createElement(fK,{routes:n.routes,future:n.future,state:i}):e))))),null)}function fK(t){let{routes:e,future:n,state:r}=t;return $Q(e,void 0,r,n)}var uC;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(uC||(uC={}));var fC;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(fC||(fC={}));function hK(t){let e=F.useRef(U5(t)),n=F.useRef(!1),r=B2(),i=F.useMemo(()=>qQ(r.search,n.current?null:e.current),[r.search]),a=z7(),o=F.useCallback((s,l)=>{const c=U5(typeof s=="function"?s(i):s);n.current=!0,a("?"+c,l)},[a,i]);return[i,o]}const dK="_layout_1mpeu_1",pK="_main_1mpeu_8",gK="_header_1mpeu_14",yK="_subHeader_1mpeu_24",$v={layout:dK,main:pK,header:gK,subHeader:yK},Q7=F.createContext({}),ig=()=>{const t=F.useContext(Q7);if(Object.keys(t).length===0)throw new Error("[useAppState] Component not wrapped within a Provider");return t},mK={true:{width:153,height:50},false:{width:55,height:18}},vK=()=>{const{state:{isDesktopScreen:t}}=ig(),e=mK[t?"true":"false"];return q.jsxs("svg",{width:e.width,height:e.height,viewBox:"0 0 153 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[q.jsx("path",{d:"M65.882 36L59.031 20.5H63.712L67.804 30.42L71.896 20.5H76.639L69.757 36H65.882ZM90.2073 34.016C88.616 35.566 86.694 36.341 84.4413 36.341C82.1886 36.341 80.2666 35.566 78.6753 34.016C77.084 32.4453 76.2883 30.5233 76.2883 28.25C76.2883 25.9973 77.084 24.0857 78.6753 22.515C80.2666 20.9443 82.1886 20.159 84.4413 20.159C86.694 20.159 88.616 20.9443 90.2073 22.515C91.7986 24.0857 92.5943 25.9973 92.5943 28.25C92.5943 30.5233 91.7986 32.4453 90.2073 34.016ZM84.4413 32.373C85.5366 32.373 86.446 31.9907 87.1693 31.226C87.9133 30.4407 88.2853 29.4487 88.2853 28.25C88.2853 27.0513 87.9133 26.0697 87.1693 25.305C86.446 24.5197 85.5366 24.127 84.4413 24.127C83.3253 24.127 82.3953 24.5197 81.6513 25.305C80.928 26.0697 80.5663 27.0513 80.5663 28.25C80.5663 29.4487 80.928 30.4407 81.6513 31.226C82.3953 31.9907 83.3253 32.373 84.4413 32.373ZM96.3453 36V18.268H90.4863V13.99H106.792V18.268H100.871V36H96.3453ZM108.973 36V13.99H122.675V18.268H113.468V22.794H120.815V27.072H113.468V31.722H122.675V36H108.973ZM125.663 36V13.99H139.365V18.268H130.158V22.794H137.505V27.072H130.158V31.722H139.365V36H125.663Z",fill:"white"}),q.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40.438 11.9201C37.0276 7.57101 32.0669 4.81953 26.5305 4.81953C15.8563 4.81953 8.06102 14.7604 8.06102 25.5444C8.06102 33.0444 13.0217 38.6805 18.5581 38.6805C19.0896 38.6805 19.5768 38.6361 20.1083 38.5473C16.3878 35.7959 13.9961 30.8254 13.9961 25.5C13.9961 16.9793 19.7539 10.3669 26.5305 10.3669C33.9272 10.3669 39.065 17.7337 39.065 25.5C39.065 31.2692 36.9833 36.9941 33.3957 41.2101C30.251 44.8935 26.1762 47.2456 21.7028 47.9556C21.7028 47.9556 22.0571 48 22.5443 48C34.9459 48 45 37.926 45 25.5C45 20.3965 43.3169 15.6923 40.438 11.9201ZM37.0276 25.5C37.0276 18 32.0669 12.3639 26.5305 12.3639C25.999 12.3639 25.5118 12.4083 24.9803 12.497C28.7008 15.2041 31.0482 20.1302 31.0482 25.5C31.0482 34.0207 25.2904 40.6331 18.5138 40.6331C11.1171 40.6331 5.97933 33.2663 5.97933 25.5C5.97933 19.7308 8.06102 14.0059 11.6486 9.78994C14.7933 6.10651 18.8681 3.75444 23.3415 3.04438C23.3415 3.04438 22.9872 3 22.4557 3C10.0541 3 0 13.074 0 25.5C0 30.6035 1.68307 35.3077 4.56201 39.0799C7.97244 43.429 12.9774 46.1805 18.4695 46.1805C29.2323 46.2249 37.0276 36.284 37.0276 25.5Z",fill:"white"})]})},K7=F.createContext({}),nv=()=>{const t=F.useContext(K7);if(Object.keys(t).length===0)throw new Error("[useWeb3] Component not wrapped within a Provider");return t};var bK={VITE_NETWORK:"23294",VITE_WEB3_GATEWAY:"https://sapphire.oasis.io",VITE_PROPOSAL_START_TIME:"1710514800",VITE_CONTRACT_ACL_ALLOWALL:"0x393b419347c1F50E03498004801E8d3916816dfb",VITE_CONTRACT_ACL_NATIVEBALANCE:"0xF29071c2054620Ca0faA7F31982b00A05935b345",VITE_CONTRACT_POLLMANAGER:"0x8c577526f3f2e971Be320dd7045FE60b1A0f97A8",VITE_CONTRACT_POLLMANAGER_ACL:"0x393b419347c1F50E03498004801E8d3916816dfb",VITE_PROPOSAL_ID:"0x5197f7eb06c1d0e8ec39b3822f53818b81ee8d400c3cd5994db5fcca050081d3",BASE_URL:"/votee",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const jw=new Map([[23294n,{chainId:"0x5afe",chainName:"Oasis Sapphire",iconUrls:["https://votee.oasis.io/rose.png"],nativeCurrency:{name:"ROSE",symbol:"ROSE",decimals:18},rpcUrls:["https://sapphire.oasis.io/","wss://sapphire.oasis.io/ws"],blockExplorerUrls:["https://explorer.oasis.io/mainnet/sapphire"]}],[23295n,{chainId:"0x5aff",chainName:"Oasis Sapphire Testnet",iconUrls:["https://votee.oasis.io/rose.png"],nativeCurrency:{name:"TEST",symbol:"TEST",decimals:18},rpcUrls:["https://testnet.sapphire.oasis.dev/","wss://testnet.sapphire.oasis.dev/ws"],blockExplorerUrls:["https://explorer.oasis.io/testnet/sapphire"]}]]),wK={"Oasis Sapphire":"Sapphire","Oasis Sapphire Testnet":"Sapphire Testnet"},xK=150000n,W7=Object.freeze([{name:"Capybara",description:"A friendly capybara with a rose in its hand, symbolizing the interoperability pioneered by the Oasis Network.",imagePath:"https://fakeimg.pl/182x182"},{name:"Desert Owl",description:"A wise owl with scrolls in its claws, symbolizing the knowledge pioneered by the Oasis Network.",imagePath:"https://fakeimg.pl/182x182"},{name:"Fennec Fox",description:"A nimble fox with sunglasses on its eyes, symbolizing the privacy pioneered by the Oasis Network.",imagePath:"https://fakeimg.pl/182x182"}]),AK="https://metamask.io/",EK="https://oasisprotocol.org/blog",{VITE_NETWORK:SK,VITE_PROPOSAL_START_TIME:PK,VITE_WEB3_GATEWAY:hC,VITE_CONTRACT_ACL_ALLOWALL:vPe,VITE_CONTRACT_ACL_NATIVEBALANCE:bPe,VITE_CONTRACT_POLLMANAGER:k6,VITE_CONTRACT_POLLMANAGER_ACL:wPe,VITE_PROPOSAL_ID:Uv}=bK,zw=BigInt(SK)??0n,_6=Number(PK)??0,OK="_button_16xt8_1",TK="_buttonSmall_16xt8_22",CK="_buttonMedium_16xt8_30",kK="_buttonSolid_16xt8_38",_K="_buttonPrimary_16xt8_39",NK="_buttonSecondary_16xt8_44",IK="_buttonSuccess_16xt8_49",RK="_buttonOutline_16xt8_56",MK="_buttonText_16xt8_76",BK="_buttonDisabled_16xt8_92",DK="_fullWidth_16xt8_98",So={button:OK,buttonSmall:TK,buttonMedium:CK,buttonSolid:kK,buttonPrimary:_K,buttonSecondary:NK,buttonSuccess:IK,buttonOutline:RK,buttonText:MK,buttonDisabled:BK,fullWidth:DK},LK=/^(0x[a-zA-Z0-9]{4})[a-zA-Z0-9]+([a-zA-Z0-9]{4})$/;class Er{}R(Er,"truncateAddress",e=>{const n=e.match(LK);if(!n||(n==null?void 0:n.length)<=0)return e;const[,r,i]=n;return`${r}…${i}`}),R(Er,"getTransactionUrl",(e,n)=>`${e}/tx/${n}`),R(Er,"getAccountUrl",(e,n)=>`${e}/address/${n}`),R(Er,"clsx",(...e)=>e.map(n=>n?[n]:[]).flat().join(" ")),R(Er,"getNetworkFriendlyName",e=>wK[e]??"Unknown network"),R(Er,"truncate",(e,n=200)=>e.slice(0,n));const $K={small:So.buttonSmall,medium:So.buttonMedium},UK={primary:So.buttonPrimary,secondary:So.buttonSecondary,success:So.buttonSuccess},FK={solid:So.buttonSolid,outline:So.buttonOutline,text:So.buttonText},tl=({className:t,children:e,disabled:n,color:r="primary",size:i="medium",variant:a="solid",fullWidth:o,onClick:s,type:l})=>q.jsx("button",{className:Er.clsx(t,So.button,n?So.buttonDisabled:void 0,o?So.fullWidth:void 0,UK[r],$K[i],FK[a]),onClick:s,disabled:n,type:l,children:e});class F5 extends Error{constructor(e){super(e)}}var _l=function(t){t==null&&(t=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,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};_l.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(((t&4294901760)>>>16)*1812433253<<16)+(t&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};_l.prototype.init_by_array=function(t,e){var n,r,i;for(this.init_seed(19650218),n=1,r=0,i=this.N>e?this.N:e;i;i--){var a=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((a&4294901760)>>>16)*1664525<<16)+(a&65535)*1664525)+t[r]+r,this.mt[n]>>>=0,n++,r++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),r>=e&&(r=0)}for(i=this.N-1;i;i--){var a=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((a&4294901760)>>>16)*1566083941<<16)+(a&65535)*1566083941)-n,this.mt[n]>>>=0,n++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1)}this.mt[0]=2147483648};_l.prototype.random_int=function(){var t,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti==this.N+1&&this.init_seed(5489),n=0;n>>1^e[t&1];for(;n>>1^e[t&1];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^e[t&1],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0};_l.prototype.random_int31=function(){return this.random_int()>>>1};_l.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};_l.prototype.random=function(){return this.random_int()*(1/4294967296)};_l.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};_l.prototype.random_long=function(){var t=this.random_int()>>>5,e=this.random_int()>>>6;return(t*67108864+e)*(1/9007199254740992)};var jK=_l;function zK(t,e){var n=document.createElement("div");return n.style.borderRadius="50px",n.style.overflow="hidden",n.style.padding="0px",n.style.margin="0px",n.style.width=""+t+"px",n.style.height=""+t+"px",n.style.display="inline-block",n.style.background=e,{container:n}}var HK=zK,J7={exports:{}};(function(t){var e=function(){function n(l,c,u,f){typeof c=="object"&&(u=c.depth,f=c.prototype,c.filter,c=c.circular);var h=[],d=[],g=typeof Buffer<"u";typeof c>"u"&&(c=!0),typeof u>"u"&&(u=1/0);function p(y,m){if(y===null)return null;if(m==0)return y;var b,x;if(typeof y!="object")return y;if(n.__isArray(y))b=[];else if(n.__isRegExp(y))b=new RegExp(y.source,s(y)),y.lastIndex&&(b.lastIndex=y.lastIndex);else if(n.__isDate(y))b=new Date(y.getTime());else{if(g&&Buffer.isBuffer(y))return Buffer.allocUnsafe?b=Buffer.allocUnsafe(y.length):b=new Buffer(y.length),y.copy(b),b;typeof f>"u"?(x=Object.getPrototypeOf(y),b=Object.create(x)):(b=Object.create(f),x=f)}if(c){var A=h.indexOf(y);if(A!=-1)return d[A];h.push(y),d.push(b)}for(var S in y){var E;x&&(E=Object.getOwnPropertyDescriptor(x,S)),!(E&&E.set==null)&&(b[S]=p(y[S],m-1))}return b}return p(l,u)}n.clonePrototype=function(c){if(c===null)return null;var u=function(){};return u.prototype=c,new u};function r(l){return Object.prototype.toString.call(l)}n.__objToStr=r;function i(l){return typeof l=="object"&&r(l)==="[object Date]"}n.__isDate=i;function a(l){return typeof l=="object"&&r(l)==="[object Array]"}n.__isArray=a;function o(l){return typeof l=="object"&&r(l)==="[object RegExp]"}n.__isRegExp=o;function s(l){var c="";return l.global&&(c+="g"),l.ignoreCase&&(c+="i"),l.multiline&&(c+="m"),c}return n.__getRegExpFlags=s,n}();t.exports&&(t.exports=e)})(J7);var GK=J7.exports,Y7={exports:{}},VK={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]},$f=VK,X7={};for(var N6 in $f)$f.hasOwnProperty(N6)&&(X7[$f[N6]]=N6);var qe=Y7.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 vi in qe)if(qe.hasOwnProperty(vi)){if(!("channels"in qe[vi]))throw new Error("missing channels property: "+vi);if(!("labels"in qe[vi]))throw new Error("missing channel labels property: "+vi);if(qe[vi].labels.length!==qe[vi].channels)throw new Error("channel and label counts mismatch: "+vi);var QK=qe[vi].channels,KK=qe[vi].labels;delete qe[vi].channels,delete qe[vi].labels,Object.defineProperty(qe[vi],"channels",{value:QK}),Object.defineProperty(qe[vi],"labels",{value:KK})}qe.rgb.hsl=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=a-i,s,l,c;return a===i?s=0:e===a?s=(n-r)/o:n===a?s=2+(r-e)/o:r===a&&(s=4+(e-n)/o),s=Math.min(s*60,360),s<0&&(s+=360),c=(i+a)/2,a===i?l=0:c<=.5?l=o/(a+i):l=o/(2-a-i),[s,l*100,c*100]};qe.rgb.hsv=function(t){var e,n,r,i,a,o=t[0]/255,s=t[1]/255,l=t[2]/255,c=Math.max(o,s,l),u=c-Math.min(o,s,l),f=function(h){return(c-h)/6/u+1/2};return u===0?i=a=0:(a=u/c,e=f(o),n=f(s),r=f(l),o===c?i=r-n:s===c?i=1/3+e-r:l===c&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[i*360,a*100,c*100]};qe.rgb.hwb=function(t){var e=t[0],n=t[1],r=t[2],i=qe.rgb.hsl(t)[0],a=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[i,a*100,r*100]};qe.rgb.cmyk=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255,i,a,o,s;return s=Math.min(1-e,1-n,1-r),i=(1-e-s)/(1-s)||0,a=(1-n-s)/(1-s)||0,o=(1-r-s)/(1-s)||0,[i*100,a*100,o*100,s*100]};function WK(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}qe.rgb.keyword=function(t){var e=X7[t];if(e)return e;var n=1/0,r;for(var i in $f)if($f.hasOwnProperty(i)){var a=$f[i],o=WK(t,a);o.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;var i=e*.4124+n*.3576+r*.1805,a=e*.2126+n*.7152+r*.0722,o=e*.0193+n*.1192+r*.9505;return[i*100,a*100,o*100]};qe.rgb.lab=function(t){var e=qe.rgb.xyz(t),n=e[0],r=e[1],i=e[2],a,o,s;return n/=95.047,r/=100,i/=108.883,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,a=116*r-16,o=500*(n-r),s=200*(r-i),[a,o,s]};qe.hsl.rgb=function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100,i,a,o,s,l;if(n===0)return l=r*255,[l,l,l];r<.5?a=r*(1+n):a=r+n-r*n,i=2*r-a,s=[0,0,0];for(var c=0;c<3;c++)o=e+1/3*-(c-1),o<0&&o++,o>1&&o--,6*o<1?l=i+(a-i)*6*o:2*o<1?l=a:3*o<2?l=i+(a-i)*(2/3-o)*6:l=i,s[c]=l*255;return s};qe.hsl.hsv=function(t){var e=t[0],n=t[1]/100,r=t[2]/100,i=n,a=Math.max(r,.01),o,s;return r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a,s=(r+n)/2,o=r===0?2*i/(a+i):2*n/(r+n),[e,o*100,s*100]};qe.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,r=t[2]/100,i=Math.floor(e)%6,a=e-Math.floor(e),o=255*r*(1-n),s=255*r*(1-n*a),l=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,l,o];case 1:return[s,r,o];case 2:return[o,r,l];case 3:return[o,s,r];case 4:return[l,o,r];case 5:return[r,o,s]}};qe.hsv.hsl=function(t){var e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01),a,o,s;return s=(2-n)*r,a=(2-n)*i,o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};qe.hwb.rgb=function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100,i=n+r,a,o,s,l;i>1&&(n/=i,r/=i),a=Math.floor(6*e),o=1-r,s=6*e-a,a&1&&(s=1-s),l=n+s*(o-n);var c,u,f;switch(a){default:case 6:case 0:c=o,u=l,f=n;break;case 1:c=l,u=o,f=n;break;case 2:c=n,u=o,f=l;break;case 3:c=n,u=l,f=o;break;case 4:c=l,u=n,f=o;break;case 5:c=o,u=n,f=l;break}return[c*255,u*255,f*255]};qe.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100,a,o,s;return a=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),[a*255,o*255,s*255]};qe.xyz.rgb=function(t){var e=t[0]/100,n=t[1]/100,r=t[2]/100,i,a,o;return i=e*3.2406+n*-1.5372+r*-.4986,a=e*-.9689+n*1.8758+r*.0415,o=e*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[i*255,a*255,o*255]};qe.xyz.lab=function(t){var e=t[0],n=t[1],r=t[2],i,a,o;return e/=95.047,n/=100,r/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=116*n-16,a=500*(e-n),o=200*(n-r),[i,a,o]};qe.lab.xyz=function(t){var e=t[0],n=t[1],r=t[2],i,a,o;a=(e+16)/116,i=n/500+a,o=a-r/200;var s=Math.pow(a,3),l=Math.pow(i,3),c=Math.pow(o,3);return a=s>.008856?s:(a-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,i*=95.047,a*=100,o*=108.883,[i,a,o]};qe.lab.lch=function(t){var e=t[0],n=t[1],r=t[2],i,a,o;return i=Math.atan2(r,n),a=i*360/2/Math.PI,a<0&&(a+=360),o=Math.sqrt(n*n+r*r),[e,o,a]};qe.lch.lab=function(t){var e=t[0],n=t[1],r=t[2],i,a,o;return o=r/360*2*Math.PI,i=n*Math.cos(o),a=n*Math.sin(o),[e,i,a]};qe.rgb.ansi16=function(t){var e=t[0],n=t[1],r=t[2],i=1 in arguments?arguments[1]:qe.rgb.hsv(t)[2];if(i=Math.round(i/50),i===0)return 30;var a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return i===2&&(a+=60),a};qe.hsv.ansi16=function(t){return qe.rgb.ansi16(qe.hsv.rgb(t),t[2])};qe.rgb.ansi256=function(t){var e=t[0],n=t[1],r=t[2];if(e===n&&n===r)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5);return i};qe.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var n=(~~(t>50)+1)*.5,r=(e&1)*n*255,i=(e>>1&1)*n*255,a=(e>>2&1)*n*255;return[r,i,a]};qe.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var n,r=Math.floor(t/36)/5*255,i=Math.floor((n=t%36)/6)/5*255,a=n%6/5*255;return[r,i,a]};qe.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),n=e.toString(16).toUpperCase();return"000000".substring(n.length)+n};qe.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];e[0].length===3&&(n=n.split("").map(function(s){return s+s}).join(""));var r=parseInt(n,16),i=r>>16&255,a=r>>8&255,o=r&255;return[i,a,o]};qe.rgb.hcg=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),a=Math.min(Math.min(e,n),r),o=i-a,s,l;return o<1?s=a/(1-o):s=0,o<=0?l=0:i===e?l=(n-r)/o%6:i===n?l=2+(r-e)/o:l=4+(e-n)/o+4,l/=6,l%=1,[l*360,o*100,s*100]};qe.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=1,i=0;return n<.5?r=2*e*n:r=2*e*(1-n),r<1&&(i=(n-.5*r)/(1-r)),[t[0],r*100,i*100]};qe.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=e*n,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],r*100,i*100]};qe.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];var i=[0,0,0],a=e%1*6,o=a%1,s=1-o,l=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};qe.hcg.hsv=function(t){var e=t[1]/100,n=t[2]/100,r=e+n*(1-e),i=0;return r>0&&(i=e/r),[t[0],i*100,r*100]};qe.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100,r=n*(1-e)+.5*e,i=0;return r>0&&r<.5?i=e/(2*r):r>=.5&&r<1&&(i=e/(2*(1-r))),[t[0],i*100,r*100]};qe.hcg.hwb=function(t){var e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};qe.hwb.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=1-n,i=r-e,a=0;return i<1&&(a=(r-i)/(1-i)),[t[0],i*100,a*100]};qe.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};qe.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};qe.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};qe.gray.hsl=qe.gray.hsv=function(t){return[0,0,t[0]]};qe.gray.hwb=function(t){return[0,100,t[0]]};qe.gray.cmyk=function(t){return[0,0,0,t[0]]};qe.gray.lab=function(t){return[t[0],0,0]};qe.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,n=(e<<16)+(e<<8)+e,r=n.toString(16).toUpperCase();return"000000".substring(r.length)+r};qe.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]};var Z7=Y7.exports,Hw=Z7;function JK(){for(var t={},e=Object.keys(Hw),n=e.length,r=0;r1&&(n=Array.prototype.slice.call(arguments)),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function rW(t){var e=function(n){if(n==null)return n;arguments.length>1&&(n=Array.prototype.slice.call(arguments));var r=t(n);if(typeof r=="object")for(var i=r.length,a=0;an?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){return this.values.hsl[2]+=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},darken:function(t){return this.values.hsl[2]-=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},saturate:function(t){return this.values.hsl[1]+=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},desaturate:function(t){return this.values.hsl[1]-=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},whiten:function(t){return this.values.hwb[1]+=this.values.hwb[1]*t,this.setValues("hwb",this.values.hwb),this},blacken:function(t){return this.values.hwb[2]+=this.values.hwb[2]*t,this.setValues("hwb",this.values.hwb),this},greyscale:function(){var t=this.values.rgb,e=t[0]*.3+t[1]*.59+t[2]*.11;return this.setValues("rgb",[e,e,e]),this},clearer:function(t){return this.setValues("alpha",this.values.alpha-this.values.alpha*t),this},opaquer:function(t){return this.setValues("alpha",this.values.alpha+this.values.alpha*t),this},rotate:function(t){var e=this.values.hsl[0];return e=(e+t)%360,e=e<0?360+e:e,this.values.hsl[0]=e,this.setValues("hsl",this.values.hsl),this},mix:function(t,e){var n=this,r=t,i=e===void 0?.5:e,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-s;return this.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue()).alpha(n.alpha()*i+r.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t=new os;return t.values=yW(this.values),t}};os.prototype.getValues=function(t){for(var e={},n=0;n=0&&e<=2}}const IW=({address:t,size:e})=>{const n=F.useRef(null);return F.useEffect(()=>{var r;if(n!=null&&n.current){const i=Ts.jsNumberForAddress(t),a=kW(e,i);(r=n.current)==null||r.replaceChildren(a)}},[e,n,t]),q.jsx("div",{ref:n,style:{width:e,height:e},className:NW.jazzIcon})},RW=F.memo(IW),MW="_connectedAccount_64yg7_1",BW="_connectedAccountDetails_64yg7_14",DW="_connectedAccountAddress_64yg7_25",LW="_network_64yg7_36",Fv={connectedAccount:MW,connectedAccountDetails:BW,connectedAccountAddress:DW,network:LW},$W=({address:t,chainName:e})=>{const{state:{explorerBaseUrl:n}}=nv(),{state:{isDesktopScreen:r}}=ig(),i=n?Er.getAccountUrl(n,t):void 0,a=Er.getNetworkFriendlyName(e);return q.jsxs("a",{href:i,className:Fv.connectedAccount,target:"_blank",rel:"nofollow noreferrer",children:[q.jsx(RW,{size:r?30:20,address:t}),r&&q.jsxs("p",{className:Fv.connectedAccountDetails,children:[q.jsx("span",{className:Fv.network,children:a}),q.jsx("abbr",{title:t,className:Fv.connectedAccountAddress,children:Er.truncateAddress(t)})]})]})},UW="_connectWalletBtn_j0ggb_1",FW="_connectWalletBtnLabel_j0ggb_16",jv={connectWalletBtn:UW,connectWalletBtnLabel:FW},jW=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"})),zW={small:{width:14,height:14},medium:{width:30,height:30},large:{width:64,height:64},xlarge:{width:100,height:100}},ag=({children:t,size:e="medium"})=>F.cloneElement(t,{...zW[e]}),oD=({size:t})=>q.jsx(ag,{size:t,children:q.jsx(jW,{})}),HW=()=>{const{state:{isDesktopScreen:t},setAppError:e}=ig(),[n,r]=F.useState(!1),[i,a]=F.useState(!0),[o,s]=F.useState(!1),{state:{isConnected:l,account:c,chainName:u},connectWallet:f,switchNetwork:h,isProviderAvailable:d}=nv();F.useEffect(()=>{(async()=>{r(!0),a(await d()),r(!1)})()},[]);const g=async()=>{r(!0);try{await h(),s(!1)}catch(y){e(y)}finally{r(!1)}},p=async()=>{r(!0);try{await f()}catch(y){y instanceof F5?s(!0):e(y)}finally{r(!1)}};return q.jsxs(q.Fragment,{children:[!l&&!i&&q.jsx("a",{href:AK,target:"_blank",rel:"noopener noreferrer",children:q.jsx(tl,{className:jv.connectWalletBtn,color:"secondary",disabled:n,children:"Install MetaMask"})}),!l&&i&&o&&q.jsx(tl,{className:jv.connectWalletBtn,color:"secondary",disabled:n,onClick:g,children:"Switch Network"}),!l&&i&&!o&&q.jsx(tl,{className:jv.connectWalletBtn,color:"secondary",disabled:n,onClick:p,children:q.jsxs("label",{className:jv.connectWalletBtnLabel,children:["Connect wallet",q.jsx(oD,{size:t?"medium":"small"})]})}),l&&c&&q.jsx($W,{address:c,chainName:u})]})},GW="_alert_qon9n_1",VW="_icon_qon9n_20",QW="_actions_qon9n_25",KW="_alertError_qon9n_40",WW="_alertSuccess_qon9n_46",JW="_alertLoading_qon9n_61",YW="_rotating_qon9n_1",XW="_alertInsufficientBalance_qon9n_78",Bu={alert:GW,icon:VW,actions:QW,alertError:KW,alertSuccess:WW,alertLoading:JW,rotating:YW,alertInsufficientBalance:XW},ZW="_card_12zm2_1",qW={card:ZW},AP=({children:t,className:e})=>q.jsx("div",{className:Er.clsx(qW.card,e),children:t}),eJ=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"})),tJ=()=>q.jsx(ag,{size:"xlarge",children:q.jsx(eJ,{})}),nJ=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"})),sD=({size:t})=>q.jsx(ag,{size:t,children:q.jsx(nJ,{})}),rJ=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"})),iJ=()=>q.jsx(ag,{size:"large",children:q.jsx(rJ,{})}),aJ=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M192,116a12,12,0,1,1-12-12A12,12,0,0,1,192,116ZM152,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm96,48v32a24,24,0,0,1-24,24h-2.36l-16.21,45.38A16,16,0,0,1,190.36,224H177.64a16,16,0,0,1-15.07-10.62L160.65,208h-57.3l-1.92,5.38A16,16,0,0,1,86.36,224H73.64a16,16,0,0,1-15.07-10.62L46,178.22a87.69,87.69,0,0,1-21.44-48.38A16,16,0,0,0,16,144a8,8,0,0,1-16,0,32,32,0,0,1,24.28-31A88.12,88.12,0,0,1,112,32H216a8,8,0,0,1,0,16H194.61a87.93,87.93,0,0,1,30.17,37c.43,1,.85,2,1.25,3A24,24,0,0,1,248,112Zm-16,0a8,8,0,0,0-8-8h-3.66a8,8,0,0,1-7.64-5.6A71.9,71.9,0,0,0,144,48H112A72,72,0,0,0,58.91,168.64a8,8,0,0,1,1.64,2.71L73.64,208H86.36l3.82-10.69A8,8,0,0,1,97.71,192h68.58a8,8,0,0,1,7.53,5.31L177.64,208h12.72l18.11-50.69A8,8,0,0,1,216,152h8a8,8,0,0,0,8-8Z"})),oJ=()=>q.jsx(ag,{size:"large",children:q.jsx(aJ,{})}),sJ={error:{header:"Something went wrong",icon:q.jsx(tJ,{})},success:{header:"Vote cast",icon:q.jsx(sD,{size:"xlarge"})},loading:{header:"Casting your vote",icon:q.jsx(iJ,{})},"insufficient-balance":{header:"Insufficient balance",icon:q.jsx(oJ,{})}},lJ={error:Bu.alertError,success:Bu.alertSuccess,loading:Bu.alertLoading,"insufficient-balance":Bu.alertInsufficientBalance},od=({children:t,type:e,actions:n,headerText:r})=>{const{header:i,icon:a}=sJ[e];return q.jsx(AP,{className:lJ[e],children:q.jsxs("div",{className:Bu.alert,children:[q.jsx("h2",{children:r??i}),q.jsx("p",{children:t}),q.jsx("div",{className:Bu.icon,children:a}),q.jsx("div",{className:Bu.actions,children:n})]})})},cJ=()=>{const{state:{isInitialLoading:t,appError:e},clearAppError:n}=ig();return q.jsx("div",{className:$v.layout,children:q.jsxs("main",{className:$v.main,children:[q.jsxs("header",{className:$v.header,children:[q.jsx(vK,{}),q.jsx(HW,{})]}),q.jsx("section",{className:$v.subHeader,children:q.jsx("h1",{children:"Oasis Mascot"})}),q.jsxs("section",{children:[!t&&e&&q.jsx(od,{type:"error",actions:q.jsx(tl,{variant:"text",onClick:n,children:"< Go back "}),children:Er.truncate(e)}),t&&q.jsx(od,{headerText:"Please wait",type:"loading",actions:q.jsx("span",{children:"Fetching poll..."})}),!t&&!e&&q.jsx(YQ,{})]})]})})},uJ="_cardHeaderText_19do9_1",fJ="_mascotCards_19do9_11",hJ="_mascotCardActions_19do9_18",dJ="_cardAction_19do9_24",pJ="_voteBtnLabel_19do9_35",gJ="_voteBtnLabelDisabled_19do9_41",yJ="_cardFooterText_19do9_47",mJ="_insufficientBalanceAlertActions_19do9_56",vJ="_cardInfoText_19do9_66",bJ="_landingPageLink_19do9_76",wJ="_mascotCardSelectBtn_19do9_80",xJ="_mascotCardSelectedCheckIcon_19do9_84",AJ="_headerText_19do9_104",Hi={cardHeaderText:uJ,mascotCards:fJ,mascotCardActions:hJ,cardAction:dJ,voteBtnLabel:pJ,voteBtnLabelDisabled:gJ,cardFooterText:yJ,insufficientBalanceAlertActions:mJ,cardInfoText:vJ,landingPageLink:bJ,mascotCardSelectBtn:wJ,mascotCardSelectedCheckIcon:xJ,headerText:AJ},EJ="_mascotCard_1bkx9_1",SJ="_mascotCardSelected_1bkx9_10",PJ="_mascotCardVertical_1bkx9_14",OJ="_mascotCardDescription_1bkx9_32",TJ="_mascotCardHorizontal_1bkx9_37",CJ="_mascotCardTitle_1bkx9_52",sd={mascotCard:EJ,mascotCardSelected:SJ,mascotCardVertical:PJ,mascotCardDescription:OJ,mascotCardHorizontal:TJ,mascotCardTitle:CJ},kJ={vertical:sd.mascotCardVertical,horizontal:sd.mascotCardHorizontal},lD=({image:t,title:e,description:n,actions:r,selected:i,orientation:a="vertical"})=>q.jsxs("div",{className:Er.clsx(sd.mascotCard,i?sd.mascotCardSelected:void 0,kJ[a]),children:[t,q.jsxs("div",{children:[q.jsx("h3",{className:sd.mascotCardTitle,children:e}),q.jsx("p",{className:sd.mascotCardDescription,children:n})]}),r]}),_J=new Intl.DateTimeFormat("en",{timeStyle:"long",dateStyle:"long"});class ld{static intlDateFormat(e){return _J.format(e)}static unixFormatToDate(e){return new Date(Number(e)*1e3)}}const NJ=()=>{const{state:{isConnected:t,account:e},vote:n,canVoteOnPoll:r}=nv(),{state:{poll:i,previousVote:a,isMobileScreen:o,isDesktopScreen:s},setPreviousVoteForCurrentWallet:l}=ig(),[c]=hK(),u=c.get("choice")??null,f=Ts.toNullableInt(u),h=Ts.isValidMascotChoiceId(f)?f:null,[d,g]=F.useState(h),[p,y]=F.useState("vote"),[m,b]=F.useState(!1),[x,A]=F.useState("");F.useEffect(()=>{y("vote")},[e]),F.useEffect(()=>{Ts.isValidMascotChoiceId(d)||g(a)},[a]);const S=F.useMemo(()=>{if((t||d===null)&&!Ts.isValidMascotChoiceId(a))return q.jsxs(q.Fragment,{children:[q.jsx(q.Fragment,{children:"Continue"}),s&&q.jsx(oD,{})]});if(t&&Ts.isValidMascotChoiceId(a))return q.jsx(q.Fragment,{children:"Amend your vote"});if(!t&&d!==null)return q.jsx(q.Fragment,{children:"Wallet not connected"})},[t,s,a,d]),E=U=>{g(U)},T=async()=>{if(d!==null){b(!0);try{if(!await r()){y("insufficient-balance");return}y("loading"),await n(d),l(d),y("success")}catch(U){console.error(U),A(U.message??JSON.stringify(U)),y("error")}finally{b(!1)}}},C=()=>{y("vote")};if((i==null?void 0:i.active)===!1)return q.jsx(V7,{to:"/results",replace:!0});const N=m||d===null||!t||a===d,B=q.jsxs(q.Fragment,{children:["Select your preferred mascot option. Once you confirm this vote you will not",s?q.jsx("br",{}):q.jsx(q.Fragment,{children:" "}),"be able to retract it. Read more about the campaign"," ",q.jsx("a",{className:Hi.landingPageLink,href:EK,target:"_blank",rel:"noopener noreferrer",children:"on our website"}),"."]}),L=q.jsx("p",{className:Hi.cardInfoText,children:"You have already cast your vote. It can be amended below."});return q.jsxs(q.Fragment,{children:[p==="loading"&&q.jsx(od,{type:"loading",actions:q.jsx("span",{children:"Submitting vote..."}),children:"Your vote is always private, and can be changed until the poll closes."}),p==="error"&&x&&q.jsx(od,{type:"error",actions:q.jsx(tl,{disabled:m,onClick:C,children:"Try again"}),children:Er.truncate(x)}),p==="success"&&q.jsx(od,{type:"success",actions:q.jsxs("span",{children:["Your vote has successfully submitted.",q.jsx("br",{}),"Thank you for your participation."]})}),p==="insufficient-balance"&&q.jsx(od,{type:"insufficient-balance",actions:q.jsxs("div",{className:Hi.insufficientBalanceAlertActions,children:[q.jsx(tl,{disabled:m,onClick:T,children:"Try again"}),q.jsx(tl,{variant:"text",disabled:m,onClick:C,children:"< Cancel "})]}),children:"Please note there is a 100 ROSE threshold in order to cast your vote."}),p==="vote"&&q.jsxs(q.Fragment,{children:[o&&q.jsx("p",{className:Hi.headerText,children:B}),q.jsxs(AP,{children:[s&&q.jsx("p",{className:Hi.cardHeaderText,children:B}),q.jsx("div",{className:Hi.mascotCards,children:W7.map(({name:U,description:j,imagePath:X},G)=>{const H=G===d;return q.jsx(lD,{title:U,description:j,image:q.jsx("img",{alt:U,src:X}),selected:H,actions:q.jsxs(q.Fragment,{children:[q.jsx("div",{className:Hi.mascotCardActions,children:q.jsxs(tl,{className:Hi.mascotCardSelectBtn,variant:H?"solid":"outline",size:s?"small":"medium",color:H?"success":"secondary",disabled:m,onClick:()=>E(G),fullWidth:o,children:["Select",H?"ed":""]})}),H&&q.jsx("span",{className:Hi.mascotCardSelectedCheckIcon,children:q.jsx(sD,{size:"medium"})})]})},U)})}),q.jsxs("div",{className:Hi.cardAction,children:[(t||d===null)&&Ts.isValidMascotChoiceId(a)&&L,q.jsx(tl,{disabled:N,onClick:T,children:q.jsx("label",{className:Er.clsx(N?Hi.voteBtnLabelDisabled:Hi.voteBtnLabel),children:S})})]}),q.jsxs("p",{className:Hi.cardFooterText,children:["Please note there is a 100 ROSE threshold in order to cast your vote.",!!(i!=null&&i.params.closeTimestamp)&&q.jsxs(q.Fragment,{children:[s?q.jsx("br",{}):q.jsx(q.Fragment,{children:" "}),q.jsxs("span",{children:["Poll closes on ",ld.intlDateFormat(ld.unixFormatToDate(i.params.closeTimestamp))]})]})]})]})]})]})},IJ="6.11.1";function RJ(t,e,n){const r=e.split("|").map(a=>a.trim());for(let a=0;aPromise.resolve(t[r])))).reduce((r,i,a)=>(r[e[a]]=i,r),{})}function gt(t,e,n){for(let r in e){let i=e[r];const a=n?n[r]:null;a&&RJ(i,a,r),Object.defineProperty(t,r,{enumerable:!0,value:i,writable:!1})}}function cd(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(cd).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let n="0x";for(let r=0;r>4],n+=e[t[r]&15];return n}if(typeof t=="object"&&typeof t.toJSON=="function")return cd(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(n=>`${cd(n)}: ${cd(t[n])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Qr(t,e){return t&&t.code===e}function EP(t){return Qr(t,"CALL_EXCEPTION")}function Zn(t,e,n){let r=t;{const a=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will overwrite populated values: ${cd(n)}`);for(const o in n){if(o==="shortMessage")continue;const s=n[o];a.push(o+"="+cd(s))}}a.push(`code=${e}`),a.push(`version=${IJ}`),a.length&&(t+=" ("+a.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(t);break;default:i=new Error(t)}return gt(i,{code:e}),n&&Object.assign(i,n),i.shortMessage==null&>(i,{shortMessage:r}),i}function ye(t,e,n,r){if(!t)throw Zn(e,n,r)}function K(t,e,n,r){ye(t,e,"INVALID_ARGUMENT",{argument:n,value:r})}function cD(t,e,n){n==null&&(n=""),n&&(n=": "+n),ye(t>=e,"missing arguemnt"+n,"MISSING_ARGUMENT",{count:t,expectedCount:e}),ye(t<=e,"too many arguments"+n,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const MJ=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");t.push(e)}catch{}return t},[]);function BJ(t){ye(MJ.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function D2(t,e,n){if(n==null&&(n=""),t!==e){let r=n,i="new";n&&(r+=".",i+=" "+n),ye(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function uD(t,e,n){if(t instanceof Uint8Array)return n?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x([0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((t.length-2)/2);let i=2;for(let a=0;a>4]+gC[i&15]}return n}function Xn(t){return"0x"+t.map(e=>it(e).substring(2)).join("")}function Td(t){return gn(t,!0)?(t.length-2)/2:Jt(t).length}function Un(t,e,n){const r=Jt(t);return n!=null&&n>r.length&&ye(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),it(r.slice(e??0,n??r.length))}function fD(t,e,n){const r=Jt(t);ye(e>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),n?i.set(r,e-r.length):i.set(r,0),it(i)}function th(t,e){return fD(t,e,!0)}function LJ(t,e){return fD(t,e,!1)}const L2=BigInt(0),bo=BigInt(1),ud=9007199254740991;function $J(t,e){const n=$2(t,"value"),r=BigInt(Bt(e,"width"));if(ye(n>>r===L2,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),n>>r-bo){const i=(bo<=-ud&&t<=ud,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(n){K(!1,`invalid BigNumberish string: ${n.message}`,e||"value",t)}}K(!1,"invalid BigNumberish value",e||"value",t)}function $2(t,e){const n=et(t,e);return ye(n>=L2,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),n}const yC="0123456789abcdef";function SP(t){if(t instanceof Uint8Array){let e="0x0";for(const n of t)e+=yC[n>>4],e+=yC[n&15];return BigInt(e)}return et(t)}function Bt(t,e){switch(typeof t){case"bigint":return K(t>=-ud&&t<=ud,"overflow",e||"value",t),Number(t);case"number":return K(Number.isInteger(t),"underflow",e||"value",t),K(t>=-ud&&t<=ud,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return Bt(BigInt(t),e)}catch(n){K(!1,`invalid numeric string: ${n.message}`,e||"value",t)}}K(!1,"invalid numeric value",e||"value",t)}function UJ(t){return Bt(SP(t))}function us(t,e){let r=$2(t,"value").toString(16);if(e==null)r.length%2&&(r="0"+r);else{const i=Bt(e,"width");for(ye(i*2>=r.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});r.length>6===2;o++)a++;return a}return t==="OVERRUN"?n.length-e-1:0}function GJ(t,e,n,r,i){return t==="OVERLONG"?(K(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),pD(t,e,n))}const VJ=Object.freeze({error:HJ,ignore:pD,replace:GJ});function QJ(t,e){e==null&&(e=VJ.error);const n=Jt(t,"bytes"),r=[];let i=0;for(;i>7)){r.push(a);continue}let o=null,s=null;if((a&224)===192)o=1,s=127;else if((a&240)===224)o=2,s=2047;else if((a&248)===240)o=3,s=65535;else{(a&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,n,r):i+=e("BAD_PREFIX",i-1,n,r);continue}if(i-1+o>=n.length){i+=e("OVERRUN",i-1,n,r);continue}let l=a&(1<<8-o-1)-1;for(let c=0;c1114111){i+=e("OUT_OF_RANGE",i-1-o,n,r,l);continue}if(l>=55296&&l<=57343){i+=e("UTF16_SURROGATE",i-1-o,n,r,l);continue}if(l<=s){i+=e("OVERLONG",i-1-o,n,r,l);continue}r.push(l)}}return r}function ul(t,e){K(typeof t=="string","invalid string value","str",t),e!=null&&(BJ(e),t=t.normalize(e));let n=[];for(let r=0;r>6|192),n.push(i&63|128);else if((i&64512)==55296){r++;const a=t.charCodeAt(r);K(r>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128)}else n.push(i>>12|224),n.push(i>>6&63|128),n.push(i&63|128)}return new Uint8Array(n)}function KJ(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Gw(t,e){return KJ(QJ(t,e))}function gD(t){async function e(n,r){const i=n.url.split(":")[0].toLowerCase();ye(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),ye(i==="https"||!n.credentials||n.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let a;if(r){const f=new AbortController;a=f.signal,r.addListener(()=>{f.abort()})}const o={method:n.method,headers:new Headers(Array.from(n)),body:n.body||void 0,signal:a},s=await fetch(n.url,o),l={};s.headers.forEach((f,h)=>{l[h.toLowerCase()]=f});const c=await s.arrayBuffer(),u=c==null?null:new Uint8Array(c);return{statusCode:s.status,statusMessage:s.statusText,headers:l,body:u}}return e}const WJ=12,JJ=250;let bC=gD();const YJ=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),XJ=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let R6=!1;async function yD(t,e){try{const n=t.match(YJ);if(!n)throw new Error("invalid data");return new Cd(200,"OK",{"content-type":n[1]||"text/plain"},n[2]?jJ(n[3]):qJ(n[3]))}catch{return new Cd(599,"BAD REQUEST (invalid data: URI)",{},null,new nh(t))}}function mD(t){async function e(n,r){try{const i=n.match(XJ);if(!i)throw new Error("invalid link");return new nh(`${t}${i[2]}`)}catch{return new Cd(599,"BAD REQUEST (invalid IPFS URI)",{},null,new nh(n))}}return e}const zv={data:yD,ipfs:mD("https://gateway.ipfs.io/ipfs/")},vD=new WeakMap;var Vu,tc,WR;let ZJ=(WR=class{constructor(e){M(this,Vu,void 0);M(this,tc,void 0);O(this,Vu,[]),O(this,tc,!1),vD.set(e,()=>{if(!v(this,tc)){O(this,tc,!0);for(const n of v(this,Vu))setTimeout(()=>{n()},0);O(this,Vu,[])}})}addListener(e){ye(!v(this,tc),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),v(this,Vu).push(e)}get cancelled(){return v(this,tc)}checkSignal(){ye(!this.cancelled,"cancelled","CANCELLED",{})}},Vu=new WeakMap,tc=new WeakMap,WR);function Hv(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var $d,Ud,ao,_s,Fd,jd,cr,Ji,Ns,Qu,Ku,Wu,Lo,Is,nc,Ju,qg,Zp;let nh=(Zp=class{constructor(e){M(this,Ju);M(this,$d,void 0);M(this,Ud,void 0);M(this,ao,void 0);M(this,_s,void 0);M(this,Fd,void 0);M(this,jd,void 0);M(this,cr,void 0);M(this,Ji,void 0);M(this,Ns,void 0);M(this,Qu,void 0);M(this,Ku,void 0);M(this,Wu,void 0);M(this,Lo,void 0);M(this,Is,void 0);M(this,nc,void 0);O(this,jd,String(e)),O(this,$d,!1),O(this,Ud,!0),O(this,ao,{}),O(this,_s,""),O(this,Fd,3e5),O(this,Is,{slotInterval:JJ,maxAttempts:WJ}),O(this,nc,null)}get url(){return v(this,jd)}set url(e){O(this,jd,String(e))}get body(){return v(this,cr)==null?null:new Uint8Array(v(this,cr))}set body(e){if(e==null)O(this,cr,void 0),O(this,Ji,void 0);else if(typeof e=="string")O(this,cr,ul(e)),O(this,Ji,"text/plain");else if(e instanceof Uint8Array)O(this,cr,e),O(this,Ji,"application/octet-stream");else if(typeof e=="object")O(this,cr,ul(JSON.stringify(e))),O(this,Ji,"application/json");else throw new Error("invalid body")}hasBody(){return v(this,cr)!=null}get method(){return v(this,_s)?v(this,_s):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),O(this,_s,String(e).toUpperCase())}get headers(){const e=Object.assign({},v(this,ao));return v(this,Ns)&&(e.authorization=`Basic ${zJ(ul(v(this,Ns)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&v(this,Ji)&&(e["content-type"]=v(this,Ji)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,n){v(this,ao)[String(e).toLowerCase()]=String(n)}clearHeaders(){O(this,ao,{})}[Symbol.iterator](){const e=this.headers,n=Object.keys(e);let r=0;return{next:()=>{if(r=0,"timeout must be non-zero","timeout",e),O(this,Fd,e)}get preflightFunc(){return v(this,Qu)||null}set preflightFunc(e){O(this,Qu,e)}get processFunc(){return v(this,Ku)||null}set processFunc(e){O(this,Ku,e)}get retryFunc(){return v(this,Wu)||null}set retryFunc(e){O(this,Wu,e)}get getUrlFunc(){return v(this,nc)||bC}set getUrlFunc(e){O(this,nc,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(v(this,Is).slotInterval=e.slotInterval),e.maxAttempts!=null&&(v(this,Is).maxAttempts=e.maxAttempts)}send(){return ye(v(this,Lo)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),O(this,Lo,new ZJ(this)),ie(this,Ju,qg).call(this,0,wC()+this.timeout,0,this,new Cd(0,"",{},null,this))}cancel(){ye(v(this,Lo)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=vD.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const n=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();ye(this.method==="GET"&&(n!=="https"||r!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new Zp(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,O(i,ao,Object.assign({},v(this,ao))),v(this,cr)&&O(i,cr,new Uint8Array(v(this,cr))),O(i,Ji,v(this,Ji)),i}clone(){const e=new Zp(this.url);return O(e,_s,v(this,_s)),v(this,cr)&&O(e,cr,v(this,cr)),O(e,Ji,v(this,Ji)),O(e,ao,Object.assign({},v(this,ao))),O(e,Ns,v(this,Ns)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),O(e,Qu,v(this,Qu)),O(e,Ku,v(this,Ku)),O(e,Wu,v(this,Wu)),O(e,nc,v(this,nc)),e}static lockConfig(){R6=!0}static getGateway(e){return zv[e.toLowerCase()]||null}static registerGateway(e,n){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(R6)throw new Error("gateways locked");zv[e]=n}static registerGetUrl(e){if(R6)throw new Error("gateways locked");bC=e}static createGetUrlFunc(e){return gD()}static createDataGateway(){return yD}static createIpfsGatewayFunc(e){return mD(e)}},$d=new WeakMap,Ud=new WeakMap,ao=new WeakMap,_s=new WeakMap,Fd=new WeakMap,jd=new WeakMap,cr=new WeakMap,Ji=new WeakMap,Ns=new WeakMap,Qu=new WeakMap,Ku=new WeakMap,Wu=new WeakMap,Lo=new WeakMap,Is=new WeakMap,nc=new WeakMap,Ju=new WeakSet,qg=async function(e,n,r,i,a){var u,f,h;if(e>=v(this,Is).maxAttempts)return a.makeServerError("exceeded maximum retry limit");ye(wC()<=n,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),r>0&&await eY(r);let o=this.clone();const s=(o.url.split(":")[0]||"").toLowerCase();if(s in zv){const d=await zv[s](o.url,Hv(v(i,Lo)));if(d instanceof Cd){let g=d;if(this.processFunc){Hv(v(i,Lo));try{g=await this.processFunc(o,g)}catch(p){(p.throttle==null||typeof p.stall!="number")&&g.makeServerError("error in post-processing function",p).assertOk()}}return g}o=d}this.preflightFunc&&(o=await this.preflightFunc(o));const l=await this.getUrlFunc(o,Hv(v(i,Lo)));let c=new Cd(l.statusCode,l.statusMessage,l.headers,l.body,i);if(c.statusCode===301||c.statusCode===302){try{const d=c.headers.location||"";return ie(u=o.redirect(d),Ju,qg).call(u,e+1,n,0,i,c)}catch{}return c}else if(c.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,c,e))){const d=c.headers["retry-after"];let g=v(this,Is).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof d=="string"&&d.match(/^[1-9][0-9]*$/)&&(g=parseInt(d)),ie(f=o.clone(),Ju,qg).call(f,e+1,n,g,i,c)}if(this.processFunc){Hv(v(i,Lo));try{c=await this.processFunc(o,c)}catch(d){(d.throttle==null||typeof d.stall!="number")&&c.makeServerError("error in post-processing function",d).assertOk();let g=v(this,Is).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return d.stall>=0&&(g=d.stall),ie(h=o.clone(),Ju,qg).call(h,e+1,n,g,i,c)}}return c},Zp);var lm,cm,um,Yi,zd,Yu,fm;let Cd=(fm=class{constructor(e,n,r,i,a){M(this,lm,void 0);M(this,cm,void 0);M(this,um,void 0);M(this,Yi,void 0);M(this,zd,void 0);M(this,Yu,void 0);O(this,lm,e),O(this,cm,n),O(this,um,Object.keys(r).reduce((o,s)=>(o[s.toLowerCase()]=String(r[s]),o),{})),O(this,Yi,i==null?null:new Uint8Array(i)),O(this,zd,a||null),O(this,Yu,{message:""})}toString(){return``}get statusCode(){return v(this,lm)}get statusMessage(){return v(this,cm)}get headers(){return Object.assign({},v(this,um))}get body(){return v(this,Yi)==null?null:new Uint8Array(v(this,Yi))}get bodyText(){try{return v(this,Yi)==null?"":Gw(v(this,Yi))}catch{ye(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{ye(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,n=Object.keys(e);let r=0;return{next:()=>{if(r=0,"invalid stall timeout","stall",n);const r=new Error(e||"throttling requests");throw gt(r,{stall:n,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return v(this,Yi)!=null}get request(){return v(this,zd)}ok(){return v(this,Yu).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:n}=v(this,Yu);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let i=null;try{v(this,Yi)&&(i=Gw(v(this,Yi)))}catch{}ye(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:n,info:{requestUrl:r,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}},lm=new WeakMap,cm=new WeakMap,um=new WeakMap,Yi=new WeakMap,zd=new WeakMap,Yu=new WeakMap,fm);function wC(){return new Date().getTime()}function qJ(t){return ul(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,n)=>String.fromCharCode(parseInt(n,16))))}function eY(t){return new Promise(e=>setTimeout(e,t))}function tY(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function xC(t,e,n){let r=0;for(let i=0;i{ye(r<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:r})};if(t[e]>=248){const r=t[e]-247;n(e+1+r);const i=xC(t,e+1,r);return n(e+1+r+i),AC(t,e,e+1+r,r+i)}else if(t[e]>=192){const r=t[e]-192;return n(e+1+r),AC(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;n(e+1+r);const i=xC(t,e+1,r);n(e+1+r+i);const a=it(t.slice(e+1+r,e+1+r+i));return{consumed:1+r+i,result:a}}else if(t[e]>=128){const r=t[e]-128;n(e+1+r);const i=it(t.slice(e+1,e+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:tY(t[e])}}function U2(t){const e=Jt(t,"data"),n=bD(e,0);return K(n.consumed===e.length,"unexpected junk after rlp payload","data",t),n.result}function EC(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function wD(t){if(Array.isArray(t)){let r=[];if(t.forEach(function(a){r=r.concat(wD(a))}),r.length<=55)return r.unshift(192+r.length),r;const i=EC(r.length);return i.unshift(247+i.length),i.concat(r)}const e=Array.prototype.slice.call(Jt(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const n=EC(e.length);return n.unshift(183+n.length),n.concat(e)}const SC="0123456789abcdef";function vp(t){let e="0x";for(const n of wD(t))e+=SC[n>>4],e+=SC[n&15];return e}const si=32,H5=new Uint8Array(si),nY=["then"],Gv={};function Bg(t,e){const n=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw n.error=e,n}var rc,Kf;let xD=(Kf=class extends Array{constructor(...n){const r=n[0];let i=n[1],a=(n[2]||[]).slice(),o=!0;r!==Gv&&(i=n,a=[],o=!1);super(i.length);M(this,rc,void 0);i.forEach((l,c)=>{this[c]=l});const s=a.reduce((l,c)=>(typeof c=="string"&&l.set(c,(l.get(c)||0)+1),l),new Map);if(O(this,rc,Object.freeze(i.map((l,c)=>{const u=a[c];return u!=null&&s.get(u)===1?u:null}))),!!o)return Object.freeze(this),new Proxy(this,{get:(l,c,u)=>{if(typeof c=="string"){if(c.match(/^[0-9]+$/)){const h=Bt(c,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");const d=l[h];return d instanceof Error&&Bg(`index ${h}`,d),d}if(nY.indexOf(c)>=0)return Reflect.get(l,c,u);const f=l[c];if(f instanceof Function)return function(...h){return f.apply(this===u?l:this,h)};if(!(c in l))return l.getValue.apply(this===u?l:this,[c])}return Reflect.get(l,c,u)}})}toArray(){const n=[];return this.forEach((r,i)=>{r instanceof Error&&Bg(`index ${i}`,r),n.push(r)}),n}toObject(){return v(this,rc).reduce((n,r,i)=>(ye(r!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),r in n||(n[r]=this.getValue(r)),n),{})}slice(n,r){n==null&&(n=0),n<0&&(n+=this.length,n<0&&(n=0)),r==null&&(r=this.length),r<0&&(r+=this.length,r<0&&(r=0)),r>this.length&&(r=this.length);const i=[],a=[];for(let o=n;o{v(this,Rs)[e]=PC(n)}}},Rs=new WeakMap,Xu=new WeakMap,Hd=new WeakSet,Fb=function(e){return v(this,Rs).push(e),O(this,Xu,v(this,Xu)+e.length),e.length},JR);var bi,Xi,Zu,qu,ic,hm,V5,i2,AD,dm;let rY=(dm=class{constructor(e,n,r){M(this,hm);M(this,i2);R(this,"allowLoose");M(this,bi,void 0);M(this,Xi,void 0);M(this,Zu,void 0);M(this,qu,void 0);M(this,ic,void 0);gt(this,{allowLoose:!!n}),O(this,bi,ai(e)),O(this,Zu,0),O(this,qu,null),O(this,ic,r??1024),O(this,Xi,0)}get data(){return it(v(this,bi))}get dataLength(){return v(this,bi).length}get consumed(){return v(this,Xi)}get bytes(){return new Uint8Array(v(this,bi))}subReader(e){const n=new dm(v(this,bi).slice(v(this,Xi)+e),this.allowLoose,v(this,ic));return O(n,qu,this),n}readBytes(e,n){let r=ie(this,i2,AD).call(this,0,e,!!n);return ie(this,hm,V5).call(this,e),O(this,Xi,v(this,Xi)+r.length),r.slice(0,e)}readValue(){return SP(this.readBytes(si))}readIndex(){return UJ(this.readBytes(si))}},bi=new WeakMap,Xi=new WeakMap,Zu=new WeakMap,qu=new WeakMap,ic=new WeakMap,hm=new WeakSet,V5=function(e){var n;if(v(this,qu))return ie(n=v(this,qu),hm,V5).call(n,e);O(this,Zu,v(this,Zu)+e),ye(v(this,ic)<1||v(this,Zu)<=v(this,ic)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${v(this,ic)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:ai(v(this,bi)),offset:v(this,Xi),length:e,info:{bytesRead:v(this,Zu),dataLength:this.dataLength}})},i2=new WeakSet,AD=function(e,n,r){let i=Math.ceil(n/si)*si;return v(this,Xi)+i>v(this,bi).length&&(this.allowLoose&&r&&v(this,Xi)+n<=v(this,bi).length?i=n:ye(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:ai(v(this,bi)),length:v(this,bi).length,offset:v(this,Xi)+i})),v(this,bi).slice(v(this,Xi),v(this,Xi)+i)},dm);function Vw(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function PP(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function iY(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Vw(t.outputLen),Vw(t.blockLen)}function bp(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function ED(t,e){PP(t);const n=e.outputLen;if(t.lengtht instanceof Uint8Array,aY=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),B6=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Mo=(t,e)=>t<<32-e|t>>>e,oY=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!oY)throw new Error("Non little-endian hardware is not supported");function sY(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function F2(t){if(typeof t=="string"&&(t=sY(t)),!SD(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function lY(...t){const e=new Uint8Array(t.reduce((r,i)=>r+i.length,0));let n=0;return t.forEach(r=>{if(!SD(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}let OP=class{clone(){return this._cloneInto()}};function TP(t){const e=r=>t().update(F2(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function cY(t=32){if(M6&&typeof M6.getRandomValues=="function")return M6.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class PD extends OP{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,iY(e);const r=F2(n);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,a=new Uint8Array(i);a.set(r.length>i?e.create().update(r).digest():r);for(let o=0;onew PD(t,e).update(n).digest();CP.create=(t,e)=>new PD(t,e);function uY(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),l=r?4:0,c=r?0:4;t.setUint32(e+l,o,r),t.setUint32(e+c,s,r)}class OD extends OP{constructor(e,n,r,i){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=B6(this.buffer)}update(e){bp(this);const{view:n,buffer:r,blockLen:i}=this;e=F2(e);const a=e.length;for(let o=0;oi-o&&(this.process(r,0),o=0);for(let f=o;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft&e^~t&n,hY=(t,e,n)=>t&e^t&n^e&n,dY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),jl=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),zl=new Uint32Array(64);class pY extends OD{constructor(){super(64,32,8,!1),this.A=jl[0]|0,this.B=jl[1]|0,this.C=jl[2]|0,this.D=jl[3]|0,this.E=jl[4]|0,this.F=jl[5]|0,this.G=jl[6]|0,this.H=jl[7]|0}get(){const{A:e,B:n,C:r,D:i,E:a,F:o,G:s,H:l}=this;return[e,n,r,i,a,o,s,l]}set(e,n,r,i,a,o,s,l){this.A=e|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=a|0,this.F=o|0,this.G=s|0,this.H=l|0}process(e,n){for(let f=0;f<16;f++,n+=4)zl[f]=e.getUint32(n,!1);for(let f=16;f<64;f++){const h=zl[f-15],d=zl[f-2],g=Mo(h,7)^Mo(h,18)^h>>>3,p=Mo(d,17)^Mo(d,19)^d>>>10;zl[f]=p+zl[f-7]+g+zl[f-16]|0}let{A:r,B:i,C:a,D:o,E:s,F:l,G:c,H:u}=this;for(let f=0;f<64;f++){const h=Mo(s,6)^Mo(s,11)^Mo(s,25),d=u+h+fY(s,l,c)+dY[f]+zl[f]|0,p=(Mo(r,2)^Mo(r,13)^Mo(r,22))+hY(r,i,a)|0;u=c,c=l,l=s,s=o+d|0,o=a,a=i,i=r,r=d+p|0}r=r+this.A|0,i=i+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,i,a,o,s,l,c,u)}roundClean(){zl.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const gY=TP(()=>new pY),Vv=BigInt(2**32-1),Q5=BigInt(32);function TD(t,e=!1){return e?{h:Number(t&Vv),l:Number(t>>Q5&Vv)}:{h:Number(t>>Q5&Vv)|0,l:Number(t&Vv)|0}}function CD(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let i=0;iBigInt(t>>>0)<>>0),mY=(t,e,n)=>t>>>n,vY=(t,e,n)=>t<<32-n|e>>>n,bY=(t,e,n)=>t>>>n|e<<32-n,wY=(t,e,n)=>t<<32-n|e>>>n,xY=(t,e,n)=>t<<64-n|e>>>n-32,AY=(t,e,n)=>t>>>n-32|e<<64-n,EY=(t,e)=>e,SY=(t,e)=>t,kD=(t,e,n)=>t<>>32-n,_D=(t,e,n)=>e<>>32-n,ND=(t,e,n)=>e<>>64-n,ID=(t,e,n)=>t<>>64-n;function PY(t,e,n,r){const i=(e>>>0)+(r>>>0);return{h:t+n+(i/2**32|0)|0,l:i|0}}const OY=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),TY=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,CY=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),kY=(t,e,n,r,i)=>e+n+r+i+(t/2**32|0)|0,_Y=(t,e,n,r,i)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(i>>>0),NY=(t,e,n,r,i,a)=>e+n+r+i+a+(t/2**32|0)|0,Nt={fromBig:TD,split:CD,toBig:yY,shrSH:mY,shrSL:vY,rotrSH:bY,rotrSL:wY,rotrBH:xY,rotrBL:AY,rotr32H:EY,rotr32L:SY,rotlSH:kD,rotlSL:_D,rotlBH:ND,rotlBL:ID,add:PY,add3L:OY,add3H:TY,add4L:CY,add4H:kY,add5H:NY,add5L:_Y},[IY,RY]=Nt.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Hl=new Uint32Array(80),Gl=new Uint32Array(80);class MY extends OD{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:n,Bh:r,Bl:i,Ch:a,Cl:o,Dh:s,Dl:l,Eh:c,El:u,Fh:f,Fl:h,Gh:d,Gl:g,Hh:p,Hl:y}=this;return[e,n,r,i,a,o,s,l,c,u,f,h,d,g,p,y]}set(e,n,r,i,a,o,s,l,c,u,f,h,d,g,p,y){this.Ah=e|0,this.Al=n|0,this.Bh=r|0,this.Bl=i|0,this.Ch=a|0,this.Cl=o|0,this.Dh=s|0,this.Dl=l|0,this.Eh=c|0,this.El=u|0,this.Fh=f|0,this.Fl=h|0,this.Gh=d|0,this.Gl=g|0,this.Hh=p|0,this.Hl=y|0}process(e,n){for(let x=0;x<16;x++,n+=4)Hl[x]=e.getUint32(n),Gl[x]=e.getUint32(n+=4);for(let x=16;x<80;x++){const A=Hl[x-15]|0,S=Gl[x-15]|0,E=Nt.rotrSH(A,S,1)^Nt.rotrSH(A,S,8)^Nt.shrSH(A,S,7),T=Nt.rotrSL(A,S,1)^Nt.rotrSL(A,S,8)^Nt.shrSL(A,S,7),C=Hl[x-2]|0,N=Gl[x-2]|0,B=Nt.rotrSH(C,N,19)^Nt.rotrBH(C,N,61)^Nt.shrSH(C,N,6),L=Nt.rotrSL(C,N,19)^Nt.rotrBL(C,N,61)^Nt.shrSL(C,N,6),U=Nt.add4L(T,L,Gl[x-7],Gl[x-16]),j=Nt.add4H(U,E,B,Hl[x-7],Hl[x-16]);Hl[x]=j|0,Gl[x]=U|0}let{Ah:r,Al:i,Bh:a,Bl:o,Ch:s,Cl:l,Dh:c,Dl:u,Eh:f,El:h,Fh:d,Fl:g,Gh:p,Gl:y,Hh:m,Hl:b}=this;for(let x=0;x<80;x++){const A=Nt.rotrSH(f,h,14)^Nt.rotrSH(f,h,18)^Nt.rotrBH(f,h,41),S=Nt.rotrSL(f,h,14)^Nt.rotrSL(f,h,18)^Nt.rotrBL(f,h,41),E=f&d^~f&p,T=h&g^~h&y,C=Nt.add5L(b,S,T,RY[x],Gl[x]),N=Nt.add5H(C,m,A,E,IY[x],Hl[x]),B=C|0,L=Nt.rotrSH(r,i,28)^Nt.rotrBH(r,i,34)^Nt.rotrBH(r,i,39),U=Nt.rotrSL(r,i,28)^Nt.rotrBL(r,i,34)^Nt.rotrBL(r,i,39),j=r&a^r&s^a&s,X=i&o^i&l^o&l;m=p|0,b=y|0,p=d|0,y=g|0,d=f|0,g=h|0,{h:f,l:h}=Nt.add(c|0,u|0,N|0,B|0),c=s|0,u=l|0,s=a|0,l=o|0,a=r|0,o=i|0;const G=Nt.add3L(B,U,X);r=Nt.add3H(G,N,L,j),i=G|0}({h:r,l:i}=Nt.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:a,l:o}=Nt.add(this.Bh|0,this.Bl|0,a|0,o|0),{h:s,l}=Nt.add(this.Ch|0,this.Cl|0,s|0,l|0),{h:c,l:u}=Nt.add(this.Dh|0,this.Dl|0,c|0,u|0),{h:f,l:h}=Nt.add(this.Eh|0,this.El|0,f|0,h|0),{h:d,l:g}=Nt.add(this.Fh|0,this.Fl|0,d|0,g|0),{h:p,l:y}=Nt.add(this.Gh|0,this.Gl|0,p|0,y|0),{h:m,l:b}=Nt.add(this.Hh|0,this.Hl|0,m|0,b|0),this.set(r,i,a,o,s,l,c,u,f,h,d,g,p,y,m,b)}roundClean(){Hl.fill(0),Gl.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class BY extends MY{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}const DY=TP(()=>new BY),[RD,MD,BD]=[[],[],[]],LY=BigInt(0),Dg=BigInt(1),$Y=BigInt(2),UY=BigInt(7),FY=BigInt(256),jY=BigInt(113);for(let t=0,e=Dg,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],RD.push(2*(5*r+n)),MD.push((t+1)*(t+2)/2%64);let i=LY;for(let a=0;a<7;a++)e=(e<>UY)*jY)%FY,e&$Y&&(i^=Dg<<(Dg<n>32?ND(t,e,n):kD(t,e,n),TC=(t,e,n)=>n>32?ID(t,e,n):_D(t,e,n);function GY(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let o=0;o<10;o++)n[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const s=(o+8)%10,l=(o+2)%10,c=n[l],u=n[l+1],f=OC(c,u,1)^n[s],h=TC(c,u,1)^n[s+1];for(let d=0;d<50;d+=10)t[o+d]^=f,t[o+d+1]^=h}let i=t[2],a=t[3];for(let o=0;o<24;o++){const s=MD[o],l=OC(i,a,s),c=TC(i,a,s),u=RD[o];i=t[u],a=t[u+1],t[u]=l,t[u+1]=c}for(let o=0;o<50;o+=10){for(let s=0;s<10;s++)n[s]=t[o+s];for(let s=0;s<10;s++)t[o+s]^=~n[(s+2)%10]&n[(s+4)%10]}t[0]^=zY[r],t[1]^=HY[r]}n.fill(0)}class kP extends OP{constructor(e,n,r,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Vw(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=aY(this.state)}keccak(){GY(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){bp(this);const{blockLen:n,state:r}=this;e=F2(e);const i=e.length;for(let a=0;a=r&&this.keccak();const o=Math.min(r-this.posOut,a-i);e.set(n.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Vw(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(ED(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:n,suffix:r,outputLen:i,rounds:a,enableXOF:o}=this;return e||(e=new kP(n,r,i,o,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=r,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}const VY=(t,e,n)=>TP(()=>new kP(e,t,n)),DD=VY(1,136,256/8);let LD=!1;const $D=function(t){return DD(t)};let UD=$D;function Sn(t){const e=Jt(t,"data");return it(UD(e))}Sn._=$D;Sn.lock=function(){LD=!0};Sn.register=function(t){if(LD)throw new TypeError("keccak256 is locked");UD=t};Object.freeze(Sn);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const FD=BigInt(0),j2=BigInt(1),QY=BigInt(2),z2=t=>t instanceof Uint8Array,KY=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function wp(t){if(!z2(t))throw new Error("Uint8Array expected");let e="";for(let n=0;nr+i.length,0));let n=0;return t.forEach(r=>{if(!z2(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}function JY(t,e){if(t.length!==e.length)return!1;for(let n=0;nFD;t>>=j2,e+=1);return e}function ZY(t,e){return t>>BigInt(e)&j2}const qY=(t,e,n)=>t|(n?j2:FD)<(QY<new Uint8Array(t),CC=t=>Uint8Array.from(t);function zD(t,e,n){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=D6(t),i=D6(t),a=0;const o=()=>{r.fill(1),i.fill(0),a=0},s=(...f)=>n(i,r,...f),l=(f=D6())=>{i=s(CC([0]),f),r=s(),f.length!==0&&(i=s(CC([1]),f),r=s())},c=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const h=[];for(;f{o(),l(f);let d;for(;!(d=h(c()));)l();return o(),d}}const eX={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function rv(t,e,n={}){const r=(i,a,o)=>{const s=eX[a];if(typeof s!="function")throw new Error(`Invalid validator "${a}", expected function`);const l=t[i];if(!(o&&l===void 0)&&!s(l,t))throw new Error(`Invalid param ${String(i)}=${l} (${typeof l}), expected ${a}`)};for(const[i,a]of Object.entries(e))r(i,a,!1);for(const[i,a]of Object.entries(n))r(i,a,!0);return t}const tX=Object.freeze(Object.defineProperty({__proto__:null,bitGet:ZY,bitLen:XY,bitMask:RP,bitSet:qY,bytesToHex:wp,bytesToNumberBE:Ff,bytesToNumberLE:NP,concatBytes:a1,createHmacDrbg:zD,ensureBytes:io,equalBytes:JY,hexToBytes:xp,hexToNumber:_P,numberToBytesBE:Ap,numberToBytesLE:IP,numberToHexUnpadded:jD,numberToVarBytesBE:WY,utf8ToBytes:YY,validateObject:rv},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const pr=BigInt(0),Jn=BigInt(1),Tu=BigInt(2),nX=BigInt(3),K5=BigInt(4),kC=BigInt(5),_C=BigInt(8);BigInt(9);BigInt(16);function Ti(t,e){const n=t%e;return n>=pr?n:e+n}function rX(t,e,n){if(n<=pr||e 0");if(n===Jn)return pr;let r=Jn;for(;e>pr;)e&Jn&&(r=r*t%n),t=t*t%n,e>>=Jn;return r}function ga(t,e,n){let r=t;for(;e-- >pr;)r*=r,r%=n;return r}function W5(t,e){if(t===pr||e<=pr)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=Ti(t,e),r=e,i=pr,a=Jn;for(;n!==pr;){const s=r/n,l=r%n,c=i-a*s;r=n,n=l,i=a,a=c}if(r!==Jn)throw new Error("invert: does not exist");return Ti(i,e)}function iX(t){const e=(t-Jn)/Tu;let n,r,i;for(n=t-Jn,r=0;n%Tu===pr;n/=Tu,r++);for(i=Tu;i(r[i]="function",r),e);return rv(t,n)}function lX(t,e,n){if(n 0");if(n===pr)return t.ONE;if(n===Jn)return e;let r=t.ONE,i=e;for(;n>pr;)n&Jn&&(r=t.mul(r,i)),i=t.sqr(i),n>>=Jn;return r}function cX(t,e){const n=new Array(e.length),r=e.reduce((a,o,s)=>t.is0(o)?a:(n[s]=a,t.mul(a,o)),t.ONE),i=t.inv(r);return e.reduceRight((a,o,s)=>t.is0(o)?a:(n[s]=t.mul(a,n[s]),t.mul(a,o)),i),n}function HD(t,e){const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function uX(t,e,n=!1,r={}){if(t<=pr)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:a}=HD(t,e);if(a>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=aX(t),s=Object.freeze({ORDER:t,BITS:i,BYTES:a,MASK:RP(i),ZERO:pr,ONE:Jn,create:l=>Ti(l,t),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return pr<=l&&ll===pr,isOdd:l=>(l&Jn)===Jn,neg:l=>Ti(-l,t),eql:(l,c)=>l===c,sqr:l=>Ti(l*l,t),add:(l,c)=>Ti(l+c,t),sub:(l,c)=>Ti(l-c,t),mul:(l,c)=>Ti(l*c,t),pow:(l,c)=>lX(s,l,c),div:(l,c)=>Ti(l*W5(c,t),t),sqrN:l=>l*l,addN:(l,c)=>l+c,subN:(l,c)=>l-c,mulN:(l,c)=>l*c,inv:l=>W5(l,t),sqrt:r.sqrt||(l=>o(s,l)),invertBatch:l=>cX(s,l),cmov:(l,c,u)=>u?c:l,toBytes:l=>n?IP(l,a):Ap(l,a),fromBytes:l=>{if(l.length!==a)throw new Error(`Fp.fromBytes: expected ${a}, got ${l.length}`);return n?NP(l):Ff(l)}});return Object.freeze(s)}function GD(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function VD(t){const e=GD(t);return e+Math.ceil(e/2)}function fX(t,e,n=!1){const r=t.length,i=GD(e),a=VD(e);if(r<16||r1024)throw new Error(`expected ${a}-1024 bytes of input, got ${r}`);const o=n?Ff(t):NP(t),s=Ti(o,e-Jn)+Jn;return n?IP(s,i):Ap(s,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hX=BigInt(0),L6=BigInt(1);function dX(t,e){const n=(i,a)=>{const o=a.negate();return i?o:a},r=i=>{const a=Math.ceil(e/i)+1,o=2**(i-1);return{windows:a,windowSize:o}};return{constTimeNegate:n,unsafeLadder(i,a){let o=t.ZERO,s=i;for(;a>hX;)a&L6&&(o=o.add(s)),s=s.double(),a>>=L6;return o},precomputeWindow(i,a){const{windows:o,windowSize:s}=r(a),l=[];let c=i,u=c;for(let f=0;f>=d,y>l&&(y-=h,o+=L6);const m=p,b=p+Math.abs(y)-1,x=g%2!==0,A=y<0;y===0?u=u.add(n(x,a[m])):c=c.add(n(A,a[b]))}return{p:c,f:u}},wNAFCached(i,a,o,s){const l=i._WINDOW_SIZE||1;let c=a.get(i);return c||(c=this.precomputeWindow(i,l),l!==1&&a.set(i,s(c))),this.wNAF(l,c,o)}}}function QD(t){return sX(t.Fp),rv(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...HD(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function pX(t){const e=QD(t);rv(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=e;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:gX,hexToBytes:yX}=tX,Du={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=Du;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e("Invalid signature integer: wrong length");if(r[0]&128)throw new e("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:gX(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=Du,n=typeof t=="string"?yX(t):t;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||n[0]!=48)throw new e("Invalid signature tag");if(n[1]!==r-2)throw new e("Invalid signature: incorrect length");const{d:i,l:a}=Du._parseInt(n.subarray(2)),{d:o,l:s}=Du._parseInt(a);if(s.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(t){const e=c=>Number.parseInt(c[0],16)&8?"00"+c:c,n=c=>{const u=c.toString(16);return u.length&1?`0${u}`:u},r=e(n(t.s)),i=e(n(t.r)),a=r.length/2,o=i.length/2,s=n(a),l=n(o);return`30${n(o+a+4)}02${l}${i}02${s}${r}`}},nl=BigInt(0),Na=BigInt(1);BigInt(2);const NC=BigInt(3);BigInt(4);function mX(t){const e=pX(t),{Fp:n}=e,r=e.toBytes||((g,p,y)=>{const m=p.toAffine();return a1(Uint8Array.from([4]),n.toBytes(m.x),n.toBytes(m.y))}),i=e.fromBytes||(g=>{const p=g.subarray(1),y=n.fromBytes(p.subarray(0,n.BYTES)),m=n.fromBytes(p.subarray(n.BYTES,2*n.BYTES));return{x:y,y:m}});function a(g){const{a:p,b:y}=e,m=n.sqr(g),b=n.mul(m,g);return n.add(n.add(b,n.mul(g,p)),y)}if(!n.eql(n.sqr(e.Gy),a(e.Gx)))throw new Error("bad generator point: equation left != right");function o(g){return typeof g=="bigint"&&nln.eql(x,n.ZERO);return b(y)&&b(m)?f.ZERO:new f(y,m,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(p){const y=n.invertBatch(p.map(m=>m.pz));return p.map((m,b)=>m.toAffine(y[b])).map(f.fromAffine)}static fromHex(p){const y=f.fromAffine(i(io("pointHex",p)));return y.assertValidity(),y}static fromPrivateKey(p){return f.BASE.multiply(l(p))}_setWindowSize(p){this._WINDOW_SIZE=p,c.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:p,y}=this.toAffine();if(!n.isValid(p)||!n.isValid(y))throw new Error("bad point: x or y not FE");const m=n.sqr(y),b=a(p);if(!n.eql(m,b))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:p}=this.toAffine();if(n.isOdd)return!n.isOdd(p);throw new Error("Field doesn't support isOdd")}equals(p){u(p);const{px:y,py:m,pz:b}=this,{px:x,py:A,pz:S}=p,E=n.eql(n.mul(y,S),n.mul(x,b)),T=n.eql(n.mul(m,S),n.mul(A,b));return E&&T}negate(){return new f(this.px,n.neg(this.py),this.pz)}double(){const{a:p,b:y}=e,m=n.mul(y,NC),{px:b,py:x,pz:A}=this;let S=n.ZERO,E=n.ZERO,T=n.ZERO,C=n.mul(b,b),N=n.mul(x,x),B=n.mul(A,A),L=n.mul(b,x);return L=n.add(L,L),T=n.mul(b,A),T=n.add(T,T),S=n.mul(p,T),E=n.mul(m,B),E=n.add(S,E),S=n.sub(N,E),E=n.add(N,E),E=n.mul(S,E),S=n.mul(L,S),T=n.mul(m,T),B=n.mul(p,B),L=n.sub(C,B),L=n.mul(p,L),L=n.add(L,T),T=n.add(C,C),C=n.add(T,C),C=n.add(C,B),C=n.mul(C,L),E=n.add(E,C),B=n.mul(x,A),B=n.add(B,B),C=n.mul(B,L),S=n.sub(S,C),T=n.mul(B,N),T=n.add(T,T),T=n.add(T,T),new f(S,E,T)}add(p){u(p);const{px:y,py:m,pz:b}=this,{px:x,py:A,pz:S}=p;let E=n.ZERO,T=n.ZERO,C=n.ZERO;const N=e.a,B=n.mul(e.b,NC);let L=n.mul(y,x),U=n.mul(m,A),j=n.mul(b,S),X=n.add(y,m),G=n.add(x,A);X=n.mul(X,G),G=n.add(L,U),X=n.sub(X,G),G=n.add(y,b);let H=n.add(x,S);return G=n.mul(G,H),H=n.add(L,j),G=n.sub(G,H),H=n.add(m,b),E=n.add(A,S),H=n.mul(H,E),E=n.add(U,j),H=n.sub(H,E),C=n.mul(N,G),E=n.mul(B,j),C=n.add(E,C),E=n.sub(U,C),C=n.add(U,C),T=n.mul(E,C),U=n.add(L,L),U=n.add(U,L),j=n.mul(N,j),G=n.mul(B,G),U=n.add(U,j),j=n.sub(L,j),j=n.mul(N,j),G=n.add(G,j),L=n.mul(U,G),T=n.add(T,L),L=n.mul(H,G),E=n.mul(X,E),E=n.sub(E,L),L=n.mul(X,U),C=n.mul(H,C),C=n.add(C,L),new f(E,T,C)}subtract(p){return this.add(p.negate())}is0(){return this.equals(f.ZERO)}wNAF(p){return d.wNAFCached(this,c,p,y=>{const m=n.invertBatch(y.map(b=>b.pz));return y.map((b,x)=>b.toAffine(m[x])).map(f.fromAffine)})}multiplyUnsafe(p){const y=f.ZERO;if(p===nl)return y;if(s(p),p===Na)return this;const{endo:m}=e;if(!m)return d.unsafeLadder(this,p);let{k1neg:b,k1:x,k2neg:A,k2:S}=m.splitScalar(p),E=y,T=y,C=this;for(;x>nl||S>nl;)x&Na&&(E=E.add(C)),S&Na&&(T=T.add(C)),C=C.double(),x>>=Na,S>>=Na;return b&&(E=E.negate()),A&&(T=T.negate()),T=new f(n.mul(T.px,m.beta),T.py,T.pz),E.add(T)}multiply(p){s(p);let y=p,m,b;const{endo:x}=e;if(x){const{k1neg:A,k1:S,k2neg:E,k2:T}=x.splitScalar(y);let{p:C,f:N}=this.wNAF(S),{p:B,f:L}=this.wNAF(T);C=d.constTimeNegate(A,C),B=d.constTimeNegate(E,B),B=new f(n.mul(B.px,x.beta),B.py,B.pz),m=C.add(B),b=N.add(L)}else{const{p:A,f:S}=this.wNAF(y);m=A,b=S}return f.normalizeZ([m,b])[0]}multiplyAndAddUnsafe(p,y,m){const b=f.BASE,x=(S,E)=>E===nl||E===Na||!S.equals(b)?S.multiplyUnsafe(E):S.multiply(E),A=x(this,y).add(x(p,m));return A.is0()?void 0:A}toAffine(p){const{px:y,py:m,pz:b}=this,x=this.is0();p==null&&(p=x?n.ONE:n.inv(b));const A=n.mul(y,p),S=n.mul(m,p),E=n.mul(b,p);if(x)return{x:n.ZERO,y:n.ZERO};if(!n.eql(E,n.ONE))throw new Error("invZ was invalid");return{x:A,y:S}}isTorsionFree(){const{h:p,isTorsionFree:y}=e;if(p===Na)return!0;if(y)return y(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:p,clearCofactor:y}=e;return p===Na?this:y?y(f,this):this.multiplyUnsafe(e.h)}toRawBytes(p=!0){return this.assertValidity(),r(f,this,p)}toHex(p=!0){return wp(this.toRawBytes(p))}}f.BASE=new f(e.Gx,e.Gy,n.ONE),f.ZERO=new f(n.ZERO,n.ONE,n.ZERO);const h=e.nBitLength,d=dX(f,e.endo?Math.ceil(h/2):h);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:o}}function vX(t){const e=QD(t);return rv(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function bX(t){const e=vX(t),{Fp:n,n:r}=e,i=n.BYTES+1,a=2*n.BYTES+1;function o(G){return nlwp(Ap(G,e.nByteLength));function g(G){const H=r>>Na;return G>H}function p(G){return g(G)?s(-G):G}const y=(G,H,re)=>Ff(G.slice(H,re));class m{constructor(H,re,V){this.r=H,this.s=re,this.recovery=V,this.assertValidity()}static fromCompact(H){const re=e.nByteLength;return H=io("compactSignature",H,re*2),new m(y(H,0,re),y(H,re,2*re))}static fromDER(H){const{r:re,s:V}=Du.toSig(io("DER",H));return new m(re,V)}assertValidity(){if(!h(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!h(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(H){return new m(this.r,this.s,H)}recoverPublicKey(H){const{r:re,s:V,recovery:ee}=this,pe=T(io("msgHash",H));if(ee==null||![0,1,2,3].includes(ee))throw new Error("recovery id invalid");const Ae=ee===2||ee===3?re+e.n:re;if(Ae>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const we=ee&1?"03":"02",Ye=c.fromHex(we+d(Ae)),nt=l(Ae),De=s(-pe*nt),st=s(V*nt),Tt=c.BASE.multiplyAndAddUnsafe(Ye,De,st);if(!Tt)throw new Error("point at infinify");return Tt.assertValidity(),Tt}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return xp(this.toDERHex())}toDERHex(){return Du.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return xp(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}const b={isValidPrivateKey(G){try{return u(G),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const G=VD(e.n);return fX(e.randomBytes(G),e.n)},precompute(G=8,H=c.BASE){return H._setWindowSize(G),H.multiply(BigInt(3)),H}};function x(G,H=!0){return c.fromPrivateKey(G).toRawBytes(H)}function A(G){const H=G instanceof Uint8Array,re=typeof G=="string",V=(H||re)&&G.length;return H?V===i||V===a:re?V===2*i||V===2*a:G instanceof c}function S(G,H,re=!0){if(A(G))throw new Error("first arg must be private key");if(!A(H))throw new Error("second arg must be public key");return c.fromHex(H).multiply(u(G)).toRawBytes(re)}const E=e.bits2int||function(G){const H=Ff(G),re=G.length*8-e.nBitLength;return re>0?H>>BigInt(re):H},T=e.bits2int_modN||function(G){return s(E(G))},C=RP(e.nBitLength);function N(G){if(typeof G!="bigint")throw new Error("bigint expected");if(!(nl<=G&&GEe in re))throw new Error("sign() legacy options not supported");const{hash:V,randomBytes:ee}=e;let{lowS:pe,prehash:Ae,extraEntropy:we}=re;pe==null&&(pe=!0),G=io("msgHash",G),Ae&&(G=io("prehashed msgHash",V(G)));const Ye=T(G),nt=u(H),De=[N(nt),N(Ye)];if(we!=null){const Ee=we===!0?ee(n.BYTES):we;De.push(io("extraEntropy",Ee))}const st=a1(...De),Tt=Ye;function ln(Ee){const ne=E(Ee);if(!h(ne))return;const le=l(ne),te=c.BASE.multiply(ne).toAffine(),Ce=s(te.x);if(Ce===nl)return;const Se=s(le*s(Tt+Ce*nt));if(Se===nl)return;let ze=(te.x===Ce?0:2)|Number(te.y&Na),$e=Se;return pe&&g(Se)&&($e=p(Se),ze^=1),new m(Ce,$e,ze)}return{seed:st,k2sig:ln}}const L={lowS:e.lowS,prehash:!1},U={lowS:e.lowS,prehash:!1};function j(G,H,re=L){const{seed:V,k2sig:ee}=B(G,H,re),pe=e;return zD(pe.hash.outputLen,pe.nByteLength,pe.hmac)(V,ee)}c.BASE._setWindowSize(8);function X(G,H,re,V=U){var te;const ee=G;if(H=io("msgHash",H),re=io("publicKey",re),"strict"in V)throw new Error("options.strict was renamed to lowS");const{lowS:pe,prehash:Ae}=V;let we,Ye;try{if(typeof ee=="string"||ee instanceof Uint8Array)try{we=m.fromDER(ee)}catch(Ce){if(!(Ce instanceof Du.Err))throw Ce;we=m.fromCompact(ee)}else if(typeof ee=="object"&&typeof ee.r=="bigint"&&typeof ee.s=="bigint"){const{r:Ce,s:Se}=ee;we=new m(Ce,Se)}else throw new Error("PARSE");Ye=c.fromHex(re)}catch(Ce){if(Ce.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(pe&&we.hasHighS())return!1;Ae&&(H=e.hash(H));const{r:nt,s:De}=we,st=T(H),Tt=l(De),ln=s(st*Tt),Ee=s(nt*Tt),ne=(te=c.BASE.multiplyAndAddUnsafe(Ye,ln,Ee))==null?void 0:te.toAffine();return ne?s(ne.x)===nt:!1}return{CURVE:e,getPublicKey:x,getSharedSecret:S,sign:j,verify:X,ProjectivePoint:c,Signature:m,utils:b}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function wX(t){return{hash:t,hmac:(e,...n)=>CP(t,e,lY(...n)),randomBytes:cY}}function xX(t,e){const n=r=>bX({...t,...wX(r)});return Object.freeze({...n(e),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const KD=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),IC=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),AX=BigInt(1),J5=BigInt(2),RC=(t,e)=>(t+e/J5)/e;function EX(t){const e=KD,n=BigInt(3),r=BigInt(6),i=BigInt(11),a=BigInt(22),o=BigInt(23),s=BigInt(44),l=BigInt(88),c=t*t*t%e,u=c*c*t%e,f=ga(u,n,e)*u%e,h=ga(f,n,e)*u%e,d=ga(h,J5,e)*c%e,g=ga(d,i,e)*d%e,p=ga(g,a,e)*g%e,y=ga(p,s,e)*p%e,m=ga(y,l,e)*y%e,b=ga(m,s,e)*p%e,x=ga(b,n,e)*u%e,A=ga(x,o,e)*g%e,S=ga(A,r,e)*c%e,E=ga(S,J5,e);if(!Y5.eql(Y5.sqr(E),t))throw new Error("Cannot find square root");return E}const Y5=uX(KD,void 0,void 0,{sqrt:EX}),ri=xX({a:BigInt(0),b:BigInt(7),Fp:Y5,n:IC,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=IC,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-AX*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=n,o=BigInt("0x100000000000000000000000000000000"),s=RC(a*t,e),l=RC(-r*t,e);let c=Ti(t-s*n-l*i,e),u=Ti(-s*r-l*a,e);const f=c>o,h=u>o;if(f&&(c=e-c),h&&(u=e-u),c>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:f,k1:c,k2neg:h,k2:u}}}},gY);BigInt(0);ri.ProjectivePoint;const o1="0x0000000000000000000000000000000000000000",MC="0x0000000000000000000000000000000000000000000000000000000000000000",BC=BigInt(0),DC=BigInt(1),LC=BigInt(2),$C=BigInt(27),UC=BigInt(28),Qv=BigInt(35),Oh={};function FC(t){return th(oi(t),32)}var Gd,Vd,Qd,ef,na;let xl=(na=class{constructor(e,n,r,i){M(this,Gd,void 0);M(this,Vd,void 0);M(this,Qd,void 0);M(this,ef,void 0);D2(e,Oh,"Signature"),O(this,Gd,n),O(this,Vd,r),O(this,Qd,i),O(this,ef,null)}get r(){return v(this,Gd)}set r(e){K(Td(e)===32,"invalid r","value",e),O(this,Gd,it(e))}get s(){return v(this,Vd)}set s(e){K(Td(e)===32,"invalid s","value",e);const n=it(e);K(parseInt(n.substring(0,3))<8,"non-canonical s","value",n),O(this,Vd,n)}get v(){return v(this,Qd)}set v(e){const n=Bt(e,"value");K(n===27||n===28,"invalid v","v",e),O(this,Qd,n)}get networkV(){return v(this,ef)}get legacyChainId(){const e=this.networkV;return e==null?null:na.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=Jt(this.s);return this.yParity&&(e[0]|=128),it(e)}get compactSerialized(){return Xn([this.r,this.yParityAndS])}get serialized(){return Xn([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new na(Oh,this.r,this.s,this.v);return this.networkV&&O(e,ef,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const n=et(e,"v");return n==$C||n==UC?BC:(K(n>=Qv,"invalid EIP-155 v","v",e),(n-Qv)/LC)}static getChainIdV(e,n){return et(e)*LC+BigInt(35+n-27)}static getNormalizedV(e){const n=et(e);return n===BC||n===$C?27:n===DC||n===UC?28:(K(n>=Qv,"invalid v","v",e),n&DC?27:28)}static from(e){function n(c,u){K(c,u,"signature",e)}if(e==null)return new na(Oh,MC,MC,27);if(typeof e=="string"){const c=Jt(e,"signature");if(c.length===64){const u=it(c.slice(0,32)),f=c.slice(32,64),h=f[0]&128?28:27;return f[0]&=127,new na(Oh,u,it(f),h)}if(c.length===65){const u=it(c.slice(0,32)),f=c.slice(32,64);n((f[0]&128)===0,"non-canonical s");const h=na.getNormalizedV(c[64]);return new na(Oh,u,it(f),h)}n(!1,"invalid raw signature length")}if(e instanceof na)return e.clone();const r=e.r;n(r!=null,"missing r");const i=FC(r),a=function(c,u){if(c!=null)return FC(c);if(u!=null){n(gn(u,32),"invalid yParityAndS");const f=Jt(u);return f[0]&=127,it(f)}n(!1,"missing s")}(e.s,e.yParityAndS);n((Jt(a)[0]&128)==0,"non-canonical s");const{networkV:o,v:s}=function(c,u,f){if(c!=null){const h=et(c);return{networkV:h>=Qv?h:void 0,v:na.getNormalizedV(h)}}if(u!=null)return n(gn(u,32),"invalid yParityAndS"),{v:Jt(u)[0]&128?28:27};if(f!=null){switch(Bt(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}n(!1,"invalid yParity")}n(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),l=new na(Oh,i,a,s);return o&&O(l,ef,o),n(e.yParity==null||Bt(e.yParity,"sig.yParity")===l.yParity,"yParity mismatch"),n(e.yParityAndS==null||e.yParityAndS===l.yParityAndS,"yParityAndS mismatch"),l}},Gd=new WeakMap,Vd=new WeakMap,Qd=new WeakMap,ef=new WeakMap,na);var Ms,rl;let MP=(rl=class{constructor(e){M(this,Ms,void 0);K(Td(e)===32,"invalid private key","privateKey","[REDACTED]"),O(this,Ms,it(e))}get privateKey(){return v(this,Ms)}get publicKey(){return rl.computePublicKey(v(this,Ms))}get compressedPublicKey(){return rl.computePublicKey(v(this,Ms),!0)}sign(e){K(Td(e)===32,"invalid digest length","digest",e);const n=ri.sign(ai(e),ai(v(this,Ms)),{lowS:!0});return xl.from({r:us(n.r,32),s:us(n.s,32),v:n.recovery?28:27})}computeSharedSecret(e){const n=rl.computePublicKey(e);return it(ri.getSharedSecret(ai(v(this,Ms)),Jt(n),!1))}static computePublicKey(e,n){let r=Jt(e,"key");if(r.length===32){const a=ri.getPublicKey(r,!!n);return it(a)}if(r.length===64){const a=new Uint8Array(65);a[0]=4,a.set(r,1),r=a}const i=ri.ProjectivePoint.fromHex(r);return it(i.toRawBytes(n))}static recoverPublicKey(e,n){K(Td(e)===32,"invalid digest length","digest",e);const r=xl.from(n);let i=ri.Signature.fromCompact(ai(Xn([r.r,r.s])));i=i.addRecoveryBit(r.yParity);const a=i.recoverPublicKey(ai(e));return K(a!=null,"invalid signautre for digest","signature",n),"0x"+a.toHex(!1)}static addPoints(e,n,r){const i=ri.ProjectivePoint.fromHex(rl.computePublicKey(e).substring(2)),a=ri.ProjectivePoint.fromHex(rl.computePublicKey(n).substring(2));return"0x"+i.add(a).toHex(!!r)}},Ms=new WeakMap,rl);const SX=BigInt(0),PX=BigInt(36);function jC(t){t=t.toLowerCase();const e=t.substring(2).split(""),n=new Uint8Array(40);for(let i=0;i<40;i++)n[i]=e[i].charCodeAt(0);const r=Jt(Sn(n));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(r[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const BP={};for(let t=0;t<10;t++)BP[String(t)]=String(t);for(let t=0;t<26;t++)BP[String.fromCharCode(65+t)]=String(10+t);const zC=15;function OX(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(r=>BP[r]).join("");for(;e.length>=zC;){let r=e.substring(0,zC);e=parseInt(r,10)%97+e.substring(r.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}const TX=function(){const t={};for(let e=0;e<36;e++){const n="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[n]=BigInt(e)}return t}();function CX(t){t=t.toLowerCase();let e=SX;for(let n=0;ne.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return v(this,tf)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return v(this,tf)===!0?-1:v(this,tf)===!1?this.value.length:null}static from(e,n){return new yo(xs,e,n)}static uint8(e){return Ve(e,8)}static uint16(e){return Ve(e,16)}static uint24(e){return Ve(e,24)}static uint32(e){return Ve(e,32)}static uint40(e){return Ve(e,40)}static uint48(e){return Ve(e,48)}static uint56(e){return Ve(e,56)}static uint64(e){return Ve(e,64)}static uint72(e){return Ve(e,72)}static uint80(e){return Ve(e,80)}static uint88(e){return Ve(e,88)}static uint96(e){return Ve(e,96)}static uint104(e){return Ve(e,104)}static uint112(e){return Ve(e,112)}static uint120(e){return Ve(e,120)}static uint128(e){return Ve(e,128)}static uint136(e){return Ve(e,136)}static uint144(e){return Ve(e,144)}static uint152(e){return Ve(e,152)}static uint160(e){return Ve(e,160)}static uint168(e){return Ve(e,168)}static uint176(e){return Ve(e,176)}static uint184(e){return Ve(e,184)}static uint192(e){return Ve(e,192)}static uint200(e){return Ve(e,200)}static uint208(e){return Ve(e,208)}static uint216(e){return Ve(e,216)}static uint224(e){return Ve(e,224)}static uint232(e){return Ve(e,232)}static uint240(e){return Ve(e,240)}static uint248(e){return Ve(e,248)}static uint256(e){return Ve(e,256)}static uint(e){return Ve(e,256)}static int8(e){return Ve(e,-8)}static int16(e){return Ve(e,-16)}static int24(e){return Ve(e,-24)}static int32(e){return Ve(e,-32)}static int40(e){return Ve(e,-40)}static int48(e){return Ve(e,-48)}static int56(e){return Ve(e,-56)}static int64(e){return Ve(e,-64)}static int72(e){return Ve(e,-72)}static int80(e){return Ve(e,-80)}static int88(e){return Ve(e,-88)}static int96(e){return Ve(e,-96)}static int104(e){return Ve(e,-104)}static int112(e){return Ve(e,-112)}static int120(e){return Ve(e,-120)}static int128(e){return Ve(e,-128)}static int136(e){return Ve(e,-136)}static int144(e){return Ve(e,-144)}static int152(e){return Ve(e,-152)}static int160(e){return Ve(e,-160)}static int168(e){return Ve(e,-168)}static int176(e){return Ve(e,-176)}static int184(e){return Ve(e,-184)}static int192(e){return Ve(e,-192)}static int200(e){return Ve(e,-200)}static int208(e){return Ve(e,-208)}static int216(e){return Ve(e,-216)}static int224(e){return Ve(e,-224)}static int232(e){return Ve(e,-232)}static int240(e){return Ve(e,-240)}static int248(e){return Ve(e,-248)}static int256(e){return Ve(e,-256)}static int(e){return Ve(e,-256)}static bytes1(e){return Zt(e,1)}static bytes2(e){return Zt(e,2)}static bytes3(e){return Zt(e,3)}static bytes4(e){return Zt(e,4)}static bytes5(e){return Zt(e,5)}static bytes6(e){return Zt(e,6)}static bytes7(e){return Zt(e,7)}static bytes8(e){return Zt(e,8)}static bytes9(e){return Zt(e,9)}static bytes10(e){return Zt(e,10)}static bytes11(e){return Zt(e,11)}static bytes12(e){return Zt(e,12)}static bytes13(e){return Zt(e,13)}static bytes14(e){return Zt(e,14)}static bytes15(e){return Zt(e,15)}static bytes16(e){return Zt(e,16)}static bytes17(e){return Zt(e,17)}static bytes18(e){return Zt(e,18)}static bytes19(e){return Zt(e,19)}static bytes20(e){return Zt(e,20)}static bytes21(e){return Zt(e,21)}static bytes22(e){return Zt(e,22)}static bytes23(e){return Zt(e,23)}static bytes24(e){return Zt(e,24)}static bytes25(e){return Zt(e,25)}static bytes26(e){return Zt(e,26)}static bytes27(e){return Zt(e,27)}static bytes28(e){return Zt(e,28)}static bytes29(e){return Zt(e,29)}static bytes30(e){return Zt(e,30)}static bytes31(e){return Zt(e,31)}static bytes32(e){return Zt(e,32)}static address(e){return new yo(xs,"address",e)}static bool(e){return new yo(xs,"bool",!!e)}static bytes(e){return new yo(xs,"bytes",e)}static string(e){return new yo(xs,"string",e)}static array(e,n){throw new Error("not implemented yet")}static tuple(e,n){throw new Error("not implemented yet")}static overrides(e){return new yo(xs,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===HC}static dereference(e,n){if(yo.isTyped(e)){if(e.type!==n)throw new Error(`invalid type: expecetd ${n}, got ${e.type}`);return e.value}return e}},tf=new WeakMap,yo),kX=class extends Nl{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,n){let r=Di.dereference(n,"string");try{r=fn(r)}catch(i){return this._throwError(i.message,n)}return e.writeValue(r)}decode(e){return fn(us(e.readValue(),20))}},_X=class extends Nl{constructor(n){super(n.name,n.type,"_",n.dynamic);R(this,"coder");this.coder=n}defaultValue(){return this.coder.defaultValue()}encode(n,r){return this.coder.encode(n,r)}decode(n){return this.coder.decode(n)}};function YD(t,e,n){let r=[];if(Array.isArray(n))r=n;else if(n&&typeof n=="object"){let l={};r=e.map(c=>{const u=c.localName;return ye(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:c},value:n}),ye(!l[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:c},value:n}),l[u]=!0,n[u]})}else K(!1,"invalid tuple value","tuple",n);K(e.length===r.length,"types/value length mismatch","tuple",n);let i=new G5,a=new G5,o=[];e.forEach((l,c)=>{let u=r[c];if(l.dynamic){let f=a.length;l.encode(a,u);let h=i.writeUpdatableValue();o.push(d=>{h(d+f)})}else l.encode(i,u)}),o.forEach(l=>{l(i.length)});let s=t.appendWriter(i);return s+=t.appendWriter(a),s}function XD(t,e){let n=[],r=[],i=t.subReader(0);return e.forEach(a=>{let o=null;if(a.dynamic){let s=t.readIndex(),l=i.subReader(s);try{o=a.decode(l)}catch(c){if(Qr(c,"BUFFER_OVERRUN"))throw c;o=c,o.baseType=a.name,o.name=a.localName,o.type=a.type}}else try{o=a.decode(t)}catch(s){if(Qr(s,"BUFFER_OVERRUN"))throw s;o=s,o.baseType=a.name,o.name=a.localName,o.type=a.type}if(o==null)throw new Error("investigate");n.push(o),r.push(a.localName||null)}),xD.fromItems(n,r)}let NX=class extends Nl{constructor(n,r,i){const a=n.type+"["+(r>=0?r:"")+"]",o=r===-1||n.dynamic;super("array",a,i,o);R(this,"coder");R(this,"length");gt(this,{coder:n,length:r})}defaultValue(){const n=this.coder.defaultValue(),r=[];for(let i=0;io||i<-(o+$X))&&this._throwError("value out-of-bounds",r),i=hD(i,8*si)}else(iZg(a,this.size*8))&&this._throwError("value out-of-bounds",r);return n.writeValue(i)}decode(n){let r=Zg(n.readValue(),this.size*8);return this.signed&&(r=$J(r,this.size*8)),r}},jX=class extends ZD{constructor(e){super("string",e)}defaultValue(){return""}encode(e,n){return super.encode(e,ul(Di.dereference(n,"string")))}decode(e){return Gw(super.decode(e))}},Kv=class extends Nl{constructor(n,r){let i=!1;const a=[];n.forEach(s=>{s.dynamic&&(i=!0),a.push(s.type)});const o="tuple("+a.join(",")+")";super("tuple",o,r,i);R(this,"coders");gt(this,{coders:Object.freeze(n.slice())})}defaultValue(){const n=[];this.coders.forEach(i=>{n.push(i.defaultValue())});const r=this.coders.reduce((i,a)=>{const o=a.localName;return o&&(i[o]||(i[o]=0),i[o]++),i},{});return this.coders.forEach((i,a)=>{let o=i.localName;!o||r[o]!==1||(o==="length"&&(o="_length"),n[o]==null&&(n[o]=n[a]))}),Object.freeze(n)}encode(n,r){const i=Di.dereference(r,"tuple");return YD(n,this.coders,i)}decode(n){return XD(n,this.coders)}};function rh(t){return Sn(ul(t))}var zX="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const GC=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),VC=4;function HX(t){let e=0;function n(){return t[e++]<<8|t[e++]}let r=n(),i=1,a=[0,1];for(let S=1;S>--l&1}const f=31,h=2**f,d=h>>>1,g=d>>1,p=h-1;let y=0;for(let S=0;S1;){let B=E+T>>>1;S>>1|u(),C=C<<1^d,N=(N^d)<<1|d|1;b=C,x=1+N-C}let A=r-4;return m.map(S=>{switch(S-A){case 3:return A+65792+(t[s++]<<16|t[s++]<<8|t[s++]);case 2:return A+256+(t[s++]<<8|t[s++]);case 1:return A+t[s++];default:return S-1}})}function GX(t){let e=0;return()=>t[e++]}function qD(t){return GX(HX(VX(t)))}function VX(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,a)=>e[i.charCodeAt(0)]=a);let n=t.length,r=new Uint8Array(6*n>>3);for(let i=0,a=0,o=0,s=0;i=8&&(r[a++]=s>>(o-=8));return r}function QX(t){return t&1?~t>>1:t>>1}function KX(t,e){let n=Array(t);for(let r=0,i=0;r{let e=s1(t);if(e.length)return e})}function tL(t){let e=[];for(;;){let n=t();if(n==0)break;e.push(WX(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(JX(n,t))}return e.flat()}function l1(t){let e=[];for(;;){let n=t(e.length);if(!n)break;e.push(n)}return e}function nL(t,e,n){let r=Array(t).fill().map(()=>[]);for(let i=0;ir[o].push(a));return r}function WX(t,e){let n=1+e(),r=e(),i=l1(e);return nL(i.length,1+t,e).flatMap((o,s)=>{let[l,...c]=o;return Array(i[s]).fill().map((u,f)=>{let h=f*r;return[l+f*n,c.map(d=>d+h)]})})}function JX(t,e){let n=1+e();return nL(n,1+t,e).map(i=>[i[0],i.slice(1)])}function YX(t){let e=[],n=s1(t);return i(r([]),[]),e;function r(a){let o=t(),s=l1(()=>{let l=s1(t).map(c=>n[c]);if(l.length)return r(l)});return{S:o,B:s,Q:a}}function i({S:a,B:o},s,l){if(!(a&4&&l===s[s.length-1])){a&2&&(l=s[s.length-1]),a&1&&e.push(s);for(let c of o)for(let u of c.Q)i(c,[...s,u],l)}}}function XX(t){return t.toString(16).toUpperCase().padStart(2,"0")}function rL(t){return`{${XX(t)}}`}function ZX(t){let e=[];for(let n=0,r=t.length;n>24&255}function oL(t){return t&16777215}let X5,QC,Z5,jb;function oZ(){let t=qD(eZ);X5=new Map(eL(t).flatMap((e,n)=>e.map(r=>[r,n+1<<24]))),QC=new Set(s1(t)),Z5=new Map,jb=new Map;for(let[e,n]of tL(t)){if(!QC.has(e)&&n.length==2){let[r,i]=n,a=jb.get(r);a||(a=new Map,jb.set(r,a)),a.set(i,e)}Z5.set(e,n.reverse())}}function sL(t){return t>=c1&&t=Qw&&t=Kw&&eWw&&e0&&i(Ww+c)}else{let o=Z5.get(a);o?n.push(...o):i(a)}if(!n.length)break;a=n.pop()}if(r&&e.length>1){let a=ey(e[0]);for(let o=1;o0&&i>=o)o==0?(e.push(r,...n),n.length=0,r=s):n.push(s),i=o;else{let l=sZ(r,s);l>=0?r=l:i==0&&o==0?(e.push(r),r=s):(n.push(s),i=o)}}return r>=0&&e.push(r,...n),e}function cL(t){return lL(t).map(oL)}function cZ(t){return lZ(lL(t))}const KC=45,uL=".",fL=65039,hL=1,Yw=t=>Array.from(t);function u1(t,e){return t.P.has(e)||t.Q.has(e)}let uZ=class extends Array{get is_emoji(){return!0}},q5,dL,Lu,e3,pL,kd,U6,Bh,Au,WC,t3;function DP(){if(q5)return;let t=qD(zX);const e=()=>s1(t),n=()=>new Set(e()),r=(u,f)=>f.forEach(h=>u.add(h));q5=new Map(tL(t)),dL=n(),Lu=e(),e3=new Set(e().map(u=>Lu[u])),Lu=new Set(Lu),pL=n(),n();let i=eL(t),a=t();const o=()=>{let u=new Set;return e().forEach(f=>r(u,i[f])),r(u,e()),u};kd=l1(u=>{let f=l1(t).map(h=>h+96);if(f.length){let h=u>=a;f[0]-=32,f=Ep(f),h&&(f=`Restricted[${f}]`);let d=o(),g=o(),p=!t();return{N:f,P:d,Q:g,M:p,R:h}}}),U6=n(),Bh=new Map;let s=e().concat(Yw(U6)).sort((u,f)=>u-f);s.forEach((u,f)=>{let h=t(),d=s[f]=h?s[f-h]:{V:[],M:new Map};d.V.push(u),U6.has(u)||Bh.set(u,d)});for(let{V:u,M:f}of new Set(Bh.values())){let h=[];for(let g of u){let p=kd.filter(m=>u1(m,g)),y=h.find(({G:m})=>p.some(b=>m.has(b)));y||(y={G:new Set,V:[]},h.push(y)),y.V.push(g),r(y.G,p)}let d=h.flatMap(g=>Yw(g.G));for(let{G:g,V:p}of h){let y=new Set(d.filter(m=>!g.has(m)));for(let m of p)f.set(m,y)}}Au=new Set;let l=new Set;const c=u=>Au.has(u)?l.add(u):Au.add(u);for(let u of kd){for(let f of u.P)c(f);for(let f of u.Q)c(f)}for(let u of Au)!Bh.has(u)&&!l.has(u)&&Bh.set(u,hL);r(Au,cL(Au)),WC=YX(t).map(u=>uZ.from(u)).sort(qX),t3=new Map;for(let u of WC){let f=[t3];for(let h of u){let d=f.map(g=>{let p=g.get(h);return p||(p=new Map,g.set(h,p)),p});h===fL?f.push(...d):f=d}for(let h of f)h.V=u}}function LP(t){return(gL(t)?"":`${$P(H2([t]))} `)+rL(t)}function $P(t){return`"${t}"‎`}function fZ(t){if(t.length>=4&&t[2]==KC&&t[3]==KC)throw new Error(`invalid label extension: "${Ep(t.slice(0,4))}"`)}function hZ(t){for(let n=t.lastIndexOf(95);n>0;)if(t[--n]!==95)throw new Error("underscore allowed only at start")}function dZ(t){let e=t[0],n=GC.get(e);if(n)throw Py(`leading ${n}`);let r=t.length,i=-1;for(let a=1;ae&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let i=0,a=t.length;for(let o=0;o{let a=ZX(i),o={input:a,offset:r};r+=a.length+1;try{let s=o.tokens=xZ(a,e,n),l=s.length,c;if(!l)throw new Error("empty label");let u=o.output=s.flat();if(hZ(u),!(o.emoji=l>1||s[0].is_emoji)&&u.every(h=>h<128))fZ(u),c="ASCII";else{let h=s.flatMap(d=>d.is_emoji?[]:d);if(!h.length)c="Emoji";else{if(Lu.has(u[0]))throw Py("leading combining mark");for(let p=1;po.has(s)):Yw(o),!n.length)return}else r.push(i)}if(n){for(let i of n)if(r.every(a=>u1(i,a)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function vZ(t){let e=kd;for(let n of t){let r=e.filter(i=>u1(i,n));if(!r.length)throw kd.some(i=>u1(i,n))?mL(e[0],n):yL(n);if(e=r,r.length==1)break}return e}function bZ(t){return t.map(({input:e,error:n,output:r})=>{if(n){let i=n.message;throw new Error(t.length==1?i:`Invalid label ${$P(H2(e,63))}: ${i}`)}return Ep(r)}).join(uL)}function yL(t){return new Error(`disallowed character: ${LP(t)}`)}function mL(t,e){let n=LP(e),r=kd.find(i=>i.P.has(e));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${t.N} + ${n}`)}function Py(t){return new Error(`illegal placement: ${t}`)}function wZ(t,e){for(let n of e)if(!u1(t,n))throw mL(t,n);if(t.M){let n=cL(e);for(let r=1,i=n.length;rVC)throw new Error(`excessive non-spacing marks: ${$P(H2(n.slice(r-1,a)))} (${a-r}/${VC})`);r=a}}}function xZ(t,e,n){let r=[],i=[];for(t=t.slice().reverse();t.length;){let a=EZ(t);if(a)i.length&&(r.push(e(i)),i=[]),r.push(n(a));else{let o=t.pop();if(Au.has(o))i.push(o);else{let s=q5.get(o);if(s)i.push(...s);else if(!dL.has(o))throw yL(o)}}}return i.length&&r.push(e(i)),r}function AZ(t){return t.filter(e=>e!=fL)}function EZ(t,e){let n=t3,r,i=t.length;for(;i&&(n=n.get(t[--i]),!!n);){let{V:a}=n;a&&(r=a,e&&e.push(...t.slice(i).reverse()),t.length=i)}return r}const vL=new Uint8Array(32);vL.fill(0);function JC(t){return K(t.length!==0,"invalid ENS name; empty component","comp",t),t}function bL(t){const e=ul(SZ(t)),n=[];if(t.length===0)return n;let r=0;for(let i=0;i{K(r.length<=n,`label ${JSON.stringify(t)} exceeds ${n} bytes`,"name",t);const i=new Uint8Array(r.length+1);return i.set(r,1),i[0]=i.length-1,i})))+"00"}function F6(t,e){return{address:fn(t),storageKeys:e.map((n,r)=>(K(gn(n,32),"invalid slot",`storageKeys[${r}]`,n),n.toLowerCase()))}}function ph(t){if(Array.isArray(t))return t.map((n,r)=>Array.isArray(n)?(K(n.length===2,"invalid slot set",`value[${r}]`,n),F6(n[0],n[1])):(K(n!=null&&typeof n=="object","invalid address-slot set","value",t),F6(n.address,n.storageKeys)));K(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(n=>{const r=t[n].reduce((i,a)=>(i[a]=!0,i),{});return F6(n,Object.keys(r).sort())});return e.sort((n,r)=>n.address.localeCompare(r.address)),e}function OZ(t){let e;return typeof t=="string"?e=MP.computePublicKey(t,!1):e=t.publicKey,fn(Sn("0x"+e.substring(4)).substring(26))}function TZ(t,e){return OZ(MP.recoverPublicKey(t,e))}const dr=BigInt(0),CZ=BigInt(2),kZ=BigInt(27),_Z=BigInt(28),NZ=BigInt(35),IZ=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function G2(t){return t==="0x"?null:fn(t)}function UP(t,e){try{return ph(t)}catch(n){K(!1,n.message,e,t)}}function iv(t,e){return t==="0x"?0:Bt(t,e)}function Yn(t,e){if(t==="0x")return dr;const n=et(t,e);return K(n<=IZ,"value exceeds uint size",e,n),n}function wn(t,e){const n=et(t,"value"),r=oi(n);return K(r.length<=32,"value too large",`tx.${e}`,n),r}function FP(t){return ph(t).map(e=>[e.address,e.storageKeys])}function RZ(t,e){K(Array.isArray(t),`invalid ${e}`,"value",t);for(let n=0;n=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,n=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,r=this.accessList!=null,i=v(this,nf)!=null||v(this,rf);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&ye(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),ye(!n||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),ye(this.type!==0||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const a=[];return this.type!=null?a.push(this.type):n?a.push(2):e?(a.push(1),r||a.push(0)):r?(a.push(1),a.push(2)):(i&&this.to||(a.push(0),a.push(1),a.push(2)),a.push(3)),a.sort(),a}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return mo.from(this)}toJSON(){const e=n=>n==null?null:n.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new mo;if(typeof e=="string"){const r=Jt(e);if(r[0]>=127)return mo.from(MZ(r));switch(r[0]){case 1:return mo.from(DZ(r));case 2:return mo.from(BZ(r));case 3:return mo.from(LZ(r))}ye(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const n=new mo;return e.type!=null&&(n.type=e.type),e.to!=null&&(n.to=e.to),e.nonce!=null&&(n.nonce=e.nonce),e.gasLimit!=null&&(n.gasLimit=e.gasLimit),e.gasPrice!=null&&(n.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(n.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(n.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(n.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(n.data=e.data),e.value!=null&&(n.value=e.value),e.chainId!=null&&(n.chainId=e.chainId),e.signature!=null&&(n.signature=xl.from(e.signature)),e.accessList!=null&&(n.accessList=e.accessList),e.blobVersionedHashes!=null&&(n.blobVersionedHashes=e.blobVersionedHashes),e.hash!=null&&(K(n.isSigned(),"unsigned transaction cannot define hash","tx",e),K(n.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(K(n.isSigned(),"unsigned transaction cannot define from","tx",e),K(n.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),n}},$o=new WeakMap,Kd=new WeakMap,Wd=new WeakMap,Jd=new WeakMap,Yd=new WeakMap,Xd=new WeakMap,Zd=new WeakMap,qd=new WeakMap,e0=new WeakMap,t0=new WeakMap,n0=new WeakMap,r0=new WeakMap,nf=new WeakMap,rf=new WeakMap,mo);const xL=new Uint8Array(32);xL.fill(0);const $Z=BigInt(-1),AL=BigInt(0),EL=BigInt(1),UZ=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function FZ(t){const e=Jt(t),n=e.length%32;return n?Xn([e,xL.slice(n)]):it(e)}const jZ=us(EL,32),zZ=us(AL,32),ek={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},j6=["name","version","chainId","verifyingContract","salt"];function tk(t){return function(e){return K(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const HZ={name:tk("name"),version:tk("version"),chainId:function(t){const e=et(t,"domain.chainId");return K(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):fd(e)},verifyingContract:function(t){try{return fn(t).toLowerCase()}catch{}K(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=Jt(t,"domain.salt");return K(e.length===32,'invalid domain value "salt"',"domain.salt",t),it(e)}};function z6(t){{const e=t.match(/^(u?)int(\d+)$/);if(e){const n=e[1]==="",r=parseInt(e[2]);K(r%8===0&&r!==0&&r<=256&&e[2]===String(r),"invalid numeric width","type",t);const i=Zg(UZ,n?r-1:r),a=n?(i+EL)*$Z:AL;return function(o){const s=et(o,"value");return K(s>=a&&s<=i,`value out-of-bounds for ${t}`,"value",s),us(n?hD(s,256):s,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const n=parseInt(e[1]);return K(n!==0&&n<=32&&e[1]===String(n),"invalid bytes width","type",t),function(r){const i=Jt(r);return K(i.length===n,`invalid length for ${t}`,"value",r),FZ(r)}}}switch(t){case"address":return function(e){return th(fn(e),32)};case"bool":return function(e){return e?jZ:zZ};case"bytes":return function(e){return Sn(e)};case"string":return function(e){return rh(e)}}return null}function nk(t,e){return`${t}(${e.map(({name:n,type:r})=>r+" "+n).join(",")})`}function Wv(t){const e=t.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}var pm,Bs,i0,a2,SL,Pi;let rk=(Pi=class{constructor(e){M(this,a2);R(this,"primaryType");M(this,pm,void 0);M(this,Bs,void 0);M(this,i0,void 0);O(this,Bs,new Map),O(this,i0,new Map);const n=new Map,r=new Map,i=new Map,a={};Object.keys(e).forEach(l=>{a[l]=e[l].map(({name:c,type:u})=>{let{base:f,index:h}=Wv(u);return f==="int"&&!e.int&&(f="int256"),f==="uint"&&!e.uint&&(f="uint256"),{name:c,type:f+(h||"")}}),n.set(l,new Set),r.set(l,[]),i.set(l,new Set)}),O(this,pm,JSON.stringify(a));for(const l in a){const c=new Set;for(const u of a[l]){K(!c.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(l)}`,"types",e),c.add(u.name);const f=Wv(u.type).base;K(f!==l,`circular type reference to ${JSON.stringify(f)}`,"types",e),!z6(f)&&(K(r.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),r.get(f).push(l),n.get(l).add(f))}}const o=Array.from(r.keys()).filter(l=>r.get(l).length===0);K(o.length!==0,"missing primary type","types",e),K(o.length===1,`ambiguous primary types or unused types: ${o.map(l=>JSON.stringify(l)).join(", ")}`,"types",e),gt(this,{primaryType:o[0]});function s(l,c){K(!c.has(l),`circular type reference to ${JSON.stringify(l)}`,"types",e),c.add(l);for(const u of n.get(l))if(r.has(u)){s(u,c);for(const f of c)i.get(f).add(u)}c.delete(l)}s(this.primaryType,new Set);for(const[l,c]of i){const u=Array.from(c);u.sort(),v(this,Bs).set(l,nk(l,a[l])+u.map(f=>nk(f,a[f])).join(""))}}get types(){return JSON.parse(v(this,pm))}getEncoder(e){let n=v(this,i0).get(e);return n||(n=ie(this,a2,SL).call(this,e),v(this,i0).set(e,n)),n}encodeType(e){const n=v(this,Bs).get(e);return K(n,`unknown type: ${JSON.stringify(e)}`,"name",e),n}encodeData(e,n){return this.getEncoder(e)(n)}hashStruct(e,n){return Sn(this.encodeData(e,n))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,n,r){if(z6(e))return r(e,n);const i=Wv(e).array;if(i)return K(i.count===-1||i.count===n.length,`array length mismatch; expected length ${i.count}`,"value",n),n.map(o=>this._visit(i.prefix,o,r));const a=this.types[e];if(a)return a.reduce((o,{name:s,type:l})=>(o[s]=this._visit(l,n[s],r),o),{});K(!1,`unknown type: ${e}`,"type",e)}visit(e,n){return this._visit(this.primaryType,e,n)}static from(e){return new Pi(e)}static getPrimaryType(e){return Pi.from(e).primaryType}static hashStruct(e,n,r){return Pi.from(n).hashStruct(e,r)}static hashDomain(e){const n=[];for(const r in e){if(e[r]==null)continue;const i=ek[r];K(i,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),n.push({name:r,type:i})}return n.sort((r,i)=>j6.indexOf(r.name)-j6.indexOf(i.name)),Pi.hashStruct("EIP712Domain",{EIP712Domain:n},e)}static encode(e,n,r){return Xn(["0x1901",Pi.hashDomain(e),Pi.from(n).hash(r)])}static hash(e,n,r){return Sn(Pi.encode(e,n,r))}static async resolveNames(e,n,r,i){e=Object.assign({},e);for(const s in e)e[s]==null&&delete e[s];const a={};e.verifyingContract&&!gn(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");const o=Pi.from(n);o.visit(r,(s,l)=>(s==="address"&&!gn(l,20)&&(a[l]="0x"),l));for(const s in a)a[s]=await i(s);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),r=o.visit(r,(s,l)=>s==="address"&&a[l]?a[l]:l),{domain:e,value:r}}static getPayload(e,n,r){Pi.hashDomain(e);const i={},a=[];j6.forEach(l=>{const c=e[l];c!=null&&(i[l]=HZ[l](c),a.push({name:l,type:ek[l]}))});const o=Pi.from(n);n=o.types;const s=Object.assign({},n);return K(s.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",n),s.EIP712Domain=a,o.encode(r),{types:s,domain:i,primaryType:o.primaryType,message:o.visit(r,(l,c)=>{if(l.match(/^bytes(\d*)/))return it(Jt(c));if(l.match(/^u?int/))return et(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return K(typeof c=="string","invalid string","value",c),c}K(!1,"unsupported type","type",l)})}}},pm=new WeakMap,Bs=new WeakMap,i0=new WeakMap,a2=new WeakSet,SL=function(e){{const i=z6(e);if(i)return i}const n=Wv(e).array;if(n){const i=n.prefix,a=this.getEncoder(i);return o=>{K(n.count===-1||n.count===o.length,`array length mismatch; expected length ${n.count}`,"value",o);let s=o.map(a);return v(this,Bs).has(i)&&(s=s.map(Sn)),Sn(Xn(s))}}const r=this.types[e];if(r){const i=rh(v(this,Bs).get(e));return a=>{const o=r.map(({name:s,type:l})=>{const c=this.getEncoder(l)(a[s]);return v(this,Bs).has(l)?Sn(c):c});return o.unshift(i),Xn(o)}}K(!1,`unknown type: ${e}`,"type",e)},Pi);function ci(t){const e=new Set;return t.forEach(n=>e.add(n)),Object.freeze(e)}const GZ="external public payable override",VZ=ci(GZ.split(" ")),PL="constant external internal payable private public pure view override",QZ=ci(PL.split(" ")),OL="constructor error event fallback function receive struct",TL=ci(OL.split(" ")),CL="calldata memory storage payable indexed",KZ=ci(CL.split(" ")),WZ="tuple returns",JZ=[OL,CL,WZ,PL].join(" "),YZ=ci(JZ.split(" ")),XZ={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},ZZ=new RegExp("^(\\s*)"),qZ=new RegExp("^([0-9]+)"),eq=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),kL=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),_L=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var vr,oo,gm,r3,qp;let Il=(qp=class{constructor(e){M(this,gm);M(this,vr,void 0);M(this,oo,void 0);O(this,vr,0),O(this,oo,e.slice())}get offset(){return v(this,vr)}get length(){return v(this,oo).length-v(this,vr)}clone(){return new qp(v(this,oo))}reset(){O(this,vr,0)}popKeyword(e){const n=this.peek();if(n.type!=="KEYWORD"||!e.has(n.text))throw new Error(`expected keyword ${n.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const n=this.peek();throw new Error(`expected ${e}; got ${n.type} ${JSON.stringify(n.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const n=ie(this,gm,r3).call(this,v(this,vr)+1,e.match+1);return O(this,vr,e.match+1),n}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const n=[];for(;v(this,vr)=v(this,oo).length)throw new Error("out-of-bounds");return v(this,oo)[v(this,vr)]}peekKeyword(e){const n=this.peekType("KEYWORD");return n!=null&&e.has(n)?n:null}peekType(e){if(this.length===0)return null;const n=this.peek();return n.type===e?n.text:null}pop(){const e=this.peek();return vs(this,vr)._++,e}toString(){const e=[];for(let n=v(this,vr);n`}},vr=new WeakMap,oo=new WeakMap,gm=new WeakSet,r3=function(e=0,n=0){return new qp(v(this,oo).slice(e,n).map(r=>Object.freeze(Object.assign({},r,{match:r.match-e,linkBack:r.linkBack-e,linkNext:r.linkNext-e}))))},qp);function ou(t){const e=[],n=o=>{const s=a0&&e[e.length-1].type==="NUMBER"){const f=e.pop().text;u=f+u,e[e.length-1].value=Bt(f)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(s=o.match(eq),s){if(l.text=s[1],a+=l.text.length,YZ.has(l.text)){l.type="KEYWORD";continue}if(l.text.match(_L)){l.type="TYPE";continue}l.type="ID";continue}if(s=o.match(qZ),s){l.text=s[1],l.type="NUMBER",a+=l.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${a}`)}return new Il(e.map(o=>Object.freeze(o)))}function ik(t,e){let n=[];for(const r in e.keys())t.has(r)&&n.push(r);if(n.length>1)throw new Error(`conflicting types: ${n.join(", ")}`)}function V2(t,e){if(e.peekKeyword(TL)){const n=e.pop().text;if(n!==t)throw new Error(`expected ${t}, got ${n}`)}return e.popType("ID")}function Al(t,e){const n=new Set;for(;;){const r=t.peekType("KEYWORD");if(r==null||e&&!e.has(r))break;if(t.pop(),n.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}function NL(t){let e=Al(t,QZ);return ik(e,ci("constant payable nonpayable".split(" "))),ik(e,ci("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function fl(t,e){return t.popParams().map(n=>gi.from(n,e))}function IL(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return et(t.pop().text);throw new Error("invalid gas")}return null}function ih(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const tq=new RegExp(/^(.*)\[([0-9]*)\]$/);function ak(t){const e=t.match(_L);if(K(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const n=parseInt(e[2]);K(n!==0&&n<=32,"invalid bytes length","type",t)}else if(e[3]){const n=parseInt(e[3]);K(n!==0&&n<=256&&n%8===0,"invalid numeric width","type",t)}return t}const kn={},$i=Symbol.for("_ethers_internal"),ok="_ParamTypeInternal",sk="_ErrorInternal",lk="_EventInternal",ck="_ConstructorInternal",uk="_FallbackInternal",fk="_FunctionInternal",hk="_StructInternal";var a0,zb,Oi;let gi=(Oi=class{constructor(e,n,r,i,a,o,s,l){M(this,a0);R(this,"name");R(this,"type");R(this,"baseType");R(this,"indexed");R(this,"components");R(this,"arrayLength");R(this,"arrayChildren");if(D2(e,kn,"ParamType"),Object.defineProperty(this,$i,{value:ok}),o&&(o=Object.freeze(o.slice())),i==="array"){if(s==null||l==null)throw new Error("")}else if(s!=null||l!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");gt(this,{name:n,type:r,baseType:i,indexed:a,components:o,arrayLength:s,arrayChildren:l})}format(e){if(e==null&&(e="sighash"),e==="json"){const r=this.name||"";if(this.isArray()){const a=JSON.parse(this.arrayChildren.format("json"));return a.name=r,a.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(a)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:r};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(a=>JSON.parse(a.format(e)))),JSON.stringify(i)}let n="";return this.isArray()?(n+=this.arrayChildren.format(e),n+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?n+="("+this.components.map(r=>r.format(e)).join(e==="full"?", ":",")+")":n+=this.type,e!=="sighash"&&(this.indexed===!0&&(n+=" indexed"),e==="full"&&this.name&&(n+=" "+this.name)),n}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,n){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map(i=>r.arrayChildren.walk(i,n))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const r=this;return e.map((i,a)=>r.components[a].walk(i,n))}return n(this.type,e)}async walkAsync(e,n){const r=[],i=[e];return ie(this,a0,zb).call(this,r,e,n,a=>{i[0]=a}),r.length&&await Promise.all(r),i[0]}static from(e,n){if(Oi.isParamType(e))return e;if(typeof e=="string")try{return Oi.from(ou(e),n)}catch{K(!1,"invalid param type","obj",e)}else if(e instanceof Il){let s="",l="",c=null;Al(e,ci(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(l="tuple",c=e.popParams().map(p=>Oi.from(p)),s=`tuple(${c.map(p=>p.format()).join(",")})`):(s=ak(e.popType("TYPE")),l=s);let u=null,f=null;for(;e.length&&e.peekType("BRACKET");){const p=e.pop();u=new Oi(kn,"",s,l,null,c,f,u),f=p.value,s+=p.text,l="array",c=null}let h=null;if(Al(e,KZ).has("indexed")){if(!n)throw new Error("");h=!0}const g=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Oi(kn,g,s,l,h,c,f,u)}const r=e.name;K(!r||typeof r=="string"&&r.match(kL),"invalid name","obj.name",r);let i=e.indexed;i!=null&&(K(n,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let a=e.type,o=a.match(tq);if(o){const s=parseInt(o[2]||"-1"),l=Oi.from({type:o[1],components:e.components});return new Oi(kn,r||"",a,"array",i,null,s,l)}if(a==="tuple"||a.startsWith("tuple(")||a.startsWith("(")){const s=e.components!=null?e.components.map(c=>Oi.from(c)):null;return new Oi(kn,r||"",a,"tuple",i,s,null,null)}return a=ak(e.type),new Oi(kn,r||"",a,a,i,null,null,null)}static isParamType(e){return e&&e[$i]===ok}},a0=new WeakSet,zb=function(e,n,r,i){if(this.isArray()){if(!Array.isArray(n))throw new Error("invalid array value");if(this.arrayLength!==-1&&n.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,s=n.slice();s.forEach((l,c)=>{var u;ie(u=o,a0,zb).call(u,e,l,r,f=>{s[c]=f})}),i(s);return}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(n))s=n.slice();else{if(n==null||typeof n!="object")throw new Error("invalid tuple value");s=o.map(l=>{if(!l.name)throw new Error("cannot use object value with unnamed components");if(!(l.name in n))throw new Error(`missing value for component ${l.name}`);return n[l.name]})}if(s.length!==this.components.length)throw new Error("array is wrong length");s.forEach((l,c)=>{var u;ie(u=o[c],a0,zb).call(u,e,l,r,f=>{s[c]=f})}),i(s);return}const a=r(this.type,n);a.then?e.push(async function(){i(await a)}()):i(a)},Oi),Q2=class i3{constructor(e,n,r){R(this,"type");R(this,"inputs");D2(e,kn,"Fragment"),r=Object.freeze(r.slice()),gt(this,{type:n,inputs:r})}static from(e){if(typeof e=="string"){try{i3.from(JSON.parse(e))}catch{}return i3.from(ou(e))}if(e instanceof Il)switch(e.peekKeyword(TL)){case"constructor":return Gb.from(e);case"error":return Cs.from(e);case"event":return Hb.from(e);case"fallback":case"receive":return dk.from(e);case"function":return Vb.from(e);case"struct":return H6.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Gb.from(e);case"error":return Cs.from(e);case"event":return Hb.from(e);case"fallback":case"receive":return dk.from(e);case"function":return Vb.from(e);case"struct":return H6.from(e)}ye(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}K(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Gb.isFragment(e)}static isError(e){return Cs.isFragment(e)}static isEvent(e){return Hb.isFragment(e)}static isFunction(e){return Vb.isFragment(e)}static isStruct(e){return H6.isFragment(e)}},K2=class extends Q2{constructor(n,r,i,a){super(n,r,a);R(this,"name");K(typeof i=="string"&&i.match(kL),"invalid identifier","name",i),a=Object.freeze(a.slice()),gt(this,{name:i})}};function f1(t,e){return"("+e.map(n=>n.format(t)).join(t==="full"?", ":",")+")"}let Cs=class ty extends K2{constructor(e,n,r){super(e,"error",n,r),Object.defineProperty(this,$i,{value:sk})}get selector(){return rh(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(e)))});const n=[];return e!=="sighash"&&n.push("error"),n.push(this.name+f1(e,this.inputs)),n.join(" ")}static from(e){if(ty.isFragment(e))return e;if(typeof e=="string")return ty.from(ou(e));if(e instanceof Il){const n=V2("error",e),r=fl(e);return ih(e),new ty(kn,n,r)}return new ty(kn,e.name,e.inputs?e.inputs.map(gi.from):[])}static isFragment(e){return e&&e[$i]===sk}},Hb=class Dh extends K2{constructor(n,r,i,a){super(n,"event",r,i);R(this,"anonymous");Object.defineProperty(this,$i,{value:lk}),gt(this,{anonymous:a})}get topicHash(){return rh(this.format("sighash"))}format(n){if(n==null&&(n="sighash"),n==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("event"),r.push(this.name+f1(n,this.inputs)),n!=="sighash"&&this.anonymous&&r.push("anonymous"),r.join(" ")}static getTopicHash(n,r){return r=(r||[]).map(a=>gi.from(a)),new Dh(kn,n,r,!1).topicHash}static from(n){if(Dh.isFragment(n))return n;if(typeof n=="string")try{return Dh.from(ou(n))}catch{K(!1,"invalid event fragment","obj",n)}else if(n instanceof Il){const r=V2("event",n),i=fl(n,!0),a=!!Al(n,ci(["anonymous"])).has("anonymous");return ih(n),new Dh(kn,r,i,a)}return new Dh(kn,n.name,n.inputs?n.inputs.map(r=>gi.from(r,!0)):[],!!n.anonymous)}static isFragment(n){return n&&n[$i]===lk}},Gb=class ny extends Q2{constructor(n,r,i,a,o){super(n,r,i);R(this,"payable");R(this,"gas");Object.defineProperty(this,$i,{value:ck}),gt(this,{payable:a,gas:o})}format(n){if(ye(n!=null&&n!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),n==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[`constructor${f1(n,this.inputs)}`];return this.payable&&r.push("payable"),this.gas!=null&&r.push(`@${this.gas.toString()}`),r.join(" ")}static from(n){if(ny.isFragment(n))return n;if(typeof n=="string")try{return ny.from(ou(n))}catch{K(!1,"invalid constuctor fragment","obj",n)}else if(n instanceof Il){Al(n,ci(["constructor"]));const r=fl(n),i=!!Al(n,VZ).has("payable"),a=IL(n);return ih(n),new ny(kn,"constructor",r,i,a)}return new ny(kn,"constructor",n.inputs?n.inputs.map(gi.from):[],!!n.payable,n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[$i]===ck}},dk=class Eu extends Q2{constructor(n,r,i){super(n,"fallback",r);R(this,"payable");Object.defineProperty(this,$i,{value:uk}),gt(this,{payable:i})}format(n){const r=this.inputs.length===0?"receive":"fallback";if(n==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:r,stateMutability:i})}return`${r}()${this.payable?" payable":""}`}static from(n){if(Eu.isFragment(n))return n;if(typeof n=="string")try{return Eu.from(ou(n))}catch{K(!1,"invalid fallback fragment","obj",n)}else if(n instanceof Il){const r=n.toString(),i=n.peekKeyword(ci(["fallback","receive"]));if(K(i,"type must be fallback or receive","obj",r),n.popKeyword(ci(["fallback","receive"]))==="receive"){const l=fl(n);return K(l.length===0,"receive cannot have arguments","obj.inputs",l),Al(n,ci(["payable"])),ih(n),new Eu(kn,[],!0)}let o=fl(n);o.length?K(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(l=>l.format("minimal")).join(", ")):o=[gi.from("bytes")];const s=NL(n);if(K(s==="nonpayable"||s==="payable","fallback cannot be constants","obj.stateMutability",s),Al(n,ci(["returns"])).has("returns")){const l=fl(n);K(l.length===1&&l[0].type==="bytes","invalid fallback outputs","obj.outputs",l.map(c=>c.format("minimal")).join(", "))}return ih(n),new Eu(kn,o,s==="payable")}if(n.type==="receive")return new Eu(kn,[],!0);if(n.type==="fallback"){const r=[gi.from("bytes")],i=n.stateMutability==="payable";return new Eu(kn,r,i)}K(!1,"invalid fallback description","obj",n)}static isFragment(n){return n&&n[$i]===uk}},Vb=class Lh extends K2{constructor(n,r,i,a,o,s){super(n,"function",r,a);R(this,"constant");R(this,"outputs");R(this,"stateMutability");R(this,"payable");R(this,"gas");Object.defineProperty(this,$i,{value:fk}),o=Object.freeze(o.slice()),gt(this,{constant:i==="view"||i==="pure",gas:s,outputs:o,payable:i==="payable",stateMutability:i})}get selector(){return rh(this.format("sighash")).substring(0,10)}format(n){if(n==null&&(n="sighash"),n==="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!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n))),outputs:this.outputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("function"),r.push(this.name+f1(n,this.inputs)),n!=="sighash"&&(this.stateMutability!=="nonpayable"&&r.push(this.stateMutability),this.outputs&&this.outputs.length&&(r.push("returns"),r.push(f1(n,this.outputs))),this.gas!=null&&r.push(`@${this.gas.toString()}`)),r.join(" ")}static getSelector(n,r){return r=(r||[]).map(a=>gi.from(a)),new Lh(kn,n,"view",r,[],null).selector}static from(n){if(Lh.isFragment(n))return n;if(typeof n=="string")try{return Lh.from(ou(n))}catch{K(!1,"invalid function fragment","obj",n)}else if(n instanceof Il){const i=V2("function",n),a=fl(n),o=NL(n);let s=[];Al(n,ci(["returns"])).has("returns")&&(s=fl(n));const l=IL(n);return ih(n),new Lh(kn,i,o,a,s,l)}let r=n.stateMutability;return r==null&&(r="payable",typeof n.constant=="boolean"?(r="view",n.constant||(r="payable",typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable"))):typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable")),new Lh(kn,n.name,r,n.inputs?n.inputs.map(gi.from):[],n.outputs?n.outputs.map(gi.from):[],n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[$i]===fk}},H6=class Qb extends K2{constructor(e,n,r){super(e,"struct",n,r),Object.defineProperty(this,$i,{value:hk})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return Qb.from(ou(e))}catch{K(!1,"invalid struct fragment","obj",e)}else if(e instanceof Il){const n=V2("struct",e),r=fl(e);return ih(e),new Qb(kn,n,r)}return new Qb(kn,e.name,e.inputs?e.inputs.map(gi.from):[])}static isFragment(e){return e&&e[$i]===hk}};const ko=new Map;ko.set(0,"GENERIC_PANIC");ko.set(1,"ASSERT_FALSE");ko.set(17,"OVERFLOW");ko.set(18,"DIVIDE_BY_ZERO");ko.set(33,"ENUM_RANGE_ERROR");ko.set(34,"BAD_STORAGE_DATA");ko.set(49,"STACK_UNDERFLOW");ko.set(50,"ARRAY_RANGE_ERROR");ko.set(65,"OUT_OF_MEMORY");ko.set(81,"UNINITIALIZED_FUNCTION_CALL");const nq=new RegExp(/^bytes([0-9]*)$/),rq=new RegExp(/^(u?int)([0-9]*)$/);let G6=null,pk=1024;function iq(t,e,n,r){let i="missing revert data",a=null;const o=null;let s=null;if(n){i="execution reverted";const c=Jt(n);if(n=it(n),c.length===0)i+=" (no data present; likely require(false) occurred",a="require(false)";else if(c.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(it(c.slice(0,4))==="0x08c379a0")try{a=r.decode(["string"],c.slice(4))[0],s={signature:"Error(string)",name:"Error",args:[a]},i+=`: ${JSON.stringify(a)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(it(c.slice(0,4))==="0x4e487b71")try{const u=Number(r.decode(["uint256"],c.slice(4))[0]);s={signature:"Panic(uint256)",name:"Panic",args:[u]},a=`Panic due to ${ko.get(u)||"UNKNOWN"}(${u})`,i+=`: ${a}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const l={to:e.to?fn(e.to):null,data:e.data||"0x"};return e.from&&(l.from=fn(e.from)),Zn(i,"CALL_EXCEPTION",{action:t,data:n,reason:a,transaction:l,invocation:o,revert:s})}var ac,$h,eg;let a3=(eg=class{constructor(){M(this,ac)}getDefaultValue(e){const n=e.map(i=>ie(this,ac,$h).call(this,gi.from(i)));return new Kv(n,"_").defaultValue()}encode(e,n){cD(n.length,e.length,"types/values length mismatch");const r=e.map(o=>ie(this,ac,$h).call(this,gi.from(o))),i=new Kv(r,"_"),a=new G5;return i.encode(a,n),a.data}decode(e,n,r){const i=e.map(o=>ie(this,ac,$h).call(this,gi.from(o)));return new Kv(i,"_").decode(new rY(n,r,pk))}static _setDefaultMaxInflation(e){K(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),pk=e}static defaultAbiCoder(){return G6==null&&(G6=new eg),G6}static getBuiltinCallException(e,n,r){return iq(e,n,r,eg.defaultAbiCoder())}},ac=new WeakSet,$h=function(e){if(e.isArray())return new NX(ie(this,ac,$h).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new Kv(e.components.map(r=>ie(this,ac,$h).call(this,r)),e.name);switch(e.baseType){case"address":return new kX(e.name);case"bool":return new IX(e.name);case"string":return new jX(e.name);case"bytes":return new RX(e.name);case"":return new DX(e.name)}let n=e.type.match(rq);if(n){let r=parseInt(n[2]||"256");return K(r!==0&&r<=256&&r%8===0,"invalid "+n[1]+" bit length","param",e),new FX(r/8,n[1]==="int",e.name)}if(n=e.type.match(nq),n){let r=parseInt(n[1]);return K(r!==0&&r<=32,"invalid bytes length","param",e),new MX(r,e.name)}K(!1,"invalid type","type",e.type)},eg),aq=class{constructor(e,n,r){R(this,"fragment");R(this,"name");R(this,"signature");R(this,"topic");R(this,"args");const i=e.name,a=e.format();gt(this,{fragment:e,name:i,signature:a,topic:n,args:r})}},oq=class{constructor(e,n,r,i){R(this,"fragment");R(this,"name");R(this,"args");R(this,"signature");R(this,"selector");R(this,"value");const a=e.name,o=e.format();gt(this,{fragment:e,name:a,args:r,signature:o,selector:n,value:i})}},sq=class{constructor(e,n,r){R(this,"fragment");R(this,"name");R(this,"args");R(this,"signature");R(this,"selector");const i=e.name,a=e.format();gt(this,{fragment:e,name:i,args:r,signature:a,selector:n})}},gk=class{constructor(e){R(this,"hash");R(this,"_isIndexed");gt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}};const yk={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},mk={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&yk[t.toString()]&&(e=yk[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var Uo,Fo,jo,Dr,o0,Kb,s0,Wb,$c;let zP=($c=class{constructor(e){M(this,o0);M(this,s0);R(this,"fragments");R(this,"deploy");R(this,"fallback");R(this,"receive");M(this,Uo,void 0);M(this,Fo,void 0);M(this,jo,void 0);M(this,Dr,void 0);let n=[];typeof e=="string"?n=JSON.parse(e):n=e,O(this,jo,new Map),O(this,Uo,new Map),O(this,Fo,new Map);const r=[];for(const o of n)try{r.push(Q2.from(o))}catch(s){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,s.message)}gt(this,{fragments:Object.freeze(r)});let i=null,a=!1;O(this,Dr,this.getAbiCoder()),this.fragments.forEach((o,s)=>{let l;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}gt(this,{deploy:o});return;case"fallback":o.inputs.length===0?a=!0:(K(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${s}]`,o),i=o,a=i.payable);return;case"function":l=v(this,jo);break;case"event":l=v(this,Fo);break;case"error":l=v(this,Uo);break;default:return}const c=o.format();l.has(c)||l.set(c,o)}),this.deploy||gt(this,{deploy:Gb.from("constructor()")}),gt(this,{fallback:i,receive:a})}format(e){const n=e?"minimal":"full";return this.fragments.map(i=>i.format(n))}formatJson(){const e=this.fragments.map(n=>n.format("json"));return JSON.stringify(e.map(n=>JSON.parse(n)))}getAbiCoder(){return a3.defaultAbiCoder()}getFunctionName(e){const n=ie(this,o0,Kb).call(this,e,null,!1);return K(n,"no matching function","key",e),n.name}hasFunction(e){return!!ie(this,o0,Kb).call(this,e,null,!1)}getFunction(e,n){return ie(this,o0,Kb).call(this,e,n||null,!0)}forEachFunction(e){const n=Array.from(v(this,jo).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;rr.localeCompare(i));for(let r=0;r1){const a=i.map(o=>JSON.stringify(o.format())).join(", ");K(!1,`ambiguous error description (i.e. ${a})`,"name",e)}return i[0]}if(e=Cs.from(e).format(),e==="Error(string)")return Cs.from("error Error(string)");if(e==="Panic(uint256)")return Cs.from("error Panic(uint256)");const r=v(this,Uo).get(e);return r||null}forEachError(e){const n=Array.from(v(this,Uo).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;ra.type==="string"?rh(o):a.type==="bytes"?Sn(it(o)):(a.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":a.type.match(/^u?int/)?o=us(o):a.type.match(/^bytes/)?o=LJ(o,32):a.type==="address"&&v(this,Dr).encode(["address"],[o]),th(it(o),32));for(n.forEach((a,o)=>{const s=e.inputs[o];if(!s.indexed){K(a==null,"cannot filter non-indexed parameters; must be null","contract."+s.name,a);return}a==null?r.push(null):s.baseType==="array"||s.baseType==="tuple"?K(!1,"filtering with tuples or arrays not supported","contract."+s.name,a):Array.isArray(a)?r.push(a.map(l=>i(s,l))):r.push(i(s,a))});r.length&&r[r.length-1]===null;)r.pop();return r}encodeEventLog(e,n){if(typeof e=="string"){const o=this.getEvent(e);K(o,"unknown event","eventFragment",e),e=o}const r=[],i=[],a=[];return e.anonymous||r.push(e.topicHash),K(n.length===e.inputs.length,"event arguments/values mismatch","values",n),e.inputs.forEach((o,s)=>{const l=n[s];if(o.indexed)if(o.type==="string")r.push(rh(l));else if(o.type==="bytes")r.push(Sn(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");r.push(v(this,Dr).encode([o.type],[l]))}else i.push(o),a.push(l)}),{data:v(this,Dr).encode(i,a),topics:r}}decodeEventLog(e,n,r){if(typeof e=="string"){const d=this.getEvent(e);K(d,"unknown event","eventFragment",e),e=d}if(r!=null&&!e.anonymous){const d=e.topicHash;K(gn(r[0],32)&&r[0].toLowerCase()===d,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const i=[],a=[],o=[];e.inputs.forEach((d,g)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(gi.from({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(a.push(d),o.push(!1))});const s=r!=null?v(this,Dr).decode(i,Xn(r)):null,l=v(this,Dr).decode(a,n,!0),c=[],u=[];let f=0,h=0;return e.inputs.forEach((d,g)=>{let p=null;if(d.indexed)if(s==null)p=new gk(null);else if(o[g])p=new gk(s[h++]);else try{p=s[h++]}catch(y){p=y}else try{p=l[f++]}catch(y){p=y}c.push(p),u.push(d.name||null)}),xD.fromItems(c,u)}parseTransaction(e){const n=Jt(e.data,"tx.data"),r=et(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(it(n.slice(0,4)));if(!i)return null;const a=v(this,Dr).decode(i.inputs,n.slice(4));return new oq(i,i.selector,a,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const n=this.getEvent(e.topics[0]);return!n||n.anonymous?null:new aq(n,n.topicHash,this.decodeEventLog(n,e.data,e.topics))}parseError(e){const n=it(e),r=this.getError(Un(n,0,4));if(!r)return null;const i=v(this,Dr).decode(r.inputs,Un(n,4));return new sq(r,r.selector,i)}static from(e){return e instanceof $c?e:typeof e=="string"?new $c(JSON.parse(e)):typeof e.format=="function"?new $c(e.format("json")):new $c(e)}},Uo=new WeakMap,Fo=new WeakMap,jo=new WeakMap,Dr=new WeakMap,o0=new WeakSet,Kb=function(e,n,r){if(gn(e)){const a=e.toLowerCase();for(const o of v(this,jo).values())if(a===o.selector)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of v(this,jo))o.split("(")[0]===e&&a.push(s);if(n){const o=n.length>0?n[n.length-1]:null;let s=n.length,l=!0;Di.isTyped(o)&&o.type==="overrides"&&(l=!1,s--);for(let c=a.length-1;c>=0;c--){const u=a[c].inputs.length;u!==s&&(!l||u!==s-1)&&a.splice(c,1)}for(let c=a.length-1;c>=0;c--){const u=a[c].inputs;for(let f=0;f=u.length){if(n[f].type==="overrides")continue;a.splice(c,1);break}if(n[f].type!==u[f].baseType){a.splice(c,1);break}}}}if(a.length===1&&n&&n.length!==a[0].inputs.length){const o=n[n.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&a.splice(0,1)}if(a.length===0)return null;if(a.length>1&&r){const o=a.map(s=>JSON.stringify(s.format())).join(", ");K(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return a[0]}const i=v(this,jo).get(Vb.from(e).format());return i||null},s0=new WeakSet,Wb=function(e,n,r){if(gn(e)){const a=e.toLowerCase();for(const o of v(this,Fo).values())if(a===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of v(this,Fo))o.split("(")[0]===e&&a.push(s);if(n){for(let o=a.length-1;o>=0;o--)a[o].inputs.length=0;o--){const s=a[o].inputs;for(let l=0;l1&&r){const o=a.map(s=>JSON.stringify(s.format())).join(", ");K(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return a[0]}const i=v(this,Fo).get(Hb.from(e).format());return i||null},$c);const RL=BigInt(0);function Oy(t){return t??null}function Kn(t){return t==null?null:t.toString()}let vk=class{constructor(e,n,r){R(this,"gasPrice");R(this,"maxFeePerGas");R(this,"maxPriorityFeePerGas");gt(this,{gasPrice:Oy(e),maxFeePerGas:Oy(n),maxPriorityFeePerGas:Oy(r)})}toJSON(){const{gasPrice:e,maxFeePerGas:n,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:Kn(e),maxFeePerGas:Kn(n),maxPriorityFeePerGas:Kn(r)}}};function Xw(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=it(t.data));const n="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=et(t[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)!(i in t)||t[i]==null||(e[i]=Bt(t[i],`request.${i}`));return t.accessList&&(e.accessList=ph(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),e}var Ds,YR;let lq=(YR=class{constructor(e,n){R(this,"provider");R(this,"number");R(this,"hash");R(this,"timestamp");R(this,"parentHash");R(this,"parentBeaconBlockRoot");R(this,"nonce");R(this,"difficulty");R(this,"gasLimit");R(this,"gasUsed");R(this,"stateRoot");R(this,"receiptsRoot");R(this,"blobGasUsed");R(this,"excessBlobGas");R(this,"miner");R(this,"extraData");R(this,"baseFeePerGas");M(this,Ds,void 0);O(this,Ds,e.transactions.map(r=>typeof r!="string"?new HP(r,n):r)),gt(this,{provider:n,hash:Oy(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,extraData:e.extraData,baseFeePerGas:Oy(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return v(this,Ds).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=v(this,Ds).slice();return e.length===0?[]:(ye(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:n,extraData:r,gasLimit:i,gasUsed:a,hash:o,miner:s,nonce:l,number:c,parentHash:u,parentBeaconBlockRoot:f,stateRoot:h,receiptsRoot:d,timestamp:g,transactions:p}=this;return{_type:"Block",baseFeePerGas:Kn(e),difficulty:Kn(n),extraData:r,gasLimit:Kn(i),gasUsed:Kn(a),blobGasUsed:Kn(this.blobGasUsed),excessBlobGas:Kn(this.excessBlobGas),hash:o,miner:s,nonce:l,number:c,parentHash:u,timestamp:g,parentBeaconBlockRoot:f,stateRoot:h,receiptsRoot:d,transactions:p}}[Symbol.iterator](){let e=0;const n=this.transactions;return{next:()=>enew av(i,n))));let r=RL;e.effectiveGasPrice!=null?r=e.effectiveGasPrice:e.gasPrice!=null&&(r=e.gasPrice),gt(this,{provider:n,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:r,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return v(this,ym)}toJSON(){const{to:e,from:n,contractAddress:r,hash:i,index:a,blockHash:o,blockNumber:s,logsBloom:l,logs:c,status:u,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:s,contractAddress:r,cumulativeGasUsed:Kn(this.cumulativeGasUsed),from:n,gasPrice:Kn(this.gasPrice),blobGasUsed:Kn(this.blobGasUsed),blobGasPrice:Kn(this.blobGasPrice),gasUsed:Kn(this.gasUsed),hash:i,index:a,logs:c,logsBloom:l,root:f,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(s)return null;const{blockNumber:h,nonce:d}=await ti({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(d{if(h==null||h.status!==0)return h;ye(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:h.to,from:h.from,data:""},receipt:h})},u=await this.provider.getTransactionReceipt(this.hash);if(r===0)return c(u);if(u){if(await u.confirmations()>=r)return c(u)}else if(await l(),r===0)return null;return await new Promise((h,d)=>{const g=[],p=()=>{g.forEach(m=>m())};if(g.push(()=>{s=!0}),i>0){const m=setTimeout(()=>{p(),d(Zn("wait for transaction timeout","TIMEOUT"))},i);g.push(()=>{clearTimeout(m)})}const y=async m=>{if(await m.confirmations()>=r){p();try{h(c(m))}catch(b){d(b)}}};if(g.push(()=>{this.provider.off(this.hash,y)}),this.provider.on(this.hash,y),a>=0){const m=async()=>{try{await l()}catch(b){if(Qr(b,"TRANSACTION_REPLACED")){p(),d(b);return}}s||this.provider.once("block",m)};g.push(()=>{this.provider.off("block",m)}),this.provider.once("block",m)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return ye(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),DL(this)}reorderedEvent(e){return ye(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ye(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),BL(this,e)}replaceableTransaction(e){K(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const n=new mm(this,this.provider);return O(n,oc,e),n}},oc=new WeakMap,mm);function cq(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function BL(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function DL(t){return{orphan:"drop-transaction",tx:t}}function uq(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}let GP=class extends av{constructor(n,r,i){super(n,n.provider);R(this,"interface");R(this,"fragment");R(this,"args");const a=r.decodeEventLog(i,n.data,n.topics);gt(this,{args:a,fragment:i,interface:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}},LL=class extends av{constructor(n,r){super(n,n.provider);R(this,"error");gt(this,{error:r})}};var l0,ZR;let fq=(ZR=class extends ML{constructor(n,r,i){super(i,r);M(this,l0,void 0);O(this,l0,n)}get logs(){return super.logs.map(n=>{const r=n.topics.length?v(this,l0).getEvent(n.topics[0]):null;if(r)try{return new GP(n,v(this,l0),r)}catch(i){return new LL(n,i)}return n})}},l0=new WeakMap,ZR);var vm,qR;let VP=(qR=class extends HP{constructor(n,r,i){super(i,r);M(this,vm,void 0);O(this,vm,n)}async wait(n,r){const i=await super.wait(n,r);return i==null?null:new fq(v(this,vm),this.provider,i)}},vm=new WeakMap,qR),$L=class extends dD{constructor(n,r,i,a){super(n,r,i);R(this,"log");gt(this,{log:a})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}},hq=class extends $L{constructor(e,n,r,i,a){super(e,n,r,new GP(a,e.interface,i));const o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);gt(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}};const bk=BigInt(0);function UL(t){return t&&typeof t.call=="function"}function FL(t){return t&&typeof t.estimateGas=="function"}function W2(t){return t&&typeof t.resolveName=="function"}function jL(t){return t&&typeof t.sendTransaction=="function"}function zL(t){if(t!=null){if(W2(t))return t;if(t.provider)return t.provider}}var bm,eM;let dq=(eM=class{constructor(e,n,r){M(this,bm,void 0);R(this,"fragment");if(gt(this,{fragment:n}),n.inputs.lengthr[l]==null?null:s.walkAsync(r[l],(u,f)=>u==="address"?Array.isArray(f)?Promise.all(f.map(h=>li(h,a))):li(f,a):f)));return e.interface.encodeFilterTopics(n,o)}())}getTopicFilter(){return v(this,bm)}},bm=new WeakMap,eM);function ah(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function $u(t){return t==null?null:t.provider||null}async function QP(t,e){const n=Di.dereference(t,"overrides");K(typeof n=="object","invalid overrides parameter","overrides",t);const r=Xw(n);return K(r.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),K(r.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=r.from),r}async function HL(t,e,n){const r=ah(t,"resolveName"),i=W2(r)?r:null;return await Promise.all(e.map((a,o)=>a.walkAsync(n[o],(s,l)=>(l=Di.dereference(l,s),s==="address"?li(l,i):l))))}function pq(t){const e=async function(o){const s=await QP(o,["data"]);s.to=await t.getAddress(),s.from&&(s.from=await li(s.from,zL(t.runner)));const l=t.interface,c=et(s.value||bk,"overrides.value")===bk,u=(s.data||"0x")==="0x";l.fallback&&!l.fallback.payable&&l.receive&&!u&&!c&&K(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),K(l.fallback||u,"cannot send data to receive-only contract","overrides.data",s.data);const f=l.receive||l.fallback&&l.fallback.payable;return K(f||c,"cannot send value to non-payable fallback","overrides.value",s.value),K(l.fallback||u,"cannot send data to receive-only contract","overrides.data",s.data),s},n=async function(o){const s=ah(t.runner,"call");ye(UL(s),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const l=await e(o);try{return await s.call(l)}catch(c){throw EP(c)&&c.data?t.interface.makeError(c.data,l):c}},r=async function(o){const s=t.runner;ye(jL(s),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const l=await s.sendTransaction(await e(o)),c=$u(t.runner);return new VP(t.interface,c,l)},i=async function(o){const s=ah(t.runner,"estimateGas");return ye(FL(s),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await s.estimateGas(await e(o))},a=async o=>await r(o);return gt(a,{_contract:t,estimateGas:i,populateTransaction:e,send:r,staticCall:n}),a}function gq(t,e){const n=function(...c){const u=t.interface.getFunction(e,c);return ye(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:c}}),u},r=async function(...c){const u=n(...c);let f={};if(u.inputs.length+1===c.length&&(f=await QP(c.pop()),f.from&&(f.from=await li(f.from,zL(t.runner)))),u.inputs.length!==c.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const h=await HL(t.runner,u.inputs,c);return Object.assign({},f,await ti({to:t.getAddress(),data:t.interface.encodeFunctionData(u,h)}))},i=async function(...c){const u=await s(...c);return u.length===1?u[0]:u},a=async function(...c){const u=t.runner;ye(jL(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await u.sendTransaction(await r(...c)),h=$u(t.runner);return new VP(t.interface,h,f)},o=async function(...c){const u=ah(t.runner,"estimateGas");return ye(FL(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await r(...c))},s=async function(...c){const u=ah(t.runner,"call");ye(UL(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await r(...c);let h="0x";try{h=await u.call(f)}catch(g){throw EP(g)&&g.data?t.interface.makeError(g.data,f):g}const d=n(...c);return t.interface.decodeFunctionResult(d,h)},l=async(...c)=>n(...c).constant?await i(...c):await a(...c);return gt(l,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:n,estimateGas:o,populateTransaction:r,send:a,staticCall:i,staticCallResult:s}),Object.defineProperty(l,"fragment",{configurable:!1,enumerable:!0,get:()=>{const c=t.interface.getFunction(e);return ye(c,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),c}}),l}function yq(t,e){const n=function(...i){const a=t.interface.getEvent(e,i);return ye(a,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),a},r=function(...i){return new dq(t,n(...i),i)};return gt(r,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:n}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=t.interface.getEvent(e);return ye(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),r}const Zw=Symbol.for("_ethersInternal_contract"),GL=new WeakMap;function mq(t,e){GL.set(t[Zw],e)}function Qi(t){return GL.get(t[Zw])}function vq(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function KP(t,e){let n,r=null;if(Array.isArray(e)){const a=function(o){if(gn(o,32))return o;const s=t.interface.getEvent(o);return K(s,"unknown fragment","name",o),s.topicHash};n=e.map(o=>o==null?null:Array.isArray(o)?o.map(a):a(o))}else e==="*"?n=[null]:typeof e=="string"?gn(e,32)?n=[e]:(r=t.interface.getEvent(e),K(r,"unknown fragment","event",e),n=[r.topicHash]):vq(e)?n=await e.getTopicFilter():"fragment"in e?(r=e.fragment,n=[r.topicHash]):K(!1,"unknown event name","event",e);n=n.map(a=>{if(a==null)return null;if(Array.isArray(a)){const o=Array.from(new Set(a.map(s=>s.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return a.toLowerCase()});const i=n.map(a=>a==null?"null":Array.isArray(a)?a.join("|"):a).join("&");return{fragment:r,tag:i,topics:n}}async function ry(t,e){const{subs:n}=Qi(t);return n.get((await KP(t,e)).tag)||null}async function wk(t,e,n){const r=$u(t.runner);ye(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:a,topics:o}=await KP(t,n),{addr:s,subs:l}=Qi(t);let c=l.get(a);if(!c){const f={address:s||t,topics:o},h=y=>{let m=i;if(m==null)try{m=t.interface.getEvent(y.topics[0])}catch{}if(m){const b=m,x=i?t.interface.decodeEventLog(i,y.data,y.topics):[];s3(t,n,x,A=>new hq(t,A,n,b,y))}else s3(t,n,[],b=>new $L(t,b,n,y))};let d=[];c={tag:a,listeners:[],start:()=>{d.length||d.push(r.on(f,h))},stop:async()=>{if(d.length==0)return;let y=d;d=[],await Promise.all(y),r.off(f,h)}},l.set(a,c)}return c}let o3=Promise.resolve();async function bq(t,e,n,r){await o3;const i=await ry(t,e);if(!i)return!1;const a=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:s})=>{const l=Array.from(n);r&&l.push(r(s?null:o));try{o.call(t,...l)}catch{}return!s}),i.listeners.length===0&&(i.stop(),Qi(t).subs.delete(i.tag)),a>0}async function s3(t,e,n,r){try{await o3}catch{}const i=bq(t,e,n,r);return o3=i,await i}const Jv=["then"];var gPe,Wf;let l3=(Wf=class{constructor(e,n,r,i){R(this,"target");R(this,"interface");R(this,"runner");R(this,"filters");R(this,gPe);R(this,"fallback");K(typeof e=="string"||JD(e),"invalid value for Contract target","target",e),r==null&&(r=null);const a=zP.from(n);gt(this,{target:e,runner:r,interface:a}),Object.defineProperty(this,Zw,{value:{}});let o,s=null,l=null;if(i){const f=$u(r);l=new VP(this.interface,f,i)}let c=new Map;if(typeof e=="string")if(gn(e))s=e,o=Promise.resolve(e);else{const f=ah(r,"resolveName");if(!W2(f))throw Zn("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=f.resolveName(e).then(h=>{if(h==null)throw Zn("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Qi(this).addr=h,h})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return Qi(this).addr=f,f});mq(this,{addrPromise:o,addr:s,deployTx:l,subs:c});const u=new Proxy({},{get:(f,h,d)=>{if(typeof h=="symbol"||Jv.indexOf(h)>=0)return Reflect.get(f,h,d);try{return this.getEvent(h)}catch(g){if(!Qr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(f,h)=>Jv.indexOf(h)>=0?Reflect.has(f,h):Reflect.has(f,h)||this.interface.hasEvent(String(h))});return gt(this,{filters:u}),gt(this,{fallback:a.receive||a.fallback?pq(this):null}),new Proxy(this,{get:(f,h,d)=>{if(typeof h=="symbol"||h in f||Jv.indexOf(h)>=0)return Reflect.get(f,h,d);try{return f.getFunction(h)}catch(g){if(!Qr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(f,h)=>typeof h=="symbol"||h in f||Jv.indexOf(h)>=0?Reflect.has(f,h):f.interface.hasFunction(h)})}connect(e){return new Wf(this.target,this.interface,e)}attach(e){return new Wf(e,this.interface,this.runner)}async getAddress(){return await Qi(this).addrPromise}async getDeployedCode(){const e=$u(this.runner);ye(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const n=await e.getCode(await this.getAddress());return n==="0x"?null:n}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=$u(this.runner);return ye(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,a)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);r.once("block",o)}catch(s){a(s)}};o()})}deploymentTransaction(){return Qi(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),gq(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),yq(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,n,r){n==null&&(n=0),r==null&&(r="latest");const{addr:i,addrPromise:a}=Qi(this),o=i||await a,{fragment:s,topics:l}=await KP(this,e),c={address:o,topics:l,fromBlock:n,toBlock:r},u=$u(this.runner);return ye(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(c)).map(f=>{let h=s;if(h==null)try{h=this.interface.getEvent(f.topics[0])}catch{}if(h)try{return new GP(f,this.interface,h)}catch(d){return new LL(f,d)}return new av(f,u)})}async on(e,n){const r=await wk(this,"on",e);return r.listeners.push({listener:n,once:!1}),r.start(),this}async once(e,n){const r=await wk(this,"once",e);return r.listeners.push({listener:n,once:!0}),r.start(),this}async emit(e,...n){return await s3(this,e,n,null)}async listenerCount(e){if(e){const i=await ry(this,e);return i?i.listeners.length:0}const{subs:n}=Qi(this);let r=0;for(const{listeners:i}of n.values())r+=i.length;return r}async listeners(e){if(e){const i=await ry(this,e);return i?i.listeners.map(({listener:a})=>a):[]}const{subs:n}=Qi(this);let r=[];for(const{listeners:i}of n.values())r=r.concat(i.map(({listener:a})=>a));return r}async off(e,n){const r=await ry(this,e);if(!r)return this;if(n){const i=r.listeners.map(({listener:a})=>a).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(n==null||r.listeners.length===0)&&(r.stop(),Qi(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){const n=await ry(this,e);if(!n)return this;n.stop(),Qi(this).subs.delete(n.tag)}else{const{subs:n}=Qi(this);for(const{tag:r,stop:i}of n.values())i(),n.delete(r)}return this}async addListener(e,n){return await this.on(e,n)}async removeListener(e,n){return await this.off(e,n)}static buildClass(e){class n extends Wf{constructor(i,a=null){super(i,e,a)}}return n}static from(e,n,r){return r==null&&(r=null),new this(e,n,r)}},gPe=Zw,Wf);function wq(){return l3}let _d=class extends wq(){};class WP{constructor(e,n,r){R(this,"interface");R(this,"bytecode");R(this,"runner");const i=zP.from(e);n instanceof Uint8Array||(typeof n=="object"&&(n=n.object),n.startsWith("0x")||(n="0x"+n)),n=it(Jt(n)),gt(this,{bytecode:n,interface:i,runner:r||null})}attach(e){return new l3(e,this.interface,this.runner)}async getDeployTransaction(...e){let n={};const r=this.interface.deploy;if(r.inputs.length+1===e.length&&(n=await QP(e.pop())),r.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const i=await HL(this.runner,r.inputs,e),a=Xn([this.bytecode,this.interface.encodeDeploy(i)]);return Object.assign({},n,{data:a})}async deploy(...e){const n=await this.getDeployTransaction(...e);ye(this.runner&&typeof this.runner.sendTransaction=="function","factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const r=await this.runner.sendTransaction(n),i=WD(r);return new l3(i,this.interface,this.runner,r)}connect(e){return new WP(this.interface,this.bytecode,e)}static fromSolidity(e,n){K(e!=null,"bad compiler output","output",e),typeof e=="string"&&(e=JSON.parse(e));const r=e.abi;let i="";return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(r,i,n)}}function V6(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):K(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}let xq=class{constructor(e){R(this,"name");gt(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,n){throw new Error("unsupported coin")}async decodeAddress(e,n){throw new Error("unsupported coin")}};const VL=new RegExp("^(ipfs)://(.*)$","i"),xk=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),VL,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var sc,af,lc,Uh,o2,Xc,QL;let Ak=(Xc=class{constructor(e,n,r){M(this,lc);R(this,"provider");R(this,"address");R(this,"name");M(this,sc,void 0);M(this,af,void 0);gt(this,{provider:e,address:n,name:r}),O(this,sc,null),O(this,af,new _d(n,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return v(this,sc)==null&&O(this,sc,(async()=>{try{return await v(this,af).supportsInterface("0x9061b923")}catch(e){if(Qr(e,"CALL_EXCEPTION"))return!1;throw O(this,sc,null),e}})()),await v(this,sc)}async getAddress(e){if(e==null&&(e=60),e===60)try{const a=await ie(this,lc,Uh).call(this,"addr(bytes32)");return a==null||a===o1?null:a}catch(a){if(Qr(a,"CALL_EXCEPTION"))return null;throw a}if(e>=0&&e<2147483648){let a=e+2147483648;const o=await ie(this,lc,Uh).call(this,"addr(bytes32,uint)",[a]);if(gn(o,20))return fn(o)}let n=null;for(const a of this.provider.plugins)if(a instanceof xq&&a.supportsCoinType(e)){n=a;break}if(n==null)return null;const r=await ie(this,lc,Uh).call(this,"addr(bytes32,uint)",[e]);if(r==null||r==="0x")return null;const i=await n.decodeAddress(e,r);if(i!=null)return i;ye(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:r}})}async getText(e){const n=await ie(this,lc,Uh).call(this,"text(bytes32,string)",[e]);return n==null||n==="0x"?null:n}async getContentHash(){const e=await ie(this,lc,Uh).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const n=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(n){const i=n[1]==="e3010170"?"ipfs":"ipns",a=parseInt(n[4],16);if(n[5].length===a*2)return`${i}://${FJ("0x"+n[2])}`}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&r[1].length===64)return`bzz://${r[1]}`;ye(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const n=await this.getText("avatar");if(n==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:n});for(let r=0;r{if(e&&n==null)return null;if(!Array.isArray(n))throw new Error("not an array");return n.map(r=>t(r))}}function ov(t,e){return n=>{const r={};for(const i in t){let a=i;if(e&&i in e&&!(a in n)){for(const o of e[i])if(o in n){a=o;break}}try{const o=t[i](n[a]);o!==void 0&&(r[i]=o)}catch(o){const s=o instanceof Error?o.message:"not-an-error";ye(!1,`invalid value for value.${i} (${s})`,"BAD_DATA",{value:n})}}return r}}function Aq(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}K(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Pp(t){return K(gn(t,!0),"invalid data","value",t),t}function Vr(t){return K(gn(t,32),"invalid hash","value",t),t}const Eq=ov({address:fn,blockHash:Vr,blockNumber:Bt,data:Pp,index:Bt,removed:Kt(Aq,!1),topics:J2(Vr),transactionHash:Vr,transactionIndex:Bt},{index:["logIndex"]});function Sq(t){return Eq(t)}const Pq=ov({hash:Kt(Vr),parentHash:Vr,parentBeaconBlockRoot:Kt(Vr,null),number:Bt,timestamp:Bt,nonce:Kt(Pp),difficulty:et,gasLimit:et,gasUsed:et,stateRoot:Kt(Vr,null),receiptsRoot:Kt(Vr,null),blobGasUsed:Kt(et,null),excessBlobGas:Kt(et,null),miner:Kt(fn),extraData:Pp,baseFeePerGas:Kt(et)});function Oq(t){const e=Pq(t);return e.transactions=t.transactions.map(n=>typeof n=="string"?n:KL(n)),e}const Tq=ov({transactionIndex:Bt,blockNumber:Bt,transactionHash:Vr,address:fn,topics:J2(Vr),data:Pp,index:Bt,blockHash:Vr},{index:["logIndex"]});function Cq(t){return Tq(t)}const kq=ov({to:Kt(fn,null),from:Kt(fn,null),contractAddress:Kt(fn,null),index:Bt,root:Kt(it),gasUsed:et,blobGasUsed:Kt(et,null),logsBloom:Kt(Pp),blockHash:Vr,hash:Vr,logs:J2(Cq),blockNumber:Bt,cumulativeGasUsed:et,effectiveGasPrice:Kt(et),blobGasPrice:Kt(et,null),status:Kt(Bt),type:Kt(Bt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function _q(t){return kq(t)}function KL(t){t.to&&et(t.to)===Ek&&(t.to="0x0000000000000000000000000000000000000000");const e=ov({hash:Vr,index:Kt(Bt,void 0),type:n=>n==="0x"||n==null?0:Bt(n),accessList:Kt(ph,null),blobVersionedHashes:Kt(J2(Vr,!0),null),blockHash:Kt(Vr,null),blockNumber:Kt(Bt,null),transactionIndex:Kt(Bt,null),from:fn,gasPrice:Kt(et),maxPriorityFeePerGas:Kt(et),maxFeePerGas:Kt(et),maxFeePerBlobGas:Kt(et,null),gasLimit:et,to:Kt(fn,null),value:et,nonce:Bt,data:Pp,creates:Kt(fn,null),chainId:Kt(et,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=WD(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=xl.from(t.signature):e.signature=xl.from(t),e.chainId==null){const n=e.signature.legacyChainId;n!=null&&(e.chainId=n)}return e.blockHash&&et(e.blockHash)===Ek&&(e.blockHash=null),e}const Nq="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";let JP=class WL{constructor(e){R(this,"name");gt(this,{name:e})}clone(){return new WL(this.name)}},JL=class YL extends JP{constructor(n,r){n==null&&(n=0);super(`org.ethers.network.plugins.GasCost#${n||0}`);R(this,"effectiveBlock");R(this,"txBase");R(this,"txCreate");R(this,"txDataZero");R(this,"txDataNonzero");R(this,"txAccessListStorageKey");R(this,"txAccessListAddress");const i={effectiveBlock:n};function a(o,s){let l=(r||{})[o];l==null&&(l=s),K(typeof l=="number",`invalud value for ${o}`,"costs",r),i[o]=l}a("txBase",21e3),a("txCreate",32e3),a("txDataZero",4),a("txDataNonzero",16),a("txAccessListStorageKey",1900),a("txAccessListAddress",2400),gt(this,i)}clone(){return new YL(this.effectiveBlock,this)}},XL=class ZL extends JP{constructor(n,r){super("org.ethers.plugins.network.Ens");R(this,"address");R(this,"targetNetwork");gt(this,{address:n||Nq,targetNetwork:r??1})}clone(){return new ZL(this.address,this.targetNetwork)}};var wm,xm,tM;let Iq=(tM=class extends JP{constructor(n,r){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");M(this,wm,void 0);M(this,xm,void 0);O(this,wm,n),O(this,xm,r)}get url(){return v(this,wm)}get processFunc(){return v(this,xm)}clone(){return this}},wm=new WeakMap,xm=new WeakMap,tM);const Q6=new Map;var c0,u0,cc,Uc;let Bc=(Uc=class{constructor(e,n){M(this,c0,void 0);M(this,u0,void 0);M(this,cc,void 0);O(this,c0,e),O(this,u0,et(n)),O(this,cc,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return v(this,c0)}set name(e){O(this,c0,e)}get chainId(){return v(this,u0)}set chainId(e){O(this,u0,et(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===et(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===et(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===et(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(v(this,cc).values())}attachPlugin(e){if(v(this,cc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return v(this,cc).set(e.name,e.clone()),this}getPlugin(e){return v(this,cc).get(e)||null}getPlugins(e){return this.plugins.filter(n=>n.name.split("#")[0]===e)}clone(){const e=new Uc(this.name,this.chainId);return this.plugins.forEach(n=>{e.attachPlugin(n.clone())}),e}computeIntrinsicGas(e){const n=this.getPlugin("org.ethers.plugins.network.GasCost")||new JL;let r=n.txBase;if(e.to==null&&(r+=n.txCreate),e.data)for(let i=2;i9){let i=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||i++,r[1]=i.toString()}return BigInt(r[0]+r[1])}function Pk(t){return new Iq(t,async(e,n,r)=>{r.setHeader("User-Agent","ethers");let i;try{const[a,o]=await Promise.all([r.send(),e()]);i=a;const s=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:Sk(s.maxFee,9),maxPriorityFeePerGas:Sk(s.maxPriorityFee,9)}}catch(a){ye(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:i,error:a})}})}let Ok=!1;function Rq(){if(Ok)return;Ok=!0;function t(e,n,r){const i=function(){const a=new Bc(e,n);return r.ensNetwork!=null&&a.attachPlugin(new XL(null,r.ensNetwork)),a.attachPlugin(new JL),(r.plugins||[]).forEach(o=>{a.attachPlugin(o)}),a};Bc.register(e,i),Bc.register(n,i),r.altNames&&r.altNames.forEach(a=>{Bc.register(a,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("holesky",17e3,{ensNetwork:17e3}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("arbitrum-sepolia",421614,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("matic",137,{ensNetwork:1,plugins:[Pk("https://gasstation.polygon.technology/v2")]}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[Pk("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("optimism-sepolia",11155420,{}),t("xdai",100,{ensNetwork:1})}function c3(t){return JSON.parse(JSON.stringify(t))}var Ls,Aa,uc,zo,f0,Jb,nM;let Mq=(nM=class{constructor(e){M(this,f0);M(this,Ls,void 0);M(this,Aa,void 0);M(this,uc,void 0);M(this,zo,void 0);O(this,Ls,e),O(this,Aa,null),O(this,uc,4e3),O(this,zo,-2)}get pollingInterval(){return v(this,uc)}set pollingInterval(e){O(this,uc,e)}start(){v(this,Aa)||(O(this,Aa,v(this,Ls)._setTimeout(ie(this,f0,Jb).bind(this),v(this,uc))),ie(this,f0,Jb).call(this))}stop(){v(this,Aa)&&(v(this,Ls)._clearTimeout(v(this,Aa)),O(this,Aa,null))}pause(e){this.stop(),e&&O(this,zo,-2)}resume(){this.start()}},Ls=new WeakMap,Aa=new WeakMap,uc=new WeakMap,zo=new WeakMap,f0=new WeakSet,Jb=async function(){try{const e=await v(this,Ls).getBlockNumber();if(v(this,zo)===-2){O(this,zo,e);return}if(e!==v(this,zo)){for(let n=v(this,zo)+1;n<=e;n++){if(v(this,Aa)==null)return;await v(this,Ls).emit("block",n)}O(this,zo,e)}}catch{}v(this,Aa)!=null&&O(this,Aa,v(this,Ls)._setTimeout(ie(this,f0,Jb).bind(this),v(this,uc)))},nM);var of,sf,fc,rM;let YP=(rM=class{constructor(e){M(this,of,void 0);M(this,sf,void 0);M(this,fc,void 0);O(this,of,e),O(this,fc,!1),O(this,sf,n=>{this._poll(n,v(this,of))})}async _poll(e,n){throw new Error("sub-classes must override this")}start(){v(this,fc)||(O(this,fc,!0),v(this,sf).call(this,-2),v(this,of).on("block",v(this,sf)))}stop(){v(this,fc)&&(O(this,fc,!1),v(this,of).off("block",v(this,sf)))}pause(e){this.stop()}resume(){this.start()}},of=new WeakMap,sf=new WeakMap,fc=new WeakMap,rM);var h0,$s,iM;let Bq=(iM=class extends YP{constructor(n,r){super(n);M(this,h0,void 0);M(this,$s,void 0);O(this,h0,r),O(this,$s,-2)}pause(n){n&&O(this,$s,-2),super.pause(n)}async _poll(n,r){const i=await r.getBlock(v(this,h0));i!=null&&(v(this,$s)===-2?O(this,$s,i.number):i.number>v(this,$s)&&(r.emit(v(this,h0),i.number),O(this,$s,i.number)))}},h0=new WeakMap,$s=new WeakMap,iM);var s2,aM;let Dq=(aM=class extends YP{constructor(n,r){super(n);M(this,s2,void 0);O(this,s2,c3(r))}async _poll(n,r){throw new Error("@TODO")}},s2=new WeakMap,aM);var d0,oM;let Lq=(oM=class extends YP{constructor(n,r){super(n);M(this,d0,void 0);O(this,d0,r)}async _poll(n,r){const i=await r.getTransactionReceipt(v(this,d0));i&&r.emit(v(this,d0),i)}},d0=new WeakMap,oM);var Us,p0,g0,hc,Ea,l2,qL,sM;let XP=(sM=class{constructor(e,n){M(this,l2);M(this,Us,void 0);M(this,p0,void 0);M(this,g0,void 0);M(this,hc,void 0);M(this,Ea,void 0);O(this,Us,e),O(this,p0,c3(n)),O(this,g0,ie(this,l2,qL).bind(this)),O(this,hc,!1),O(this,Ea,-2)}start(){v(this,hc)||(O(this,hc,!0),v(this,Ea)===-2&&v(this,Us).getBlockNumber().then(e=>{O(this,Ea,e)}),v(this,Us).on("block",v(this,g0)))}stop(){v(this,hc)&&(O(this,hc,!1),v(this,Us).off("block",v(this,g0)))}pause(e){this.stop(),e&&O(this,Ea,-2)}resume(){this.start()}},Us=new WeakMap,p0=new WeakMap,g0=new WeakMap,hc=new WeakMap,Ea=new WeakMap,l2=new WeakSet,qL=async function(e){if(v(this,Ea)===-2)return;const n=c3(v(this,p0));n.fromBlock=v(this,Ea)+1,n.toBlock=e;const r=await v(this,Us).getLogs(n);if(r.length===0){v(this,Ea){if(r==null)return"null";if(typeof r=="bigint")return`bigint:${r.toString()}`;if(typeof r=="string")return r.toLowerCase();if(typeof r=="object"&&!Array.isArray(r)){const i=Object.keys(r);return i.sort(),i.reduce((a,o)=>(a[o]=r[o],a),{})}return r})}let e$=class{constructor(e){R(this,"name");gt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}};function Fq(t){return JSON.parse(JSON.stringify(t))}function u3(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function K6(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(gn(t,32)){const n=t.toLowerCase();return{type:"transaction",tag:Yb("tx",{hash:n}),hash:n}}if(t.orphan){const n=t;return{type:"orphan",tag:Yb("orphan",n),filter:Fq(n)}}if(t.address||t.topics){const n=t,r={topics:(n.topics||[]).map(i=>i==null?null:Array.isArray(i)?u3(i.map(a=>a.toLowerCase())):i.toLowerCase())};if(n.address){const i=[],a=[],o=s=>{gn(s)?i.push(s):a.push((async()=>{i.push(await li(s,e))})())};Array.isArray(n.address)?n.address.forEach(o):o(n.address),a.length&&await Promise.all(a),r.address=u3(i.map(s=>s.toLowerCase()))}return{filter:r,tag:Yb("event",r),type:"event"}}K(!1,"unknown ProviderEvent","event",t)}function W6(){return new Date().getTime()}const jq={cacheTimeout:250,pollingInterval:4e3};var Lr,dc,$r,y0,Zi,lf,pc,Fs,Am,Sa,m0,v0,Zr,Gi,Em,f3,Sm,h3,cf,iy,Pm,d3,uf,ay,b0,Xb,lM;let zq=(lM=class{constructor(e,n){M(this,Zr);M(this,Em);M(this,Sm);M(this,cf);M(this,Pm);M(this,uf);M(this,b0);M(this,Lr,void 0);M(this,dc,void 0);M(this,$r,void 0);M(this,y0,void 0);M(this,Zi,void 0);M(this,lf,void 0);M(this,pc,void 0);M(this,Fs,void 0);M(this,Am,void 0);M(this,Sa,void 0);M(this,m0,void 0);M(this,v0,void 0);if(O(this,v0,Object.assign({},jq,n||{})),e==="any")O(this,lf,!0),O(this,Zi,null);else if(e){const r=Bc.from(e);O(this,lf,!1),O(this,Zi,Promise.resolve(r)),setTimeout(()=>{this.emit("network",r,null)},0)}else O(this,lf,!1),O(this,Zi,null);O(this,Fs,-1),O(this,pc,new Map),O(this,Lr,new Map),O(this,dc,new Map),O(this,$r,null),O(this,y0,!1),O(this,Am,1),O(this,Sa,new Map),O(this,m0,!1)}get pollingInterval(){return v(this,v0).pollingInterval}get provider(){return this}get plugins(){return Array.from(v(this,dc).values())}attachPlugin(e){if(v(this,dc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return v(this,dc).set(e.name,e.connect(this)),this}getPlugin(e){return v(this,dc).get(e)||null}get disableCcipRead(){return v(this,m0)}set disableCcipRead(e){O(this,m0,!!e)}async ccipReadFetch(e,n,r){if(this.disableCcipRead||r.length===0||e.to==null)return null;const i=e.to.toLowerCase(),a=n.toLowerCase(),o=[];for(let s=0;s=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:l,errorMessage:f}}),o.push(f)}ye(!1,`error encountered during CCIP fetch: ${o.map(s=>JSON.stringify(s)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:o}})}_wrapBlock(e,n){return new lq(Oq(e),this)}_wrapLog(e,n){return new av(Sq(e),this)}_wrapTransactionReceipt(e,n){return new ML(_q(e),this)}_wrapTransactionResponse(e,n){return new HP(KL(e),this)}_detectNetwork(){ye(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){ye(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Bt(await ie(this,Zr,Gi).call(this,{method:"getBlockNumber"}),"%response");return v(this,Fs)>=0&&O(this,Fs,e),e}_getAddress(e){return li(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(gn(e))return gn(e,32)?e:fd(e);if(typeof e=="bigint"&&(e=Bt(e,"blockTag")),typeof e=="number")return e>=0?fd(e):v(this,Fs)>=0?fd(v(this,Fs)+e):this.getBlockNumber().then(n=>fd(n+e));K(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const n=(e.topics||[]).map(l=>l==null?null:Array.isArray(l)?u3(l.map(c=>c.toLowerCase())):l.toLowerCase()),r="blockHash"in e?e.blockHash:void 0,i=(l,c,u)=>{let f;switch(l.length){case 0:break;case 1:f=l[0];break;default:l.sort(),f=l}if(r&&(c!=null||u!=null))throw new Error("invalid filter");const h={};return f&&(h.address=f),n.length&&(h.topics=n),c&&(h.fromBlock=c),u&&(h.toBlock=u),r&&(h.blockHash=r),h};let a=[];if(e.address)if(Array.isArray(e.address))for(const l of e.address)a.push(this._getAddress(l));else a.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let s;return"toBlock"in e&&(s=this._getBlockTag(e.toBlock)),a.filter(l=>typeof l!="string").length||o!=null&&typeof o!="string"||s!=null&&typeof s!="string"?Promise.all([Promise.all(a),o,s]).then(l=>i(l[0],l[1],l[2])):i(a,o,s)}_getTransactionRequest(e){const n=Xw(e),r=[];if(["to","from"].forEach(i=>{if(n[i]==null)return;const a=li(n[i],this);Yv(a)?r.push(async function(){n[i]=await a}()):n[i]=a}),n.blockTag!=null){const i=this._getBlockTag(n.blockTag);Yv(i)?r.push(async function(){n.blockTag=await i}()):n.blockTag=i}return r.length?async function(){return await Promise.all(r),n}():n}async getNetwork(){if(v(this,Zi)==null){const i=(async()=>{try{const a=await this._detectNetwork();return this.emit("network",a,null),a}catch(a){throw v(this,Zi)===i&&O(this,Zi,null),a}})();return O(this,Zi,i),(await i).clone()}const e=v(this,Zi),[n,r]=await Promise.all([e,this._detectNetwork()]);return n.chainId!==r.chainId&&(v(this,lf)?(this.emit("network",r,n),v(this,Zi)===e&&O(this,Zi,Promise.resolve(r))):ye(!1,`network changed: ${n.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),n.clone()}async getFeeData(){const e=await this.getNetwork(),n=async()=>{const{_block:i,gasPrice:a,priorityFee:o}=await ti({_block:ie(this,Pm,d3).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await ie(this,Zr,Gi).call(this,{method:"getGasPrice"});return et(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await ie(this,Zr,Gi).call(this,{method:"getPriorityFee"});return et(u,"%response")}catch{}return null})()});let s=null,l=null;const c=this._wrapBlock(i,e);return c&&c.baseFeePerGas&&(l=o??BigInt("1000000000"),s=c.baseFeePerGas*$q+l),new vk(a,s,l)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const i=new nh(r.url),a=await r.processFunc(n,this,i);return new vk(a.gasPrice,a.maxFeePerGas,a.maxPriorityFeePerGas)}return await n()}async estimateGas(e){let n=this._getTransactionRequest(e);return Yv(n)&&(n=await n),et(await ie(this,Zr,Gi).call(this,{method:"estimateGas",transaction:n}),"%response")}async call(e){const{tx:n,blockTag:r}=await ti({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await ie(this,Sm,h3).call(this,ie(this,Em,f3).call(this,n,r,e.enableCcipRead?0:-1))}async getBalance(e,n){return et(await ie(this,cf,iy).call(this,{method:"getBalance"},e,n),"%response")}async getTransactionCount(e,n){return Bt(await ie(this,cf,iy).call(this,{method:"getTransactionCount"},e,n),"%response")}async getCode(e,n){return it(await ie(this,cf,iy).call(this,{method:"getCode"},e,n))}async getStorage(e,n,r){const i=et(n,"position");return it(await ie(this,cf,iy).call(this,{method:"getStorage",position:i},e,r))}async broadcastTransaction(e){const{blockNumber:n,hash:r,network:i}=await ti({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),a=wL.from(e);if(a.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(a,i).replaceableTransaction(n)}async getBlock(e,n){const{network:r,params:i}=await ti({network:this.getNetwork(),params:ie(this,Pm,d3).call(this,e,!!n)});return i==null?null:this._wrapBlock(i,r)}async getTransaction(e){const{network:n,params:r}=await ti({network:this.getNetwork(),params:ie(this,Zr,Gi).call(this,{method:"getTransaction",hash:e})});return r==null?null:this._wrapTransactionResponse(r,n)}async getTransactionReceipt(e){const{network:n,params:r}=await ti({network:this.getNetwork(),params:ie(this,Zr,Gi).call(this,{method:"getTransactionReceipt",hash:e})});if(r==null)return null;if(r.gasPrice==null&&r.effectiveGasPrice==null){const i=await ie(this,Zr,Gi).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(r,n)}async getTransactionResult(e){const{result:n}=await ti({network:this.getNetwork(),result:ie(this,Zr,Gi).call(this,{method:"getTransactionResult",hash:e})});return n==null?null:it(n)}async getLogs(e){let n=this._getFilter(e);Yv(n)&&(n=await n);const{network:r,params:i}=await ti({network:this.getNetwork(),params:ie(this,Zr,Gi).call(this,{method:"getLogs",filter:n})});return i.map(a=>this._wrapLog(a,r))}_getProvider(e){ye(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await Ak.fromName(this,e)}async getAvatar(e){const n=await this.getResolver(e);return n?await n.getAvatar():null}async resolveName(e){const n=await this.getResolver(e);return n?await n.getAddress():null}async lookupAddress(e){e=fn(e);const n=n3(e.substring(2).toLowerCase()+".addr.reverse");try{const r=await Ak.getEnsAddress(this),a=await new _d(r,["function resolver(bytes32) view returns (address)"],this).resolver(n);if(a==null||a===o1)return null;const s=await new _d(a,["function name(bytes32) view returns (string)"],this).name(n);return await this.resolveName(s)!==e?null:s}catch(r){if(Qr(r,"BAD_DATA")&&r.value==="0x"||Qr(r,"CALL_EXCEPTION"))return null;throw r}return null}async waitForTransaction(e,n,r){const i=n??1;return i===0?this.getTransactionReceipt(e):new Promise(async(a,o)=>{let s=null;const l=async c=>{try{const u=await this.getTransactionReceipt(e);if(u!=null&&c-u.blockNumber+1>=i){a(u),s&&(clearTimeout(s),s=null);return}}catch(u){console.log("EEE",u)}this.once("block",l)};r!=null&&(s=setTimeout(()=>{s!=null&&(s=null,this.off("block",l),o(Zn("timeout","TIMEOUT",{reason:"timeout"})))},r)),l(await this.getBlockNumber())})}async waitForBlock(e){ye(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const n=v(this,Sa).get(e);n&&(n.timer&&clearTimeout(n.timer),v(this,Sa).delete(e))}_setTimeout(e,n){n==null&&(n=0);const r=vs(this,Am)._++,i=()=>{v(this,Sa).delete(r),e()};if(this.paused)v(this,Sa).set(r,{timer:null,func:i,time:n});else{const a=setTimeout(i,n);v(this,Sa).set(r,{timer:a,func:i,time:W6()})}return r}_forEachSubscriber(e){for(const n of v(this,Lr).values())e(n.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new e$(e.type);case"block":{const n=new Mq(this);return n.pollingInterval=this.pollingInterval,n}case"safe":case"finalized":return new Bq(this,e.type);case"event":return new XP(this,e.filter);case"transaction":return new Lq(this,e.hash);case"orphan":return new Dq(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,n){for(const r of v(this,Lr).values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=n,r.started&&n.start(),v(this,$r)!=null&&n.pause(v(this,$r));break}}async on(e,n){const r=await ie(this,b0,Xb).call(this,e);return r.listeners.push({listener:n,once:!1}),r.started||(r.subscriber.start(),r.started=!0,v(this,$r)!=null&&r.subscriber.pause(v(this,$r))),this}async once(e,n){const r=await ie(this,b0,Xb).call(this,e);return r.listeners.push({listener:n,once:!0}),r.started||(r.subscriber.start(),r.started=!0,v(this,$r)!=null&&r.subscriber.pause(v(this,$r))),this}async emit(e,...n){const r=await ie(this,uf,ay).call(this,e,n);if(!r||r.listeners.length===0)return!1;const i=r.listeners.length;return r.listeners=r.listeners.filter(({listener:a,once:o})=>{const s=new dD(this,o?null:a,e);try{a.call(this,...n,s)}catch{}return!o}),r.listeners.length===0&&(r.started&&r.subscriber.stop(),v(this,Lr).delete(r.tag)),i>0}async listenerCount(e){if(e){const r=await ie(this,uf,ay).call(this,e);return r?r.listeners.length:0}let n=0;for(const{listeners:r}of v(this,Lr).values())n+=r.length;return n}async listeners(e){if(e){const r=await ie(this,uf,ay).call(this,e);return r?r.listeners.map(({listener:i})=>i):[]}let n=[];for(const{listeners:r}of v(this,Lr).values())n=n.concat(r.map(({listener:i})=>i));return n}async off(e,n){const r=await ie(this,uf,ay).call(this,e);if(!r)return this;if(n){const i=r.listeners.map(({listener:a})=>a).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(!n||r.listeners.length===0)&&(r.started&&r.subscriber.stop(),v(this,Lr).delete(r.tag)),this}async removeAllListeners(e){if(e){const{tag:n,started:r,subscriber:i}=await ie(this,b0,Xb).call(this,e);r&&i.stop(),v(this,Lr).delete(n)}else for(const[n,{started:r,subscriber:i}]of v(this,Lr))r&&i.stop(),v(this,Lr).delete(n);return this}async addListener(e,n){return await this.on(e,n)}async removeListener(e,n){return this.off(e,n)}get destroyed(){return v(this,y0)}destroy(){this.removeAllListeners();for(const e of v(this,Sa).keys())this._clearTimeout(e);O(this,y0,!0)}get paused(){return v(this,$r)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(O(this,Fs,-1),v(this,$r)!=null){if(v(this,$r)==!!e)return;ye(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(n=>n.pause(e)),O(this,$r,!!e);for(const n of v(this,Sa).values())n.timer&&clearTimeout(n.timer),n.time=W6()-n.time}resume(){if(v(this,$r)!=null){this._forEachSubscriber(e=>e.resume()),O(this,$r,null);for(const e of v(this,Sa).values()){let n=e.time;n<0&&(n=0),e.time=W6(),setTimeout(e.func,n)}}}},Lr=new WeakMap,dc=new WeakMap,$r=new WeakMap,y0=new WeakMap,Zi=new WeakMap,lf=new WeakMap,pc=new WeakMap,Fs=new WeakMap,Am=new WeakMap,Sa=new WeakMap,m0=new WeakMap,v0=new WeakMap,Zr=new WeakSet,Gi=async function(e){const n=v(this,v0).cacheTimeout;if(n<0)return await this._perform(e);const r=Yb(e.method,e);let i=v(this,pc).get(r);return i||(i=this._perform(e),v(this,pc).set(r,i),setTimeout(()=>{v(this,pc).get(r)===i&&v(this,pc).delete(r)},n)),await i},Em=new WeakSet,f3=async function(e,n,r){ye(r=0&&n==="latest"&&i.to!=null&&Un(a.data,0,4)==="0x556f1830"){const o=a.data,s=await li(i.to,this);let l;try{l=Kq(Un(a.data,4))}catch(f){ye(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}ye(l.sender.toLowerCase()===s.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:l.errorArgs}});const c=await this.ccipReadFetch(i,l.calldata,l.urls);ye(c!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:a.data,errorArgs:l.errorArgs}});const u={to:s,data:Xn([l.selector,Qq([c,l.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:u});try{const f=await ie(this,Em,f3).call(this,u,n,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},u),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},u),error:f}),f}}throw a}},Sm=new WeakSet,h3=async function(e){const{value:n}=await ti({network:this.getNetwork(),value:e});return n},cf=new WeakSet,iy=async function(e,n,r){let i=this._getAddress(n),a=this._getBlockTag(r);return(typeof i!="string"||typeof a!="string")&&([i,a]=await Promise.all([i,a])),await ie(this,Sm,h3).call(this,ie(this,Zr,Gi).call(this,Object.assign(e,{address:i,blockTag:a})))},Pm=new WeakSet,d3=async function(e,n){if(gn(e,32))return await ie(this,Zr,Gi).call(this,{method:"getBlock",blockHash:e,includeTransactions:n});let r=this._getBlockTag(e);return typeof r!="string"&&(r=await r),await ie(this,Zr,Gi).call(this,{method:"getBlock",blockTag:r,includeTransactions:n})},uf=new WeakSet,ay=async function(e,n){let r=await K6(e,this);return r.type==="event"&&n&&n.length>0&&n[0].removed===!0&&(r=await K6({orphan:"drop-log",log:n[0]},this)),v(this,Lr).get(r.tag)||null},b0=new WeakSet,Xb=async function(e){const n=await K6(e,this),r=n.tag;let i=v(this,Lr).get(r);return i||(i={subscriber:this._getSubscriber(n),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},v(this,Lr).set(r,i)),i},lM);function Hq(t,e){try{const n=p3(t,e);if(n)return Gw(n)}catch{}return null}function p3(t,e){if(t==="0x")return null;try{const n=Bt(Un(t,e,e+32)),r=Bt(Un(t,n,n+32));return Un(t,n+32,n+32+r)}catch{}return null}function Tk(t){const e=oi(t);if(e.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(e,32-e.length),n}function Gq(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const Vq=new Uint8Array([]);function Qq(t){const e=[];let n=0;for(let r=0;r=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const n=Un(t,0,32);ye(Un(n,0,12)===Un(Ck,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=Un(n,12);try{const r=[],i=Bt(Un(t,32,64)),a=Bt(Un(t,i,i+32)),o=Un(t,i+32);for(let s=0;se[r]),e}function Th(t,e){if(t.provider)return t.provider;ye(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function kk(t,e){let n=Xw(e);if(n.to!=null&&(n.to=li(n.to,t)),n.from!=null){const r=n.from;n.from=Promise.all([t.getAddress(),li(r,t)]).then(([i,a])=>(K(i.toLowerCase()===a.toLowerCase(),"transaction from mismatch","tx.from",a),i))}else n.from=t.getAddress();return await ti(n)}let Wq=class{constructor(e){R(this,"provider");gt(this,{provider:e||null})}async getNonce(e){return Th(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await kk(this,e)}async populateTransaction(e){const n=Th(this,"populateTransaction"),r=await kk(this,e);r.nonce==null&&(r.nonce=await this.getNonce("pending")),r.gasLimit==null&&(r.gasLimit=await this.estimateGas(r));const i=await this.provider.getNetwork();if(r.chainId!=null){const o=et(r.chainId);K(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=i.chainId;const a=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||a)?K(!1,"eip-1559 transaction do not support gasPrice","tx",e):(r.type===0||r.type===1)&&a&&K(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1){const o=await n.getFeeData();ye(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),r.gasPrice==null&&(r.gasPrice=o.gasPrice)}else{const o=await n.getFeeData();if(r.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=o.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(ye(!a,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=o.gasPrice),r.type=0):ye(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=o.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await ti(r)}async estimateGas(e){return Th(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Th(this,"call").call(await this.populateCall(e))}async resolveName(e){return await Th(this,"resolveName").resolveName(e)}async sendTransaction(e){const n=Th(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const i=wL.from(r);return await n.broadcastTransaction(await this.signTransaction(i))}};function Jq(t){return JSON.parse(JSON.stringify(t))}var wi,Ho,ff,gc,hf,w0,Om,g3,Tm,y3,cM;let t$=(cM=class{constructor(e){M(this,Om);M(this,Tm);M(this,wi,void 0);M(this,Ho,void 0);M(this,ff,void 0);M(this,gc,void 0);M(this,hf,void 0);M(this,w0,void 0);O(this,wi,e),O(this,Ho,null),O(this,ff,ie(this,Om,g3).bind(this)),O(this,gc,!1),O(this,hf,null),O(this,w0,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,n){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){v(this,gc)||(O(this,gc,!0),ie(this,Om,g3).call(this,-2))}stop(){v(this,gc)&&(O(this,gc,!1),O(this,w0,!0),ie(this,Tm,y3).call(this),v(this,wi).off("block",v(this,ff)))}pause(e){e&&ie(this,Tm,y3).call(this),v(this,wi).off("block",v(this,ff))}resume(){this.start()}},wi=new WeakMap,Ho=new WeakMap,ff=new WeakMap,gc=new WeakMap,hf=new WeakMap,w0=new WeakMap,Om=new WeakSet,g3=async function(e){try{v(this,Ho)==null&&O(this,Ho,this._subscribe(v(this,wi)));let n=null;try{n=await v(this,Ho)}catch(a){if(!Qr(a,"UNSUPPORTED_OPERATION")||a.operation!=="eth_newFilter")throw a}if(n==null){O(this,Ho,null),v(this,wi)._recoverSubscriber(this,this._recover(v(this,wi)));return}const r=await v(this,wi).getNetwork();if(v(this,hf)||O(this,hf,r),v(this,hf).chainId!==r.chainId)throw new Error("chaid changed");if(v(this,w0))return;const i=await v(this,wi).send("eth_getFilterChanges",[n]);await this._emitResults(v(this,wi),i)}catch(n){console.log("@TODO",n)}v(this,wi).once("block",v(this,ff))},Tm=new WeakSet,y3=function(){const e=v(this,Ho);e&&(O(this,Ho,null),e.then(n=>{v(this,wi).send("eth_uninstallFilter",[n])}))},cM);var df,uM;let Yq=(uM=class extends t${constructor(n,r){super(n);M(this,df,void 0);O(this,df,Jq(r))}_recover(n){return new XP(n,v(this,df))}async _subscribe(n){return await n.send("eth_newFilter",[v(this,df)])}async _emitResults(n,r){for(const i of r)n.emit(v(this,df),n._wrapLog(i,n._network))}},df=new WeakMap,uM),Xq=class extends t${async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,n){for(const r of n)e.emit("pending",r)}};const Zq="bigint,boolean,function,number,string,symbol".split(/,/g);function Zb(t){if(t==null||Zq.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(Zb);if(typeof t=="object")return Object.keys(t).reduce((e,n)=>(e[n]=t[n],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function qq(t){return new Promise(e=>{setTimeout(e,t)})}function Ch(t){return t&&t.toLowerCase()}function _k(t){return t&&typeof t.pollingInterval=="number"}const eee={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};let J6=class extends Wq{constructor(n,r){super(n);R(this,"address");r=fn(r),gt(this,{address:r})}connect(n){ye(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(n){return await this.populateCall(n)}async sendUncheckedTransaction(n){const r=Zb(n),i=[];if(r.from){const o=r.from;i.push((async()=>{const s=await li(o,this.provider);K(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=s})())}else r.from=this.address;if(r.gasLimit==null&&i.push((async()=>{r.gasLimit=await this.provider.estimateGas({...r,from:this.address})})()),r.to!=null){const o=r.to;i.push((async()=>{r.to=await li(o,this.provider)})())}i.length&&await Promise.all(i);const a=this.provider.getRpcTransaction(r);return this.provider.send("eth_sendTransaction",[a])}async sendTransaction(n){const r=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(n);return await new Promise((a,o)=>{const s=[1e3,100];let l=0;const c=async()=>{try{const u=await this.provider.getTransaction(i);if(u!=null){a(u.replaceableTransaction(r));return}}catch(u){if(Qr(u,"CANCELLED")||Qr(u,"BAD_DATA")||Qr(u,"NETWORK_ERROR")){u.info==null&&(u.info={}),u.info.sendTransactionHash=i,o(u);return}if(Qr(u,"INVALID_ARGUMENT")&&(l++,u.info==null&&(u.info={}),u.info.sendTransactionHash=i,l>10)){o(u);return}this.provider.emit("error",Zn("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:u}))}this.provider._setTimeout(()=>{c()},s.pop()||4e3)};c()})}async signTransaction(n){const r=Zb(n);if(r.from){const a=await li(r.from,this.provider);K(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=a}else r.from=this.address;const i=this.provider.getRpcTransaction(r);return await this.provider.send("eth_signTransaction",[i])}async signMessage(n){const r=typeof n=="string"?ul(n):n;return await this.provider.send("personal_sign",[it(r),this.address.toLowerCase()])}async signTypedData(n,r,i){const a=Zb(i),o=await rk.resolveNames(n,r,a,async s=>{const l=await li(s);return K(l!=null,"TypedData does not support null address","value",s),l});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(rk.getPayload(o.domain,r,o.value))])}async unlock(n){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),n,null])}async _legacySignMessage(n){const r=typeof n=="string"?ul(n):n;return await this.provider.send("eth_sign",[this.address.toLowerCase(),it(r)])}};var pf,x0,js,Go,so,Pa,xi,Cm,m3,fM;let tee=(fM=class extends zq{constructor(n,r){super(n,r);M(this,Cm);M(this,pf,void 0);M(this,x0,void 0);M(this,js,void 0);M(this,Go,void 0);M(this,so,void 0);M(this,Pa,void 0);M(this,xi,void 0);O(this,x0,1),O(this,pf,Object.assign({},eee,r||{})),O(this,js,[]),O(this,Go,null),O(this,Pa,null),O(this,xi,null);{let a=null;const o=new Promise(s=>{a=s});O(this,so,{promise:o,resolve:a})}const i=this._getOption("staticNetwork");typeof i=="boolean"?(K(!i||n!=="any","staticNetwork cannot be used on special network 'any'","options",r),i&&n!=null&&O(this,Pa,Bc.from(n))):i&&(K(n==null||i.matches(n),"staticNetwork MUST match network object","options",r),O(this,Pa,i))}_getOption(n){return v(this,pf)[n]}get _network(){return ye(v(this,Pa),"network is not available yet","NETWORK_ERROR"),v(this,Pa)}async _perform(n){if(n.method==="call"||n.method==="estimateGas"){let i=n.transaction;if(i&&i.type!=null&&et(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const a=await this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(n=Object.assign({},n,{transaction:Object.assign({},i,{type:void 0})}))}}const r=this.getRpcRequest(n);return r!=null?await this.send(r.method,r.args):super._perform(n)}async _detectNetwork(){const n=this._getOption("staticNetwork");if(n)if(n===!0){if(v(this,Pa))return v(this,Pa)}else return n;return v(this,xi)?await v(this,xi):this.ready?(O(this,xi,(async()=>{try{const r=Bc.from(et(await this.send("eth_chainId",[])));return O(this,xi,null),r}catch(r){throw O(this,xi,null),r}})()),await v(this,xi)):(O(this,xi,(async()=>{const r={id:vs(this,x0)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:r});let i;try{i=(await this._send(r))[0],O(this,xi,null)}catch(a){throw O(this,xi,null),this.emit("debug",{action:"receiveRpcError",error:a}),a}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return Bc.from(et(i.result));throw this.getRpcError(r,i)})()),await v(this,xi))}_start(){v(this,so)==null||v(this,so).resolve==null||(v(this,so).resolve(),O(this,so,null),(async()=>{for(;v(this,Pa)==null&&!this.destroyed;)try{O(this,Pa,await this._detectNetwork())}catch(n){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",Zn("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:n}})),await qq(1e3)}ie(this,Cm,m3).call(this)})())}async _waitUntilReady(){if(v(this,so)!=null)return await v(this,so).promise}_getSubscriber(n){return n.type==="pending"?new Xq(this):n.type==="event"?this._getOption("polling")?new XP(this,n.filter):new Yq(this,n.filter):n.type==="orphan"&&n.filter.orphan==="drop-log"?new e$("orphan"):super._getSubscriber(n)}get ready(){return v(this,so)==null}getRpcTransaction(n){const r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(n[i]==null)return;let a=i;i==="gasLimit"&&(a="gas"),r[a]=fd(et(n[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{n[i]!=null&&(r[i]=it(n[i]))}),n.accessList&&(r.accessList=ph(n.accessList)),r}getRpcRequest(n){switch(n.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[Ch(n.address),n.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[Ch(n.address),n.blockTag]};case"getCode":return{method:"eth_getCode",args:[Ch(n.address),n.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[Ch(n.address),"0x"+n.position.toString(16),n.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[n.signedTransaction]};case"getBlock":if("blockTag"in n)return{method:"eth_getBlockByNumber",args:[n.blockTag,!!n.includeTransactions]};if("blockHash"in n)return{method:"eth_getBlockByHash",args:[n.blockHash,!!n.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[n.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[n.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(n.transaction),n.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(n.transaction)]};case"getLogs":return n.filter&&n.filter.address!=null&&(Array.isArray(n.filter.address)?n.filter.address=n.filter.address.map(Ch):n.filter.address=Ch(n.filter.address)),{method:"eth_getLogs",args:[n.filter]}}return null}getRpcError(n,r){const{method:i}=n,{error:a}=r;if(i==="eth_estimateGas"&&a.message){const l=a.message;if(!l.match(/revert/i)&&l.match(/insufficient funds/i))return Zn("insufficient funds","INSUFFICIENT_FUNDS",{transaction:n.params[0],info:{payload:n,error:a}})}if(i==="eth_call"||i==="eth_estimateGas"){const l=v3(a),c=a3.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",n.params[0],l?l.data:null);return c.info={error:a,payload:n},c}const o=JSON.stringify(ree(a));if(typeof a.message=="string"&&a.message.match(/user denied|ethers-user-denied/i))return Zn("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:n,error:a}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const l=n.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return Zn("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:l,info:{error:a}});if(o.match(/nonce/i)&&o.match(/too low/i))return Zn("nonce has already been used","NONCE_EXPIRED",{transaction:l,info:{error:a}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return Zn("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:l,info:{error:a}});if(o.match(/only replay-protected/i))return Zn("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:l,info:{error:a}}})}let s=!!o.match(/the method .* does not exist/i);return s||a&&a.details&&a.details.startsWith("Unauthorized method:")&&(s=!0),s?Zn("unsupported operation","UNSUPPORTED_OPERATION",{operation:n.method,info:{error:a,payload:n}}):Zn("could not coalesce error","UNKNOWN_ERROR",{error:a,payload:n})}send(n,r){if(this.destroyed)return Promise.reject(Zn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n}));const i=vs(this,x0)._++,a=new Promise((o,s)=>{v(this,js).push({resolve:o,reject:s,payload:{method:n,params:r,id:i,jsonrpc:"2.0"}})});return ie(this,Cm,m3).call(this),a}async getSigner(n){n==null&&(n=0);const r=this.send("eth_accounts",[]);if(typeof n=="number"){const a=await r;if(n>=a.length)throw new Error("no such account");return new J6(this,a[n])}const{accounts:i}=await ti({network:this.getNetwork(),accounts:r});n=fn(n);for(const a of i)if(fn(a)===n)return new J6(this,n);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(r=>new J6(this,r))}destroy(){v(this,Go)&&(clearTimeout(v(this,Go)),O(this,Go,null));for(const{payload:n,reject:r}of v(this,js))r(Zn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n.method}));O(this,js,[]),super.destroy()}},pf=new WeakMap,x0=new WeakMap,js=new WeakMap,Go=new WeakMap,so=new WeakMap,Pa=new WeakMap,xi=new WeakMap,Cm=new WeakSet,m3=function(){if(v(this,Go))return;const n=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");O(this,Go,setTimeout(()=>{O(this,Go,null);const r=v(this,js);for(O(this,js,[]);r.length;){const i=[r.shift()];for(;r.length&&i.length!==v(this,pf).batchMaxCount;)if(i.push(r.shift()),JSON.stringify(i.map(o=>o.payload)).length>v(this,pf).batchMaxSize){r.unshift(i.pop());break}(async()=>{const a=i.length===1?i[0].payload:i.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:a});try{const o=await this._send(a);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:s,reject:l,payload:c}of i){if(this.destroyed){l(Zn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:c.method}));continue}const u=o.filter(f=>f.id===c.id)[0];if(u==null){const f=Zn("missing response for request","BAD_DATA",{value:o,info:{payload:c}});this.emit("error",f),l(f);continue}if("error"in u){l(this.getRpcError(c,u));continue}s(u.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:s}of i)s(o)}})()}},n))},fM);var yc,hM;let n$=(hM=class extends tee{constructor(n,r){super(n,r);M(this,yc,void 0);O(this,yc,4e3)}_getSubscriber(n){const r=super._getSubscriber(n);return _k(r)&&(r.pollingInterval=v(this,yc)),r}get pollingInterval(){return v(this,yc)}set pollingInterval(n){if(!Number.isInteger(n)||n<0)throw new Error("invalid interval");O(this,yc,n),this._forEachSubscriber(r=>{_k(r)&&(r.pollingInterval=v(this,yc))})}},yc=new WeakMap,hM);var A0,dM;let nee=(dM=class extends n${constructor(n,r,i){n==null&&(n="http://localhost:8545");super(r,i);M(this,A0,void 0);typeof n=="string"?O(this,A0,new nh(n)):O(this,A0,n.clone())}_getConnection(){return v(this,A0).clone()}async send(n,r){return await this._start(),await super.send(n,r)}async _send(n){const r=this._getConnection();r.body=JSON.stringify(n),r.setHeader("content-type","application/json");const i=await r.send();i.assertOk();let a=i.bodyJson;return Array.isArray(a)||(a=[a]),a}},A0=new WeakMap,dM);function v3(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&gn(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const n=v3(t[e]);if(n)return n}return null}if(typeof t=="string")try{return v3(JSON.parse(t))}catch{}return null}function b3(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const n in t)b3(t[n],e);if(typeof t=="string")try{return b3(JSON.parse(t),e)}catch{}}}function ree(t){const e=[];return b3(t,e),e}var E0,pM;let r$=(pM=class extends n${constructor(n,r){K(n&&n.request,"invalid EIP-1193 provider","ethereum",n);super(r,{batchMaxCount:1});M(this,E0,void 0);O(this,E0,async(i,a)=>{const o={method:i,params:a};this.emit("debug",{action:"sendEip1193Request",payload:o});try{const s=await n.request(o);return this.emit("debug",{action:"receiveEip1193Result",result:s}),s}catch(s){const l=new Error(s.message);throw l.code=s.code,l.data=s.data,l.payload=o,this.emit("debug",{action:"receiveEip1193Error",error:l}),l}})}async send(n,r){return await this._start(),await super.send(n,r)}async _send(n){K(!Array.isArray(n),"EIP-1193 does not support batch request","payload",n);try{const r=await v(this,E0).call(this,n.method,n.params||[]);return[{id:n.id,result:r}]}catch(r){return[{id:n.id,error:{code:r.code,data:r.data,message:r.message}}]}}getRpcError(n,r){switch(r=JSON.parse(JSON.stringify(r)),r.error.code||-1){case 4001:r.error.message=`ethers-user-denied: ${r.error.message}`;break;case 4200:r.error.message=`ethers-unsupported: ${r.error.message}`;break}return super.getRpcError(n,r)}async hasSigner(n){n==null&&(n=0);const r=await this.send("eth_accounts",[]);return typeof n=="number"?r.length>n:(n=n.toLowerCase(),r.filter(i=>i.toLowerCase()===n).length!==0)}async getSigner(n){if(n==null&&(n=0),!await this.hasSigner(n))try{await v(this,E0).call(this,"eth_requestAccounts",[])}catch(r){const i=r.payload;throw this.getRpcError(i,{id:i.id,error:r})}return await super.getSigner(n)}},E0=new WeakMap,pM);const iee=["string","number","bigint","symbol"],aee=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function oee(t){if(t===null)return"null";if(t===void 0)return"undefined";if(t===!0||t===!1)return"boolean";const e=typeof t;if(iee.includes(e))return e;if(e==="function")return"Function";if(Array.isArray(t))return"Array";if(see(t))return"Buffer";const n=lee(t);return n||"Object"}function see(t){return t&&t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer.call(null,t)}function lee(t){const e=Object.prototype.toString.call(t).slice(8,-1);if(aee.includes(e))return e}class de{constructor(e,n,r){this.major=e,this.majorEncoded=e<<5,this.name=n,this.terminal=r}toString(){return`Type[${this.major}].${this.name}`}compare(e){return this.majore.major?1:0}}de.uint=new de(0,"uint",!0);de.negint=new de(1,"negint",!0);de.bytes=new de(2,"bytes",!0);de.string=new de(3,"string",!0);de.array=new de(4,"array",!1);de.map=new de(5,"map",!1);de.tag=new de(6,"tag",!1);de.float=new de(7,"float",!0);de.false=new de(7,"false",!0);de.true=new de(7,"true",!0);de.null=new de(7,"null",!0);de.undefined=new de(7,"undefined",!0);de.break=new de(7,"break",!0);class ut{constructor(e,n,r){this.type=e,this.value=n,this.encodedLength=r,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}}const og=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&typeof globalThis.Buffer.isBuffer=="function",cee=new TextDecoder,uee=new TextEncoder;function qw(t){return og&&globalThis.Buffer.isBuffer(t)}function i$(t){return t instanceof Uint8Array?qw(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t:Uint8Array.from(t)}const fee=og?(t,e,n)=>n-e>64?globalThis.Buffer.from(t.subarray(e,n)).toString("utf8"):Ik(t,e,n):(t,e,n)=>n-e>64?cee.decode(t.subarray(e,n)):Ik(t,e,n),hee=og?t=>t.length>64?globalThis.Buffer.from(t):Nk(t):t=>t.length>64?uee.encode(t):Nk(t),bs=t=>Uint8Array.from(t),ZP=og?(t,e,n)=>qw(t)?new Uint8Array(t.subarray(e,n)):t.slice(e,n):(t,e,n)=>t.slice(e,n),dee=og?(t,e)=>(t=t.map(n=>n instanceof Uint8Array?n:globalThis.Buffer.from(n)),i$(globalThis.Buffer.concat(t,e))):(t,e)=>{const n=new Uint8Array(e);let r=0;for(let i of t)r+i.length>n.length&&(i=i.subarray(0,n.length-r)),n.set(i,r),r+=i.length;return n},pee=og?t=>globalThis.Buffer.allocUnsafe(t):t=>new Uint8Array(t);function gee(t,e){if(qw(t)&&qw(e))return t.compare(e);for(let n=0;n55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(o+1===r){(e-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return a}function Ik(t,e,n){const r=[];for(;e239?4:i>223?3:i>191?2:1;if(e+o<=n){let s,l,c,u;switch(o){case 1:i<128&&(a=i);break;case 2:s=t[e+1],(s&192)===128&&(u=(i&31)<<6|s&63,u>127&&(a=u));break;case 3:s=t[e+1],l=t[e+2],(s&192)===128&&(l&192)===128&&(u=(i&15)<<12|(s&63)<<6|l&63,u>2047&&(u<55296||u>57343)&&(a=u));break;case 4:s=t[e+1],l=t[e+2],c=t[e+3],(s&192)===128&&(l&192)===128&&(c&192)===128&&(u=(i&15)<<18|(s&63)<<12|(l&63)<<6|c&63,u>65535&&u<1114112&&(a=u))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),e+=o}return yee(r)}const Rk=4096;function yee(t){const e=t.length;if(e<=Rk)return String.fromCharCode.apply(String,t);let n="",r=0;for(;rr.length/2?(n=this.cursor===r.length?r:r.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):n=ZP(r,0,this.cursor)}else n=dee(this.chunks,this.cursor);return e&&this.reset(),n}}const $t="CBOR decode error:",o$="CBOR encode error:";function sg(t,e,n){if(t.length-e>>8,r&255])}else if(n>>24&255,r>>>16&255,r>>>8&255,r&255])}else{const r=BigInt(n);if(r>BigInt(32)&BigInt(4294967295));i[8]=a&255,a=a>>8,i[7]=a&255,a=a>>8,i[6]=a&255,a=a>>8,i[5]=a&255,i[4]=o&255,o=o>>8,i[3]=o&255,o=o>>8,i[2]=o&255,o=o>>8,i[1]=o&255,t.push(i)}else throw new Error(`${$t} encountered BigInt larger than allowable range`)}}bh.encodedSize=function(e){return Qa.encodedSize(e.value)};Qa.encodedSize=function(e){return en.value?1:0};function Aee(t,e,n,r){return new ut(de.negint,-1-gh(t,e+1,r),2)}function Eee(t,e,n,r){return new ut(de.negint,-1-yh(t,e+1,r),3)}function See(t,e,n,r){return new ut(de.negint,-1-mh(t,e+1,r),5)}const qP=BigInt(-1),s$=BigInt(1);function Pee(t,e,n,r){const i=vh(t,e+1,r);if(typeof i!="bigint"){const a=-1-i;if(a>=Number.MIN_SAFE_INTEGER)return new ut(de.negint,a,9)}if(r.allowBigInt!==!0)throw new Error(`${$t} integers outside of the safe integer range are not supported`);return new ut(de.negint,qP-BigInt(i),9)}function eO(t,e){const n=e.value,r=typeof n=="bigint"?n*qP-s$:n*-1-1;Qa(t,e.type.majorEncoded,r)}eO.encodedSize=function(e){const n=e.value,r=typeof n=="bigint"?n*qP-s$:n*-1-1;return rn.value?-1:0};function sv(t,e,n,r){sg(t,e,n+r);const i=ZP(t,e+n,e+n+r);return new ut(de.bytes,i,n+r)}function Oee(t,e,n,r){return sv(t,e,1,n)}function Tee(t,e,n,r){return sv(t,e,2,gh(t,e+1,r))}function Cee(t,e,n,r){return sv(t,e,3,yh(t,e+1,r))}function kee(t,e,n,r){return sv(t,e,5,mh(t,e+1,r))}function _ee(t,e,n,r){const i=vh(t,e+1,r);if(typeof i=="bigint")throw new Error(`${$t} 64-bit integer bytes lengths not supported`);return sv(t,e,9,i)}function ex(t){return t.encodedBytes===void 0&&(t.encodedBytes=t.type===de.string?hee(t.value):t.value),t.encodedBytes}function Y2(t,e){const n=ex(e);Qa(t,e.type.majorEncoded,n.length),t.push(n)}Y2.encodedSize=function(e){const n=ex(e);return Qa.encodedSize(n.length)+n.length};Y2.compareTokens=function(e,n){return Nee(ex(e),ex(n))};function Nee(t,e){return t.lengthe.length?1:gee(t,e)}function lv(t,e,n,r,i){const a=n+r;sg(t,e,a);const o=new ut(de.string,fee(t,e+n,e+a),a);return i.retainStringBytes===!0&&(o.byteValue=ZP(t,e+n,e+a)),o}function Iee(t,e,n,r){return lv(t,e,1,n,r)}function Ree(t,e,n,r){return lv(t,e,2,gh(t,e+1,r),r)}function Mee(t,e,n,r){return lv(t,e,3,yh(t,e+1,r),r)}function Bee(t,e,n,r){return lv(t,e,5,mh(t,e+1,r),r)}function Dee(t,e,n,r){const i=vh(t,e+1,r);if(typeof i=="bigint")throw new Error(`${$t} 64-bit integer string lengths not supported`);return lv(t,e,9,i,r)}const Lee=Y2;function lg(t,e,n,r){return new ut(de.array,r,n)}function $ee(t,e,n,r){return lg(t,e,1,n)}function Uee(t,e,n,r){return lg(t,e,2,gh(t,e+1,r))}function Fee(t,e,n,r){return lg(t,e,3,yh(t,e+1,r))}function jee(t,e,n,r){return lg(t,e,5,mh(t,e+1,r))}function zee(t,e,n,r){const i=vh(t,e+1,r);if(typeof i=="bigint")throw new Error(`${$t} 64-bit integer array lengths not supported`);return lg(t,e,9,i)}function Hee(t,e,n,r){if(r.allowIndefinite===!1)throw new Error(`${$t} indefinite length items not allowed`);return lg(t,e,1,1/0)}function tO(t,e){Qa(t,de.array.majorEncoded,e.value)}tO.compareTokens=bh.compareTokens;tO.encodedSize=function(e){return Qa.encodedSize(e.value)};function cg(t,e,n,r){return new ut(de.map,r,n)}function Gee(t,e,n,r){return cg(t,e,1,n)}function Vee(t,e,n,r){return cg(t,e,2,gh(t,e+1,r))}function Qee(t,e,n,r){return cg(t,e,3,yh(t,e+1,r))}function Kee(t,e,n,r){return cg(t,e,5,mh(t,e+1,r))}function Wee(t,e,n,r){const i=vh(t,e+1,r);if(typeof i=="bigint")throw new Error(`${$t} 64-bit integer map lengths not supported`);return cg(t,e,9,i)}function Jee(t,e,n,r){if(r.allowIndefinite===!1)throw new Error(`${$t} indefinite length items not allowed`);return cg(t,e,1,1/0)}function nO(t,e){Qa(t,de.map.majorEncoded,e.value)}nO.compareTokens=bh.compareTokens;nO.encodedSize=function(e){return Qa.encodedSize(e.value)};function Yee(t,e,n,r){return new ut(de.tag,n,1)}function Xee(t,e,n,r){return new ut(de.tag,gh(t,e+1,r),2)}function Zee(t,e,n,r){return new ut(de.tag,yh(t,e+1,r),3)}function qee(t,e,n,r){return new ut(de.tag,mh(t,e+1,r),5)}function ete(t,e,n,r){return new ut(de.tag,vh(t,e+1,r),9)}function rO(t,e){Qa(t,de.tag.majorEncoded,e.value)}rO.compareTokens=bh.compareTokens;rO.encodedSize=function(e){return Qa.encodedSize(e.value)};const tte=20,nte=21,rte=22,ite=23;function ate(t,e,n,r){if(r.allowUndefined===!1)throw new Error(`${$t} undefined values are not supported`);return r.coerceUndefinedToNull===!0?new ut(de.null,null,1):new ut(de.undefined,void 0,1)}function ote(t,e,n,r){if(r.allowIndefinite===!1)throw new Error(`${$t} indefinite length items not allowed`);return new ut(de.break,void 0,1)}function iO(t,e,n){if(n){if(n.allowNaN===!1&&Number.isNaN(t))throw new Error(`${$t} NaN values are not supported`);if(n.allowInfinity===!1&&(t===1/0||t===-1/0))throw new Error(`${$t} Infinity values are not supported`)}return new ut(de.float,t,e)}function ste(t,e,n,r){return iO(oO(t,e+1),3,r)}function lte(t,e,n,r){return iO(sO(t,e+1),5,r)}function cte(t,e,n,r){return iO(f$(t,e+1),9,r)}function aO(t,e,n){const r=e.value;if(r===!1)t.push([de.float.majorEncoded|tte]);else if(r===!0)t.push([de.float.majorEncoded|nte]);else if(r===null)t.push([de.float.majorEncoded|rte]);else if(r===void 0)t.push([de.float.majorEncoded|ite]);else{let i,a=!1;(!n||n.float64!==!0)&&(c$(r),i=oO(eo,1),r===i||Number.isNaN(r)?(eo[0]=249,t.push(eo.slice(0,3)),a=!0):(u$(r),i=sO(eo,1),r===i&&(eo[0]=250,t.push(eo.slice(0,5)),a=!0))),a||(ute(r),i=f$(eo,1),eo[0]=251,t.push(eo.slice(0,9)))}}aO.encodedSize=function(e,n){const r=e.value;if(r===!1||r===!0||r===null||r===void 0)return 1;if(!n||n.float64!==!0){c$(r);let i=oO(eo,1);if(r===i||Number.isNaN(r))return 3;if(u$(r),i=sO(eo,1),r===i)return 5}return 9};const l$=new ArrayBuffer(9),ba=new DataView(l$,1),eo=new Uint8Array(l$,0);function c$(t){if(t===1/0)ba.setUint16(0,31744,!1);else if(t===-1/0)ba.setUint16(0,64512,!1);else if(Number.isNaN(t))ba.setUint16(0,32256,!1);else{ba.setFloat32(0,t);const e=ba.getUint32(0),n=(e&2139095040)>>23,r=e&8388607;if(n===255)ba.setUint16(0,31744,!1);else if(n===0)ba.setUint16(0,(t&2147483648)>>16|r>>13,!1);else{const i=n-127;i<-24?ba.setUint16(0,0):i<-14?ba.setUint16(0,(e&2147483648)>>16|1<<24+i,!1):ba.setUint16(0,(e&2147483648)>>16|i+15<<10|r>>13,!1)}}}function oO(t,e){if(t.length-e<2)throw new Error(`${$t} not enough data for float16`);const n=(t[e]<<8)+t[e+1];if(n===31744)return 1/0;if(n===64512)return-1/0;if(n===32256)return NaN;const r=n>>10&31,i=n&1023;let a;return r===0?a=i*2**-24:r!==31?a=(i+1024)*2**(r-25):a=i===0?1/0:NaN,n&32768?-a:a}function u$(t){ba.setFloat32(0,t,!1)}function sO(t,e){if(t.length-e<4)throw new Error(`${$t} not enough data for float32`);const n=(t.byteOffset||0)+e;return new DataView(t.buffer,n,4).getFloat32(0,!1)}function ute(t){ba.setFloat64(0,t,!1)}function f$(t,e){if(t.length-e<8)throw new Error(`${$t} not enough data for float64`);const n=(t.byteOffset||0)+e;return new DataView(t.buffer,n,8).getFloat64(0,!1)}aO.compareTokens=bh.compareTokens;function tn(t,e,n){throw new Error(`${$t} encountered invalid minor (${n}) for major ${t[e]>>>5}`)}function X2(t){return()=>{throw new Error(`${$t} ${t}`)}}const Ie=[];for(let t=0;t<=23;t++)Ie[t]=tn;Ie[24]=vee;Ie[25]=bee;Ie[26]=wee;Ie[27]=xee;Ie[28]=tn;Ie[29]=tn;Ie[30]=tn;Ie[31]=tn;for(let t=32;t<=55;t++)Ie[t]=tn;Ie[56]=Aee;Ie[57]=Eee;Ie[58]=See;Ie[59]=Pee;Ie[60]=tn;Ie[61]=tn;Ie[62]=tn;Ie[63]=tn;for(let t=64;t<=87;t++)Ie[t]=Oee;Ie[88]=Tee;Ie[89]=Cee;Ie[90]=kee;Ie[91]=_ee;Ie[92]=tn;Ie[93]=tn;Ie[94]=tn;Ie[95]=X2("indefinite length bytes/strings are not supported");for(let t=96;t<=119;t++)Ie[t]=Iee;Ie[120]=Ree;Ie[121]=Mee;Ie[122]=Bee;Ie[123]=Dee;Ie[124]=tn;Ie[125]=tn;Ie[126]=tn;Ie[127]=X2("indefinite length bytes/strings are not supported");for(let t=128;t<=151;t++)Ie[t]=$ee;Ie[152]=Uee;Ie[153]=Fee;Ie[154]=jee;Ie[155]=zee;Ie[156]=tn;Ie[157]=tn;Ie[158]=tn;Ie[159]=Hee;for(let t=160;t<=183;t++)Ie[t]=Gee;Ie[184]=Vee;Ie[185]=Qee;Ie[186]=Kee;Ie[187]=Wee;Ie[188]=tn;Ie[189]=tn;Ie[190]=tn;Ie[191]=Jee;for(let t=192;t<=215;t++)Ie[t]=Yee;Ie[216]=Xee;Ie[217]=Zee;Ie[218]=qee;Ie[219]=ete;Ie[220]=tn;Ie[221]=tn;Ie[222]=tn;Ie[223]=tn;for(let t=224;t<=243;t++)Ie[t]=X2("simple values are not supported");Ie[244]=tn;Ie[245]=tn;Ie[246]=tn;Ie[247]=ate;Ie[248]=X2("simple values are not supported");Ie[249]=ste;Ie[250]=lte;Ie[251]=cte;Ie[252]=tn;Ie[253]=tn;Ie[254]=tn;Ie[255]=ote;const gs=[];for(let t=0;t<24;t++)gs[t]=new ut(de.uint,t,1);for(let t=-1;t>=-24;t--)gs[31-t]=new ut(de.negint,t,1);gs[64]=new ut(de.bytes,new Uint8Array(0),1);gs[96]=new ut(de.string,"",1);gs[128]=new ut(de.array,0,1);gs[160]=new ut(de.map,0,1);gs[244]=new ut(de.false,!1,1);gs[245]=new ut(de.true,!0,1);gs[246]=new ut(de.null,null,1);function fte(t){switch(t.type){case de.false:return bs([244]);case de.true:return bs([245]);case de.null:return bs([246]);case de.bytes:return t.value.length?void 0:bs([64]);case de.string:return t.value===""?bs([96]):void 0;case de.array:return t.value===0?bs([128]):void 0;case de.map:return t.value===0?bs([160]):void 0;case de.uint:return t.value<24?bs([Number(t.value)]):void 0;case de.negint:if(t.value>=-24)return bs([31-Number(t.value)])}}const hte={float64:!1,mapSorter:gte,quickEncodeToken:fte};function dte(){const t=[];return t[de.uint.major]=bh,t[de.negint.major]=eO,t[de.bytes.major]=Y2,t[de.string.major]=Lee,t[de.array.major]=tO,t[de.map.major]=nO,t[de.tag.major]=rO,t[de.float.major]=aO,t}const h$=dte(),Y6=new a$;class tx{constructor(e,n){this.obj=e,this.parent=n}includes(e){let n=this;do if(n.obj===e)return!0;while(n=n.parent);return!1}static createCheck(e,n){if(e&&e.includes(n))throw new Error(`${o$} object contains circular references`);return new tx(n,e)}}const Vl={null:new ut(de.null,null),undefined:new ut(de.undefined,void 0),true:new ut(de.true,!0),false:new ut(de.false,!1),emptyArray:new ut(de.array,0),emptyMap:new ut(de.map,0)},eu={number(t,e,n,r){return!Number.isInteger(t)||!Number.isSafeInteger(t)?new ut(de.float,t):t>=0?new ut(de.uint,t):new ut(de.negint,t)},bigint(t,e,n,r){return t>=BigInt(0)?new ut(de.uint,t):new ut(de.negint,t)},Uint8Array(t,e,n,r){return new ut(de.bytes,t)},string(t,e,n,r){return new ut(de.string,t)},boolean(t,e,n,r){return t?Vl.true:Vl.false},null(t,e,n,r){return Vl.null},undefined(t,e,n,r){return Vl.undefined},ArrayBuffer(t,e,n,r){return new ut(de.bytes,new Uint8Array(t))},DataView(t,e,n,r){return new ut(de.bytes,new Uint8Array(t.buffer,t.byteOffset,t.byteLength))},Array(t,e,n,r){if(!t.length)return n.addBreakTokens===!0?[Vl.emptyArray,new ut(de.break)]:Vl.emptyArray;r=tx.createCheck(r,t);const i=[];let a=0;for(const o of t)i[a++]=qb(o,n,r);return n.addBreakTokens?[new ut(de.array,t.length),i,new ut(de.break)]:[new ut(de.array,t.length),i]},Object(t,e,n,r){const i=e!=="Object",a=i?t.keys():Object.keys(t),o=i?t.size:a.length;if(!o)return n.addBreakTokens===!0?[Vl.emptyMap,new ut(de.break)]:Vl.emptyMap;r=tx.createCheck(r,t);const s=[];let l=0;for(const c of a)s[l++]=[qb(c,n,r),qb(i?t.get(c):t[c],n,r)];return pte(s,n),n.addBreakTokens?[new ut(de.map,o),s,new ut(de.break)]:[new ut(de.map,o),s]}};eu.Map=eu.Object;eu.Buffer=eu.Uint8Array;for(const t of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))eu[`${t}Array`]=eu.DataView;function qb(t,e={},n){const r=oee(t),i=e&&e.typeEncoders&&e.typeEncoders[r]||eu[r];if(typeof i=="function"){const o=i(t,r,e,n);if(o!=null)return o}const a=eu[r];if(!a)throw new Error(`${o$} unsupported type: ${r}`);return a(t,r,e,n)}function pte(t,e){e.mapSorter&&t.sort(e.mapSorter)}function gte(t,e){const n=Array.isArray(t[0])?t[0][0]:t[0],r=Array.isArray(e[0])?e[0][0]:e[0];if(n.type!==r.type)return n.type.compare(r.type);const i=n.type.major,a=h$[i].compareTokens(n,r);return a===0&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone"),a}function d$(t,e,n,r){if(Array.isArray(e))for(const i of e)d$(t,i,n,r);else n[e.type.major](t,e,r)}function yte(t,e,n){const r=qb(t,n);if(!Array.isArray(r)&&n.quickEncodeToken){const i=n.quickEncodeToken(r);if(i)return i;const a=e[r.type.major];if(a.encodedSize){const o=a.encodedSize(r,n),s=new a$(o);if(a(s,r,n),s.chunks.length!==1)throw new Error(`Unexpected error: pre-calculated length for ${r} was wrong`);return i$(s.chunks[0])}}return Y6.reset(),d$(Y6,r,e,n),Y6.toBytes(!0)}function Fh(t,e){return e=Object.assign({},hte,e),yte(t,h$,e)}const mte={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0};class vte{constructor(e,n={}){this.pos=0,this.data=e,this.options=n}done(){return this.pos>=this.data.length}next(){const e=this.data[this.pos];let n=gs[e];if(n===void 0){const r=Ie[e];if(!r)throw new Error(`${$t} no decoder for major type ${e>>>5} (byte 0x${e.toString(16).padStart(2,"0")})`);const i=e&31;n=r(this.data,this.pos,i,this.options)}return this.pos+=n.encodedLength,n}}const h1=Symbol.for("DONE"),Z2=Symbol.for("BREAK");function bte(t,e,n){const r=[];for(let i=0;ia.trim());for(let a=0;aPromise.resolve(t[r])))).reduce((r,i,a)=>(r[e[a]]=i,r),{})}function mt(t,e,n){for(let r in e){let i=e[r];const a=n?n[r]:null;a&&Ate(i,a,r),Object.defineProperty(t,r,{enumerable:!0,value:i,writable:!1})}}function hd(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(hd).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let n="0x";for(let r=0;r>4],n+=e[t[r]&15];return n}if(typeof t=="object"&&typeof t.toJSON=="function")return hd(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(n=>`${hd(n)}: ${hd(t[n])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Kr(t,e){return t&&t.code===e}function lO(t){return Kr(t,"CALL_EXCEPTION")}function qn(t,e,n){let r=t;{const a=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will overwrite populated values: ${hd(n)}`);for(const o in n){if(o==="shortMessage")continue;const s=n[o];a.push(o+"="+hd(s))}}a.push(`code=${e}`),a.push(`version=${xte}`),a.length&&(t+=" ("+a.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(t);break;default:i=new Error(t)}return mt(i,{code:e}),n&&Object.assign(i,n),i.shortMessage==null&&mt(i,{shortMessage:r}),i}function me(t,e,n,r){if(!t)throw qn(e,n,r)}function J(t,e,n,r){me(t,e,"INVALID_ARGUMENT",{argument:n,value:r})}function p$(t,e,n){n==null&&(n=""),n&&(n=": "+n),me(t>=e,"missing arguemnt"+n,"MISSING_ARGUMENT",{count:t,expectedCount:e}),me(t<=e,"too many arguemnts"+n,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const Ete=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");t.push(e)}catch{}return t},[]);function Ste(t){me(Ete.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function q2(t,e,n){if(n==null&&(n=""),t!==e){let r=n,i="new";n&&(r+=".",i+=" "+n),me(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function g$(t,e,n){if(t instanceof Uint8Array)return n?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x([0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((t.length-2)/2);let i=2;for(let a=0;a>4]+Mk[i&15]}return n}function sr(t){return"0x"+t.map(e=>Ze(e).substring(2)).join("")}function Nd(t){return In(t,!0)?(t.length-2)/2:Pt(t).length}function Fn(t,e,n){const r=Pt(t);return n!=null&&n>r.length&&me(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),Ze(r.slice(e??0,n??r.length))}function y$(t,e,n){const r=Pt(t);me(e>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),n?i.set(r,e-r.length):i.set(r,0),Ze(i)}function oh(t,e){return y$(t,e,!0)}function Pte(t,e){return y$(t,e,!1)}const eA=BigInt(0),wo=BigInt(1),dd=9007199254740991;function Ote(t,e){const n=tA(t,"value"),r=BigInt(Lt(e,"width"));if(me(n>>r===eA,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),n>>r-wo){const i=(wo<=-dd&&t<=dd,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(n){J(!1,`invalid BigNumberish string: ${n.message}`,e||"value",t)}}J(!1,"invalid BigNumberish value",e||"value",t)}function tA(t,e){const n=ot(t,e);return me(n>=eA,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),n}const Bk="0123456789abcdef";function cO(t){if(t instanceof Uint8Array){let e="0x0";for(const n of t)e+=Bk[n>>4],e+=Bk[n&15];return BigInt(e)}return ot(t)}function Lt(t,e){switch(typeof t){case"bigint":return J(t>=-dd&&t<=dd,"overflow",e||"value",t),Number(t);case"number":return J(Number.isInteger(t),"underflow",e||"value",t),J(t>=-dd&&t<=dd,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return Lt(BigInt(t),e)}catch(n){J(!1,`invalid numeric string: ${n.message}`,e||"value",t)}}J(!1,"invalid numeric value",e||"value",t)}function Tte(t){return Lt(cO(t))}function fs(t,e){let r=tA(t,"value").toString(16);if(e==null)r.length%2&&(r="0"+r);else{const i=Lt(e,"width");for(me(i*2>=r.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});r.length>6===2;o++)a++;return a}return t==="OVERRUN"?n.length-e-1:0}function Ite(t,e,n,r,i){return t==="OVERLONG"?(J(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),b$(t,e,n))}const Rte=Object.freeze({error:Nte,ignore:b$,replace:Ite});function Mte(t,e){e==null&&(e=Rte.error);const n=Pt(t,"bytes"),r=[];let i=0;for(;i>7)){r.push(a);continue}let o=null,s=null;if((a&224)===192)o=1,s=127;else if((a&240)===224)o=2,s=2047;else if((a&248)===240)o=3,s=65535;else{(a&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,n,r):i+=e("BAD_PREFIX",i-1,n,r);continue}if(i-1+o>=n.length){i+=e("OVERRUN",i-1,n,r);continue}let l=a&(1<<8-o-1)-1;for(let c=0;c1114111){i+=e("OUT_OF_RANGE",i-1-o,n,r,l);continue}if(l>=55296&&l<=57343){i+=e("UTF16_SURROGATE",i-1-o,n,r,l);continue}if(l<=s){i+=e("OVERLONG",i-1-o,n,r,l);continue}r.push(l)}}return r}function hl(t,e){e!=null&&(Ste(e),t=t.normalize(e));let n=[];for(let r=0;r>6|192),n.push(i&63|128);else if((i&64512)==55296){r++;const a=t.charCodeAt(r);J(r>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128)}else n.push(i>>12|224),n.push(i>>6&63|128),n.push(i&63|128)}return new Uint8Array(n)}function Bte(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function uO(t,e){return Bte(Mte(t,e))}function w$(t){async function e(n,r){const i=n.url.split(":")[0].toLowerCase();me(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),me(i==="https"||!n.credentials||n.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let a;if(r){const f=new AbortController;a=f.signal,r.addListener(()=>{f.abort()})}const o={method:n.method,headers:new Headers(Array.from(n)),body:n.body||void 0,signal:a},s=await fetch(n.url,o),l={};s.headers.forEach((f,h)=>{l[h.toLowerCase()]=f});const c=await s.arrayBuffer(),u=c==null?null:new Uint8Array(c);return{statusCode:s.status,statusMessage:s.statusText,headers:l,body:u}}return e}const Dte=12,Lte=250;let $k=w$();const $te=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Ute=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let X6=!1;async function x$(t,e){try{const n=t.match($te);if(!n)throw new Error("invalid data");return new Jc(200,"OK",{"content-type":n[1]||"text/plain"},n[2]?kte(n[3]):jte(n[3]))}catch{return new Jc(599,"BAD REQUEST (invalid data: URI)",{},null,new El(t))}}function A$(t){async function e(n,r){try{const i=n.match(Ute);if(!i)throw new Error("invalid link");return new El(`${t}${i[2]}`)}catch{return new Jc(599,"BAD REQUEST (invalid IPFS URI)",{},null,new El(n))}}return e}const Xv={data:x$,ipfs:A$("https://gateway.ipfs.io/ipfs/")},E$=new WeakMap;var gf,mc;class Fte{constructor(e){M(this,gf,void 0);M(this,mc,void 0);O(this,gf,[]),O(this,mc,!1),E$.set(e,()=>{if(!v(this,mc)){O(this,mc,!0);for(const n of v(this,gf))setTimeout(()=>{n()},0);O(this,gf,[])}})}addListener(e){me(!v(this,mc),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),v(this,gf).push(e)}get cancelled(){return v(this,mc)}checkSignal(){me(!this.cancelled,"cancelled","CANCELLED",{})}}gf=new WeakMap,mc=new WeakMap;function Zv(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var P0,O0,lo,zs,T0,C0,ur,qi,Hs,yf,mf,vf,Vo,Gs,vc,bf,sy;const c2=class c2{constructor(e){M(this,bf);M(this,P0,void 0);M(this,O0,void 0);M(this,lo,void 0);M(this,zs,void 0);M(this,T0,void 0);M(this,C0,void 0);M(this,ur,void 0);M(this,qi,void 0);M(this,Hs,void 0);M(this,yf,void 0);M(this,mf,void 0);M(this,vf,void 0);M(this,Vo,void 0);M(this,Gs,void 0);M(this,vc,void 0);O(this,C0,String(e)),O(this,P0,!1),O(this,O0,!0),O(this,lo,{}),O(this,zs,""),O(this,T0,3e5),O(this,Gs,{slotInterval:Lte,maxAttempts:Dte}),O(this,vc,null)}get url(){return v(this,C0)}set url(e){O(this,C0,String(e))}get body(){return v(this,ur)==null?null:new Uint8Array(v(this,ur))}set body(e){if(e==null)O(this,ur,void 0),O(this,qi,void 0);else if(typeof e=="string")O(this,ur,hl(e)),O(this,qi,"text/plain");else if(e instanceof Uint8Array)O(this,ur,e),O(this,qi,"application/octet-stream");else if(typeof e=="object")O(this,ur,hl(JSON.stringify(e))),O(this,qi,"application/json");else throw new Error("invalid body")}hasBody(){return v(this,ur)!=null}get method(){return v(this,zs)?v(this,zs):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),O(this,zs,String(e).toUpperCase())}get headers(){const e=Object.assign({},v(this,lo));return v(this,Hs)&&(e.authorization=`Basic ${_te(hl(v(this,Hs)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&v(this,qi)&&(e["content-type"]=v(this,qi)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,n){v(this,lo)[String(e).toLowerCase()]=String(n)}clearHeaders(){O(this,lo,{})}[Symbol.iterator](){const e=this.headers,n=Object.keys(e);let r=0;return{next:()=>{if(r=0,"timeout must be non-zero","timeout",e),O(this,T0,e)}get preflightFunc(){return v(this,yf)||null}set preflightFunc(e){O(this,yf,e)}get processFunc(){return v(this,mf)||null}set processFunc(e){O(this,mf,e)}get retryFunc(){return v(this,vf)||null}set retryFunc(e){O(this,vf,e)}get getUrlFunc(){return v(this,vc)||$k}set getUrlFunc(e){O(this,vc,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(v(this,Gs).slotInterval=e.slotInterval),e.maxAttempts!=null&&(v(this,Gs).maxAttempts=e.maxAttempts)}send(){return me(v(this,Vo)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),O(this,Vo,new Fte(this)),ie(this,bf,sy).call(this,0,Uk()+this.timeout,0,this,new Jc(0,"",{},null,this))}cancel(){me(v(this,Vo)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=E$.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const n=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();me(this.method==="GET"&&(n!=="https"||r!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new c2(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,O(i,lo,Object.assign({},v(this,lo))),v(this,ur)&&O(i,ur,new Uint8Array(v(this,ur))),O(i,qi,v(this,qi)),i}clone(){const e=new c2(this.url);return O(e,zs,v(this,zs)),v(this,ur)&&O(e,ur,v(this,ur)),O(e,qi,v(this,qi)),O(e,lo,Object.assign({},v(this,lo))),O(e,Hs,v(this,Hs)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),O(e,yf,v(this,yf)),O(e,mf,v(this,mf)),O(e,vf,v(this,vf)),O(e,vc,v(this,vc)),e}static lockConfig(){X6=!0}static getGateway(e){return Xv[e.toLowerCase()]||null}static registerGateway(e,n){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(X6)throw new Error("gateways locked");Xv[e]=n}static registerGetUrl(e){if(X6)throw new Error("gateways locked");$k=e}static createGetUrlFunc(e){return w$()}static createDataGateway(){return x$}static createIpfsGatewayFunc(e){return A$(e)}};P0=new WeakMap,O0=new WeakMap,lo=new WeakMap,zs=new WeakMap,T0=new WeakMap,C0=new WeakMap,ur=new WeakMap,qi=new WeakMap,Hs=new WeakMap,yf=new WeakMap,mf=new WeakMap,vf=new WeakMap,Vo=new WeakMap,Gs=new WeakMap,vc=new WeakMap,bf=new WeakSet,sy=async function(e,n,r,i,a){var u,f,h;if(e>=v(this,Gs).maxAttempts)return a.makeServerError("exceeded maximum retry limit");me(Uk()<=n,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),r>0&&await zte(r);let o=this.clone();const s=(o.url.split(":")[0]||"").toLowerCase();if(s in Xv){const d=await Xv[s](o.url,Zv(v(i,Vo)));if(d instanceof Jc){let g=d;if(this.processFunc){Zv(v(i,Vo));try{g=await this.processFunc(o,g)}catch(p){(p.throttle==null||typeof p.stall!="number")&&g.makeServerError("error in post-processing function",p).assertOk()}}return g}o=d}this.preflightFunc&&(o=await this.preflightFunc(o));const l=await this.getUrlFunc(o,Zv(v(i,Vo)));let c=new Jc(l.statusCode,l.statusMessage,l.headers,l.body,i);if(c.statusCode===301||c.statusCode===302){try{const d=c.headers.location||"";return ie(u=o.redirect(d),bf,sy).call(u,e+1,n,0,i,c)}catch{}return c}else if(c.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,c,e))){const d=c.headers["retry-after"];let g=v(this,Gs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof d=="string"&&d.match(/^[1-9][0-9]*$/)&&(g=parseInt(d)),ie(f=o.clone(),bf,sy).call(f,e+1,n,g,i,c)}if(this.processFunc){Zv(v(i,Vo));try{c=await this.processFunc(o,c)}catch(d){(d.throttle==null||typeof d.stall!="number")&&c.makeServerError("error in post-processing function",d).assertOk();let g=v(this,Gs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return d.stall>=0&&(g=d.stall),ie(h=o.clone(),bf,sy).call(h,e+1,n,g,i,c)}}return c};let El=c2;var km,_m,Nm,co,k0,wf;const B4=class B4{constructor(e,n,r,i,a){M(this,km,void 0);M(this,_m,void 0);M(this,Nm,void 0);M(this,co,void 0);M(this,k0,void 0);M(this,wf,void 0);O(this,km,e),O(this,_m,n),O(this,Nm,Object.keys(r).reduce((o,s)=>(o[s.toLowerCase()]=String(r[s]),o),{})),O(this,co,i==null?null:new Uint8Array(i)),O(this,k0,a||null),O(this,wf,{message:""})}toString(){return``}get statusCode(){return v(this,km)}get statusMessage(){return v(this,_m)}get headers(){return Object.assign({},v(this,Nm))}get body(){return v(this,co)==null?null:new Uint8Array(v(this,co))}get bodyText(){try{return v(this,co)==null?"":uO(v(this,co))}catch{me(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{me(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,n=Object.keys(e);let r=0;return{next:()=>{if(r=0,"invalid stall timeout","stall",n);const r=new Error(e||"throttling requests");throw mt(r,{stall:n,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return v(this,co)!=null}get request(){return v(this,k0)}ok(){return v(this,wf).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:n}=v(this,wf);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`),me(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:n})}};km=new WeakMap,_m=new WeakMap,Nm=new WeakMap,co=new WeakMap,k0=new WeakMap,wf=new WeakMap;let Jc=B4;function Uk(){return new Date().getTime()}function jte(t){return hl(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,n)=>String.fromCharCode(parseInt(n,16))))}function zte(t){return new Promise(e=>setTimeout(e,t))}function Hte(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function Fk(t,e,n){let r=0;for(let i=0;i{me(r<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:r})};if(t[e]>=248){const r=t[e]-247;n(e+1+r);const i=Fk(t,e+1,r);return n(e+1+r+i),jk(t,e,e+1+r,r+i)}else if(t[e]>=192){const r=t[e]-192;return n(e+1+r),jk(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;n(e+1+r);const i=Fk(t,e+1,r);n(e+1+r+i);const a=Ze(t.slice(e+1+r,e+1+r+i));return{consumed:1+r+i,result:a}}else if(t[e]>=128){const r=t[e]-128;n(e+1+r);const i=Ze(t.slice(e+1,e+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:Hte(t[e])}}function fO(t){const e=Pt(t,"data"),n=S$(e,0);return J(n.consumed===e.length,"unexpected junk after rlp payload","data",t),n.result}function zk(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function P$(t){if(Array.isArray(t)){let r=[];if(t.forEach(function(a){r=r.concat(P$(a))}),r.length<=55)return r.unshift(192+r.length),r;const i=zk(r.length);return i.unshift(247+i.length),i.concat(r)}const e=Array.prototype.slice.call(Pt(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const n=zk(e.length);return n.unshift(183+n.length),n.concat(e)}const Hk="0123456789abcdef";function p1(t){let e="0x";for(const n of P$(t))e+=Hk[n>>4],e+=Hk[n&15];return e}const ui=32,w3=new Uint8Array(ui),Gte=["then"],qv={};function Lg(t,e){const n=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw n.error=e,n}var bc;const $y=class $y extends Array{constructor(...n){const r=n[0];let i=n[1],a=(n[2]||[]).slice(),o=!0;r!==qv&&(i=n,a=[],o=!1);super(i.length);M(this,bc,void 0);i.forEach((l,c)=>{this[c]=l});const s=a.reduce((l,c)=>(typeof c=="string"&&l.set(c,(l.get(c)||0)+1),l),new Map);if(O(this,bc,Object.freeze(i.map((l,c)=>{const u=a[c];return u!=null&&s.get(u)===1?u:null}))),!!o)return Object.freeze(this),new Proxy(this,{get:(l,c,u)=>{if(typeof c=="string"){if(c.match(/^[0-9]+$/)){const h=Lt(c,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");const d=l[h];return d instanceof Error&&Lg(`index ${h}`,d),d}if(Gte.indexOf(c)>=0)return Reflect.get(l,c,u);const f=l[c];if(f instanceof Function)return function(...h){return f.apply(this===u?l:this,h)};if(!(c in l))return l.getValue.apply(this===u?l:this,[c])}return Reflect.get(l,c,u)}})}toArray(){const n=[];return this.forEach((r,i)=>{r instanceof Error&&Lg(`index ${i}`,r),n.push(r)}),n}toObject(){return v(this,bc).reduce((n,r,i)=>(me(r!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),r in n||(n[r]=this.getValue(r)),n),{})}slice(n,r){n==null&&(n=0),n<0&&(n+=this.length,n<0&&(n=0)),r==null&&(r=this.length),r<0&&(r+=this.length,r<0&&(r=0)),r>this.length&&(r=this.length);const i=[],a=[];for(let o=n;o{v(this,Vs)[e]=Gk(n)}}}Vs=new WeakMap,xf=new WeakMap,_0=new WeakSet,tw=function(e){return v(this,Vs).push(e),O(this,xf,v(this,xf)+e.length),e.length};var Ai,ea,Af,Ef,wc,Im,E3,u2,O$;const D4=class D4{constructor(e,n,r){M(this,Im);M(this,u2);R(this,"allowLoose");M(this,Ai,void 0);M(this,ea,void 0);M(this,Af,void 0);M(this,Ef,void 0);M(this,wc,void 0);mt(this,{allowLoose:!!n}),O(this,Ai,Or(e)),O(this,Af,0),O(this,Ef,null),O(this,wc,r??1024),O(this,ea,0)}get data(){return Ze(v(this,Ai))}get dataLength(){return v(this,Ai).length}get consumed(){return v(this,ea)}get bytes(){return new Uint8Array(v(this,Ai))}subReader(e){const n=new D4(v(this,Ai).slice(v(this,ea)+e),this.allowLoose,v(this,wc));return O(n,Ef,this),n}readBytes(e,n){let r=ie(this,u2,O$).call(this,0,e,!!n);return ie(this,Im,E3).call(this,e),O(this,ea,v(this,ea)+r.length),r.slice(0,e)}readValue(){return cO(this.readBytes(ui))}readIndex(){return Tte(this.readBytes(ui))}};Ai=new WeakMap,ea=new WeakMap,Af=new WeakMap,Ef=new WeakMap,wc=new WeakMap,Im=new WeakSet,E3=function(e){var n;if(v(this,Ef))return ie(n=v(this,Ef),Im,E3).call(n,e);O(this,Af,v(this,Af)+e),me(v(this,wc)<1||v(this,Af)<=v(this,wc)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${v(this,wc)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:Or(v(this,Ai)),offset:v(this,ea),length:e,info:{bytesRead:v(this,Af),dataLength:this.dataLength}})},u2=new WeakSet,O$=function(e,n,r){let i=Math.ceil(n/ui)*ui;return v(this,ea)+i>v(this,Ai).length&&(this.allowLoose&&r&&v(this,ea)+n<=v(this,Ai).length?i=n:me(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Or(v(this,Ai)),length:v(this,Ai).length,offset:v(this,ea)+i})),v(this,Ai).slice(v(this,ea),v(this,ea)+i)};let A3=D4,T$=!1;const C$=function(t){return DD(t)};let k$=C$;function Nn(t){const e=Pt(t,"data");return Ze(k$(e))}Nn._=C$;Nn.lock=function(){T$=!0};Nn.register=function(t){if(T$)throw new TypeError("keccak256 is locked");k$=t};Object.freeze(Nn);const S3="0x0000000000000000000000000000000000000000",Vk="0x0000000000000000000000000000000000000000000000000000000000000000",Qk=BigInt(0),Kk=BigInt(1),Wk=BigInt(2),Jk=BigInt(27),Yk=BigInt(28),eb=BigInt(35),kh={};function Xk(t){return oh(sa(t),32)}var N0,I0,R0,Sf;const to=class to{constructor(e,n,r,i){M(this,N0,void 0);M(this,I0,void 0);M(this,R0,void 0);M(this,Sf,void 0);q2(e,kh,"Signature"),O(this,N0,n),O(this,I0,r),O(this,R0,i),O(this,Sf,null)}get r(){return v(this,N0)}set r(e){J(Nd(e)===32,"invalid r","value",e),O(this,N0,Ze(e))}get s(){return v(this,I0)}set s(e){J(Nd(e)===32,"invalid s","value",e);const n=Ze(e);J(parseInt(n.substring(0,3))<8,"non-canonical s","value",n),O(this,I0,n)}get v(){return v(this,R0)}set v(e){const n=Lt(e,"value");J(n===27||n===28,"invalid v","v",e),O(this,R0,n)}get networkV(){return v(this,Sf)}get legacyChainId(){const e=this.networkV;return e==null?null:to.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=Pt(this.s);return this.yParity&&(e[0]|=128),Ze(e)}get compactSerialized(){return sr([this.r,this.yParityAndS])}get serialized(){return sr([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new to(kh,this.r,this.s,this.v);return this.networkV&&O(e,Sf,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const n=ot(e,"v");return n==Jk||n==Yk?Qk:(J(n>=eb,"invalid EIP-155 v","v",e),(n-eb)/Wk)}static getChainIdV(e,n){return ot(e)*Wk+BigInt(35+n-27)}static getNormalizedV(e){const n=ot(e);return n===Qk||n===Jk?27:n===Kk||n===Yk?28:(J(n>=eb,"invalid v","v",e),n&Kk?27:28)}static from(e){function n(c,u){J(c,u,"signature",e)}if(e==null)return new to(kh,Vk,Vk,27);if(typeof e=="string"){const c=Pt(e,"signature");if(c.length===64){const u=Ze(c.slice(0,32)),f=c.slice(32,64),h=f[0]&128?28:27;return f[0]&=127,new to(kh,u,Ze(f),h)}if(c.length===65){const u=Ze(c.slice(0,32)),f=c.slice(32,64);n((f[0]&128)===0,"non-canonical s");const h=to.getNormalizedV(c[64]);return new to(kh,u,Ze(f),h)}n(!1,"invalid raw signature length")}if(e instanceof to)return e.clone();const r=e.r;n(r!=null,"missing r");const i=Xk(r),a=function(c,u){if(c!=null)return Xk(c);if(u!=null){n(In(u,32),"invalid yParityAndS");const f=Pt(u);return f[0]&=127,Ze(f)}n(!1,"missing s")}(e.s,e.yParityAndS);n((Pt(a)[0]&128)==0,"non-canonical s");const{networkV:o,v:s}=function(c,u,f){if(c!=null){const h=ot(c);return{networkV:h>=eb?h:void 0,v:to.getNormalizedV(h)}}if(u!=null)return n(In(u,32),"invalid yParityAndS"),{v:Pt(u)[0]&128?28:27};if(f!=null){switch(Lt(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}n(!1,"invalid yParity")}n(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),l=new to(kh,i,a,s);return o&&O(l,Sf,o),n(e.yParity==null||Lt(e.yParity,"sig.yParity")===l.yParity,"yParity mismatch"),n(e.yParityAndS==null||e.yParityAndS===l.yParityAndS,"yParityAndS mismatch"),l}};N0=new WeakMap,I0=new WeakMap,R0=new WeakMap,Sf=new WeakMap;let To=to;var Qs;const ku=class ku{constructor(e){M(this,Qs,void 0);J(Nd(e)===32,"invalid private key","privateKey","[REDACTED]"),O(this,Qs,Ze(e))}get privateKey(){return v(this,Qs)}get publicKey(){return ku.computePublicKey(v(this,Qs))}get compressedPublicKey(){return ku.computePublicKey(v(this,Qs),!0)}sign(e){J(Nd(e)===32,"invalid digest length","digest",e);const n=ri.sign(Or(e),Or(v(this,Qs)),{lowS:!0});return To.from({r:fs(n.r,32),s:fs(n.s,32),v:n.recovery?28:27})}computeSharedSecret(e){const n=ku.computePublicKey(e);return Ze(ri.getSharedSecret(Or(v(this,Qs)),Pt(n),!1))}static computePublicKey(e,n){let r=Pt(e,"key");if(r.length===32){const a=ri.getPublicKey(r,!!n);return Ze(a)}if(r.length===64){const a=new Uint8Array(65);a[0]=4,a.set(r,1),r=a}const i=ri.ProjectivePoint.fromHex(r);return Ze(i.toRawBytes(n))}static recoverPublicKey(e,n){J(Nd(e)===32,"invalid digest length","digest",e);const r=To.from(n);let i=ri.Signature.fromCompact(Or(sr([r.r,r.s])));i=i.addRecoveryBit(r.yParity);const a=i.recoverPublicKey(Or(e));return J(a!=null,"invalid signautre for digest","signature",n),"0x"+a.toHex(!1)}static addPoints(e,n,r){const i=ri.ProjectivePoint.fromHex(ku.computePublicKey(e).substring(2)),a=ri.ProjectivePoint.fromHex(ku.computePublicKey(n).substring(2));return"0x"+i.add(a).toHex(!!r)}};Qs=new WeakMap;let g1=ku;const Vte=BigInt(0),Qte=BigInt(36);function Zk(t){t=t.toLowerCase();const e=t.substring(2).split(""),n=new Uint8Array(40);for(let i=0;i<40;i++)n[i]=e[i].charCodeAt(0);const r=Pt(Nn(n));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(r[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const hO={};for(let t=0;t<10;t++)hO[String(t)]=String(t);for(let t=0;t<26;t++)hO[String.fromCharCode(65+t)]=String(10+t);const qk=15;function Kte(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(r=>hO[r]).join("");for(;e.length>=qk;){let r=e.substring(0,qk);e=parseInt(r,10)%97+e.substring(r.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}const Wte=function(){const t={};for(let e=0;e<36;e++){const n="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[n]=BigInt(e)}return t}();function Jte(t){t=t.toLowerCase();let e=Vte;for(let n=0;ne.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return v(this,Pf)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return v(this,Pf)===!0?-1:v(this,Pf)===!1?this.value.length:null}static from(e,n){return new Ps(As,e,n)}static uint8(e){return Qe(e,8)}static uint16(e){return Qe(e,16)}static uint24(e){return Qe(e,24)}static uint32(e){return Qe(e,32)}static uint40(e){return Qe(e,40)}static uint48(e){return Qe(e,48)}static uint56(e){return Qe(e,56)}static uint64(e){return Qe(e,64)}static uint72(e){return Qe(e,72)}static uint80(e){return Qe(e,80)}static uint88(e){return Qe(e,88)}static uint96(e){return Qe(e,96)}static uint104(e){return Qe(e,104)}static uint112(e){return Qe(e,112)}static uint120(e){return Qe(e,120)}static uint128(e){return Qe(e,128)}static uint136(e){return Qe(e,136)}static uint144(e){return Qe(e,144)}static uint152(e){return Qe(e,152)}static uint160(e){return Qe(e,160)}static uint168(e){return Qe(e,168)}static uint176(e){return Qe(e,176)}static uint184(e){return Qe(e,184)}static uint192(e){return Qe(e,192)}static uint200(e){return Qe(e,200)}static uint208(e){return Qe(e,208)}static uint216(e){return Qe(e,216)}static uint224(e){return Qe(e,224)}static uint232(e){return Qe(e,232)}static uint240(e){return Qe(e,240)}static uint248(e){return Qe(e,248)}static uint256(e){return Qe(e,256)}static uint(e){return Qe(e,256)}static int8(e){return Qe(e,-8)}static int16(e){return Qe(e,-16)}static int24(e){return Qe(e,-24)}static int32(e){return Qe(e,-32)}static int40(e){return Qe(e,-40)}static int48(e){return Qe(e,-48)}static int56(e){return Qe(e,-56)}static int64(e){return Qe(e,-64)}static int72(e){return Qe(e,-72)}static int80(e){return Qe(e,-80)}static int88(e){return Qe(e,-88)}static int96(e){return Qe(e,-96)}static int104(e){return Qe(e,-104)}static int112(e){return Qe(e,-112)}static int120(e){return Qe(e,-120)}static int128(e){return Qe(e,-128)}static int136(e){return Qe(e,-136)}static int144(e){return Qe(e,-144)}static int152(e){return Qe(e,-152)}static int160(e){return Qe(e,-160)}static int168(e){return Qe(e,-168)}static int176(e){return Qe(e,-176)}static int184(e){return Qe(e,-184)}static int192(e){return Qe(e,-192)}static int200(e){return Qe(e,-200)}static int208(e){return Qe(e,-208)}static int216(e){return Qe(e,-216)}static int224(e){return Qe(e,-224)}static int232(e){return Qe(e,-232)}static int240(e){return Qe(e,-240)}static int248(e){return Qe(e,-248)}static int256(e){return Qe(e,-256)}static int(e){return Qe(e,-256)}static bytes1(e){return qt(e,1)}static bytes2(e){return qt(e,2)}static bytes3(e){return qt(e,3)}static bytes4(e){return qt(e,4)}static bytes5(e){return qt(e,5)}static bytes6(e){return qt(e,6)}static bytes7(e){return qt(e,7)}static bytes8(e){return qt(e,8)}static bytes9(e){return qt(e,9)}static bytes10(e){return qt(e,10)}static bytes11(e){return qt(e,11)}static bytes12(e){return qt(e,12)}static bytes13(e){return qt(e,13)}static bytes14(e){return qt(e,14)}static bytes15(e){return qt(e,15)}static bytes16(e){return qt(e,16)}static bytes17(e){return qt(e,17)}static bytes18(e){return qt(e,18)}static bytes19(e){return qt(e,19)}static bytes20(e){return qt(e,20)}static bytes21(e){return qt(e,21)}static bytes22(e){return qt(e,22)}static bytes23(e){return qt(e,23)}static bytes24(e){return qt(e,24)}static bytes25(e){return qt(e,25)}static bytes26(e){return qt(e,26)}static bytes27(e){return qt(e,27)}static bytes28(e){return qt(e,28)}static bytes29(e){return qt(e,29)}static bytes30(e){return qt(e,30)}static bytes31(e){return qt(e,31)}static bytes32(e){return qt(e,32)}static address(e){return new Ps(As,"address",e)}static bool(e){return new Ps(As,"bool",!!e)}static bytes(e){return new Ps(As,"bytes",e)}static string(e){return new Ps(As,"string",e)}static array(e,n){throw new Error("not implemented yet")}static tuple(e,n){throw new Error("not implemented yet")}static overrides(e){return new Ps(As,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===e_}static dereference(e,n){if(Ps.isTyped(e)){if(e.type!==n)throw new Error(`invalid type: expecetd ${n}, got ${e.type}`);return e.value}return e}};Pf=new WeakMap;let Wr=Ps;class Xte extends Rl{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,n){let r=Wr.dereference(n,"string");try{r=rn(r)}catch(i){return this._throwError(i.message,n)}return e.writeValue(r)}decode(e){return rn(fs(e.readValue(),20))}}class Zte extends Rl{constructor(n){super(n.name,n.type,"_",n.dynamic);R(this,"coder");this.coder=n}defaultValue(){return this.coder.defaultValue()}encode(n,r){return this.coder.encode(n,r)}decode(n){return this.coder.decode(n)}}function N$(t,e,n){let r=[];if(Array.isArray(n))r=n;else if(n&&typeof n=="object"){let l={};r=e.map(c=>{const u=c.localName;return me(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:c},value:n}),me(!l[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:c},value:n}),l[u]=!0,n[u]})}else J(!1,"invalid tuple value","tuple",n);J(e.length===r.length,"types/value length mismatch","tuple",n);let i=new x3,a=new x3,o=[];e.forEach((l,c)=>{let u=r[c];if(l.dynamic){let f=a.length;l.encode(a,u);let h=i.writeUpdatableValue();o.push(d=>{h(d+f)})}else l.encode(i,u)}),o.forEach(l=>{l(i.length)});let s=t.appendWriter(i);return s+=t.appendWriter(a),s}function I$(t,e){let n=[],r=[],i=t.subReader(0);return e.forEach(a=>{let o=null;if(a.dynamic){let s=t.readIndex(),l=i.subReader(s);try{o=a.decode(l)}catch(c){if(Kr(c,"BUFFER_OVERRUN"))throw c;o=c,o.baseType=a.name,o.name=a.localName,o.type=a.type}}else try{o=a.decode(t)}catch(s){if(Kr(s,"BUFFER_OVERRUN"))throw s;o=s,o.baseType=a.name,o.name=a.localName,o.type=a.type}if(o==null)throw new Error("investigate");n.push(o),r.push(a.localName||null)}),rx.fromItems(n,r)}class qte extends Rl{constructor(n,r,i){const a=n.type+"["+(r>=0?r:"")+"]",o=r===-1||n.dynamic;super("array",a,i,o);R(this,"coder");R(this,"length");mt(this,{coder:n,length:r})}defaultValue(){const n=this.coder.defaultValue(),r=[];for(let i=0;io||i<-(o+one))&&this._throwError("value out-of-bounds",r),i=m$(i,8*ui)}else(ioy(a,this.size*8))&&this._throwError("value out-of-bounds",r);return n.writeValue(i)}decode(n){let r=oy(n.readValue(),this.size*8);return this.signed&&(r=Ote(r,this.size*8)),r}}class cne extends R${constructor(e){super("string",e)}defaultValue(){return""}encode(e,n){return super.encode(e,hl(Wr.dereference(n,"string")))}decode(e){return uO(super.decode(e))}}class tb extends Rl{constructor(n,r){let i=!1;const a=[];n.forEach(s=>{s.dynamic&&(i=!0),a.push(s.type)});const o="tuple("+a.join(",")+")";super("tuple",o,r,i);R(this,"coders");mt(this,{coders:Object.freeze(n.slice())})}defaultValue(){const n=[];this.coders.forEach(i=>{n.push(i.defaultValue())});const r=this.coders.reduce((i,a)=>{const o=a.localName;return o&&(i[o]||(i[o]=0),i[o]++),i},{});return this.coders.forEach((i,a)=>{let o=i.localName;!o||r[o]!==1||(o==="length"&&(o="_length"),n[o]==null&&(n[o]=n[a]))}),Object.freeze(n)}encode(n,r){const i=Wr.dereference(r,"tuple");return N$(n,this.coders,i)}decode(n){return I$(n,this.coders)}}function sh(t){return Nn(hl(t))}var une="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";const t_=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),n_=4;function fne(t){let e=0;function n(){return t[e++]<<8|t[e++]}let r=n(),i=1,a=[0,1];for(let S=1;S>--l&1}const f=31,h=2**f,d=h>>>1,g=d>>1,p=h-1;let y=0;for(let S=0;S1;){let B=E+T>>>1;S>>1|u(),C=C<<1^d,N=(N^d)<<1|d|1;b=C,x=1+N-C}let A=r-4;return m.map(S=>{switch(S-A){case 3:return A+65792+(t[s++]<<16|t[s++]<<8|t[s++]);case 2:return A+256+(t[s++]<<8|t[s++]);case 1:return A+t[s++];default:return S-1}})}function hne(t){let e=0;return()=>t[e++]}function M$(t){return hne(fne(dne(t)))}function dne(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,a)=>e[i.charCodeAt(0)]=a);let n=t.length,r=new Uint8Array(6*n>>3);for(let i=0,a=0,o=0,s=0;i=8&&(r[a++]=s>>(o-=8));return r}function pne(t){return t&1?~t>>1:t>>1}function gne(t,e){let n=Array(t);for(let r=0,i=0;r{let e=y1(t);if(e.length)return e})}function D$(t){let e=[];for(;;){let n=t();if(n==0)break;e.push(yne(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(mne(n,t))}return e.flat()}function m1(t){let e=[];for(;;){let n=t(e.length);if(!n)break;e.push(n)}return e}function L$(t,e,n){let r=Array(t).fill().map(()=>[]);for(let i=0;ir[o].push(a));return r}function yne(t,e){let n=1+e(),r=e(),i=m1(e);return L$(i.length,1+t,e).flatMap((o,s)=>{let[l,...c]=o;return Array(i[s]).fill().map((u,f)=>{let h=f*r;return[l+f*n,c.map(d=>d+h)]})})}function mne(t,e){let n=1+e();return L$(n,1+t,e).map(i=>[i[0],i.slice(1)])}function vne(t){let e=[],n=y1(t);return i(r([]),[]),e;function r(a){let o=t(),s=m1(()=>{let l=y1(t).map(c=>n[c]);if(l.length)return r(l)});return{S:o,B:s,Q:a}}function i({S:a,B:o},s,l){if(!(a&4&&l===s[s.length-1])){a&2&&(l=s[s.length-1]),a&1&&e.push(s);for(let c of o)for(let u of c.Q)i(c,[...s,u],l)}}}function bne(t){return t.toString(16).toUpperCase().padStart(2,"0")}function $$(t){return`{${bne(t)}}`}function wne(t){let e=[];for(let n=0,r=t.length;n>24&255}function j$(t){return t&16777215}let P3,r_,O3,nw;function Cne(){let t=M$(Ane);P3=new Map(B$(t).flatMap((e,n)=>e.map(r=>[r,n+1<<24]))),r_=new Set(y1(t)),O3=new Map,nw=new Map;for(let[e,n]of D$(t)){if(!r_.has(e)&&n.length==2){let[r,i]=n,a=nw.get(r);a||(a=new Map,nw.set(r,a)),a.set(i,e)}O3.set(e,n.reverse())}}function z$(t){return t>=v1&&t=ix&&t=ax&&eox&&e0&&i(ox+c)}else{let o=O3.get(a);o?n.push(...o):i(a)}if(!n.length)break;a=n.pop()}if(r&&e.length>1){let a=ly(e[0]);for(let o=1;o0&&i>=o)o==0?(e.push(r,...n),n.length=0,r=s):n.push(s),i=o;else{let l=kne(r,s);l>=0?r=l:i==0&&o==0?(e.push(r),r=s):(n.push(s),i=o)}}return r>=0&&e.push(r,...n),e}function G$(t){return H$(t).map(j$)}function Nne(t){return _ne(H$(t))}const i_=45,V$=".",Q$=65039,K$=1,pd=t=>Array.from(t);function b1(t,e){return t.P.has(e)||t.Q.has(e)}class Ine extends Array{get is_emoji(){return!0}}let T3,W$,Fu,C3,J$,Id,q6,jh,Y$,a_,k3;function dO(){if(T3)return;let t=M$(une);const e=()=>y1(t),n=()=>new Set(e());T3=new Map(D$(t)),W$=n(),Fu=e(),C3=new Set(e().map(u=>Fu[u])),Fu=new Set(Fu),J$=n(),n();let r=B$(t),i=t();const a=()=>new Set(e().flatMap(u=>r[u]).concat(e()));Id=m1(u=>{let f=m1(t).map(h=>h+96);if(f.length){let h=u>=i;f[0]-=32,f=Op(f),h&&(f=`Restricted[${f}]`);let d=a(),g=a(),p=!t();return{N:f,P:d,Q:g,M:p,R:h}}}),q6=n(),jh=new Map;let o=e().concat(pd(q6)).sort((u,f)=>u-f);o.forEach((u,f)=>{let h=t(),d=o[f]=h?o[f-h]:{V:[],M:new Map};d.V.push(u),q6.has(u)||jh.set(u,d)});for(let{V:u,M:f}of new Set(jh.values())){let h=[];for(let g of u){let p=Id.filter(m=>b1(m,g)),y=h.find(({G:m})=>p.some(b=>m.has(b)));y||(y={G:new Set,V:[]},h.push(y)),y.V.push(g),p.forEach(m=>y.G.add(m))}let d=h.flatMap(g=>pd(g.G));for(let{G:g,V:p}of h){let y=new Set(d.filter(m=>!g.has(m)));for(let m of p)f.set(m,y)}}let s=new Set,l=new Set;const c=u=>s.has(u)?l.add(u):s.add(u);for(let u of Id){for(let f of u.P)c(f);for(let f of u.Q)c(f)}for(let u of s)!jh.has(u)&&!l.has(u)&&jh.set(u,K$);Y$=new Set(pd(s).concat(pd(G$(s)))),a_=vne(t).map(u=>Ine.from(u)).sort(xne),k3=new Map;for(let u of a_){let f=[k3];for(let h of u){let d=f.map(g=>{let p=g.get(h);return p||(p=new Map,g.set(h,p)),p});h===Q$?f.push(...d):f=d}for(let h of f)h.V=u}}function pO(t){return(X$(t)?"":`${gO(nA([t]))} `)+$$(t)}function gO(t){return`"${t}"‎`}function Rne(t){if(t.length>=4&&t[2]==i_&&t[3]==i_)throw new Error(`invalid label extension: "${Op(t.slice(0,4))}"`)}function Mne(t){for(let n=t.lastIndexOf(95);n>0;)if(t[--n]!==95)throw new Error("underscore allowed only at start")}function Bne(t){let e=t[0],n=t_.get(e);if(n)throw Ty(`leading ${n}`);let r=t.length,i=-1;for(let a=1;a{let a=wne(i),o={input:a,offset:r};r+=a.length+1;try{let s=o.tokens=Hne(a,e,n),l=s.length,c;if(!l)throw new Error("empty label");let u=o.output=s.flat();if(Mne(u),!(o.emoji=l>1||s[0].is_emoji)&&u.every(h=>h<128))Rne(u),c="ASCII";else{let h=s.flatMap(d=>d.is_emoji?[]:d);if(!h.length)c="Emoji";else{if(Fu.has(u[0]))throw Ty("leading combining mark");for(let p=1;po.has(s)):pd(o),!n.length)return}else r.push(i)}if(n){for(let i of n)if(r.every(a=>b1(i,a)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function Fne(t){let e=Id;for(let n of t){let r=e.filter(i=>b1(i,n));if(!r.length)throw Id.some(i=>b1(i,n))?q$(e[0],n):Z$(n);if(e=r,r.length==1)break}return e}function jne(t){return t.map(({input:e,error:n,output:r})=>{if(n){let i=n.message;throw new Error(t.length==1?i:`Invalid label ${gO(nA(e))}: ${i}`)}return Op(r)}).join(V$)}function Z$(t){return new Error(`disallowed character: ${pO(t)}`)}function q$(t,e){let n=pO(e),r=Id.find(i=>i.P.has(e));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${t.N} + ${n}`)}function Ty(t){return new Error(`illegal placement: ${t}`)}function zne(t,e){for(let n of e)if(!b1(t,n))throw q$(t,n);if(t.M){let n=G$(e);for(let r=1,i=n.length;rn_)throw new Error(`excessive non-spacing marks: ${gO(nA(n.slice(r-1,a)))} (${a-r}/${n_})`);r=a}}}function Hne(t,e,n){let r=[],i=[];for(t=t.slice().reverse();t.length;){let a=Vne(t);if(a)i.length&&(r.push(e(i)),i=[]),r.push(n(a));else{let o=t.pop();if(Y$.has(o))i.push(o);else{let s=T3.get(o);if(s)i.push(...s);else if(!W$.has(o))throw Z$(o)}}}return i.length&&r.push(e(i)),r}function Gne(t){return t.filter(e=>e!=Q$)}function Vne(t,e){let n=k3,r,i=t.length;for(;i&&(n=n.get(t[--i]),!!n);){let{V:a}=n;a&&(r=a,e&&e.push(...t.slice(i).reverse()),t.length=i)}return r}const eU=new Uint8Array(32);eU.fill(0);function o_(t){return J(t.length!==0,"invalid ENS name; empty component","comp",t),t}function tU(t){const e=hl(Qne(t)),n=[];if(t.length===0)return n;let r=0;for(let i=0;i{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const n=new Uint8Array(e.length+1);return n.set(e,1),n[0]=n.length-1,n})))+"00"}function eE(t,e){return{address:rn(t),storageKeys:e.map((n,r)=>(J(In(n,32),"invalid slot",`storageKeys[${r}]`,n),n.toLowerCase()))}}function wh(t){if(Array.isArray(t))return t.map((n,r)=>Array.isArray(n)?(J(n.length===2,"invalid slot set",`value[${r}]`,n),eE(n[0],n[1])):(J(n!=null&&typeof n=="object","invalid address-slot set","value",t),eE(n.address,n.storageKeys)));J(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(n=>{const r=t[n].reduce((i,a)=>(i[a]=!0,i),{});return eE(n,Object.keys(r).sort())});return e.sort((n,r)=>n.address.localeCompare(r.address)),e}function Wne(t){let e;return typeof t=="string"?e=g1.computePublicKey(t,!1):e=t.publicKey,rn(Nn("0x"+e.substring(4)).substring(26))}function Jne(t,e){return Wne(g1.recoverPublicKey(t,e))}const ki=BigInt(0),Yne=BigInt(2),Xne=BigInt(27),Zne=BigInt(28),qne=BigInt(35),ere=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function yO(t){return t==="0x"?null:rn(t)}function nU(t,e){try{return wh(t)}catch(n){J(!1,n.message,e,t)}}function rA(t,e){return t==="0x"?0:Lt(t,e)}function ii(t,e){if(t==="0x")return ki;const n=ot(t,e);return J(n<=ere,"value exceeds uint size",e,n),n}function Ar(t,e){const n=ot(t,"value"),r=sa(n);return J(r.length<=32,"value too large",`tx.${e}`,n),r}function rU(t){return wh(t).map(e=>[e.address,e.storageKeys])}function tre(t){const e=fO(t);J(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);const n={type:0,nonce:rA(e[0],"nonce"),gasPrice:ii(e[1],"gasPrice"),gasLimit:ii(e[2],"gasLimit"),to:yO(e[3]),value:ii(e[4],"value"),data:Ze(e[5]),chainId:ki};if(e.length===6)return n;const r=ii(e[6],"v"),i=ii(e[7],"r"),a=ii(e[8],"s");if(i===ki&&a===ki)n.chainId=r;else{let o=(r-qne)/Yne;o=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),me(!n||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),me(this.type!==0||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):n?i.push(2):e?(i.push(1),r||i.push(0)):r?(i.push(1),i.push(2)):(i.push(0),i.push(1),i.push(2)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}clone(){return Zl.from(this)}toJSON(){const e=n=>n==null?null:n.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Zl;if(typeof e=="string"){const r=Pt(e);if(r[0]>=127)return Zl.from(tre(r));switch(r[0]){case 1:return Zl.from(rre(r));case 2:return Zl.from(nre(r))}me(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const n=new Zl;return e.type!=null&&(n.type=e.type),e.to!=null&&(n.to=e.to),e.nonce!=null&&(n.nonce=e.nonce),e.gasLimit!=null&&(n.gasLimit=e.gasLimit),e.gasPrice!=null&&(n.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(n.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(n.maxFeePerGas=e.maxFeePerGas),e.data!=null&&(n.data=e.data),e.value!=null&&(n.value=e.value),e.chainId!=null&&(n.chainId=e.chainId),e.signature!=null&&(n.signature=To.from(e.signature)),e.accessList!=null&&(n.accessList=e.accessList),e.hash!=null&&(J(n.isSigned(),"unsigned transaction cannot define hash","tx",e),J(n.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(J(n.isSigned(),"unsigned transaction cannot define from","tx",e),J(n.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),n}};Ks=new WeakMap,M0=new WeakMap,B0=new WeakMap,D0=new WeakMap,L0=new WeakMap,$0=new WeakMap,U0=new WeakMap,F0=new WeakMap,j0=new WeakMap,z0=new WeakMap,H0=new WeakMap,G0=new WeakMap;let w1=Zl;const aU=new Uint8Array(32);aU.fill(0);const ire=BigInt(-1),oU=BigInt(0),sU=BigInt(1),are=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function ore(t){const e=Pt(t),n=e.length%32;return n?sr([e,aU.slice(n)]):Ze(e)}const sre=fs(sU,32),lre=fs(oU,32),u_={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},tE=["name","version","chainId","verifyingContract","salt"];function f_(t){return function(e){return J(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const cre={name:f_("name"),version:f_("version"),chainId:function(t){const e=ot(t,"domain.chainId");return J(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):Uu(e)},verifyingContract:function(t){try{return rn(t).toLowerCase()}catch{}J(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=Pt(t,"domain.salt");return J(e.length===32,'invalid domain value "salt"',"domain.salt",t),Ze(e)}};function nE(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const n=e[1]==="",r=parseInt(e[2]||"256");J(r%8===0&&r!==0&&r<=256&&(e[2]==null||e[2]===String(r)),"invalid numeric width","type",t);const i=oy(are,n?r-1:r),a=n?(i+sU)*ire:oU;return function(o){const s=ot(o,"value");return J(s>=a&&s<=i,`value out-of-bounds for ${t}`,"value",s),fs(n?m$(s,256):s,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const n=parseInt(e[1]);return J(n!==0&&n<=32&&e[1]===String(n),"invalid bytes width","type",t),function(r){const i=Pt(r);return J(i.length===n,`invalid length for ${t}`,"value",r),ore(r)}}}switch(t){case"address":return function(e){return oh(rn(e),32)};case"bool":return function(e){return e?sre:lre};case"bytes":return function(e){return Nn(e)};case"string":return function(e){return sh(e)}}return null}function h_(t,e){return`${t}(${e.map(({name:n,type:r})=>r+" "+n).join(",")})`}var Rm,Ws,V0,f2,lU;const wa=class wa{constructor(e){M(this,f2);R(this,"primaryType");M(this,Rm,void 0);M(this,Ws,void 0);M(this,V0,void 0);O(this,Rm,JSON.stringify(e)),O(this,Ws,new Map),O(this,V0,new Map);const n=new Map,r=new Map,i=new Map;Object.keys(e).forEach(s=>{n.set(s,new Set),r.set(s,[]),i.set(s,new Set)});for(const s in e){const l=new Set;for(const c of e[s]){J(!l.has(c.name),`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(s)}`,"types",e),l.add(c.name);const u=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;J(u!==s,`circular type reference to ${JSON.stringify(u)}`,"types",e),!nE(u)&&(J(r.has(u),`unknown type ${JSON.stringify(u)}`,"types",e),r.get(u).push(s),n.get(s).add(u))}}const a=Array.from(r.keys()).filter(s=>r.get(s).length===0);J(a.length!==0,"missing primary type","types",e),J(a.length===1,`ambiguous primary types or unused types: ${a.map(s=>JSON.stringify(s)).join(", ")}`,"types",e),mt(this,{primaryType:a[0]});function o(s,l){J(!l.has(s),`circular type reference to ${JSON.stringify(s)}`,"types",e),l.add(s);for(const c of n.get(s))if(r.has(c)){o(c,l);for(const u of l)i.get(u).add(c)}l.delete(s)}o(this.primaryType,new Set);for(const[s,l]of i){const c=Array.from(l);c.sort(),v(this,Ws).set(s,h_(s,e[s])+c.map(u=>h_(u,e[u])).join(""))}}get types(){return JSON.parse(v(this,Rm))}getEncoder(e){let n=v(this,V0).get(e);return n||(n=ie(this,f2,lU).call(this,e),v(this,V0).set(e,n)),n}encodeType(e){const n=v(this,Ws).get(e);return J(n,`unknown type: ${JSON.stringify(e)}`,"name",e),n}encodeData(e,n){return this.getEncoder(e)(n)}hashStruct(e,n){return Nn(this.encodeData(e,n))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,n,r){if(nE(e))return r(e,n);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i)return J(!i[3]||parseInt(i[3])===n.length,`array length mismatch; expected length ${parseInt(i[3])}`,"value",n),n.map(o=>this._visit(i[1],o,r));const a=this.types[e];if(a)return a.reduce((o,{name:s,type:l})=>(o[s]=this._visit(l,n[s],r),o),{});J(!1,`unknown type: ${e}`,"type",e)}visit(e,n){return this._visit(this.primaryType,e,n)}static from(e){return new wa(e)}static getPrimaryType(e){return wa.from(e).primaryType}static hashStruct(e,n,r){return wa.from(n).hashStruct(e,r)}static hashDomain(e){const n=[];for(const r in e){if(e[r]==null)continue;const i=u_[r];J(i,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),n.push({name:r,type:i})}return n.sort((r,i)=>tE.indexOf(r.name)-tE.indexOf(i.name)),wa.hashStruct("EIP712Domain",{EIP712Domain:n},e)}static encode(e,n,r){return sr(["0x1901",wa.hashDomain(e),wa.from(n).hash(r)])}static hash(e,n,r){return Nn(wa.encode(e,n,r))}static async resolveNames(e,n,r,i){e=Object.assign({},e);for(const s in e)e[s]==null&&delete e[s];const a={};e.verifyingContract&&!In(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");const o=wa.from(n);o.visit(r,(s,l)=>(s==="address"&&!In(l,20)&&(a[l]="0x"),l));for(const s in a)a[s]=await i(s);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),r=o.visit(r,(s,l)=>s==="address"&&a[l]?a[l]:l),{domain:e,value:r}}static getPayload(e,n,r){wa.hashDomain(e);const i={},a=[];tE.forEach(l=>{const c=e[l];c!=null&&(i[l]=cre[l](c),a.push({name:l,type:u_[l]}))});const o=wa.from(n),s=Object.assign({},n);return J(s.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",n),s.EIP712Domain=a,o.encode(r),{types:s,domain:i,primaryType:o.primaryType,message:o.visit(r,(l,c)=>{if(l.match(/^bytes(\d*)/))return Ze(Pt(c));if(l.match(/^u?int/))return ot(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return J(typeof c=="string","invalid string","value",c),c}J(!1,"unsupported type","type",l)})}}};Rm=new WeakMap,Ws=new WeakMap,V0=new WeakMap,f2=new WeakSet,lU=function(e){{const i=nE(e);if(i)return i}const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const i=n[1],a=this.getEncoder(i);return o=>{J(!n[3]||parseInt(n[3])===o.length,`array length mismatch; expected length ${parseInt(n[3])}`,"value",o);let s=o.map(a);return v(this,Ws).has(i)&&(s=s.map(Nn)),Nn(sr(s))}}const r=this.types[e];if(r){const i=sh(v(this,Ws).get(e));return a=>{const o=r.map(({name:s,type:l})=>{const c=this.getEncoder(l)(a[s]);return v(this,Ws).has(l)?Nn(c):c});return o.unshift(i),sr(o)}}J(!1,`unknown type: ${e}`,"type",e)};let x1=wa;function hi(t){const e=new Set;return t.forEach(n=>e.add(n)),Object.freeze(e)}const ure="external public payable",fre=hi(ure.split(" ")),cU="constant external internal payable private public pure view",hre=hi(cU.split(" ")),uU="constructor error event fallback function receive struct",fU=hi(uU.split(" ")),hU="calldata memory storage payable indexed",dre=hi(hU.split(" ")),pre="tuple returns",gre=[uU,hU,pre,cU].join(" "),yre=hi(gre.split(" ")),mre={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},vre=new RegExp("^(\\s*)"),bre=new RegExp("^([0-9]+)"),wre=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),dU=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),pU=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var br,uo,Mm,N3;const h2=class h2{constructor(e){M(this,Mm);M(this,br,void 0);M(this,uo,void 0);O(this,br,0),O(this,uo,e.slice())}get offset(){return v(this,br)}get length(){return v(this,uo).length-v(this,br)}clone(){return new h2(v(this,uo))}reset(){O(this,br,0)}popKeyword(e){const n=this.peek();if(n.type!=="KEYWORD"||!e.has(n.text))throw new Error(`expected keyword ${n.text}`);return this.pop().text}popType(e){if(this.peek().type!==e)throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const n=ie(this,Mm,N3).call(this,v(this,br)+1,e.match+1);return O(this,br,e.match+1),n}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const n=[];for(;v(this,br)=v(this,uo).length)throw new Error("out-of-bounds");return v(this,uo)[v(this,br)]}peekKeyword(e){const n=this.peekType("KEYWORD");return n!=null&&e.has(n)?n:null}peekType(e){if(this.length===0)return null;const n=this.peek();return n.type===e?n.text:null}pop(){const e=this.peek();return vs(this,br)._++,e}toString(){const e=[];for(let n=v(this,br);n`}};br=new WeakMap,uo=new WeakMap,Mm=new WeakSet,N3=function(e=0,n=0){return new h2(v(this,uo).slice(e,n).map(r=>Object.freeze(Object.assign({},r,{match:r.match-e,linkBack:r.linkBack-e,linkNext:r.linkNext-e}))))};let Co=h2;function su(t){const e=[],n=o=>{const s=a0&&e[e.length-1].type==="NUMBER"){const f=e.pop().text;u=f+u,e[e.length-1].value=Lt(f)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(s=o.match(wre),s){if(l.text=s[1],a+=l.text.length,yre.has(l.text)){l.type="KEYWORD";continue}if(l.text.match(pU)){l.type="TYPE";continue}l.type="ID";continue}if(s=o.match(bre),s){l.text=s[1],l.type="NUMBER",a+=l.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${a}`)}return new Co(e.map(o=>Object.freeze(o)))}function d_(t,e){let n=[];for(const r in e.keys())t.has(r)&&n.push(r);if(n.length>1)throw new Error(`conflicting types: ${n.join(", ")}`)}function iA(t,e){if(e.peekKeyword(fU)){const n=e.pop().text;if(n!==t)throw new Error(`expected ${t}, got ${n}`)}return e.popType("ID")}function Sl(t,e){const n=new Set;for(;;){const r=t.peekType("KEYWORD");if(r==null||e&&!e.has(r))break;if(t.pop(),n.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}function gU(t){let e=Sl(t,hre);return d_(e,hi("constant payable nonpayable".split(" "))),d_(e,hi("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function dl(t,e){return t.popParams().map(n=>Cr.from(n,e))}function yU(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return ot(t.pop().text);throw new Error("invalid gas")}return null}function lh(t){if(t.length)throw new Error(`unexpected tokens: ${t.toString()}`)}const xre=new RegExp(/^(.*)\[([0-9]*)\]$/);function p_(t){const e=t.match(pU);if(J(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const n=parseInt(e[2]);J(n!==0&&n<=32,"invalid bytes length","type",t)}else if(e[3]){const n=parseInt(e[3]);J(n!==0&&n<=256&&n%8===0,"invalid numeric width","type",t)}return t}const _n={},Ui=Symbol.for("_ethers_internal"),g_="_ParamTypeInternal",y_="_ErrorInternal",m_="_EventInternal",v_="_ConstructorInternal",b_="_FallbackInternal",w_="_FunctionInternal",x_="_StructInternal";var Q0,rw;const xa=class xa{constructor(e,n,r,i,a,o,s,l){M(this,Q0);R(this,"name");R(this,"type");R(this,"baseType");R(this,"indexed");R(this,"components");R(this,"arrayLength");R(this,"arrayChildren");if(q2(e,_n,"ParamType"),Object.defineProperty(this,Ui,{value:g_}),o&&(o=Object.freeze(o.slice())),i==="array"){if(s==null||l==null)throw new Error("")}else if(s!=null||l!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");mt(this,{name:n,type:r,baseType:i,indexed:a,components:o,arrayLength:s,arrayChildren:l})}format(e){if(e==null&&(e="sighash"),e==="json"){const r=this.name||"";if(this.isArray()){const a=JSON.parse(this.arrayChildren.format("json"));return a.name=r,a.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(a)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:r};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(a=>JSON.parse(a.format(e)))),JSON.stringify(i)}let n="";return this.isArray()?(n+=this.arrayChildren.format(e),n+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?n+="("+this.components.map(r=>r.format(e)).join(e==="full"?", ":",")+")":n+=this.type,e!=="sighash"&&(this.indexed===!0&&(n+=" indexed"),e==="full"&&this.name&&(n+=" "+this.name)),n}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,n){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map(i=>r.arrayChildren.walk(i,n))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const r=this;return e.map((i,a)=>r.components[a].walk(i,n))}return n(this.type,e)}async walkAsync(e,n){const r=[],i=[e];return ie(this,Q0,rw).call(this,r,e,n,a=>{i[0]=a}),r.length&&await Promise.all(r),i[0]}static from(e,n){if(xa.isParamType(e))return e;if(typeof e=="string")try{return xa.from(su(e),n)}catch{J(!1,"invalid param type","obj",e)}else if(e instanceof Co){let s="",l="",c=null;Sl(e,hi(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(l="tuple",c=e.popParams().map(p=>xa.from(p)),s=`tuple(${c.map(p=>p.format()).join(",")})`):(s=p_(e.popType("TYPE")),l=s);let u=null,f=null;for(;e.length&&e.peekType("BRACKET");){const p=e.pop();u=new xa(_n,"",s,l,null,c,f,u),f=p.value,s+=p.text,l="array",c=null}let h=null;if(Sl(e,dre).has("indexed")){if(!n)throw new Error("");h=!0}const g=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new xa(_n,g,s,l,h,c,f,u)}const r=e.name;J(!r||typeof r=="string"&&r.match(dU),"invalid name","obj.name",r);let i=e.indexed;i!=null&&(J(n,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let a=e.type,o=a.match(xre);if(o){const s=parseInt(o[2]||"-1"),l=xa.from({type:o[1],components:e.components});return new xa(_n,r||"",a,"array",i,null,s,l)}if(a==="tuple"||a.startsWith("tuple(")||a.startsWith("(")){const s=e.components!=null?e.components.map(c=>xa.from(c)):null;return new xa(_n,r||"",a,"tuple",i,s,null,null)}return a=p_(e.type),new xa(_n,r||"",a,a,i,null,null,null)}static isParamType(e){return e&&e[Ui]===g_}};Q0=new WeakSet,rw=function(e,n,r,i){if(this.isArray()){if(!Array.isArray(n))throw new Error("invalid array value");if(this.arrayLength!==-1&&n.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,s=n.slice();s.forEach((l,c)=>{var u;ie(u=o,Q0,rw).call(u,e,l,r,f=>{s[c]=f})}),i(s);return}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(n))s=n.slice();else{if(n==null||typeof n!="object")throw new Error("invalid tuple value");s=o.map(l=>{if(!l.name)throw new Error("cannot use object value with unnamed components");if(!(l.name in n))throw new Error(`missing value for component ${l.name}`);return n[l.name]})}if(s.length!==this.components.length)throw new Error("array is wrong length");s.forEach((l,c)=>{var u;ie(u=o[c],Q0,rw).call(u,e,l,r,f=>{s[c]=f})}),i(s);return}const a=r(this.type,n);a.then?e.push(async function(){i(await a)}()):i(a)};let Cr=xa;class ch{constructor(e,n,r){R(this,"type");R(this,"inputs");q2(e,_n,"Fragment"),r=Object.freeze(r.slice()),mt(this,{type:n,inputs:r})}static from(e){if(typeof e=="string"){try{ch.from(JSON.parse(e))}catch{}return ch.from(su(e))}if(e instanceof Co)switch(e.peekKeyword(fU)){case"constructor":return ol.from(e);case"error":return _i.from(e);case"event":return qo.from(e);case"fallback":case"receive":return ks.from(e);case"function":return es.from(e);case"struct":return jf.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return ol.from(e);case"error":return _i.from(e);case"event":return qo.from(e);case"fallback":case"receive":return ks.from(e);case"function":return es.from(e);case"struct":return jf.from(e)}me(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}J(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return ol.isFragment(e)}static isError(e){return _i.isFragment(e)}static isEvent(e){return qo.isFragment(e)}static isFunction(e){return es.isFragment(e)}static isStruct(e){return jf.isFragment(e)}}class aA extends ch{constructor(n,r,i,a){super(n,r,a);R(this,"name");J(typeof i=="string"&&i.match(dU),"invalid identifier","name",i),a=Object.freeze(a.slice()),mt(this,{name:i})}}function A1(t,e){return"("+e.map(n=>n.format(t)).join(t==="full"?", ":",")+")"}class _i extends aA{constructor(e,n,r){super(e,"error",n,r),Object.defineProperty(this,Ui,{value:y_})}get selector(){return sh(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(e)))});const n=[];return e!=="sighash"&&n.push("error"),n.push(this.name+A1(e,this.inputs)),n.join(" ")}static from(e){if(_i.isFragment(e))return e;if(typeof e=="string")return _i.from(su(e));if(e instanceof Co){const n=iA("error",e),r=dl(e);return lh(e),new _i(_n,n,r)}return new _i(_n,e.name,e.inputs?e.inputs.map(Cr.from):[])}static isFragment(e){return e&&e[Ui]===y_}}class qo extends aA{constructor(n,r,i,a){super(n,"event",r,i);R(this,"anonymous");Object.defineProperty(this,Ui,{value:m_}),mt(this,{anonymous:a})}get topicHash(){return sh(this.format("sighash"))}format(n){if(n==null&&(n="sighash"),n==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("event"),r.push(this.name+A1(n,this.inputs)),n!=="sighash"&&this.anonymous&&r.push("anonymous"),r.join(" ")}static getTopicHash(n,r){return r=(r||[]).map(a=>Cr.from(a)),new qo(_n,n,r,!1).topicHash}static from(n){if(qo.isFragment(n))return n;if(typeof n=="string")try{return qo.from(su(n))}catch{J(!1,"invalid event fragment","obj",n)}else if(n instanceof Co){const r=iA("event",n),i=dl(n,!0),a=!!Sl(n,hi(["anonymous"])).has("anonymous");return lh(n),new qo(_n,r,i,a)}return new qo(_n,n.name,n.inputs?n.inputs.map(r=>Cr.from(r,!0)):[],!!n.anonymous)}static isFragment(n){return n&&n[Ui]===m_}}class ol extends ch{constructor(n,r,i,a,o){super(n,r,i);R(this,"payable");R(this,"gas");Object.defineProperty(this,Ui,{value:v_}),mt(this,{payable:a,gas:o})}format(n){if(me(n!=null&&n!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),n==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[`constructor${A1(n,this.inputs)}`];return this.payable&&r.push("payable"),this.gas!=null&&r.push(`@${this.gas.toString()}`),r.join(" ")}static from(n){if(ol.isFragment(n))return n;if(typeof n=="string")try{return ol.from(su(n))}catch{J(!1,"invalid constuctor fragment","obj",n)}else if(n instanceof Co){Sl(n,hi(["constructor"]));const r=dl(n),i=!!Sl(n,fre).has("payable"),a=yU(n);return lh(n),new ol(_n,"constructor",r,i,a)}return new ol(_n,"constructor",n.inputs?n.inputs.map(Cr.from):[],!!n.payable,n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[Ui]===v_}}class ks extends ch{constructor(n,r,i){super(n,"fallback",r);R(this,"payable");Object.defineProperty(this,Ui,{value:b_}),mt(this,{payable:i})}format(n){const r=this.inputs.length===0?"receive":"fallback";if(n==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:r,stateMutability:i})}return`${r}()${this.payable?" payable":""}`}static from(n){if(ks.isFragment(n))return n;if(typeof n=="string")try{return ks.from(su(n))}catch{J(!1,"invalid fallback fragment","obj",n)}else if(n instanceof Co){const r=n.toString(),i=n.peekKeyword(hi(["fallback","receive"]));if(J(i,"type must be fallback or receive","obj",r),n.popKeyword(hi(["fallback","receive"]))==="receive"){const l=dl(n);return J(l.length===0,"receive cannot have arguments","obj.inputs",l),Sl(n,hi(["payable"])),lh(n),new ks(_n,[],!0)}let o=dl(n);o.length?J(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(l=>l.format("minimal")).join(", ")):o=[Cr.from("bytes")];const s=gU(n);if(J(s==="nonpayable"||s==="payable","fallback cannot be constants","obj.stateMutability",s),Sl(n,hi(["returns"])).has("returns")){const l=dl(n);J(l.length===1&&l[0].type==="bytes","invalid fallback outputs","obj.outputs",l.map(c=>c.format("minimal")).join(", "))}return lh(n),new ks(_n,o,s==="payable")}if(n.type==="receive")return new ks(_n,[],!0);if(n.type==="fallback"){const r=[Cr.from("bytes")],i=n.stateMutability==="payable";return new ks(_n,r,i)}J(!1,"invalid fallback description","obj",n)}static isFragment(n){return n&&n[Ui]===b_}}class es extends aA{constructor(n,r,i,a,o,s){super(n,"function",r,a);R(this,"constant");R(this,"outputs");R(this,"stateMutability");R(this,"payable");R(this,"gas");Object.defineProperty(this,Ui,{value:w_}),o=Object.freeze(o.slice()),mt(this,{constant:i==="view"||i==="pure",gas:s,outputs:o,payable:i==="payable",stateMutability:i})}get selector(){return sh(this.format("sighash")).substring(0,10)}format(n){if(n==null&&(n="sighash"),n==="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!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n))),outputs:this.outputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("function"),r.push(this.name+A1(n,this.inputs)),n!=="sighash"&&(this.stateMutability!=="nonpayable"&&r.push(this.stateMutability),this.outputs&&this.outputs.length&&(r.push("returns"),r.push(A1(n,this.outputs))),this.gas!=null&&r.push(`@${this.gas.toString()}`)),r.join(" ")}static getSelector(n,r){return r=(r||[]).map(a=>Cr.from(a)),new es(_n,n,"view",r,[],null).selector}static from(n){if(es.isFragment(n))return n;if(typeof n=="string")try{return es.from(su(n))}catch{J(!1,"invalid function fragment","obj",n)}else if(n instanceof Co){const i=iA("function",n),a=dl(n),o=gU(n);let s=[];Sl(n,hi(["returns"])).has("returns")&&(s=dl(n));const l=yU(n);return lh(n),new es(_n,i,o,a,s,l)}let r=n.stateMutability;return r==null&&(r="payable",typeof n.constant=="boolean"?(r="view",n.constant||(r="payable",typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable"))):typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable")),new es(_n,n.name,r,n.inputs?n.inputs.map(Cr.from):[],n.outputs?n.outputs.map(Cr.from):[],n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[Ui]===w_}}class jf extends aA{constructor(e,n,r){super(e,"struct",n,r),Object.defineProperty(this,Ui,{value:x_})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return jf.from(su(e))}catch{J(!1,"invalid struct fragment","obj",e)}else if(e instanceof Co){const n=iA("struct",e),r=dl(e);return lh(e),new jf(_n,n,r)}return new jf(_n,e.name,e.inputs?e.inputs.map(Cr.from):[])}static isFragment(e){return e&&e[Ui]===x_}}const _o=new Map;_o.set(0,"GENERIC_PANIC");_o.set(1,"ASSERT_FALSE");_o.set(17,"OVERFLOW");_o.set(18,"DIVIDE_BY_ZERO");_o.set(33,"ENUM_RANGE_ERROR");_o.set(34,"BAD_STORAGE_DATA");_o.set(49,"STACK_UNDERFLOW");_o.set(50,"ARRAY_RANGE_ERROR");_o.set(65,"OUT_OF_MEMORY");_o.set(81,"UNINITIALIZED_FUNCTION_CALL");const Are=new RegExp(/^bytes([0-9]*)$/),Ere=new RegExp(/^(u?int)([0-9]*)$/);let rE=null,A_=1024;function Sre(t,e,n,r){let i="missing revert data",a=null;const o=null;let s=null;if(n){i="execution reverted";const c=Pt(n);if(n=Ze(n),c.length===0)i+=" (no data present; likely require(false) occurred",a="require(false)";else if(c.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(Ze(c.slice(0,4))==="0x08c379a0")try{a=r.decode(["string"],c.slice(4))[0],s={signature:"Error(string)",name:"Error",args:[a]},i+=`: ${JSON.stringify(a)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(Ze(c.slice(0,4))==="0x4e487b71")try{const u=Number(r.decode(["uint256"],c.slice(4))[0]);s={signature:"Panic(uint256)",name:"Panic",args:[u]},a=`Panic due to ${_o.get(u)||"UNKNOWN"}(${u})`,i+=`: ${a}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const l={to:e.to?rn(e.to):null,data:e.data||"0x"};return e.from&&(l.from=rn(e.from)),qn(i,"CALL_EXCEPTION",{action:t,data:n,reason:a,transaction:l,invocation:o,revert:s})}var xc,zh;const d2=class d2{constructor(){M(this,xc)}getDefaultValue(e){const n=e.map(i=>ie(this,xc,zh).call(this,Cr.from(i)));return new tb(n,"_").defaultValue()}encode(e,n){p$(n.length,e.length,"types/values length mismatch");const r=e.map(o=>ie(this,xc,zh).call(this,Cr.from(o))),i=new tb(r,"_"),a=new x3;return i.encode(a,n),a.data}decode(e,n,r){const i=e.map(o=>ie(this,xc,zh).call(this,Cr.from(o)));return new tb(i,"_").decode(new A3(n,r,A_))}static _setDefaultMaxInflation(e){J(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),A_=e}static defaultAbiCoder(){return rE==null&&(rE=new d2),rE}static getBuiltinCallException(e,n,r){return Sre(e,n,r,d2.defaultAbiCoder())}};xc=new WeakSet,zh=function(e){if(e.isArray())return new qte(ie(this,xc,zh).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new tb(e.components.map(r=>ie(this,xc,zh).call(this,r)),e.name);switch(e.baseType){case"address":return new Xte(e.name);case"bool":return new ene(e.name);case"string":return new cne(e.name);case"bytes":return new tne(e.name);case"":return new ine(e.name)}let n=e.type.match(Ere);if(n){let r=parseInt(n[2]||"256");return J(r!==0&&r<=256&&r%8===0,"invalid "+n[1]+" bit length","param",e),new lne(r/8,n[1]==="int",e.name)}if(n=e.type.match(Are),n){let r=parseInt(n[1]);return J(r!==0&&r<=32,"invalid bytes length","param",e),new nne(r,e.name)}J(!1,"invalid type","type",e.type)};let E1=d2;class Pre{constructor(e,n,r){R(this,"fragment");R(this,"name");R(this,"signature");R(this,"topic");R(this,"args");const i=e.name,a=e.format();mt(this,{fragment:e,name:i,signature:a,topic:n,args:r})}}class Ore{constructor(e,n,r,i){R(this,"fragment");R(this,"name");R(this,"args");R(this,"signature");R(this,"selector");R(this,"value");const a=e.name,o=e.format();mt(this,{fragment:e,name:a,args:r,signature:o,selector:n,value:i})}}class Tre{constructor(e,n,r){R(this,"fragment");R(this,"name");R(this,"args");R(this,"signature");R(this,"selector");const i=e.name,a=e.format();mt(this,{fragment:e,name:i,args:r,signature:a,selector:n})}}class E_{constructor(e){R(this,"hash");R(this,"_isIndexed");mt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const S_={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},P_={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&S_[t.toString()]&&(e=S_[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var Qo,Ko,Wo,Ur,K0,iw,W0,aw;const vd=class vd{constructor(e){M(this,K0);M(this,W0);R(this,"fragments");R(this,"deploy");R(this,"fallback");R(this,"receive");M(this,Qo,void 0);M(this,Ko,void 0);M(this,Wo,void 0);M(this,Ur,void 0);let n=[];typeof e=="string"?n=JSON.parse(e):n=e,O(this,Wo,new Map),O(this,Qo,new Map),O(this,Ko,new Map);const r=[];for(const o of n)try{r.push(ch.from(o))}catch(s){console.log("EE",s)}mt(this,{fragments:Object.freeze(r)});let i=null,a=!1;O(this,Ur,this.getAbiCoder()),this.fragments.forEach((o,s)=>{let l;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}mt(this,{deploy:o});return;case"fallback":o.inputs.length===0?a=!0:(J(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${s}]`,o),i=o,a=i.payable);return;case"function":l=v(this,Wo);break;case"event":l=v(this,Ko);break;case"error":l=v(this,Qo);break;default:return}const c=o.format();l.has(c)||l.set(c,o)}),this.deploy||mt(this,{deploy:ol.from("constructor()")}),mt(this,{fallback:i,receive:a})}format(e){const n=e?"minimal":"full";return this.fragments.map(i=>i.format(n))}formatJson(){const e=this.fragments.map(n=>n.format("json"));return JSON.stringify(e.map(n=>JSON.parse(n)))}getAbiCoder(){return E1.defaultAbiCoder()}getFunctionName(e){const n=ie(this,K0,iw).call(this,e,null,!1);return J(n,"no matching function","key",e),n.name}hasFunction(e){return!!ie(this,K0,iw).call(this,e,null,!1)}getFunction(e,n){return ie(this,K0,iw).call(this,e,n||null,!0)}forEachFunction(e){const n=Array.from(v(this,Wo).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;rr.localeCompare(i));for(let r=0;r1){const a=i.map(o=>JSON.stringify(o.format())).join(", ");J(!1,`ambiguous error description (i.e. ${a})`,"name",e)}return i[0]}if(e=_i.from(e).format(),e==="Error(string)")return _i.from("error Error(string)");if(e==="Panic(uint256)")return _i.from("error Panic(uint256)");const r=v(this,Qo).get(e);return r||null}forEachError(e){const n=Array.from(v(this,Qo).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;ra.type==="string"?sh(o):a.type==="bytes"?Nn(Ze(o)):(a.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":a.type.match(/^u?int/)?o=fs(o):a.type.match(/^bytes/)?o=Pte(o,32):a.type==="address"&&v(this,Ur).encode(["address"],[o]),oh(Ze(o),32));for(n.forEach((a,o)=>{const s=e.inputs[o];if(!s.indexed){J(a==null,"cannot filter non-indexed parameters; must be null","contract."+s.name,a);return}a==null?r.push(null):s.baseType==="array"||s.baseType==="tuple"?J(!1,"filtering with tuples or arrays not supported","contract."+s.name,a):Array.isArray(a)?r.push(a.map(l=>i(s,l))):r.push(i(s,a))});r.length&&r[r.length-1]===null;)r.pop();return r}encodeEventLog(e,n){if(typeof e=="string"){const o=this.getEvent(e);J(o,"unknown event","eventFragment",e),e=o}const r=[],i=[],a=[];return e.anonymous||r.push(e.topicHash),J(n.length===e.inputs.length,"event arguments/values mismatch","values",n),e.inputs.forEach((o,s)=>{const l=n[s];if(o.indexed)if(o.type==="string")r.push(sh(l));else if(o.type==="bytes")r.push(Nn(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");r.push(v(this,Ur).encode([o.type],[l]))}else i.push(o),a.push(l)}),{data:v(this,Ur).encode(i,a),topics:r}}decodeEventLog(e,n,r){if(typeof e=="string"){const d=this.getEvent(e);J(d,"unknown event","eventFragment",e),e=d}if(r!=null&&!e.anonymous){const d=e.topicHash;J(In(r[0],32)&&r[0].toLowerCase()===d,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const i=[],a=[],o=[];e.inputs.forEach((d,g)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(Cr.from({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(a.push(d),o.push(!1))});const s=r!=null?v(this,Ur).decode(i,sr(r)):null,l=v(this,Ur).decode(a,n,!0),c=[],u=[];let f=0,h=0;return e.inputs.forEach((d,g)=>{let p=null;if(d.indexed)if(s==null)p=new E_(null);else if(o[g])p=new E_(s[h++]);else try{p=s[h++]}catch(y){p=y}else try{p=l[f++]}catch(y){p=y}c.push(p),u.push(d.name||null)}),rx.fromItems(c,u)}parseTransaction(e){const n=Pt(e.data,"tx.data"),r=ot(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(Ze(n.slice(0,4)));if(!i)return null;const a=v(this,Ur).decode(i.inputs,n.slice(4));return new Ore(i,i.selector,a,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const n=this.getEvent(e.topics[0]);return!n||n.anonymous?null:new Pre(n,n.topicHash,this.decodeEventLog(n,e.data,e.topics))}parseError(e){const n=Ze(e),r=this.getError(Fn(n,0,4));if(!r)return null;const i=v(this,Ur).decode(r.inputs,Fn(n,4));return new Tre(r,r.selector,i)}static from(e){return e instanceof vd?e:typeof e=="string"?new vd(JSON.parse(e)):typeof e.format=="function"?new vd(e.format("json")):new vd(e)}};Qo=new WeakMap,Ko=new WeakMap,Wo=new WeakMap,Ur=new WeakMap,K0=new WeakSet,iw=function(e,n,r){if(In(e)){const a=e.toLowerCase();for(const o of v(this,Wo).values())if(a===o.selector)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of v(this,Wo))o.split("(")[0]===e&&a.push(s);if(n){const o=n.length>0?n[n.length-1]:null;let s=n.length,l=!0;Wr.isTyped(o)&&o.type==="overrides"&&(l=!1,s--);for(let c=a.length-1;c>=0;c--){const u=a[c].inputs.length;u!==s&&(!l||u!==s-1)&&a.splice(c,1)}for(let c=a.length-1;c>=0;c--){const u=a[c].inputs;for(let f=0;f=u.length){if(n[f].type==="overrides")continue;a.splice(c,1);break}if(n[f].type!==u[f].baseType){a.splice(c,1);break}}}}if(a.length===1&&n&&n.length!==a[0].inputs.length){const o=n[n.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&a.splice(0,1)}if(a.length===0)return null;if(a.length>1&&r){const o=a.map(s=>JSON.stringify(s.format())).join(", ");J(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return a[0]}const i=v(this,Wo).get(es.from(e).format());return i||null},W0=new WeakSet,aw=function(e,n,r){if(In(e)){const a=e.toLowerCase();for(const o of v(this,Ko).values())if(a===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of v(this,Ko))o.split("(")[0]===e&&a.push(s);if(n){for(let o=a.length-1;o>=0;o--)a[o].inputs.length=0;o--){const s=a[o].inputs;for(let l=0;l1&&r){const o=a.map(s=>JSON.stringify(s.format())).join(", ");J(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return a[0]}const i=v(this,Ko).get(qo.from(e).format());return i||null};let I3=vd;const mU=BigInt(0);function Cy(t){return t??null}function Gr(t){return t==null?null:t.toString()}class O_{constructor(e,n,r){R(this,"gasPrice");R(this,"maxFeePerGas");R(this,"maxPriorityFeePerGas");mt(this,{gasPrice:Cy(e),maxFeePerGas:Cy(n),maxPriorityFeePerGas:Cy(r)})}toJSON(){const{gasPrice:e,maxFeePerGas:n,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:Gr(e),maxFeePerGas:Gr(n),maxPriorityFeePerGas:Gr(r)}}}function lx(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=Ze(t.data));const n="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=ot(t[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)!(i in t)||t[i]==null||(e[i]=Lt(t[i],`request.${i}`));return t.accessList&&(e.accessList=wh(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),e}var Js;class Cre{constructor(e,n){R(this,"provider");R(this,"number");R(this,"hash");R(this,"timestamp");R(this,"parentHash");R(this,"nonce");R(this,"difficulty");R(this,"gasLimit");R(this,"gasUsed");R(this,"miner");R(this,"extraData");R(this,"baseFeePerGas");M(this,Js,void 0);O(this,Js,e.transactions.map(r=>typeof r!="string"?new S1(r,n):r)),mt(this,{provider:n,hash:Cy(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,miner:e.miner,extraData:e.extraData,baseFeePerGas:Cy(e.baseFeePerGas)})}get transactions(){return v(this,Js).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=v(this,Js).slice();return e.length===0?[]:(me(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:n,extraData:r,gasLimit:i,gasUsed:a,hash:o,miner:s,nonce:l,number:c,parentHash:u,timestamp:f,transactions:h}=this;return{_type:"Block",baseFeePerGas:Gr(e),difficulty:Gr(n),extraData:r,gasLimit:Gr(i),gasUsed:Gr(a),hash:o,miner:s,nonce:l,number:c,parentHash:u,timestamp:f,transactions:h}}[Symbol.iterator](){let e=0;const n=this.transactions;return{next:()=>enew cv(i,n))));let r=mU;e.effectiveGasPrice!=null?r=e.effectiveGasPrice:e.gasPrice!=null&&(r=e.gasPrice),mt(this,{provider:n,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,gasPrice:r,type:e.type,status:e.status,root:e.root})}get logs(){return v(this,Bm)}toJSON(){const{to:e,from:n,contractAddress:r,hash:i,index:a,blockHash:o,blockNumber:s,logsBloom:l,logs:c,status:u,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:s,contractAddress:r,cumulativeGasUsed:Gr(this.cumulativeGasUsed),from:n,gasPrice:Gr(this.gasPrice),gasUsed:Gr(this.gasUsed),hash:i,index:a,logs:c,logsBloom:l,root:f,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(s)return null;const{blockNumber:h,nonce:d}=await ni({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(d{if(h==null||h.status!==0)return h;me(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:h.to,from:h.from,data:""},receipt:h})},u=await this.provider.getTransactionReceipt(this.hash);if(r===0)return c(u);if(u){if(await u.confirmations()>=r)return c(u)}else if(await l(),r===0)return null;return await new Promise((h,d)=>{const g=[],p=()=>{g.forEach(m=>m())};if(g.push(()=>{s=!0}),i>0){const m=setTimeout(()=>{p(),d(qn("wait for transaction timeout","TIMEOUT"))},i);g.push(()=>{clearTimeout(m)})}const y=async m=>{if(await m.confirmations()>=r){p();try{h(c(m))}catch(b){d(b)}}};if(g.push(()=>{this.provider.off(this.hash,y)}),this.provider.on(this.hash,y),a>=0){const m=async()=>{try{await l()}catch(b){if(Kr(b,"TRANSACTION_REPLACED")){p(),d(b);return}}s||this.provider.once("block",m)};g.push(()=>{this.provider.off("block",m)}),this.provider.once("block",m)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}removedEvent(){return me(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),wU(this)}reorderedEvent(e){return me(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),me(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),bU(this,e)}replaceableTransaction(e){J(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const n=new L4(this,this.provider);return O(n,Ac,e),n}};Ac=new WeakMap;let S1=L4;function kre(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function bU(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function wU(t){return{orphan:"drop-transaction",tx:t}}function _re(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class mO extends cv{constructor(n,r,i){super(n,n.provider);R(this,"interface");R(this,"fragment");R(this,"args");const a=r.decodeEventLog(i,n.data,n.topics);mt(this,{args:a,fragment:i,interface:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class xU extends cv{constructor(n,r){super(n,n.provider);R(this,"error");mt(this,{error:r})}}var J0;class Nre extends vU{constructor(n,r,i){super(i,r);M(this,J0,void 0);O(this,J0,n)}get logs(){return super.logs.map(n=>{const r=n.topics.length?v(this,J0).getEvent(n.topics[0]):null;if(r)try{return new mO(n,v(this,J0),r)}catch(i){return new xU(n,i)}return n})}}J0=new WeakMap;var Dm;class vO extends S1{constructor(n,r,i){super(i,r);M(this,Dm,void 0);O(this,Dm,n)}async wait(n){const r=await super.wait(n);return r==null?null:new Nre(v(this,Dm),this.provider,r)}}Dm=new WeakMap;class AU extends v${constructor(n,r,i,a){super(n,r,i);R(this,"log");mt(this,{log:a})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class Ire extends AU{constructor(e,n,r,i,a){super(e,n,r,new mO(a,e.interface,i));const o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);mt(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const T_=BigInt(0);function EU(t){return t&&typeof t.call=="function"}function SU(t){return t&&typeof t.estimateGas=="function"}function oA(t){return t&&typeof t.resolveName=="function"}function PU(t){return t&&typeof t.sendTransaction=="function"}function OU(t){if(t!=null){if(oA(t))return t;if(t.provider)return t.provider}}var Lm;class Rre{constructor(e,n,r){M(this,Lm,void 0);R(this,"fragment");if(mt(this,{fragment:n}),n.inputs.lengthr[l]==null?null:s.walkAsync(r[l],(u,f)=>u==="address"?Array.isArray(f)?Promise.all(f.map(h=>fi(h,a))):fi(f,a):f)));return e.interface.encodeFilterTopics(n,o)}())}getTopicFilter(){return v(this,Lm)}}Lm=new WeakMap;function uh(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function ju(t){return t==null?null:t.provider||null}async function TU(t,e){const n=Wr.dereference(t,"overrides");J(typeof n=="object","invalid overrides parameter","overrides",t);const r=lx(n);return J(r.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),J(r.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=r.from),r}async function Mre(t,e,n){const r=uh(t,"resolveName"),i=oA(r)?r:null;return await Promise.all(e.map((a,o)=>a.walkAsync(n[o],(s,l)=>(l=Wr.dereference(l,s),s==="address"?fi(l,i):l))))}function Bre(t){const e=async function(o){const s=await TU(o,["data"]);s.to=await t.getAddress(),s.from&&(s.from=await fi(s.from,OU(t.runner)));const l=t.interface,c=ot(s.value||T_,"overrides.value")===T_,u=(s.data||"0x")==="0x";l.fallback&&!l.fallback.payable&&l.receive&&!u&&!c&&J(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),J(l.fallback||u,"cannot send data to receive-only contract","overrides.data",s.data);const f=l.receive||l.fallback&&l.fallback.payable;return J(f||c,"cannot send value to non-payable fallback","overrides.value",s.value),J(l.fallback||u,"cannot send data to receive-only contract","overrides.data",s.data),s},n=async function(o){const s=uh(t.runner,"call");me(EU(s),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const l=await e(o);try{return await s.call(l)}catch(c){throw lO(c)&&c.data?t.interface.makeError(c.data,l):c}},r=async function(o){const s=t.runner;me(PU(s),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const l=await s.sendTransaction(await e(o)),c=ju(t.runner);return new vO(t.interface,c,l)},i=async function(o){const s=uh(t.runner,"estimateGas");return me(SU(s),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await s.estimateGas(await e(o))},a=async o=>await r(o);return mt(a,{_contract:t,estimateGas:i,populateTransaction:e,send:r,staticCall:n}),a}function Dre(t,e){const n=function(...c){const u=t.interface.getFunction(e,c);return me(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:c}}),u},r=async function(...c){const u=n(...c);let f={};if(u.inputs.length+1===c.length&&(f=await TU(c.pop()),f.from&&(f.from=await fi(f.from,OU(t.runner)))),u.inputs.length!==c.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const h=await Mre(t.runner,u.inputs,c);return Object.assign({},f,await ni({to:t.getAddress(),data:t.interface.encodeFunctionData(u,h)}))},i=async function(...c){const u=await s(...c);return u.length===1?u[0]:u},a=async function(...c){const u=t.runner;me(PU(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await u.sendTransaction(await r(...c)),h=ju(t.runner);return new vO(t.interface,h,f)},o=async function(...c){const u=uh(t.runner,"estimateGas");return me(SU(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await r(...c))},s=async function(...c){const u=uh(t.runner,"call");me(EU(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await r(...c);let h="0x";try{h=await u.call(f)}catch(g){throw lO(g)&&g.data?t.interface.makeError(g.data,f):g}const d=n(...c);return t.interface.decodeFunctionResult(d,h)},l=async(...c)=>n(...c).constant?await i(...c):await a(...c);return mt(l,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:n,estimateGas:o,populateTransaction:r,send:a,staticCall:i,staticCallResult:s}),Object.defineProperty(l,"fragment",{configurable:!1,enumerable:!0,get:()=>{const c=t.interface.getFunction(e);return me(c,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),c}}),l}function Lre(t,e){const n=function(...i){const a=t.interface.getEvent(e,i);return me(a,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),a},r=function(...i){return new Rre(t,n(...i),i)};return mt(r,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:n}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=t.interface.getEvent(e);return me(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),r}const cx=Symbol.for("_ethersInternal_contract"),CU=new WeakMap;function $re(t,e){CU.set(t[cx],e)}function Ki(t){return CU.get(t[cx])}function Ure(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function bO(t,e){let n,r=null;if(Array.isArray(e)){const a=function(o){if(In(o,32))return o;const s=t.interface.getEvent(o);return J(s,"unknown fragment","name",o),s.topicHash};n=e.map(o=>o==null?null:Array.isArray(o)?o.map(a):a(o))}else e==="*"?n=[null]:typeof e=="string"?In(e,32)?n=[e]:(r=t.interface.getEvent(e),J(r,"unknown fragment","event",e),n=[r.topicHash]):Ure(e)?n=await e.getTopicFilter():"fragment"in e?(r=e.fragment,n=[r.topicHash]):J(!1,"unknown event name","event",e);n=n.map(a=>{if(a==null)return null;if(Array.isArray(a)){const o=Array.from(new Set(a.map(s=>s.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return a.toLowerCase()});const i=n.map(a=>a==null?"null":Array.isArray(a)?a.join("|"):a).join("&");return{fragment:r,tag:i,topics:n}}async function cy(t,e){const{subs:n}=Ki(t);return n.get((await bO(t,e)).tag)||null}async function C_(t,e,n){const r=ju(t.runner);me(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:a,topics:o}=await bO(t,n),{addr:s,subs:l}=Ki(t);let c=l.get(a);if(!c){const f={address:s||t,topics:o},h=y=>{let m=i;if(m==null)try{m=t.interface.getEvent(y.topics[0])}catch{}if(m){const b=m,x=i?t.interface.decodeEventLog(i,y.data,y.topics):[];M3(t,n,x,A=>new Ire(t,A,n,b,y))}else M3(t,n,[],b=>new AU(t,b,n,y))};let d=[];c={tag:a,listeners:[],start:()=>{d.length||d.push(r.on(f,h))},stop:async()=>{if(d.length==0)return;let y=d;d=[],await Promise.all(y),r.off(f,h)}},l.set(a,c)}return c}let R3=Promise.resolve();async function Fre(t,e,n,r){await R3;const i=await cy(t,e);if(!i)return!1;const a=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:s})=>{const l=Array.from(n);r&&l.push(r(s?null:o));try{o.call(t,...l)}catch{}return!s}),i.listeners.length===0&&(i.stop(),Ki(t).subs.delete(i.tag)),a>0}async function M3(t,e,n,r){try{await R3}catch{}const i=Fre(t,e,n,r);return R3=i,await i}const nb=["then"];var yPe;const Uy=class Uy{constructor(e,n,r,i){R(this,"target");R(this,"interface");R(this,"runner");R(this,"filters");R(this,yPe);R(this,"fallback");J(typeof e=="string"||_$(e),"invalid value for Contract target","target",e),r==null&&(r=null);const a=I3.from(n);mt(this,{target:e,runner:r,interface:a}),Object.defineProperty(this,cx,{value:{}});let o,s=null,l=null;if(i){const f=ju(r);l=new vO(this.interface,f,i)}let c=new Map;if(typeof e=="string")if(In(e))s=e,o=Promise.resolve(e);else{const f=uh(r,"resolveName");if(!oA(f))throw qn("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=f.resolveName(e).then(h=>{if(h==null)throw qn("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Ki(this).addr=h,h})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return Ki(this).addr=f,f});$re(this,{addrPromise:o,addr:s,deployTx:l,subs:c});const u=new Proxy({},{get:(f,h,d)=>{if(typeof h=="symbol"||nb.indexOf(h)>=0)return Reflect.get(f,h,d);try{return this.getEvent(h)}catch(g){if(!Kr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(f,h)=>nb.indexOf(h)>=0?Reflect.has(f,h):Reflect.has(f,h)||this.interface.hasEvent(String(h))});return mt(this,{filters:u}),mt(this,{fallback:a.receive||a.fallback?Bre(this):null}),new Proxy(this,{get:(f,h,d)=>{if(typeof h=="symbol"||h in f||nb.indexOf(h)>=0)return Reflect.get(f,h,d);try{return f.getFunction(h)}catch(g){if(!Kr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(f,h)=>typeof h=="symbol"||h in f||nb.indexOf(h)>=0?Reflect.has(f,h):f.interface.hasFunction(h)})}connect(e){return new Uy(this.target,this.interface,e)}attach(e){return new Uy(e,this.interface,this.runner)}async getAddress(){return await Ki(this).addrPromise}async getDeployedCode(){const e=ju(this.runner);me(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const n=await e.getCode(await this.getAddress());return n==="0x"?null:n}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=ju(this.runner);return me(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,a)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);r.once("block",o)}catch(s){a(s)}};o()})}deploymentTransaction(){return Ki(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),Dre(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),Lre(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,n,r){n==null&&(n=0),r==null&&(r="latest");const{addr:i,addrPromise:a}=Ki(this),o=i||await a,{fragment:s,topics:l}=await bO(this,e),c={address:o,topics:l,fromBlock:n,toBlock:r},u=ju(this.runner);return me(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(c)).map(f=>{let h=s;if(h==null)try{h=this.interface.getEvent(f.topics[0])}catch{}if(h)try{return new mO(f,this.interface,h)}catch(d){return new xU(f,d)}return new cv(f,u)})}async on(e,n){const r=await C_(this,"on",e);return r.listeners.push({listener:n,once:!1}),r.start(),this}async once(e,n){const r=await C_(this,"once",e);return r.listeners.push({listener:n,once:!0}),r.start(),this}async emit(e,...n){return await M3(this,e,n,null)}async listenerCount(e){if(e){const i=await cy(this,e);return i?i.listeners.length:0}const{subs:n}=Ki(this);let r=0;for(const{listeners:i}of n.values())r+=i.length;return r}async listeners(e){if(e){const i=await cy(this,e);return i?i.listeners.map(({listener:a})=>a):[]}const{subs:n}=Ki(this);let r=[];for(const{listeners:i}of n.values())r=r.concat(i.map(({listener:a})=>a));return r}async off(e,n){const r=await cy(this,e);if(!r)return this;if(n){const i=r.listeners.map(({listener:a})=>a).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(n==null||r.listeners.length===0)&&(r.stop(),Ki(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){const n=await cy(this,e);if(!n)return this;n.stop(),Ki(this).subs.delete(n.tag)}else{const{subs:n}=Ki(this);for(const{tag:r,stop:i}of n.values())i(),n.delete(r)}return this}async addListener(e,n){return await this.on(e,n)}async removeListener(e,n){return await this.off(e,n)}static buildClass(e){class n extends Uy{constructor(i,a=null){super(i,e,a)}}return n}static from(e,n,r){return r==null&&(r=null),new this(e,n,r)}};yPe=cx;let B3=Uy;function jre(){return B3}class ky extends jre(){}function iE(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):J(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class zre{constructor(e){R(this,"name");mt(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,n){throw new Error("unsupported coin")}async decodeAddress(e,n){throw new Error("unsupported coin")}}const kU=new RegExp("^(ipfs)://(.*)$","i"),k_=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),kU,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Ec,Of,Sc,Hh,p2,_U;const bd=class bd{constructor(e,n,r){M(this,Sc);R(this,"provider");R(this,"address");R(this,"name");M(this,Ec,void 0);M(this,Of,void 0);mt(this,{provider:e,address:n,name:r}),O(this,Ec,null),O(this,Of,new ky(n,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return v(this,Ec)==null&&O(this,Ec,(async()=>{try{return await v(this,Of).supportsInterface("0x9061b923")}catch(e){if(Kr(e,"CALL_EXCEPTION"))return!1;throw O(this,Ec,null),e}})()),await v(this,Ec)}async getAddress(e){if(e==null&&(e=60),e===60)try{const a=await ie(this,Sc,Hh).call(this,"addr(bytes32)");return a==null||a===S3?null:a}catch(a){if(Kr(a,"CALL_EXCEPTION"))return null;throw a}if(e>=0&&e<2147483648){let a=e+2147483648;const o=await ie(this,Sc,Hh).call(this,"addr(bytes32,uint)",[a]);if(In(o,20))return rn(o)}let n=null;for(const a of this.provider.plugins)if(a instanceof zre&&a.supportsCoinType(e)){n=a;break}if(n==null)return null;const r=await ie(this,Sc,Hh).call(this,"addr(bytes32,uint)",[e]);if(r==null||r==="0x")return null;const i=await n.decodeAddress(e,r);if(i!=null)return i;me(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:r}})}async getText(e){const n=await ie(this,Sc,Hh).call(this,"text(bytes32,string)",[e]);return n==null||n==="0x"?null:n}async getContentHash(){const e=await ie(this,Sc,Hh).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const n=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(n){const i=n[1]==="e3010170"?"ipfs":"ipns",a=parseInt(n[4],16);if(n[5].length===a*2)return`${i}://${Cte("0x"+n[2])}`}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&r[1].length===64)return`bzz://${r[1]}`;me(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const n=await this.getText("avatar");if(n==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:n});for(let r=0;r{if(!Array.isArray(e))throw new Error("not an array");return e.map(n=>t(n))}}function uv(t,e){return n=>{const r={};for(const i in t){let a=i;if(e&&i in e&&!(a in n)){for(const o of e[i])if(o in n){a=o;break}}try{const o=t[i](n[a]);o!==void 0&&(r[i]=o)}catch(o){const s=o instanceof Error?o.message:"not-an-error";me(!1,`invalid value for value.${i} (${s})`,"BAD_DATA",{value:n})}}return r}}function Hre(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}J(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Cp(t){return J(In(t,!0),"invalid data","value",t),t}function za(t){return J(In(t,32),"invalid hash","value",t),t}const Gre=uv({address:rn,blockHash:za,blockNumber:Lt,data:Cp,index:Lt,removed:Tn(Hre,!1),topics:wO(za),transactionHash:za,transactionIndex:Lt},{index:["logIndex"]});function Vre(t){return Gre(t)}const Qre=uv({hash:Tn(za),parentHash:za,number:Lt,timestamp:Lt,nonce:Tn(Cp),difficulty:ot,gasLimit:ot,gasUsed:ot,miner:Tn(rn),extraData:Cp,baseFeePerGas:Tn(ot)});function Kre(t){const e=Qre(t);return e.transactions=t.transactions.map(n=>typeof n=="string"?n:NU(n)),e}const Wre=uv({transactionIndex:Lt,blockNumber:Lt,transactionHash:za,address:rn,topics:wO(za),data:Cp,index:Lt,blockHash:za},{index:["logIndex"]});function Jre(t){return Wre(t)}const Yre=uv({to:Tn(rn,null),from:Tn(rn,null),contractAddress:Tn(rn,null),index:Lt,root:Tn(Ze),gasUsed:ot,logsBloom:Tn(Cp),blockHash:za,hash:za,logs:wO(Jre),blockNumber:Lt,cumulativeGasUsed:ot,effectiveGasPrice:Tn(ot),status:Tn(Lt),type:Tn(Lt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function Xre(t){return Yre(t)}function NU(t){t.to&&ot(t.to)===__&&(t.to="0x0000000000000000000000000000000000000000");const e=uv({hash:za,type:n=>n==="0x"||n==null?0:Lt(n),accessList:Tn(wh,null),blockHash:Tn(za,null),blockNumber:Tn(Lt,null),transactionIndex:Tn(Lt,null),from:rn,gasPrice:Tn(ot),maxPriorityFeePerGas:Tn(ot),maxFeePerGas:Tn(ot),gasLimit:ot,to:Tn(rn,null),value:ot,nonce:Lt,data:Cp,creates:Tn(rn,null),chainId:Tn(ot,null)},{data:["input"],gasLimit:["gas"]})(t);if(e.to==null&&e.creates==null&&(e.creates=Yte(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=To.from(t.signature):e.signature=To.from(t),e.chainId==null){const n=e.signature.legacyChainId;n!=null&&(e.chainId=n)}return e.blockHash&&ot(e.blockHash)===__&&(e.blockHash=null),e}const Zre="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class fv{constructor(e){R(this,"name");mt(this,{name:e})}clone(){return new fv(this.name)}}class sA extends fv{constructor(n,r){n==null&&(n=0);super(`org.ethers.network.plugins.GasCost#${n||0}`);R(this,"effectiveBlock");R(this,"txBase");R(this,"txCreate");R(this,"txDataZero");R(this,"txDataNonzero");R(this,"txAccessListStorageKey");R(this,"txAccessListAddress");const i={effectiveBlock:n};function a(o,s){let l=(r||{})[o];l==null&&(l=s),J(typeof l=="number",`invalud value for ${o}`,"costs",r),i[o]=l}a("txBase",21e3),a("txCreate",32e3),a("txDataZero",4),a("txDataNonzero",16),a("txAccessListStorageKey",1900),a("txAccessListAddress",2400),mt(this,i)}clone(){return new sA(this.effectiveBlock,this)}}class lA extends fv{constructor(n,r){super("org.ethers.plugins.network.Ens");R(this,"address");R(this,"targetNetwork");mt(this,{address:n||Zre,targetNetwork:r??1})}clone(){return new lA(this.address,this.targetNetwork)}}var $m,Um;class qre extends fv{constructor(n,r){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");M(this,$m,void 0);M(this,Um,void 0);O(this,$m,n),O(this,Um,r)}get url(){return v(this,$m)}get processFunc(){return v(this,Um)}clone(){return this}}$m=new WeakMap,Um=new WeakMap;const aE=new Map;var Y0,X0,Pc;const wd=class wd{constructor(e,n){M(this,Y0,void 0);M(this,X0,void 0);M(this,Pc,void 0);O(this,Y0,e),O(this,X0,ot(n)),O(this,Pc,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return v(this,Y0)}set name(e){O(this,Y0,e)}get chainId(){return v(this,X0)}set chainId(e){O(this,X0,ot(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===ot(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===ot(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===ot(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(v(this,Pc).values())}attachPlugin(e){if(v(this,Pc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return v(this,Pc).set(e.name,e.clone()),this}getPlugin(e){return v(this,Pc).get(e)||null}getPlugins(e){return this.plugins.filter(n=>n.name.split("#")[0]===e)}clone(){const e=new wd(this.name,this.chainId);return this.plugins.forEach(n=>{e.attachPlugin(n.clone())}),e}computeIntrinsicGas(e){const n=this.getPlugin("org.ethers.plugins.network.GasCost")||new sA;let r=n.txBase;if(e.to==null&&(r+=n.txCreate),e.data)for(let i=2;i9){let i=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||i++,r[1]=i.toString()}return BigInt(r[0]+r[1])}function I_(t){return new qre(t,async(e,n,r)=>{r.setHeader("User-Agent","ethers");let i;try{const[a,o]=await Promise.all([r.send(),e()]);i=a;const s=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:N_(s.maxFee,9),maxPriorityFeePerGas:N_(s.maxPriorityFee,9)}}catch(a){me(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:i,error:a})}})}let R_=!1;function eie(){if(R_)return;R_=!0;function t(e,n,r){const i=function(){const a=new ns(e,n);return r.ensNetwork!=null&&a.attachPlugin(new lA(null,r.ensNetwork)),a.attachPlugin(new sA),(r.plugins||[]).forEach(o=>{a.attachPlugin(o)}),a};ns.register(e,i),ns.register(n,i),r.altNames&&r.altNames.forEach(a=>{ns.register(a,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("matic",137,{ensNetwork:1,plugins:[I_("https://gasstation.polygon.technology/v2")]}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[I_("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("xdai",100,{ensNetwork:1})}function D3(t){return JSON.parse(JSON.stringify(t))}var Ys,Oa,Oc,Jo,Z0,ow;class tie{constructor(e){M(this,Z0);M(this,Ys,void 0);M(this,Oa,void 0);M(this,Oc,void 0);M(this,Jo,void 0);O(this,Ys,e),O(this,Oa,null),O(this,Oc,4e3),O(this,Jo,-2)}get pollingInterval(){return v(this,Oc)}set pollingInterval(e){O(this,Oc,e)}start(){v(this,Oa)||(O(this,Oa,v(this,Ys)._setTimeout(ie(this,Z0,ow).bind(this),v(this,Oc))),ie(this,Z0,ow).call(this))}stop(){v(this,Oa)&&(v(this,Ys)._clearTimeout(v(this,Oa)),O(this,Oa,null))}pause(e){this.stop(),e&&O(this,Jo,-2)}resume(){this.start()}}Ys=new WeakMap,Oa=new WeakMap,Oc=new WeakMap,Jo=new WeakMap,Z0=new WeakSet,ow=async function(){try{const e=await v(this,Ys).getBlockNumber();if(v(this,Jo)===-2){O(this,Jo,e);return}if(e!==v(this,Jo)){for(let n=v(this,Jo)+1;n<=e;n++){if(v(this,Oa)==null)return;await v(this,Ys).emit("block",n)}O(this,Jo,e)}}catch{}v(this,Oa)!=null&&O(this,Oa,v(this,Ys)._setTimeout(ie(this,Z0,ow).bind(this),v(this,Oc)))};var Tf,Cf,Tc;class xO{constructor(e){M(this,Tf,void 0);M(this,Cf,void 0);M(this,Tc,void 0);O(this,Tf,e),O(this,Tc,!1),O(this,Cf,n=>{this._poll(n,v(this,Tf))})}async _poll(e,n){throw new Error("sub-classes must override this")}start(){v(this,Tc)||(O(this,Tc,!0),v(this,Cf).call(this,-2),v(this,Tf).on("block",v(this,Cf)))}stop(){v(this,Tc)&&(O(this,Tc,!1),v(this,Tf).off("block",v(this,Cf)))}pause(e){this.stop()}resume(){this.start()}}Tf=new WeakMap,Cf=new WeakMap,Tc=new WeakMap;var q0,Xs;class nie extends xO{constructor(n,r){super(n);M(this,q0,void 0);M(this,Xs,void 0);O(this,q0,r),O(this,Xs,-2)}pause(n){n&&O(this,Xs,-2),super.pause(n)}async _poll(n,r){const i=await r.getBlock(v(this,q0));i!=null&&(v(this,Xs)===-2?O(this,Xs,i.number):i.number>v(this,Xs)&&(r.emit(v(this,q0),i.number),O(this,Xs,i.number)))}}q0=new WeakMap,Xs=new WeakMap;var g2;class rie extends xO{constructor(n,r){super(n);M(this,g2,void 0);O(this,g2,D3(r))}async _poll(n,r){throw new Error("@TODO")}}g2=new WeakMap;var ep;class iie extends xO{constructor(n,r){super(n);M(this,ep,void 0);O(this,ep,r)}async _poll(n,r){const i=await r.getTransactionReceipt(v(this,ep));i&&r.emit(v(this,ep),i)}}ep=new WeakMap;var Zs,tp,np,Cc,Ta,y2,IU;class AO{constructor(e,n){M(this,y2);M(this,Zs,void 0);M(this,tp,void 0);M(this,np,void 0);M(this,Cc,void 0);M(this,Ta,void 0);O(this,Zs,e),O(this,tp,D3(n)),O(this,np,ie(this,y2,IU).bind(this)),O(this,Cc,!1),O(this,Ta,-2)}start(){v(this,Cc)||(O(this,Cc,!0),v(this,Ta)===-2&&v(this,Zs).getBlockNumber().then(e=>{O(this,Ta,e)}),v(this,Zs).on("block",v(this,np)))}stop(){v(this,Cc)&&(O(this,Cc,!1),v(this,Zs).off("block",v(this,np)))}pause(e){this.stop(),e&&O(this,Ta,-2)}resume(){this.start()}}Zs=new WeakMap,tp=new WeakMap,np=new WeakMap,Cc=new WeakMap,Ta=new WeakMap,y2=new WeakSet,IU=async function(e){if(v(this,Ta)===-2)return;const n=D3(v(this,tp));n.fromBlock=v(this,Ta)+1,n.toBlock=e;const r=await v(this,Zs).getLogs(n);if(r.length===0){v(this,Ta){if(r==null)return"null";if(typeof r=="bigint")return`bigint:${r.toString()}`;if(typeof r=="string")return r.toLowerCase();if(typeof r=="object"&&!Array.isArray(r)){const i=Object.keys(r);return i.sort(),i.reduce((a,o)=>(a[o]=r[o],a),{})}return r})}class RU{constructor(e){R(this,"name");mt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function sie(t){return JSON.parse(JSON.stringify(t))}function L3(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function oE(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(In(t,32)){const n=t.toLowerCase();return{type:"transaction",tag:sw("tx",{hash:n}),hash:n}}if(t.orphan){const n=t;return{type:"orphan",tag:sw("orphan",n),filter:sie(n)}}if(t.address||t.topics){const n=t,r={topics:(n.topics||[]).map(i=>i==null?null:Array.isArray(i)?L3(i.map(a=>a.toLowerCase())):i.toLowerCase())};if(n.address){const i=[],a=[],o=s=>{In(s)?i.push(s):a.push((async()=>{i.push(await fi(s,e))})())};Array.isArray(n.address)?n.address.forEach(o):o(n.address),a.length&&await Promise.all(a),r.address=L3(i.map(s=>s.toLowerCase()))}return{filter:r,tag:sw("event",r),type:"event"}}J(!1,"unknown ProviderEvent","event",t)}function sE(){return new Date().getTime()}const lie={cacheTimeout:250,pollingInterval:4e3};var Fr,kc,jr,rp,ta,kf,_c,qs,Fm,Ca,ip,ap,qr,Vi,jm,$3,zm,U3,_f,uy,Hm,F3,Nf,fy,op,lw;class MU{constructor(e,n){M(this,qr);M(this,jm);M(this,zm);M(this,_f);M(this,Hm);M(this,Nf);M(this,op);M(this,Fr,void 0);M(this,kc,void 0);M(this,jr,void 0);M(this,rp,void 0);M(this,ta,void 0);M(this,kf,void 0);M(this,_c,void 0);M(this,qs,void 0);M(this,Fm,void 0);M(this,Ca,void 0);M(this,ip,void 0);M(this,ap,void 0);if(O(this,ap,Object.assign({},lie,n||{})),e==="any")O(this,kf,!0),O(this,ta,null);else if(e){const r=ns.from(e);O(this,kf,!1),O(this,ta,Promise.resolve(r)),setTimeout(()=>{this.emit("network",r,null)},0)}else O(this,kf,!1),O(this,ta,null);O(this,qs,-1),O(this,_c,new Map),O(this,Fr,new Map),O(this,kc,new Map),O(this,jr,null),O(this,rp,!1),O(this,Fm,1),O(this,Ca,new Map),O(this,ip,!1)}get pollingInterval(){return v(this,ap).pollingInterval}get provider(){return this}get plugins(){return Array.from(v(this,kc).values())}attachPlugin(e){if(v(this,kc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return v(this,kc).set(e.name,e.connect(this)),this}getPlugin(e){return v(this,kc).get(e)||null}get disableCcipRead(){return v(this,ip)}set disableCcipRead(e){O(this,ip,!!e)}async ccipReadFetch(e,n,r){if(this.disableCcipRead||r.length===0||e.to==null)return null;const i=e.to.toLowerCase(),a=n.toLowerCase(),o=[];for(let s=0;s=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:l,errorMessage:f}}),o.push(f)}me(!1,`error encountered during CCIP fetch: ${o.map(s=>JSON.stringify(s)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:o}})}_wrapBlock(e,n){return new Cre(Kre(e),this)}_wrapLog(e,n){return new cv(Vre(e),this)}_wrapTransactionReceipt(e,n){return new vU(Xre(e),this)}_wrapTransactionResponse(e,n){return new S1(NU(e),this)}_detectNetwork(){me(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){me(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Lt(await ie(this,qr,Vi).call(this,{method:"getBlockNumber"}),"%response");return v(this,qs)>=0&&O(this,qs,e),e}_getAddress(e){return fi(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(In(e))return In(e,32)?e:Uu(e);if(typeof e=="bigint"&&(e=Lt(e,"blockTag")),typeof e=="number")return e>=0?Uu(e):v(this,qs)>=0?Uu(v(this,qs)+e):this.getBlockNumber().then(n=>Uu(n+e));J(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const n=(e.topics||[]).map(l=>l==null?null:Array.isArray(l)?L3(l.map(c=>c.toLowerCase())):l.toLowerCase()),r="blockHash"in e?e.blockHash:void 0,i=(l,c,u)=>{let f;switch(l.length){case 0:break;case 1:f=l[0];break;default:l.sort(),f=l}if(r&&(c!=null||u!=null))throw new Error("invalid filter");const h={};return f&&(h.address=f),n.length&&(h.topics=n),c&&(h.fromBlock=c),u&&(h.toBlock=u),r&&(h.blockHash=r),h};let a=[];if(e.address)if(Array.isArray(e.address))for(const l of e.address)a.push(this._getAddress(l));else a.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let s;return"toBlock"in e&&(s=this._getBlockTag(e.toBlock)),a.filter(l=>typeof l!="string").length||o!=null&&typeof o!="string"||s!=null&&typeof s!="string"?Promise.all([Promise.all(a),o,s]).then(l=>i(l[0],l[1],l[2])):i(a,o,s)}_getTransactionRequest(e){const n=lx(e),r=[];if(["to","from"].forEach(i=>{if(n[i]==null)return;const a=fi(n[i],this);rb(a)?r.push(async function(){n[i]=await a}()):n[i]=a}),n.blockTag!=null){const i=this._getBlockTag(n.blockTag);rb(i)?r.push(async function(){n.blockTag=await i}()):n.blockTag=i}return r.length?async function(){return await Promise.all(r),n}():n}async getNetwork(){if(v(this,ta)==null){const i=(async()=>{try{const a=await this._detectNetwork();return this.emit("network",a,null),a}catch(a){throw v(this,ta)===i&&O(this,ta,null),a}})();return O(this,ta,i),(await i).clone()}const e=v(this,ta),[n,r]=await Promise.all([e,this._detectNetwork()]);return n.chainId!==r.chainId&&(v(this,kf)?(this.emit("network",r,n),v(this,ta)===e&&O(this,ta,Promise.resolve(r))):me(!1,`network changed: ${n.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),n.clone()}async getFeeData(){const e=await this.getNetwork(),n=async()=>{const{_block:i,gasPrice:a,priorityFee:o}=await ni({_block:ie(this,Hm,F3).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await ie(this,qr,Vi).call(this,{method:"getGasPrice"});return ot(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await ie(this,qr,Vi).call(this,{method:"getPriorityFee"});return ot(u,"%response")}catch{}return null})()});let s=null,l=null;const c=this._wrapBlock(i,e);return c&&c.baseFeePerGas&&(l=o??BigInt("1000000000"),s=c.baseFeePerGas*aie+l),new O_(a,s,l)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const i=new El(r.url),a=await r.processFunc(n,this,i);return new O_(a.gasPrice,a.maxFeePerGas,a.maxPriorityFeePerGas)}return await n()}async estimateGas(e){let n=this._getTransactionRequest(e);return rb(n)&&(n=await n),ot(await ie(this,qr,Vi).call(this,{method:"estimateGas",transaction:n}),"%response")}async call(e){const{tx:n,blockTag:r}=await ni({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await ie(this,zm,U3).call(this,ie(this,jm,$3).call(this,n,r,e.enableCcipRead?0:-1))}async getBalance(e,n){return ot(await ie(this,_f,uy).call(this,{method:"getBalance"},e,n),"%response")}async getTransactionCount(e,n){return Lt(await ie(this,_f,uy).call(this,{method:"getTransactionCount"},e,n),"%response")}async getCode(e,n){return Ze(await ie(this,_f,uy).call(this,{method:"getCode"},e,n))}async getStorage(e,n,r){const i=ot(n,"position");return Ze(await ie(this,_f,uy).call(this,{method:"getStorage",position:i},e,r))}async broadcastTransaction(e){const{blockNumber:n,hash:r,network:i}=await ni({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),a=w1.from(e);if(a.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(a,i).replaceableTransaction(n)}async getBlock(e,n){const{network:r,params:i}=await ni({network:this.getNetwork(),params:ie(this,Hm,F3).call(this,e,!!n)});return i==null?null:this._wrapBlock(i,r)}async getTransaction(e){const{network:n,params:r}=await ni({network:this.getNetwork(),params:ie(this,qr,Vi).call(this,{method:"getTransaction",hash:e})});return r==null?null:this._wrapTransactionResponse(r,n)}async getTransactionReceipt(e){const{network:n,params:r}=await ni({network:this.getNetwork(),params:ie(this,qr,Vi).call(this,{method:"getTransactionReceipt",hash:e})});if(r==null)return null;if(r.gasPrice==null&&r.effectiveGasPrice==null){const i=await ie(this,qr,Vi).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(r,n)}async getTransactionResult(e){const{result:n}=await ni({network:this.getNetwork(),result:ie(this,qr,Vi).call(this,{method:"getTransactionResult",hash:e})});return n==null?null:Ze(n)}async getLogs(e){let n=this._getFilter(e);rb(n)&&(n=await n);const{network:r,params:i}=await ni({network:this.getNetwork(),params:ie(this,qr,Vi).call(this,{method:"getLogs",filter:n})});return i.map(a=>this._wrapLog(a,r))}_getProvider(e){me(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await ux.fromName(this,e)}async getAvatar(e){const n=await this.getResolver(e);return n?await n.getAvatar():null}async resolveName(e){const n=await this.getResolver(e);return n?await n.getAddress():null}async lookupAddress(e){e=rn(e);const n=_3(e.substring(2).toLowerCase()+".addr.reverse");try{const r=await ux.getEnsAddress(this),a=await new ky(r,["function resolver(bytes32) view returns (address)"],this).resolver(n);if(a==null||a===S3)return null;const s=await new ky(a,["function name(bytes32) view returns (string)"],this).name(n);return await this.resolveName(s)!==e?null:s}catch(r){if(Kr(r,"BAD_DATA")&&r.value==="0x"||Kr(r,"CALL_EXCEPTION"))return null;throw r}return null}async waitForTransaction(e,n,r){const i=n??1;return i===0?this.getTransactionReceipt(e):new Promise(async(a,o)=>{let s=null;const l=async c=>{try{const u=await this.getTransactionReceipt(e);if(u!=null&&c-u.blockNumber+1>=i){a(u),s&&(clearTimeout(s),s=null);return}}catch(u){console.log("EEE",u)}this.once("block",l)};r!=null&&(s=setTimeout(()=>{s!=null&&(s=null,this.off("block",l),o(qn("timeout","TIMEOUT",{reason:"timeout"})))},r)),l(await this.getBlockNumber())})}async waitForBlock(e){me(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const n=v(this,Ca).get(e);n&&(n.timer&&clearTimeout(n.timer),v(this,Ca).delete(e))}_setTimeout(e,n){n==null&&(n=0);const r=vs(this,Fm)._++,i=()=>{v(this,Ca).delete(r),e()};if(this.paused)v(this,Ca).set(r,{timer:null,func:i,time:n});else{const a=setTimeout(i,n);v(this,Ca).set(r,{timer:a,func:i,time:sE()})}return r}_forEachSubscriber(e){for(const n of v(this,Fr).values())e(n.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new RU(e.type);case"block":{const n=new tie(this);return n.pollingInterval=this.pollingInterval,n}case"safe":case"finalized":return new nie(this,e.type);case"event":return new AO(this,e.filter);case"transaction":return new iie(this,e.hash);case"orphan":return new rie(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,n){for(const r of v(this,Fr).values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=n,r.started&&n.start(),v(this,jr)!=null&&n.pause(v(this,jr));break}}async on(e,n){const r=await ie(this,op,lw).call(this,e);return r.listeners.push({listener:n,once:!1}),r.started||(r.subscriber.start(),r.started=!0,v(this,jr)!=null&&r.subscriber.pause(v(this,jr))),this}async once(e,n){const r=await ie(this,op,lw).call(this,e);return r.listeners.push({listener:n,once:!0}),r.started||(r.subscriber.start(),r.started=!0,v(this,jr)!=null&&r.subscriber.pause(v(this,jr))),this}async emit(e,...n){const r=await ie(this,Nf,fy).call(this,e,n);if(!r||r.listeners.length===0)return!1;const i=r.listeners.length;return r.listeners=r.listeners.filter(({listener:a,once:o})=>{const s=new v$(this,o?null:a,e);try{a.call(this,...n,s)}catch{}return!o}),r.listeners.length===0&&(r.started&&r.subscriber.stop(),v(this,Fr).delete(r.tag)),i>0}async listenerCount(e){if(e){const r=await ie(this,Nf,fy).call(this,e);return r?r.listeners.length:0}let n=0;for(const{listeners:r}of v(this,Fr).values())n+=r.length;return n}async listeners(e){if(e){const r=await ie(this,Nf,fy).call(this,e);return r?r.listeners.map(({listener:i})=>i):[]}let n=[];for(const{listeners:r}of v(this,Fr).values())n=n.concat(r.map(({listener:i})=>i));return n}async off(e,n){const r=await ie(this,Nf,fy).call(this,e);if(!r)return this;if(n){const i=r.listeners.map(({listener:a})=>a).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(!n||r.listeners.length===0)&&(r.started&&r.subscriber.stop(),v(this,Fr).delete(r.tag)),this}async removeAllListeners(e){if(e){const{tag:n,started:r,subscriber:i}=await ie(this,op,lw).call(this,e);r&&i.stop(),v(this,Fr).delete(n)}else for(const[n,{started:r,subscriber:i}]of v(this,Fr))r&&i.stop(),v(this,Fr).delete(n);return this}async addListener(e,n){return await this.on(e,n)}async removeListener(e,n){return this.off(e,n)}get destroyed(){return v(this,rp)}destroy(){this.removeAllListeners();for(const e of v(this,Ca).keys())this._clearTimeout(e);O(this,rp,!0)}get paused(){return v(this,jr)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(O(this,qs,-1),v(this,jr)!=null){if(v(this,jr)==!!e)return;me(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(n=>n.pause(e)),O(this,jr,!!e);for(const n of v(this,Ca).values())n.timer&&clearTimeout(n.timer),n.time=sE()-n.time}resume(){if(v(this,jr)!=null){this._forEachSubscriber(e=>e.resume()),O(this,jr,null);for(const e of v(this,Ca).values()){let n=e.time;n<0&&(n=0),e.time=sE(),setTimeout(e.func,n)}}}}Fr=new WeakMap,kc=new WeakMap,jr=new WeakMap,rp=new WeakMap,ta=new WeakMap,kf=new WeakMap,_c=new WeakMap,qs=new WeakMap,Fm=new WeakMap,Ca=new WeakMap,ip=new WeakMap,ap=new WeakMap,qr=new WeakSet,Vi=async function(e){const n=v(this,ap).cacheTimeout;if(n<0)return await this._perform(e);const r=sw(e.method,e);let i=v(this,_c).get(r);return i||(i=this._perform(e),v(this,_c).set(r,i),setTimeout(()=>{v(this,_c).get(r)===i&&v(this,_c).delete(r)},n)),await i},jm=new WeakSet,$3=async function(e,n,r){me(r=0&&n==="latest"&&i.to!=null&&Fn(a.data,0,4)==="0x556f1830"){const o=a.data,s=await fi(i.to,this);let l;try{l=die(Fn(a.data,4))}catch(f){me(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}me(l.sender.toLowerCase()===s.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:l.errorArgs}});const c=await this.ccipReadFetch(i,l.calldata,l.urls);me(c!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:a.data,errorArgs:l.errorArgs}});const u={to:s,data:sr([l.selector,hie([c,l.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:u});try{const f=await ie(this,jm,$3).call(this,u,n,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},u),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},u),error:f}),f}}throw a}},zm=new WeakSet,U3=async function(e){const{value:n}=await ni({network:this.getNetwork(),value:e});return n},_f=new WeakSet,uy=async function(e,n,r){let i=this._getAddress(n),a=this._getBlockTag(r);return(typeof i!="string"||typeof a!="string")&&([i,a]=await Promise.all([i,a])),await ie(this,zm,U3).call(this,ie(this,qr,Vi).call(this,Object.assign(e,{address:i,blockTag:a})))},Hm=new WeakSet,F3=async function(e,n){if(In(e,32))return await ie(this,qr,Vi).call(this,{method:"getBlock",blockHash:e,includeTransactions:n});let r=this._getBlockTag(e);return typeof r!="string"&&(r=await r),await ie(this,qr,Vi).call(this,{method:"getBlock",blockTag:r,includeTransactions:n})},Nf=new WeakSet,fy=async function(e,n){let r=await oE(e,this);return r.type==="event"&&n&&n.length>0&&n[0].removed===!0&&(r=await oE({orphan:"drop-log",log:n[0]},this)),v(this,Fr).get(r.tag)||null},op=new WeakSet,lw=async function(e){const n=await oE(e,this),r=n.tag;let i=v(this,Fr).get(r);return i||(i={subscriber:this._getSubscriber(n),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},v(this,Fr).set(r,i)),i};function cie(t,e){try{const n=j3(t,e);if(n)return uO(n)}catch{}return null}function j3(t,e){if(t==="0x")return null;try{const n=Lt(Fn(t,e,e+32)),r=Lt(Fn(t,n,n+32));return Fn(t,n+32,n+32+r)}catch{}return null}function M_(t){const e=sa(t);if(e.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(e,32-e.length),n}function uie(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const fie=new Uint8Array([]);function hie(t){const e=[];let n=0;for(let r=0;r=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const n=Fn(t,0,32);me(Fn(n,0,12)===Fn(B_,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=Fn(n,12);try{const r=[],i=Lt(Fn(t,32,64)),a=Lt(Fn(t,i,i+32)),o=Fn(t,i+32);for(let s=0;se[r]),e}function _h(t,e){if(t.provider)return t.provider;me(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function D_(t,e){let n=lx(e);if(n.to!=null&&(n.to=fi(n.to,t)),n.from!=null){const r=n.from;n.from=Promise.all([t.getAddress(),fi(r,t)]).then(([i,a])=>(J(i.toLowerCase()===a.toLowerCase(),"transaction from mismatch","tx.from",a),i))}else n.from=t.getAddress();return await ni(n)}class BU{constructor(e){R(this,"provider");mt(this,{provider:e||null})}async getNonce(e){return _h(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await D_(this,e)}async populateTransaction(e){const n=_h(this,"populateTransaction"),r=await D_(this,e);r.nonce==null&&(r.nonce=await this.getNonce("pending")),r.gasLimit==null&&(r.gasLimit=await this.estimateGas(r));const i=await this.provider.getNetwork();if(r.chainId!=null){const o=ot(r.chainId);J(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=i.chainId;const a=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||a)?J(!1,"eip-1559 transaction do not support gasPrice","tx",e):(r.type===0||r.type===1)&&a&&J(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1){const o=await n.getFeeData();me(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),r.gasPrice==null&&(r.gasPrice=o.gasPrice)}else{const o=await n.getFeeData();if(r.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=o.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(me(!a,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=o.gasPrice),r.type=0):me(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=o.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await ni(r)}async estimateGas(e){return _h(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return _h(this,"call").call(await this.populateCall(e))}async resolveName(e){return await _h(this,"resolveName").resolveName(e)}async sendTransaction(e){const n=_h(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const i=w1.from(r);return await n.broadcastTransaction(await this.signTransaction(i))}}function pie(t){return JSON.parse(JSON.stringify(t))}var Ei,Yo,If,Nc,Rf,sp,Gm,z3,Vm,H3;class DU{constructor(e){M(this,Gm);M(this,Vm);M(this,Ei,void 0);M(this,Yo,void 0);M(this,If,void 0);M(this,Nc,void 0);M(this,Rf,void 0);M(this,sp,void 0);O(this,Ei,e),O(this,Yo,null),O(this,If,ie(this,Gm,z3).bind(this)),O(this,Nc,!1),O(this,Rf,null),O(this,sp,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,n){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){v(this,Nc)||(O(this,Nc,!0),ie(this,Gm,z3).call(this,-2))}stop(){v(this,Nc)&&(O(this,Nc,!1),O(this,sp,!0),ie(this,Vm,H3).call(this),v(this,Ei).off("block",v(this,If)))}pause(e){e&&ie(this,Vm,H3).call(this),v(this,Ei).off("block",v(this,If))}resume(){this.start()}}Ei=new WeakMap,Yo=new WeakMap,If=new WeakMap,Nc=new WeakMap,Rf=new WeakMap,sp=new WeakMap,Gm=new WeakSet,z3=async function(e){try{v(this,Yo)==null&&O(this,Yo,this._subscribe(v(this,Ei)));let n=null;try{n=await v(this,Yo)}catch(a){if(!Kr(a,"UNSUPPORTED_OPERATION")||a.operation!=="eth_newFilter")throw a}if(n==null){O(this,Yo,null),v(this,Ei)._recoverSubscriber(this,this._recover(v(this,Ei)));return}const r=await v(this,Ei).getNetwork();if(v(this,Rf)||O(this,Rf,r),v(this,Rf).chainId!==r.chainId)throw new Error("chaid changed");if(v(this,sp))return;const i=await v(this,Ei).send("eth_getFilterChanges",[n]);await this._emitResults(v(this,Ei),i)}catch(n){console.log("@TODO",n)}v(this,Ei).once("block",v(this,If))},Vm=new WeakSet,H3=function(){const e=v(this,Yo);e&&(O(this,Yo,null),e.then(n=>{v(this,Ei).send("eth_uninstallFilter",[n])}))};var Mf;class gie extends DU{constructor(n,r){super(n);M(this,Mf,void 0);O(this,Mf,pie(r))}_recover(n){return new AO(n,v(this,Mf))}async _subscribe(n){return await n.send("eth_newFilter",[v(this,Mf)])}async _emitResults(n,r){for(const i of r)n.emit(v(this,Mf),n._wrapLog(i,n._network))}}Mf=new WeakMap;class yie extends DU{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,n){for(const r of n)e.emit("pending",r)}}const mie="bigint,boolean,function,number,string,symbol".split(/,/g);function cw(t){if(t==null||mie.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(cw);if(typeof t=="object")return Object.keys(t).reduce((e,n)=>(e[n]=t[n],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function vie(t){return new Promise(e=>{setTimeout(e,t)})}function Nh(t){return t&&t.toLowerCase()}function L_(t){return t&&typeof t.pollingInterval=="number"}const bie={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class lE extends BU{constructor(n,r){super(n);R(this,"address");r=rn(r),mt(this,{address:r})}connect(n){me(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(n){return await this.populateCall(n)}async sendUncheckedTransaction(n){const r=cw(n),i=[];if(r.from){const o=r.from;i.push((async()=>{const s=await fi(o,this.provider);J(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=s})())}else r.from=this.address;if(r.gasLimit==null&&i.push((async()=>{r.gasLimit=await this.provider.estimateGas({...r,from:this.address})})()),r.to!=null){const o=r.to;i.push((async()=>{r.to=await fi(o,this.provider)})())}i.length&&await Promise.all(i);const a=this.provider.getRpcTransaction(r);return this.provider.send("eth_sendTransaction",[a])}async sendTransaction(n){const r=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(n);return await new Promise((a,o)=>{const s=[1e3,100];let l=0;const c=async()=>{try{const u=await this.provider.getTransaction(i);if(u!=null){a(u.replaceableTransaction(r));return}}catch(u){if(Kr(u,"CANCELLED")||Kr(u,"BAD_DATA")||Kr(u,"NETWORK_ERROR")){u.info==null&&(u.info={}),u.info.sendTransactionHash=i,o(u);return}if(Kr(u,"INVALID_ARGUMENT")&&(l++,u.info==null&&(u.info={}),u.info.sendTransactionHash=i,l>10)){o(u);return}this.provider.emit("error",qn("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:u}))}this.provider._setTimeout(()=>{c()},s.pop()||4e3)};c()})}async signTransaction(n){const r=cw(n);if(r.from){const a=await fi(r.from,this.provider);J(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=a}else r.from=this.address;const i=this.provider.getRpcTransaction(r);return await this.provider.send("eth_signTransaction",[i])}async signMessage(n){const r=typeof n=="string"?hl(n):n;return await this.provider.send("personal_sign",[Ze(r),this.address.toLowerCase()])}async signTypedData(n,r,i){const a=cw(i),o=await x1.resolveNames(n,r,a,async s=>{const l=await fi(s);return J(l!=null,"TypedData does not support null address","value",s),l});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(x1.getPayload(o.domain,r,o.value))])}async unlock(n){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),n,null])}async _legacySignMessage(n){const r=typeof n=="string"?hl(n):n;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Ze(r)])}}var Bf,lp,el,Xo,fo,ka,Si,Qm,G3;class wie extends MU{constructor(n,r){super(n,r);M(this,Qm);M(this,Bf,void 0);M(this,lp,void 0);M(this,el,void 0);M(this,Xo,void 0);M(this,fo,void 0);M(this,ka,void 0);M(this,Si,void 0);O(this,lp,1),O(this,Bf,Object.assign({},bie,r||{})),O(this,el,[]),O(this,Xo,null),O(this,ka,null),O(this,Si,null);{let a=null;const o=new Promise(s=>{a=s});O(this,fo,{promise:o,resolve:a})}const i=this._getOption("staticNetwork");typeof i=="boolean"?(J(!i||n!=="any","staticNetwork cannot be used on special network 'any'","options",r),i&&n!=null&&O(this,ka,ns.from(n))):i&&(J(n==null||i.matches(n),"staticNetwork MUST match network object","options",r),O(this,ka,i))}_getOption(n){return v(this,Bf)[n]}get _network(){return me(v(this,ka),"network is not available yet","NETWORK_ERROR"),v(this,ka)}async _perform(n){if(n.method==="call"||n.method==="estimateGas"){let i=n.transaction;if(i&&i.type!=null&&ot(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const a=await this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(n=Object.assign({},n,{transaction:Object.assign({},i,{type:void 0})}))}}const r=this.getRpcRequest(n);return r!=null?await this.send(r.method,r.args):super._perform(n)}async _detectNetwork(){const n=this._getOption("staticNetwork");if(n)if(n===!0){if(v(this,ka))return v(this,ka)}else return n;return v(this,Si)?await v(this,Si):this.ready?(O(this,Si,(async()=>{try{const r=ns.from(ot(await this.send("eth_chainId",[])));return O(this,Si,null),r}catch(r){throw O(this,Si,null),r}})()),await v(this,Si)):(O(this,Si,(async()=>{const r={id:vs(this,lp)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:r});let i;try{i=(await this._send(r))[0],O(this,Si,null)}catch(a){throw O(this,Si,null),this.emit("debug",{action:"receiveRpcError",error:a}),a}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return ns.from(ot(i.result));throw this.getRpcError(r,i)})()),await v(this,Si))}_start(){v(this,fo)==null||v(this,fo).resolve==null||(v(this,fo).resolve(),O(this,fo,null),(async()=>{for(;v(this,ka)==null&&!this.destroyed;)try{O(this,ka,await this._detectNetwork())}catch(n){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",qn("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:n}})),await vie(1e3)}ie(this,Qm,G3).call(this)})())}async _waitUntilReady(){if(v(this,fo)!=null)return await v(this,fo).promise}_getSubscriber(n){return n.type==="pending"?new yie(this):n.type==="event"?this._getOption("polling")?new AO(this,n.filter):new gie(this,n.filter):n.type==="orphan"&&n.filter.orphan==="drop-log"?new RU("orphan"):super._getSubscriber(n)}get ready(){return v(this,fo)==null}getRpcTransaction(n){const r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(n[i]==null)return;let a=i;i==="gasLimit"&&(a="gas"),r[a]=Uu(ot(n[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{n[i]!=null&&(r[i]=Ze(n[i]))}),n.accessList&&(r.accessList=wh(n.accessList)),r}getRpcRequest(n){switch(n.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[Nh(n.address),n.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[Nh(n.address),n.blockTag]};case"getCode":return{method:"eth_getCode",args:[Nh(n.address),n.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[Nh(n.address),"0x"+n.position.toString(16),n.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[n.signedTransaction]};case"getBlock":if("blockTag"in n)return{method:"eth_getBlockByNumber",args:[n.blockTag,!!n.includeTransactions]};if("blockHash"in n)return{method:"eth_getBlockByHash",args:[n.blockHash,!!n.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[n.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[n.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(n.transaction),n.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(n.transaction)]};case"getLogs":return n.filter&&n.filter.address!=null&&(Array.isArray(n.filter.address)?n.filter.address=n.filter.address.map(Nh):n.filter.address=Nh(n.filter.address)),{method:"eth_getLogs",args:[n.filter]}}return null}getRpcError(n,r){const{method:i}=n,{error:a}=r;if(i==="eth_estimateGas"&&a.message){const l=a.message;if(!l.match(/revert/i)&&l.match(/insufficient funds/i))return qn("insufficient funds","INSUFFICIENT_FUNDS",{transaction:n.params[0],info:{payload:n,error:a}})}if(i==="eth_call"||i==="eth_estimateGas"){const l=V3(a),c=E1.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",n.params[0],l?l.data:null);return c.info={error:a,payload:n},c}const o=JSON.stringify(Aie(a));if(typeof a.message=="string"&&a.message.match(/user denied|ethers-user-denied/i))return qn("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:n,error:a}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const l=n.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return qn("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:l,info:{error:a}});if(o.match(/nonce/i)&&o.match(/too low/i))return qn("nonce has already been used","NONCE_EXPIRED",{transaction:l,info:{error:a}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return qn("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:l,info:{error:a}});if(o.match(/only replay-protected/i))return qn("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:l,info:{error:a}}})}let s=!!o.match(/the method .* does not exist/i);return s||a&&a.details&&a.details.startsWith("Unauthorized method:")&&(s=!0),s?qn("unsupported operation","UNSUPPORTED_OPERATION",{operation:n.method,info:{error:a,payload:n}}):qn("could not coalesce error","UNKNOWN_ERROR",{error:a,payload:n})}send(n,r){if(this.destroyed)return Promise.reject(qn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n}));const i=vs(this,lp)._++,a=new Promise((o,s)=>{v(this,el).push({resolve:o,reject:s,payload:{method:n,params:r,id:i,jsonrpc:"2.0"}})});return ie(this,Qm,G3).call(this),a}async getSigner(n){n==null&&(n=0);const r=this.send("eth_accounts",[]);if(typeof n=="number"){const a=await r;if(n>=a.length)throw new Error("no such account");return new lE(this,a[n])}const{accounts:i}=await ni({network:this.getNetwork(),accounts:r});n=rn(n);for(const a of i)if(rn(a)===n)return new lE(this,n);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(r=>new lE(this,r))}destroy(){v(this,Xo)&&(clearTimeout(v(this,Xo)),O(this,Xo,null));for(const{payload:n,reject:r}of v(this,el))r(qn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n.method}));O(this,el,[]),super.destroy()}}Bf=new WeakMap,lp=new WeakMap,el=new WeakMap,Xo=new WeakMap,fo=new WeakMap,ka=new WeakMap,Si=new WeakMap,Qm=new WeakSet,G3=function(){if(v(this,Xo))return;const n=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");O(this,Xo,setTimeout(()=>{O(this,Xo,null);const r=v(this,el);for(O(this,el,[]);r.length;){const i=[r.shift()];for(;r.length&&i.length!==v(this,Bf).batchMaxCount;)if(i.push(r.shift()),JSON.stringify(i.map(o=>o.payload)).length>v(this,Bf).batchMaxSize){r.unshift(i.pop());break}(async()=>{const a=i.length===1?i[0].payload:i.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:a});try{const o=await this._send(a);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:s,reject:l,payload:c}of i){if(this.destroyed){l(qn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:c.method}));continue}const u=o.filter(f=>f.id===c.id)[0];if(u==null){const f=qn("missing response for request","BAD_DATA",{value:o,info:{payload:c}});this.emit("error",f),l(f);continue}if("error"in u){l(this.getRpcError(c,u));continue}s(u.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:s}of i)s(o)}})()}},n))};var Ic;class LU extends wie{constructor(n,r){super(n,r);M(this,Ic,void 0);O(this,Ic,4e3)}_getSubscriber(n){const r=super._getSubscriber(n);return L_(r)&&(r.pollingInterval=v(this,Ic)),r}get pollingInterval(){return v(this,Ic)}set pollingInterval(n){if(!Number.isInteger(n)||n<0)throw new Error("invalid interval");O(this,Ic,n),this._forEachSubscriber(r=>{L_(r)&&(r.pollingInterval=v(this,Ic))})}}Ic=new WeakMap;var cp;class xie extends LU{constructor(n,r,i){n==null&&(n="http://localhost:8545");super(r,i);M(this,cp,void 0);typeof n=="string"?O(this,cp,new El(n)):O(this,cp,n.clone())}_getConnection(){return v(this,cp).clone()}async send(n,r){return await this._start(),await super.send(n,r)}async _send(n){const r=this._getConnection();r.body=JSON.stringify(n),r.setHeader("content-type","application/json");const i=await r.send();i.assertOk();let a=i.bodyJson;return Array.isArray(a)||(a=[a]),a}}cp=new WeakMap;function V3(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&In(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const n=V3(t[e]);if(n)return n}return null}if(typeof t=="string")try{return V3(JSON.parse(t))}catch{}return null}function Q3(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const n in t)Q3(t[n],e);if(typeof t=="string")try{return Q3(JSON.parse(t),e)}catch{}}}function Aie(t){const e=[];return Q3(t,e),e}var up;class Eie extends LU{constructor(n,r){super(r,{batchMaxCount:1});M(this,up,void 0);O(this,up,async(i,a)=>{const o={method:i,params:a};this.emit("debug",{action:"sendEip1193Request",payload:o});try{const s=await n.request(o);return this.emit("debug",{action:"receiveEip1193Result",result:s}),s}catch(s){const l=new Error(s.message);throw l.code=s.code,l.data=s.data,l.payload=o,this.emit("debug",{action:"receiveEip1193Error",error:l}),l}})}async send(n,r){return await this._start(),await super.send(n,r)}async _send(n){J(!Array.isArray(n),"EIP-1193 does not support batch request","payload",n);try{const r=await v(this,up).call(this,n.method,n.params||[]);return[{id:n.id,result:r}]}catch(r){return[{id:n.id,error:{code:r.code,data:r.data,message:r.message}}]}}getRpcError(n,r){switch(r=JSON.parse(JSON.stringify(r)),r.error.code||-1){case 4001:r.error.message=`ethers-user-denied: ${r.error.message}`;break;case 4200:r.error.message=`ethers-unsupported: ${r.error.message}`;break}return super.getRpcError(n,r)}async hasSigner(n){n==null&&(n=0);const r=await this.send("eth_accounts",[]);return typeof n=="number"?r.length>n:(n=n.toLowerCase(),r.filter(i=>i.toLowerCase()===n).length!==0)}async getSigner(n){if(n==null&&(n=0),!await this.hasSigner(n))try{await v(this,up).call(this,"eth_requestAccounts",[])}catch(r){const i=r.payload;throw this.getRpcError(i,{id:i.id,error:r})}return await super.getSigner(n)}}up=new WeakMap;var $U={exports:{}};(function(t){/** - * @license (c) Franz X Antesberger 2013 - */(function(e){var n=4294967296;e.fromBytesBigEndian=function(r,i,a,o){return(r<<24|i<<16|a<<8|o)>>>0},e.getByteBigEndian=function(r,i){return r>>>8*(3-i)&255},e.getBytesBigEndian=function(r){return[e.getByteBigEndian(r,0),e.getByteBigEndian(r,1),e.getByteBigEndian(r,2),e.getByteBigEndian(r,3)]},e.toHex=function(r,i){i=i||8;var a=r.toString(16);return a.length>>0},e.highPart=function(r){return e.toUint32(r/n)},e.or=function(r,i){for(var a=r,o=1;o>>0},e.and=function(r,i){for(var a=r,o=1;o>>0},e.xor=function(r,i){for(var a=r,o=1;o>>0},e.not=function(r){return~r>>>0},e.shiftLeft=function(r,i){return r<>>0},e.shiftRight=function(r,i){return r>>>i},e.rotateLeft=function(r,i){return(r<>>0|r>>>32-i)>>>0},e.rotateRight=function(r,i){return(r>>>i|r<<32-i>>>0)>>>0},e.choose=function(r,i,a){return(r&(i^a)^a)>>>0},e.majority=function(r,i,a){return(r&(i|a)|i&a)>>>0},e.addMod32=function(r){for(var i=r,a=1;a>>0},e.log2=function(r){return Math.floor(Math.log(r)/Math.LN2)},e.mult=function(r,i,a){var o=((r&4294901760)>>>0)*i,s=(r&65535)*i,l=e.toUint32(o)+e.toUint32(s)>=n?1:0;a[0]=e.highPart(o)+e.highPart(s)+l>>>0,a[1]=(o>>>0)+(s>>>0)}})(t.exports={})})($U);var EO=$U.exports,D=EO;const Sie=[1,2,4,8,16,32,64,128,27,54],kp=D.fromBytesBigEndian(85,85,85,85),_p=D.fromBytesBigEndian(170,170,170,170),ib=D.fromBytesBigEndian(51,51,51,51),ab=D.fromBytesBigEndian(204,204,204,204),$_=D.fromBytesBigEndian(15,15,15,15),U_=D.fromBytesBigEndian(240,240,240,240),Pie=D.fromBytesBigEndian(0,0,0,255),Oie=D.fromBytesBigEndian(0,0,252,0),Tie=D.fromBytesBigEndian(0,0,3,0),Cie=D.fromBytesBigEndian(0,240,0,0),kie=D.fromBytesBigEndian(0,15,0,0),_ie=D.fromBytesBigEndian(192,0,0,0),Nie=D.fromBytesBigEndian(63,0,0,0);function K3(){return new Uint32Array(8)}function uw(t,e){t[0]=D.xor(t[0],e[0]),t[1]=D.xor(t[1],e[1]),t[2]=D.xor(t[2],e[2]),t[3]=D.xor(t[3],e[3]),t[4]=D.xor(t[4],e[4]),t[5]=D.xor(t[5],e[5]),t[6]=D.xor(t[6],e[6]),t[7]=D.xor(t[7],e[7])}function fx(t){const e=t[7],n=t[6],r=t[5],i=t[4],a=t[3],o=t[2],s=t[1],l=t[0],c=D.xor(i,o),u=D.xor(e,s),f=D.xor(e,i),h=D.xor(e,o),d=D.xor(n,r),g=D.xor(d,l),p=D.xor(g,i),y=D.xor(u,c),m=D.xor(g,e),b=D.xor(g,s),x=D.xor(b,h),A=D.xor(a,y),S=D.xor(A,o),E=D.xor(A,n),T=D.xor(S,l),C=D.xor(S,d),N=D.xor(E,f),B=D.xor(l,N),L=D.xor(C,N),U=D.xor(C,h),j=D.xor(d,N),X=D.xor(u,j),G=D.xor(e,j),H=D.and(y,S),re=D.and(x,T),V=D.xor(re,H),ee=D.and(p,l),pe=D.xor(ee,H),Ae=D.and(u,j),we=D.and(b,g),Ye=D.xor(we,Ae),nt=D.and(m,B),De=D.xor(nt,Ae),st=D.and(f,N),Tt=D.and(c,L),ln=D.xor(Tt,st),Ee=D.and(h,C),ne=D.xor(Ee,st),le=D.xor(V,ln),te=D.xor(pe,ne),Ce=D.xor(Ye,ln),Se=D.xor(De,ne),ze=D.xor(le,E),$e=D.xor(te,U),rt=D.xor(Ce,X),dt=D.xor(Se,G),wt=D.xor(ze,$e),yt=D.and(ze,rt),Pe=D.xor(dt,yt),nn=D.and(wt,Pe),cn=D.xor(nn,$e),Gn=D.xor(rt,dt),Wa=D.xor($e,yt),ms=D.and(Wa,Gn),Yr=D.xor(ms,dt),du=D.xor(rt,Yr),ji=D.xor(Pe,Yr),pu=D.and(dt,ji),Ja=D.xor(pu,du),$l=D.xor(Pe,pu),Ul=D.and(cn,$l),zi=D.xor(wt,Ul),Xr=D.xor(zi,Ja),pa=D.xor(cn,Yr),Ya=D.xor(cn,zi),Io=D.xor(Yr,Ja),Xa=D.xor(pa,Xr),gu=D.and(Io,S),yu=D.and(Ja,T),Sh=D.and(Yr,l),Q=D.and(Ya,j),Z=D.and(zi,g),se=D.and(cn,B),Oe=D.and(pa,N),Ge=D.and(Xa,L),xt=D.and(Xr,C),pt=D.and(Io,y),lt=D.and(Ja,x),Ue=D.and(Yr,p),Ct=D.and(Ya,u),P=D.and(zi,b),k=D.and(cn,m),_=D.and(pa,f),w=D.and(Xa,c),I=D.and(Xr,h),z=D.xor(_,w),W=D.xor(lt,Ue),ce=D.xor(se,P),ve=D.xor(pt,lt),Le=D.xor(Sh,Ct),Te=D.xor(Sh,se),Rt=D.xor(Ge,xt),Re=D.xor(gu,Q),ft=D.xor(Oe,Ge),at=D.xor(w,I),vt=D.xor(Ct,ce),ke=D.xor(Le,Re),_e=D.xor(Z,z),Xe=D.xor(Q,ft),ht=D.xor(z,ke),Fe=D.xor(k,ke),tt=D.xor(Rt,_e),Be=D.xor(ve,_e),He=D.xor(Z,Xe),Je=D.xor(Fe,tt),Me=D.xor(yu,Be),ae=D.xor(Xe,Be),oe=D.xor(vt,D.not(tt)),ge=D.xor(ce,D.not(ht)),ue=D.xor(He,Je),fe=D.xor(Re,Me),be=D.xor(Te,Me),ct=D.xor(W,Je),At=D.xor(He,D.not(fe)),St=D.xor(at,D.not(ue));t[7]=ae,t[6]=At,t[5]=St,t[4]=fe,t[3]=be,t[2]=ct,t[1]=oe,t[0]=ge}function W3(t){for(let e=0;e<8;e++){const n=t[e];t[e]=D.or(D.and(n,Pie),D.shiftRight(D.and(n,Oie),2),D.shiftLeft(D.and(n,Tie),6),D.shiftRight(D.and(n,Cie),4),D.shiftLeft(D.and(n,kie),4),D.shiftRight(D.and(n,_ie),6),D.shiftLeft(D.and(n,Nie),2))}}function UU(t){const e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=D.or(D.shiftRight(e,8),D.shiftLeft(e,24)),u=D.or(D.shiftRight(n,8),D.shiftLeft(n,24)),f=D.or(D.shiftRight(r,8),D.shiftLeft(r,24)),h=D.or(D.shiftRight(i,8),D.shiftLeft(i,24)),d=D.or(D.shiftRight(a,8),D.shiftLeft(a,24)),g=D.or(D.shiftRight(o,8),D.shiftLeft(o,24)),p=D.or(D.shiftRight(s,8),D.shiftLeft(s,24)),y=D.or(D.shiftRight(l,8),D.shiftLeft(l,24));t[0]=D.xor(l,y,c,D.rotateRight(D.xor(e,c),16)),t[1]=D.xor(e,c,l,y,u,D.rotateRight(D.xor(n,u),16)),t[2]=D.xor(n,u,f,D.rotateRight(D.xor(r,f),16)),t[3]=D.xor(r,f,l,y,h,D.rotateRight(D.xor(i,h),16)),t[4]=D.xor(i,h,l,y,d,D.rotateRight(D.xor(a,d),16)),t[5]=D.xor(a,d,g,D.rotateRight(D.xor(o,g),16)),t[6]=D.xor(o,g,p,D.rotateRight(D.xor(s,p),16)),t[7]=D.xor(s,p,y,D.rotateRight(D.xor(l,y),16))}function FU(t,e){const n=new DataView(e.buffer);t[0]=n.getUint32(0+e.byteOffset,!0),t[2]=n.getUint32(4+e.byteOffset,!0),t[4]=n.getUint32(8+e.byteOffset,!0),t[6]=n.getUint32(12+e.byteOffset,!0),t[1]=0,t[3]=0,t[5]=0,t[7]=0,Pl(t)}function jU(t,e,n){const r=new DataView(e.buffer),i=new DataView(n.buffer);t[0]=r.getUint32(0+e.byteOffset,!0),t[2]=r.getUint32(4+e.byteOffset,!0),t[4]=r.getUint32(8+e.byteOffset,!0),t[6]=r.getUint32(12+e.byteOffset,!0),t[1]=i.getUint32(0+n.byteOffset,!0),t[3]=i.getUint32(4+n.byteOffset,!0),t[5]=i.getUint32(8+n.byteOffset,!0),t[7]=i.getUint32(12+n.byteOffset,!0),Pl(t)}function zU(t,e){Pl(e);const n=new DataView(t.buffer);n.setUint32(0+t.byteOffset,e[0],!0),n.setUint32(4+t.byteOffset,e[2],!0),n.setUint32(8+t.byteOffset,e[4],!0),n.setUint32(12+t.byteOffset,e[6],!0)}function HU(t,e,n){Pl(n);const r=new DataView(t.buffer),i=new DataView(e.buffer);r.setUint32(0+t.byteOffset,n[0],!0),r.setUint32(4+t.byteOffset,n[2],!0),r.setUint32(8+t.byteOffset,n[4],!0),r.setUint32(12+t.byteOffset,n[6],!0),i.setUint32(0+e.byteOffset,n[1],!0),i.setUint32(4+e.byteOffset,n[3],!0),i.setUint32(8+e.byteOffset,n[5],!0),i.setUint32(12+e.byteOffset,n[7],!0)}function Pl(t){for(let e=0;e<8;e+=2){const n=t[e],r=t[e+1];t[e]=D.or(D.and(n,kp),D.shiftLeft(D.and(r,kp),1)),t[e+1]=D.or(D.shiftRight(D.and(n,_p),1),D.and(r,_p))}for(let e=0;e<8;e+=4){const n=t[e],r=t[e+1],i=t[e+2],a=t[e+3];t[e]=D.or(D.and(n,ib),D.shiftLeft(D.and(i,ib),2)),t[e+2]=D.or(D.shiftRight(D.and(n,ab),2),D.and(i,ab)),t[e+1]=D.or(D.and(r,ib),D.shiftLeft(D.and(a,ib),2)),t[e+3]=D.or(D.shiftRight(D.and(r,ab),2),D.and(a,ab))}for(let e=0;e<4;e++){const n=t[e],r=t[e+4];t[e]=D.or(D.and(n,$_),D.shiftLeft(D.and(r,$_),4)),t[e+4]=D.or(D.shiftRight(D.and(n,U_),4),D.and(r,U_))}}function Iie(t,e){const n=new DataView(e.buffer);for(let r=0;r<4;r++){const i=n.getUint32(r*4+e.byteOffset,!0);t[r*2]=i,t[r*2+1]=i}Pl(t);for(let r=0,i=0;r<4;r=r+1,i=i+2){let a=D.or(D.and(t[i+0],kp),D.and(t[i+1],_p)),o=a;a=D.and(a,kp),t[i]=D.or(a,D.shiftLeft(a,1)),o=D.and(o,_p),t[i+1]=D.or(o,D.shiftRight(o,1))}}function GU(t,e,n){const r=(e+1)*4;for(let i=0,a=0;i6&&u==4&&(a=F_(a)),a=D.xor(a,i[(c-o)*2]),i[c*2]=a,i[c*2+1]=a,u++,u==o&&(u=0,f++);for(let c=0;c>7,i=n>>5&1;t[e]=n<<1|r^i}}function Fie(t){for(let e=0;e>6&1;t[e]=n>>1|(r^i)<<7}}function z_(t,e){t[0]^=1,t[1]^=2,t[2]^=4,t[3]^=8,t[4]^=ub[e],t[5]^=ub[e],t[6]^=ub[e],t[7]^=ub[e]}function jie(t,e){let n=t.subarray(16,32),r=t.subarray(0,16);Li(e[0],n,r,Np),z_(e[0],0);for(let i=1;i<=Dc;i++)Uie(n),Y3(n),Fie(r),Y3(r),Li(e[i],n,r,Np),z_(e[i],i)}function hy(t,e,n){let r=new Uint8Array(n);Li(t[0],e[0],r,Np);for(let i=1;i<=Dc;i++)Y3(r),Li(t[i],e[i],r,Np)}function Yl(){let t=[];for(let e=0;e<=Dc;e++)t.push(new Uint8Array(16));return t}class zie{static bcEncrypt(e,n,r,i){let a=Yl();hy(a,n,r);let o=Et.newQ(),s=Et.newQ();Et.load4xU32(o,i),Et.load4xU32(s,a[0]),Et.addRoundKey(o,s);for(let l=1;l<=Dc;l++)Et.subBytes(o),Et.shiftRows(o),Et.mixColumns(o),Et.load4xU32(s,a[l]),Et.addRoundKey(o,s);Et.store4xU32(e,o)}static bcKeystreamx2(e,n,r,i){let a=[Yl(),Yl()];for(let l=0;l<2;l++)hy(a[l],n,r[l]);let o=Et.newQ(),s=Et.newQ();Et.rkeyOrtho(o,i),Et.load8xU32(s,a[0][0],a[1][0]),Et.addRoundKey(o,s);for(let l=1;l<=Dc;l++)Et.subBytes(o),Et.shiftRows(o),Et.mixColumns(o),Et.load8xU32(s,a[0][l],a[1][l]),Et.addRoundKey(o,s);Et.store8xU32(e.subarray(0,16),e.subarray(16,32),o)}static bcTagx1(e,n,r,i){let a=Yl();hy(a,n,r);let o=Et.newQ(),s=Et.newQ();Et.load4xU32(o,i),Et.load4xU32(s,a[0]),Et.addRoundKey(o,s);for(let d=1;d<=Dc;d++)Et.subBytes(o),Et.shiftRows(o),Et.mixColumns(o),Et.load4xU32(s,a[d]),Et.addRoundKey(o,s);const l=new DataView(e.buffer);let c=l.getUint32(0,!0),u=l.getUint32(4,!0),f=l.getUint32(8,!0),h=l.getUint32(12,!0);Et.ortho(o),c=Ia.xor(c,o[0]),u=Ia.xor(u,o[2]),f=Ia.xor(f,o[4]),h=Ia.xor(h,o[6]),l.setUint32(0,c,!0),l.setUint32(4,u,!0),l.setUint32(8,f,!0),l.setUint32(12,h,!0)}static bcTagx2(e,n,r,i){let a=[Yl(),Yl()];for(let d=0;d<2;d++)hy(a[d],n,r[d]);let o=Et.newQ(),s=Et.newQ();Et.load8xU32(o,i.subarray(0,16),i.subarray(16,32)),Et.load8xU32(s,a[0][0],a[1][0]),Et.addRoundKey(o,s);for(let d=1;d<=Dc;d++)Et.subBytes(o),Et.shiftRows(o),Et.mixColumns(o),Et.load8xU32(s,a[0][d],a[1][d]),Et.addRoundKey(o,s);const l=new DataView(e.buffer);let c=l.getUint32(0,!0),u=l.getUint32(4,!0),f=l.getUint32(8,!0),h=l.getUint32(12,!0);Et.ortho(o),c=Ia.xor(c,o[0],o[1]),u=Ia.xor(u,o[2],o[3]),f=Ia.xor(f,o[4],o[5]),h=Ia.xor(h,o[6],o[7]),l.setUint32(0,c,!0),l.setUint32(4,u,!0),l.setUint32(8,f,!0),l.setUint32(12,h,!0)}}class Hie{static bcEncrypt(e,n,r,i){let a=Yl();hy(a,n,r);const o=new DataView(i.buffer);let s=o.getUint32(0+i.byteOffset,!1),l=o.getUint32(4+i.byteOffset,!1),c=o.getUint32(8+i.byteOffset,!1),u=o.getUint32(12+i.byteOffset,!1);const f=new DataView(a[0].buffer);s=Ia.xor(s,f.getUint32(0+a[0].byteOffset,!1)),l=Ia.xor(l,f.getUint32(4+a[0].byteOffset,!1)),c=Ia.xor(c,f.getUint32(8+a[0].byteOffset,!1)),u=Ia.xor(u,f.getUint32(12+a[0].byteOffset,!1));for(let d=1;d<=Dc;d++)[s,l,c,u]=Lie.aesencVartime(s,l,c,u,a[d]);const h=new DataView(e.buffer);h.setUint32(0+e.byteOffset,s,!1),h.setUint32(4+e.byteOffset,l,!1),h.setUint32(8+e.byteOffset,c,!1),h.setUint32(12+e.byteOffset,u,!1)}static bcKeystreamx2(e,n,r,i){this.bcEncrypt(e.subarray(0,16),n,r[0],i),this.bcEncrypt(e.subarray(16,32),n,r[1],i)}static bcTagx1(e,n,r,i){let a=new Uint8Array(Ne);this.bcEncrypt(a,n,r,i),Li(e,e,a,Ne)}static bcTagx2(e,n,r,i){let a=new Uint8Array(2*Ne);this.bcEncrypt(a.subarray(0,16),n,r[0],i.subarray(0,16)),this.bcEncrypt(a.subarray(16,32),n,r[1],i.subarray(16,32)),Li(e,e,a.subarray(0,16),Ne),Li(e,e,a.subarray(16,32),Ne)}}function zr(t,e,n){t.set(new Uint8Array(12)),new DataView(t.buffer).setUint32(12+t.byteOffset,n,!1),t[0]=e<=2*Ne;s+=2)zr(o[0],Rd,s),zr(o[1],Rd,s+1),t.bcTagx2(u,e,o,i.subarray(s*Ne,(s+2)*Ne)),c-=2*Ne;for(;c>=Ne;s++)zr(o[0],Rd,s),t.bcTagx1(u,e,o[0],i.subarray(s*Ne,(s+1)*Ne)),c-=Ne;if(c>0){zr(o[0],KU,s);let g=new Uint8Array(Ne);g.set(i.subarray(i.length-c)),g[c]=128,t.bcTagx1(u,e,o[0],g)}let f=a.length;for(l=0;f>=2*Ne;l+=2)zr(o[0],Md,l),zr(o[1],Md,l+1),t.bcTagx2(u,e,o,a.subarray(l*Ne,(l+2)*Ne)),f-=2*Ne;for(;f>=Ne;l++)zr(o[0],Md,l),t.bcTagx1(u,e,o[0],a.subarray(l*Ne,(l+1)*Ne)),f-=Ne;if(f>0){zr(o[0],WU,l);let g=new Uint8Array(Ne);g.set(a.subarray(a.length-f)),g[f]=128,t.bcTagx1(u,e,o[0],g)}let h=new Uint8Array(Ne);h.set(n,1),h[0]=JU<=2*Ne;l+=2)Lc(o[0],u,l),Lc(o[1],u,l+1),t.bcKeystreamx2(d,e,o,h),Li(r.subarray(l*Ne,(l+2)*Ne),a.subarray(l*Ne,(l+2)*Ne),d,2*Ne),f-=2*Ne;for(;f>=Ne;l++)Lc(o[0],u,l),t.bcEncrypt(d,e,o[0],h),Li(r.subarray(l*Ne,(l+1)*Ne),a.subarray(l*Ne,(l+1)*Ne),d,Ne),f-=Ne;f>0&&(Lc(o[0],u,l),t.bcEncrypt(d,e,o[0],h),Li(r.subarray(l*Ne,a.length),a.subarray(l*Ne),d,f)),r.set(u,a.length)}function Vie(t,e,n,r,i,a){let o=a.length-zf;const s=a.subarray(0,o),l=a.subarray(o);let c=0,u=X3(),f=new Uint8Array(Ne);f.set(n,1);let h=new Uint8Array(2*Ne);for(c=0;o>=2*Ne;c+=2)Lc(u[0],l,c),Lc(u[1],l,c+1),t.bcKeystreamx2(h,e,u,f),Li(r.subarray(c*Ne,(c+2)*Ne),s.subarray(c*Ne,(c+2)*Ne),h,2*Ne),o-=2*Ne;for(;o>=Ne;c++)Lc(u[0],l,c),t.bcEncrypt(h,e,u[0],f),Li(r.subarray(c*Ne,(c+1)*Ne),s.subarray(c*Ne,(c+1)*Ne),h,Ne),o-=Ne;o>0&&(Lc(u[0],l,c),t.bcEncrypt(h,e,u[0],f),Li(r.subarray(c*Ne),s.subarray(c*Ne),h,o));let d=0,g=i.length,p=X3(),y=new Uint8Array(zf);for(d=0;g>=2*Ne;d+=2)zr(p[0],Rd,d),zr(p[1],Rd,d+1),t.bcTagx2(y,e,p,i.subarray(d*Ne,(d+2)*Ne)),g-=2*Ne;for(;g>=Ne;d++)zr(p[0],Rd,d),t.bcTagx1(y,e,p[0],i.subarray(d*Ne,(d+1)*Ne)),g-=Ne;if(g>0){zr(p[0],KU,d);let x=new Uint8Array(Ne);x.set(i.subarray(i.length-g)),x[g]=128,t.bcTagx1(y,e,p[0],x)}let m=r.length;for(c=0;m>=2*Ne;c+=2)zr(p[0],Md,c),zr(p[1],Md,c+1),t.bcTagx2(y,e,p,r.subarray(c*Ne,(c+2)*Ne)),m-=2*Ne;for(;m>=Ne;c++)zr(p[0],Md,c),t.bcTagx1(y,e,p[0],r.subarray(c*Ne,(c+1)*Ne)),m-=Ne;if(m>0){zr(p[0],WU,c);let x=new Uint8Array(Ne);x.set(r.subarray(r.length-m)),x[m]=128,t.bcTagx1(y,e,p[0],x)}if(f[0]=JU<>24&255,P[k+1]=_>>16&255,P[k+2]=_>>8&255,P[k+3]=_&255,P[k+4]=w>>24&255,P[k+5]=w>>16&255,P[k+6]=w>>8&255,P[k+7]=w&255}function p(P,k,_,w,I){var z,W=0;for(z=0;z>>8)-1}function y(P,k,_,w){return p(P,k,_,w,16)}function m(P,k,_,w){return p(P,k,_,w,32)}function b(P,k,_,w){for(var I=w[0]&255|(w[1]&255)<<8|(w[2]&255)<<16|(w[3]&255)<<24,z=_[0]&255|(_[1]&255)<<8|(_[2]&255)<<16|(_[3]&255)<<24,W=_[4]&255|(_[5]&255)<<8|(_[6]&255)<<16|(_[7]&255)<<24,ce=_[8]&255|(_[9]&255)<<8|(_[10]&255)<<16|(_[11]&255)<<24,ve=_[12]&255|(_[13]&255)<<8|(_[14]&255)<<16|(_[15]&255)<<24,Le=w[4]&255|(w[5]&255)<<8|(w[6]&255)<<16|(w[7]&255)<<24,Te=k[0]&255|(k[1]&255)<<8|(k[2]&255)<<16|(k[3]&255)<<24,Rt=k[4]&255|(k[5]&255)<<8|(k[6]&255)<<16|(k[7]&255)<<24,Re=k[8]&255|(k[9]&255)<<8|(k[10]&255)<<16|(k[11]&255)<<24,ft=k[12]&255|(k[13]&255)<<8|(k[14]&255)<<16|(k[15]&255)<<24,at=w[8]&255|(w[9]&255)<<8|(w[10]&255)<<16|(w[11]&255)<<24,vt=_[16]&255|(_[17]&255)<<8|(_[18]&255)<<16|(_[19]&255)<<24,ke=_[20]&255|(_[21]&255)<<8|(_[22]&255)<<16|(_[23]&255)<<24,_e=_[24]&255|(_[25]&255)<<8|(_[26]&255)<<16|(_[27]&255)<<24,Xe=_[28]&255|(_[29]&255)<<8|(_[30]&255)<<16|(_[31]&255)<<24,ht=w[12]&255|(w[13]&255)<<8|(w[14]&255)<<16|(w[15]&255)<<24,Fe=I,tt=z,Be=W,He=ce,Je=ve,Me=Le,ae=Te,oe=Rt,ge=Re,ue=ft,fe=at,be=vt,ct=ke,At=_e,St=Xe,Ot=ht,$,Mt=0;Mt<20;Mt+=2)$=Fe+ct|0,Je^=$<<7|$>>>25,$=Je+Fe|0,ge^=$<<9|$>>>23,$=ge+Je|0,ct^=$<<13|$>>>19,$=ct+ge|0,Fe^=$<<18|$>>>14,$=Me+tt|0,ue^=$<<7|$>>>25,$=ue+Me|0,At^=$<<9|$>>>23,$=At+ue|0,tt^=$<<13|$>>>19,$=tt+At|0,Me^=$<<18|$>>>14,$=fe+ae|0,St^=$<<7|$>>>25,$=St+fe|0,Be^=$<<9|$>>>23,$=Be+St|0,ae^=$<<13|$>>>19,$=ae+Be|0,fe^=$<<18|$>>>14,$=Ot+be|0,He^=$<<7|$>>>25,$=He+Ot|0,oe^=$<<9|$>>>23,$=oe+He|0,be^=$<<13|$>>>19,$=be+oe|0,Ot^=$<<18|$>>>14,$=Fe+He|0,tt^=$<<7|$>>>25,$=tt+Fe|0,Be^=$<<9|$>>>23,$=Be+tt|0,He^=$<<13|$>>>19,$=He+Be|0,Fe^=$<<18|$>>>14,$=Me+Je|0,ae^=$<<7|$>>>25,$=ae+Me|0,oe^=$<<9|$>>>23,$=oe+ae|0,Je^=$<<13|$>>>19,$=Je+oe|0,Me^=$<<18|$>>>14,$=fe+ue|0,be^=$<<7|$>>>25,$=be+fe|0,ge^=$<<9|$>>>23,$=ge+be|0,ue^=$<<13|$>>>19,$=ue+ge|0,fe^=$<<18|$>>>14,$=Ot+St|0,ct^=$<<7|$>>>25,$=ct+Ot|0,At^=$<<9|$>>>23,$=At+ct|0,St^=$<<13|$>>>19,$=St+At|0,Ot^=$<<18|$>>>14;Fe=Fe+I|0,tt=tt+z|0,Be=Be+W|0,He=He+ce|0,Je=Je+ve|0,Me=Me+Le|0,ae=ae+Te|0,oe=oe+Rt|0,ge=ge+Re|0,ue=ue+ft|0,fe=fe+at|0,be=be+vt|0,ct=ct+ke|0,At=At+_e|0,St=St+Xe|0,Ot=Ot+ht|0,P[0]=Fe>>>0&255,P[1]=Fe>>>8&255,P[2]=Fe>>>16&255,P[3]=Fe>>>24&255,P[4]=tt>>>0&255,P[5]=tt>>>8&255,P[6]=tt>>>16&255,P[7]=tt>>>24&255,P[8]=Be>>>0&255,P[9]=Be>>>8&255,P[10]=Be>>>16&255,P[11]=Be>>>24&255,P[12]=He>>>0&255,P[13]=He>>>8&255,P[14]=He>>>16&255,P[15]=He>>>24&255,P[16]=Je>>>0&255,P[17]=Je>>>8&255,P[18]=Je>>>16&255,P[19]=Je>>>24&255,P[20]=Me>>>0&255,P[21]=Me>>>8&255,P[22]=Me>>>16&255,P[23]=Me>>>24&255,P[24]=ae>>>0&255,P[25]=ae>>>8&255,P[26]=ae>>>16&255,P[27]=ae>>>24&255,P[28]=oe>>>0&255,P[29]=oe>>>8&255,P[30]=oe>>>16&255,P[31]=oe>>>24&255,P[32]=ge>>>0&255,P[33]=ge>>>8&255,P[34]=ge>>>16&255,P[35]=ge>>>24&255,P[36]=ue>>>0&255,P[37]=ue>>>8&255,P[38]=ue>>>16&255,P[39]=ue>>>24&255,P[40]=fe>>>0&255,P[41]=fe>>>8&255,P[42]=fe>>>16&255,P[43]=fe>>>24&255,P[44]=be>>>0&255,P[45]=be>>>8&255,P[46]=be>>>16&255,P[47]=be>>>24&255,P[48]=ct>>>0&255,P[49]=ct>>>8&255,P[50]=ct>>>16&255,P[51]=ct>>>24&255,P[52]=At>>>0&255,P[53]=At>>>8&255,P[54]=At>>>16&255,P[55]=At>>>24&255,P[56]=St>>>0&255,P[57]=St>>>8&255,P[58]=St>>>16&255,P[59]=St>>>24&255,P[60]=Ot>>>0&255,P[61]=Ot>>>8&255,P[62]=Ot>>>16&255,P[63]=Ot>>>24&255}function x(P,k,_,w){for(var I=w[0]&255|(w[1]&255)<<8|(w[2]&255)<<16|(w[3]&255)<<24,z=_[0]&255|(_[1]&255)<<8|(_[2]&255)<<16|(_[3]&255)<<24,W=_[4]&255|(_[5]&255)<<8|(_[6]&255)<<16|(_[7]&255)<<24,ce=_[8]&255|(_[9]&255)<<8|(_[10]&255)<<16|(_[11]&255)<<24,ve=_[12]&255|(_[13]&255)<<8|(_[14]&255)<<16|(_[15]&255)<<24,Le=w[4]&255|(w[5]&255)<<8|(w[6]&255)<<16|(w[7]&255)<<24,Te=k[0]&255|(k[1]&255)<<8|(k[2]&255)<<16|(k[3]&255)<<24,Rt=k[4]&255|(k[5]&255)<<8|(k[6]&255)<<16|(k[7]&255)<<24,Re=k[8]&255|(k[9]&255)<<8|(k[10]&255)<<16|(k[11]&255)<<24,ft=k[12]&255|(k[13]&255)<<8|(k[14]&255)<<16|(k[15]&255)<<24,at=w[8]&255|(w[9]&255)<<8|(w[10]&255)<<16|(w[11]&255)<<24,vt=_[16]&255|(_[17]&255)<<8|(_[18]&255)<<16|(_[19]&255)<<24,ke=_[20]&255|(_[21]&255)<<8|(_[22]&255)<<16|(_[23]&255)<<24,_e=_[24]&255|(_[25]&255)<<8|(_[26]&255)<<16|(_[27]&255)<<24,Xe=_[28]&255|(_[29]&255)<<8|(_[30]&255)<<16|(_[31]&255)<<24,ht=w[12]&255|(w[13]&255)<<8|(w[14]&255)<<16|(w[15]&255)<<24,Fe=I,tt=z,Be=W,He=ce,Je=ve,Me=Le,ae=Te,oe=Rt,ge=Re,ue=ft,fe=at,be=vt,ct=ke,At=_e,St=Xe,Ot=ht,$,Mt=0;Mt<20;Mt+=2)$=Fe+ct|0,Je^=$<<7|$>>>25,$=Je+Fe|0,ge^=$<<9|$>>>23,$=ge+Je|0,ct^=$<<13|$>>>19,$=ct+ge|0,Fe^=$<<18|$>>>14,$=Me+tt|0,ue^=$<<7|$>>>25,$=ue+Me|0,At^=$<<9|$>>>23,$=At+ue|0,tt^=$<<13|$>>>19,$=tt+At|0,Me^=$<<18|$>>>14,$=fe+ae|0,St^=$<<7|$>>>25,$=St+fe|0,Be^=$<<9|$>>>23,$=Be+St|0,ae^=$<<13|$>>>19,$=ae+Be|0,fe^=$<<18|$>>>14,$=Ot+be|0,He^=$<<7|$>>>25,$=He+Ot|0,oe^=$<<9|$>>>23,$=oe+He|0,be^=$<<13|$>>>19,$=be+oe|0,Ot^=$<<18|$>>>14,$=Fe+He|0,tt^=$<<7|$>>>25,$=tt+Fe|0,Be^=$<<9|$>>>23,$=Be+tt|0,He^=$<<13|$>>>19,$=He+Be|0,Fe^=$<<18|$>>>14,$=Me+Je|0,ae^=$<<7|$>>>25,$=ae+Me|0,oe^=$<<9|$>>>23,$=oe+ae|0,Je^=$<<13|$>>>19,$=Je+oe|0,Me^=$<<18|$>>>14,$=fe+ue|0,be^=$<<7|$>>>25,$=be+fe|0,ge^=$<<9|$>>>23,$=ge+be|0,ue^=$<<13|$>>>19,$=ue+ge|0,fe^=$<<18|$>>>14,$=Ot+St|0,ct^=$<<7|$>>>25,$=ct+Ot|0,At^=$<<9|$>>>23,$=At+ct|0,St^=$<<13|$>>>19,$=St+At|0,Ot^=$<<18|$>>>14;P[0]=Fe>>>0&255,P[1]=Fe>>>8&255,P[2]=Fe>>>16&255,P[3]=Fe>>>24&255,P[4]=Me>>>0&255,P[5]=Me>>>8&255,P[6]=Me>>>16&255,P[7]=Me>>>24&255,P[8]=fe>>>0&255,P[9]=fe>>>8&255,P[10]=fe>>>16&255,P[11]=fe>>>24&255,P[12]=Ot>>>0&255,P[13]=Ot>>>8&255,P[14]=Ot>>>16&255,P[15]=Ot>>>24&255,P[16]=ae>>>0&255,P[17]=ae>>>8&255,P[18]=ae>>>16&255,P[19]=ae>>>24&255,P[20]=oe>>>0&255,P[21]=oe>>>8&255,P[22]=oe>>>16&255,P[23]=oe>>>24&255,P[24]=ge>>>0&255,P[25]=ge>>>8&255,P[26]=ge>>>16&255,P[27]=ge>>>24&255,P[28]=ue>>>0&255,P[29]=ue>>>8&255,P[30]=ue>>>16&255,P[31]=ue>>>24&255}function A(P,k,_,w){b(P,k,_,w)}function S(P,k,_,w){x(P,k,_,w)}var E=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function T(P,k,_,w,I,z,W){var ce=new Uint8Array(16),ve=new Uint8Array(64),Le,Te;for(Te=0;Te<16;Te++)ce[Te]=0;for(Te=0;Te<8;Te++)ce[Te]=z[Te];for(;I>=64;){for(A(ve,ce,W,E),Te=0;Te<64;Te++)P[k+Te]=_[w+Te]^ve[Te];for(Le=1,Te=8;Te<16;Te++)Le=Le+(ce[Te]&255)|0,ce[Te]=Le&255,Le>>>=8;I-=64,k+=64,w+=64}if(I>0)for(A(ve,ce,W,E),Te=0;Te=64;){for(A(W,z,I,E),ve=0;ve<64;ve++)P[k+ve]=W[ve];for(ce=1,ve=8;ve<16;ve++)ce=ce+(z[ve]&255)|0,z[ve]=ce&255,ce>>>=8;_-=64,k+=64}if(_>0)for(A(W,z,I,E),ve=0;ve<_;ve++)P[k+ve]=W[ve];return 0}function N(P,k,_,w,I){var z=new Uint8Array(32);S(z,w,I,E);for(var W=new Uint8Array(8),ce=0;ce<8;ce++)W[ce]=w[ce+16];return C(P,k,_,W,z)}function B(P,k,_,w,I,z,W){var ce=new Uint8Array(32);S(ce,z,W,E);for(var ve=new Uint8Array(8),Le=0;Le<8;Le++)ve[Le]=z[Le+16];return T(P,k,_,w,I,ve,ce)}var L=function(P){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var k,_,w,I,z,W,ce,ve;k=P[0]&255|(P[1]&255)<<8,this.r[0]=k&8191,_=P[2]&255|(P[3]&255)<<8,this.r[1]=(k>>>13|_<<3)&8191,w=P[4]&255|(P[5]&255)<<8,this.r[2]=(_>>>10|w<<6)&7939,I=P[6]&255|(P[7]&255)<<8,this.r[3]=(w>>>7|I<<9)&8191,z=P[8]&255|(P[9]&255)<<8,this.r[4]=(I>>>4|z<<12)&255,this.r[5]=z>>>1&8190,W=P[10]&255|(P[11]&255)<<8,this.r[6]=(z>>>14|W<<2)&8191,ce=P[12]&255|(P[13]&255)<<8,this.r[7]=(W>>>11|ce<<5)&8065,ve=P[14]&255|(P[15]&255)<<8,this.r[8]=(ce>>>8|ve<<8)&8191,this.r[9]=ve>>>5&127,this.pad[0]=P[16]&255|(P[17]&255)<<8,this.pad[1]=P[18]&255|(P[19]&255)<<8,this.pad[2]=P[20]&255|(P[21]&255)<<8,this.pad[3]=P[22]&255|(P[23]&255)<<8,this.pad[4]=P[24]&255|(P[25]&255)<<8,this.pad[5]=P[26]&255|(P[27]&255)<<8,this.pad[6]=P[28]&255|(P[29]&255)<<8,this.pad[7]=P[30]&255|(P[31]&255)<<8};L.prototype.blocks=function(P,k,_){for(var w=this.fin?0:2048,I,z,W,ce,ve,Le,Te,Rt,Re,ft,at,vt,ke,_e,Xe,ht,Fe,tt,Be,He=this.h[0],Je=this.h[1],Me=this.h[2],ae=this.h[3],oe=this.h[4],ge=this.h[5],ue=this.h[6],fe=this.h[7],be=this.h[8],ct=this.h[9],At=this.r[0],St=this.r[1],Ot=this.r[2],$=this.r[3],Mt=this.r[4],Ht=this.r[5],Gt=this.r[6],_t=this.r[7],jt=this.r[8],zt=this.r[9];_>=16;)I=P[k+0]&255|(P[k+1]&255)<<8,He+=I&8191,z=P[k+2]&255|(P[k+3]&255)<<8,Je+=(I>>>13|z<<3)&8191,W=P[k+4]&255|(P[k+5]&255)<<8,Me+=(z>>>10|W<<6)&8191,ce=P[k+6]&255|(P[k+7]&255)<<8,ae+=(W>>>7|ce<<9)&8191,ve=P[k+8]&255|(P[k+9]&255)<<8,oe+=(ce>>>4|ve<<12)&8191,ge+=ve>>>1&8191,Le=P[k+10]&255|(P[k+11]&255)<<8,ue+=(ve>>>14|Le<<2)&8191,Te=P[k+12]&255|(P[k+13]&255)<<8,fe+=(Le>>>11|Te<<5)&8191,Rt=P[k+14]&255|(P[k+15]&255)<<8,be+=(Te>>>8|Rt<<8)&8191,ct+=Rt>>>5|w,Re=0,ft=Re,ft+=He*At,ft+=Je*(5*zt),ft+=Me*(5*jt),ft+=ae*(5*_t),ft+=oe*(5*Gt),Re=ft>>>13,ft&=8191,ft+=ge*(5*Ht),ft+=ue*(5*Mt),ft+=fe*(5*$),ft+=be*(5*Ot),ft+=ct*(5*St),Re+=ft>>>13,ft&=8191,at=Re,at+=He*St,at+=Je*At,at+=Me*(5*zt),at+=ae*(5*jt),at+=oe*(5*_t),Re=at>>>13,at&=8191,at+=ge*(5*Gt),at+=ue*(5*Ht),at+=fe*(5*Mt),at+=be*(5*$),at+=ct*(5*Ot),Re+=at>>>13,at&=8191,vt=Re,vt+=He*Ot,vt+=Je*St,vt+=Me*At,vt+=ae*(5*zt),vt+=oe*(5*jt),Re=vt>>>13,vt&=8191,vt+=ge*(5*_t),vt+=ue*(5*Gt),vt+=fe*(5*Ht),vt+=be*(5*Mt),vt+=ct*(5*$),Re+=vt>>>13,vt&=8191,ke=Re,ke+=He*$,ke+=Je*Ot,ke+=Me*St,ke+=ae*At,ke+=oe*(5*zt),Re=ke>>>13,ke&=8191,ke+=ge*(5*jt),ke+=ue*(5*_t),ke+=fe*(5*Gt),ke+=be*(5*Ht),ke+=ct*(5*Mt),Re+=ke>>>13,ke&=8191,_e=Re,_e+=He*Mt,_e+=Je*$,_e+=Me*Ot,_e+=ae*St,_e+=oe*At,Re=_e>>>13,_e&=8191,_e+=ge*(5*zt),_e+=ue*(5*jt),_e+=fe*(5*_t),_e+=be*(5*Gt),_e+=ct*(5*Ht),Re+=_e>>>13,_e&=8191,Xe=Re,Xe+=He*Ht,Xe+=Je*Mt,Xe+=Me*$,Xe+=ae*Ot,Xe+=oe*St,Re=Xe>>>13,Xe&=8191,Xe+=ge*At,Xe+=ue*(5*zt),Xe+=fe*(5*jt),Xe+=be*(5*_t),Xe+=ct*(5*Gt),Re+=Xe>>>13,Xe&=8191,ht=Re,ht+=He*Gt,ht+=Je*Ht,ht+=Me*Mt,ht+=ae*$,ht+=oe*Ot,Re=ht>>>13,ht&=8191,ht+=ge*St,ht+=ue*At,ht+=fe*(5*zt),ht+=be*(5*jt),ht+=ct*(5*_t),Re+=ht>>>13,ht&=8191,Fe=Re,Fe+=He*_t,Fe+=Je*Gt,Fe+=Me*Ht,Fe+=ae*Mt,Fe+=oe*$,Re=Fe>>>13,Fe&=8191,Fe+=ge*Ot,Fe+=ue*St,Fe+=fe*At,Fe+=be*(5*zt),Fe+=ct*(5*jt),Re+=Fe>>>13,Fe&=8191,tt=Re,tt+=He*jt,tt+=Je*_t,tt+=Me*Gt,tt+=ae*Ht,tt+=oe*Mt,Re=tt>>>13,tt&=8191,tt+=ge*$,tt+=ue*Ot,tt+=fe*St,tt+=be*At,tt+=ct*(5*zt),Re+=tt>>>13,tt&=8191,Be=Re,Be+=He*zt,Be+=Je*jt,Be+=Me*_t,Be+=ae*Gt,Be+=oe*Ht,Re=Be>>>13,Be&=8191,Be+=ge*Mt,Be+=ue*$,Be+=fe*Ot,Be+=be*St,Be+=ct*At,Re+=Be>>>13,Be&=8191,Re=(Re<<2)+Re|0,Re=Re+ft|0,ft=Re&8191,Re=Re>>>13,at+=Re,He=ft,Je=at,Me=vt,ae=ke,oe=_e,ge=Xe,ue=ht,fe=Fe,be=tt,ct=Be,k+=16,_-=16;this.h[0]=He,this.h[1]=Je,this.h[2]=Me,this.h[3]=ae,this.h[4]=oe,this.h[5]=ge,this.h[6]=ue,this.h[7]=fe,this.h[8]=be,this.h[9]=ct},L.prototype.finish=function(P,k){var _=new Uint16Array(10),w,I,z,W;if(this.leftover){for(W=this.leftover,this.buffer[W++]=1;W<16;W++)this.buffer[W]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(w=this.h[1]>>>13,this.h[1]&=8191,W=2;W<10;W++)this.h[W]+=w,w=this.h[W]>>>13,this.h[W]&=8191;for(this.h[0]+=w*5,w=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=w,w=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=w,_[0]=this.h[0]+5,w=_[0]>>>13,_[0]&=8191,W=1;W<10;W++)_[W]=this.h[W]+w,w=_[W]>>>13,_[W]&=8191;for(_[9]-=8192,I=(w^1)-1,W=0;W<10;W++)_[W]&=I;for(I=~I,W=0;W<10;W++)this.h[W]=this.h[W]&I|_[W];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,z=this.h[0]+this.pad[0],this.h[0]=z&65535,W=1;W<8;W++)z=(this.h[W]+this.pad[W]|0)+(z>>>16)|0,this.h[W]=z&65535;P[k+0]=this.h[0]>>>0&255,P[k+1]=this.h[0]>>>8&255,P[k+2]=this.h[1]>>>0&255,P[k+3]=this.h[1]>>>8&255,P[k+4]=this.h[2]>>>0&255,P[k+5]=this.h[2]>>>8&255,P[k+6]=this.h[3]>>>0&255,P[k+7]=this.h[3]>>>8&255,P[k+8]=this.h[4]>>>0&255,P[k+9]=this.h[4]>>>8&255,P[k+10]=this.h[5]>>>0&255,P[k+11]=this.h[5]>>>8&255,P[k+12]=this.h[6]>>>0&255,P[k+13]=this.h[6]>>>8&255,P[k+14]=this.h[7]>>>0&255,P[k+15]=this.h[7]>>>8&255},L.prototype.update=function(P,k,_){var w,I;if(this.leftover){for(I=16-this.leftover,I>_&&(I=_),w=0;w=16&&(I=_-_%16,this.blocks(P,k,I),k+=I,_-=I),_){for(w=0;w<_;w++)this.buffer[this.leftover+w]=P[k+w];this.leftover+=_}};function U(P,k,_,w,I,z){var W=new L(z);return W.update(_,w,I),W.finish(P,k),0}function j(P,k,_,w,I,z){var W=new Uint8Array(16);return U(W,0,_,w,I,z),y(P,k,W,0)}function X(P,k,_,w,I){var z;if(_<32)return-1;for(B(P,0,k,0,_,w,I),U(P,16,P,32,_-32,P),z=0;z<16;z++)P[z]=0;return 0}function G(P,k,_,w,I){var z,W=new Uint8Array(32);if(_<32||(N(W,0,32,w,I),j(k,16,k,32,_-32,W)!==0))return-1;for(B(P,0,k,0,_,w,I),z=0;z<32;z++)P[z]=0;return 0}function H(P,k){var _;for(_=0;_<16;_++)P[_]=k[_]|0}function re(P){var k,_,w=1;for(k=0;k<16;k++)_=P[k]+w+65535,w=Math.floor(_/65536),P[k]=_-w*65536;P[0]+=w-1+37*(w-1)}function V(P,k,_){for(var w,I=~(_-1),z=0;z<16;z++)w=I&(P[z]^k[z]),P[z]^=w,k[z]^=w}function ee(P,k){var _,w,I,z=n(),W=n();for(_=0;_<16;_++)W[_]=k[_];for(re(W),re(W),re(W),w=0;w<2;w++){for(z[0]=W[0]-65517,_=1;_<15;_++)z[_]=W[_]-65535-(z[_-1]>>16&1),z[_-1]&=65535;z[15]=W[15]-32767-(z[14]>>16&1),I=z[15]>>16&1,z[14]&=65535,V(W,z,1-I)}for(_=0;_<16;_++)P[2*_]=W[_]&255,P[2*_+1]=W[_]>>8}function pe(P,k){var _=new Uint8Array(32),w=new Uint8Array(32);return ee(_,P),ee(w,k),m(_,0,w,0)}function Ae(P){var k=new Uint8Array(32);return ee(k,P),k[0]&1}function we(P,k){var _;for(_=0;_<16;_++)P[_]=k[2*_]+(k[2*_+1]<<8);P[15]&=32767}function Ye(P,k,_){for(var w=0;w<16;w++)P[w]=k[w]+_[w]}function nt(P,k,_){for(var w=0;w<16;w++)P[w]=k[w]-_[w]}function De(P,k,_){var w,I,z=0,W=0,ce=0,ve=0,Le=0,Te=0,Rt=0,Re=0,ft=0,at=0,vt=0,ke=0,_e=0,Xe=0,ht=0,Fe=0,tt=0,Be=0,He=0,Je=0,Me=0,ae=0,oe=0,ge=0,ue=0,fe=0,be=0,ct=0,At=0,St=0,Ot=0,$=_[0],Mt=_[1],Ht=_[2],Gt=_[3],_t=_[4],jt=_[5],zt=_[6],Vn=_[7],an=_[8],Bn=_[9],Dn=_[10],Ln=_[11],nr=_[12],_r=_[13],Nr=_[14],Ir=_[15];w=k[0],z+=w*$,W+=w*Mt,ce+=w*Ht,ve+=w*Gt,Le+=w*_t,Te+=w*jt,Rt+=w*zt,Re+=w*Vn,ft+=w*an,at+=w*Bn,vt+=w*Dn,ke+=w*Ln,_e+=w*nr,Xe+=w*_r,ht+=w*Nr,Fe+=w*Ir,w=k[1],W+=w*$,ce+=w*Mt,ve+=w*Ht,Le+=w*Gt,Te+=w*_t,Rt+=w*jt,Re+=w*zt,ft+=w*Vn,at+=w*an,vt+=w*Bn,ke+=w*Dn,_e+=w*Ln,Xe+=w*nr,ht+=w*_r,Fe+=w*Nr,tt+=w*Ir,w=k[2],ce+=w*$,ve+=w*Mt,Le+=w*Ht,Te+=w*Gt,Rt+=w*_t,Re+=w*jt,ft+=w*zt,at+=w*Vn,vt+=w*an,ke+=w*Bn,_e+=w*Dn,Xe+=w*Ln,ht+=w*nr,Fe+=w*_r,tt+=w*Nr,Be+=w*Ir,w=k[3],ve+=w*$,Le+=w*Mt,Te+=w*Ht,Rt+=w*Gt,Re+=w*_t,ft+=w*jt,at+=w*zt,vt+=w*Vn,ke+=w*an,_e+=w*Bn,Xe+=w*Dn,ht+=w*Ln,Fe+=w*nr,tt+=w*_r,Be+=w*Nr,He+=w*Ir,w=k[4],Le+=w*$,Te+=w*Mt,Rt+=w*Ht,Re+=w*Gt,ft+=w*_t,at+=w*jt,vt+=w*zt,ke+=w*Vn,_e+=w*an,Xe+=w*Bn,ht+=w*Dn,Fe+=w*Ln,tt+=w*nr,Be+=w*_r,He+=w*Nr,Je+=w*Ir,w=k[5],Te+=w*$,Rt+=w*Mt,Re+=w*Ht,ft+=w*Gt,at+=w*_t,vt+=w*jt,ke+=w*zt,_e+=w*Vn,Xe+=w*an,ht+=w*Bn,Fe+=w*Dn,tt+=w*Ln,Be+=w*nr,He+=w*_r,Je+=w*Nr,Me+=w*Ir,w=k[6],Rt+=w*$,Re+=w*Mt,ft+=w*Ht,at+=w*Gt,vt+=w*_t,ke+=w*jt,_e+=w*zt,Xe+=w*Vn,ht+=w*an,Fe+=w*Bn,tt+=w*Dn,Be+=w*Ln,He+=w*nr,Je+=w*_r,Me+=w*Nr,ae+=w*Ir,w=k[7],Re+=w*$,ft+=w*Mt,at+=w*Ht,vt+=w*Gt,ke+=w*_t,_e+=w*jt,Xe+=w*zt,ht+=w*Vn,Fe+=w*an,tt+=w*Bn,Be+=w*Dn,He+=w*Ln,Je+=w*nr,Me+=w*_r,ae+=w*Nr,oe+=w*Ir,w=k[8],ft+=w*$,at+=w*Mt,vt+=w*Ht,ke+=w*Gt,_e+=w*_t,Xe+=w*jt,ht+=w*zt,Fe+=w*Vn,tt+=w*an,Be+=w*Bn,He+=w*Dn,Je+=w*Ln,Me+=w*nr,ae+=w*_r,oe+=w*Nr,ge+=w*Ir,w=k[9],at+=w*$,vt+=w*Mt,ke+=w*Ht,_e+=w*Gt,Xe+=w*_t,ht+=w*jt,Fe+=w*zt,tt+=w*Vn,Be+=w*an,He+=w*Bn,Je+=w*Dn,Me+=w*Ln,ae+=w*nr,oe+=w*_r,ge+=w*Nr,ue+=w*Ir,w=k[10],vt+=w*$,ke+=w*Mt,_e+=w*Ht,Xe+=w*Gt,ht+=w*_t,Fe+=w*jt,tt+=w*zt,Be+=w*Vn,He+=w*an,Je+=w*Bn,Me+=w*Dn,ae+=w*Ln,oe+=w*nr,ge+=w*_r,ue+=w*Nr,fe+=w*Ir,w=k[11],ke+=w*$,_e+=w*Mt,Xe+=w*Ht,ht+=w*Gt,Fe+=w*_t,tt+=w*jt,Be+=w*zt,He+=w*Vn,Je+=w*an,Me+=w*Bn,ae+=w*Dn,oe+=w*Ln,ge+=w*nr,ue+=w*_r,fe+=w*Nr,be+=w*Ir,w=k[12],_e+=w*$,Xe+=w*Mt,ht+=w*Ht,Fe+=w*Gt,tt+=w*_t,Be+=w*jt,He+=w*zt,Je+=w*Vn,Me+=w*an,ae+=w*Bn,oe+=w*Dn,ge+=w*Ln,ue+=w*nr,fe+=w*_r,be+=w*Nr,ct+=w*Ir,w=k[13],Xe+=w*$,ht+=w*Mt,Fe+=w*Ht,tt+=w*Gt,Be+=w*_t,He+=w*jt,Je+=w*zt,Me+=w*Vn,ae+=w*an,oe+=w*Bn,ge+=w*Dn,ue+=w*Ln,fe+=w*nr,be+=w*_r,ct+=w*Nr,At+=w*Ir,w=k[14],ht+=w*$,Fe+=w*Mt,tt+=w*Ht,Be+=w*Gt,He+=w*_t,Je+=w*jt,Me+=w*zt,ae+=w*Vn,oe+=w*an,ge+=w*Bn,ue+=w*Dn,fe+=w*Ln,be+=w*nr,ct+=w*_r,At+=w*Nr,St+=w*Ir,w=k[15],Fe+=w*$,tt+=w*Mt,Be+=w*Ht,He+=w*Gt,Je+=w*_t,Me+=w*jt,ae+=w*zt,oe+=w*Vn,ge+=w*an,ue+=w*Bn,fe+=w*Dn,be+=w*Ln,ct+=w*nr,At+=w*_r,St+=w*Nr,Ot+=w*Ir,z+=38*tt,W+=38*Be,ce+=38*He,ve+=38*Je,Le+=38*Me,Te+=38*ae,Rt+=38*oe,Re+=38*ge,ft+=38*ue,at+=38*fe,vt+=38*be,ke+=38*ct,_e+=38*At,Xe+=38*St,ht+=38*Ot,I=1,w=z+I+65535,I=Math.floor(w/65536),z=w-I*65536,w=W+I+65535,I=Math.floor(w/65536),W=w-I*65536,w=ce+I+65535,I=Math.floor(w/65536),ce=w-I*65536,w=ve+I+65535,I=Math.floor(w/65536),ve=w-I*65536,w=Le+I+65535,I=Math.floor(w/65536),Le=w-I*65536,w=Te+I+65535,I=Math.floor(w/65536),Te=w-I*65536,w=Rt+I+65535,I=Math.floor(w/65536),Rt=w-I*65536,w=Re+I+65535,I=Math.floor(w/65536),Re=w-I*65536,w=ft+I+65535,I=Math.floor(w/65536),ft=w-I*65536,w=at+I+65535,I=Math.floor(w/65536),at=w-I*65536,w=vt+I+65535,I=Math.floor(w/65536),vt=w-I*65536,w=ke+I+65535,I=Math.floor(w/65536),ke=w-I*65536,w=_e+I+65535,I=Math.floor(w/65536),_e=w-I*65536,w=Xe+I+65535,I=Math.floor(w/65536),Xe=w-I*65536,w=ht+I+65535,I=Math.floor(w/65536),ht=w-I*65536,w=Fe+I+65535,I=Math.floor(w/65536),Fe=w-I*65536,z+=I-1+37*(I-1),I=1,w=z+I+65535,I=Math.floor(w/65536),z=w-I*65536,w=W+I+65535,I=Math.floor(w/65536),W=w-I*65536,w=ce+I+65535,I=Math.floor(w/65536),ce=w-I*65536,w=ve+I+65535,I=Math.floor(w/65536),ve=w-I*65536,w=Le+I+65535,I=Math.floor(w/65536),Le=w-I*65536,w=Te+I+65535,I=Math.floor(w/65536),Te=w-I*65536,w=Rt+I+65535,I=Math.floor(w/65536),Rt=w-I*65536,w=Re+I+65535,I=Math.floor(w/65536),Re=w-I*65536,w=ft+I+65535,I=Math.floor(w/65536),ft=w-I*65536,w=at+I+65535,I=Math.floor(w/65536),at=w-I*65536,w=vt+I+65535,I=Math.floor(w/65536),vt=w-I*65536,w=ke+I+65535,I=Math.floor(w/65536),ke=w-I*65536,w=_e+I+65535,I=Math.floor(w/65536),_e=w-I*65536,w=Xe+I+65535,I=Math.floor(w/65536),Xe=w-I*65536,w=ht+I+65535,I=Math.floor(w/65536),ht=w-I*65536,w=Fe+I+65535,I=Math.floor(w/65536),Fe=w-I*65536,z+=I-1+37*(I-1),P[0]=z,P[1]=W,P[2]=ce,P[3]=ve,P[4]=Le,P[5]=Te,P[6]=Rt,P[7]=Re,P[8]=ft,P[9]=at,P[10]=vt,P[11]=ke,P[12]=_e,P[13]=Xe,P[14]=ht,P[15]=Fe}function st(P,k){De(P,k,k)}function Tt(P,k){var _=n(),w;for(w=0;w<16;w++)_[w]=k[w];for(w=253;w>=0;w--)st(_,_),w!==2&&w!==4&&De(_,_,k);for(w=0;w<16;w++)P[w]=_[w]}function ln(P,k){var _=n(),w;for(w=0;w<16;w++)_[w]=k[w];for(w=250;w>=0;w--)st(_,_),w!==1&&De(_,_,k);for(w=0;w<16;w++)P[w]=_[w]}function Ee(P,k,_){var w=new Uint8Array(32),I=new Float64Array(80),z,W,ce=n(),ve=n(),Le=n(),Te=n(),Rt=n(),Re=n();for(W=0;W<31;W++)w[W]=k[W];for(w[31]=k[31]&127|64,w[0]&=248,we(I,_),W=0;W<16;W++)ve[W]=I[W],Te[W]=ce[W]=Le[W]=0;for(ce[0]=Te[0]=1,W=254;W>=0;--W)z=w[W>>>3]>>>(W&7)&1,V(ce,ve,z),V(Le,Te,z),Ye(Rt,ce,Le),nt(ce,ce,Le),Ye(Le,ve,Te),nt(ve,ve,Te),st(Te,Rt),st(Re,ce),De(ce,Le,ce),De(Le,ve,Rt),Ye(Rt,ce,Le),nt(ce,ce,Le),st(ve,ce),nt(Le,Te,Re),De(ce,Le,l),Ye(ce,ce,Te),De(Le,Le,ce),De(ce,Te,Re),De(Te,ve,I),st(ve,Rt),V(ce,ve,z),V(Le,Te,z);for(W=0;W<16;W++)I[W+16]=ce[W],I[W+32]=Le[W],I[W+48]=ve[W],I[W+64]=Te[W];var ft=I.subarray(32),at=I.subarray(16);return Tt(ft,ft),De(at,at,ft),ee(P,at),0}function ne(P,k){return Ee(P,k,a)}function le(P,k){return r(k,32),ne(P,k)}function te(P,k,_){var w=new Uint8Array(32);return Ee(w,_,k),S(P,i,w,E)}var Ce=X,Se=G;function ze(P,k,_,w,I,z){var W=new Uint8Array(32);return te(W,I,z),Ce(P,k,_,w,W)}function $e(P,k,_,w,I,z){var W=new Uint8Array(32);return te(W,I,z),Se(P,k,_,w,W)}var rt=[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 dt(P,k,_,w){for(var I=new Int32Array(16),z=new Int32Array(16),W,ce,ve,Le,Te,Rt,Re,ft,at,vt,ke,_e,Xe,ht,Fe,tt,Be,He,Je,Me,ae,oe,ge,ue,fe,be,ct=P[0],At=P[1],St=P[2],Ot=P[3],$=P[4],Mt=P[5],Ht=P[6],Gt=P[7],_t=k[0],jt=k[1],zt=k[2],Vn=k[3],an=k[4],Bn=k[5],Dn=k[6],Ln=k[7],nr=0;w>=128;){for(Je=0;Je<16;Je++)Me=8*Je+nr,I[Je]=_[Me+0]<<24|_[Me+1]<<16|_[Me+2]<<8|_[Me+3],z[Je]=_[Me+4]<<24|_[Me+5]<<16|_[Me+6]<<8|_[Me+7];for(Je=0;Je<80;Je++)if(W=ct,ce=At,ve=St,Le=Ot,Te=$,Rt=Mt,Re=Ht,ft=Gt,at=_t,vt=jt,ke=zt,_e=Vn,Xe=an,ht=Bn,Fe=Dn,tt=Ln,ae=Gt,oe=Ln,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=($>>>14|an<<18)^($>>>18|an<<14)^(an>>>9|$<<23),oe=(an>>>14|$<<18)^(an>>>18|$<<14)^($>>>9|an<<23),ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ae=$&Mt^~$&Ht,oe=an&Bn^~an&Dn,ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ae=rt[Je*2],oe=rt[Je*2+1],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ae=I[Je%16],oe=z[Je%16],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,Be=fe&65535|be<<16,He=ge&65535|ue<<16,ae=Be,oe=He,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=(ct>>>28|_t<<4)^(_t>>>2|ct<<30)^(_t>>>7|ct<<25),oe=(_t>>>28|ct<<4)^(ct>>>2|_t<<30)^(ct>>>7|_t<<25),ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ae=ct&At^ct&St^At&St,oe=_t&jt^_t&zt^jt&zt,ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,ft=fe&65535|be<<16,tt=ge&65535|ue<<16,ae=Le,oe=_e,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=Be,oe=He,ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,Le=fe&65535|be<<16,_e=ge&65535|ue<<16,At=W,St=ce,Ot=ve,$=Le,Mt=Te,Ht=Rt,Gt=Re,ct=ft,jt=at,zt=vt,Vn=ke,an=_e,Bn=Xe,Dn=ht,Ln=Fe,_t=tt,Je%16===15)for(Me=0;Me<16;Me++)ae=I[Me],oe=z[Me],ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=I[(Me+9)%16],oe=z[(Me+9)%16],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,Be=I[(Me+1)%16],He=z[(Me+1)%16],ae=(Be>>>1|He<<31)^(Be>>>8|He<<24)^Be>>>7,oe=(He>>>1|Be<<31)^(He>>>8|Be<<24)^(He>>>7|Be<<25),ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,Be=I[(Me+14)%16],He=z[(Me+14)%16],ae=(Be>>>19|He<<13)^(He>>>29|Be<<3)^Be>>>6,oe=(He>>>19|Be<<13)^(Be>>>29|He<<3)^(He>>>6|Be<<26),ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,I[Me]=fe&65535|be<<16,z[Me]=ge&65535|ue<<16;ae=ct,oe=_t,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[0],oe=k[0],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[0]=ct=fe&65535|be<<16,k[0]=_t=ge&65535|ue<<16,ae=At,oe=jt,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[1],oe=k[1],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[1]=At=fe&65535|be<<16,k[1]=jt=ge&65535|ue<<16,ae=St,oe=zt,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[2],oe=k[2],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[2]=St=fe&65535|be<<16,k[2]=zt=ge&65535|ue<<16,ae=Ot,oe=Vn,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[3],oe=k[3],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[3]=Ot=fe&65535|be<<16,k[3]=Vn=ge&65535|ue<<16,ae=$,oe=an,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[4],oe=k[4],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[4]=$=fe&65535|be<<16,k[4]=an=ge&65535|ue<<16,ae=Mt,oe=Bn,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[5],oe=k[5],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[5]=Mt=fe&65535|be<<16,k[5]=Bn=ge&65535|ue<<16,ae=Ht,oe=Dn,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[6],oe=k[6],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[6]=Ht=fe&65535|be<<16,k[6]=Dn=ge&65535|ue<<16,ae=Gt,oe=Ln,ge=oe&65535,ue=oe>>>16,fe=ae&65535,be=ae>>>16,ae=P[7],oe=k[7],ge+=oe&65535,ue+=oe>>>16,fe+=ae&65535,be+=ae>>>16,ue+=ge>>>16,fe+=ue>>>16,be+=fe>>>16,P[7]=Gt=fe&65535|be<<16,k[7]=Ln=ge&65535|ue<<16,nr+=128,w-=128}return w}function wt(P,k,_){var w=new Int32Array(8),I=new Int32Array(8),z=new Uint8Array(256),W,ce=_;for(w[0]=1779033703,w[1]=3144134277,w[2]=1013904242,w[3]=2773480762,w[4]=1359893119,w[5]=2600822924,w[6]=528734635,w[7]=1541459225,I[0]=4089235720,I[1]=2227873595,I[2]=4271175723,I[3]=1595750129,I[4]=2917565137,I[5]=725511199,I[6]=4215389547,I[7]=327033209,dt(w,I,k,_),_%=128,W=0;W<_;W++)z[W]=k[ce-_+W];for(z[_]=128,_=256-128*(_<112?1:0),z[_-9]=0,g(z,_-8,ce/536870912|0,ce<<3),dt(w,I,z,_),W=0;W<8;W++)g(P,8*W,w[W],I[W]);return 0}function yt(P,k){var _=n(),w=n(),I=n(),z=n(),W=n(),ce=n(),ve=n(),Le=n(),Te=n();nt(_,P[1],P[0]),nt(Te,k[1],k[0]),De(_,_,Te),Ye(w,P[0],P[1]),Ye(Te,k[0],k[1]),De(w,w,Te),De(I,P[3],k[3]),De(I,I,u),De(z,P[2],k[2]),Ye(z,z,z),nt(W,w,_),nt(ce,z,I),Ye(ve,z,I),Ye(Le,w,_),De(P[0],W,ce),De(P[1],Le,ve),De(P[2],ve,ce),De(P[3],W,Le)}function Pe(P,k,_){var w;for(w=0;w<4;w++)V(P[w],k[w],_)}function nn(P,k){var _=n(),w=n(),I=n();Tt(I,k[2]),De(_,k[0],I),De(w,k[1],I),ee(P,w),P[31]^=Ae(_)<<7}function cn(P,k,_){var w,I;for(H(P[0],o),H(P[1],s),H(P[2],s),H(P[3],o),I=255;I>=0;--I)w=_[I/8|0]>>(I&7)&1,Pe(P,k,w),yt(k,P),yt(P,P),Pe(P,k,w)}function Gn(P,k){var _=[n(),n(),n(),n()];H(_[0],f),H(_[1],h),H(_[2],s),De(_[3],f,h),cn(P,_,k)}function Wa(P,k,_){var w=new Uint8Array(64),I=[n(),n(),n(),n()],z;for(_||r(k,32),wt(w,k,32),w[0]&=248,w[31]&=127,w[31]|=64,Gn(I,w),nn(P,I),z=0;z<32;z++)k[z+32]=P[z];return 0}var ms=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Yr(P,k){var _,w,I,z;for(w=63;w>=32;--w){for(_=0,I=w-32,z=w-12;I>4)*ms[I],_=k[I]>>8,k[I]&=255;for(I=0;I<32;I++)k[I]-=_*ms[I];for(w=0;w<32;w++)k[w+1]+=k[w]>>8,P[w]=k[w]&255}function du(P){var k=new Float64Array(64),_;for(_=0;_<64;_++)k[_]=P[_];for(_=0;_<64;_++)P[_]=0;Yr(P,k)}function ji(P,k,_,w){var I=new Uint8Array(64),z=new Uint8Array(64),W=new Uint8Array(64),ce,ve,Le=new Float64Array(64),Te=[n(),n(),n(),n()];wt(I,w,32),I[0]&=248,I[31]&=127,I[31]|=64;var Rt=_+64;for(ce=0;ce<_;ce++)P[64+ce]=k[ce];for(ce=0;ce<32;ce++)P[32+ce]=I[32+ce];for(wt(W,P.subarray(32),_+32),du(W),Gn(Te,W),nn(P,Te),ce=32;ce<64;ce++)P[ce]=w[ce];for(wt(z,P,_+64),du(z),ce=0;ce<64;ce++)Le[ce]=0;for(ce=0;ce<32;ce++)Le[ce]=W[ce];for(ce=0;ce<32;ce++)for(ve=0;ve<32;ve++)Le[ce+ve]+=z[ce]*I[ve];return Yr(P.subarray(32),Le),Rt}function pu(P,k){var _=n(),w=n(),I=n(),z=n(),W=n(),ce=n(),ve=n();return H(P[2],s),we(P[1],k),st(I,P[1]),De(z,I,c),nt(I,I,P[2]),Ye(z,P[2],z),st(W,z),st(ce,W),De(ve,ce,W),De(_,ve,I),De(_,_,z),ln(_,_),De(_,_,I),De(_,_,z),De(_,_,z),De(P[0],_,z),st(w,P[0]),De(w,w,z),pe(w,I)&&De(P[0],P[0],d),st(w,P[0]),De(w,w,z),pe(w,I)?-1:(Ae(P[0])===k[31]>>7&&nt(P[0],o,P[0]),De(P[3],P[0],P[1]),0)}function Ja(P,k,_,w){var I,z=new Uint8Array(32),W=new Uint8Array(64),ce=[n(),n(),n(),n()],ve=[n(),n(),n(),n()];if(_<64||pu(ve,w))return-1;for(I=0;I<_;I++)P[I]=k[I];for(I=0;I<32;I++)P[I+32]=w[I];if(wt(W,P,_),du(W),cn(ce,ve,W),Gn(ve,k.subarray(32)),yt(ce,ve),nn(z,ce),_-=64,m(k,0,z,0)){for(I=0;I<_;I++)P[I]=0;return-1}for(I=0;I<_;I++)P[I]=k[I+64];return _}var $l=32,Ul=24,zi=32,Xr=16,pa=32,Ya=32,Io=32,Xa=32,gu=32,yu=Ul,Sh=zi,Q=Xr,Z=64,se=32,Oe=64,Ge=32,xt=64;e.lowlevel={crypto_core_hsalsa20:S,crypto_stream_xor:B,crypto_stream:N,crypto_stream_salsa20_xor:T,crypto_stream_salsa20:C,crypto_onetimeauth:U,crypto_onetimeauth_verify:j,crypto_verify_16:y,crypto_verify_32:m,crypto_secretbox:X,crypto_secretbox_open:G,crypto_scalarmult:Ee,crypto_scalarmult_base:ne,crypto_box_beforenm:te,crypto_box_afternm:Ce,crypto_box:ze,crypto_box_open:$e,crypto_box_keypair:le,crypto_hash:wt,crypto_sign:ji,crypto_sign_keypair:Wa,crypto_sign_open:Ja,crypto_secretbox_KEYBYTES:$l,crypto_secretbox_NONCEBYTES:Ul,crypto_secretbox_ZEROBYTES:zi,crypto_secretbox_BOXZEROBYTES:Xr,crypto_scalarmult_BYTES:pa,crypto_scalarmult_SCALARBYTES:Ya,crypto_box_PUBLICKEYBYTES:Io,crypto_box_SECRETKEYBYTES:Xa,crypto_box_BEFORENMBYTES:gu,crypto_box_NONCEBYTES:yu,crypto_box_ZEROBYTES:Sh,crypto_box_BOXZEROBYTES:Q,crypto_sign_BYTES:Z,crypto_sign_PUBLICKEYBYTES:se,crypto_sign_SECRETKEYBYTES:Oe,crypto_sign_SEEDBYTES:Ge,crypto_hash_BYTES:xt,gf:n,D:c,L:ms,pack25519:ee,unpack25519:we,M:De,A:Ye,S:st,Z:nt,pow2523:ln,add:yt,set25519:H,modL:Yr,scalarmult:cn,scalarbase:Gn};function pt(P,k){if(P.length!==$l)throw new Error("bad key size");if(k.length!==Ul)throw new Error("bad nonce size")}function lt(P,k){if(P.length!==Io)throw new Error("bad public key size");if(k.length!==Xa)throw new Error("bad secret key size")}function Ue(){for(var P=0;P=0},e.sign.keyPair=function(){var P=new Uint8Array(se),k=new Uint8Array(Oe);return Wa(P,k),{publicKey:P,secretKey:k}},e.sign.keyPair.fromSecretKey=function(P){if(Ue(P),P.length!==Oe)throw new Error("bad secret key size");for(var k=new Uint8Array(se),_=0;_`0x${"0".repeat(40)}`;class oae{constructor(){this.cachedSignatures=new Map,this.cachedLeashes=new Map}clear(){this.cachedSignatures.clear(),this.cachedLeashes.clear()}cache(e,n,r,i,a){this.cachedSignatures.has(e)||this.cachedSignatures.set(e,new Map),this.cachedSignatures.get(e).set(i,a),this.cachedLeashes.set(n,{nonce:r.leash.nonce,block_number:r.leash.blockNumber,block_hash:r.leash.blockHash,block_range:r.leash.blockRange})}get(e,n){var r;return(r=this.cachedSignatures.get(e))===null||r===void 0?void 0:r.get(n)}getLeash(e){return this.cachedLeashes.get(e)}}const _y=new oae;function sae(t){return{domain:{name:"oasis-runtime-sdk/evm: signed query",version:"1.0.0",chainId:t},types:{Call:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"gasLimit",type:"uint64"},{name:"gasPrice",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"},{name:"leash",type:"Leash"}],Leash:[{name:"nonce",type:"uint64"},{name:"blockNumber",type:"uint64"},{name:"blockHash",type:"bytes32"},{name:"blockRange",type:"uint64"}]}}}class cA{static make(e,n,r){return px(this,void 0,void 0,function*(){const i=yield cae(n,r==null?void 0:r.leash);return new cA(i,yield fae(uae(e,i),n,{chainId:r==null?void 0:r.chainId}),e.data?qU(e.data):void 0)})}constructor(e,n,r){this.leash=e,this.signature=n,this.data=r,fw.add(this)}encode(){return G_(this,fw,"m",e8).call(this,this.data?{body:this.data}:void 0)}encryptEncode(e){return px(this,void 0,void 0,function*(){return this.data?G_(this,fw,"m",e8).call(this,yield e.encryptEnvelope(this.data)):this.encode()})}}fw=new WeakSet,e8=function(e){return Ze(Fh({data:e||void 0,leash:this.leash,signature:this.signature}))};function qU(t){return Array.isArray(t)?new Uint8Array(t):Or(t)}function lae(t){return Array.isArray(t)?Ze(new Uint8Array(t)):Ze(t)}function cae(t,e){var n;return px(this,void 0,void 0,function*(){((e==null?void 0:e.nonce)!==void 0||(e==null?void 0:e.block)!==void 0)&&_y.clear();let r;if(e!=null&&e.nonce)r=e.nonce;else if("getNonce"in t)r=t.getNonce("pending");else{const l=yield t.getAddress();r=t.provider.getTransactionCount(l,"pending")}let i;if((e==null?void 0:e.block)!==void 0)i=e.block;else{if(!t.provider)throw new Error("`sapphire.wrap`ped signer was not connected to a provider");const l=yield t.provider.getBlock("latest");if(!l)throw new Error("unable to get latest block");i=t.provider.getBlock(l.number-2)}const[a,o]=yield Promise.all([r,i]),s=(n=e==null?void 0:e.blockRange)!==null&&n!==void 0?n:rae;if((e==null?void 0:e.nonce)===void 0&&(e==null?void 0:e.block)===void 0){if(!t.provider)throw new Error("`sapphire.wrap`ped signer was not connected to a provider");const{chainId:l}=yield t.provider.getNetwork(),c=_y.getLeash(BigInt(l));if(c!==void 0){if(c.nonce>a&&c.block_number+s>o.number+2)return c;_y.clear()}}return{nonce:e!=null&&e.nonce?e.nonce:a+nae,block_number:o.number,block_hash:Or(o.hash),block_range:s}})}function uae(t,e){var n,r,i,a,o;return{from:t.from,to:(n=t.to)!==null&&n!==void 0?n:aae(),gasLimit:Number(BigInt((i=(r=t.gasLimit)!==null&&r!==void 0?r:t.gasLimit)!==null&&i!==void 0?i:eae)),gasPrice:BigInt((a=t.gasPrice)!==null&&a!==void 0?a:qie),value:BigInt((o=t.value)!==null&&o!==void 0?o:tae),data:t.data?lae(t.data):iae,leash:{nonce:e.nonce,blockNumber:e.block_number,blockHash:e.block_hash,blockRange:e.block_range}}}function fae(t,e,n){return px(this,void 0,void 0,function*(){const r=yield e.getAddress();let i;if(n!=null&&n.chainId)i=BigInt(n.chainId);else if(e.provider)({chainId:i}=yield e.provider.getNetwork());else throw new Error("must either connect provider or provide manual chainId override");const{domain:a,types:o}=sae(Number(i)),s=hae(a),l=dae(t),c=x1.hash(s,o,l);let u=_y.get(r,c);return u!==void 0||(u=Pt("_signTypedData"in e?yield e._signTypedData(s,o,l):yield e.signTypedData(s,o,l)),_y.cache(r,BigInt(i),t,c,u)),u})}function hae(t){const e=Object.assign(Object.assign({},t),{chainId:t.chainId?fs(t.chainId):void 0});return t.salt&&(e.salt=qU(t.salt)),e}function dae(t){const e=n=>{if(n!=null)return typeof n=="string"?n:n instanceof BigInt?fs(n.toString()):Uu(n)};return Object.assign(Object.assign({},t),{gasPrice:e(t.gasPrice),value:e(t.value),data:t.data?Pt(t.data):void 0})}const pae="modulepreload",gae=function(t){return"/votee/"+t},V_={},yae=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link");i=Promise.all(n.map(o=>{if(o=gae(o),o in V_)return;V_[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!r)for(let f=a.length-1;f>=0;f--){const h=a[f];if(h.href===o&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":pae,s||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),s)return new Promise((f,h)=>{u.addEventListener("load",f),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})}))}return i.then(()=>e()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},uE={chainId:23294,defaultGateway:"https://sapphire.oasis.io/",runtimeId:"0x000000000000000000000000000000000000000000000000f80306c9858e7279"},fE={chainId:23295,defaultGateway:"https://testnet.sapphire.oasis.dev/",runtimeId:"0x000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c"},hE={chainId:23293,defaultGateway:"http://localhost:8545/",runtimeId:"0x8000000000000000000000000000000000000000000000000000000000000000"},mae={mainnet:uE,testnet:fE,localnet:hE,[uE.chainId]:uE,[fE.chainId]:fE,[hE.chainId]:hE};var Rp=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})};const vae=60*5*1e3;function eF(t,e){return{key:Pt(t.key),checksum:Pt(t.checksum),signature:Pt(t.signature),epoch:t.epoch,chainId:e,fetched:new Date}}function bae(t){return Rp(this,void 0,void 0,function*(){const e=yield yae(()=>import(t.split(":")[0]),__vite__mapDeps([])),n=tF();return new Promise((r,i)=>{const a={method:"POST",headers:{"content-type":"application/json","content-length":n.length}},o=e.request(t,a,s=>{const l=[];s.on("error",c=>i(c)),s.on("data",c=>l.push(c)),s.on("end",()=>{r(JSON.parse(Buffer.concat(l).toString()))})});o.on("error",s=>i(s)),o.write(n),o.end()})})}function wae(t,e){return Rp(this,void 0,void 0,function*(){const n=yield e(t,{method:"POST",headers:{"content-type":"application/json"},body:tF()});if(!n.ok)throw new Ny("Failed to fetch runtime public key.",n);return yield n.json()})}function tF(){return JSON.stringify({jsonrpc:"2.0",id:Math.floor(Math.random()*1e9),method:n8,params:[]})}function xae(t,e){var n;return Rp(this,void 0,void 0,function*(){const{defaultGateway:r}=mae[t];if(!r)throw new Error(`Unable to fetch runtime public key for network with unknown ID: ${t}.`);const i=(n=e==null?void 0:e.fetch)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.fetch,a=yield i?wae(r,i):bae(r);return eF(a.result,t)})}function Q_(t){return typeof t=="string"?t.startsWith("0x")?parseInt(t,16):parseInt(t):t}function Aae(t){return Rp(this,void 0,void 0,function*(){const e="provider"in t?t.provider:t;let n;if(e){let r;if("request"in e){const i=e;n=Q_(yield i.request({method:"eth_chainId"}));try{r=yield i.request({method:n8,params:[]})}catch{}}else if("send"in e){const i=e;n=Q_(yield i.send("eth_chainId",[]));try{r=yield i.send(n8,[])}catch{}}else throw new Error("fetchRuntimePublicKey does not support non-request non-send provier!");if(r&&"key"in r)return eF(r,n)}if(!n)throw new Error("fetchRuntimePublicKey failed to retrieve chainId from provider");return xae(n)})}class Eae{}class Sae extends Eae{constructor(e){super(),e||(e=vae),this.timeoutMilliseconds=e}fetch(e){return Rp(this,void 0,void 0,function*(){if(this.pubkey){const n=this.pubkey,r=Date.now()-this.timeoutMilliseconds;if(n.fetched&&n.fetched.valueOf()>r)return n}return this.pubkey=yield Aae(e)})}cipher(e){return Rp(this,void 0,void 0,function*(){const n=yield this.fetch(e);return hx.ephemeral(n.key,n.epoch)})}}var hs=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})},Pae=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);ihs(this,void 0,void 0,function*(){return yield i({method:o[0],params:o[1]})})),"sendAsync"in t&&(a.sendAsync=()=>{throw new Error("sendAsync not supported by Sapphire wrapper!")}),OO(t,n,a)}function Cae(t,e){return n=>hs(this,void 0,void 0,function*(){const r=yield t.getSigner(),i=yield e.fetcher.cipher(t),{method:a,params:o}=yield Mae(n,r,i),s=yield r.provider.send(a,o??[]);return a==="eth_call"?yield i.decryptEncoded(s):s})}function OO(t,e,n){return new Proxy(t,{get(r,i){if(i===PO)return e;if(i in n)return Reflect.get(n,i);const a=Reflect.get(r,i);return typeof a=="function"?a.bind(r):a}})}function TO(t,e){const n=uA(e);let r;if(t.provider)try{const a=rF(t.provider,n,t);r=t.connect(a)}catch(a){if(a.code!=="UNSUPPORTED_OPERATION")throw a;r=t}else r=t;const i={sendTransaction:K_(r.sendTransaction.bind(r),n,r),signTransaction:K_(r.signTransaction.bind(r),n,r),call:gx(r,"call",n),estimateGas:gx(r,"estimateGas",n),connect(a){const o=r.connect(a);return TO(o,n)}};return OO(r,n,i)}function rF(t,e,n){const r=uA(e);if(Reflect.get(t,PO)!==void 0)return t;const i={call:gx(t,"call",r),estimateGas:gx(t,"estimateGas",r)};return n&&("broadcastTransaction"in t?i.broadcastTransaction=a=>hs(this,void 0,void 0,function*(){const o=yield r.fetcher.cipher(t),s=yield t8(a,o,n);return t.broadcastTransaction(s)}):i.sendTransaction=a=>hs(this,void 0,void 0,function*(){const o=yield r.fetcher.cipher(t),s=yield t8(a,o,n);return t.sendTransaction(s)})),OO(t,r,i)}function kae(t){return Reflect.get(t,"_isSigner")===!0}function _ae(t){return t instanceof BU||Reflect.get(t,"signTypedData")!==void 0&&Reflect.get(t,"signTransaction")!==void 0}function iF(t){return kae(t)||_ae(t)}function Nae(t){return Reflect.get(t,"_isProvider")===!0}function Iae(t){return t instanceof MU||Reflect.get(t,"waitForBlock")&&Reflect.get(t,"destroy")&&Reflect.get(t,"broadcastTransaction")}function Rae(t){return Nae(t)||Iae(t)}function gx(t,e,n){const r=(i,a,o,s)=>hs(this,void 0,void 0,function*(){var l;let c=a.data;return o||(c=yield s.encryptEncode((l=a.data)!==null&&l!==void 0?l:new Uint8Array)),yield i[e](Object.assign(Object.assign({},a),{data:Ze(c)}))});return i=>hs(this,void 0,void 0,function*(){const a=Reflect.get(t,"populateCall");a!==void 0&&(i=yield a.bind(t)(i));let o;const s=oF(i.data,!0),l=yield n.fetcher.cipher(t);if(!s&&iF(t)){const c=t;if(!c.provider)throw new Error("signer not connected to a provider");const u=c.provider;if(yield aF(i)){const f=yield cA.make(i,c);o=yield u[e](Object.assign(Object.assign({},i),{data:yield f.encryptEncode(l)}))}else o=yield r(u,i,s,l)}else o=yield r(t,i,s,l);return!s&&typeof o=="string"?yield l.decryptEncoded(o):o})}function K_(t,e,n){return(r,...i)=>hs(this,void 0,void 0,function*(){if(r.data){const a=yield e.fetcher.cipher(n);r.data=yield a.encryptEncode(r.data)}return t(r,...i)})}function aF(t){return hs(this,void 0,void 0,function*(){const[e,n]=yield Promise.all([t.from,t.to]);return!!n&&!!e&&typeof e=="string"&&!/^(0x)?0{40}$/.test(e)})}function Mae({method:t,params:e},n,r){return hs(this,void 0,void 0,function*(){if(!Array.isArray(e))return{method:t,params:e};if(t==="eth_sendRawTransaction")return{method:t,params:[yield t8(e[0],r,n)]};if((t==="eth_call"||t==="eth_estimateGas")&&(yield aF(e[0]))){const i=yield cA.make(e[0],n),a=Object.assign(Object.assign({},e[0]),{data:yield i.encryptEncode(r)});return{method:t,params:[a,...e.slice(1)]}}return/^eth_((send|sign)Transaction|call|estimateGas)$/.test(t)&&e[0].data?(e[0].data=yield r.encryptEncode(e[0].data),{method:t,params:e}):{method:t,params:e}})}class dE extends Error{}const Bae="Un-enveloped data was passed to sendRawTransaction, which is likely incorrect. Is the dapp using the Sapphire compat lib correctly?";function t8(t,e,n){return hs(this,void 0,void 0,function*(){const r=w1.from(t);if(oF(r.data,!1)||r.isSigned()&&(!n||(yield n.getAddress())!==r.from))return t;r.data=yield e.encryptEncode(r.data);try{return n.signTransaction(r)}catch(i){throw new Ny(Bae,i)}})}function Dae(t){return"data"in t&&"leash"in t&&"signature"in t}function oF(t,e){try{const n=ew(Pt(t));let r;if(Dae(n)){if(!e)throw new dE("Got unexpected signed query!");r=n.data}else r=n;if(!Lae(r))throw new dE("Bogus Sapphire enveloped data found in transaction!");return!0}catch(n){if(n instanceof dE)throw n}return!1}function Lae(t){const{format:e,body:n}=t,r=Pae(t,["format","body"]);return!(Object.keys(r).length>0||!n||e!==null&&e!==Ip.Plain&&(nx(n)||!nx(n.data)))}const n8="oasis_callDataPublicKey";class Ny extends Error{constructor(e,n){super(e),this.response=n}}function $ae({mustBeMetaMask:t=!1,silent:e=!1,timeout:n=3e3}={}){i();let r=!1;return new Promise(a=>{window.ethereum?o():(window.addEventListener("ethereum#initialized",o,{once:!0}),setTimeout(()=>{o()},n));function o(){if(r)return;r=!0,window.removeEventListener("ethereum#initialized",o);const{ethereum:s}=window;s&&(!t||s.isMetaMask)?a(s):(!e&&console.error("@metamask/detect-provider:",t&&s?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum."),a(null))}});function i(){if(typeof t!="boolean")throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if(typeof e!="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.")}}var Uae=$ae;const Fae=Xt(Uae),sF=F.createContext({}),jae=({children:t})=>{const e=async()=>!!await Fae({mustBeMetaMask:!1}),n=async()=>{var s,l;const o=await(((l=(s=window.ethereum)==null?void 0:s.request)==null?void 0:l.call(s,{method:"eth_requestAccounts"}))||Promise.resolve([]));if(!o||(o==null?void 0:o.length)<=0)throw new Error("[EIP1193Context] Request account failed!");return o[0]},r=(o=zw)=>{var l,c;if(!jw.has(o))throw new Error(`Chain configuration for chain id '${o}' not found!`);const s=jw.get(o);return(c=(l=window.ethereum)==null?void 0:l.request)==null?void 0:c.call(l,{method:"wallet_addEthereumChain",params:[s]})},a={isEIP1193ProviderAvailable:e,connectWallet:n,switchNetwork:async(o=zw)=>{var u,f;const s=new r$(window.ethereum);if((await nF(s).getNetwork()).chainId!==BigInt(o))try{const h=us(o).replace("0x0","0x");await((f=(u=window.ethereum).request)==null?void 0:f.call(u,{method:"wallet_switchEthereumChain",params:[{chainId:h}]}))}catch(h){const d=h;if((d==null?void 0:d.code)!==4902&&(d==null?void 0:d.code)!==-32603)throw d;r(o)}}};return q.jsx(sF.Provider,{value:a,children:t})},zae=()=>{const t=F.useContext(sF);if(Object.keys(t).length===0)throw new Error("[useEIP1193] Component not wrapped within a Provider");return t},hb=[{inputs:[{internalType:"contract IPollManagerACL",name:"in_managerACL",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"Close_NotActive",type:"error"},{inputs:[],name:"Close_NotAllowed",type:"error"},{inputs:[],name:"Create_AlreadyExists",type:"error"},{inputs:[],name:"Create_InvalidACL",type:"error"},{inputs:[],name:"Create_NoChoices",type:"error"},{inputs:[],name:"Create_NotAllowed",type:"error"},{inputs:[],name:"Create_TooManyChoices",type:"error"},{inputs:[],name:"Poll_NotActive",type:"error"},{inputs:[],name:"Poll_NotPublishingVotes",type:"error"},{inputs:[],name:"Poll_StillActive",type:"error"},{inputs:[],name:"Vote_NotActive",type:"error"},{inputs:[],name:"Vote_NotAllowed",type:"error"},{inputs:[],name:"Vote_UnknownChoice",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"id",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"topChoice",type:"uint256"}],name:"ProposalClosed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"id",type:"bytes32"}],name:"ProposalCreated",type:"event"},{inputs:[],name:"MAX_CHOICES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"PAST_PROPOSALS",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"PROPOSALS",outputs:[{internalType:"bool",name:"active",type:"bool"},{internalType:"uint8",name:"topChoice",type:"uint8"},{components:[{internalType:"bytes",name:"ipfsHash",type:"bytes"},{internalType:"uint8",name:"numChoices",type:"uint8"},{internalType:"uint64",name:"closeTimestamp",type:"uint64"},{internalType:"contract IPollACL",name:"acl",type:"address"}],internalType:"struct PollManager.ProposalParams",name:"params",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"in_id",type:"bytes32"}],name:"ballotIsActive",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"in_proposalId",type:"bytes32"},{internalType:"address",name:"in_voter",type:"address"},{internalType:"bytes",name:"in_data",type:"bytes"}],name:"canVoteOnPoll",outputs:[{internalType:"uint256",name:"out_weight",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"in_proposalId",type:"bytes32"}],name:"close",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"ipfsHash",type:"bytes"},{internalType:"uint8",name:"numChoices",type:"uint8"},{internalType:"uint64",name:"closeTimestamp",type:"uint64"},{internalType:"contract IPollACL",name:"acl",type:"address"}],internalType:"struct PollManager.ProposalParams",name:"in_params",type:"tuple"},{internalType:"bytes",name:"in_aclData",type:"bytes"}],name:"create",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getACL",outputs:[{internalType:"contract IPollManagerACL",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"proposalId",type:"bytes32"}],name:"getPollACL",outputs:[{internalType:"contract IPollACL",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"in_proposalId",type:"bytes32"}],name:"getVoteCounts",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"in_proposalId",type:"bytes32"},{internalType:"uint8",name:"in_choiceId",type:"uint8"},{internalType:"bytes",name:"in_data",type:"bytes"}],name:"vote",outputs:[],stateMutability:"nonpayable",type:"function"}],W_="0x60a03461007157601f61163c38819003918201601f19168301916001600160401b038311848410176100765780849260209460405283398101031261007157516001600160a01b0381168103610071576080526040516115af908161008d82396080518181816103b301526110b60152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a7146110e55750806308737695146110a057806339c79e0c14610e075780635f98ac7814610dd8578063613e0f8c14610d9f5780636dea101c14610d4d578063782fb5d414610c1b5780638732765714610a82578063892d13071461033a578063d4c0ed3e1461031e578063d50b2843146101035763ff2990a0146100a557600080fd5b3461010057606036600319011261010057602435906001600160a01b038216820361010057604435906001600160401b0382116101005760206100f8846100ef3660048701611210565b916004356112f5565b604051908152f35b80fd5b50346101005760603660031901126101005760043560243560ff81168103610319576001600160401b039160443583811161031557610149610151913690600401611210565b9033846112f5565b818552600160205260ff600260408720015416918260ff851610156102d957855284602052604085203386528060205260408620946101a86101968754948515611409565b6101a285801515611409565b9061141c565b936002830154916040519083602083015260208252816040810110906040830111176102c35760408101604052602081519101209160ff60018901541690895b838110610232578a8a600160ff8c8c8c8c8c6002820155811561021a575b505084551660ff1982840154161791015580f35b600b610229910191825461141c565b90558680610206565b806102418a9260038901611263565b90549060031b1c836102648b60ff61025b8d8a8814611409565b96168514611409565b91189283039283116102ad5761027d879160019461141c565b186102a561028e8360038b01611263565b819391549060031b91821b91600019901b19161790565b9055016101e8565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b8152602060048201526014602482015273566f74655f556e6b6e6f776e43686f696365282960601b6044820152606490fd5b8480fd5b600080fd5b5034610100578060031936011261010057602060405160088152f35b5034610100576003196040368201126108d0576001600160401b03600435116108d05760806004353603918201126108d0576024356001600160401b0381116108df5761038b903690600401611210565b60405160016290108360e01b03198152306004820152336024820152919290916020816044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610a46578591610a63575b5015610a5157602460206001600160a01b0361040b60043560640161128a565b6040516301ffc9a760e01b815263b91f535b60e01b600482015293849290918391165afa908115610a46578591610a17575b5015610a055760ff61045360246004350161129e565b16156109f357600860ff61046b60246004350161129e565b16116109e1576040519033602083015260606040830152602219016004356004013512156109b75760043560043560040135016001600160401b036004820135116103155760048101353603602482011361031557816105466104e5610554936080808501526101008401906024600482013591016112ac565b60ff6104f560246004350161123d565b1660a08401526001600160401b036105116044600435016112cd565b1660c08401526001600160a01b0361052d6004356064016112e1565b1660e0840152828103601f1901606084015285876112ac565b03601f1981018352826111ef565b6020815191012092838152600160205260ff6040822054166109cf576040518060608101106001600160401b036060830111176102c35760608101604052600181528160208201526040516105a8816111d4565b6001600160401b0360043560040135116108df5736602360043560040135600435010112156108df576001600160401b036004803580820135010135116109bb5760405161060a6004803580820135010135601f01601f1916602001826111ef565b60048035808201350190810135808352369101602401116109b7576004803580820135019081013590602401602083013783602060048035810135813501013583010152815261065e60246004350161123d565b60208201526106716044600435016112cd565b60408201526106846064600435016112e1565b606082015260408281019182528684526001602090815290842083518154929094015161ffff1990921693151560ff169390931760089190911b61ff0016178255519081518051906001600160401b0382116109a3576106e76001840154611187565b601f811161095e575b50602090601f83116001146108ee5760029392918691836108e3575b50508160011b916000199060031b1c19161760018201555b019060ff6020820151169082549168ffffffffffffffff00604083015160081b169160606901000000000000000000600160e81b0391015160481b169262ffffff60e81b16171717905561077784611513565b508381528060205260408120936040513060601b60208201523360601b6034820152602881528060608101106001600160401b036060830111176102c357606081016040526020815191012092836002870155825b60ff6107dc60246004350161129e565b168110156108005780856107f861028e60019460038c01611263565b9055016107cc565b50846001600160a01b0361081860043560640161128a565b16610852575b6020837f288a29bca04edb18fcdb2c76d6e3b03b8a137c85c70d1a4cb8aacfa868d6051082604051838152a1604051908152f35b83906001600160a01b0361086a60043560640161128a565b16803b156108df576108a7938360405180968195829463c60e204760e01b84528a60048501523360248501526060604485015260648401916112ac565b03925af180156108d4576108bc575b8061081e565b6108c683916111c1565b6108d057816108b6565b5080fd5b6040513d85823e3d90fd5b8280fd5b01519050388061070c565b906001840186526020862091865b601f1985168110610946575091839160019360029695601f1981161061092d575b505050811b016001820155610724565b015160001960f88460031b161c1916905538808061091d565b919260206001819286850151815501940192016108fc565b60018401865260208620601f840160051c81016020851061099c575b601f830160051c820181106109905750506106f0565b6000815560010161097a565b508061097a565b634e487b7160e01b85526041600452602485fd5b8380fd5b634e487b7160e01b83526041600452602483fd5b604051637830599760e11b8152600490fd5b60405163b3aaf68560e01b8152600490fd5b604051630f922a5760e01b8152600490fd5b6040516376c8e1c760e01b8152600490fd5b610a39915060203d602011610a3f575b610a3181836111ef565b81019061124b565b3861043d565b503d610a27565b6040513d87823e3d90fd5b60405163537f370960e01b8152600490fd5b610a7c915060203d602011610a3f57610a3181836111ef565b386103eb565b5034610100576020806003193601126108d05760043582526001916001825260408120918254926001810160405195610aba876111d4565b604051918591815491610acc83611187565b9283865287600182169182600014610bf5575050600114610bb3575b50505090610afb816002949303826111ef565b86520154938181019460ff811686526001600160401b0360408301818360081c16815260018060a01b039384606082019460481c16845260ff6040519881811615158a5260081c1686890152606060408901525194608060608901528551958660e08a0152875b878110610b9e5750505060ff8798610100989789888a01015251166080870152511660a0850152511660c0830152601f80199101168101030190f35b8181018301518a820161010001528201610b62565b875285872094939250859187915b818310610bde575093945091925090820101610afb826002610ae8565b865485840185015295860195879390920191610bc1565b60ff19168782015293151560051b86019093019350610afb925084915060029050610ae8565b50346101005760209081600319360112610100576004358152600191600181526040822090828152604083209160ff815416610d3b578360ff60028793015416610c7d610c6782611273565b91610c7560405193846111ef565b808352611273565b8185019590601f1901368737600281015490600390810184865b610cd6575b505050506040519380850191818652518092526040850195925b828110610cc35785870386f35b8351875295810195928101928401610cb6565b8495979498969851811015610d2f5783610cf08284611263565b905490851b1c188651821015610d1b57600582901b8701860152959793969395939493860186610c97565b634e487b7160e01b89526032600452602489fd5b97959796949396610c9c565b60405163ce381d3560e01b8152600490fd5b5034610100576020366003190112610100576004356004548110156108d05760209060046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0154604051908152f35b5034610100576020366003190112610100576020906004358152600182526002604060018060a01b039220015460481c16604051908152f35b50346101005760203660031901126101005760ff60406020926004358152600184522054166040519015158152f35b5034610100576020806003193601126108d057600435908183526001808252604084209060ff9160ff8154161561108e576002018054604051630ada2bb960e31b81523060048201526024810187905233604482015290936001600160a01b03939091868160648160488a901c89165afa908115611083578991611066575b5015611038575b929190868852878652604088209388948990600281015460ff8c991691846003809201905b610ff3575b505050898b52505060018752505060408720805461ffff191661ff00600886901b1617905591925090610ee985611429565b50600454600160401b811015610fdf576001810180600455811015610fcb579085879392600485527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01555460481c16803b156108d05781906024604051809481936346ba4a8760e11b83528960048401525af18015610a4657610f96575b50907f32c34fd89f87a7cc9f257c5f4c2ed207f4776f12b94e6aec10d90ce489d6c52891604051908152a280f35b93610fc37f32c34fd89f87a7cc9f257c5f4c2ed207f4776f12b94e6aec10d90ce489d6c5289392956111c1565b939091610f68565b634e487b7160e01b87526032600452602487fd5b634e487b7160e01b87526041600452602487fd5b868b168481101561103257836110098d84611263565b905490851b1c1890868211611027575b505099850186169985610eb2565b9a5094508686611019565b50610eb7565b600885901c6001600160401b0316801561105457421015610e8d575b604051630e01f48b60e11b8152600490fd5b61107d9150873d8911610a3f57610a3181836111ef565b38610e86565b6040513d8b823e3d90fd5b604051632e72894160e11b8152600490fd5b50346101005780600319360112610100576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b9050346108d05760203660031901126108d05760043563ffffffff60e01b81168091036108df57602092506301ffc9a760e01b8114908115611129575b5015158152f35b639664e9b960e01b14905038611122565b6002548110156111715760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190600090565b634e487b7160e01b600052603260045260246000fd5b90600182811c921680156111b7575b60208310146111a157565b634e487b7160e01b600052602260045260246000fd5b91607f1691611196565b6001600160401b0381116102c357604052565b608081019081106001600160401b038211176102c357604052565b90601f801991011681019081106001600160401b038211176102c357604052565b9181601f84011215610319578235916001600160401b038311610319576020838186019501011161031957565b359060ff8216820361031957565b90816020910312610319575180151581036103195790565b6008821015611171570190600090565b6001600160401b0381116102c35760051b60200190565b356001600160a01b03811681036103195790565b3560ff811681036103195790565b908060209392818452848401376000828201840152601f01601f1916010190565b35906001600160401b038216820361031957565b35906001600160a01b038216820361031957565b93929093600094818652600160205260409384872060ff815416156113f85760020154926001600160401b038460081c16806113eb575b50855163525a5ded60e11b815230600482015260248101919091526001600160a01b039283166044820152608060648201529360209385939092849283916113789160848401916112ac565b039260481c165afa9384156113e05780946113a9575b505082156113995750565b516305c1721760e41b8152600490fd5b909193506020823d6020116113d8575b816113c6602093836111ef565b8101031261010057505191388061138e565b3d91506113b9565b8251903d90823e3d90fd5b4210156113f8573861132c565b855163137436d960e01b8152600490fd5b818102929181159184041417156102ad57565b919082018092116102ad57565b600081815260036020526040812054909190801561150e57600019908082018181116114fa57600254908382019182116114e6578082036114b2575b505050600254801561149e5781019061147d8261113a565b909182549160031b1b19169055600255815260036020526040812055600190565b634e487b7160e01b84526031600452602484fd5b6114d06114c161028e9361113a565b90549060031b1c92839261113a565b9055845260036020526040842055388080611465565b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b85526011600452602485fd5b505090565b60008181526003602052604081205461157457600254600160401b81101561156057908261154c61028e8460016040960160025561113a565b905560025492815260036020522055600190565b634e487b7160e01b82526041600452602482fd5b90509056fea26469706673582212208bf15ca60379d1f9df63d16ec0780cf392c8a1817ccceb0ea6880c22e44c30f464736f6c63430008170033",Hae=t=>t.length>1;class yx extends WP{constructor(...e){Hae(e)?super(...e):super(hb,W_,e[0])}getDeployTransaction(e,n){return super.getDeployTransaction(e,n||{})}deploy(e,n){return super.deploy(e,n||{})}connect(e){return super.connect(e)}static createInterface(){return new zP(hb)}static connect(e,n){return new _d(e,hb,n)}}R(yx,"bytecode",W_),R(yx,"abi",hb);const J_=new Uint8Array([]),Gae={isConnected:!1,isVoidSignerConnected:!1,ethProvider:null,sapphireEthProvider:null,account:null,explorerBaseUrl:null,chainName:null,pollManagerVoidSigner:null},Vae=({children:t})=>{const{isEIP1193ProviderAvailable:e,connectWallet:n,switchNetwork:r}=zae(),[i,a]=F.useState({...Gae});F.useEffect(()=>{(async()=>{if(!hC||!k6)return;const N=new nee(hC,void 0,{staticNetwork:!0}),B=await yx.connect(k6,N);a(L=>({...L,pollManagerVoidSigner:B,isVoidSignerConnected:!0}))})()},[]);const o=C=>{a(N=>({...N,isConnected:C}))},s=F.useCallback(C=>{if(C.length<=0){o(!1);return}const[N]=C;a(B=>({...B,account:N}))},[]),l=(C,N=i.sapphireEthProvider)=>{if(!N)throw new Error("[Web3Context] Sapphire provider is required!");if(!jw.has(C)||zw!==C)throw new F5("Unknown network!");const{blockExplorerUrls:B,chainName:L}=jw.get(C),[U]=B;a(j=>({...j,explorerBaseUrl:U,chainName:L}))},c=F.useCallback(()=>{window.location.reload()},[]),u=F.useCallback(()=>o(!0),[]),f=F.useCallback(()=>o(!1),[]),h=(()=>{let C=!1;return N=>{var B,L,U,j;C||((B=N==null?void 0:N.on)==null||B.call(N,"accountsChanged",s),(L=N==null?void 0:N.on)==null||L.call(N,"chainChanged",c),(U=N==null?void 0:N.on)==null||U.call(N,"connect",u),(j=N==null?void 0:N.on)==null||j.call(N,"disconnect",f),C=!0)}})(),d=async(C,N)=>{try{const B=new r$(N),L=nF(B),U=await L.getNetwork();l(U.chainId,L),a(j=>({...j,isConnected:!0,ethProvider:B,sapphireEthProvider:L,account:C}))}catch(B){throw a(L=>({...L,isConnected:!1})),B instanceof F5?B:new Error("[Web3Context] Unable to initialize providers!")}},g=async()=>{const{account:C,sapphireEthProvider:N}=i;if(!C||!N)throw new Error("[Web3Context] Unable to fetch balance!");return await N.getBalance(C)},p=async()=>e(),y=async()=>{const C=await n();if(!C)throw new Error("[Web3Context] Request account failed!");await d(C,window.ethereum),h(window.ethereum)},m=async(C=zw)=>r(C),b=async C=>{if(!C)throw new Error("[txHash] is required!");const{sapphireEthProvider:N}=i;if(!N)throw new Error("[sapphireEthProvider] not initialized!");const B=await N.waitForTransaction(C);if((B==null?void 0:B.status)===0)throw new Error("Transaction failed");return await N.getTransaction(C)},T={state:i,isProviderAvailable:p,connectWallet:y,switchNetwork:m,getBalance:g,getTransaction:b,getPoll:async()=>{const{pollManagerVoidSigner:C}=i;if(!C)throw new Error("[pollManagerWithoutSigner] not initialized!");return await C.PROPOSALS(us(Uv))},canVoteOnPoll:async()=>{const{pollManagerVoidSigner:C,account:N}=i;if(!C)throw new Error("[pollManagerVoidSigner] not initialized!");if(!N)throw new Error("[account] Wallet not connected!");return await C.canVoteOnPoll(Uv,N,J_).then(B=>Promise.resolve(B===1n)).catch(()=>Promise.resolve(!1))},vote:async C=>{const{sapphireEthProvider:N}=i;if(!N)throw new Error("[sapphireEthProvider] not initialized!");const B=TO(await N.getSigner()),U=await yx.connect(k6,B).vote.populateTransaction(Uv,C,J_);U.gasLimit=xK,U.value=0n;const j=await B.sendTransaction(U);return await b(j.hash)},getVoteCounts:async()=>{const{pollManagerVoidSigner:C}=i;if(!C)throw new Error("[pollManagerVoidSigner] not initialized!");return await C.getVoteCounts(Uv)}};return q.jsx(K7.Provider,{value:T,children:t})},Qae="_cardHeaderText_jj4nd_1",Kae="_winningMascot_jj4nd_11",Wae="_winningMascotBadge_jj4nd_15",Jae="_mascotPollData_jj4nd_32",Yae="_cardFooterText_jj4nd_39",Xae="_mascotResultsTable_jj4nd_48",Zae="_answerColName_jj4nd_65",qae="_mascotPollDataPieChart_jj4nd_78",Ql={cardHeaderText:Qae,winningMascot:Kae,winningMascotBadge:Wae,mascotPollData:Jae,cardFooterText:Yae,mascotResultsTable:Xae,answerColName:Zae,mascotPollDataPieChart:qae},eoe=t=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",...t},F.createElement("path",{d:"M232,64H208V56a16,16,0,0,0-16-16H64A16,16,0,0,0,48,56v8H24A16,16,0,0,0,8,80V96a40,40,0,0,0,40,40h3.65A80.13,80.13,0,0,0,120,191.61V216H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16H136V191.58c31.94-3.23,58.44-25.64,68.08-55.58H208a40,40,0,0,0,40-40V80A16,16,0,0,0,232,64ZM48,120A24,24,0,0,1,24,96V80H48v32q0,4,.39,8ZM232,96a24,24,0,0,1-24,24h-.5a81.81,81.81,0,0,0,.5-8.9V80h24Z"})),toe=()=>q.jsx(ag,{size:"small",children:q.jsx(eoe,{})}),noe="_pieChart_1ctih_1",roe="_pieChartCell_1ctih_6",Y_={pieChart:noe,pieChartCell:roe};function lF(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e-1}var nle=tle,rle=hA;function ile(t,e){var n=this.__data__,r=rle(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var ale=ile,ole=zse,sle=Yse,lle=qse,cle=nle,ule=ale;function dg(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e0?1:-1},zu=function(e){return dv(e)&&e.indexOf("%")===e.length-1},je=function(e){return Mce(e)&&!pv(e)},or=function(e){return je(e)||dv(e)},$ce=0,OA=function(e){var n=++$ce;return"".concat(e||"").concat(n)},la=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!je(e)&&!dv(e))return r;var a;if(zu(e)){var o=e.indexOf("%");a=n*parseFloat(e.slice(0,o))/100}else a=+e;return pv(a)&&(a=r),i&&a>n&&(a=n),a},Gh=function(e){if(!e)return null;var n=Object.keys(e);return n&&n.length?e[n[0]]:null},Uce=function(e){if(!Array.isArray(e))return!1;for(var n=e.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Vce(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var cN={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},pl=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},uN=null,yE=null,FO=function t(e){if(e===uN&&Array.isArray(yE))return yE;var n=[];return F.Children.forEach(e,function(r){Yt(r)||(r8.isFragment(r)?n=n.concat(t(r.props.children)):n.push(r))}),yE=n,uN=e,n};function ss(t,e){var n=[],r=[];return Array.isArray(e)?r=e.map(function(i){return pl(i)}):r=[pl(e)],FO(t).forEach(function(i){var a=Po(i,"type.displayName")||Po(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function Ra(t,e){var n=ss(t,e);return n&&n[0]}var fN=function(e){if(!e||!e.props)return!1;var n=e.props,r=n.width,i=n.height;return!(!je(r)||r<=0||!je(i)||i<=0)},Qce=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Kce=function(e){return e&&e.type&&dv(e.type)&&Qce.indexOf(e.type)>=0},Wce=function(e,n,r,i){var a,o=(a=gE==null?void 0:gE[i])!==null&&a!==void 0?a:[];return!Ft(e)&&(i&&o.includes(n)||jce.includes(n))||r&&UO.includes(n)},It=function(e,n,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(F.isValidElement(e)&&(i=e.props),!fg(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;Wce((s=i)===null||s===void 0?void 0:s[o],o,n,r)&&(a[o]=i[o])}),a},s8=function t(e,n){if(e===n)return!0;var r=F.Children.count(e);if(r!==F.Children.count(n))return!1;if(r===0)return!0;if(r===1)return hN(Array.isArray(e)?e[0]:e,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function qce(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function c8(t){var e=t.children,n=t.width,r=t.height,i=t.viewBox,a=t.className,o=t.style,s=t.title,l=t.desc,c=Zce(t,Xce),u=i||{width:n,height:r,x:0,y:0},f=On("recharts-surface",a);return Y.createElement("svg",l8({},It(c,!0,"svg"),{className:f,width:n,height:r,style:o,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),Y.createElement("title",null,s),Y.createElement("desc",null,l),e)}var eue=["children","className"];function u8(){return u8=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function nue(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var Hn=Y.forwardRef(function(t,e){var n=t.children,r=t.className,i=tue(t,eue),a=On("recharts-layer",r);return Y.createElement("g",u8({className:a},It(i,!0),{ref:e}),n)}),gl=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;ai?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++r=r?t:aue(t,e,n)}var sue=oue,lue="\\ud800-\\udfff",cue="\\u0300-\\u036f",uue="\\ufe20-\\ufe2f",fue="\\u20d0-\\u20ff",hue=cue+uue+fue,due="\\ufe0e\\ufe0f",pue="\\u200d",gue=RegExp("["+pue+lue+hue+due+"]");function yue(t){return gue.test(t)}var xF=yue;function mue(t){return t.split("")}var vue=mue,AF="\\ud800-\\udfff",bue="\\u0300-\\u036f",wue="\\ufe20-\\ufe2f",xue="\\u20d0-\\u20ff",Aue=bue+wue+xue,Eue="\\ufe0e\\ufe0f",Sue="["+AF+"]",f8="["+Aue+"]",h8="\\ud83c[\\udffb-\\udfff]",Pue="(?:"+f8+"|"+h8+")",EF="[^"+AF+"]",SF="(?:\\ud83c[\\udde6-\\uddff]){2}",PF="[\\ud800-\\udbff][\\udc00-\\udfff]",Oue="\\u200d",OF=Pue+"?",TF="["+Eue+"]?",Tue="(?:"+Oue+"(?:"+[EF,SF,PF].join("|")+")"+TF+OF+")*",Cue=TF+OF+Tue,kue="(?:"+[EF+f8+"?",f8,SF,PF,Sue].join("|")+")",_ue=RegExp(h8+"(?="+h8+")|"+kue+Cue,"g");function Nue(t){return t.match(_ue)||[]}var Iue=Nue,Rue=vue,Mue=xF,Bue=Iue;function Due(t){return Mue(t)?Bue(t):Rue(t)}var Lue=Due,$ue=sue,Uue=xF,Fue=Lue,jue=gF;function zue(t){return function(e){e=jue(e);var n=Uue(e)?Fue(e):void 0,r=n?n[0]:e.charAt(0),i=n?$ue(n,1).join(""):e.slice(1);return r[t]()+i}}var Hue=zue,Gue=Hue,Vue=Gue("toUpperCase"),Que=Vue;const CA=Xt(Que);function dn(t){return function(){return t}}const CF=Math.cos,vx=Math.sin,No=Math.sqrt,bx=Math.PI,kA=2*bx,d8=Math.PI,p8=2*d8,Su=1e-6,Kue=p8-Su;function kF(t){this._+=t[0];for(let e=1,n=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return kF;const n=10**e;return function(r){this._+=r[0];for(let i=1,a=r.length;iSu)if(!(Math.abs(f*l-c*u)>Su)||!a)this._append`L${this._x1=e},${this._y1=n}`;else{let d=r-o,g=i-s,p=l*l+c*c,y=d*d+g*g,m=Math.sqrt(p),b=Math.sqrt(h),x=a*Math.tan((d8-Math.acos((p+h-y)/(2*m*b)))/2),A=x/b,S=x/m;Math.abs(A-1)>Su&&this._append`L${e+A*u},${n+A*f}`,this._append`A${a},${a},0,0,${+(f*d>u*g)},${this._x1=e+S*l},${this._y1=n+S*c}`}}arc(e,n,r,i,a,o){if(e=+e,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=e+s,u=n+l,f=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Su||Math.abs(this._y1-u)>Su)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%p8+p8),h>Kue?this._append`A${r},${r},0,1,${f},${e-s},${n-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=u}`:h>Su&&this._append`A${r},${r},0,${+(h>=d8)},${f},${this._x1=e+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function jO(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Jue(e)}function zO(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function _F(t){this._context=t}_F.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function _A(t){return new _F(t)}function NF(t){return t[0]}function IF(t){return t[1]}function RF(t,e){var n=dn(!0),r=null,i=_A,a=null,o=jO(s);t=typeof t=="function"?t:t===void 0?NF:dn(t),e=typeof e=="function"?e:e===void 0?IF:dn(e);function s(l){var c,u=(l=zO(l)).length,f,h=!1,d;for(r==null&&(a=i(d=o())),c=0;c<=u;++c)!(c=d;--g)s.point(x[g],A[g]);s.lineEnd(),s.areaEnd()}m&&(x[h]=+t(y,h,f),A[h]=+e(y,h,f),s.point(r?+r(y,h,f):x[h],n?+n(y,h,f):A[h]))}if(b)return s=null,b+""||null}function u(){return RF().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(t=typeof f=="function"?f:dn(+f),r=null,c):t},c.x0=function(f){return arguments.length?(t=typeof f=="function"?f:dn(+f),c):t},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:dn(+f),c):r},c.y=function(f){return arguments.length?(e=typeof f=="function"?f:dn(+f),n=null,c):e},c.y0=function(f){return arguments.length?(e=typeof f=="function"?f:dn(+f),c):e},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:dn(+f),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(r).y(e)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:dn(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),c):a},c}class MF{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}function Yue(t){return new MF(t,!0)}function Xue(t){return new MF(t,!1)}const HO={draw(t,e){const n=No(e/bx);t.moveTo(n,0),t.arc(0,0,n,0,kA)}},Zue={draw(t,e){const n=No(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},BF=No(1/3),que=BF*2,efe={draw(t,e){const n=No(e/que),r=n*BF;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},tfe={draw(t,e){const n=No(e),r=-n/2;t.rect(r,r,n,n)}},nfe=.8908130915292852,DF=vx(bx/10)/vx(7*bx/10),rfe=vx(kA/10)*DF,ife=-CF(kA/10)*DF,afe={draw(t,e){const n=No(e*nfe),r=rfe*n,i=ife*n;t.moveTo(0,-n),t.lineTo(r,i);for(let a=1;a<5;++a){const o=kA*a/5,s=CF(o),l=vx(o);t.lineTo(l*n,-s*n),t.lineTo(s*r-l*i,l*r+s*i)}t.closePath()}},mE=No(3),ofe={draw(t,e){const n=-No(e/(mE*3));t.moveTo(0,n*2),t.lineTo(-mE*n,-n),t.lineTo(mE*n,-n),t.closePath()}},ya=-.5,ma=No(3)/2,g8=1/No(12),sfe=(g8/2+1)*3,lfe={draw(t,e){const n=No(e/sfe),r=n/2,i=n*g8,a=r,o=n*g8+n,s=-a,l=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(ya*r-ma*i,ma*r+ya*i),t.lineTo(ya*a-ma*o,ma*a+ya*o),t.lineTo(ya*s-ma*l,ma*s+ya*l),t.lineTo(ya*r+ma*i,ya*i-ma*r),t.lineTo(ya*a+ma*o,ya*o-ma*a),t.lineTo(ya*s+ma*l,ya*l-ma*s),t.closePath()}};function cfe(t,e){let n=null,r=jO(i);t=typeof t=="function"?t:dn(t||HO),e=typeof e=="function"?e:dn(e===void 0?64:+e);function i(){let a;if(n||(n=a=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(t=typeof a=="function"?a:dn(a),i):t},i.size=function(a){return arguments.length?(e=typeof a=="function"?a:dn(+a),i):e},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function wx(){}function xx(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function LF(t){this._context=t}LF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:xx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:xx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ufe(t){return new LF(t)}function $F(t){this._context=t}$F.prototype={areaStart:wx,areaEnd:wx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:xx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ffe(t){return new $F(t)}function UF(t){this._context=t}UF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:xx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function hfe(t){return new UF(t)}function FF(t){this._context=t}FF.prototype={areaStart:wx,areaEnd:wx,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function dfe(t){return new FF(t)}function pN(t){return t<0?-1:1}function gN(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(pN(a)+pN(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function yN(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function vE(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Ax(t){this._context=t}Ax.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:vE(this,this._t0,yN(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,vE(this,yN(this,n=gN(this,t,e)),n);break;default:vE(this,this._t0,n=gN(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function jF(t){this._context=new zF(t)}(jF.prototype=Object.create(Ax.prototype)).point=function(t,e){Ax.prototype.point.call(this,e,t)};function zF(t){this._context=t}zF.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}};function pfe(t){return new Ax(t)}function gfe(t){return new jF(t)}function HF(t){this._context=t}HF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=mN(t),i=mN(e),a=0,o=1;o=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function mfe(t){return new NA(t,.5)}function vfe(t){return new NA(t,0)}function bfe(t){return new NA(t,1)}function Mp(t,e){if((o=t.length)>1)for(var n=1,r,i,a=t[e[0]],o,s=a.length;n=0;)n[e]=e;return n}function wfe(t,e){return t[e]}function xfe(t){const e=[];return e.key=t,e}function Afe(){var t=dn([]),e=y8,n=Mp,r=wfe;function i(a){var o=Array.from(t.apply(this,arguments),xfe),s,l=o.length,c=-1,u;for(const f of a)for(s=0,++c;s0){for(var n,r,i=0,a=t[0].length,o;i0){for(var n=0,r=t[e[0]],i,a=r.length;n0)||!((a=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,a,o;r=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Nfe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var GF={symbolCircle:HO,symbolCross:Zue,symbolDiamond:efe,symbolSquare:tfe,symbolStar:afe,symbolTriangle:ofe,symbolWye:lfe},Ife=Math.PI/180,Rfe=function(e){var n="symbol".concat(CA(e));return GF[n]||HO},Mfe=function(e,n,r){if(n==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var i=18*Ife;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Bfe=function(e,n){GF["symbol".concat(CA(e))]=n},GO=function(e){var n=e.type,r=n===void 0?"circle":n,i=e.size,a=i===void 0?64:i,o=e.sizeType,s=o===void 0?"area":o,l=_fe(e,Ofe),c=bN(bN({},l),{},{type:r,size:a,sizeType:s}),u=function(){var y=Rfe(r),m=cfe().type(y).size(Mfe(a,s,r));return m()},f=c.className,h=c.cx,d=c.cy,g=It(c,!0);return h===+h&&d===+d&&a===+a?Y.createElement("path",m8({},g,{className:On("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(d,")"),d:u()})):null};GO.registerSymbol=Bfe;function Bp(t){"@babel/helpers - typeof";return Bp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bp(t)}function v8(){return v8=Object.assign?Object.assign.bind():function(t){for(var e=1;e`);var b=d.inactive?c:d.color;return Y.createElement("li",v8({className:y,style:f,key:"legend-item-".concat(g)},TA(r.props,d,g)),Y.createElement(c8,{width:o,height:o,viewBox:u,style:h},r.renderIcon(d)),Y.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},p?p(m,d,g):m))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Y.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}]),e}(F.PureComponent);O1(VO,"displayName","Legend");O1(VO,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Gfe=dA;function Vfe(){this.__data__=new Gfe,this.size=0}var Qfe=Vfe;function Kfe(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var Wfe=Kfe;function Jfe(t){return this.__data__.get(t)}var Yfe=Jfe;function Xfe(t){return this.__data__.has(t)}var Zfe=Xfe,qfe=dA,ehe=NO,the=IO,nhe=200;function rhe(t,e){var n=this.__data__;if(n instanceof qfe){var r=n.__data__;if(!ehe||r.lengths))return!1;var c=a.get(t),u=a.get(e);if(c&&u)return c==e&&u==t;var f=-1,h=!0,d=n&Phe?new xhe:void 0;for(a.set(t,e),a.set(e,t);++f-1&&t%1==0&&t-1&&t%1==0&&t<=kde}var JO=_de,Nde=Ml,Ide=JO,Rde=Bl,Mde="[object Arguments]",Bde="[object Array]",Dde="[object Boolean]",Lde="[object Date]",$de="[object Error]",Ude="[object Function]",Fde="[object Map]",jde="[object Number]",zde="[object Object]",Hde="[object RegExp]",Gde="[object Set]",Vde="[object String]",Qde="[object WeakMap]",Kde="[object ArrayBuffer]",Wde="[object DataView]",Jde="[object Float32Array]",Yde="[object Float64Array]",Xde="[object Int8Array]",Zde="[object Int16Array]",qde="[object Int32Array]",e0e="[object Uint8Array]",t0e="[object Uint8ClampedArray]",n0e="[object Uint16Array]",r0e="[object Uint32Array]",vn={};vn[Jde]=vn[Yde]=vn[Xde]=vn[Zde]=vn[qde]=vn[e0e]=vn[t0e]=vn[n0e]=vn[r0e]=!0;vn[Mde]=vn[Bde]=vn[Kde]=vn[Dde]=vn[Wde]=vn[Lde]=vn[$de]=vn[Ude]=vn[Fde]=vn[jde]=vn[zde]=vn[Hde]=vn[Gde]=vn[Vde]=vn[Qde]=!1;function i0e(t){return Rde(t)&&Ide(t.length)&&!!vn[Nde(t)]}var a0e=i0e;function o0e(t){return function(e){return t(e)}}var tj=o0e,Ox={exports:{}};Ox.exports;(function(t,e){var n=cF,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s})(Ox,Ox.exports);var s0e=Ox.exports,l0e=a0e,c0e=tj,TN=s0e,CN=TN&&TN.isTypedArray,u0e=CN?c0e(CN):l0e,nj=u0e,f0e=pde,h0e=KO,d0e=Fi,p0e=ej,g0e=WO,y0e=nj,m0e=Object.prototype,v0e=m0e.hasOwnProperty;function b0e(t,e){var n=d0e(t),r=!n&&h0e(t),i=!n&&!r&&p0e(t),a=!n&&!r&&!i&&y0e(t),o=n||r||i||a,s=o?f0e(t.length,String):[],l=s.length;for(var c in t)(e||v0e.call(t,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||g0e(c,l)))&&s.push(c);return s}var w0e=b0e,x0e=Object.prototype;function A0e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||x0e;return t===n}var E0e=A0e;function S0e(t,e){return function(n){return t(e(n))}}var rj=S0e,P0e=rj,O0e=P0e(Object.keys,Object),T0e=O0e,C0e=E0e,k0e=T0e,_0e=Object.prototype,N0e=_0e.hasOwnProperty;function I0e(t){if(!C0e(t))return k0e(t);var e=[];for(var n in Object(t))N0e.call(t,n)&&n!="constructor"&&e.push(n);return e}var R0e=I0e,M0e=kO,B0e=JO;function D0e(t){return t!=null&&B0e(t.length)&&!M0e(t)}var IA=D0e,L0e=w0e,$0e=R0e,U0e=IA;function F0e(t){return U0e(t)?L0e(t):$0e(t)}var YO=F0e,j0e=nde,z0e=hde,H0e=YO;function G0e(t){return j0e(t,H0e,z0e)}var V0e=G0e,kN=V0e,Q0e=1,K0e=Object.prototype,W0e=K0e.hasOwnProperty;function J0e(t,e,n,r,i,a){var o=n&Q0e,s=kN(t),l=s.length,c=kN(e),u=c.length;if(l!=u&&!o)return!1;for(var f=l;f--;){var h=s[f];if(!(o?h in e:W0e.call(e,h)))return!1}var d=a.get(t),g=a.get(e);if(d&&g)return d==e&&g==t;var p=!0;a.set(t,e),a.set(e,t);for(var y=o;++f-1}var Wge=Kge;function Jge(t,e,n){for(var r=-1,i=t==null?0:t.length;++r=uye){var c=e?null:lye(t);if(c)return cye(c);o=!1,i=sye,l=new iye}else l=e?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Pye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function Oye(t){return t.value}function Tye(t,e){if(Y.isValidElement(t))return Y.cloneElement(t,e);if(typeof t=="function")return Y.createElement(t,e);e.ref;var n=Sye(e,mye);return Y.createElement(VO,n)}var VN=1,T1=function(t){Aye(e,t);function e(){var n;vye(this,e);for(var r=arguments.length,i=new Array(r),a=0;aVN||Math.abs(i.height-this.lastBoundingBox.height)>VN)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i))}else(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?mu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,c=i.chartWidth,u=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var d=this.getBBoxSnapshot();f={left:((c||0)-d.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();h={top:((u||0)-g.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return mu(mu({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,u=i.payload,f=mu(mu({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return Y.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(d){r.wrapperNode=d}},Tye(a,mu(mu({},this.props),{},{payload:cj(u,c,Oye)})))}}],[{key:"getWithHeight",value:function(r,i){var a=r.props.layout;return a==="vertical"&&je(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}]),e}(F.PureComponent);RA(T1,"displayName","Legend");RA(T1,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var QN=hv,Cye=KO,kye=Fi,KN=QN?QN.isConcatSpreadable:void 0;function _ye(t){return kye(t)||Cye(t)||!!(KN&&t&&t[KN])}var Nye=_ye,Iye=ZF,Rye=Nye;function dj(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=Rye),i||(i=[]);++a0&&n(s)?e>1?dj(s,e-1,n,r,i):Iye(i,s):r||(i[i.length]=s)}return i}var pj=dj;function Mye(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var l=o[t?s:++i];if(n(a[l],l,a)===!1)break}return e}}var Bye=Mye,Dye=Bye,Lye=Dye(),$ye=Lye,Uye=$ye,Fye=YO;function jye(t,e){return t&&Uye(t,e,Fye)}var gj=jye,zye=IA;function Hye(t,e){return function(n,r){if(n==null)return n;if(!zye(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++ae||a&&o&&l&&!s&&!c||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&t=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return t.index-e.index}var r1e=n1e,AE=MO,i1e=BO,a1e=cu,o1e=yj,s1e=Zye,l1e=tj,c1e=r1e,u1e=mg,f1e=Fi;function h1e(t,e,n){e.length?e=AE(e,function(a){return f1e(a)?function(o){return i1e(o,a.length===1?a[0]:a)}:a}):e=[u1e];var r=-1;e=AE(e,l1e(a1e));var i=o1e(t,function(a,o,s){var l=AE(e,function(c){return c(a)});return{criteria:l,index:++r,value:a}});return s1e(i,function(a,o){return c1e(a,o,n)})}var d1e=h1e;function p1e(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var g1e=p1e,y1e=g1e,JN=Math.max;function m1e(t,e,n){return e=JN(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=JN(r.length-e,0),o=Array(a);++i0){if(++e>=T1e)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var N1e=_1e,I1e=O1e,R1e=N1e,M1e=R1e(I1e),B1e=M1e,D1e=mg,L1e=v1e,$1e=B1e;function U1e(t,e){return $1e(L1e(t,e,D1e),t+"")}var F1e=U1e,j1e=_O,z1e=IA,H1e=WO,G1e=lu;function V1e(t,e,n){if(!G1e(n))return!1;var r=typeof e;return(r=="number"?z1e(n)&&H1e(e,n.length):r=="string"&&e in n)?j1e(n[e],t):!1}var MA=V1e,Q1e=pj,K1e=d1e,W1e=F1e,XN=MA,J1e=W1e(function(t,e){if(t==null)return[];var n=e.length;return n>1&&XN(t,e[0],e[1])?e=[]:n>2&&XN(e[0],e[1],e[2])&&(e=[e[0]]),K1e(t,Q1e(e,1),[])}),Y1e=J1e;const qO=Xt(Y1e);function C1(t){"@babel/helpers - typeof";return C1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C1(t)}function O8(){return O8=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=e.x),"".concat(Ug,"-left"),je(n)&&e&&je(e.x)&&n=e.y),"".concat(Ug,"-top"),je(r)&&e&&je(e.y)&&rp?Math.max(u,l[r]):Math.max(f,l[r])}function fme(t){var e=t.translateX,n=t.translateY,r=t.useTranslate3d;return{transform:r?"translate3d(".concat(e,"px, ").concat(n,"px, 0)"):"translate(".concat(e,"px, ").concat(n,"px)")}}function hme(t){var e=t.allowEscapeViewBox,n=t.coordinate,r=t.offsetTopLeft,i=t.position,a=t.reverseDirection,o=t.tooltipBox,s=t.useTranslate3d,l=t.viewBox,c,u,f;return o.height>0&&o.width>0&&n?(u=eI({allowEscapeViewBox:e,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=eI({allowEscapeViewBox:e,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=fme({translateX:u,translateY:f,useTranslate3d:s})):c=cme,{cssProperties:c,cssClasses:ume({translateX:u,translateY:f,coordinate:n})}}function Lp(t){"@babel/helpers - typeof";return Lp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lp(t)}function tI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function nI(t){for(var e=1;eiI||Math.abs(r.height-this.lastBoundingBox.height)>iI)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height)}else(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1)}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,c=i.children,u=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,d=i.offset,g=i.position,p=i.reverseDirection,y=i.useTranslate3d,m=i.viewBox,b=i.wrapperStyle,x=hme({allowEscapeViewBox:o,coordinate:u,offsetTopLeft:d,position:g,reverseDirection:p,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:y,viewBox:m}),A=x.cssClasses,S=x.cssProperties,E=nI(nI({transition:h&&a?"transform ".concat(s,"ms ").concat(l):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return Y.createElement("div",{tabIndex:-1,className:A,style:E,ref:function(C){r.wrapperNode=C}},c)}}]),e}(F.PureComponent),wme=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Hf={isSsr:wme(),get:function(e){return Hf[e]},set:function(e,n){if(typeof e=="string")Hf[e]=n;else{var r=Object.keys(e);r&&r.length&&r.forEach(function(i){Hf[i]=e[i]})}}};function $p(t){"@babel/helpers - typeof";return $p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$p(t)}function aI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function oI(t){for(var e=1;e0;return Y.createElement(bme,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:u,hasPayload:E,offset:d,position:y,reverseDirection:m,useTranslate3d:b,viewBox:x,wrapperStyle:A},kme(c,oI(oI({},this.props),{},{payload:S})))}}]),e}(F.PureComponent);e4(Es,"displayName","Tooltip");e4(Es,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Hf.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var _me=ys,Nme=function(){return _me.Date.now()},Ime=Nme,Rme=/\s/;function Mme(t){for(var e=t.length;e--&&Rme.test(t.charAt(e)););return e}var Bme=Mme,Dme=Bme,Lme=/^\s+/;function $me(t){return t&&t.slice(0,Dme(t)+1).replace(Lme,"")}var Ume=$me,Fme=Ume,lI=lu,jme=ug,cI=NaN,zme=/^[-+]0x[0-9a-f]+$/i,Hme=/^0b[01]+$/i,Gme=/^0o[0-7]+$/i,Vme=parseInt;function Qme(t){if(typeof t=="number")return t;if(jme(t))return cI;if(lI(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=lI(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Fme(t);var n=Hme.test(t);return n||Gme.test(t)?Vme(t.slice(2),n?2:8):zme.test(t)?cI:+t}var Aj=Qme,Kme=lu,SE=Ime,uI=Aj,Wme="Expected a function",Jme=Math.max,Yme=Math.min;function Xme(t,e,n){var r,i,a,o,s,l,c=0,u=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(Wme);e=uI(e)||0,Kme(n)&&(u=!!n.leading,f="maxWait"in n,a=f?Jme(uI(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h);function d(E){var T=r,C=i;return r=i=void 0,c=E,o=t.apply(C,T),o}function g(E){return c=E,s=setTimeout(m,e),u?d(E):o}function p(E){var T=E-l,C=E-c,N=e-T;return f?Yme(N,a-C):N}function y(E){var T=E-l,C=E-c;return l===void 0||T>=e||T<0||f&&C>=a}function m(){var E=SE();if(y(E))return b(E);s=setTimeout(m,p(E))}function b(E){return s=void 0,h&&r?d(E):(r=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function A(){return s===void 0?o:b(SE())}function S(){var E=SE(),T=y(E);if(r=arguments,i=this,l=E,T){if(s===void 0)return g(l);if(f)return clearTimeout(s),s=setTimeout(m,e),d(l)}return s===void 0&&(s=setTimeout(m,e)),o}return S.cancel=x,S.flush=A,S}var Zme=Xme,qme=Zme,eve=lu,tve="Expected a function";function nve(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(tve);return eve(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),qme(t,e,{leading:r,maxWait:e,trailing:i})}var rve=nve;const Ej=Xt(rve);function _1(t){"@babel/helpers - typeof";return _1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_1(t)}function fI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function yb(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&(j=Ej(j,p,{trailing:!0,leading:!1}));var X=new ResizeObserver(j),G=S.current.getBoundingClientRect(),H=G.width,re=G.height;return L(H,re),X.observe(S.current),function(){X.disconnect()}},[L,p]);var U=F.useMemo(function(){var j=N.containerWidth,X=N.containerHeight;if(j<0||X<0)return null;gl(zu(o)||zu(l),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,l),gl(!n||n>0,"The aspect(%s) must be greater than zero.",n);var G=zu(o)?j:o,H=zu(l)?X:l;n&&n>0&&(G?H=G/n:H&&(G=H*n),h&&H>h&&(H=h)),gl(G>0||H>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,G,H,o,l,u,f,n);var re=!Array.isArray(d)&&r8.isElement(d)&&pl(d.type).endsWith("Chart");return Y.Children.map(d,function(V){return r8.isElement(V)?F.cloneElement(V,yb({width:G,height:H},re?{style:yb({height:"100%",width:"100%",maxHeight:H,maxWidth:G},V.props.style)}:{})):V})},[n,d,l,h,f,u,N,o]);return Y.createElement("div",{id:y?"".concat(y):void 0,className:On("recharts-responsive-container",m),style:yb(yb({},A),{},{width:o,height:l,minWidth:u,minHeight:f,maxHeight:h}),ref:S},U)}),t4=function(e){return null};t4.displayName="Cell";function N1(t){"@babel/helpers - typeof";return N1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N1(t)}function dI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function k8(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||Hf.isSsr)return{width:0,height:0};var r=vve(n),i=JSON.stringify({text:e,copyStyle:r});if(Ih.widthCache[i])return Ih.widthCache[i];try{var a=document.getElementById(pI);a||(a=document.createElement("span"),a.setAttribute("id",pI),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=k8(k8({},mve),r);Object.assign(a.style,o),a.textContent="".concat(e);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return Ih.widthCache[i]=l,++Ih.cacheCount>yve&&(Ih.cacheCount=0,Ih.widthCache={}),l}catch{return{width:0,height:0}}},bve=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function I1(t){"@babel/helpers - typeof";return I1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I1(t)}function _x(t,e){return Eve(t)||Ave(t,e)||xve(t,e)||wve()}function wve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xve(t,e){if(t){if(typeof t=="string")return yI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yI(t,e)}}function yI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Lve(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function AI(t,e){return jve(t)||Fve(t,e)||Uve(t,e)||$ve()}function $ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uve(t,e){if(t){if(typeof t=="string")return EI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EI(t,e)}}function EI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function(H,re){var V=re.word,ee=re.width,pe=H[H.length-1];if(pe&&(i==null||a||pe.width+ee+rre.width?H:re})};if(!u)return d;for(var p="…",y=function(G){var H=f.slice(0,G),re=Tj({breakAll:c,style:l,children:H+p}).wordsWithComputedWidth,V=h(re),ee=V.length>o||g(V).width>Number(i);return[ee,V]},m=0,b=f.length-1,x=0,A;m<=b&&x<=f.length-1;){var S=Math.floor((m+b)/2),E=S-1,T=y(E),C=AI(T,2),N=C[0],B=C[1],L=y(S),U=AI(L,1),j=U[0];if(!N&&!j&&(m=S+1),N&&j&&(b=S-1),!N&&j){A=B;break}x++}return A||d},SI=function(e){var n=Yt(e)?[]:e.toString().split(Oj);return[{words:n}]},Hve=function(e){var n=e.width,r=e.scaleToFit,i=e.children,a=e.style,o=e.breakAll,s=e.maxLines;if((n||r)&&!Hf.isSsr){var l,c,u=Tj({breakAll:o,children:i,style:a});if(u){var f=u.wordsWithComputedWidth,h=u.spaceWidth;l=f,c=h}else return SI(i);return zve({breakAll:o,children:i,maxLines:s,style:a},l,c,n,r)}return SI(i)},PI="#808080",Up=function(e){var n=e.x,r=n===void 0?0:n,i=e.y,a=i===void 0?0:i,o=e.lineHeight,s=o===void 0?"1em":o,l=e.capHeight,c=l===void 0?"0.71em":l,u=e.scaleToFit,f=u===void 0?!1:u,h=e.textAnchor,d=h===void 0?"start":h,g=e.verticalAnchor,p=g===void 0?"end":g,y=e.fill,m=y===void 0?PI:y,b=xI(e,Bve),x=F.useMemo(function(){return Hve({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),A=b.dx,S=b.dy,E=b.angle,T=b.className,C=b.breakAll,N=xI(b,Dve);if(!or(r)||!or(a))return null;var B=r+(je(A)?A:0),L=a+(je(S)?S:0),U;switch(p){case"start":U=PE("calc(".concat(c,")"));break;case"middle":U=PE("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:U=PE("calc(".concat(x.length-1," * -").concat(s,")"));break}var j=[];if(f){var X=x[0].width,G=b.width;j.push("scale(".concat((je(G)?G/X:1)/X,")"))}return E&&j.push("rotate(".concat(E,", ").concat(B,", ").concat(L,")")),j.length&&(N.transform=j.join(" ")),Y.createElement("text",_8({},It(N,!0),{x:B,y:L,className:On("recharts-text",T),textAnchor:d,fill:m.includes("url")?PI:m}),x.map(function(H,re){var V=H.words.join(C?"":" ");return Y.createElement("tspan",{x:B,dy:re===0?U:s,key:V},V)}))};function Yc(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function Gve(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function n4(t){let e,n,r;t.length!==2?(e=Yc,n=(s,l)=>Yc(t(s),l),r=(s,l)=>t(s)-l):(e=t===Yc||t===Gve?t:Vve,n=t,r=t);function i(s,l,c=0,u=s.length){if(c>>1;n(s[f],l)<0?c=f+1:u=f}while(c>>1;n(s[f],l)<=0?c=f+1:u=f}while(cc&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function Vve(){return 0}function Cj(t){return t===null?NaN:+t}function*Qve(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const Kve=n4(Yc),gv=Kve.right;n4(Cj).center;class OI extends Map{constructor(e,n=Yve){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(TI(this,e))}has(e){return super.has(TI(this,e))}set(e,n){return super.set(Wve(this,e),n)}delete(e){return super.delete(Jve(this,e))}}function TI({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Wve({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Jve({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Yve(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Xve(t=Yc){if(t===Yc)return kj;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function kj(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(te?1:0)}const Zve=Math.sqrt(50),qve=Math.sqrt(10),ebe=Math.sqrt(2);function Nx(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=Zve?10:a>=qve?5:a>=ebe?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(t*c),l=Math.round(e*c),s/ce&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(t/c),l=Math.round(e/c),s*ce&&--l),l0))return[];if(t===e)return[t];const r=e=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let c=0;c=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function kI(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function _j(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?kj:Xve(i);r>n;){if(r-n>600){const l=r-n+1,c=e-n+1,u=Math.log(l),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),d=Math.max(n,Math.floor(e-c*f/l+h)),g=Math.min(r,Math.floor(e+(l-c)*f/l+h));_j(t,e,d,g,i)}const a=t[e];let o=n,s=r;for(Fg(t,n,e),i(t[r],a)>0&&Fg(t,n,r);o0;)--s}i(t[n],a)===0?Fg(t,n,s):(++s,Fg(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Fg(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function tbe(t,e,n){if(t=Float64Array.from(Qve(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return kI(t);if(e>=1)return CI(t);var r,i=(r-1)*e,a=Math.floor(i),o=CI(_j(t,a).subarray(0,a+1)),s=kI(t.subarray(a+1));return o+(s-o)*(i-a)}}function nbe(t,e,n=Cj){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t),s=+n(t[a+1],a+1,t);return o+(s-o)*(i-a)}}function rbe(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,a=new Array(i);++r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?vb(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?vb(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=abe.exec(t))?new Ii(e[1],e[2],e[3],1):(e=obe.exec(t))?new Ii(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=sbe.exec(t))?vb(e[1],e[2],e[3],e[4]):(e=lbe.exec(t))?vb(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=cbe.exec(t))?DI(e[1],e[2]/100,e[3]/100,1):(e=ube.exec(t))?DI(e[1],e[2]/100,e[3]/100,e[4]):_I.hasOwnProperty(t)?RI(_I[t]):t==="transparent"?new Ii(NaN,NaN,NaN,0):null}function RI(t){return new Ii(t>>16&255,t>>8&255,t&255,1)}function vb(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ii(t,e,n,r)}function dbe(t){return t instanceof yv||(t=D1(t)),t?(t=t.rgb(),new Ii(t.r,t.g,t.b,t.opacity)):new Ii}function B8(t,e,n,r){return arguments.length===1?dbe(t):new Ii(t,e,n,r??1)}function Ii(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}i4(Ii,B8,Ij(yv,{brighter(t){return t=t==null?Ix:Math.pow(Ix,t),new Ii(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?M1:Math.pow(M1,t),new Ii(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ii(Gf(this.r),Gf(this.g),Gf(this.b),Rx(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:MI,formatHex:MI,formatHex8:pbe,formatRgb:BI,toString:BI}));function MI(){return`#${Hu(this.r)}${Hu(this.g)}${Hu(this.b)}`}function pbe(){return`#${Hu(this.r)}${Hu(this.g)}${Hu(this.b)}${Hu((isNaN(this.opacity)?1:this.opacity)*255)}`}function BI(){const t=Rx(this.opacity);return`${t===1?"rgb(":"rgba("}${Gf(this.r)}, ${Gf(this.g)}, ${Gf(this.b)}${t===1?")":`, ${t})`}`}function Rx(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gf(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Hu(t){return t=Gf(t),(t<16?"0":"")+t.toString(16)}function DI(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xo(t,e,n,r)}function Rj(t){if(t instanceof xo)return new xo(t.h,t.s,t.l,t.opacity);if(t instanceof yv||(t=D1(t)),!t)return new xo;if(t instanceof xo)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(e===a?o=(n-r)/s+(n0&&l<1?0:o,new xo(o,s,l,t.opacity)}function gbe(t,e,n,r){return arguments.length===1?Rj(t):new xo(t,e,n,r??1)}function xo(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}i4(xo,gbe,Ij(yv,{brighter(t){return t=t==null?Ix:Math.pow(Ix,t),new xo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?M1:Math.pow(M1,t),new xo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ii(OE(t>=240?t-240:t+120,i,r),OE(t,i,r),OE(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new xo(LI(this.h),bb(this.s),bb(this.l),Rx(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Rx(this.opacity);return`${t===1?"hsl(":"hsla("}${LI(this.h)}, ${bb(this.s)*100}%, ${bb(this.l)*100}%${t===1?")":`, ${t})`}`}}));function LI(t){return t=(t||0)%360,t<0?t+360:t}function bb(t){return Math.max(0,Math.min(1,t||0))}function OE(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const a4=t=>()=>t;function ybe(t,e){return function(n){return t+n*e}}function mbe(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function vbe(t){return(t=+t)==1?Mj:function(e,n){return n-e?mbe(e,n,t):a4(isNaN(e)?n:e)}}function Mj(t,e){var n=e-t;return n?ybe(t,n):a4(isNaN(t)?e:t)}const $I=function t(e){var n=vbe(e);function r(i,a){var o=n((i=B8(i)).r,(a=B8(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),c=Mj(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=t,r}(1);function bbe(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(a){for(i=0;in&&(a=e.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Mx(r,i)})),n=TE.lastIndex;return ne&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function _be(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i2?Nbe:_be,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?a:(l||(l=s(t.map(r),e,n)))(r(o(h)))}return f.invert=function(h){return o(i((c||(c=s(e,t.map(r),Mx)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Bx),u()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),u()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=o4,u()},f.clamp=function(h){return arguments.length?(o=h?!0:di,u()):o!==di},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,d){return r=h,i=d,u()}}function s4(){return BA()(di,di)}function Ibe(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Dx(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Fp(t){return t=Dx(Math.abs(t)),t?t[1]:NaN}function Rbe(t,e){return function(n,r){for(var i=n.length,a=[],o=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function Mbe(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Bbe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function L1(t){if(!(e=Bbe.exec(t)))throw new Error("invalid format: "+t);var e;return new l4({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}L1.prototype=l4.prototype;function l4(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}l4.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Dbe(t){e:for(var e=t.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Bj;function Lbe(t,e){var n=Dx(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Bj=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Dx(t,Math.max(0,e+a-1))[0]}function FI(t,e){var n=Dx(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const jI={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Ibe,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>FI(t*100,e),r:FI,s:Lbe,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function zI(t){return t}var HI=Array.prototype.map,GI=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $be(t){var e=t.grouping===void 0||t.thousands===void 0?zI:Rbe(HI.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?zI:Mbe(HI.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(f){f=L1(f);var h=f.fill,d=f.align,g=f.sign,p=f.symbol,y=f.zero,m=f.width,b=f.comma,x=f.precision,A=f.trim,S=f.type;S==="n"?(b=!0,S="g"):jI[S]||(x===void 0&&(x=12),A=!0,S="g"),(y||h==="0"&&d==="=")&&(y=!0,h="0",d="=");var E=p==="$"?n:p==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",T=p==="$"?r:/[%p]/.test(S)?o:"",C=jI[S],N=/[defgprs%]/.test(S);x=x===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function B(L){var U=E,j=T,X,G,H;if(S==="c")j=C(L)+j,L="";else{L=+L;var re=L<0||1/L<0;if(L=isNaN(L)?l:C(Math.abs(L),x),A&&(L=Dbe(L)),re&&+L==0&&g!=="+"&&(re=!1),U=(re?g==="("?g:s:g==="-"||g==="("?"":g)+U,j=(S==="s"?GI[8+Bj/3]:"")+j+(re&&g==="("?")":""),N){for(X=-1,G=L.length;++XH||H>57){j=(H===46?i+L.slice(X+1):L.slice(X))+j,L=L.slice(0,X);break}}}b&&!y&&(L=e(L,1/0));var V=U.length+L.length+j.length,ee=V>1)+U+L+j+ee.slice(V);break;default:L=ee+U+L+j;break}return a(L)}return B.toString=function(){return f+""},B}function u(f,h){var d=c((f=L1(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Fp(h)/3)))*3,p=Math.pow(10,-g),y=GI[8+g/3];return function(m){return d(p*m)+y}}return{format:c,formatPrefix:u}}var wb,c4,Dj;Ube({thousands:",",grouping:[3],currency:["$",""]});function Ube(t){return wb=$be(t),c4=wb.format,Dj=wb.formatPrefix,wb}function Fbe(t){return Math.max(0,-Fp(Math.abs(t)))}function jbe(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Fp(e)/3)))*3-Fp(Math.abs(t)))}function zbe(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Fp(e)-Fp(t))+1}function Lj(t,e,n,r){var i=R8(t,e,n),a;switch(r=L1(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(a=jbe(i,o))&&(r.precision=a),Dj(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=zbe(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Fbe(i))&&(r.precision=a-(r.type==="%")*2);break}}return c4(r)}function uu(t){var e=t.domain;return t.ticks=function(n){var r=e();return N8(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Lj(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,a=r.length-1,o=r[i],s=r[a],l,c,u=10;for(s0;){if(c=I8(o,s,n),c===l)return r[i]=o,r[a]=s,e(r);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return t},t}function Lx(){var t=s4();return t.copy=function(){return mv(t,Lx())},Ka.apply(t,arguments),uu(t)}function $j(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Bx),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return $j(t).unknown(e)},t=arguments.length?Array.from(t,Bx):[0,1],uu(n)}function Uj(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],a=t[r],o;return aMath.pow(t,e)}function Kbe(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function KI(t){return(e,n)=>-t(-e,n)}function u4(t){const e=t(VI,QI),n=e.domain;let r=10,i,a;function o(){return i=Kbe(r),a=Qbe(r),n()[0]<0?(i=KI(i),a=KI(a),t(Hbe,Gbe)):t(VI,QI),e}return e.base=function(s){return arguments.length?(r=+s,o()):r},e.domain=function(s){return arguments.length?(n(s),o()):n()},e.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const f=u0){for(;h<=d;++h)for(g=1;gu)break;m.push(p)}}else for(;h<=d;++h)for(g=r-1;g>=1;--g)if(p=h>0?g/a(-h):g*a(h),!(pu)break;m.push(p)}m.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=L1(l)).precision==null&&(l.trim=!0),l=c4(l)),s===1/0)return l;const c=Math.max(1,r*s/e.ticks().length);return u=>{let f=u/a(Math.round(i(u)));return f*rn(Uj(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),e}function Fj(){const t=u4(BA()).domain([1,10]);return t.copy=()=>mv(t,Fj()).base(t.base()),Ka.apply(t,arguments),t}function WI(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function JI(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function f4(t){var e=1,n=t(WI(e),JI(e));return n.constant=function(r){return arguments.length?t(WI(e=+r),JI(e)):e},uu(n)}function jj(){var t=f4(BA());return t.copy=function(){return mv(t,jj()).constant(t.constant())},Ka.apply(t,arguments)}function YI(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Wbe(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Jbe(t){return t<0?-t*t:t*t}function h4(t){var e=t(di,di),n=1;function r(){return n===1?t(di,di):n===.5?t(Wbe,Jbe):t(YI(n),YI(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},uu(e)}function d4(){var t=h4(BA());return t.copy=function(){return mv(t,d4()).exponent(t.exponent())},Ka.apply(t,arguments),t}function Ybe(){return d4.apply(null,arguments).exponent(.5)}function XI(t){return Math.sign(t)*t*t}function Xbe(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function zj(){var t=s4(),e=[0,1],n=!1,r;function i(a){var o=Xbe(t(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return t.invert(XI(a))},i.domain=function(a){return arguments.length?(t.domain(a),i):t.domain()},i.range=function(a){return arguments.length?(t.range((e=Array.from(a,Bx)).map(XI)),i):e.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(t.clamp(a),i):t.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return zj(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},Ka.apply(i,arguments),uu(i)}function Hj(){var t=[],e=[],n=[],r;function i(){var o=0,s=Math.max(1,e.length);for(n=new Array(s-1);++o0?n[s-1]:t[0],s=n?[r[n-1],e]:[r[c-1],r[c]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Gj().domain([t,e]).range(i).unknown(a)},Ka.apply(uu(o),arguments)}function Vj(){var t=[.5],e=[0,1],n,r=1;function i(a){return a!=null&&a<=a?e[gv(t,a,0,r)]:n}return i.domain=function(a){return arguments.length?(t=Array.from(a),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(a){return arguments.length?(e=Array.from(a),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(a){var o=e.indexOf(a);return[t[o-1],t[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Vj().domain(t).range(e).unknown(n)},Ka.apply(i,arguments)}const CE=new Date,kE=new Date;function lr(t,e,n,r){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(e(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let c;do l.push(c=new Date(+a)),e(a,s),t(a);while(clr(o=>{if(o>=o)for(;t(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;e(o,-1),!a(o););else for(;--s>=0;)for(;e(o,1),!a(o););}),n&&(i.count=(a,o)=>(CE.setTime(+a),kE.setTime(+o),t(CE),t(kE),Math.floor(n(CE,kE))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const $x=lr(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);$x.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?lr(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):$x);$x.range;const sl=1e3,Fa=sl*60,ll=Fa*60,Ol=ll*24,p4=Ol*7,ZI=Ol*30,_E=Ol*365,Gu=lr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*sl)},(t,e)=>(e-t)/sl,t=>t.getUTCSeconds());Gu.range;const g4=lr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*sl)},(t,e)=>{t.setTime(+t+e*Fa)},(t,e)=>(e-t)/Fa,t=>t.getMinutes());g4.range;const y4=lr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Fa)},(t,e)=>(e-t)/Fa,t=>t.getUTCMinutes());y4.range;const m4=lr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*sl-t.getMinutes()*Fa)},(t,e)=>{t.setTime(+t+e*ll)},(t,e)=>(e-t)/ll,t=>t.getHours());m4.range;const v4=lr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ll)},(t,e)=>(e-t)/ll,t=>t.getUTCHours());v4.range;const vv=lr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Fa)/Ol,t=>t.getDate()-1);vv.range;const DA=lr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Ol,t=>t.getUTCDate()-1);DA.range;const Qj=lr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Ol,t=>Math.floor(t/Ol));Qj.range;function Ah(t){return lr(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Fa)/p4)}const LA=Ah(0),Ux=Ah(1),Zbe=Ah(2),qbe=Ah(3),jp=Ah(4),ewe=Ah(5),twe=Ah(6);LA.range;Ux.range;Zbe.range;qbe.range;jp.range;ewe.range;twe.range;function Eh(t){return lr(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/p4)}const $A=Eh(0),Fx=Eh(1),nwe=Eh(2),rwe=Eh(3),zp=Eh(4),iwe=Eh(5),awe=Eh(6);$A.range;Fx.range;nwe.range;rwe.range;zp.range;iwe.range;awe.range;const b4=lr(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());b4.range;const w4=lr(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());w4.range;const Tl=lr(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Tl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:lr(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});Tl.range;const Cl=lr(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Cl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:lr(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});Cl.range;function Kj(t,e,n,r,i,a){const o=[[Gu,1,sl],[Gu,5,5*sl],[Gu,15,15*sl],[Gu,30,30*sl],[a,1,Fa],[a,5,5*Fa],[a,15,15*Fa],[a,30,30*Fa],[i,1,ll],[i,3,3*ll],[i,6,6*ll],[i,12,12*ll],[r,1,Ol],[r,2,2*Ol],[n,1,p4],[e,1,ZI],[e,3,3*ZI],[t,1,_E]];function s(c,u,f){const h=uy).right(o,h);if(d===o.length)return t.every(R8(c/_E,u/_E,f));if(d===0)return $x.every(Math.max(R8(c,u,f),1));const[g,p]=o[h/o[d-1][2]53)return null;"w"in te||(te.w=1),"Z"in te?(Se=IE(jg(te.y,0,1)),ze=Se.getUTCDay(),Se=ze>4||ze===0?Fx.ceil(Se):Fx(Se),Se=DA.offset(Se,(te.V-1)*7),te.y=Se.getUTCFullYear(),te.m=Se.getUTCMonth(),te.d=Se.getUTCDate()+(te.w+6)%7):(Se=NE(jg(te.y,0,1)),ze=Se.getDay(),Se=ze>4||ze===0?Ux.ceil(Se):Ux(Se),Se=vv.offset(Se,(te.V-1)*7),te.y=Se.getFullYear(),te.m=Se.getMonth(),te.d=Se.getDate()+(te.w+6)%7)}else("W"in te||"U"in te)&&("w"in te||(te.w="u"in te?te.u%7:"W"in te?1:0),ze="Z"in te?IE(jg(te.y,0,1)).getUTCDay():NE(jg(te.y,0,1)).getDay(),te.m=0,te.d="W"in te?(te.w+6)%7+te.W*7-(ze+5)%7:te.w+te.U*7-(ze+6)%7);return"Z"in te?(te.H+=te.Z/100|0,te.M+=te.Z%100,IE(te)):NE(te)}}function C(Ee,ne,le,te){for(var Ce=0,Se=ne.length,ze=le.length,$e,rt;Ce=ze)return-1;if($e=ne.charCodeAt(Ce++),$e===37){if($e=ne.charAt(Ce++),rt=S[$e in qI?ne.charAt(Ce++):$e],!rt||(te=rt(Ee,le,te))<0)return-1}else if($e!=le.charCodeAt(te++))return-1}return te}function N(Ee,ne,le){var te=c.exec(ne.slice(le));return te?(Ee.p=u.get(te[0].toLowerCase()),le+te[0].length):-1}function B(Ee,ne,le){var te=d.exec(ne.slice(le));return te?(Ee.w=g.get(te[0].toLowerCase()),le+te[0].length):-1}function L(Ee,ne,le){var te=f.exec(ne.slice(le));return te?(Ee.w=h.get(te[0].toLowerCase()),le+te[0].length):-1}function U(Ee,ne,le){var te=m.exec(ne.slice(le));return te?(Ee.m=b.get(te[0].toLowerCase()),le+te[0].length):-1}function j(Ee,ne,le){var te=p.exec(ne.slice(le));return te?(Ee.m=y.get(te[0].toLowerCase()),le+te[0].length):-1}function X(Ee,ne,le){return C(Ee,e,ne,le)}function G(Ee,ne,le){return C(Ee,n,ne,le)}function H(Ee,ne,le){return C(Ee,r,ne,le)}function re(Ee){return o[Ee.getDay()]}function V(Ee){return a[Ee.getDay()]}function ee(Ee){return l[Ee.getMonth()]}function pe(Ee){return s[Ee.getMonth()]}function Ae(Ee){return i[+(Ee.getHours()>=12)]}function we(Ee){return 1+~~(Ee.getMonth()/3)}function Ye(Ee){return o[Ee.getUTCDay()]}function nt(Ee){return a[Ee.getUTCDay()]}function De(Ee){return l[Ee.getUTCMonth()]}function st(Ee){return s[Ee.getUTCMonth()]}function Tt(Ee){return i[+(Ee.getUTCHours()>=12)]}function ln(Ee){return 1+~~(Ee.getUTCMonth()/3)}return{format:function(Ee){var ne=E(Ee+="",x);return ne.toString=function(){return Ee},ne},parse:function(Ee){var ne=T(Ee+="",!1);return ne.toString=function(){return Ee},ne},utcFormat:function(Ee){var ne=E(Ee+="",A);return ne.toString=function(){return Ee},ne},utcParse:function(Ee){var ne=T(Ee+="",!0);return ne.toString=function(){return Ee},ne}}}var qI={"-":"",_:" ",0:"0"},mr=/^\s*\d+/,fwe=/^%/,hwe=/[\\^$*+?|[\]().{}]/g;function en(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a[e.toLowerCase(),n]))}function pwe(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function gwe(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function ywe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function mwe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function vwe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function e9(t,e,n){var r=mr.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function t9(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function bwe(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function wwe(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function xwe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function n9(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Awe(t,e,n){var r=mr.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function r9(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ewe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Swe(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Pwe(t,e,n){var r=mr.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Owe(t,e,n){var r=mr.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Twe(t,e,n){var r=fwe.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Cwe(t,e,n){var r=mr.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function kwe(t,e,n){var r=mr.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function i9(t,e){return en(t.getDate(),e,2)}function _we(t,e){return en(t.getHours(),e,2)}function Nwe(t,e){return en(t.getHours()%12||12,e,2)}function Iwe(t,e){return en(1+vv.count(Tl(t),t),e,3)}function Wj(t,e){return en(t.getMilliseconds(),e,3)}function Rwe(t,e){return Wj(t,e)+"000"}function Mwe(t,e){return en(t.getMonth()+1,e,2)}function Bwe(t,e){return en(t.getMinutes(),e,2)}function Dwe(t,e){return en(t.getSeconds(),e,2)}function Lwe(t){var e=t.getDay();return e===0?7:e}function $we(t,e){return en(LA.count(Tl(t)-1,t),e,2)}function Jj(t){var e=t.getDay();return e>=4||e===0?jp(t):jp.ceil(t)}function Uwe(t,e){return t=Jj(t),en(jp.count(Tl(t),t)+(Tl(t).getDay()===4),e,2)}function Fwe(t){return t.getDay()}function jwe(t,e){return en(Ux.count(Tl(t)-1,t),e,2)}function zwe(t,e){return en(t.getFullYear()%100,e,2)}function Hwe(t,e){return t=Jj(t),en(t.getFullYear()%100,e,2)}function Gwe(t,e){return en(t.getFullYear()%1e4,e,4)}function Vwe(t,e){var n=t.getDay();return t=n>=4||n===0?jp(t):jp.ceil(t),en(t.getFullYear()%1e4,e,4)}function Qwe(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+en(e/60|0,"0",2)+en(e%60,"0",2)}function a9(t,e){return en(t.getUTCDate(),e,2)}function Kwe(t,e){return en(t.getUTCHours(),e,2)}function Wwe(t,e){return en(t.getUTCHours()%12||12,e,2)}function Jwe(t,e){return en(1+DA.count(Cl(t),t),e,3)}function Yj(t,e){return en(t.getUTCMilliseconds(),e,3)}function Ywe(t,e){return Yj(t,e)+"000"}function Xwe(t,e){return en(t.getUTCMonth()+1,e,2)}function Zwe(t,e){return en(t.getUTCMinutes(),e,2)}function qwe(t,e){return en(t.getUTCSeconds(),e,2)}function exe(t){var e=t.getUTCDay();return e===0?7:e}function txe(t,e){return en($A.count(Cl(t)-1,t),e,2)}function Xj(t){var e=t.getUTCDay();return e>=4||e===0?zp(t):zp.ceil(t)}function nxe(t,e){return t=Xj(t),en(zp.count(Cl(t),t)+(Cl(t).getUTCDay()===4),e,2)}function rxe(t){return t.getUTCDay()}function ixe(t,e){return en(Fx.count(Cl(t)-1,t),e,2)}function axe(t,e){return en(t.getUTCFullYear()%100,e,2)}function oxe(t,e){return t=Xj(t),en(t.getUTCFullYear()%100,e,2)}function sxe(t,e){return en(t.getUTCFullYear()%1e4,e,4)}function lxe(t,e){var n=t.getUTCDay();return t=n>=4||n===0?zp(t):zp.ceil(t),en(t.getUTCFullYear()%1e4,e,4)}function cxe(){return"+0000"}function o9(){return"%"}function s9(t){return+t}function l9(t){return Math.floor(+t/1e3)}var Rh,Zj,qj;uxe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function uxe(t){return Rh=uwe(t),Zj=Rh.format,Rh.parse,qj=Rh.utcFormat,Rh.utcParse,Rh}function fxe(t){return new Date(t)}function hxe(t){return t instanceof Date?+t:+new Date(+t)}function x4(t,e,n,r,i,a,o,s,l,c){var u=s4(),f=u.invert,h=u.domain,d=c(".%L"),g=c(":%S"),p=c("%I:%M"),y=c("%I %p"),m=c("%a %d"),b=c("%b %d"),x=c("%B"),A=c("%Y");function S(E){return(l(E)e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>tbe(t,a/r))},n.copy=function(){return rz(e).domain(t)},Dl.apply(n,arguments)}function FA(){var t=0,e=.5,n=1,r=1,i,a,o,s,l,c=di,u,f=!1,h;function d(p){return isNaN(p=+p)?h:(p=.5+((p=+u(p))-a)*(r*pe}var sz=bxe,wxe=jA,xxe=sz,Axe=mg;function Exe(t){return t&&t.length?wxe(t,Axe,xxe):void 0}var Sxe=Exe;const zA=Xt(Sxe);function Pxe(t,e){return tt.e^a.s<0?1:-1;for(r=a.d.length,i=t.d.length,e=0,n=rt.d[e]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};We.decimalPlaces=We.dp=function(){var t=this,e=t.d.length-1,n=(e-t.e)*bn;if(e=t.d[e],e)for(;e%10==0;e/=10)n--;return n<0?0:n};We.dividedBy=We.div=function(t){return yl(this,new this.constructor(t))};We.dividedToIntegerBy=We.idiv=function(t){var e=this,n=e.constructor;return hn(yl(e,new n(t),0,1),n.precision)};We.equals=We.eq=function(t){return!this.cmp(t)};We.exponent=function(){return tr(this)};We.greaterThan=We.gt=function(t){return this.cmp(t)>0};We.greaterThanOrEqualTo=We.gte=function(t){return this.cmp(t)>=0};We.isInteger=We.isint=function(){return this.e>this.d.length-2};We.isNegative=We.isneg=function(){return this.s<0};We.isPositive=We.ispos=function(){return this.s>0};We.isZero=function(){return this.s===0};We.lessThan=We.lt=function(t){return this.cmp(t)<0};We.lessThanOrEqualTo=We.lte=function(t){return this.cmp(t)<1};We.logarithm=We.log=function(t){var e,n=this,r=n.constructor,i=r.precision,a=i+5;if(t===void 0)t=new r(10);else if(t=new r(t),t.s<1||t.eq(ia))throw Error(Va+"NaN");if(n.s<1)throw Error(Va+(n.s?"NaN":"-Infinity"));return n.eq(ia)?new r(0):(Pn=!1,e=yl($1(n,a),$1(t,a),a),Pn=!0,hn(e,i))};We.minus=We.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?hz(e,t):uz(e,(t.s=-t.s,t))};We.modulo=We.mod=function(t){var e,n=this,r=n.constructor,i=r.precision;if(t=new r(t),!t.s)throw Error(Va+"NaN");return n.s?(Pn=!1,e=yl(n,t,0,1).times(t),Pn=!0,n.minus(e)):hn(new r(n),i)};We.naturalExponential=We.exp=function(){return fz(this)};We.naturalLogarithm=We.ln=function(){return $1(this)};We.negated=We.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};We.plus=We.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?uz(e,t):hz(e,(t.s=-t.s,t))};We.precision=We.sd=function(t){var e,n,r,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Vf+t);if(e=tr(i)+1,r=i.d.length-1,n=r*bn+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return t&&e>n?e:n};We.squareRoot=We.sqrt=function(){var t,e,n,r,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Va+"NaN")}for(t=tr(s),Pn=!1,i=Math.sqrt(+s),i==0||i==1/0?(e=rs(s.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=wg((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),r=new l(e)):r=new l(i.toString()),n=l.precision,i=o=n+3;;)if(a=r,r=a.plus(yl(s,a,o+2)).times(.5),rs(a.d).slice(0,o)===(e=rs(r.d)).slice(0,o)){if(e=e.slice(o-3,o+1),i==o&&e=="4999"){if(hn(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(e!="9999")break;o+=4}return Pn=!0,hn(r,n)};We.times=We.mul=function(t){var e,n,r,i,a,o,s,l,c,u=this,f=u.constructor,h=u.d,d=(t=new f(t)).d;if(!u.s||!t.s)return new f(0);for(t.s*=u.s,n=u.e+t.e,l=h.length,c=d.length,l=0;){for(e=0,i=l+r;i>r;)s=a[i]+d[r]*h[i-r-1]+e,a[i--]=s%fr|0,e=s/fr|0;a[i]=(a[i]+e)%fr|0}for(;!a[--o];)a.pop();return e?++n:a.shift(),t.d=a,t.e=n,Pn?hn(t,f.precision):t};We.toDecimalPlaces=We.todp=function(t,e){var n=this,r=n.constructor;return n=new r(n),t===void 0?n:(ds(t,0,bg),e===void 0?e=r.rounding:ds(e,0,8),hn(n,t+tr(n)+1,e))};We.toExponential=function(t,e){var n,r=this,i=r.constructor;return t===void 0?n=fh(r,!0):(ds(t,0,bg),e===void 0?e=i.rounding:ds(e,0,8),r=hn(new i(r),t+1,e),n=fh(r,!0,t+1)),n};We.toFixed=function(t,e){var n,r,i=this,a=i.constructor;return t===void 0?fh(i):(ds(t,0,bg),e===void 0?e=a.rounding:ds(e,0,8),r=hn(new a(i),t+tr(i)+1,e),n=fh(r.abs(),!1,t+tr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};We.toInteger=We.toint=function(){var t=this,e=t.constructor;return hn(new e(t),tr(t)+1,e.rounding)};We.toNumber=function(){return+this};We.toPower=We.pow=function(t){var e,n,r,i,a,o,s=this,l=s.constructor,c=12,u=+(t=new l(t));if(!t.s)return new l(ia);if(s=new l(s),!s.s){if(t.s<1)throw Error(Va+"Infinity");return s}if(s.eq(ia))return s;if(r=l.precision,t.eq(ia))return hn(s,r);if(e=t.e,n=t.d.length-1,o=e>=n,a=s.s,o){if((n=u<0?-u:u)<=cz){for(i=new l(ia),e=Math.ceil(r/bn+4),Pn=!1;n%2&&(i=i.times(s),f9(i.d,e)),n=wg(n/2),n!==0;)s=s.times(s),f9(s.d,e);return Pn=!0,t.s<0?new l(ia).div(i):hn(i,r)}}else if(a<0)throw Error(Va+"NaN");return a=a<0&&t.d[Math.max(e,n)]&1?-1:1,s.s=1,Pn=!1,i=t.times($1(s,r+c)),Pn=!0,i=fz(i),i.s=a,i};We.toPrecision=function(t,e){var n,r,i=this,a=i.constructor;return t===void 0?(n=tr(i),r=fh(i,n<=a.toExpNeg||n>=a.toExpPos)):(ds(t,1,bg),e===void 0?e=a.rounding:ds(e,0,8),i=hn(new a(i),t,e),n=tr(i),r=fh(i,t<=n||n<=a.toExpNeg,t)),r};We.toSignificantDigits=We.tosd=function(t,e){var n=this,r=n.constructor;return t===void 0?(t=r.precision,e=r.rounding):(ds(t,1,bg),e===void 0?e=r.rounding:ds(e,0,8)),hn(new r(n),t,e)};We.toString=We.valueOf=We.val=We.toJSON=We[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=tr(t),n=t.constructor;return fh(t,e<=n.toExpNeg||e>=n.toExpPos)};function uz(t,e){var n,r,i,a,o,s,l,c,u=t.constructor,f=u.precision;if(!t.s||!e.s)return e.s||(e=new u(t)),Pn?hn(e,f):e;if(l=t.d,c=e.d,o=t.e,i=e.e,l=l.slice(),a=o-i,a){for(a<0?(r=l,a=-a,s=c.length):(r=c,i=o,s=l.length),o=Math.ceil(f/bn),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=c.length,s-a<0&&(a=s,r=c,c=l,l=r),n=0;a;)n=(l[--a]=l[a]+c[a]+n)/fr|0,l[a]%=fr;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=i,Pn?hn(e,f):e}function ds(t,e,n){if(t!==~~t||tn)throw Error(Vf+t)}function rs(t){var e,n,r,i=t.length-1,a="",o=t[0];if(i>0){for(a+=o,e=1;eo?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]1;)r.shift()}return function(r,i,a,o){var s,l,c,u,f,h,d,g,p,y,m,b,x,A,S,E,T,C,N=r.constructor,B=r.s==i.s?1:-1,L=r.d,U=i.d;if(!r.s)return new N(r);if(!i.s)throw Error(Va+"Division by zero");for(l=r.e-i.e,T=U.length,S=L.length,d=new N(B),g=d.d=[],c=0;U[c]==(L[c]||0);)++c;if(U[c]>(L[c]||0)&&--l,a==null?b=a=N.precision:o?b=a+(tr(r)-tr(i))+1:b=a,b<0)return new N(0);if(b=b/bn+2|0,c=0,T==1)for(u=0,U=U[0],b++;(c1&&(U=t(U,u),L=t(L,u),T=U.length,S=L.length),A=T,p=L.slice(0,T),y=p.length;y=fr/2&&++E;do u=0,s=e(U,p,T,y),s<0?(m=p[0],T!=y&&(m=m*fr+(p[1]||0)),u=m/E|0,u>1?(u>=fr&&(u=fr-1),f=t(U,u),h=f.length,y=p.length,s=e(f,p,h,y),s==1&&(u--,n(f,T16)throw Error(P4+tr(t));if(!t.s)return new u(ia);for(e==null?(Pn=!1,s=f):s=e,o=new u(.03125);t.abs().gte(.1);)t=t.times(o),c+=5;for(r=Math.log(Ou(2,c))/Math.LN10*2+5|0,s+=r,n=i=a=new u(ia),u.precision=s;;){if(i=hn(i.times(t),s),n=n.times(++l),o=a.plus(yl(i,n,s)),rs(o.d).slice(0,s)===rs(a.d).slice(0,s)){for(;c--;)a=hn(a.times(a),s);return u.precision=f,e==null?(Pn=!0,hn(a,f)):a}a=o}}function tr(t){for(var e=t.e*bn,n=t.d[0];n>=10;n/=10)e++;return e}function RE(t,e,n){if(e>t.LN10.sd())throw Pn=!0,n&&(t.precision=n),Error(Va+"LN10 precision limit exceeded");return hn(new t(t.LN10),e)}function Xl(t){for(var e="";t--;)e+="0";return e}function $1(t,e){var n,r,i,a,o,s,l,c,u,f=1,h=10,d=t,g=d.d,p=d.constructor,y=p.precision;if(d.s<1)throw Error(Va+(d.s?"NaN":"-Infinity"));if(d.eq(ia))return new p(0);if(e==null?(Pn=!1,c=y):c=e,d.eq(10))return e==null&&(Pn=!0),RE(p,c);if(c+=h,p.precision=c,n=rs(g),r=n.charAt(0),a=tr(d),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)d=d.times(t),n=rs(d.d),r=n.charAt(0),f++;a=tr(d),r>1?(d=new p("0."+n),a++):d=new p(r+"."+n.slice(1))}else return l=RE(p,c+2,y).times(a+""),d=$1(new p(r+"."+n.slice(1)),c-h).plus(l),p.precision=y,e==null?(Pn=!0,hn(d,y)):d;for(s=o=d=yl(d.minus(ia),d.plus(ia),c),u=hn(d.times(d),c),i=3;;){if(o=hn(o.times(u),c),l=s.plus(yl(o,new p(i),c)),rs(l.d).slice(0,c)===rs(s.d).slice(0,c))return s=s.times(2),a!==0&&(s=s.plus(RE(p,c+2,y).times(a+""))),s=yl(s,new p(f),c),p.precision=y,e==null?(Pn=!0,hn(s,y)):s;s=l,i+=2}}function u9(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charCodeAt(r)===48;)++r;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(r,i),e){if(i-=r,n=n-r-1,t.e=wg(n/bn),t.d=[],r=(n+1)%bn,n<0&&(r+=bn),rjx||t.e<-jx))throw Error(P4+n)}else t.s=0,t.e=0,t.d=[0];return t}function hn(t,e,n){var r,i,a,o,s,l,c,u,f=t.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(r=e-o,r<0)r+=bn,i=e,c=f[u=0];else{if(u=Math.ceil((r+1)/bn),a=f.length,u>=a)return t;for(c=a=f[u],o=1;a>=10;a/=10)o++;r%=bn,i=r-bn+o}if(n!==void 0&&(a=Ou(10,o-i-1),s=c/a%10|0,l=e<0||f[u+1]!==void 0||c%a,l=n<4?(s||l)&&(n==0||n==(t.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/Ou(10,o-i):0:f[u-1])%10&1||n==(t.s<0?8:7))),e<1||!f[0])return l?(a=tr(t),f.length=1,e=e-a-1,f[0]=Ou(10,(bn-e%bn)%bn),t.e=wg(-e/bn)||0):(f.length=1,f[0]=t.e=t.s=0),t;if(r==0?(f.length=u,a=1,u--):(f.length=u+1,a=Ou(10,bn-r),f[u]=i>0?(c/Ou(10,o-i)%Ou(10,i)|0)*a:0),l)for(;;)if(u==0){(f[0]+=a)==fr&&(f[0]=1,++t.e);break}else{if(f[u]+=a,f[u]!=fr)break;f[u--]=0,a=1}for(r=f.length;f[--r]===0;)f.pop();if(Pn&&(t.e>jx||t.e<-jx))throw Error(P4+tr(t));return t}function hz(t,e){var n,r,i,a,o,s,l,c,u,f,h=t.constructor,d=h.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new h(t),Pn?hn(e,d):e;if(l=t.d,f=e.d,r=e.e,c=t.e,l=l.slice(),o=c-r,o){for(u=o<0,u?(n=l,o=-o,s=f.length):(n=f,r=c,s=l.length),i=Math.max(Math.ceil(d/bn),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=f.length,u=i0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+Xl(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Xl(-i-1)+a,n&&(r=n-o)>0&&(a+=Xl(r))):i>=o?(a+=Xl(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Xl(r))):((r=i+1)0&&(i+1===o&&(a+="."),a+=Xl(r))),t.s<0?"-"+a:a}function f9(t,e){if(t.length>e)return t.length=e,!0}function dz(t){var e,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Vf+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return u9(o,a.toString())}else if(typeof a!="string")throw Error(Vf+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,Qxe.test(a))u9(o,a);else throw Error(Vf+a)}if(i.prototype=We,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=dz,i.config=i.set=Kxe,t===void 0&&(t={}),t)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e=i[e+1]&&r<=i[e+2])this[n]=r;else throw Error(Vf+n+": "+r);if((r=t[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Vf+n+": "+r);return this}var O4=dz(Vxe);ia=new O4(1);const un=O4;function Wxe(t){return Zxe(t)||Xxe(t)||Yxe(t)||Jxe()}function Jxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yxe(t,e){if(t){if(typeof t=="string")return $8(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $8(t,e)}}function Xxe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Zxe(t){if(Array.isArray(t))return $8(t)}function $8(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=e?n.apply(void 0,i):t(e-o,h9(function(){for(var s=arguments.length,l=new Array(s),c=0;ct.length)&&(e=t.length);for(var n=0,r=new Array(e);n"u"||!(Symbol.iterator in Object(t)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=t[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(e&&n.length===e));r=!0);}catch(l){i=!0,a=l}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function d2e(t){if(Array.isArray(t))return t}function vz(t){var e=U1(t,2),n=e[0],r=e[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function bz(t,e,n){if(t.lte(0))return new un(0);var r=VA.getDigitCount(t.toNumber()),i=new un(10).pow(r),a=t.div(i),o=r!==1?.05:.1,s=new un(Math.ceil(a.div(o).toNumber())).add(n).mul(o),l=s.mul(i);return e?l:new un(Math.ceil(l))}function p2e(t,e,n){var r=1,i=new un(t);if(!i.isint()&&n){var a=Math.abs(t);a<1?(r=new un(10).pow(VA.getDigitCount(t)-1),i=new un(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new un(Math.floor(t)))}else t===0?i=new un(Math.floor((e-1)/2)):n||(i=new un(Math.floor(t)));var o=Math.floor((e-1)/2),s=n2e(t2e(function(l){return i.add(new un(l-o).mul(r)).toNumber()}),U8);return s(0,e)}function wz(t,e,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(n-1)))return{step:new un(0),tickMin:new un(0),tickMax:new un(0)};var a=bz(new un(e).sub(t).div(n-1),r,i),o;t<=0&&e>=0?o=new un(0):(o=new un(t).add(e).div(2),o=o.sub(new un(o).mod(a)));var s=Math.ceil(o.sub(t).div(a).toNumber()),l=Math.ceil(new un(e).sub(o).div(a).toNumber()),c=s+l+1;return c>n?wz(t,e,n,r,i+1):(c0?l+(n-c):l,s=e>0?s:s+(n-c)),{step:a,tickMin:o.sub(new un(s).mul(a)),tickMax:o.add(new un(l).mul(a))})}function g2e(t){var e=U1(t,2),n=e[0],r=e[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=vz([n,r]),l=U1(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var f=u===1/0?[c].concat(j8(U8(0,i-1).map(function(){return 1/0}))):[].concat(j8(U8(0,i-1).map(function(){return-1/0})),[u]);return n>r?F8(f):f}if(c===u)return p2e(c,i,a);var h=wz(c,u,o,a),d=h.step,g=h.tickMin,p=h.tickMax,y=VA.rangeStep(g,p.add(new un(.1).mul(d)),d);return n>r?F8(y):y}function y2e(t,e){var n=U1(t,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=vz([r,i]),s=U1(o,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,i];if(l===c)return[l];var u=Math.max(e,2),f=bz(new un(c).sub(l).div(u-1),a,0),h=[].concat(j8(VA.rangeStep(new un(l),new un(c).sub(new un(.99).mul(f)),f)),[c]);return r>i?F8(h):h}var m2e=yz(g2e),v2e=yz(y2e),b2e="Invariant failed";function Hp(t,e){if(!t)throw new Error(b2e)}var w2e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function zx(){return zx=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function T2e(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function T4(t){var e=t.offset,n=t.layout,r=t.width,i=t.dataKey,a=t.data,o=t.dataPointFormatter,s=t.xAxis,l=t.yAxis,c=O2e(t,w2e),u=It(c,!1);t.direction==="x"&&s.type!=="number"&&Hp(!1);var f=a.map(function(h){var d=o(h,i),g=d.x,p=d.y,y=d.value,m=d.errorVal;if(!m)return null;var b=[],x,A;if(Array.isArray(m)){var S=x2e(m,2);x=S[0],A=S[1]}else x=A=m;if(n==="vertical"){var E=s.scale,T=p+e,C=T+r,N=T-r,B=E(y-x),L=E(y+A);b.push({x1:L,y1:C,x2:L,y2:N}),b.push({x1:B,y1:T,x2:L,y2:T}),b.push({x1:B,y1:C,x2:B,y2:N})}else if(n==="horizontal"){var U=l.scale,j=g+e,X=j-r,G=j+r,H=U(y-x),re=U(y+A);b.push({x1:X,y1:re,x2:G,y2:re}),b.push({x1:j,y1:H,x2:j,y2:re}),b.push({x1:X,y1:H,x2:G,y2:H})}return Y.createElement(Hn,zx({className:"recharts-errorBar",key:"bar-".concat(b.map(function(V){return"".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))},u),b.map(function(V){return Y.createElement("line",zx({},V,{key:"line-".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))}))});return Y.createElement(Hn,{className:"recharts-errorBars"},f)}T4.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"};T4.displayName="ErrorBar";function F1(t){"@babel/helpers - typeof";return F1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F1(t)}function p9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ME(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,c=0;c0?i[c-1].coordinate:i[s-1].coordinate,f=i[c].coordinate,h=c>=s-1?i[0].coordinate:i[c+1].coordinate,d=void 0;if(Ua(f-u)!==Ua(h-f)){var g=[];if(Ua(h-f)===Ua(l[1]-l[0])){d=h;var p=f+l[1]-l[0];g[0]=Math.min(p,(p+u)/2),g[1]=Math.max(p,(p+u)/2)}else{d=u;var y=h+l[1]-l[0];g[0]=Math.min(f,(y+f)/2),g[1]=Math.max(f,(y+f)/2)}var m=[Math.min(f,(d+f)/2),Math.max(f,(d+f)/2)];if(e>m[0]&&e<=m[1]||e>=g[0]&&e<=g[1]){o=i[c].index;break}}else{var b=Math.min(u,h),x=Math.max(u,h);if(e>(b+f)/2&&e<=(x+f)/2){o=i[c].index;break}}}else for(var A=0;A0&&A(r[A].coordinate+r[A-1].coordinate)/2&&e<=(r[A].coordinate+r[A+1].coordinate)/2||A===s-1&&e>(r[A].coordinate+r[A-1].coordinate)/2){o=r[A].index;break}return o},C4=function(e){var n=e,r=n.type.displayName,i=e.props,a=i.stroke,o=i.fill,s;switch(r){case"Line":s=a;break;case"Area":case"Radar":s=a&&a!=="none"?a:o;break;default:s=o;break}return s},$2e=function(e){var n=e.barSize,r=e.stackGroups,i=r===void 0?{}:r;if(!i)return{};for(var a={},o=Object.keys(i),s=0,l=o.length;s=0});if(y&&y.length){var m=y[0].props.barSize,b=y[0].props[p];a[b]||(a[b]=[]),a[b].push({item:y[0],stackList:y.slice(1),barSize:Yt(m)?n:m})}}return a},U2e=function(e){var n=e.barGap,r=e.barCategoryGap,i=e.bandSize,a=e.sizeList,o=a===void 0?[]:a,s=e.maxBarSize,l=o.length;if(l<1)return null;var c=la(n,i,0,!0),u,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,d=i/l,g=o.reduce(function(A,S){return A+S.barSize||0},0);g+=(l-1)*c,g>=i&&(g-=(l-1)*c,c=0),g>=i&&d>0&&(h=!0,d*=.9,g=l*d);var p=(i-g)/2>>0,y={offset:p-c,size:0};u=o.reduce(function(A,S){var E={item:S.item,position:{offset:y.offset+y.size+c,size:h?d:S.barSize}},T=[].concat(y9(A),[E]);return y=T[T.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(C){T.push({item:C,position:y})}),T},f)}else{var m=la(r,i,0,!0);i-2*m-(l-1)*c<=0&&(c=0);var b=(i-2*m-(l-1)*c)/l;b>1&&(b>>=0);var x=s===+s?Math.min(b,s):b;u=o.reduce(function(A,S,E){var T=[].concat(y9(A),[{item:S.item,position:{offset:m+(b+c)*E+(b-x)/2,size:x}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(C){T.push({item:C,position:T[T.length-1].position})}),T},f)}return u},F2e=function(e,n,r,i){var a=r.children,o=r.width,s=r.margin,l=o-(s.left||0)-(s.right||0),c=xz({children:a,legendWidth:l});if(c){var u=i||{},f=u.width,h=u.height,d=c.align,g=c.verticalAlign,p=c.layout;if((p==="vertical"||p==="horizontal"&&g==="middle")&&d!=="center"&&je(e[d]))return Da(Da({},e),{},Dd({},d,e[d]+(f||0)));if((p==="horizontal"||p==="vertical"&&d==="center")&&g!=="middle"&&je(e[g]))return Da(Da({},e),{},Dd({},g,e[g]+(h||0)))}return e},j2e=function(e,n,r){return Yt(n)?!0:e==="horizontal"?n==="yAxis":e==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Az=function(e,n,r,i,a){var o=n.props.children,s=ss(o,T4).filter(function(c){return j2e(i,a,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return e.reduce(function(c,u){var f=aa(u,r,0),h=Array.isArray(f)?[HA(f),zA(f)]:[f,f],d=l.reduce(function(g,p){var y=aa(u,p,0),m=h[0]-Math.abs(Array.isArray(y)?y[0]:y),b=h[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(m,g[0]),Math.max(b,g[1])]},[1/0,-1/0]);return[Math.min(d[0],c[0]),Math.max(d[1],c[1])]},[1/0,-1/0])}return null},z2e=function(e,n,r,i,a){var o=n.map(function(s){return Az(e,s,r,a,i)}).filter(function(s){return!Yt(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},Ez=function(e,n,r,i,a){var o=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&Az(e,l,c,i)||Ry(e,c,r,a)});if(r==="number")return o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,c){for(var u=0,f=c.length;u=2?Ua(s[0]-s[1])*2*c:c,n&&(e.ticks||e.niceTicks)){var u=(e.ticks||e.niceTicks).map(function(f){var h=a?a.indexOf(f):f;return{coordinate:i(h)+c,value:f,offset:c}});return u.filter(function(f){return!pv(f.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(f,h){return{coordinate:i(f)+c,value:f,index:h,offset:c}}):i.ticks&&!r?i.ticks(e.tickCount).map(function(f){return{coordinate:i(f)+c,value:f,offset:c}}):i.domain().map(function(f,h){return{coordinate:i(f)+c,value:a?a[f]:f,index:h,offset:c}})},BE=new WeakMap,xb=function(e,n){if(typeof n!="function")return e;BE.has(e)||BE.set(e,new WeakMap);var r=BE.get(e);if(r.has(n))return r.get(n);var i=function(){e.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},H2e=function(e,n,r){var i=e.scale,a=e.type,o=e.layout,s=e.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:R1(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Lx(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Iy(),realScaleType:"point"}:a==="category"?{scale:R1(),realScaleType:"band"}:{scale:Lx(),realScaleType:"linear"};if(dv(i)){var l="scale".concat(CA(i));return{scale:(c9[l]||Iy)(),realScaleType:c9[l]?l:"point"}}return Ft(i)?{scale:i}:{scale:Iy(),realScaleType:"point"}},m9=1e-4,G2e=function(e){var n=e.domain();if(!(!n||n.length<=2)){var r=n.length,i=e.range(),a=Math.min(i[0],i[1])-m9,o=Math.max(i[0],i[1])+m9,s=e(n[0]),l=e(n[r-1]);(so||lo)&&e.domain([n[0],n[r-1]])}},V2e=function(e){var n=e.length;if(!(n<=0))for(var r=0,i=e[0].length;r=0?(e[s][r][0]=a,e[s][r][1]=a+l,a=e[s][r][1]):(e[s][r][0]=o,e[s][r][1]=o+l,o=e[s][r][1])}},Q2e=function(e){var n=e.length;if(!(n<=0))for(var r=0,i=e[0].length;r=0?(e[o][r][0]=a,e[o][r][1]=a+s,a=e[o][r][1]):(e[o][r][0]=0,e[o][r][1]=0)}},K2e={sign:V2e,expand:Efe,none:Mp,silhouette:Sfe,wiggle:Pfe,positive:Q2e},W2e=function(e,n,r){var i=n.map(function(s){return s.props.dataKey}),a=K2e[r],o=Afe().keys(i).value(function(s,l){return+aa(s,l,0)}).order(y8).offset(a);return o(e)},J2e=function(e,n,r,i,a,o){if(!e)return null;var s=o?n.reverse():n,l={},c=s.reduce(function(f,h){var d=h.props,g=d.stackId,p=d.hide;if(p)return f;var y=h.props[r],m=f[y]||{hasStack:!1,stackGroups:{}};if(or(g)){var b=m.stackGroups[g]||{numericAxisId:r,cateAxisId:i,items:[]};b.items.push(h),m.hasStack=!0,m.stackGroups[g]=b}else m.stackGroups[OA("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return Da(Da({},f),{},Dd({},y,m))},l),u={};return Object.keys(c).reduce(function(f,h){var d=c[h];if(d.hasStack){var g={};d.stackGroups=Object.keys(d.stackGroups).reduce(function(p,y){var m=d.stackGroups[y];return Da(Da({},p),{},Dd({},y,{numericAxisId:r,cateAxisId:i,items:m.items,stackedData:W2e(e,m.items,a)}))},g)}return Da(Da({},f),{},Dd({},h,d))},u)},Y2e=function(e,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=e.domain();if(!c.length)return null;var u=m2e(c,a,s);return e.domain([HA(u),zA(u)]),{niceTicks:u}}if(a&&i==="number"){var f=e.domain(),h=v2e(f,a,s);return{niceTicks:h}}return null},X2e=function(e,n){var r=e.props.stackId;if(or(r)){var i=n[r];if(i){var a=i.items.indexOf(e);return a>=0?i.stackedData[a]:null}}return null},Z2e=function(e){return e.reduce(function(n,r){return[HA(r.concat([n[0]]).filter(je)),zA(r.concat([n[1]]).filter(je))]},[1/0,-1/0])},Pz=function(e,n,r){return Object.keys(e).reduce(function(i,a){var o=e[a],s=o.stackedData,l=s.reduce(function(c,u){var f=Z2e(u.slice(n,r+1));return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},v9=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,b9=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,G8=function(e,n,r){if(Ft(e))return e(n,r);if(!Array.isArray(e))return n;var i=[];if(je(e[0]))i[0]=r?e[0]:Math.min(e[0],n[0]);else if(v9.test(e[0])){var a=+v9.exec(e[0])[1];i[0]=n[0]-a}else Ft(e[0])?i[0]=e[0](n[0]):i[0]=n[0];if(je(e[1]))i[1]=r?e[1]:Math.max(e[1],n[1]);else if(b9.test(e[1])){var o=+b9.exec(e[1])[1];i[1]=n[1]+o}else Ft(e[1])?i[1]=e[1](n[1]):i[1]=n[1];return i},V8=function(e,n,r){if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!r||i>0)return i}if(e&&n&&n.length>=2){for(var a=qO(n,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;st.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},lAe=function(e,n,r,i,a){var o=e.width,s=e.height,l=e.startAngle,c=e.endAngle,u=la(e.cx,o,o/2),f=la(e.cy,s,s/2),h=Tz(o,s,r),d=la(e.innerRadius,h,0),g=la(e.outerRadius,h,h*.8),p=Object.keys(n);return p.reduce(function(y,m){var b=n[m],x=b.domain,A=b.reversed,S;if(Yt(b.range))i==="angleAxis"?S=[l,c]:i==="radiusAxis"&&(S=[d,g]),A&&(S=[S[1],S[0]]);else{S=b.range;var E=S,T=nAe(E,2);l=T[0],c=T[1]}var C=H2e(b,a),N=C.realScaleType,B=C.scale;B.domain(x).range(S),G2e(B);var L=Y2e(B,Ss(Ss({},b),{},{realScaleType:N})),U=Ss(Ss(Ss({},b),L),{},{range:S,radius:g,realScaleType:N,scale:B,cx:u,cy:f,innerRadius:d,outerRadius:g,startAngle:l,endAngle:c});return Ss(Ss({},y),{},Oz({},m,U))},{})},cAe=function(e,n){var r=e.x,i=e.y,a=n.x,o=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(i-o,2))},uAe=function(e,n){var r=e.x,i=e.y,a=n.cx,o=n.cy,s=cAe({x:r,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(r-a)/s,c=Math.acos(l);return i>o&&(c=2*Math.PI-c),{radius:s,angle:sAe(c),angleInRadian:c}},fAe=function(e){var n=e.startAngle,r=e.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},hAe=function(e,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),s=Math.min(a,o);return e+s*360},E9=function(e,n){var r=e.x,i=e.y,a=uAe({x:r,y:i},n),o=a.radius,s=a.angle,l=n.innerRadius,c=n.outerRadius;if(oc)return!1;if(o===0)return!0;var u=fAe(n),f=u.startAngle,h=u.endAngle,d=s,g;if(f<=h){for(;d>h;)d-=360;for(;d=f&&d<=h}else{for(;d>f;)d-=360;for(;d=h&&d<=f}return g?Ss(Ss({},n),{},{radius:o,angle:hAe(d,n)}):null};function H1(t){"@babel/helpers - typeof";return H1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H1(t)}var dAe=["offset"];function pAe(t){return vAe(t)||mAe(t)||yAe(t)||gAe()}function gAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yAe(t,e){if(t){if(typeof t=="string")return Q8(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q8(t,e)}}function mAe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function vAe(t){if(Array.isArray(t))return Q8(t)}function Q8(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function wAe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function S9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rr(t){for(var e=1;e=0?1:-1,x,A;i==="insideStart"?(x=d+b*o,A=p):i==="insideEnd"?(x=g-b*o,A=!p):i==="end"&&(x=g+b*o,A=p),A=m<=0?A:!A;var S=yn(c,u,y,x),E=yn(c,u,y,x+(A?1:-1)*359),T="M".concat(S.x,",").concat(S.y,` - A`).concat(y,",").concat(y,",0,1,").concat(A?0:1,`, - `).concat(E.x,",").concat(E.y),C=Yt(e.id)?OA("recharts-radial-line-"):e.id;return Y.createElement("text",G1({},r,{dominantBaseline:"central",className:On("recharts-radial-bar-label",s)}),Y.createElement("defs",null,Y.createElement("path",{id:C,d:T})),Y.createElement("textPath",{xlinkHref:"#".concat(C)},n))},TAe=function(e){var n=e.viewBox,r=e.offset,i=e.position,a=n,o=a.cx,s=a.cy,l=a.innerRadius,c=a.outerRadius,u=a.startAngle,f=a.endAngle,h=(u+f)/2;if(i==="outside"){var d=yn(o,s,c+r,h),g=d.x,p=d.y;return{x:g,y:p,textAnchor:g>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+c)/2,m=yn(o,s,y,h),b=m.x,x=m.y;return{x:b,y:x,textAnchor:"middle",verticalAnchor:"middle"}},CAe=function(e){var n=e.viewBox,r=e.parentViewBox,i=e.offset,a=e.position,o=n,s=o.x,l=o.y,c=o.width,u=o.height,f=u>=0?1:-1,h=f*i,d=f>0?"end":"start",g=f>0?"start":"end",p=c>=0?1:-1,y=p*i,m=p>0?"end":"start",b=p>0?"start":"end";if(a==="top"){var x={x:s+c/2,y:l-f*i,textAnchor:"middle",verticalAnchor:d};return rr(rr({},x),r?{height:Math.max(l-r.y,0),width:c}:{})}if(a==="bottom"){var A={x:s+c/2,y:l+u+h,textAnchor:"middle",verticalAnchor:g};return rr(rr({},A),r?{height:Math.max(r.y+r.height-(l+u),0),width:c}:{})}if(a==="left"){var S={x:s-y,y:l+u/2,textAnchor:m,verticalAnchor:"middle"};return rr(rr({},S),r?{width:Math.max(S.x-r.x,0),height:u}:{})}if(a==="right"){var E={x:s+c+y,y:l+u/2,textAnchor:b,verticalAnchor:"middle"};return rr(rr({},E),r?{width:Math.max(r.x+r.width-E.x,0),height:u}:{})}var T=r?{width:c,height:u}:{};return a==="insideLeft"?rr({x:s+y,y:l+u/2,textAnchor:b,verticalAnchor:"middle"},T):a==="insideRight"?rr({x:s+c-y,y:l+u/2,textAnchor:m,verticalAnchor:"middle"},T):a==="insideTop"?rr({x:s+c/2,y:l+h,textAnchor:"middle",verticalAnchor:g},T):a==="insideBottom"?rr({x:s+c/2,y:l+u-h,textAnchor:"middle",verticalAnchor:d},T):a==="insideTopLeft"?rr({x:s+y,y:l+h,textAnchor:b,verticalAnchor:g},T):a==="insideTopRight"?rr({x:s+c-y,y:l+h,textAnchor:m,verticalAnchor:g},T):a==="insideBottomLeft"?rr({x:s+y,y:l+u-h,textAnchor:b,verticalAnchor:d},T):a==="insideBottomRight"?rr({x:s+c-y,y:l+u-h,textAnchor:m,verticalAnchor:d},T):fg(a)&&(je(a.x)||zu(a.x))&&(je(a.y)||zu(a.y))?rr({x:s+la(a.x,c),y:l+la(a.y,u),textAnchor:"end",verticalAnchor:"end"},T):rr({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},T)},kAe=function(e){return"cx"in e&&je(e.cx)};function Sr(t){var e=t.offset,n=e===void 0?5:e,r=bAe(t,dAe),i=rr({offset:n},r),a=i.viewBox,o=i.position,s=i.value,l=i.children,c=i.content,u=i.className,f=u===void 0?"":u,h=i.textBreakAll;if(!a||Yt(s)&&Yt(l)&&!F.isValidElement(c)&&!Ft(c))return null;if(F.isValidElement(c))return F.cloneElement(c,i);var d;if(Ft(c)){if(d=F.createElement(c,i),F.isValidElement(d))return d}else d=SAe(i);var g=kAe(a),p=It(i,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return OAe(i,d,p);var y=g?TAe(i):CAe(i);return Y.createElement(Up,G1({className:On("recharts-label",f)},p,y,{breakAll:h}),d)}Sr.displayName="Label";var Cz=function(e){var n=e.cx,r=e.cy,i=e.angle,a=e.startAngle,o=e.endAngle,s=e.r,l=e.radius,c=e.innerRadius,u=e.outerRadius,f=e.x,h=e.y,d=e.top,g=e.left,p=e.width,y=e.height,m=e.clockWise,b=e.labelViewBox;if(b)return b;if(je(p)&&je(y)){if(je(f)&&je(h))return{x:f,y:h,width:p,height:y};if(je(d)&&je(g))return{x:d,y:g,width:p,height:y}}return je(f)&&je(h)?{x:f,y:h,width:0,height:0}:je(n)&&je(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:m}:e.viewBox?e.viewBox:{}},_Ae=function(e,n){return e?e===!0?Y.createElement(Sr,{key:"label-implicit",viewBox:n}):or(e)?Y.createElement(Sr,{key:"label-implicit",viewBox:n,value:e}):F.isValidElement(e)?e.type===Sr?F.cloneElement(e,{key:"label-implicit",viewBox:n}):Y.createElement(Sr,{key:"label-implicit",content:e,viewBox:n}):Ft(e)?Y.createElement(Sr,{key:"label-implicit",content:e,viewBox:n}):fg(e)?Y.createElement(Sr,G1({viewBox:n},e,{key:"label-implicit"})):null:null},NAe=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var i=e.children,a=Cz(e),o=ss(i,Sr).map(function(l,c){return F.cloneElement(l,{viewBox:n||a,key:"label-".concat(c)})});if(!r)return o;var s=_Ae(e.label,n||a);return[s].concat(pAe(o))};Sr.parseViewBox=Cz;Sr.renderCallByParent=NAe;function IAe(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var RAe=IAe;const MAe=Xt(RAe);function V1(t){"@babel/helpers - typeof";return V1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V1(t)}var BAe=["valueAccessor"],DAe=["data","dataKey","clockWise","id","textBreakAll"];function LAe(t){return jAe(t)||FAe(t)||UAe(t)||$Ae()}function $Ae(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UAe(t,e){if(t){if(typeof t=="string")return K8(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K8(t,e)}}function FAe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jAe(t){if(Array.isArray(t))return K8(t)}function K8(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function VAe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var QAe=function(e){return Array.isArray(e.value)?MAe(e.value):e.value};function Qf(t){var e=t.valueAccessor,n=e===void 0?QAe:e,r=T9(t,BAe),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,l=r.textBreakAll,c=T9(r,DAe);return!i||!i.length?null:Y.createElement(Hn,{className:"recharts-label-list"},i.map(function(u,f){var h=Yt(a)?n(u,f):aa(u&&u.payload,a),d=Yt(s)?{}:{id:"".concat(s,"-").concat(f)};return Y.createElement(Sr,Gx({},It(u,!0),c,d,{parentViewBox:u.parentViewBox,value:h,textBreakAll:l,viewBox:Sr.parseViewBox(Yt(o)?u:O9(O9({},u),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Qf.displayName="LabelList";function KAe(t,e){return t?t===!0?Y.createElement(Qf,{key:"labelList-implicit",data:e}):Y.isValidElement(t)||Ft(t)?Y.createElement(Qf,{key:"labelList-implicit",data:e,content:t}):fg(t)?Y.createElement(Qf,Gx({data:e},t,{key:"labelList-implicit"})):null:null}function WAe(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var r=t.children,i=ss(r,Qf).map(function(o,s){return F.cloneElement(o,{data:e,key:"labelList-".concat(s)})});if(!n)return i;var a=KAe(t.label,e);return[a].concat(LAe(i))}Qf.renderCallByParent=WAe;function Q1(t){"@babel/helpers - typeof";return Q1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q1(t)}function W8(){return W8=Object.assign?Object.assign.bind():function(t){for(var e=1;e180),",").concat(+(o>c),`, - `).concat(f.x,",").concat(f.y,` - `);if(i>0){var d=yn(n,r,i,o),g=yn(n,r,i,c);h+="L ".concat(g.x,",").concat(g.y,` - A `).concat(i,",").concat(i,`,0, - `).concat(+(Math.abs(l)>180),",").concat(+(o<=c),`, - `).concat(d.x,",").concat(d.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},qAe=function(e){var n=e.cx,r=e.cy,i=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,s=e.forceCornerRadius,l=e.cornerIsExternal,c=e.startAngle,u=e.endAngle,f=Ua(u-c),h=Ab({cx:n,cy:r,radius:a,angle:c,sign:f,cornerRadius:o,cornerIsExternal:l}),d=h.circleTangency,g=h.lineTangency,p=h.theta,y=Ab({cx:n,cy:r,radius:a,angle:u,sign:-f,cornerRadius:o,cornerIsExternal:l}),m=y.circleTangency,b=y.lineTangency,x=y.theta,A=l?Math.abs(c-u):Math.abs(c-u)-p-x;if(A<0)return s?"M ".concat(g.x,",").concat(g.y,` - a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 - a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 - `):kz({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:c,endAngle:u});var S="M ".concat(g.x,",").concat(g.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(d.x,",").concat(d.y,` - A`).concat(a,",").concat(a,",0,").concat(+(A>180),",").concat(+(f<0),",").concat(m.x,",").concat(m.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,` - `);if(i>0){var E=Ab({cx:n,cy:r,radius:i,angle:c,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),T=E.circleTangency,C=E.lineTangency,N=E.theta,B=Ab({cx:n,cy:r,radius:i,angle:u,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),L=B.circleTangency,U=B.lineTangency,j=B.theta,X=l?Math.abs(c-u):Math.abs(c-u)-N-j;if(X<0&&o===0)return"".concat(S,"L").concat(n,",").concat(r,"Z");S+="L".concat(U.x,",").concat(U.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(L.x,",").concat(L.y,` - A`).concat(i,",").concat(i,",0,").concat(+(X>180),",").concat(+(f>0),",").concat(T.x,",").concat(T.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(C.x,",").concat(C.y,"Z")}else S+="L".concat(n,",").concat(r,"Z");return S},e6e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},_z=function(e){var n=k9(k9({},e6e),e),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,f=n.endAngle,h=n.className;if(o0&&Math.abs(u-f)<360?y=qAe({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(p,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:f}):y=kz({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:u,endAngle:f}),Y.createElement("path",W8({},It(n,!0),{className:d,d:y,role:"img"}))};function K1(t){"@babel/helpers - typeof";return K1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K1(t)}function J8(){return J8=Object.assign?Object.assign.bind():function(t){for(var e=1;e0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function g6e(t,e){return xg(t.getTime(),e.getTime())}function L9(t,e,n){if(t.size!==e.size)return!1;for(var r={},i=t.entries(),a=0,o,s;(o=i.next())&&!o.done;){for(var l=e.entries(),c=!1,u=0;(s=l.next())&&!s.done;){var f=o.value,h=f[0],d=f[1],g=s.value,p=g[0],y=g[1];!c&&!r[u]&&(c=n.equals(h,p,a,u,t,e,n)&&n.equals(d,y,h,p,t,e,n))&&(r[u]=!0),u++}if(!c)return!1;a++}return!0}function y6e(t,e,n){var r=D9(t),i=r.length;if(D9(e).length!==i)return!1;for(var a;i-- >0;)if(a=r[i],a===Bz&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof||!Mz(e,a)||!n.equals(t[a],e[a],a,a,t,e,n))return!1;return!0}function Qg(t,e,n){var r=M9(t),i=r.length;if(M9(e).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=r[i],a===Bz&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof||!Mz(e,a)||!n.equals(t[a],e[a],a,a,t,e,n)||(o=B9(t,a),s=B9(e,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function m6e(t,e){return xg(t.valueOf(),e.valueOf())}function v6e(t,e){return t.source===e.source&&t.flags===e.flags}function $9(t,e,n){if(t.size!==e.size)return!1;for(var r={},i=t.values(),a,o;(a=i.next())&&!a.done;){for(var s=e.values(),l=!1,c=0;(o=s.next())&&!o.done;)!l&&!r[c]&&(l=n.equals(a.value,o.value,a.value,o.value,t,e,n))&&(r[c]=!0),c++;if(!l)return!1}return!0}function b6e(t,e){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}var w6e="[object Arguments]",x6e="[object Boolean]",A6e="[object Date]",E6e="[object Map]",S6e="[object Number]",P6e="[object Object]",O6e="[object RegExp]",T6e="[object Set]",C6e="[object String]",k6e=Array.isArray,U9=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,F9=Object.assign,_6e=Object.prototype.toString.call.bind(Object.prototype.toString);function N6e(t){var e=t.areArraysEqual,n=t.areDatesEqual,r=t.areMapsEqual,i=t.areObjectsEqual,a=t.arePrimitiveWrappersEqual,o=t.areRegExpsEqual,s=t.areSetsEqual,l=t.areTypedArraysEqual;return function(u,f,h){if(u===f)return!0;if(u==null||f==null||typeof u!="object"||typeof f!="object")return u!==u&&f!==f;var d=u.constructor;if(d!==f.constructor)return!1;if(d===Object)return i(u,f,h);if(k6e(u))return e(u,f,h);if(U9!=null&&U9(u))return l(u,f,h);if(d===Date)return n(u,f,h);if(d===RegExp)return o(u,f,h);if(d===Map)return r(u,f,h);if(d===Set)return s(u,f,h);var g=_6e(u);return g===A6e?n(u,f,h):g===O6e?o(u,f,h):g===E6e?r(u,f,h):g===T6e?s(u,f,h):g===P6e?typeof u.then!="function"&&typeof f.then!="function"&&i(u,f,h):g===w6e?i(u,f,h):g===x6e||g===S6e||g===C6e?a(u,f,h):!1}}function I6e(t){var e=t.circular,n=t.createCustomConfig,r=t.strict,i={areArraysEqual:r?Qg:p6e,areDatesEqual:g6e,areMapsEqual:r?R9(L9,Qg):L9,areObjectsEqual:r?Qg:y6e,arePrimitiveWrappersEqual:m6e,areRegExpsEqual:v6e,areSetsEqual:r?R9($9,Qg):$9,areTypedArraysEqual:r?Qg:b6e};if(n&&(i=F9({},i,n(i))),e){var a=Sb(i.areArraysEqual),o=Sb(i.areMapsEqual),s=Sb(i.areObjectsEqual),l=Sb(i.areSetsEqual);i=F9({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return i}function R6e(t){return function(e,n,r,i,a,o,s){return t(e,n,s)}}function M6e(t){var e=t.circular,n=t.comparator,r=t.createState,i=t.equals,a=t.strict;if(r)return function(l,c){var u=r(),f=u.cache,h=f===void 0?e?new WeakMap:void 0:f,d=u.meta;return n(l,c,{cache:h,equals:i,meta:d,strict:a})};if(e)return function(l,c){return n(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,c){return n(l,c,o)}}var B6e=hu();hu({strict:!0});hu({circular:!0});hu({circular:!0,strict:!0});hu({createInternalComparator:function(){return xg}});hu({strict:!0,createInternalComparator:function(){return xg}});hu({circular:!0,createInternalComparator:function(){return xg}});hu({circular:!0,createInternalComparator:function(){return xg},strict:!0});function hu(t){t===void 0&&(t={});var e=t.circular,n=e===void 0?!1:e,r=t.createInternalComparator,i=t.createState,a=t.strict,o=a===void 0?!1:a,s=I6e(t),l=N6e(s),c=r?r(l):R6e(l);return M6e({circular:n,comparator:l,createState:i,equals:c,strict:o})}function D6e(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function j9(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>e?(t(a),n=-1):D6e(i)};requestAnimationFrame(r)}function X8(t){"@babel/helpers - typeof";return X8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X8(t)}function L6e(t){return j6e(t)||F6e(t)||U6e(t)||$6e()}function $6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U6e(t,e){if(t){if(typeof t=="string")return z9(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z9(t,e)}}function z9(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?1:m<0?0:m},p=function(m){for(var b=m>1?1:m,x=b,A=0;A<8;++A){var S=f(x)-b,E=d(x);if(Math.abs(S-b)0&&arguments[0]!==void 0?arguments[0]:{},n=e.stiff,r=n===void 0?100:n,i=e.damping,a=i===void 0?8:i,o=e.dt,s=o===void 0?17:o,l=function(u,f,h){var d=-(u-f)*r,g=h*a,p=h+(d-g)*s/1e3,y=h*s/1e3+u;return Math.abs(y-f)t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function vEe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function DE(t){return AEe(t)||xEe(t)||wEe(t)||bEe()}function bEe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wEe(t,e){if(t){if(typeof t=="string")return nS(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nS(t,e)}}function xEe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function AEe(t){if(Array.isArray(t))return nS(t)}function nS(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kx(t){return Kx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kx(t)}var tu=function(t){OEe(n,t);var e=TEe(n);function n(r,i){var a;EEe(this,n),a=e.call(this,r,i);var o=a.props,s=o.isActive,l=o.attributeName,c=o.from,u=o.to,f=o.steps,h=o.children,d=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(aS(a)),a.changeStyle=a.changeStyle.bind(aS(a)),!s||d<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:u}),iS(a);if(f&&f.length)a.state={style:f[0].style};else if(c){if(typeof h=="function")return a.state={style:c},iS(a);a.state={style:l?py({},l,c):c}}else a.state={style:{}};return a}return SEe(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,c=a.shouldReAnimate,u=a.to,f=a.from,h=this.state.style;if(s){if(!o){var d={style:l?py({},l,u):u};this.state&&h&&(l&&h[l]!==u||!l&&h!==u)&&this.setState(d);return}if(!(B6e(i.to,u)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=g||c?f:i.to;if(this.state&&h){var y={style:l?py({},l,p):p};(l&&[l]!==p||!l&&h!==p)&&this.setState(y)}this.runAnimation(qa(qa({},this.props),{},{from:p,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,c=i.easing,u=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,d=gEe(o,s,iEe(c),l,this.changeStyle),g=function(){a.stopJSAnimation=d()};this.manager.start([h,u,g,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,c=o[0],u=c.style,f=c.duration,h=f===void 0?0:f,d=function(p,y,m){if(m===0)return p;var b=y.duration,x=y.easing,A=x===void 0?"ease":x,S=y.style,E=y.properties,T=y.onAnimationEnd,C=m>0?o[m-1]:y,N=E||Object.keys(S);if(typeof A=="function"||A==="spring")return[].concat(DE(p),[a.runJSAnimation.bind(a,{from:C.style,to:S,duration:b,easing:A}),b]);var B=V9(N,b,A),L=qa(qa(qa({},C.style),S),{},{transition:B});return[].concat(DE(p),[L,b,T]).filter(Q6e)};return this.manager.start([l].concat(DE(o.reduce(d,[u,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=z6e());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,c=i.easing,u=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,d=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof c=="function"||typeof d=="function"||c==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var p=s?py({},s,l):l,y=V9(Object.keys(p),o,c);g.start([u,a,qa(qa({},p),{},{transition:y}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=mEe(i,yEe),c=F.Children.count(a),u=this.state.style;if(typeof a=="function")return a(u);if(!s||c===0||o<=0)return a;var f=function(d){var g=d.props,p=g.style,y=p===void 0?{}:p,m=g.className,b=F.cloneElement(d,qa(qa({},l),{},{style:qa(qa({},y),u),className:m}));return b};return c===1?f(F.Children.only(a)):Y.createElement("div",null,F.Children.map(a,function(h){return f(h)}))}}]),n}(F.PureComponent);tu.displayName="Animate";tu.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};tu.propTypes={from:kt.oneOfType([kt.object,kt.string]),to:kt.oneOfType([kt.object,kt.string]),attributeName:kt.string,duration:kt.number,begin:kt.number,easing:kt.oneOfType([kt.string,kt.func]),steps:kt.arrayOf(kt.shape({duration:kt.number.isRequired,style:kt.object.isRequired,easing:kt.oneOfType([kt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),kt.func]),properties:kt.arrayOf("string"),onAnimationEnd:kt.func})),children:kt.oneOfType([kt.node,kt.func]),isActive:kt.bool,canBegin:kt.bool,onAnimationEnd:kt.func,shouldReAnimate:kt.bool,onAnimationStart:kt.func,onAnimationReStart:kt.func};kt.object,kt.object,kt.object,kt.element;kt.object,kt.object,kt.object,kt.oneOfType([kt.array,kt.element]),kt.any;function Y1(t){"@babel/helpers - typeof";return Y1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y1(t)}function Wx(){return Wx=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0?1:-1,l=r>=0?1:-1,c=i>=0&&r>=0||i<0&&r<0?1:0,u;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,d=4;ho?o:a[h];u="M".concat(e,",").concat(n+s*f[0]),f[0]>0&&(u+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(c,",").concat(e+l*f[0],",").concat(n)),u+="L ".concat(e+r-l*f[1],",").concat(n),f[1]>0&&(u+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(c,`, - `).concat(e+r,",").concat(n+s*f[1])),u+="L ".concat(e+r,",").concat(n+i-s*f[2]),f[2]>0&&(u+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(c,`, - `).concat(e+r-l*f[2],",").concat(n+i)),u+="L ".concat(e+l*f[3],",").concat(n+i),f[3]>0&&(u+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(c,`, - `).concat(e,",").concat(n+i-s*f[3])),u+="Z"}else if(o>0&&a===+a&&a>0){var g=Math.min(o,a);u="M ".concat(e,",").concat(n+s*g,` - A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e+l*g,",").concat(n,` - L `).concat(e+r-l*g,",").concat(n,` - A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e+r,",").concat(n+s*g,` - L `).concat(e+r,",").concat(n+i-s*g,` - A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e+r-l*g,",").concat(n+i,` - L `).concat(e+l*g,",").concat(n+i,` - A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e,",").concat(n+i-s*g," Z")}else u="M ".concat(e,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return u},LEe=function(e,n){if(!e||!n)return!1;var r=e.x,i=e.y,a=n.x,o=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(a,a+s),u=Math.max(a,a+s),f=Math.min(o,o+l),h=Math.max(o,o+l);return r>=c&&r<=u&&i>=f&&i<=h}return!1},$Ee={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},k4=function(e){var n=eR(eR({},$Ee),e),r=F.useRef(),i=F.useState(-1),a=kEe(i,2),o=a[0],s=a[1];F.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&s(A)}catch{}},[]);var l=n.x,c=n.y,u=n.width,f=n.height,h=n.radius,d=n.className,g=n.animationEasing,p=n.animationDuration,y=n.animationBegin,m=n.isAnimationActive,b=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||u===0||f===0)return null;var x=On("recharts-rectangle",d);return b?Y.createElement(tu,{canBegin:o>0,from:{width:u,height:f,x:l,y:c},to:{width:u,height:f,x:l,y:c},duration:p,animationEasing:g,isActive:b},function(A){var S=A.width,E=A.height,T=A.x,C=A.y;return Y.createElement(tu,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:p,isActive:m,easing:g},Y.createElement("path",Wx({},It(n,!0),{className:x,d:tR(T,C,S,E,h),ref:r})))}):Y.createElement("path",Wx({},It(n,!0),{className:x,d:tR(l,c,u,f,h)}))},UEe=["points","className","baseLinePoints","connectNulls"];function yd(){return yd=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function jEe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function nR(t){return VEe(t)||GEe(t)||HEe(t)||zEe()}function zEe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HEe(t,e){if(t){if(typeof t=="string")return oS(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oS(t,e)}}function GEe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function VEe(t){if(Array.isArray(t))return oS(t)}function oS(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return e.forEach(function(r){rR(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),rR(e[0])&&n[n.length-1].push(e[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},By=function(e,n){var r=QEe(e);n&&(r=[r.reduce(function(a,o){return[].concat(nR(a),nR(o))},[])]);var i=r.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},KEe=function(e,n,r){var i=By(e,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(By(n.reverse(),r).slice(1))},WEe=function(e){var n=e.points,r=e.className,i=e.baseLinePoints,a=e.connectNulls,o=FEe(e,UEe);if(!n||!n.length)return null;var s=On("recharts-polygon",r);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",c=KEe(n,i,a);return Y.createElement("g",{className:s},Y.createElement("path",yd({},It(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:c})),l?Y.createElement("path",yd({},It(o,!0),{fill:"none",d:By(n,a)})):null,l?Y.createElement("path",yd({},It(o,!0),{fill:"none",d:By(i,a)})):null)}var u=By(n,a);return Y.createElement("path",yd({},It(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",className:s,d:u}))};function sS(){return sS=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function t5e(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var n5e=function(e,n,r,i,a,o){return"M".concat(e,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},r5e=function(e){var n=e.x,r=n===void 0?0:n,i=e.y,a=i===void 0?0:i,o=e.top,s=o===void 0?0:o,l=e.left,c=l===void 0?0:l,u=e.width,f=u===void 0?0:u,h=e.height,d=h===void 0?0:h,g=e.className,p=e5e(e,JEe),y=YEe({x:r,y:a,top:s,left:c,width:f,height:d},p);return!je(r)||!je(a)||!je(f)||!je(d)||!je(s)||!je(c)?null:Y.createElement("path",lS({},It(y,!0),{className:On("recharts-cross",g),d:n5e(r,a,f,d,s,c)}))},i5e=jA,a5e=sz,o5e=cu;function s5e(t,e){return t&&t.length?i5e(t,o5e(e),a5e):void 0}var l5e=s5e;const c5e=Xt(l5e);var u5e=jA,f5e=cu,h5e=lz;function d5e(t,e){return t&&t.length?u5e(t,f5e(e),h5e):void 0}var p5e=d5e;const g5e=Xt(p5e);var y5e=["cx","cy","angle","ticks","axisLine"],m5e=["ticks","tick","angle","tickFormatter","stroke"];function Vp(t){"@babel/helpers - typeof";return Vp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vp(t)}function Dy(){return Dy=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function v5e(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function b5e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sR(t,e){for(var n=0;nuR?o=i==="outer"?"start":"end":a<-uR?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.radius,s=r.axisLine,l=r.axisLineType,c=bu(bu({},It(this.props,!1)),{},{fill:"none"},It(s,!1));if(l==="circle")return Y.createElement(_4,Cu({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:a,r:o}));var u=this.props.ticks,f=u.map(function(h){return yn(i,a,o,h.coordinate)});return Y.createElement(WEe,Cu({className:"recharts-polar-angle-axis-line"},c,{points:f}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,c=i.stroke,u=It(this.props,!1),f=It(o,!1),h=bu(bu({},u),{},{fill:"none"},It(s,!1)),d=a.map(function(g,p){var y=r.getTickLineCoord(g),m=r.getTickTextAnchor(g),b=bu(bu(bu({textAnchor:m},u),{},{stroke:"none",fill:c},f),{},{index:p,payload:g,x:y.x2,y:y.y2});return Y.createElement(Hn,Cu({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(g.coordinate)},TA(r.props,g,p)),s&&Y.createElement("line",Cu({className:"recharts-polar-angle-axis-tick-line"},h,y)),o&&e.renderTickItem(o,b,l?l(g.value,p):g.value))});return Y.createElement(Hn,{className:"recharts-polar-angle-axis-ticks"},d)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.radius,o=r.axisLine;return a<=0||!i||!i.length?null:Y.createElement(Hn,{className:"recharts-polar-angle-axis"},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,a){var o;return Y.isValidElement(r)?o=Y.cloneElement(r,i):Ft(r)?o=r(i):o=Y.createElement(Up,Cu({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}]),e}(F.PureComponent);WA(JA,"displayName","PolarAngleAxis");WA(JA,"axisType","angleAxis");WA(JA,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var M5e=rj,B5e=M5e(Object.getPrototypeOf,Object),D5e=B5e,L5e=Ml,$5e=D5e,U5e=Bl,F5e="[object Object]",j5e=Function.prototype,z5e=Object.prototype,Qz=j5e.toString,H5e=z5e.hasOwnProperty,G5e=Qz.call(Object);function V5e(t){if(!U5e(t)||L5e(t)!=F5e)return!1;var e=$5e(t);if(e===null)return!0;var n=H5e.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Qz.call(n)==G5e}var Q5e=V5e;const K5e=Xt(Q5e);var W5e=Ml,J5e=Bl,Y5e="[object Boolean]";function X5e(t){return t===!0||t===!1||J5e(t)&&W5e(t)==Y5e}var Z5e=X5e;const q5e=Xt(Z5e);function Z1(t){"@babel/helpers - typeof";return Z1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z1(t)}function Xx(){return Xx=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:u,lowerWidth:f,height:h,x:l,y:c},duration:p,animationEasing:g,isActive:m},function(x){var A=x.upperWidth,S=x.lowerWidth,E=x.height,T=x.x,C=x.y;return Y.createElement(tu,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:p,easing:g},Y.createElement("path",Xx({},It(n,!0),{className:b,d:pR(T,C,A,S,E),ref:r})))}):Y.createElement("g",null,Y.createElement("path",Xx({},It(n,!0),{className:b,d:pR(l,c,u,f,h)})))},u3e=["option","shapeType","propTransformer","activeClassName","isActive"];function q1(t){"@babel/helpers - typeof";return q1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q1(t)}function f3e(t,e){if(t==null)return{};var n=h3e(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function h3e(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function gR(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zx(t){for(var e=1;e0?Po(x,"paddingAngle",0):0;if(S){var T=oN(S.endAngle-S.startAngle,x.endAngle-x.startAngle),C=An(An({},x),{},{startAngle:b+E,endAngle:b+T(p)+E});y.push(C),b=C.endAngle}else{var N=x.endAngle,B=x.startAngle,L=oN(0,N-B),U=L(p),j=An(An({},x),{},{startAngle:b+E,endAngle:b+U+E});y.push(j),b=j.endAngle}}),Y.createElement(Hn,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,a=r.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!S4(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,c=i.cx,u=i.cy,f=i.innerRadius,h=i.outerRadius,d=i.isAnimationActive,g=this.state.isAnimationFinished;if(a||!o||!o.length||!je(c)||!je(u)||!je(f)||!je(h))return null;var p=On("recharts-pie",s);return Y.createElement(Hn,{tabIndex:this.props.rootTabIndex,className:p,ref:function(m){r.pieRef=m}},this.renderSectors(),l&&this.renderLabels(o),Sr.renderCallByParent(this.props,null,!1),(!d||g)&&Qf.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r=360?b:b-1)*l,A=y-b*d-x,S=r.reduce(function(C,N){var B=aa(N,m,0);return C+(je(B)?B:0)},0),E;if(S>0){var T;E=r.map(function(C,N){var B=aa(C,m,0),L=aa(C,u,N),U=(je(B)?B:0)/S,j;N?j=T.endAngle+Ua(p)*l*(B!==0?1:0):j=o;var X=j+Ua(p)*((B!==0?d:0)+U*A),G=(j+X)/2,H=(g.innerRadius+g.outerRadius)/2,re=[{name:L,value:B,payload:C,dataKey:m,type:h}],V=yn(g.cx,g.cy,H,G);return T=An(An(An({percent:U,cornerRadius:a,name:L,tooltipPayload:re,midAngle:G,middleRadius:H,tooltipPosition:V},C),g),{},{value:aa(C,m),startAngle:j,endAngle:X,payload:C,paddingAngle:Ua(p)*l}),T})}return An(An({},g),{},{sectors:E,data:r})});var R3e=Math.ceil,M3e=Math.max;function B3e(t,e,n,r){for(var i=-1,a=M3e(R3e((e-t)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=t,t+=n;return o}var D3e=B3e,L3e=Aj,bR=1/0,$3e=17976931348623157e292;function U3e(t){if(!t)return t===0?t:0;if(t=L3e(t),t===bR||t===-bR){var e=t<0?-1:1;return e*$3e}return t===t?t:0}var F3e=U3e,j3e=D3e,z3e=MA,LE=F3e;function H3e(t){return function(e,n,r){return r&&typeof r!="number"&&z3e(e,n,r)&&(n=r=void 0),e=LE(e),n===void 0?(n=e,e=0):n=LE(n),r=r===void 0?e0&&r.handleDrag(i.changedTouches[0])}),Wi(Bo(r),"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),Wi(Bo(r),"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Wi(Bo(r),"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Wi(Bo(r),"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Wi(Bo(r),"handleSlideDragStart",function(i){var a=SR(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(Bo(r),"startX"),endX:r.handleTravellerDragStart.bind(Bo(r),"endX")},r.state={},r}return q3e(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,f=Math.min(i,a),h=Math.max(i,a),d=e.getIndexInRange(o,f),g=e.getIndexInRange(o,h);return{startIndex:d-d%l,endIndex:g===u?u:g-g%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=aa(a[r],s,r);return Ft(o)?o(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,c=l.x,u=l.width,f=l.travellerWidth,h=l.startIndex,d=l.endIndex,g=l.onChange,p=r.pageX-a;p>0?p=Math.min(p,c+u-f-s,c+u-f-o):p<0&&(p=Math.max(p,c-o,c-s));var y=this.getIndex({startX:o+p,endX:s+p});(y.startIndex!==h||y.endIndex!==d)&&g&&g(y),this.setState({startX:o+p,endX:s+p,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=SR(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,c=this.state[o],u=this.props,f=u.x,h=u.width,d=u.travellerWidth,g=u.onChange,p=u.gap,y=u.data,m={startX:this.state.startX,endX:this.state.endX},b=r.pageX-a;b>0?b=Math.min(b,f+h-d-c):b<0&&(b=Math.max(b,f-c)),m[o]=c+b;var x=this.getIndex(m),A=x.startIndex,S=x.endIndex,E=function(){var C=y.length-1;return o==="startX"&&(s>l?A%p===0:S%p===0)||sl?S%p===0:A%p===0)||s>l&&S===C};this.setState(Wi(Wi({},o,c+b),"brushMoveStartX",r.pageX),function(){g&&E()&&g(x)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,c=o.endX,u=this.state[i],f=s.indexOf(u);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var d=s[h];i==="startX"&&d>=c||i==="endX"&&d<=l||this.setState(Wi({},i,d),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.fill,c=r.stroke;return Y.createElement("rect",{stroke:c,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,f=F.Children.only(c);return f?Y.cloneElement(f,{x:i,y:a,width:o,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var a=this,o=this.props,s=o.y,l=o.travellerWidth,c=o.height,u=o.traveller,f=o.ariaLabel,h=o.data,d=o.startIndex,g=o.endIndex,p=Math.max(r,this.props.x),y=$E($E({},It(this.props,!1)),{},{x:p,y:s,width:l,height:c}),m=f||"Min value: ".concat(h[d].name,", Max value: ").concat(h[g].name);return Y.createElement(Hn,{tabIndex:0,role:"slider","aria-label":m,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(x){["ArrowLeft","ArrowRight"].includes(x.key)&&(x.preventDefault(),x.stopPropagation(),a.handleTravellerMoveKeyboard(x.key==="ArrowRight"?1:-1,i))},onFocus:function(){a.setState({isTravellerFocused:!0})},onBlur:function(){a.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(u,y))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,c=a.travellerWidth,u=Math.min(r,i)+c,f=Math.max(Math.abs(i-r)-c,0);return Y.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:o,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,f=u.startX,h=u.endX,d=5,g={pointerEvents:"none",fill:c};return Y.createElement(Hn,{className:"recharts-brush-texts"},Y.createElement(Up,t2({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-d,y:o+s/2},g),this.getTextOfTick(i)),Y.createElement(Up,t2({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+d,y:o+s/2},g),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,s=r.x,l=r.y,c=r.width,u=r.height,f=r.alwaysShowText,h=this.state,d=h.startX,g=h.endX,p=h.isTextActive,y=h.isSlideMoving,m=h.isTravellerMoving,b=h.isTravellerFocused;if(!i||!i.length||!je(s)||!je(l)||!je(c)||!je(u)||c<=0||u<=0)return null;var x=On("recharts-brush",a),A=Y.Children.count(o)===1,S=X3e("userSelect","none");return Y.createElement(Hn,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(d,g),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(g,"endX"),(p||y||m||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,s=r.height,l=r.stroke,c=Math.floor(a+s/2)-1;return Y.createElement(Y.Fragment,null,Y.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),Y.createElement("line",{x1:i+1,y1:c,x2:i+o-1,y2:c,fill:"none",stroke:"#fff"}),Y.createElement("line",{x1:i+1,y1:c+2,x2:i+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return Y.isValidElement(r)?a=Y.cloneElement(r,i):Ft(r)?a=r(i):a=e.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,f=r.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return $E({prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o},a&&a.length?i8e({data:a,width:o,x:s,travellerWidth:l,startIndex:u,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(d){return i.scale(d)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);r[l]>i?s=l:o=l}return i>=r[s]?s:o}}]),e}(F.PureComponent);Wi(Jp,"displayName","Brush");Wi(Jp,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var a8e=ZO;function o8e(t,e){var n;return a8e(t,function(r,i,a){return n=e(r,i,a),!n}),!!n}var s8e=o8e,l8e=JF,c8e=cu,u8e=s8e,f8e=Fi,h8e=MA;function d8e(t,e,n){var r=f8e(t)?l8e:u8e;return n&&h8e(t,e,n)&&(e=void 0),r(t,c8e(e))}var p8e=d8e;const g8e=Xt(p8e);var cs=function(e,n){var r=e.alwaysShow,i=e.ifOverflow;return r&&(i="extendDomain"),i===n},PR=mj;function y8e(t,e,n){e=="__proto__"&&PR?PR(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var m8e=y8e,v8e=m8e,b8e=gj,w8e=cu;function x8e(t,e){var n={};return e=w8e(e),b8e(t,function(r,i,a){v8e(n,i,e(r,i,a))}),n}var A8e=x8e;const E8e=Xt(A8e);function S8e(t,e){for(var n=-1,r=t==null?0:t.length;++n1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new t(n)}}]),t}();N4(eH,"EPS",1e-4);var I4=function(e){var n=Object.keys(e).reduce(function(r,i){return Pb(Pb({},r),{},N4({},i,eH.create(e[i])))},{});return Pb(Pb({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return E8e(i,function(l,c){return n[c].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return D8e(i,function(a,o){return n[o].isInRange(a)})}})},j8e=Fle(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),tH=F.createContext(void 0),nH=F.createContext(void 0),rH=F.createContext(void 0),z8e=F.createContext({}),iH=F.createContext(void 0),H8e=F.createContext(0),G8e=F.createContext(0),CR=function(e){var n=e.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=e.clipPathId,s=e.children,l=e.width,c=e.height,u=j8e(a);return Y.createElement(tH.Provider,{value:r},Y.createElement(nH.Provider,{value:i},Y.createElement(z8e.Provider,{value:a},Y.createElement(rH.Provider,{value:u},Y.createElement(iH.Provider,{value:o},Y.createElement(H8e.Provider,{value:c},Y.createElement(G8e.Provider,{value:l},s)))))))},V8e=function(){return F.useContext(iH)},Q8e=function(e){var n=F.useContext(tH);n==null&&Hp(!1);var r=n[e];return r==null&&Hp(!1),r},K8e=function(e){var n=F.useContext(nH);n==null&&Hp(!1);var r=n[e];return r==null&&Hp(!1),r},W8e=function(){var e=F.useContext(rH);return e};function rm(t){"@babel/helpers - typeof";return rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rm(t)}function kR(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _R(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function BSe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}function DSe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jR(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0?o:e&&e.length&&je(i)&&je(a)?e.slice(i,a+1):[]};function hH(t){return t==="number"?[0,"auto"]:void 0}var wS=function(e,n,r,i){var a=e.graphicalItems,o=e.tooltipAxis,s=ZA(n,e);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(l,c){var u,f=(u=c.props.data)!==null&&u!==void 0?u:n;f&&e.dataStartIndex+e.dataEndIndex!==0&&(f=f.slice(e.dataStartIndex,e.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var d=f===void 0?s:f;h=i8(d,o.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(Xp(l),[q2e(c,h)]):l},[])},HR=function(e,n,r,i){var a=i||{x:e.chartX,y:e.chartY},o=KSe(a,r),s=e.orderedTooltipTicks,l=e.tooltipAxis,c=e.tooltipTicks,u=L2e(o,s,c,l);if(u>=0&&c){var f=c[u]&&c[u].value,h=wS(e,n,u,f),d=WSe(r,s,u,a);return{activeTooltipIndex:u,activeLabel:f,activePayload:h,activeCoordinate:d}}return null},JSe=function(e,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.layout,f=e.children,h=e.stackOffset,d=Sz(u,a);return r.reduce(function(g,p){var y,m=p.props,b=m.type,x=m.dataKey,A=m.allowDataOverflow,S=m.allowDuplicatedCategory,E=m.scale,T=m.ticks,C=m.includeHidden,N=p.props[o];if(g[N])return g;var B=ZA(e.data,{graphicalItems:i.filter(function(we){return we.props[o]===N}),dataStartIndex:l,dataEndIndex:c}),L=B.length,U,j,X;ESe(p.props.domain,A,b)&&(U=G8(p.props.domain,null,A),d&&(b==="number"||E!=="auto")&&(X=Ry(B,x,"category")));var G=hH(b);if(!U||U.length===0){var H,re=(H=p.props.domain)!==null&&H!==void 0?H:G;if(x){if(U=Ry(B,x,b),b==="category"&&d){var V=Uce(U);S&&V?(j=U,U=e2(0,L)):S||(U=w9(re,U,p).reduce(function(we,Ye){return we.indexOf(Ye)>=0?we:[].concat(Xp(we),[Ye])},[]))}else if(b==="category")S?U=U.filter(function(we){return we!==""&&!Yt(we)}):U=w9(re,U,p).reduce(function(we,Ye){return we.indexOf(Ye)>=0||Ye===""||Yt(Ye)?we:[].concat(Xp(we),[Ye])},[]);else if(b==="number"){var ee=z2e(B,i.filter(function(we){return we.props[o]===N&&(C||!we.props.hide)}),x,a,u);ee&&(U=ee)}d&&(b==="number"||E!=="auto")&&(X=Ry(B,x,"category"))}else d?U=e2(0,L):s&&s[N]&&s[N].hasStack&&b==="number"?U=h==="expand"?[0,1]:Pz(s[N].stackGroups,l,c):U=Ez(B,i.filter(function(we){return we.props[o]===N&&(C||!we.props.hide)}),b,u,!0);if(b==="number")U=mS(f,U,N,a,T),re&&(U=G8(re,U,A));else if(b==="category"&&re){var pe=re,Ae=U.every(function(we){return pe.indexOf(we)>=0});Ae&&(U=pe)}}return he(he({},g),{},bt({},N,he(he({},p.props),{},{axisType:a,domain:U,categoricalDomain:X,duplicateDomain:j,originalDomain:(y=p.props.domain)!==null&&y!==void 0?y:G,isCategorical:d,layout:u})))},{})},YSe=function(e,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.layout,f=e.children,h=ZA(e.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),d=h.length,g=Sz(u,a),p=-1;return r.reduce(function(y,m){var b=m.props[o],x=hH("number");if(!y[b]){p++;var A;return g?A=e2(0,d):s&&s[b]&&s[b].hasStack?(A=Pz(s[b].stackGroups,l,c),A=mS(f,A,b,a)):(A=G8(x,Ez(h,r.filter(function(S){return S.props[o]===b&&!S.props.hide}),"number",u),i.defaultProps.allowDataOverflow),A=mS(f,A,b,a)),he(he({},y),{},bt({},b,he(he({axisType:a},i.defaultProps),{},{hide:!0,orientation:Po(VSe,"".concat(a,".").concat(p%2),null),domain:A,originalDomain:x,isCategorical:g,layout:u})))}return y},{})},XSe=function(e,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.children,f="".concat(i,"Id"),h=ss(u,a),d={};return h&&h.length?d=JSe(e,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(d=YSe(e,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),d},ZSe=function(e){var n=Gh(e),r=dy(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:qO(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:V8(n,r)}},GR=function(e){var n=e.children,r=e.defaultShowTooltip,i=Ra(n,Jp),a=0,o=0;return e.data&&e.data.length!==0&&(o=e.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},qSe=function(e){return!e||!e.length?!1:e.some(function(n){var r=pl(n&&n.type);return r&&r.indexOf("Bar")>=0})},VR=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},ePe=function(e,n){var r=e.props,i=e.graphicalItems,a=e.xAxisMap,o=a===void 0?{}:a,s=e.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,f=r.children,h=r.margin||{},d=Ra(f,Jp),g=Ra(f,T1),p=Object.keys(l).reduce(function(S,E){var T=l[E],C=T.orientation;return!T.mirror&&!T.hide?he(he({},S),{},bt({},C,S[C]+T.width)):S},{left:h.left||0,right:h.right||0}),y=Object.keys(o).reduce(function(S,E){var T=o[E],C=T.orientation;return!T.mirror&&!T.hide?he(he({},S),{},bt({},C,Po(S,"".concat(C))+T.height)):S},{top:h.top||0,bottom:h.bottom||0}),m=he(he({},y),p),b=m.bottom;d&&(m.bottom+=d.props.height||Jp.defaultProps.height),g&&n&&(m=F2e(m,i,r,n));var x=c-m.left-m.right,A=u-m.top-m.bottom;return he(he({brushBottom:b},m),{},{width:Math.max(x,0),height:Math.max(A,0)})},tPe=function(e){var n,r=e.chartName,i=e.GraphicalChild,a=e.defaultTooltipEventType,o=a===void 0?"axis":a,s=e.validateTooltipEventTypes,l=s===void 0?["axis"]:s,c=e.axisComponents,u=e.legendContent,f=e.formatAxisMap,h=e.defaultProps,d=function(y,m){var b=m.graphicalItems,x=m.stackGroups,A=m.offset,S=m.updateId,E=m.dataStartIndex,T=m.dataEndIndex,C=y.barSize,N=y.layout,B=y.barGap,L=y.barCategoryGap,U=y.maxBarSize,j=VR(N),X=j.numericAxisName,G=j.cateAxisName,H=qSe(b),re=H&&$2e({barSize:C,stackGroups:x}),V=[];return b.forEach(function(ee,pe){var Ae=ZA(y.data,{graphicalItems:[ee],dataStartIndex:E,dataEndIndex:T}),we=ee.props,Ye=we.dataKey,nt=we.maxBarSize,De=ee.props["".concat(X,"Id")],st=ee.props["".concat(G,"Id")],Tt={},ln=c.reduce(function(yt,Pe){var nn=m["".concat(Pe.axisType,"Map")],cn=ee.props["".concat(Pe.axisType,"Id")];nn&&nn[cn]||Pe.axisType==="zAxis"||Hp(!1);var Gn=nn[cn];return he(he({},yt),{},bt(bt({},Pe.axisType,Gn),"".concat(Pe.axisType,"Ticks"),dy(Gn)))},Tt),Ee=ln[G],ne=ln["".concat(G,"Ticks")],le=x&&x[De]&&x[De].hasStack&&X2e(ee,x[De].stackGroups),te=pl(ee.type).indexOf("Bar")>=0,Ce=V8(Ee,ne),Se=[];if(te){var ze,$e,rt=Yt(nt)?U:nt,dt=(ze=($e=V8(Ee,ne,!0))!==null&&$e!==void 0?$e:rt)!==null&&ze!==void 0?ze:0;Se=U2e({barGap:B,barCategoryGap:L,bandSize:dt!==Ce?dt:Ce,sizeList:re[st],maxBarSize:rt}),dt!==Ce&&(Se=Se.map(function(yt){return he(he({},yt),{},{position:he(he({},yt.position),{},{offset:yt.position.offset-dt/2})})}))}var wt=ee&&ee.type&&ee.type.getComposedData;wt&&V.push({props:he(he({},wt(he(he({},ln),{},{displayedData:Ae,props:y,dataKey:Ye,item:ee,bandSize:Ce,barPosition:Se,offset:A,stackedData:le,layout:N,dataStartIndex:E,dataEndIndex:T}))),{},bt(bt(bt({key:ee.key||"item-".concat(pe)},X,ln[X]),G,ln[G]),"animationId",S)),childIndex:Yce(ee,y.children),item:ee})}),V},g=function(y,m){var b=y.props,x=y.dataStartIndex,A=y.dataEndIndex,S=y.updateId;if(!fN({props:b}))return null;var E=b.children,T=b.layout,C=b.stackOffset,N=b.data,B=b.reverseStackOrder,L=VR(T),U=L.numericAxisName,j=L.cateAxisName,X=ss(E,i),G=J2e(N,X,"".concat(U,"Id"),"".concat(j,"Id"),C,B),H=c.reduce(function(Ae,we){var Ye="".concat(we.axisType,"Map");return he(he({},Ae),{},bt({},Ye,XSe(b,he(he({},we),{},{graphicalItems:X,stackGroups:we.axisType===U&&G,dataStartIndex:x,dataEndIndex:A}))))},{}),re=ePe(he(he({},H),{},{props:b,graphicalItems:X}),m==null?void 0:m.legendBBox);Object.keys(H).forEach(function(Ae){H[Ae]=f(b,H[Ae],re,Ae.replace("Map",""),r)});var V=H["".concat(j,"Map")],ee=ZSe(V),pe=d(b,he(he({},H),{},{dataStartIndex:x,dataEndIndex:A,updateId:S,graphicalItems:X,stackGroups:G,offset:re}));return he(he({formattedGraphicalItems:pe,graphicalItems:X,offset:re,stackGroups:G},ee),H)};return n=function(p){FSe(y,p);function y(m){var b,x,A;return DSe(this,y),A=$Se(this,y,[m]),bt(Qt(A),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),bt(Qt(A),"accessibilityManager",new ASe),bt(Qt(A),"handleLegendBBoxUpdate",function(S){if(S){var E=A.state,T=E.dataStartIndex,C=E.dataEndIndex,N=E.updateId;A.setState(he({legendBBox:S},g({props:A.props,dataStartIndex:T,dataEndIndex:C,updateId:N},he(he({},A.state),{},{legendBBox:S}))))}}),bt(Qt(A),"handleReceiveSyncEvent",function(S,E,T){if(A.props.syncId===S){if(T===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(E)}}),bt(Qt(A),"handleBrushChange",function(S){var E=S.startIndex,T=S.endIndex;if(E!==A.state.dataStartIndex||T!==A.state.dataEndIndex){var C=A.state.updateId;A.setState(function(){return he({dataStartIndex:E,dataEndIndex:T},g({props:A.props,dataStartIndex:E,dataEndIndex:T,updateId:C},A.state))}),A.triggerSyncEvent({dataStartIndex:E,dataEndIndex:T})}}),bt(Qt(A),"handleMouseEnter",function(S){var E=A.getMouseInfo(S);if(E){var T=he(he({},E),{},{isTooltipActive:!0});A.setState(T),A.triggerSyncEvent(T);var C=A.props.onMouseEnter;Ft(C)&&C(T,S)}}),bt(Qt(A),"triggeredAfterMouseMove",function(S){var E=A.getMouseInfo(S),T=E?he(he({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(T),A.triggerSyncEvent(T);var C=A.props.onMouseMove;Ft(C)&&C(T,S)}),bt(Qt(A),"handleItemMouseEnter",function(S){A.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),bt(Qt(A),"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),bt(Qt(A),"handleMouseMove",function(S){S.persist(),A.throttleTriggeredAfterMouseMove(S)}),bt(Qt(A),"handleMouseLeave",function(S){A.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};A.setState(E),A.triggerSyncEvent(E);var T=A.props.onMouseLeave;Ft(T)&&T(E,S)}),bt(Qt(A),"handleOuterEvent",function(S){var E=Jce(S),T=Po(A.props,"".concat(E));if(E&&Ft(T)){var C,N;/.*touch.*/i.test(E)?N=A.getMouseInfo(S.changedTouches[0]):N=A.getMouseInfo(S),T((C=N)!==null&&C!==void 0?C:{},S)}}),bt(Qt(A),"handleClick",function(S){var E=A.getMouseInfo(S);if(E){var T=he(he({},E),{},{isTooltipActive:!0});A.setState(T),A.triggerSyncEvent(T);var C=A.props.onClick;Ft(C)&&C(T,S)}}),bt(Qt(A),"handleMouseDown",function(S){var E=A.props.onMouseDown;if(Ft(E)){var T=A.getMouseInfo(S);E(T,S)}}),bt(Qt(A),"handleMouseUp",function(S){var E=A.props.onMouseUp;if(Ft(E)){var T=A.getMouseInfo(S);E(T,S)}}),bt(Qt(A),"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),bt(Qt(A),"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&A.handleMouseDown(S.changedTouches[0])}),bt(Qt(A),"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&A.handleMouseUp(S.changedTouches[0])}),bt(Qt(A),"triggerSyncEvent",function(S){A.props.syncId!==void 0&&UE.emit(FE,A.props.syncId,S,A.eventEmitterSymbol)}),bt(Qt(A),"applySyncEvent",function(S){var E=A.props,T=E.layout,C=E.syncMethod,N=A.state.updateId,B=S.dataStartIndex,L=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)A.setState(he({dataStartIndex:B,dataEndIndex:L},g({props:A.props,dataStartIndex:B,dataEndIndex:L,updateId:N},A.state)));else if(S.activeTooltipIndex!==void 0){var U=S.chartX,j=S.chartY,X=S.activeTooltipIndex,G=A.state,H=G.offset,re=G.tooltipTicks;if(!H)return;if(typeof C=="function")X=C(re,S);else if(C==="value"){X=-1;for(var V=0;V=0){var ne,le;if(U.dataKey&&!U.allowDuplicatedCategory){var te=typeof U.dataKey=="function"?Ee:"payload.".concat(U.dataKey.toString());ne=i8(V,te,X),le=ee&&pe&&i8(pe,te,X)}else ne=V==null?void 0:V[j],le=ee&&pe&&pe[j];if(De||nt){var Ce=S.props.activeIndex!==void 0?S.props.activeIndex:j;return[F.cloneElement(S,he(he(he({},C.props),Tt),{},{activeIndex:Ce})),null,null]}if(!Yt(ne))return[ln].concat(Xp(A.renderActivePoints({item:C,activePoint:ne,basePoint:le,childIndex:j,isRange:ee})))}else{var Se,ze=(Se=A.getItemByXY(A.state.activeCoordinate))!==null&&Se!==void 0?Se:{graphicalItem:ln},$e=ze.graphicalItem,rt=$e.item,dt=rt===void 0?S:rt,wt=$e.childIndex,yt=he(he(he({},C.props),Tt),{},{activeIndex:wt});return[F.cloneElement(dt,yt),null,null]}return ee?[ln,null,null]:[ln,null]}),bt(Qt(A),"renderCustomized",function(S,E,T){return F.cloneElement(S,he(he({key:"recharts-customized-".concat(T)},A.props),A.state))}),bt(Qt(A),"renderMap",{CartesianGrid:{handler:Tb,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Tb},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Tb},YAxis:{handler:Tb},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((b=m.id)!==null&&b!==void 0?b:OA("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=Ej(A.triggeredAfterMouseMove,(x=m.throttleDelay)!==null&&x!==void 0?x:1e3/60),A.state={},A}return LSe(y,[{key:"componentDidMount",value:function(){var b,x;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(x=this.props.margin.top)!==null&&x!==void 0?x:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,x=b.children,A=b.data,S=b.height,E=b.layout,T=Ra(x,Es);if(T){var C=T.props.defaultIndex;if(!(typeof C!="number"||C<0||C>this.state.tooltipTicks.length)){var N=this.state.tooltipTicks[C]&&this.state.tooltipTicks[C].value,B=wS(this.state,A,C,N),L=this.state.tooltipTicks[C].coordinate,U=(this.state.offset.top+S)/2,j=E==="horizontal",X=j?{x:L,y:U}:{y:L,x:U},G=this.state.formattedGraphicalItems.find(function(re){var V=re.item;return V.type.name==="Scatter"});G&&(X=he(he({},X),G.props.points[C].tooltipPosition),B=G.props.points[C].tooltipPayload);var H={activeTooltipIndex:C,isTooltipActive:!0,activeLabel:N,activePayload:B,activeCoordinate:X};this.setState(H),this.renderCursor(T),this.accessibilityManager.setIndex(C)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,x){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==x.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var A,S;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(b){s8([Ra(b.children,Es)],[Ra(this.props.children,Es)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Ra(this.props.children,Es);if(b&&typeof b.props.shared=="boolean"){var x=b.props.shared?"axis":"item";return l.indexOf(x)>=0?x:o}return o}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var x=this.container,A=x.getBoundingClientRect(),S=bve(A),E={chartX:Math.round(b.pageX-S.left),chartY:Math.round(b.pageY-S.top)},T=A.width/x.offsetWidth||1,C=this.inRange(E.chartX,E.chartY,T);if(!C)return null;var N=this.state,B=N.xAxisMap,L=N.yAxisMap,U=this.getTooltipEventType();if(U!=="axis"&&B&&L){var j=Gh(B).scale,X=Gh(L).scale,G=j&&j.invert?j.invert(E.chartX):null,H=X&&X.invert?X.invert(E.chartY):null;return he(he({},E),{},{xValue:G,yValue:H})}var re=HR(this.state,this.props.data,this.props.layout,C);return re?he(he({},E),re):null}},{key:"inRange",value:function(b,x){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,E=b/A,T=x/A;if(S==="horizontal"||S==="vertical"){var C=this.state.offset,N=E>=C.left&&E<=C.left+C.width&&T>=C.top&&T<=C.top+C.height;return N?{x:E,y:T}:null}var B=this.state,L=B.angleAxisMap,U=B.radiusAxisMap;if(L&&U){var j=Gh(L);return E9({x:E,y:T},j)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,x=this.getTooltipEventType(),A=Ra(b,Es),S={};A&&x==="axis"&&(A.props.trigger==="click"?S={onClick:this.handleClick}:S={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var E=mx(this.props,this.handleOuterEvent);return he(he({},E),S)}},{key:"addListener",value:function(){UE.on(FE,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){UE.removeListener(FE,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,x,A){for(var S=this.state.formattedGraphicalItems,E=0,T=S.length;E{const r=F.useMemo(()=>t.map(({value:i,...a})=>({...a,value:Number(i)})),[t]);return q.jsx("div",{className:Er.clsx(Y_.pieChart,n),children:q.jsx(hve,{width:"100%",height:"100%",children:q.jsx(nPe,{children:q.jsx(Ll,{dataKey:"value",data:r,innerRadius:50,outerRadius:100,legendType:"none",children:r.map(({name:i})=>q.jsx(t4,{className:Y_.pieChartCell,fill:e[i],stroke:e[i]},i))})})})})},iPe="_table_1lmm4_1",aPe={table:iPe},oPe=({headers:t,data:e,className:n,children:r})=>q.jsxs("table",{className:Er.clsx(aPe.table,n),children:[q.jsx("thead",{children:q.jsx("tr",{children:t.map(i=>q.jsx("th",{children:i},i))})}),q.jsx("tbody",{children:e.map(r)})]}),sPe=["Answer","Votes","%"],QR=["#006dd2","#45f1f4","#bbbbbb"],lPe=()=>{const{getVoteCounts:t}=nv(),{state:{poll:e}}=ig(),[n,r]=F.useState([]);F.useEffect(()=>{if((e==null?void 0:e.active)===!0)return;let l=!0;return(async()=>{const u=await t();l&&r(u)})(),()=>{l=!1}},[]);const[i,a,o,s]=F.useMemo(()=>{if(!n.length)return[[],0n,void 0,{}];const l=W7.map((h,d)=>({...h,value:n[d]})).sort(({value:h},{value:d})=>h>d?-1:hh+d,0n),[u]=l,f=l.reduce((h,{name:d},g)=>({...h,[d]:QR[g%QR.length]}),{});return[l,c,u,f]},[n]);return(e==null?void 0:e.active)===!0?q.jsx(V7,{to:"/",replace:!0}):q.jsx("div",{children:q.jsxs(AP,{children:[q.jsx("p",{className:Ql.cardHeaderText,children:"Below are the final results of the mascot poll."}),o&&q.jsx("div",{className:Ql.winningMascot,children:q.jsx(lD,{selected:!0,orientation:"horizontal",title:o.name,description:o.description,image:q.jsx("img",{alt:o.name,src:o.imagePath}),actions:q.jsxs("div",{className:Ql.winningMascotBadge,children:["Winning mascot",q.jsx(toe,{})]})})}),q.jsxs("div",{className:Ql.mascotPollData,children:[q.jsx(rPe,{className:Ql.mascotPollDataPieChart,data:i,colorMap:s}),q.jsx(oPe,{className:Ql.mascotResultsTable,headers:sPe,data:i,children:({name:l,value:c})=>q.jsxs("tr",{style:{color:s[l]},children:[q.jsx("td",{children:q.jsx("span",{className:Ql.answerColName,children:l})}),q.jsx("td",{children:c.toLocaleString()}),q.jsx("td",{children:new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2}).format(c/a)})]},l)})]}),(!!_6||!!(e!=null&&e.params.closeTimestamp))&&q.jsxs("p",{className:Ql.cardFooterText,children:["Poll opened",!!_6&&q.jsxs(q.Fragment,{children:[" from ",ld.intlDateFormat(ld.unixFormatToDate(_6))]}),!!(e!=null&&e.params.closeTimestamp)&&q.jsxs(q.Fragment,{children:[" until ",ld.intlDateFormat(ld.unixFormatToDate(e.params.closeTimestamp))]}),"."]})]})})},cPe=(t=localStorage)=>({set:(a,o)=>{try{const s=JSON.stringify(o);t.setItem(a,s)}catch(s){console.error(s)}},get:a=>{try{const o=t.getItem(a);return o?JSON.parse(o):void 0}catch(o){console.error(o)}},removeItem:a=>{t.removeItem(a)},clear:()=>{t.clear()}});var M4=(t=>(t.Votes="Votes",t))(M4||{}),dH={exports:{}};(function(t,e){(function(r,i){t.exports=i(F)})(Kg,n=>(()=>{var r={"./node_modules/css-mediaquery/index.js":(s,l)=>{l.match=g,l.parse=p;var c=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,u=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,f=/^(?:(min|max)-)?(.+)/,h=/(em|rem|px|cm|mm|in|pt|pc)?$/,d=/(dpi|dpcm|dppx)?$/;function g(x,A){return p(x).some(function(S){var E=S.inverse,T=S.type==="all"||A.type===S.type;if(T&&E||!(T||E))return!1;var C=S.expressions.every(function(N){var B=N.feature,L=N.modifier,U=N.value,j=A[B];if(!j)return!1;switch(B){case"orientation":case"scan":return j.toLowerCase()===U.toLowerCase();case"width":case"height":case"device-width":case"device-height":U=b(U),j=b(j);break;case"resolution":U=m(U),j=m(j);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":U=y(U),j=y(j);break;case"grid":case"color":case"color-index":case"monochrome":U=parseInt(U,10)||1,j=parseInt(j,10)||0;break}switch(L){case"min":return j>=U;case"max":return j<=U;default:return j===U}});return C&&!E||!C&&E})}function p(x){return x.split(",").map(function(A){A=A.trim();var S=A.match(c),E=S[1],T=S[2],C=S[3]||"",N={};return N.inverse=!!E&&E.toLowerCase()==="not",N.type=T?T.toLowerCase():"all",C=C.match(/\([^\)]+\)/g)||[],N.expressions=C.map(function(B){var L=B.match(u),U=L[1].toLowerCase().match(f);return{modifier:U[1],feature:U[2],value:L[2]}}),N})}function y(x){var A=Number(x),S;return A||(S=x.match(/^(\d+)\s*\/\s*(\d+)$/),A=S[1]/S[2]),A}function m(x){var A=parseFloat(x),S=String(x).match(d)[1];switch(S){case"dpcm":return A/2.54;case"dppx":return A*96;default:return A}}function b(x){var A=parseFloat(x),S=String(x).match(h)[1];switch(S){case"em":return A*16;case"rem":return A*16;case"cm":return A*96/2.54;case"mm":return A*96/2.54/10;case"in":return A*96;case"pt":return A*72;case"pc":return A*72/12;default:return A}}},"./node_modules/hyphenate-style-name/index.js":(s,l,c)=>{c.r(l),c.d(l,{default:()=>p});var u=/[A-Z]/g,f=/^ms-/,h={};function d(y){return"-"+y.toLowerCase()}function g(y){if(h.hasOwnProperty(y))return h[y];var m=y.replace(u,d);return h[y]=f.test(m)?"-"+m:m}const p=g},"./node_modules/matchmediaquery/index.js":(s,l,c)=>{var u=c("./node_modules/css-mediaquery/index.js").match,f=typeof window<"u"?window.matchMedia:null;function h(g,p,y){var m=this;if(f&&!y){var b=f.call(window,g);this.matches=b.matches,this.media=b.media,b.addListener(S)}else this.matches=u(g,p),this.media=g;this.addListener=x,this.removeListener=A,this.dispose=E;function x(T){b&&b.addListener(T)}function A(T){b&&b.removeListener(T)}function S(T){m.matches=T.matches,m.media=T.media}function E(){b&&b.removeListener(S)}}function d(g,p,y){return new h(g,p,y)}s.exports=d},"./node_modules/object-assign/index.js":s=>{/* -object-assign -(c) Sindre Sorhus -@license MIT -*/var l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;function f(d){if(d==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(d)}function h(){try{if(!Object.assign)return!1;var d=new String("abc");if(d[5]="de",Object.getOwnPropertyNames(d)[0]==="5")return!1;for(var g={},p=0;p<10;p++)g["_"+String.fromCharCode(p)]=p;var y=Object.getOwnPropertyNames(g).map(function(b){return g[b]});if(y.join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(b){m[b]=b}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}s.exports=h()?Object.assign:function(d,g){for(var p,y=f(d),m,b=1;b{var u=function(){};{var f=c("./node_modules/prop-types/lib/ReactPropTypesSecret.js"),h={},d=c("./node_modules/prop-types/lib/has.js");u=function(p){var y="Warning: "+p;typeof console<"u"&&console.error(y);try{throw new Error(y)}catch{}}}function g(p,y,m,b,x){for(var A in p)if(d(p,A)){var S;try{if(typeof p[A]!="function"){var E=Error((b||"React class")+": "+m+" type `"+A+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[A]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}S=p[A](y,A,b,m,null,f)}catch(C){S=C}if(S&&!(S instanceof Error)&&u((b||"React class")+": type specification of "+m+" `"+A+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof S+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),S instanceof Error&&!(S.message in h)){h[S.message]=!0;var T=x?x():"";u("Failed "+m+" type: "+S.message+(T??""))}}}g.resetWarningCache=function(){h={}},s.exports=g},"./node_modules/prop-types/factoryWithTypeCheckers.js":(s,l,c)=>{var u=c("./node_modules/react-is/index.js"),f=c("./node_modules/object-assign/index.js"),h=c("./node_modules/prop-types/lib/ReactPropTypesSecret.js"),d=c("./node_modules/prop-types/lib/has.js"),g=c("./node_modules/prop-types/checkPropTypes.js"),p=function(){};p=function(m){var b="Warning: "+m;typeof console<"u"&&console.error(b);try{throw new Error(b)}catch{}};function y(){return null}s.exports=function(m,b){var x=typeof Symbol=="function"&&Symbol.iterator,A="@@iterator";function S(ne){var le=ne&&(x&&ne[x]||ne[A]);if(typeof le=="function")return le}var E="<>",T={array:L("array"),bigint:L("bigint"),bool:L("boolean"),func:L("function"),number:L("number"),object:L("object"),string:L("string"),symbol:L("symbol"),any:U(),arrayOf:j,element:X(),elementType:G(),instanceOf:H,node:pe(),objectOf:V,oneOf:re,oneOfType:ee,shape:we,exact:Ye};function C(ne,le){return ne===le?ne!==0||1/ne===1/le:ne!==ne&&le!==le}function N(ne,le){this.message=ne,this.data=le&&typeof le=="object"?le:{},this.stack=""}N.prototype=Error.prototype;function B(ne){var le={},te=0;function Ce(ze,$e,rt,dt,wt,yt,Pe){if(dt=dt||E,yt=yt||rt,Pe!==h){if(b){var nn=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 nn.name="Invariant Violation",nn}else if(typeof console<"u"){var cn=dt+":"+rt;!le[cn]&&te<3&&(p("You are manually calling a React.PropTypes validation function for the `"+yt+"` prop on `"+dt+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),le[cn]=!0,te++)}}return $e[rt]==null?ze?$e[rt]===null?new N("The "+wt+" `"+yt+"` is marked as required "+("in `"+dt+"`, but its value is `null`.")):new N("The "+wt+" `"+yt+"` is marked as required in "+("`"+dt+"`, but its value is `undefined`.")):null:ne($e,rt,dt,wt,yt)}var Se=Ce.bind(null,!1);return Se.isRequired=Ce.bind(null,!0),Se}function L(ne){function le(te,Ce,Se,ze,$e,rt){var dt=te[Ce],wt=st(dt);if(wt!==ne){var yt=Tt(dt);return new N("Invalid "+ze+" `"+$e+"` of type "+("`"+yt+"` supplied to `"+Se+"`, expected ")+("`"+ne+"`."),{expectedType:ne})}return null}return B(le)}function U(){return B(y)}function j(ne){function le(te,Ce,Se,ze,$e){if(typeof ne!="function")return new N("Property `"+$e+"` of component `"+Se+"` has invalid PropType notation inside arrayOf.");var rt=te[Ce];if(!Array.isArray(rt)){var dt=st(rt);return new N("Invalid "+ze+" `"+$e+"` of type "+("`"+dt+"` supplied to `"+Se+"`, expected an array."))}for(var wt=0;wt1?p("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):p("Invalid argument supplied to oneOf, expected an array."),y;function le(te,Ce,Se,ze,$e){for(var rt=te[Ce],dt=0;dt0?", expected one of type ["+wt.join(", ")+"]":"";return new N("Invalid "+rt+" `"+dt+"` supplied to "+("`"+$e+"`"+cn+"."))}return B(Ce)}function pe(){function ne(le,te,Ce,Se,ze){return nt(le[te])?null:new N("Invalid "+Se+" `"+ze+"` supplied to "+("`"+Ce+"`, expected a ReactNode."))}return B(ne)}function Ae(ne,le,te,Ce,Se){return new N((ne||"React class")+": "+le+" type `"+te+"."+Ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Se+"`.")}function we(ne){function le(te,Ce,Se,ze,$e){var rt=te[Ce],dt=st(rt);if(dt!=="object")return new N("Invalid "+ze+" `"+$e+"` of type `"+dt+"` "+("supplied to `"+Se+"`, expected `object`."));for(var wt in ne){var yt=ne[wt];if(typeof yt!="function")return Ae(Se,ze,$e,wt,Tt(yt));var Pe=yt(rt,wt,Se,ze,$e+"."+wt,h);if(Pe)return Pe}return null}return B(le)}function Ye(ne){function le(te,Ce,Se,ze,$e){var rt=te[Ce],dt=st(rt);if(dt!=="object")return new N("Invalid "+ze+" `"+$e+"` of type `"+dt+"` "+("supplied to `"+Se+"`, expected `object`."));var wt=f({},te[Ce],ne);for(var yt in wt){var Pe=ne[yt];if(d(ne,yt)&&typeof Pe!="function")return Ae(Se,ze,$e,yt,Tt(Pe));if(!Pe)return new N("Invalid "+ze+" `"+$e+"` key `"+yt+"` supplied to `"+Se+"`.\nBad object: "+JSON.stringify(te[Ce],null," ")+` -Valid keys: `+JSON.stringify(Object.keys(ne),null," "));var nn=Pe(rt,yt,Se,ze,$e+"."+yt,h);if(nn)return nn}return null}return B(le)}function nt(ne){switch(typeof ne){case"number":case"string":case"undefined":return!0;case"boolean":return!ne;case"object":if(Array.isArray(ne))return ne.every(nt);if(ne===null||m(ne))return!0;var le=S(ne);if(le){var te=le.call(ne),Ce;if(le!==ne.entries){for(;!(Ce=te.next()).done;)if(!nt(Ce.value))return!1}else for(;!(Ce=te.next()).done;){var Se=Ce.value;if(Se&&!nt(Se[1]))return!1}}else return!1;return!0;default:return!1}}function De(ne,le){return ne==="symbol"?!0:le?le["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&le instanceof Symbol:!1}function st(ne){var le=typeof ne;return Array.isArray(ne)?"array":ne instanceof RegExp?"object":De(le,ne)?"symbol":le}function Tt(ne){if(typeof ne>"u"||ne===null)return""+ne;var le=st(ne);if(le==="object"){if(ne instanceof Date)return"date";if(ne instanceof RegExp)return"regexp"}return le}function ln(ne){var le=Tt(ne);switch(le){case"array":case"object":return"an "+le;case"boolean":case"date":case"regexp":return"a "+le;default:return le}}function Ee(ne){return!ne.constructor||!ne.constructor.name?E:ne.constructor.name}return T.checkPropTypes=g,T.resetWarningCache=g.resetWarningCache,T.PropTypes=T,T}},"./node_modules/prop-types/index.js":(s,l,c)=>{{var u=c("./node_modules/react-is/index.js"),f=!0;s.exports=c("./node_modules/prop-types/factoryWithTypeCheckers.js")(u.isElement,f)}},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":s=>{var l="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";s.exports=l},"./node_modules/prop-types/lib/has.js":s=>{s.exports=Function.call.bind(Object.prototype.hasOwnProperty)},"./node_modules/react-is/cjs/react-is.development.js":(s,l)=>{/** @license React v16.13.1 - * react-is.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(){var c=typeof Symbol=="function"&&Symbol.for,u=c?Symbol.for("react.element"):60103,f=c?Symbol.for("react.portal"):60106,h=c?Symbol.for("react.fragment"):60107,d=c?Symbol.for("react.strict_mode"):60108,g=c?Symbol.for("react.profiler"):60114,p=c?Symbol.for("react.provider"):60109,y=c?Symbol.for("react.context"):60110,m=c?Symbol.for("react.async_mode"):60111,b=c?Symbol.for("react.concurrent_mode"):60111,x=c?Symbol.for("react.forward_ref"):60112,A=c?Symbol.for("react.suspense"):60113,S=c?Symbol.for("react.suspense_list"):60120,E=c?Symbol.for("react.memo"):60115,T=c?Symbol.for("react.lazy"):60116,C=c?Symbol.for("react.block"):60121,N=c?Symbol.for("react.fundamental"):60117,B=c?Symbol.for("react.responder"):60118,L=c?Symbol.for("react.scope"):60119;function U(Pe){return typeof Pe=="string"||typeof Pe=="function"||Pe===h||Pe===b||Pe===g||Pe===d||Pe===A||Pe===S||typeof Pe=="object"&&Pe!==null&&(Pe.$$typeof===T||Pe.$$typeof===E||Pe.$$typeof===p||Pe.$$typeof===y||Pe.$$typeof===x||Pe.$$typeof===N||Pe.$$typeof===B||Pe.$$typeof===L||Pe.$$typeof===C)}function j(Pe){if(typeof Pe=="object"&&Pe!==null){var nn=Pe.$$typeof;switch(nn){case u:var cn=Pe.type;switch(cn){case m:case b:case h:case g:case d:case A:return cn;default:var Gn=cn&&cn.$$typeof;switch(Gn){case y:case x:case T:case E:case p:return Gn;default:return nn}}case f:return nn}}}var X=m,G=b,H=y,re=p,V=u,ee=x,pe=h,Ae=T,we=E,Ye=f,nt=g,De=d,st=A,Tt=!1;function ln(Pe){return Tt||(Tt=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Ee(Pe)||j(Pe)===m}function Ee(Pe){return j(Pe)===b}function ne(Pe){return j(Pe)===y}function le(Pe){return j(Pe)===p}function te(Pe){return typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===u}function Ce(Pe){return j(Pe)===x}function Se(Pe){return j(Pe)===h}function ze(Pe){return j(Pe)===T}function $e(Pe){return j(Pe)===E}function rt(Pe){return j(Pe)===f}function dt(Pe){return j(Pe)===g}function wt(Pe){return j(Pe)===d}function yt(Pe){return j(Pe)===A}l.AsyncMode=X,l.ConcurrentMode=G,l.ContextConsumer=H,l.ContextProvider=re,l.Element=V,l.ForwardRef=ee,l.Fragment=pe,l.Lazy=Ae,l.Memo=we,l.Portal=Ye,l.Profiler=nt,l.StrictMode=De,l.Suspense=st,l.isAsyncMode=ln,l.isConcurrentMode=Ee,l.isContextConsumer=ne,l.isContextProvider=le,l.isElement=te,l.isForwardRef=Ce,l.isFragment=Se,l.isLazy=ze,l.isMemo=$e,l.isPortal=rt,l.isProfiler=dt,l.isStrictMode=wt,l.isSuspense=yt,l.isValidElementType=U,l.typeOf=j})()},"./node_modules/react-is/index.js":(s,l,c)=>{s.exports=c("./node_modules/react-is/cjs/react-is.development.js")},"./node_modules/shallow-equal/dist/index.esm.js":(s,l,c)=>{c.r(l),c.d(l,{shallowEqualArrays:()=>f,shallowEqualObjects:()=>u});function u(h,d){if(h===d)return!0;if(!h||!d)return!1;var g=Object.keys(h),p=Object.keys(d),y=g.length;if(p.length!==y)return!1;for(var m=0;m{Object.defineProperty(l,"__esModule",{value:!0});var u=c("react"),f=(0,u.createContext)(void 0);l.default=f},"./src/index.ts":function(s,l,c){var u=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(l,"__esModule",{value:!0}),l.Context=l.toQuery=l.useMediaQuery=l.default=void 0;var f=u(c("./src/useMediaQuery.ts"));l.useMediaQuery=f.default;var h=u(c("./src/Component.ts"));l.default=h.default;var d=u(c("./src/toQuery.ts"));l.toQuery=d.default;var g=u(c("./src/Context.ts"));l.Context=g.default},"./src/mediaQuery.ts":function(s,l,c){var u=this&&this.__assign||function(){return u=Object.assign||function(A){for(var S,E=1,T=arguments.length;E{s.exports=n}},i={};function a(s){var l=i[s];if(l!==void 0)return l.exports;var c=i[s]={exports:{}};return r[s].call(c.exports,c,c.exports,a),c.exports}a.d=(s,l)=>{for(var c in l)a.o(l,c)&&!a.o(s,c)&&Object.defineProperty(s,c,{enumerable:!0,get:l[c]})},a.o=(s,l)=>Object.prototype.hasOwnProperty.call(s,l),a.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var o=a("./src/index.ts");return o})())})(dH);var uPe=dH.exports;const pH=cPe(),fPe={isInitialLoading:!0,poll:null,previousVotes:pH.get(M4.Votes)??{},previousVote:null,appError:"",isMobileScreen:!1,isDesktopScreen:!1},hPe=({children:t})=>{const e=uPe.useMediaQuery({query:"(min-width: 1000px)"}),{state:{isVoidSignerConnected:n,account:r},getPoll:i}=nv(),[a,o]=F.useState({...fPe});F.useEffect(()=>{o(f=>({...f,isDesktopScreen:e,isMobileScreen:!e}))},[e]),F.useEffect(()=>{r&&o(f=>({...f,previousVote:Ts.isValidMascotChoiceId(a.previousVotes[r])?a.previousVotes[r]:null}))},[r]),F.useEffect(()=>{pH.set(M4.Votes,a.previousVotes)},[a.previousVotes]),F.useEffect(()=>{if(!n)return;(async()=>{const h=await i(),{params:{numChoices:d}}=h;d!==3n&&console.warn("[numChoices] Unexpected number of poll choices, this dApp may not behave as expected!"),o(g=>({...g,isInitialLoading:!1,poll:h}))})()},[n]);const u={state:a,setPreviousVoteForCurrentWallet:f=>{r&&Ts.isValidMascotChoiceId(f)&&o(h=>({...h,previousVotes:{...h.previousVotes,[r]:f}}))},setAppError:f=>{if(f==null)return;let h="";Object.prototype.hasOwnProperty.call(f,"message")?h=f.message:typeof f=="object"?h=JSON.stringify(h):h=f,o(d=>({...d,appError:h}))},clearAppError:()=>{o(f=>({...f,appError:""}))}};return q.jsx(Q7.Provider,{value:u,children:t})},dPe=tK([{path:"/",element:q.jsx(cJ,{}),children:[{path:"results",element:q.jsx(lPe,{})},{path:"",element:q.jsx(NJ,{})}]}]),pPe=()=>q.jsx(jae,{children:q.jsx(Vae,{children:q.jsx(hPe,{children:q.jsx(uK,{router:dPe})})})});zE.createRoot(document.getElementById("root")).render(q.jsx(pPe,{})); -function __vite__mapDeps(indexes) { - if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = [] - } - return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -} diff --git a/votee/index.html b/votee/index.html index 69bdfbf..47dfbf2 100644 --- a/votee/index.html +++ b/votee/index.html @@ -5,8 +5,8 @@ Oasis VoTEE - - + +